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.
1228 lines
2.2 MiB
1228 lines
2.2 MiB
(self.webpackChunk=self.webpackChunk||[]).push([[337],{71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Cn,On){"use strict";On.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},52654:function(Cn,On){"use strict";On.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},14375:function(Cn,On,Me){"use strict";var fe=Me(67294),Ke=Object.defineProperty,St=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Be=(it,st,Ft)=>st in it?Ke(it,st,{enumerable:!0,configurable:!0,writable:!0,value:Ft}):it[st]=Ft,He=(it,st)=>{for(var Ft in st||(st={}))zt.call(st,Ft)&&Be(it,Ft,st[Ft]);if(St)for(var Ft of St(st))ft.call(st,Ft)&&Be(it,Ft,st[Ft]);return it};const gt=it=>React.createElement("svg",He({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},it),React.createElement("title",null,"\u7F16\u7EC4 18"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("circle",{fill:"#FCB041",cx:7,cy:7,r:7}),React.createElement("path",{d:"M7.531 9.638a.616.616 0 1 1-1.231 0v-.02a.616.616 0 1 1 1.231 0v.02Zm0-2.25a.616.616 0 1 1-1.231 0V4.117a.616.616 0 1 1 1.231 0v3.273Z",fill:"#FFF",fillRule:"nonzero"})));On.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},18023:function(){"use strict";function Cn(Ae,ne,te,ue){te===void 0&&(te=0),ue===void 0&&(ue=1/0),this._name=Ae,this._defaultValue=ne,this._minimum=te,this._maximum=ue}Object.defineProperty(Cn.prototype,"name",{get:function(){return this._name},set:function(Ae){if(typeof Ae!="string"||Ae==="")throw new Error("Shape name must be a valid string.");this._name=Ae}}),Object.defineProperty(Cn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("The default value must be a real number, not: "+Ae);this._defaultValue=Ae}}),Object.defineProperty(Cn.prototype,"minimum",{get:function(){return this._minimum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Minimum must be a real number, not: "+Ae);this._minimum=Ae}}),Object.defineProperty(Cn.prototype,"maximum",{get:function(){return this._maximum},set:function(Ae){if(typeof Ae!="number"||isNaN(Ae))throw new Error("Maximum must be a real number, not: "+Ae);this._maximum=Ae}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Ae,ne){var te=go.Shape._FigureParameters[Ae];return te?te[ne]:null},go.Shape.setFigureParameter=function(Ae,ne,te){if(!(te instanceof Cn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+te);if(te.defaultValue<te.minimum||te.defaultValue>te.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+te.defaultValue);var ue=go.Shape._FigureParameters[Ae];ue||(ue=[],go.Shape._FigureParameters[Ae]=ue),ue[ne]=te};var On=[];function Me(Ae,ne){var te=On.pop();return te===void 0?new go.Point(Ae,ne):(te.x=Ae,te.y=ne,te)}function fe(){var Ae=On.pop();return Ae===void 0?new go.Point:Ae}function Ke(Ae){On.push(Ae)}function St(Ae,ne,te,ue,se,pe,ve,Se,Pe){Pe||(Pe=new go.Point);var Oe=Ae-te,Re=se-ve,tt=NaN,rt=NaN;if(Oe===0)if(Re===0)Ae===te&&(tt=Ae,rt=ne);else{var Je=(pe-Se)/Re,bt=pe-Je*se;tt=Ae,rt=Je*tt+bt}else if(Re===0){var lt=(ne-ue)/Oe,Lt=ne-lt*Ae;tt=se,rt=lt*tt+Lt}else{var lt=(ne-ue)/Oe,Je=(pe-Se)/Re,Lt=ne-lt*Ae,bt=pe-Je*se;tt=(bt-Lt)/(lt-Je),rt=lt*tt+Lt}return Pe.x=tt,Pe.y=rt,Pe}function zt(Ae,ne,te,ue,se,pe,ve,Se,Pe,Oe,Re,tt,rt,Je){var bt=1-Pe,lt=Pe,Lt=Ae*bt+te*lt,Mt=ne*bt+ue*lt,pt=te*bt+se*lt,dn=ue*bt+pe*lt,tn=se*bt+ve*lt,vn=pe*bt+Se*lt,Tn=Lt*bt+pt*lt,Ve=Mt*bt+dn*lt,Ze=pt*bt+tn*lt,Qe=dn*bt+vn*lt,mn=Tn*bt+Ze*lt,kn=Ve*bt+Qe*lt;Oe.x=Lt,Oe.y=Mt,Re.x=Tn,Re.y=Ve,tt.x=mn,tt.y=kn,rt.x=Ze,rt.y=Qe,Je.x=tn,Je.y=vn}var ft=new go.Spot(.156,.156),Be=new go.Spot(.844,.844),He=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Cn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=5),ue=Math.min(ue,ne/3),ue=Math.min(ue,te/3);var se=ue*He,pe=new go.Geometry().add(new go.PathFigure(ue,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,ne-se,0,ne,se)).add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)).add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,te-se,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,ue,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,se,te,0,te-se)).add(new go.PathSegment(go.PathSegment.Line,0,ue)).add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,se,se,0).close()));return se>1&&(pe.spot1=new go.Spot(0,0,se,se),pe.spot2=new go.Spot(1,1,-se,-se)),pe}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(ne,te).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(ne,te).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Ae,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=0,ue.startY=te/2,ue.endX=ne,ue.endY=te/2,ue}),go.Shape.defineFigureGenerator("LineV",function(Ae,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=ne/2,ue.startY=0,ue.endX=ne/2,ue.endY=te,ue}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,te/2,!1).add(new go.PathSegment(go.PathSegment.Line,ne,te/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,te)))}),go.Shape.defineFigureGenerator("XLine",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)))}),go.Shape.defineFigureGenerator("LineRight",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.25*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)))}),go.Shape.defineFigureGenerator("LineDown",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,.25*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.75*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)))}),go.Shape.defineFigureGenerator("LineLeft",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.75*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,te)))}),go.Shape.defineFigureGenerator("LineUp",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,.75*te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Ae,ne,te){var ue=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ue*ne,(1-ue)*te,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Move,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Move,0,te/2)).add(new go.PathSegment(go.PathSegment.Line,ne,te/2)).add(new go.PathSegment(go.PathSegment.Move,ne/2,0)).add(new go.PathSegment(go.PathSegment.Line,ne/2,te)))}),go.Shape.defineFigureGenerator("CircleLine",function(Ae,ne,te){var ue=ne/2,se=new go.Geometry().add(new go.PathFigure(ne,ne/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ue,ue,ue,ue).close()));return se.spot1=ft,se.spot2=Be,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Ae,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=0,ue.startY=0,ue.endX=ne,ue.endY=te,ue}),go.Shape.defineFigureGenerator("Line2",function(Ae,ne,te){var ue=new go.Geometry(go.Geometry.Line);return ue.startX=ne,ue.startY=0,ue.endX=0,ue.endY=te,ue}),go.Shape.defineFigureGenerator("Curve1",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,He*ne,0,ne,(1-He)*te)))}),go.Shape.defineFigureGenerator("Curve2",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,0,He*te,(1-He)*ne,te)))}),go.Shape.defineFigureGenerator("Curve3",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,He*te,He*ne,te)))}),go.Shape.defineFigureGenerator("Curve4",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,(1-He)*ne,0,0,(1-He)*te)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Cn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)?ue=.1:ue<-1?ue=-1:ue>1&&(ue=1);var se=Math.abs(ue)*ne;if(ue===0){var pe=new go.Geometry(go.Geometry.Rectangle);return pe.startX=0,pe.startY=0,pe.endX=ne,pe.endY=te,pe}else{var pe=new go.Geometry;return ue>0?pe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):pe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),se<ne/2&&pe.setSpots(se/ne,0,(ne-se)/ne,1),pe}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)?ue=10:ue<-ne?ue=-ne:ue>ne&&(ue=ne);var se=Math.abs(ue);if(ue===0){var pe=new go.Geometry(go.Geometry.Rectangle);return pe.startX=0,pe.startY=0,pe.endX=ne,pe.endY=te,pe}else{var pe=new go.Geometry;return ue>0?pe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):pe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),se<ne/2&&pe.setSpots(se/ne,0,(ne-se)/ne,1),pe}}),go.Shape.setFigureParameter("Trapezoid1",0,new Cn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)?ue=.2:ue<.5?ue=-.5:ue>.5&&(ue=.5);var se=Math.abs(ue)*ne;if(ue===0){var pe=new go.Geometry(go.Geometry.Rectangle);return pe.startX=0,pe.startY=0,pe.endX=ne,pe.endY=te,pe}else{var pe=new go.Geometry;return ue>0?pe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):pe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),se<ne/2&&pe.setSpots(se/ne,0,(ne-se)/ne,1),pe}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Cn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)?ue=20:ue<-ne?ue=-ne/2:ue>ne&&(ue=ne/2);var se=Math.abs(ue);if(ue===0){var pe=new go.Geometry(go.Geometry.Rectangle);return pe.startX=0,pe.startY=0,pe.endX=ne,pe.endY=te,pe}else{var pe=new go.Geometry;return ue>0?pe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())):pe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())),se<ne/2&&pe.setSpots(se/ne,0,(ne-se)/ne,1),pe}}),go.Shape.setFigureParameter("ManualOperation",0,new Cn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)?ue=10:ue<-ne?ue=-ne/2:ue>ne&&(ue=ne/2);var se=Math.abs(ue);if(ue===0){var pe=new go.Geometry(go.Geometry.Rectangle);return pe.startX=0,pe.startY=0,pe.endX=ne,pe.endY=te,pe}else{var pe=new go.Geometry;return ue>0?pe.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,se,te).close())):pe.add(new go.PathFigure(se,0).add(new go.PathSegment(go.PathSegment.Line,ne-se,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close())),se<ne/2&&pe.setSpots(se/ne,0,(ne-se)/ne,1),pe}});var gt=[];function it(){var Ae=gt.pop();return Ae===void 0?[]:Ae}function st(Ae){Ae.length=0,gt.push(Ae)}function Ft(Ae){for(var ne=it(),te=.5,ue=.5,se=Math.PI*1.5,pe=0,ve=0;ve<Ae;ve++)pe=2*Math.PI/Ae*ve+se,ne[ve]=new go.Point(ue+te*Math.cos(pe),ue+te*Math.sin(pe));return ne.push(ne[0]),ne}function Nt(Ae){var ne=Bt(Ae),te=it();te[0]=ne[0];for(var ue=1,se=1;ue<ne.length;ue+=2,se+=3)te[se]=ne[ue],te[se+1]=ne[ue],te[se+2]=ne[ue+1];return st(ne),te}function Bt(Ae){for(var ne=Ft(Ae),te=it(),ue=Math.floor(ne.length/2),se=ne.length-1,pe=Ae%2===0?2:1,ve=0;ve<se;ve++){var Se=ne[ve],Pe=ne[ve+1],Oe=ne[(ue+ve-1)%se],Re=ne[(ue+ve+pe)%se];te[ve*2]=Se,te[ve*2+1]=St(Se.x,Se.y,Oe.x,Oe.y,Pe.x,Pe.y,Re.x,Re.y,new go.Point)}return te[te.length]=te[0],st(ne),te}go.Shape.defineFigureGenerator("Pentagon",function(Ae,ne,te){var ue=Ft(5),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<5;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Ae,ne,te){var ue=Ft(6),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<6;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Ae,ne,te){var ue=Ft(7),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<7;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Ae,ne,te){var ue=Ft(8),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<8;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Ae,ne,te){var ue=Ft(9),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<9;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Ae,ne,te){var ue=Ft(10),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<10;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Ae,ne,te){var ue=Ft(12),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<12;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Ae,ne,te){var ue=Bt(5),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<10;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Ae,ne,te){var ue=Bt(6),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<12;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Ae,ne,te){var ue=Bt(7),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<14;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Ae,ne,te){var ue=Bt(8),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<16;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Ae,ne,te){var ue=Bt(9),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<18;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Ae,ne,te){var ue=Bt(10),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<20;ve++)pe.add(new go.PathSegment(go.PathSegment.Line,ue[ve].x*ne,ue[ve].y*te));return pe.add(new go.PathSegment(go.PathSegment.Line,ue[0].x*ne,ue[0].y*te).close()),st(ue),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Ae,ne,te){var ue=Nt(5),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Ae,ne,te){var ue=Nt(6),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Ae,ne,te){var ue=Nt(7),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Ae,ne,te){var ue=Nt(8),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Ae,ne,te){var ue=Nt(9),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Ae,ne,te){var ue=Nt(10),se=new go.Geometry,pe=new go.PathFigure(ue[0].x*ne,ue[0].y*te,!0);se.add(pe);for(var ve=1;ve<ue.length;ve+=3)pe.add(new go.PathSegment(go.PathSegment.Bezier,ue[ve+2].x*ne,ue[ve+2].y*te,ue[ve].x*ne,ue[ve].y*te,ue[ve+1].x*ne,ue[ve+1].y*te));return pe.segments.last().close(),st(ue),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Cn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Cn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(ue)&&(ue=8),isNaN(se)&&(se=8);var pe=new go.Geometry,ve=new go.PathFigure(0,0,!0);return pe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue<ne/2&&se<te/2&&(ve.add(new go.PathSegment(go.PathSegment.Move,ue,se)),ve.add(new go.PathSegment(go.PathSegment.Line,ue,te-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ue,te-se)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ue,se).close())),pe.setSpots(0,0,1,1,ue,se,-ue,-se),pe}),go.Shape.setFigureParameter("Ring",0,new Cn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=8);var se=ne/2,pe=new go.Geometry,ve=new go.PathFigure(ne,ne/2,!0);pe.add(ve),ve.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var Se=Math.max(se-ue,0);return Se>0&&(ve.add(new go.PathSegment(go.PathSegment.Move,ne/2+Se,ne/2)),ve.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,Se,Se).close())),pe.spot1=ft,pe.spot2=Be,pe.defaultStretch=go.GraphObject.Uniform,pe}),go.Shape.defineFigureGenerator("Cloud",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.08034461*ne,.1944299*te,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*ne,.05349299*te,-.09239631*ne,.07836421*te,.1406031*ne,-.0542823*te)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*ne,.074219*te,.2450511*ne,-.00697547*te,.3776197*ne,-.01112067*te)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*ne,.07004196*te,.4539471*ne,0,.6066018*ne,-.02526587*te)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*ne,.08370865*te,.6914277*ne,-.01904177*te,.8921095*ne,-.01220843*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*ne,.3194596*te,1.036446*ne,.04105738*te,1.020377*ne,.3022052*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*ne,.562044*te,1.04448*ne,.360238*te,.992256*ne,.5219009*te)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*ne,.8217117*te,1.032337*ne,.5771781*te,1.018411*ne,.8120651*te)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*ne,.9156953*te,1.028411*ne,.9571472*te,.8556702*ne,1.052487*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*ne,.9310455*te,.7431877*ne,1.009325*te,.5624123*ne,1.021761*te)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*ne,.9344623*te,.4820677*ne,1.031761*te,.3030112*ne,1.002796*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.870098*te,.2329994*ne,1.01518*te,.03213784*ne,1.01518*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*ne,.6545475*te,-.02812061*ne,.9032597*te,-.01205169*ne,.6835638*te)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*ne,.4265613*te,-.01812061*ne,.6089503*te,-.00606892*ne,.4555777*te)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*ne,.1944299*te,-.01606892*ne,.3892545*te,-.01205169*ne,.1944299*te))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Ae,ne,te){var ue=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ue*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,ne,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ue)*te)).add(new go.PathSegment(go.PathSegment.Line,0,ue*te).close())).setSpots(ue/2,ue/2,1-ue/2,1-ue/2)}),go.Shape.setFigureParameter("Pie",0,new Cn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Cn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN,se=Ae?Ae.parameter2:NaN;isNaN(ue)&&(ue=0),isNaN(se)&&(se=315);var pe=ue%360;pe<0&&(pe+=360);var ve=se%360,Se=Math.min(ne,te)/2;return new go.Geometry().add(new go.PathFigure(Se,Se).add(new go.PathSegment(go.PathSegment.Arc,pe,ve,Se,Se,Se,Se).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Ae,ne,te){var ue=He/Math.SQRT2*.5,se=Math.SQRT2/2,pe=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,pe*te,ne,(1-ue)*te,(se+ue)*ne,(pe+ue)*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=30);var se=Math.min(ue,ne)/2,pe=ne/2,ve=te/2;return new go.Geometry().add(new go.PathFigure(pe-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,pe+se,0)).add(new go.PathSegment(go.PathSegment.Line,pe+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,pe+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,pe+se,te)).add(new go.PathSegment(go.PathSegment.Line,pe-se,te)).add(new go.PathSegment(go.PathSegment.Line,pe-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,pe-se,ve-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=10);var se=Math.min(ue,ne)/2,pe=ne/2,ve=te/2;return new go.Geometry().add(new go.PathFigure(pe-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,pe+se,0)).add(new go.PathSegment(go.PathSegment.Line,pe+se,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ve+se)).add(new go.PathSegment(go.PathSegment.Line,pe+se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,pe+se,te)).add(new go.PathSegment(go.PathSegment.Line,pe-se,te)).add(new go.PathSegment(go.PathSegment.Line,pe-se,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve+se)).add(new go.PathSegment(go.PathSegment.Line,0,ve-se)).add(new go.PathSegment(go.PathSegment.Line,pe-se,ve-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;if((isNaN(ue)||ue<0)&&(ue=30),ne===0||te===0){var se=new go.Geometry(go.Geometry.Rectangle);return se.startX=0,se.startY=0,se.endX=ne,se.endY=te,se}else{var pe=ne/2,ve=te/2,Se=Math.atan2(te,ne),Pe=ue-Math.min(Math.cos(Se)*ue/2,pe),Oe=ue-Math.min(Math.sin(Se)*ue/2,ve),se=new go.Geometry,Re=new go.PathFigure(Pe,0,!0);return se.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,pe,.2*te)),Re.add(new go.PathSegment(go.PathSegment.Line,ne-Pe,0)),Re.add(new go.PathSegment(go.PathSegment.Line,ne,Oe)),Re.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,ne,te-Oe)),Re.add(new go.PathSegment(go.PathSegment.Line,ne-Pe,te)),Re.add(new go.PathSegment(go.PathSegment.Line,pe,.8*te)),Re.add(new go.PathSegment(go.PathSegment.Line,Pe,te)),Re.add(new go.PathSegment(go.PathSegment.Line,0,te-Oe)),Re.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,0,Oe).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Cn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=10);var se=new go.Geometry,pe=new go.PathFigure(.1*ne,0,!0);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.9*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.1*te).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Cn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.2);var se=new go.Geometry,pe=new go.PathFigure(0,0,!0);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(.5+ue/2)*ne,ue*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(.5+ue/2)*ne,(1-ue)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ue)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,(1-ue)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(.5-ue/2)*ne,(1-ue)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(.5-ue/2)*ne,ue*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ue*te).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Cn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.5);var se=new go.Geometry,pe=new go.PathFigure(0,0,!0);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,te,Math.abs(1-ue)*ne,.25*te,Math.abs(1-ue)*ne,.75*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ue*ne,.75*te,ue*ne,.25*te).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,He*ne,0,ne,(.5-He/2)*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,(.5+He/2)*te,He*ne,te).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,0,ne,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*ne,.75*te,.5*ne,.25*te).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,.1*ne,.8*te,0,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,0,0,.45*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*te,.55*ne,0,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,.5*te,.9*ne,.8*te).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*ne,.01*te)).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.6*ne,.2*te,ne,.25*te)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.7*te,ne,.8*te,.6*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,.5*ne,.75*te,.55*ne,.95*te)).add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)).add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.7*te,.45*ne,.95*te,.5*ne,.75*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.4*ne,.8*te,0,.8*te)).add(new go.PathSegment(go.PathSegment.Bezier,.49*ne,.01*te,0,.25*te,.4*ne,.2*te).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.4*ne,.6*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.15*ne,te,.5*ne,.75*te,.45*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.6*te,.55*ne,.95*te,.5*ne,.75*te));var pe=.2,ve=.3,Se=0,Pe=pe*He;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+pe+Se)*te,(.5-pe+ve)*ne,(.5+Pe+Se)*te,(.5-Pe+ve)*ne,(.5+pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pe+ve)*ne,(.5+Se)*te,(.5+Pe+ve)*ne,(.5+pe+Se)*te,(.5+pe+ve)*ne,(.5+Pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-pe+Se)*te,(1-.5+pe+ve)*ne,(.5-Pe+Se)*te,(.5+Pe+ve)*ne,(.5-pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*te,(.5-Pe+ve)*ne,(.5-pe+Se)*te,(.5-pe+ve+.05)*ne,(.5-Pe+Se-.02)*te)),pe=.2,ve=0,Se=-.3,Pe=pe*He,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+pe+ve)*ne,(.5+Se)*te,(.5+Pe+ve)*ne,(.5+pe+Se)*te,(.5+pe+ve)*ne,(.5+Pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-pe+Se)*te,(1-.5+pe+ve)*ne,(.5-Pe+Se)*te,(.5+Pe+ve)*ne,(.5-pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pe+ve)*ne,(.5+Se)*te,(.5-Pe+ve)*ne,(.5-pe+Se)*te,(.5-pe+ve)*ne,(.5-Pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Pe+ve)*ne,(.5+pe+Se)*te,(.5-pe+ve)*ne,(.5+Pe+Se)*te,(.5-Pe+ve)*ne,(.5+pe+Se)*te)),pe=.2,ve=-.3,Se=0,Pe=pe*He,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5-pe+Se)*te,(1-.5+pe+ve-.05)*ne,(.5-Pe+Se-.02)*te,(.5+Pe+ve)*ne,(.5-pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-pe+ve)*ne,(.5+Se)*te,(.5-Pe+ve)*ne,(.5-pe+Se)*te,(.5-pe+ve)*ne,(.5-Pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ve)*ne,(.5+pe+Se)*te,(.5-pe+ve)*ne,(.5+Pe+Se)*te,(.5-Pe+ve)*ne,(.5+pe+Se)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*te,(.5+Pe+ve)*ne,(.5+pe+Se)*te,(.5+pe+ve)*ne,(.5+Pe+Se)*te).close()),ue.setSpots(.06,.33,.93,.68),ue}),go.Shape.defineFigureGenerator("YinYang",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.5,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*.5,ne*.5,ne*.5,ne*.5)),se.add(new go.PathSegment(go.PathSegment.Arc,90,-180,ne*.5,ne*.75,ne*.25,ne*.25)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,ne*.5,ne*.25,ne*.25,ne*.25));var pe=.1,ve=.5,Se=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ve+pe)*ne,Se*te)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*ve,te*Se,pe*ne,pe*ne).close()),se=new go.PathFigure(ne*.5,0,!1),ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*.5,ne*.5,ne*.5,ne*.5)),Se=.75,se=new go.PathFigure((ve+pe)*ne,Se*te,!0),ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*ve,te*Se,pe*ne,pe*ne).close()),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("Peace",function(Ae,ne,te){var ue=.8535533905932737,se=.5*ne,pe=.5*te;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,pe,se,pe)).add(new go.PathSegment(go.PathSegment.Line,se,te)).add(new go.PathSegment(go.PathSegment.Move,se,pe)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Move,se,pe)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,ue*te)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=.5,ve=.5,Se=.5,Pe=new go.PathFigure(ve*ne,(Se-pe)*te);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),pe=.4,se=He*.4;var Oe=fe(),Re=fe(),tt=fe(),rt=fe();zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.42,Oe,Re,tt,rt,rt);var Je=fe(),bt=fe(),lt=fe();zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.58,rt,rt,lt,Je,bt);var Lt=fe(),Mt=fe(),pt=fe();zt(ve,Se+pe,ve-se,Se+pe,ve-pe,Se+se,ve-pe,Se,.42,Lt,Mt,pt,rt,rt);var dn=fe(),tn=fe(),vn=fe();return zt(ve,Se+pe,ve-se,Se+pe,ve-pe,Se+se,ve-pe,Se,.58,rt,rt,vn,dn,tn),Pe.add(new go.PathSegment(go.PathSegment.Move,vn.x*ne,vn.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,dn.x*ne,dn.y*te,tn.x*ne,tn.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,tt.x*ne,tt.y*te,Oe.x*ne,Oe.y*te,Re.x*ne,Re.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,vn.x*ne,vn.y*te).close()),Pe.add(new go.PathSegment(go.PathSegment.Move,pt.x*ne,pt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,lt.x*ne,lt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,Je.x*ne,Je.y*te,bt.x*ne,bt.y*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,pt.x*ne,pt.y*te,Lt.x*ne,Lt.y*te,Mt.x*ne,Mt.y*te).close()),Ke(Oe),Ke(Re),Ke(tt),Ke(rt),Ke(Je),Ke(bt),Ke(lt),Ke(Lt),Ke(Mt),Ke(pt),Ke(dn),Ke(tn),Ke(vn),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("Fragile",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.29*ne,.33*te)).add(new go.PathSegment(go.PathSegment.Line,.35*ne,.25*te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.15*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.5*te,ne,.25*te,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.5*te,0,.25*te).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Cn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=30),ue>ne&&(ue=ne);var se=(ne-ue)/2,pe=se+ue;return new go.Geometry().add(new go.PathFigure(pe,.5*te).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)).add(new go.PathSegment(go.PathSegment.Line,se,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,ne,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,.55*te).add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.3*ne,.45*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.45*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.55*te).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Ae,ne,te){var ue=new go.Geometry,se=He*.4,pe=.4,ve=.5,Se=.5,Pe=fe(),Oe=fe(),Re=fe(),tt=fe(),rt=new go.PathFigure((ve-pe)*ne,Se*te,!1);ue.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te)),zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.44,Re,tt,Oe,Pe,Pe),rt.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*ne,Oe.y*te,Re.x*ne,Re.y*te,tt.x*ne,tt.y*te));var Je=Me(Oe.x,Oe.y);zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.56,Pe,Pe,Oe,Re,tt);var bt=Me(Oe.x,Oe.y);rt.add(new go.PathSegment(go.PathSegment.Line,(Je.x*.1+.95*.9)*ne,Je.y*.1*te)),rt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,Je.y*.1*te)),rt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),rt.add(new go.PathSegment(go.PathSegment.Line,ne,0)),rt.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),rt.add(new go.PathSegment(go.PathSegment.Line,(bt.x*.1+.9)*ne,.15*te)),rt.add(new go.PathSegment(go.PathSegment.Line,(bt.x*.1+.9)*ne,(bt.y*.1+.05*.9)*te)),rt.add(new go.PathSegment(go.PathSegment.Line,bt.x*ne,bt.y*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,Re.x*ne,Re.y*te,tt.x*ne,tt.y*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te)),pe=.35,se=He*.35;var lt=new go.PathFigure(ve*ne,(Se-pe)*te,!1);ue.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te));var Lt=new go.PathFigure((ve-pe)*ne,Se*te,!1);return ue.add(Lt),Ke(Pe),Ke(Oe),Ke(Re),Ke(tt),Ke(Je),Ke(bt),ue.spot1=new go.Spot(.202,.257),ue.spot2=new go.Spot(.792,.739),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("GenderFemale",function(Ae,ne,te){var ue=new go.Geometry,se=.375,pe=0,ve=-.125,Se=se*He,Pe=new go.PathFigure((.525+pe)*ne,(.5+se+ve)*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+pe)*ne,(.5+ve)*te,(.5+Se+pe)*ne,(.5+se+ve)*te,(.5+se+pe)*ne,(.5+Se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pe)*ne,(.5-se+ve)*te,(1-.5+se+pe)*ne,(.5-Se+ve)*te,(.5+Se+pe)*ne,(.5-se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+pe)*ne,(.5+ve)*te,(.5-Se+pe)*ne,(.5-se+ve)*te,(.5-se+pe)*ne,(.5-Se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.475+pe)*ne,(.5+se+ve)*te,(.5-se+pe)*ne,(.5+Se+ve)*te,(.5-Se+pe)*ne,(.5+se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.475*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*te).close()),se=.325,pe=0,ve=-.125,Se=se*He;var Pe=new go.PathFigure((1-.5+se+pe)*ne,(.5+ve)*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pe)*ne,(.5+se+ve)*te,(.5+se+pe)*ne,(.5+Se+ve)*te,(.5+Se+pe)*ne,(.5+se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+pe)*ne,(.5+ve)*te,(.5-Se+pe)*ne,(.5+se+ve)*te,(.5-se+pe)*ne,(.5+Se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(.5+pe)*ne,(.5-se+ve)*te,(.5-se+pe)*ne,(.5-Se+ve)*te,(.5-Se+pe)*ne,(.5-se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+pe)*ne,(.5+ve)*te,(.5+Se+pe)*ne,(.5-se+ve)*te,(1-.5+se+pe)*ne,(.5-Se+ve)*te));var Pe=new go.PathFigure((.525+pe)*ne,(.5+se+ve)*te,!1);return ue.add(Pe),ue.spot1=new go.Spot(.232,.136),ue.spot2=new go.Spot(.682,.611),ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("LogicImplies",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;return isNaN(ue)&&(ue=.2),new go.Geometry().add(new go.PathFigure((1-ue)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;return isNaN(ue)&&(ue=.2),new go.Geometry().add(new go.PathFigure((1-ue)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ue)*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Move,ue*ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ue*ne,te))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Ae,ne,te){var ue=new go.Geometry().add(new go.PathFigure(.5*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*ne,.5*te,.5*ne,.5*te)));return ue.defaultStretch=go.GraphObject.Uniform,ue}),go.Shape.defineFigureGenerator("LogicTruth",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Move,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Move,0,te)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Ae,ne,te){var ue=.5;return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,0,ue*te)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ue*ne,ue*te,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Ae,ne,te){var ue=.5;return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ue*te)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ue*ne,ue*te,ue*ne,ue*te)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Cn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Cn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.3);var pe=(1-ue)*ne,ve=(.5-se/2)*te,Se=(.5+se/2)*te,Pe=new go.Geometry,Oe=new go.PathFigure(0,ve,!0);Pe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,ve)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,te)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,Se)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),Pe.spot1=new go.Spot(0,ve/te);var Re=St(0,Se/te,1,Se/te,pe/ne,1,1,.5,fe());return Pe.spot2=new go.Spot(Re.x,Re.y),Ke(Re),Pe}),go.Shape.setFigureParameter("Arrow2",0,new Cn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Cn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=30),ue>ne&&(ue=ne);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,te/2);var pe=ne-ue,ve=(te-se)/2,Se=ve+se,Pe=new go.Geometry,Oe=new go.PathFigure(0,ve,!0);Pe.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,ve)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,0)),Oe.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,te)),Oe.add(new go.PathSegment(go.PathSegment.Line,pe,Se)),Oe.add(new go.PathSegment(go.PathSegment.Line,0,Se).close()),Pe.spot1=new go.Spot(0,ve/te);var Re=St(0,Se/te,1,Se/te,pe/ne,1,1,.5,fe());return Pe.spot2=new go.Spot(Re.x,Re.y),Ke(Re),Pe}),go.Shape.defineFigureGenerator("Chevron",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("DoubleArrow",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.214*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,1*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.786*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,1*te).close()),ue}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Cn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=(.5-ue/2)*te,pe=(.5+ue/2)*te,ve=new go.Geometry,Se=new go.PathFigure(ne,.5*te,!0);ve.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close());var Pe=St(0,.5,.3,0,0,se/te,.1,se/te,fe());return ve.spot1=new go.Spot(Pe.x,Pe.y),Pe=St(.7,1,1,.5,0,pe/te,1,pe/te,Pe),ve.spot2=new go.Spot(Pe.x,Pe.y),Ke(Pe),ve}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Cn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Cn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var pe=(te-ue)/2,ve=pe+ue,Se=(te-se)/2,Pe=Se+se;(ue>te||se>te)&&(se>ue?(ue=ue*te/se,pe=(te-ue)/2,ve=pe+ue,Se=0,Pe=te):(pe=0,ve=te,Se=0,Pe=te));var Oe=new go.Geometry,Re=new go.PathFigure(ne,.5*te,!0);Oe.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,.3*ne,Pe)),Re.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),Re.add(new go.PathSegment(go.PathSegment.Line,.3*ne,Se)),Re.add(new go.PathSegment(go.PathSegment.Line,.3*ne,pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Se).close());var tt=St(0,.5,.3,Se/te,0,pe/te,1,pe/te,fe());return Oe.spot1=new go.Spot(tt.x,tt.y),tt=St(.7,Pe/te,1,.5,0,ve/te,1,ve/te,tt),Oe.spot2=new go.Spot(tt.x,tt.y),Ke(tt),Oe}),go.Shape.setFigureParameter("IBeamArrow",0,new Cn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=(.5-ue/2)*te,pe=(.5+ue/2)*te,ve=new go.Geometry,Se=new go.PathFigure(ne,.5*te,!0);ve.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,0,te)),Se.add(new go.PathSegment(go.PathSegment.Line,0,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(0,se/te);var Pe=St(.7,1,1,.5,0,pe/te,1,pe/te,fe());return ve.spot2=new go.Spot(Pe.x,Pe.y),Ke(Pe),ve}),go.Shape.setFigureParameter("IBeamArrow2",0,new Cn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Cn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=40);var se=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=100);var pe=(te-ue)/2,ve=pe+ue,Se=(te-se)/2,Pe=Se+se;(ue>te||se>te)&&(se>ue?(ue=ue*te/se,pe=(te-ue)/2,ve=pe+ue,Se=0,Pe=te):(pe=0,ve=te,Se=0,Pe=te));var Oe=new go.Geometry,Re=new go.PathFigure(ne,.5*te,!0);Oe.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ve)),Re.add(new go.PathSegment(go.PathSegment.Line,.2*ne,Pe)),Re.add(new go.PathSegment(go.PathSegment.Line,0,Pe)),Re.add(new go.PathSegment(go.PathSegment.Line,0,Se)),Re.add(new go.PathSegment(go.PathSegment.Line,.2*ne,Se)),Re.add(new go.PathSegment(go.PathSegment.Line,.2*ne,pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Re.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Se).close()),Oe.spot1=new go.Spot(0,pe/te);var tt=St(.7,Pe/te,1,.5,0,ve/te,1,ve/te,fe());return Oe.spot2=new go.Spot(tt.x,tt.y),Ke(tt),Oe}),go.Shape.setFigureParameter("Pointer",0,new Cn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.1);var se=new go.Geometry,pe=new go.PathFigure(ne,.5*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,ue*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ue,.35);var ve=St(.2,.65,1,.65,0,1,1,.5,fe());return se.spot2=new go.Spot(ve.x,ve.y),Ke(ve),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Cn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.3);var se=new go.Geometry,pe=new go.PathFigure(ne,.5*te,!0);se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ue*ne,.75*te,ue*ne,.25*te).close()),se.spot1=new go.Spot(ue,.35);var ve=St(0,.65,1,.65,0,1,1,.5,fe());return se.spot2=new go.Spot(ve.x,ve.y),Ke(ve),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Cn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.4);var se=(.5-ue/2)*te,pe=(.5+ue/2)*te,ve=new go.Geometry,Se=new go.PathFigure(ne,.5*te,!0);ve.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,0,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(.2,.3);var Pe=St(.7,1,1,.5,0,pe/te,1,pe/te,fe());return ve.spot2=new go.Spot(Pe.x,Pe.y),Ke(Pe),ve}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Cn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=50);var se=(te-ue)/2,pe=se+ue;ue>te&&(se=0,pe=te);var ve=new go.Geometry,Se=new go.PathFigure(ne,.5*te,!0);ve.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,0,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,0,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ve.spot1=new go.Spot(.2,se/te);var Pe=St(.7,1,1,.5,0,pe/te,1,pe/te,fe());return ve.spot2=new go.Spot(Pe.x,Pe.y),Ke(Pe),ve}),go.Shape.setFigureParameter("SquareArrow",0,new Cn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.7);var se=new go.Geometry,pe=new go.PathFigure(ne,.5*te,!0);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ue*ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ue*ne,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ue,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=He*.1,ve=new go.PathFigure(0,.9*te,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+pe)*te,(.5+se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+pe)*te).close()),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.97),ue}),go.Shape.defineFigureGenerator("Cone2",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.9*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*te,(1-.85/.9)*ne,te,.85/.9*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.9*te).close());var pe=new go.PathFigure(0,.9*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*te,(1-.85/.9)*ne,.8*te,.85/.9*ne,.8*te)),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.82),ue}),go.Shape.defineFigureGenerator("Cube1",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var pe=new go.PathFigure(.5*ne,te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(.5,.85),ue}),go.Shape.defineFigureGenerator("Cube2",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.3*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0).close());var pe=new go.PathFigure(0,.3*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(.7,1),ue}),go.Shape.defineFigureGenerator("Cylinder1",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,te/3);var se=new go.Geometry,pe=He*.5,ve=new go.PathFigure(0,ue,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,He*ue,(.5-pe)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ue,(.5+pe)*ne,0,1*ne,He*ue)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*te,1*ne,te-He*ue,(.5+pe)*ne,1*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,(.5-pe)*ne,1*te,0,te-He*ue)),ve.add(new go.PathSegment(go.PathSegment.Line,0,ue));var Se=new go.PathFigure(ne,ue,!1);return se.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,2*ue,1*ne,2*ue-He*ue,(.5+pe)*ne,2*ue)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,ue,(.5-pe)*ne,2*ue,0,2*ue-He*ue)),se.spot1=new go.Spot(0,0,0,2*ue),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,te/3);var se=new go.Geometry,pe=He*.5,ve=new go.PathFigure(0,te-ue,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,ue)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,He*ue,(.5-pe)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,(.5+pe)*ne,0,ne,He*ue)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te-ue)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,te-He*ue,(.5+pe)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ue,(.5-pe)*ne,te,0,te-He*ue));var Se=new go.PathFigure(0,te-ue,!1);return se.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te-2*ue,0,te-ue-He*ue,(.5-pe)*ne,te-2*ue)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ne,te-ue,(.5+pe)*ne,te-2*ue,ne,te-ue-He*ue)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ue),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,ne/3);var se=new go.Geometry,pe=He*.5,ve=new go.PathFigure(ue,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-He*ue,0,ne,(.5-pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,(.5+pe)*te,ne-He*ue,te)),ve.add(new go.PathSegment(go.PathSegment.Line,ue,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,He*ue,te,0,(.5+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,(.5-pe)*te,He*ue,0));var Se=new go.PathFigure(ue,0,!1);return se.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,2*ue,.5*te,ue+He*ue,0,2*ue,(.5-pe)*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue,te,2*ue,(.5+pe)*te,ue+He*ue,te)),se.spot1=new go.Spot(0,0,2*ue,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=5),ue=Math.min(ue,ne/3);var se=new go.Geometry,pe=He*.5,ve=new go.PathFigure(ne-ue,0,!0);se.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-He*ue,0,ne,(.5-pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne,(.5+pe)*te,ne-He*ue,te)),ve.add(new go.PathSegment(go.PathSegment.Line,ue,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,He*ue,te,0,(.5+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,(.5-pe)*te,He*ue,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0));var Se=new go.PathFigure(ne-ue,0,!1);return se.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,ne-2*ue,.5*te,ne-ue-He*ue,0,ne-2*ue,(.5-pe)*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,te,ne-2*ue,(.5+pe)*te,ne-ue-He*ue,te)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ue,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,.25*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(.25*ne,.25*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.408,.172),ue.spot2=new go.Spot(.833,.662),ue}),go.Shape.defineFigureGenerator("Prism2",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.25*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(0,te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),pe.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),ue.spot1=new go.Spot(.25,.5),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("Pyramid1",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te).close());var pe=new go.PathFigure(.5*ne,0,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.25,.367),ue.spot2=new go.Spot(.75,.875),ue}),go.Shape.defineFigureGenerator("Pyramid2",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.85*te).close());var pe=new go.PathFigure(.5*ne,0,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.85*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),ue.spot1=new go.Spot(.25,.367),ue.spot2=new go.Spot(.75,.875),ue}),go.Shape.defineFigureGenerator("Actor",function(Ae,ne,te){var ue=new go.Geometry,se=.2,pe=.1,ve=He*se,Se=He*pe,Pe=.5,Oe=.1,Re=new go.PathFigure(Pe*ne,(Oe+pe)*te,!0);ue.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-se)*ne,Oe*te,(Pe-ve)*ne,(Oe+pe)*te,(Pe-se)*ne,(Oe+Se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-pe)*te,(Pe-se)*ne,(Oe-Se)*te,(Pe-ve)*ne,(Oe-pe)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+se)*ne,Oe*te,(Pe+ve)*ne,(Oe-pe)*te,(Pe+se)*ne,(Oe-Se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe+pe)*te,(Pe+se)*ne,(Oe+Se)*te,(Pe+ve)*ne,(Oe+pe)*te));var tt=.05,rt=He*tt;Pe=.05,Oe=.25;var Je=new go.PathFigure(.5*ne,.2*te,!0);return ue.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*te)),Pe=.95,Oe=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+tt)*ne,Oe*te,(Pe+rt)*ne,(Oe-tt)*te,(Pe+tt)*ne,(Oe-rt)*te)),Je.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*te)),tt=.025,rt=He*tt,Pe=.825,Oe=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-tt)*te,(Pe+tt)*ne,(Oe-rt)*te,(Pe+rt)*ne,(Oe-tt)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-tt)*ne,Oe*te,(Pe-rt)*ne,(Oe-tt)*te,(Pe-tt)*ne,(Oe-rt)*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,te)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te)),tt=.05,rt=He*tt,Pe=.5,Oe=.7,Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-tt)*te,(Pe+tt)*ne,(Oe-rt)*te,(Pe+rt)*ne,(Oe-tt)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-tt)*ne,Oe*te,(Pe-rt)*ne,(Oe-tt)*te,(Pe-tt)*ne,(Oe-rt)*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.45*ne,te)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),Je.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*te)),tt=.025,rt=He*tt,Pe=.175,Oe=.35,Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-tt)*te,(Pe+tt)*ne,(Oe-rt)*te,(Pe+rt)*ne,(Oe-tt)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-tt)*ne,Oe*te,(Pe-rt)*ne,(Oe-tt)*te,(Pe-tt)*ne,(Oe-rt)*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),Je.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),tt=.05,rt=He*tt,Pe=.05,Oe=.25,Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-tt)*te,(Pe-tt)*ne,(Oe-rt)*te,(Pe-rt)*ne,(Oe-tt)*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*te)),ue.spot1=new go.Spot(.2,.2),ue.spot2=new go.Spot(.8,.65),ue}),go.Shape.setFigureParameter("Card",0,new Cn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;isNaN(ue)&&(ue=.2);var se=new go.Geometry,pe=new go.PathFigure(ne,0,!0);return se.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,ue*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ue*ne,0).close()),se.spot1=new go.Spot(0,ue),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te));var pe=new go.PathFigure(.5*ne,.5*te,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),ue.spot1=new go.Spot(.25,0),ue.spot2=new go.Spot(.75,.25),ue}),go.Shape.defineFigureGenerator("CreateRequest",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var pe=new go.PathFigure(0,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ve=new go.PathFigure(0,se*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ue}),go.Shape.defineFigureGenerator("Database",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=He*.1,ve=new go.PathFigure(ne,.1*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+pe)*te,(.5+se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-pe)*te,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-pe)*te));var Se=new go.PathFigure(ne,.1*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+pe)*te,(.5+se)*ne,.2*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+pe)*te)),Se.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+pe)*te,(.5+se)*ne,.3*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+pe)*te)),Se.add(new go.PathSegment(go.PathSegment.Move,ne,.3*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.4*te,ne,(.3+pe)*te,(.5+se)*ne,.4*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,(.5-se)*ne,.4*te,0,(.3+pe)*te)),ue.spot1=new go.Spot(0,.4),ue.spot2=new go.Spot(1,.9),ue}),go.Shape.defineFigureGenerator("DataStorage",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,ne,0,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.9*te,.25*ne,.1*te).close()),ue.spot1=new go.Spot(.226,0),ue.spot2=new go.Spot(.81,1),ue}),go.Shape.defineFigureGenerator("DiskStorage",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=He*.1,ve=new go.PathFigure(ne,.1*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+pe)*te,(.5+se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-pe)*te,(.5-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-pe)*te));var Se=new go.PathFigure(ne,.1*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+pe)*te,(.5+se)*ne,.2*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+pe)*te)),Se.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+pe)*te,(.5+se)*ne,.3*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+pe)*te)),ue.spot1=new go.Spot(0,.3),ue.spot2=new go.Spot(1,.9),ue}),go.Shape.defineFigureGenerator("Display",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,te,ne,0,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close()),ue.spot1=new go.Spot(.25,0),ue.spot2=new go.Spot(.75,1),ue}),go.Shape.defineFigureGenerator("DividedEvent",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var pe=He*.2,ve=new go.PathFigure(0,.2*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-pe)*te,(.2-pe)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*te,(.8+pe)*ne,0,ne,(.2-pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,te,ne,(.8+pe)*te,(.8+pe)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-pe)*ne,te,0,(.8+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.2*te));var Se=new go.PathFigure(0,se*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ue}),go.Shape.defineFigureGenerator("DividedProcess",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var pe=new go.PathFigure(0,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ve=new go.PathFigure(0,se*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ue}),go.Shape.defineFigureGenerator("Document",function(Ae,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(1,.6),ue}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var pe=new go.PathFigure(0,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ve=new go.PathFigure(se*ne,0,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,0,se*te)),ve.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ue}),go.Shape.defineFigureGenerator("ExternalProcess",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var pe=new go.PathFigure(.1*ne,.4*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.9*te)),ue.spot1=new go.Spot(.25,.25),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("File",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(.75*ne,0,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("Interrupt",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te));var pe=new go.PathFigure(ne,.5*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te));var ve=new go.PathFigure(ne,.5*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("InternalStorage",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN,pe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(pe)&&(pe=.1);var ve=new go.PathFigure(0,0,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var Se=new go.PathFigure(se*ne,0,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Move,0,pe*te)),Se.add(new go.PathSegment(go.PathSegment.Line,ne,pe*te)),ue}),go.Shape.defineFigureGenerator("Junction",function(Ae,ne,te){var ue=new go.Geometry,se=1/Math.SQRT2,pe=(1-1/Math.SQRT2)/2,ve=He*.5,Se=.5,Pe=new go.PathFigure(ne,Se*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Se*ne,te,ne,(Se+ve)*te,(Se+ve)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,Se*te,(Se-ve)*ne,te,0,(Se+ve)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,Se*ne,0,0,(Se-ve)*te,(Se-ve)*ne,0)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,Se*te,(Se+ve)*ne,0,ne,(Se-ve)*te));var Oe=new go.PathFigure((pe+se)*ne,(pe+se)*te,!1);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,pe*ne,pe*te)),Oe.add(new go.PathSegment(go.PathSegment.Move,pe*ne,(pe+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Line,(pe+se)*ne,pe*te)),ue}),go.Shape.defineFigureGenerator("LinedDocument",function(Ae,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close());var pe=new go.PathFigure(.1*ne,0,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.75*te)),ue.spot1=new go.Spot(.1,0),ue.spot2=new go.Spot(1,.6),ue}),go.Shape.defineFigureGenerator("LoopLimit",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("MagneticTape",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=.5,ve=new go.PathFigure(.5*ne,te,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-se)*ne,te,0,(pe+se)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,pe*ne,0,0,(pe-se)*te,(pe-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,pe*te,(pe+se)*ne,0,ne,(pe-se)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,(pe+.1)*ne,.9*te,ne,(pe+se)*te,(pe+se)*ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ue.spot1=new go.Spot(.15,.15),ue.spot2=new go.Spot(.85,.8),ue}),go.Shape.defineFigureGenerator("ManualInput",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("MessageFromUser",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.7);var pe=new go.PathFigure(0,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var pe=new go.PathFigure(0,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("MicroformRecording",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(1,.75),ue}),go.Shape.defineFigureGenerator("MultiDocument",function(Ae,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.44*te,.96*ne,.47*te,.93*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.54*te,.86*ne,.57*te,.83*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.4*ne,.4*te,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0).close());var pe=new go.PathFigure(.1*ne,.2*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.44*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.8,.77),ue}),go.Shape.defineFigureGenerator("MultiProcess",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,.1*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te).close());var pe=new go.PathFigure(.2*ne,.1*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*te)),ue.spot1=new go.Spot(0,.2),ue.spot2=new go.Spot(.8,1),ue}),go.Shape.defineFigureGenerator("OfflineStorage",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var pe=1-se,ve=new go.PathFigure(0,0,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close());var Se=new go.PathFigure(.5*se*ne,se*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*ne,se*te)),ue}),go.Shape.defineFigureGenerator("OffPageConnector",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(.75,1),ue}),go.Shape.defineFigureGenerator("Or",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=.5,ve=new go.PathFigure(ne,pe*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,pe*ne,te,ne,(pe+se)*te,(pe+se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-se)*ne,te,0,(pe+se)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,pe*ne,0,0,(pe-se)*te,(pe-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,pe*te,(pe+se)*ne,0,ne,(pe-se)*te));var Se=new go.PathFigure(ne,.5*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ue}),go.Shape.defineFigureGenerator("PaperTape",function(Ae,ne,te){var ue=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.3*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.3*te,.5*ne,.6*te,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*te,.5*ne,.4*te,.5*ne,te).close()),ue.spot1=new go.Spot(0,.49),ue.spot2=new go.Spot(1,.75),ue}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN,pe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(pe)&&(pe=.3);var ve=new go.PathFigure(0,0,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-pe)*ne,.5*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN,pe=Ae?Ae.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(pe)&&(pe=.3);var ve=new go.PathFigure(0,0,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-pe)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-pe)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("Procedure",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var pe=new go.PathFigure(0,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ve=new go.PathFigure((1-se)*ne,0,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ue}),go.Shape.defineFigureGenerator("Process",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var pe=new go.PathFigure(0,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ve=new go.PathFigure(se*ne,0,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ue.spot2=go.Spot.BottomRight,ue}),go.Shape.defineFigureGenerator("Sort",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te).close());var pe=new go.PathFigure(0,.5*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),ue.spot1=new go.Spot(.25,.25),ue.spot2=new go.Spot(.75,.5),ue}),go.Shape.defineFigureGenerator("Start",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.25);var pe=new go.PathFigure(se*ne,0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*te,.25*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*te,.25*ne,.5*te));var ve=new go.PathFigure(se*ne,0,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),ue.spot1=new go.Spot(se,0),ue.spot2=new go.Spot(1-se,1),ue}),go.Shape.defineFigureGenerator("Terminator",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*te,.25*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*te,.25*ne,.5*te)),ue.spot1=new go.Spot(.23,0),ue.spot2=new go.Spot(.77,1),ue}),go.Shape.defineFigureGenerator("TransmittalTape",function(Ae,ne,te){var ue=new go.Geometry,se=Ae?Ae.parameter1:NaN;isNaN(se)&&(se=.1);var pe=new go.PathFigure(0,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te).close()),ue.spot1=go.Spot.TopLeft,ue}),go.Shape.defineFigureGenerator("AndGate",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=new go.PathFigure(0,0,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(.5+se)*ne,0,ne,(.5-se)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.5+se)*te,(.5+se)*ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=go.Spot.TopLeft,ue.spot2=new go.Spot(.55,1),ue}),go.Shape.defineFigureGenerator("Buffer",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("Clock",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=.5,ve=new go.PathFigure(ne,pe*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,pe*ne,te,ne,(pe+se)*te,(pe+se)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,pe*te,(pe-se)*ne,te,0,(pe+se)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,pe*ne,0,0,(pe-se)*te,(pe-se)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,pe*te,(pe+se)*ne,0,ne,(pe-se)*te));var Se=new go.PathFigure(ne,pe*te,!1);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne,pe*te));var Pe=new go.PathFigure(.8*ne,.75*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*te)),ue}),go.Shape.defineFigureGenerator("Ground",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Move,.3*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te)),ue}),go.Shape.defineFigureGenerator("Inverter",function(Ae,ne,te){var ue=new go.Geometry,se=He*.1,pe=.1,ve=.9,Se=.5,Pe=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),Pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te));var Oe=new go.PathFigure((ve+pe)*ne,Se*te,!0);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,(ve+se)*ne,(Se-pe)*te,(ve+pe)*ne,(Se-se)*te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.4,.75),ue}),go.Shape.defineFigureGenerator("NandGate",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=He*.4,ve=He*.1,Se=.1,Pe=.9,Oe=.5,Re=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,te,.8*ne,(.5+pe)*te,(.4+se)*ne,te)),Re.add(new go.PathSegment(go.PathSegment.Line,0,te)),Re.add(new go.PathSegment(go.PathSegment.Line,0,0)),Re.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(.4+se)*ne,0,.8*ne,(.5-pe)*te));var tt=new go.PathFigure((Pe+Se)*ne,Oe*te,!0);return ue.add(tt),tt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe+Se)*te,(Pe+Se)*ne,(Oe+ve)*te,(Pe+ve)*ne,(Oe+Se)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*ne,Oe*te,(Pe-ve)*ne,(Oe+Se)*te,(Pe-Se)*ne,(Oe+ve)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-Se)*te,(Pe-Se)*ne,(Oe-ve)*te,(Pe-ve)*ne,(Oe-Se)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*ne,Oe*te,(Pe+ve)*ne,(Oe-Se)*te,(Pe+Se)*ne,(Oe-ve)*te)),ue.spot1=new go.Spot(0,.05),ue.spot2=new go.Spot(.55,.95),ue}),go.Shape.defineFigureGenerator("NorGate",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*se,ve=0,Se=.5,Pe=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.7*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(ve+pe)*ne,(Se-se)*te,.7*ne,(Se-pe)*te)),se=.1,pe=He*.1,ve=.9,Se=.5;var Oe=new go.PathFigure((ve-se)*ne,Se*te,!0);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te)),ue.spot1=new go.Spot(.2,.25),ue.spot2=new go.Spot(.6,.75),ue}),go.Shape.defineFigureGenerator("OrGate",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*se,ve=0,Se=.5,Pe=new go.PathFigure(0,0,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(ve+pe+pe)*ne,(Se-se)*te,.8*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.8*ne,(Se+pe)*te,(ve+pe+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te).close()),ue.spot1=new go.Spot(.2,.25),ue.spot2=new go.Spot(.75,.75),ue}),go.Shape.defineFigureGenerator("XnorGate",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*se,ve=.2,Se=.5,Pe=new go.PathFigure(.1*ne,0,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Oe=new go.PathFigure(.8*ne,.5*te,!0);ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.7*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(ve+pe)*ne,(Se-se)*te,.7*ne,(Se-pe)*te)),se=.1,pe=He*.1,ve=.9,Se=.5;var Re=new go.PathFigure((ve-se)*ne,Se*te,!0);return ue.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te)),ue.spot1=new go.Spot(.4,.25),ue.spot2=new go.Spot(.65,.75),ue}),go.Shape.defineFigureGenerator("XorGate",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*se,ve=.2,Se=.5,Pe=new go.PathFigure(.1*ne,0,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Oe=new go.PathFigure(.2*ne,0,!0);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(ve+pe)*ne,(Se-se)*te,.9*ne,(Se-pe)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.9*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te).close()),ue.spot1=new go.Spot(.4,.25),ue.spot2=new go.Spot(.8,.75),ue}),go.Shape.defineFigureGenerator("Capacitor",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("Resistor",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Inductor",function(Ae,ne,te){var ue=new go.Geometry,se=He*.1,pe=.1,ve=.1,Se=.5,Pe=new go.PathFigure((ve-se*.5)*ne,te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,0,(ve-se)*ne,te,(ve-pe)*ne,0)),ve=.3,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,te,(ve+pe)*ne,0,(ve+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,0,(ve-se)*ne,te,(ve-pe)*ne,0)),ve=.5,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,te,(ve+pe)*ne,0,(ve+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,0,(ve-se)*ne,te,(ve-pe)*ne,0)),ve=.7,Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,te,(ve+pe)*ne,0,(ve+se)*ne,te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,0,(ve-se)*ne,te,(ve-pe)*ne,0)),ve=.9,Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se*.5)*ne,te,(ve+pe)*ne,0,(ve+se)*ne,te)),ue}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Ae,ne,te){var ue=new go.Geometry,se=He*.5,pe=.5,ve=.5,Se=.5,Pe=new go.PathFigure((ve-pe)*ne,Se*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,(ve+se)*ne,(Se-pe)*te,(ve+pe)*ne,(Se-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Move,(ve-pe+.1)*ne,Se*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe-.1)*ne,Se*te,ve*ne,(Se-pe)*te,ve*ne,(Se+pe)*te)),ue}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("Diode",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue.spot1=new go.Spot(0,.25),ue.spot2=new go.Spot(.5,.75),ue}),go.Shape.defineFigureGenerator("Wifi",function(Ae,ne,te){var ue=new go.Geometry,se=ne,pe=te;ne=ne*.38,te=te*.6;var ve=He*.8,Se=.8,Pe=0,Oe=.5,Re=(se-ne)/2,tt=(pe-te)/2,rt=new go.PathFigure(Pe*ne+Re,(Oe+Se)*te+tt,!0);ue.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*ne+Re,Oe*te+tt,(Pe-ve)*ne+Re,(Oe+Se)*te+tt,(Pe-Se)*ne+Re,(Oe+ve)*te+tt)),rt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe-Se)*te+tt,(Pe-Se)*ne+Re,(Oe-ve)*te+tt,(Pe-ve)*ne+Re,(Oe-Se)*te+tt)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se+ve*.5)*ne+Re,Oe*te+tt,Pe*ne+Re,(Oe-Se)*te+tt,(Pe-Se+ve*.5)*ne+Re,(Oe-ve)*te+tt)),rt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe+Se)*te+tt,(Pe-Se+ve*.5)*ne+Re,(Oe+ve)*te+tt,Pe*ne+Re,(Oe+Se)*te+tt).close()),ve=He*.4,Se=.4,Pe=.2,Oe=.5;var Je=new go.PathFigure(Pe*ne+Re,(Oe+Se)*te+tt,!0);ue.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*ne+Re,Oe*te+tt,(Pe-ve)*ne+Re,(Oe+Se)*te+tt,(Pe-Se)*ne+Re,(Oe+ve)*te+tt)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe-Se)*te+tt,(Pe-Se)*ne+Re,(Oe-ve)*te+tt,(Pe-ve)*ne+Re,(Oe-Se)*te+tt)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se+ve*.5)*ne+Re,Oe*te+tt,Pe*ne+Re,(Oe-Se)*te+tt,(Pe-Se+ve*.5)*ne+Re,(Oe-ve)*te+tt)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe+Se)*te+tt,(Pe-Se+ve*.5)*ne+Re,(Oe+ve)*te+tt,Pe*ne+Re,(Oe+Se)*te+tt).close()),ve=He*.2,Se=.2,Pe=.5,Oe=.5;var bt=new go.PathFigure((Pe-Se)*ne+Re,Oe*te+tt,!0);ue.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe-Se)*te+tt,(Pe-Se)*ne+Re,(Oe-ve)*te+tt,(Pe-ve)*ne+Re,(Oe-Se)*te+tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*ne+Re,Oe*te+tt,(Pe+ve)*ne+Re,(Oe-Se)*te+tt,(Pe+Se)*ne+Re,(Oe-ve)*te+tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe+Se)*te+tt,(Pe+Se)*ne+Re,(Oe+ve)*te+tt,(Pe+ve)*ne+Re,(Oe+Se)*te+tt)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-Se)*ne+Re,Oe*te+tt,(Pe-ve)*ne+Re,(Oe+Se)*te+tt,(Pe-Se)*ne+Re,(Oe+ve)*te+tt)),ve=He*.4,Se=.4,Pe=.8,Oe=.5;var lt=new go.PathFigure(Pe*ne+Re,(Oe-Se)*te+tt,!0);ue.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*ne+Re,Oe*te+tt,(Pe+ve)*ne+Re,(Oe-Se)*te+tt,(Pe+Se)*ne+Re,(Oe-ve)*te+tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe+Se)*te+tt,(Pe+Se)*ne+Re,(Oe+ve)*te+tt,(Pe+ve)*ne+Re,(Oe+Se)*te+tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se-ve*.5)*ne+Re,Oe*te+tt,Pe*ne+Re,(Oe+Se)*te+tt,(Pe+Se-ve*.5)*ne+Re,(Oe+ve)*te+tt)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe-Se)*te+tt,(Pe+Se-ve*.5)*ne+Re,(Oe-ve)*te+tt,Pe*ne+Re,(Oe-Se)*te+tt).close()),ve=He*.8,Se=.8,Pe=1,Oe=.5;var Lt=new go.PathFigure(Pe*ne+Re,(Oe-Se)*te+tt,!0);return ue.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se)*ne+Re,Oe*te+tt,(Pe+ve)*ne+Re,(Oe-Se)*te+tt,(Pe+Se)*ne+Re,(Oe-ve)*te+tt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe+Se)*te+tt,(Pe+Se)*ne+Re,(Oe+ve)*te+tt,(Pe+ve)*ne+Re,(Oe+Se)*te+tt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+Se-ve*.5)*ne+Re,Oe*te+tt,Pe*ne+Re,(Oe+Se)*te+tt,(Pe+Se-ve*.5)*ne+Re,(Oe+ve)*te+tt)),Lt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne+Re,(Oe-Se)*te+tt,(Pe+Se-ve*.5)*ne+Re,(Oe-ve)*te+tt,Pe*ne+Re,(Oe-Se)*te+tt).close()),ue}),go.Shape.defineFigureGenerator("Email",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pe=new go.PathFigure(0,0,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,0)),pe.add(new go.PathSegment(go.PathSegment.Move,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*te)),pe.add(new go.PathSegment(go.PathSegment.Move,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*te)),ue}),go.Shape.defineFigureGenerator("Ethernet",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.35*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,0).close());var pe=new go.PathFigure(.1*ne,te,!0,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te).close());var ve=new go.PathFigure(.6*ne,te,!0,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te).close());var Se=new go.PathFigure(0,.5*te,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),Se.add(new go.PathSegment(go.PathSegment.Move,.75*ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.6*te)),Se.add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.6*te)),ue}),go.Shape.defineFigureGenerator("Power",function(Ae,ne,te){var ue=new go.Geometry,se=He*.4,pe=.4,ve=.5,Se=.5,Pe=fe(),Oe=fe(),Re=fe(),tt=fe();zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.5,Pe,Pe,Oe,Re,tt);var rt=Me(Oe.x,Oe.y),Je=new go.PathFigure(Oe.x*ne,Oe.y*te,!0);ue.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,Re.x*ne,Re.y*te,tt.x*ne,tt.y*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,(ve-se)*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te)),zt(ve-pe,Se,ve-pe,Se-se,ve-se,Se-pe,ve,Se-pe,.5,Re,tt,Oe,Pe,Pe),Je.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*ne,Oe.y*te,Re.x*ne,Re.y*te,tt.x*ne,tt.y*te)),se=He*.3,pe=.3,zt(ve-pe,Se,ve-pe,Se-se,ve-se,Se-pe,ve,Se-pe,.5,Re,tt,Oe,Pe,Pe),Je.add(new go.PathSegment(go.PathSegment.Line,Oe.x*ne,Oe.y*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve-pe)*ne,Se*te,tt.x*ne,tt.y*te,Re.x*ne,Re.y*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+pe)*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(ve+pe)*ne,Se*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),zt(ve,Se-pe,ve+se,Se-pe,ve+pe,Se-se,ve+pe,Se,.5,Pe,Pe,Oe,Re,tt),Je.add(new go.PathSegment(go.PathSegment.Bezier,Oe.x*ne,Oe.y*te,tt.x*ne,tt.y*te,Re.x*ne,Re.y*te).close());var Je=new go.PathFigure(.45*ne,0,!0);return ue.add(Je),Je.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*te)),Je.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),Ke(Pe),Ke(Oe),Ke(Re),Ke(tt),Ke(rt),ue.spot1=new go.Spot(.25,.45),ue.spot2=new go.Spot(.75,.8),ue}),go.Shape.defineFigureGenerator("Fallout",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te/2,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,ne/2,te/2,ne/2,te/2));function pe(ve,Se,Pe){ve.add(new go.PathSegment(go.PathSegment.Move,(.3+Se)*ne,(.8+Pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,(.5+Se)*ne,(.5+Pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,(.1+Se)*ne,(.5+Pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Line,(.3+Se)*ne,(.8+Pe)*te).close())}return pe(se,0,0),pe(se,.4,0),pe(se,.2,-.3),ue}),go.Shape.defineFigureGenerator("IrritationHazard",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.2*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close()),ue.spot1=new go.Spot(.3,.3),ue.spot2=new go.Spot(.7,.7),ue}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.37*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.11*te)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.04*te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.49*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.37*te)),se.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.86*te)),se.add(new go.PathSegment(go.PathSegment.Line,.77*ne,.91*te)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.34*ne,.78*te)),se.add(new go.PathSegment(go.PathSegment.Line,.44*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.56*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.68*te).close()),ue}),go.Shape.defineFigureGenerator("FireHazard",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.29*ne,0,-.25*ne,.63*te,.45*ne,.44*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.51*ne,.42*te,.48*ne,.17*te,.54*ne,.35*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.59*ne,.18*te,.59*ne,.29*te,.58*ne,.28*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.75*ne,.6*te,.8*ne,.34*te,.88*ne,.43*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.88*ne,.31*te,.87*ne,.48*te,.88*ne,.43*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,te,1.17*ne,.76*te,.82*ne,.8*te).close()),ue.spot1=new go.Spot(.07,.445),ue.spot2=new go.Spot(.884,.958),ue}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=0,ve=0,Se=se*He,Pe=.4*Math.SQRT2/2+.5,Oe=.5-.5*Math.SQRT2/2,Re=1,tt=.5,rt=.5,Je=0,bt=new go.PathFigure(Pe*ne,(1-Oe)*te,!1);return ue.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,tt*te,Re*ne,.7*te,Re*ne,tt*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(rt+pe)*ne,(Je+pe)*te,(.5+se+pe)*ne,(.5-Se+pe)*te,(.5+Se+pe)*ne,(.5-se+pe)*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+pe)*ne,(.5+ve)*te,(.5-Se+pe)*ne,(.5-se+ve)*te,(.5-se+pe)*ne,(.5-Se+ve)*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+pe)*ne,.9*te,(.5-se+pe)*ne,(.5+Se+ve)*te,(.5-Se+pe)*ne,.9*te)),bt.add(new go.PathSegment(go.PathSegment.Move,(.25+pe)*ne,.8*te)),bt.add(new go.PathSegment(go.PathSegment.Line,(.35+pe)*ne,.9*te)),bt.add(new go.PathSegment(go.PathSegment.Line,(.2+pe)*ne,.95*te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Move,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var pe=new go.PathFigure(ne,te,!1);ue.add(pe);var ve=new go.PathFigure(0,.5*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*te,.2*ne,.35*te,.3*ne,.35*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.7*ne,.65*te,.8*ne,.65*te)),ue}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close()),ue}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te).close());var se=new go.PathFigure(0,.2*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),ue}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.7*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,0,.6*ne,.5*te,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,te,.4*ne,.5*te,ne,.5*te).close());var pe=new go.PathFigure(.45*ne,.73*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*te)),ue}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var pe=new go.PathFigure(.335*ne,(1-.555)*te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*te,(1-.12)*ne,.46*te,(1-.02)*ne,.54*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.68*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*te,.02*ne,.54*te,.12*ne,.46*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*te));var ve=.5-.285,Se=.5,Pe=ve,Oe=Math.PI/4,Re=4*(1-Math.cos(Oe))/(3*Math.sin(Oe)),tt=Re*.5,rt=ve,Je=ve,bt=Re*rt,lt=Re*Je;pe.add(new go.PathSegment(go.PathSegment.Bezier,(Se-rt)*ne,Pe*te,(Se-(bt+rt)/2)*ne,(Pe+(Je+lt)/2)*te,(Se-rt)*ne,(Pe+lt)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,Se*ne,(Pe-Je)*te,(Se-rt)*ne,(Pe-lt)*te,(Se-bt)*ne,(Pe-Je)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(Se+rt)*ne,Pe*te,(Se+bt)*ne,(Pe-Je)*te,(Se+rt)*ne,(Pe-lt)*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*te,(Se+rt)*ne,(Pe+lt)*te,(Se+(bt+rt)/2)*ne,(Pe+(Je+lt)/2)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te));var Lt=new go.PathFigure(.2*ne,te,!1);ue.add(Lt),Lt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*te));var Mt=new go.PathFigure(.8*ne,te,!1);return ue.add(Mt),Mt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te).close());var pe=new go.PathFigure(.2*ne,.2*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventError",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se);var pe=new go.PathFigure(ne,te,!1);ue.add(pe);var ve=new go.PathFigure(.1*ne,te,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("Caution",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.05*ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.8*te,0,te,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.55*ne,.1*te,.5*ne,0,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,te,ne,te,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,te));var pe=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-pe)*ne,.875*te)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*te,pe*ne,pe*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.325*te,.575*ne,.725*te,.625*ne,.375*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.75*te,.375*ne,.375*te,.425*ne,.725*te)),ue}),go.Shape.defineFigureGenerator("Recycle",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.45*ne,.95*te,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.185*ne,.85*te,.17*ne,.95*te,.15*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.235*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,.3*ne,.625*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.05*ne,.575*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.1875*ne,.95*te,0,.675*te,0,.7*te)),se.add(new go.PathSegment(go.PathSegment.Move,.45*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.775*te)),se.add(new go.PathSegment(go.PathSegment.Line,.22*ne,.775*te));var pe=new go.PathFigure(.475*ne,.2*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*te,.35*ne,0,.375*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*te,.625*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*te));var ve=new go.PathFigure(.675*ne,.575*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*te,ne,.8*te,ne,.85*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*te)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),ve.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*te)),ue}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*.5,ve=new go.PathFigure(ne,se*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,te,ne,(se+pe)*te,(se+pe)*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,se*te,(se-pe)*ne,te,0,(se+pe)*te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-pe)*te,(se-pe)*ne,0)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*te,(se+pe)*ne,0,ne,(se-pe)*te));var Se=new go.PathFigure(se*ne,0,!1);return ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,se*ne,.15*te)),Se.add(new go.PathSegment(go.PathSegment.Move,se*ne,te)),Se.add(new go.PathSegment(go.PathSegment.Line,se*ne,.85*te)),Se.add(new go.PathSegment(go.PathSegment.Move,0,se*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,se*te)),Se.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,se*te)),Se.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.58*ne,.1*te)),Se.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.78*ne,.54*te)),ue}),go.Shape.defineFigureGenerator("Package",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.15*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var pe=new go.PathFigure(0,.15*te,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.15*te).close()),ue.spot1=new go.Spot(0,.1),ue.spot2=new go.Spot(1,1),ue}),go.Shape.defineFigureGenerator("Class",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pe=new go.PathFigure(0,.2*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var ve=new go.PathFigure(0,.5*te,!1);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te).close()),ue}),go.Shape.defineFigureGenerator("Component",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close());var pe=new go.PathFigure(0,.2*te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close());var ve=new go.PathFigure(0,.6*te,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ve.add(new go.PathSegment(go.PathSegment.Line,0,.6*te).close()),ue}),go.Shape.defineFigureGenerator("Boat Shipment",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.15*ne,.6*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te));var pe=new go.PathFigure(.15*ne,.6*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),ue}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,.66*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,.33*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue}),go.Shape.defineFigureGenerator("Workcell",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.35*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ue}),go.Shape.defineFigureGenerator("Supermarket",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.33*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.33*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.66*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.66*te)),se.add(new go.PathSegment(go.PathSegment.Move,ne,.66*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),ue}),go.Shape.defineFigureGenerator("TruckShipment",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pe=new go.PathFigure(ne,.8*te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te).close());var ve=.1,Se=He*.1,Pe=.2,Oe=.9,Re=new go.PathFigure((Pe-ve)*ne,Oe*te,!0);ue.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-ve)*te,(Pe-ve)*ne,(Oe-Se)*te,(Pe-Se)*ne,(Oe-ve)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ve)*ne,Oe*te,(Pe+Se)*ne,(Oe-ve)*te,(Pe+ve)*ne,(Oe-Se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe+ve)*te,(Pe+ve)*ne,(Oe+Se)*te,(Pe+Se)*ne,(Oe+ve)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ve)*ne,Oe*te,(Pe-Se)*ne,(Oe+ve)*te,(Pe-ve)*ne,(Oe+Se)*te).close()),ve=.1,Se=He*.1,Pe=.8,Oe=.9;var tt=new go.PathFigure((Pe-ve)*ne,Oe*te,!0);return ue.add(tt),tt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe-ve)*te,(Pe-ve)*ne,(Oe-Se)*te,(Pe-Se)*ne,(Oe-ve)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe+ve)*ne,Oe*te,(Pe+Se)*ne,(Oe-ve)*te,(Pe+ve)*ne,(Oe-Se)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,Pe*ne,(Oe+ve)*te,(Pe+ve)*ne,(Oe+Se)*te,(Pe+Se)*ne,(Oe+ve)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Pe-ve)*ne,Oe*te,(Pe-Se)*ne,(Oe+ve)*te,(Pe-ve)*ne,(Oe+Se)*te).close()),ue}),go.Shape.defineFigureGenerator("KanbanPost",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.2*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),ue}),go.Shape.defineFigureGenerator("Forklift",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0));var pe=new go.PathFigure(0,.5*te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ve=new go.PathFigure(.5*ne,.8*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te));var Se=new go.PathFigure(.5*ne,.7*te,!1);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te));var Pe=.1,Oe=He*.1,Re=.1,tt=.9,rt=new go.PathFigure((Re-Pe)*ne,tt*te,!0);ue.add(rt),rt.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(tt-Pe)*te,(Re-Pe)*ne,(tt-Oe)*te,(Re-Oe)*ne,(tt-Pe)*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Pe)*ne,tt*te,(Re+Oe)*ne,(tt-Pe)*te,(Re+Pe)*ne,(tt-Oe)*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(tt+Pe)*te,(Re+Pe)*ne,(tt+Oe)*te,(Re+Oe)*ne,(tt+Pe)*te)),rt.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Pe)*ne,tt*te,(Re-Oe)*ne,(tt+Pe)*te,(Re-Pe)*ne,(tt+Oe)*te)),Pe=.1,Oe=He*.1,Re=.4,tt=.9;var Je=new go.PathFigure((Re-Pe)*ne,tt*te,!0);return ue.add(Je),Je.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(tt-Pe)*te,(Re-Pe)*ne,(tt-Oe)*te,(Re-Oe)*ne,(tt-Pe)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Re+Pe)*ne,tt*te,(Re+Oe)*ne,(tt-Pe)*te,(Re+Pe)*ne,(tt-Oe)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(tt+Pe)*te,(Re+Pe)*ne,(tt+Oe)*te,(Re+Oe)*ne,(tt+Pe)*te)),Je.add(new go.PathSegment(go.PathSegment.Bezier,(Re-Pe)*ne,tt*te,(Re-Oe)*ne,(tt+Pe)*te,(Re-Pe)*ne,(tt+Oe)*te)),ue}),go.Shape.defineFigureGenerator("RailShipment",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.1*ne,.4*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.4*te).close());var pe=new go.PathFigure(.45*ne,.7*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te));var ve=new go.PathFigure(.55*ne,.4*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*te).close());var Re=.05,tt=He*.05,rt=.175,Je=.95,Se=new go.PathFigure((rt-Re)*ne,Je*te,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je-Re)*te,(rt-Re)*ne,(Je-tt)*te,(rt-tt)*ne,(Je-Re)*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(rt+Re)*ne,Je*te,(rt+tt)*ne,(Je-Re)*te,(rt+Re)*ne,(Je-tt)*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je+Re)*te,(rt+Re)*ne,(Je+tt)*te,(rt+tt)*ne,(Je+Re)*te)),Se.add(new go.PathSegment(go.PathSegment.Bezier,(rt-Re)*ne,Je*te,(rt-tt)*ne,(Je+Re)*te,(rt-Re)*ne,(Je+tt)*te));var Re=.05,tt=He*.05,rt=.375,Je=.95,Pe=new go.PathFigure((rt-Re)*ne,Je*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je-Re)*te,(rt-Re)*ne,(Je-tt)*te,(rt-tt)*ne,(Je-Re)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(rt+Re)*ne,Je*te,(rt+tt)*ne,(Je-Re)*te,(rt+Re)*ne,(Je-tt)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je+Re)*te,(rt+Re)*ne,(Je+tt)*te,(rt+tt)*ne,(Je+Re)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(rt-Re)*ne,Je*te,(rt-tt)*ne,(Je+Re)*te,(rt-Re)*ne,(Je+tt)*te));var Re=.05,tt=He*.05,rt=.625,Je=.95,Oe=new go.PathFigure((rt-Re)*ne,Je*te,!0);ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je-Re)*te,(rt-Re)*ne,(Je-tt)*te,(rt-tt)*ne,(Je-Re)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(rt+Re)*ne,Je*te,(rt+tt)*ne,(Je-Re)*te,(rt+Re)*ne,(Je-tt)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je+Re)*te,(rt+Re)*ne,(Je+tt)*te,(rt+tt)*ne,(Je+Re)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(rt-Re)*ne,Je*te,(rt-tt)*ne,(Je+Re)*te,(rt-Re)*ne,(Je+tt)*te));var Re=.05,tt=He*.05,rt=.825,Je=.95,bt=new go.PathFigure((rt-Re)*ne,Je*te,!0);ue.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je-Re)*te,(rt-Re)*ne,(Je-tt)*te,(rt-tt)*ne,(Je-Re)*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(rt+Re)*ne,Je*te,(rt+tt)*ne,(Je-Re)*te,(rt+Re)*ne,(Je-tt)*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,rt*ne,(Je+Re)*te,(rt+Re)*ne,(Je+tt)*te,(rt+tt)*ne,(Je+Re)*te)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(rt-Re)*ne,Je*te,(rt-tt)*ne,(Je+Re)*te,(rt-Re)*ne,(Je+tt)*te).close());var lt=new go.PathFigure(0,te,!1);return ue.add(lt),lt.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ue}),go.Shape.defineFigureGenerator("Warehouse",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var pe=new go.PathFigure(0,.2*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var ve=new go.PathFigure(.15*ne,te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),ve.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te).close());var Se=.05,Pe=He*.05,Oe=.35,Re=.775,tt=new go.PathFigure((Oe-Se)*ne,Re*te,!0);return ue.add(tt),tt.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ne,(Re-Se)*te,(Oe-Se)*ne,(Re-Pe)*te,(Oe-Pe)*ne,(Re-Se)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Oe+Se)*ne,Re*te,(Oe+Pe)*ne,(Re-Se)*te,(Oe+Se)*ne,(Re-Pe)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,Oe*ne,(Re+Se)*te,(Oe+Se)*ne,(Re+Pe)*te,(Oe+Pe)*ne,(Re+Se)*te)),tt.add(new go.PathSegment(go.PathSegment.Bezier,(Oe-Se)*ne,Re*te,(Oe-Pe)*ne,(Re+Se)*te,(Oe-Se)*ne,(Re+Pe)*te).close()),ue}),go.Shape.defineFigureGenerator("ControlCenter",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te).close()),ue}),go.Shape.defineFigureGenerator("Bluetooth",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),ue}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Bookmark",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,0,0)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Globe",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.75*ne,0,ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,.75*te,.75*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.25*ne,te,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,.25*te,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,.15*ne,.25*te,.15*ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.85*ne,.75*te,.85*ne,.25*te)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.15*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.15*te,.35*ne,.3*te,.65*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Move,.1675*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8325*ne,.85*te,.35*ne,.7*te,.65*ne,.7*te)),ue}),go.Shape.defineFigureGenerator("Wave",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.25*te,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.25*te,.1*ne,0,.2*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.25*te,.425*ne,.5*te,.575*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.25*te,.8*ne,0,.9*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.75*te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.75*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.75*te,.1*ne,.5*te,.2*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.7*ne,.75*te,.425*ne,te,.575*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.75*te,.8*ne,.5*te,.9*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Operator",function(Ae,ne,te){var ue=new go.Geometry,se=.3,pe=He*.3,ve=.5,Se=.7,Pe=new go.PathFigure((ve-se)*ne,Se*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te));var Oe=new go.PathFigure(0,.7*te,!1);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*te,0,0,ne,0)),ue}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.65*ne,.3*te,.65*ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.35*ne,.5*te,.35*ne,.3*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.3*ne,.6*te,.1*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.2*ne,te,.35*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.65*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,te,.7*ne,.6*te,.9*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.65*te,.8*ne,te,.65*ne,.95*te)),ue}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,0,.075*te,0,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,te,0,te,.4*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.4*te,.8*ne,te,.85*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ue}),go.Shape.defineFigureGenerator("Battery",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.1*te));var pe=new go.PathFigure(0,.6*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),ue}),go.Shape.defineFigureGenerator("Delete",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*.5,ve=.5,Se=.5,Pe=new go.PathFigure((ve-se)*ne,Se*te,!0);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te));var Oe=new go.PathFigure(.15*ne,.5*te,!1);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*te)),ue}),go.Shape.defineFigureGenerator("Flag",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.1*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Move,0,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.1*te,.15*ne,0,.35*ne,0)),se.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,.65*ne,.2*te,.85*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*te,.85*ne,.6*te,.65*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,.35*ne,.4*te,.15*ne,.4*te).close()),ue}),go.Shape.defineFigureGenerator("Help",function(Ae,ne,te){var ue=new go.Geometry,se=.5,pe=He*.5,ve=.5,Se=.5,Pe=new go.PathFigure((ve-se)*ne,Se*te,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Pe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te).close()),se=.05,pe=He*.05,ve=.5,Se=.8;var Oe=new go.PathFigure((ve-se)*ne,Se*te,!1);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se-se)*te,(ve-se)*ne,(Se-pe)*te,(ve-pe)*ne,(Se-se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve+se)*ne,Se*te,(ve+pe)*ne,(Se-se)*te,(ve+se)*ne,(Se-pe)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,ve*ne,(Se+se)*te,(ve+se)*ne,(Se+pe)*te,(ve+pe)*ne,(Se+se)*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,(ve-se)*ne,Se*te,(ve-pe)*ne,(Se+se)*te,(ve-se)*ne,(Se+pe)*te).close()),Oe.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),Oe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,.75*ne,.475*te,.75*ne,.225*te)),Oe.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.35*te,.4*ne,.2*te,.3*ne,.25*te)),ue}),go.Shape.defineFigureGenerator("Location",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.5*ne,te,!0).add(new go.PathSegment(go.PathSegment.Line,.75*ne,.5*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,.975*ne,.025*te,.5*ne,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*ne,.5*te,.5*ne,0,.025*ne,.025*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*te)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*ne,.3*te,.1*ne,.1*te).close()))}),go.Shape.defineFigureGenerator("Lock",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var pe=new go.PathFigure(.2*ne,.5*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*te)),ue}),go.Shape.defineFigureGenerator("Unlocked",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var pe=new go.PathFigure(.2*ne,.5*te,!1);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),pe.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),pe.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*te)),ue}),go.Shape.defineFigureGenerator("Gear",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(.9375*ne,.56246875*te,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.80621875*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.763*ne,.3316875*te,.79840625*ne,.39915625*te,.7834375*ne,.3635*te)).add(new go.PathSegment(go.PathSegment.Line,.8566875*ne,.23796875*te)).add(new go.PathSegment(go.PathSegment.Line,.76825*ne,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.67596875*ne,.24184375*te)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*ne,.19378125*te,.64228125*ne,.2188125*te,.603875*ne,.2021875*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.0625*te)).add(new go.PathSegment(go.PathSegment.Line,.4375*ne,.19378125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*ne,.239375*te,.39759375*ne,.20190625*te,.36053125*ne,.2176875*te)).add(new go.PathSegment(go.PathSegment.Line,.2379375*ne,.14959375*te)).add(new go.PathSegment(go.PathSegment.Line,.14953125*ne,.2379375*te)).add(new go.PathSegment(go.PathSegment.Line,.23934375*ne,.3278125*te)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*ne,.4375*te,.21765625*ne,.36059375*te,.201875*ne,.397625*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.4375*te)).add(new go.PathSegment(go.PathSegment.Line,.0625*ne,.5625*te)).add(new go.PathSegment(go.PathSegment.Line,.1938125*ne,.5625*te)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*ne,.67596875*te,.20221875*ne,.603875*te,.21884375*ne,.64228125*te)).add(new go.PathSegment(go.PathSegment.Line,.1495625*ne,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.238*ne,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.3316875*ne,.76296875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*ne,.80621875*te,.36353125*ne,.78340625*te,.3991875*ne,.79840625*te)).add(new go.PathSegment(go.PathSegment.Line,.43753125*ne,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.9375*te)).add(new go.PathSegment(go.PathSegment.Line,.5625*ne,.80621875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*ne,.760625*te,.602375*ne,.79809375*te,.63946875*ne,.78234375*te)).add(new go.PathSegment(go.PathSegment.Line,.76828125*ne,.8566875*te)).add(new go.PathSegment(go.PathSegment.Line,.85671875*ne,.76825*te)).add(new go.PathSegment(go.PathSegment.Line,.76065625*ne,.67221875*te)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*ne,.56246875*te,.78234375*ne,.63940625*te,.798125*ne,.602375*te)).add(new go.PathSegment(go.PathSegment.Line,.9375*ne,.56246875*te).close()).add(new go.PathSegment(go.PathSegment.Move,.5*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*ne,.5*te,.1*ne,.1*te).close()))}),go.Shape.defineFigureGenerator("Hand",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,.3*te,0,.375*te,.05*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.45*ne,.075*te,.3*ne,.225*te,.4*ne,.175*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.525*ne,.075*te,.46*ne,.05*te,.525*ne,.05*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.4*te,.525*ne,.275*te,.475*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.55*te,ne,.4*te,ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.55*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.6*ne,.7*te,.675*ne,.55*te,.675*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,.85*te,.65*ne,.7*te,.65*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.535*ne,te,.61*ne,.85*te,.61*ne,te)),se.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,.435*ne,te,0,te).close()),ue}),go.Shape.defineFigureGenerator("Map",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),se.add(new go.PathSegment(go.PathSegment.Move,.25*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.8*te)),se.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),se.add(new go.PathSegment(go.PathSegment.Move,.75*ne,0)),se.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.8*te)),ue}),go.Shape.defineFigureGenerator("Eject",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,te)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.7)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.7).close());var pe=new go.PathFigure(0,te*.6,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ue}),go.Shape.defineFigureGenerator("Pencil",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.1*te)).add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.2*te).close()))}),go.Shape.defineFigureGenerator("Building",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*1,te*1,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.046*ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.3)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*ne,te*.85)),se.add(new go.PathSegment(go.PathSegment.Line,ne,te*.85).close());var pe=new go.PathFigure(.126*ne,.85*te,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*te)),pe.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*te).close());var ve=new go.PathFigure(.402*ne,.85*te,!1);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*te)),ve.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.85*te).close());var Se=new go.PathFigure(.678*ne,.85*te,!1);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,.678*ne,.45*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.45*te)),Se.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.85*te).close());var Pe=new go.PathFigure(.5*ne,.1*te,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*te)),Pe.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*te).close()),ue}),go.Shape.defineFigureGenerator("Staircase",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te*1,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.8)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.6)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.4)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.2)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.15)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*.95).close()),ue}),go.Shape.defineFigureGenerator("5Bars",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,te*1,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.184,te*(1-.184)).close());var pe=new go.PathFigure(ne*.204,te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.204,te*(1-.184))),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*(1-.184*2))),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*1).close());var ve=new go.PathFigure(ne*.408,te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.408,te*(1-.184*2))),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*(1-.184*3))),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*1).close());var Se=new go.PathFigure(ne*.612,te,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.612,te*(1-.184*3))),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*(1-.184*4))),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*1).close());var Pe=new go.PathFigure(ne*.816,te,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.816,te*(1-.184*4))),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-.184*5))),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1).close()),ue}),go.Shape.defineFigureGenerator("PC",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,0).close());var pe=new go.PathFigure(ne*.055,.07*te,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.07)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.1).close());var ve=new go.PathFigure(ne*.055,.13*te,!0);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.13)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.16)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.16).close());var Se=new go.PathFigure(ne*.055,.18*te,!0);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.18)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.21)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.21).close());var Pe=new go.PathFigure(ne*1,0,!0);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.65)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.65).close()),ue}),go.Shape.defineFigureGenerator("Plane",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(.55*ne,te,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.7*te)),se.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.475*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.35*ne,.525*te,0,.4*te,.225*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.475*te)),se.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.325*te)),se.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.1*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.9*ne,.2*te,.975*ne,0,ne,.08*te)),se.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.45*te)),se.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.95*te)),se.add(new go.PathSegment(go.PathSegment.Line,.55*ne,te).close()),ue}),go.Shape.defineFigureGenerator("Key",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*1,te*.5,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.4*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.2*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.35*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.15,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,.8*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.65*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,.55*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,.6*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,.575*te)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.9,.6*te).close()),se.add(new go.PathSegment(go.PathSegment.Move,.17*ne,.425*te)),se.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*ne,.5*te,.075*ne,.075*te).close()),ue}),go.Shape.defineFigureGenerator("FilmTape",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(0,0,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,180,ne*0,ne*.3,ne*.055)),se.add(new go.PathSegment(go.PathSegment.Line,0,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.08,te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*1),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*2),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*3),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*4),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*5),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*6),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*7),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*8),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*9),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*10),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*11),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*12),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*13),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*14),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),te*.95)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(.08+.056*15),te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1));var pe=new go.PathFigure(0,0,!1);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*0)),pe.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1));var ve=new go.PathFigure(ne*.11,te*.1,!1);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.1)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.8)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.11,te*.8).close());var Se=new go.PathFigure(ne*(.11+.24133333*1+.028*1),te*.1,!1);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.1)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.8)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*1),te*.8).close());var Pe=new go.PathFigure(ne*(.11+.24133333*2+.028*2),te*.1,!1);return ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.1)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.8)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),te*.8).close()),ue}),go.Shape.defineFigureGenerator("FloppyDisk",function(Ae,ne,te){var ue=new go.Geometry,se=8,pe=se*He,ve=new go.PathFigure(se,0,!1);ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.14)),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-pe,ne-pe,te)),ve.add(new go.PathSegment(go.PathSegment.Line,se,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,pe,te,0,te-pe)),ve.add(new go.PathSegment(go.PathSegment.Line,0,se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,pe,pe,0).close());var Se=new go.PathFigure(ne*.83,0,!1);ue.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.3)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*0).close());var Pe=new go.PathFigure(ne*.83,te*1,!1);ue.add(Pe),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.5)),Pe.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*1).close());var Oe=new go.PathFigure(ne*.78,te*.05,!1);return ue.add(Oe),Oe.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.05)),Oe.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.25)),Oe.add(new go.PathSegment(go.PathSegment.Line,ne*.78,te*.25).close()),ue}),go.Shape.defineFigureGenerator("SpeechBubble",function(Ae,ne,te){var ue=Ae?Ae.parameter1:NaN;(isNaN(ue)||ue<0)&&(ue=15),ue=Math.min(ue,ne/3),ue=Math.min(ue,te/3);var se=ue*He,pe=te*.8,ve=new go.Geometry,Se=new go.PathFigure(ue,0,!0);return ve.add(Se),Se.add(new go.PathSegment(go.PathSegment.Line,ne-ue,0)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ne,ue,ne-se,0,ne,se)),Se.add(new go.PathSegment(go.PathSegment.Line,ne,pe-ue)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ne-ue,pe,ne,pe-se,ne-se,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te)),Se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,pe)),Se.add(new go.PathSegment(go.PathSegment.Line,ue,pe)),Se.add(new go.PathSegment(go.PathSegment.Bezier,0,pe-ue,se,pe,0,pe-se)),Se.add(new go.PathSegment(go.PathSegment.Line,0,ue)),Se.add(new go.PathSegment(go.PathSegment.Bezier,ue,0,0,se,se,0).close()),se>1?(ve.spot1=new go.Spot(0,0,se,se),ve.spot2=new go.Spot(1,.8,-se,-se)):(ve.spot1=go.Spot.TopLeft,ve.spot2=new go.Spot(1,.8)),ve}),go.Shape.defineFigureGenerator("Repeat",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*.45,!0);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.2,te*.45).close());var pe=new go.PathFigure(ne*1,te*.55,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*1)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.55)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.55)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.1)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.55).close()),ue}),go.Shape.defineFigureGenerator("Windows",function(Ae,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()).add(new go.PathSegment(go.PathSegment.Move,.4*ne,.4*te)).add(new go.PathSegment(go.PathSegment.Line,.4*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)).add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te).close()).add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*te)).add(new go.PathSegment(go.PathSegment.Line,.2*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.7*ne,.1*te).close()).add(new go.PathSegment(go.PathSegment.Move,.1*ne,.6*te)).add(new go.PathSegment(go.PathSegment.Line,.1*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.9*te)).add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*.1,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.9)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*.9).close());var pe=new go.PathFigure(ne*.1,te*.2,!0);ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.25)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.22,te*.285)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.32)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.37)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.32)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.25).close());var ve=new go.PathFigure(ne*.28,te*.37,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.37)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.41)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.28,te*.41).close()),ue}),go.Shape.defineFigureGenerator("Beaker",function(Ae,ne,te){var ue=new go.Geometry,se=15,pe=se*He,ve=new go.PathFigure(ne*.62,te*.475,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),ve.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-pe,ne-pe,te)),ve.add(new go.PathSegment(go.PathSegment.Line,se,te)),ve.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,pe,te,0,te-pe)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.475)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.03)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*0)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.62,te*.03).close()),pe>1?(ue.spot1=new go.Spot(0,0,pe,pe),ue.spot2=new go.Spot(1,1,-pe,-pe)):(ue.spot1=go.Spot.TopLeft,ue.spot2=go.Spot.BottomRight),ue}),go.Shape.defineFigureGenerator("Download",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var pe=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-pe)).close());var ve=new go.PathFigure(ne*.4,te*0,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.66)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),te*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.44)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*0).close()),ue}),go.Shape.defineFigureGenerator("Bin",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var pe=.1/.3;return se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-pe)).close()),ue}),go.Shape.defineFigureGenerator("Upload",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ue.add(se);var pe=.1/.3;se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.755,te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.93,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.61,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.39,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-pe))),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.755),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*.055)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.66),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.8),te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*(1-pe)).close());var ve=new go.PathFigure(ne*.5,te*0,!0);return ue.add(ve),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.63)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.25)),ve.add(new go.PathSegment(go.PathSegment.Line,ne*.74,te*.25).close()),ue}),go.Shape.defineFigureGenerator("EmptyDrink",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1).close()),ue}),go.Shape.defineFigureGenerator("Drink",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.85,te*0)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.3,te*1).close());var pe=new go.PathFigure(ne*.235,te*.28,!0);return ue.add(pe),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.765,te*.28)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.655,te*.97)),pe.add(new go.PathSegment(go.PathSegment.Line,ne*.345,te*.97).close()),ue}),go.Shape.defineFigureGenerator("4Arrows",function(Ae,ne,te){var ue=new go.Geometry,se=new go.PathFigure(ne*.5,te*0,!0);return ue.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.55,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.65,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*1)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.75)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.55)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.65)),se.add(new go.PathSegment(go.PathSegment.Line,ne*0,te*.5)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.35)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.25,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.45)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.25)),se.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*.25).close()),ue}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},61016:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Cn={},On="5.0",Me={},fe=null,Ke=!1,St=!1,zt=null,ft=!1,Be=null,He=null,gt=0;gt<arguments.length;gt++){var it=arguments[gt];if(it!==null)switch(typeof it){case"number":On=it.toFixed(1);break;case"string":it.match(new RegExp("^[0-9]\\.[0-9]+$"))?On=it:zt=it;break;case"object":typeof it.is3D!="undefined"?fe=it:Me=it;break;case"boolean":Ke=it,St=!0;break}}fe===null&&(fe={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},Me.material_id!==void 0&&!St&&(Ke=!0)),zt!==null&&Me.id===void 0&&(Me.id=zt);var st="",Ft="",Nt=!1,Bt=null,Ae=null,ne=null,te=!1,ue=null,se=null,pe=null,ve=null,Se=null;Me.height!==void 0&&(Me.height=Math.round(Me.height)),Me.width!==void 0&&(Me.width=Math.round(Me.width));var Pe=function(At){return parseFloat(At)>4?parseFloat(At):5};Cn.setHTML5Codebase=function(At,pn){He=At,Qe(At,pn)},Cn.setJavaCodebase=Cn.setJavaCodebaseVersion=Cn.isCompiledInstalled=Cn.setPreCompiledScriptPath=Cn.setPreCompiledResourcePath=function(){},Cn.setHTML5CodebaseVersion=function(At,pn){var ln=parseFloat(At);if(ln!==NaN&&ln<5){console.log("The GeoGebra HTML5 codebase version "+ln+" is deprecated. Using version latest instead.");return}Be=At,Ze(At,pn)},Cn.getHTML5CodebaseVersion=function(){return Ae},Cn.getParameters=function(){return Me},Cn.setFontsCSSURL=function(At){ve=At},Cn.setGiacJSURL=function(At){},Cn.setJNLPFile=function(At){st=At},Cn.setJNLPBaseDir=function(At){},Cn.inject=function(){function At(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pn="auto",ln=Me.id,jn,Gt=!1,mt=0;mt<arguments.length;mt++){var Et=arguments[mt];typeof Et=="string"?(Et=Et.toLowerCase(),Et.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pn=Et:ln=arguments[mt]):typeof Et=="boolean"?Gt=Et:Et instanceof HTMLElement&&(jn=Et)}on();function on(){if(!ft){setTimeout(on,200);return}pn=Tn(pn);var Yt=jn||document.getElementById(ln);if(!Yt){console.log("possibly bug on ajax loading? ");return}if(Cn.removeExistingApplet(Yt,!1),Me.width===void 0&&Yt.clientWidth&&(Me.width=Yt.clientWidth),Me.height===void 0&&Yt.clientHeight&&(Me.height=Yt.clientHeight),!(Me.width&&Me.height)&&pn==="html5"&&(delete Me.width,delete Me.height),Bt=pn,pn==="screenshot")Mt(Yt,Me);else{var ze=!1;Me.hasOwnProperty("playButton")&&Me.playButton||Me.hasOwnProperty("clickToLoad")&&Me.clickToLoad?ze=!0:Me.hasOwnProperty("playButtonAutoDecide")&&Me.playButtonAutoDecide&&(ze=(!Oe()||At())&&Re()),ze?(Bt="screenshot",dn(Yt,Me,Gt,pn)):Lt(Yt,Me,Gt)}}};function Oe(){try{return window.self!==window.top}catch(At){return!0}}function Re(){return Me.hasOwnProperty("screenshotGenerator")&&Me.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Cn.getViews=function(){return fe},Cn.isJavaInstalled=function(){return!1};var tt=function(At){var pn=function(mt){var Et=JSON.parse(mt),on=function(be){return be.type=="G"||be.type=="E"},Yt=Et.elements?Et.elements.filter(on)[0]:Et;if(!Yt||!Yt.url){ln();return}Me.fileName=Yt.url,rt(Yt.settings||{}),fe.is3D=!0;var ze="https://www.geogebra.org/images/";Cn.setPreviewImage(ue||Yt.previewUrl,ze+"GeoGebra_loading.png",ze+"applet_play.png"),At()},ln=function(){Me.onError&&Me.onError(),mn("Error: Fetching material (id "+Me.material_id+") failed.",Me)},jn=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Gt="/materials/"+Me.material_id+"?scope=basic";Je("https://"+jn+"/api/proxy.php?path="+encodeURIComponent(Gt),pn,ln)};function rt(At){var pn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ln){At[ln]=!!At[ln]}),pn.forEach(function(ln){Me[ln]===void 0&&At[ln]!==void 0&&(Me[ln]=At[ln])}),Me.showToolBarHelp===void 0&&(Me.showToolBarHelp=Me.showToolBar)}function Je(At,pn,ln){var jn=new XMLHttpRequest;jn.open("GET",At),jn.onload=function(){pn(jn.responseText)},jn.onerror=ln,jn.send()}Cn.isHTML5Installed=function(){return!0},Cn.getLoadedAppletType=function(){return Bt},Cn.setPreviewImage=function(At,pn,ln){ue=At,se=pn,pe=ln},Cn.removeExistingApplet=function(At,pn){var ln;typeof At=="string"&&(At=document.getElementById(At)),Bt=null;var jn=null;for(ln=0;ln<At.childNodes.length;ln++){var Gt=At.childNodes[ln],mt=Gt.className;mt==="applet_screenshot"?pn?(Gt.style.display="block",Bt="screenshot"):Gt.style.display="none":mt!=="applet_scaler prerender"&&(At.removeChild(Gt),jn=mt&&mt.indexOf("appletParameters")!=-1?Gt.id:null,ln--)}var Et=Me.id!==void 0?Me.id:jn,on=window[Et];on&&typeof on.getBase64=="function"&&(on.remove(),window[Et]=null)},Cn.refreshHitPoints=function(){if(Pe(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var At=Cn.getAppletObject();return At&&typeof At.recalculateEnvironments=="function"?(At.recalculateEnvironments(),!0):!1},Cn.startAnimation=function(){var At=Cn.getAppletObject();return At&&typeof At.startAnimation=="function"?(At.startAnimation(),!0):!1},Cn.stopAnimation=function(){var At=Cn.getAppletObject();return At&&typeof At.stopAnimation=="function"?(At.stopAnimation(),!0):!1},Cn.getAppletObject=function(){var At=Me.id!==void 0?Me.id:"ggbApplet";return window[At]},Cn.resize=function(){};var bt=function(At,pn,ln){var jn=document.createElement("param");jn.setAttribute("name",pn),jn.setAttribute("value",ln),At.appendChild(jn)},lt=function(At){return At&&At!=="false"},Lt=function(At,pn,ln){Pe(Ae)<=4.2&&(ln=!0);var jn=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Ae||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(jn=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Gt=document.createElement("div");Gt.classList.add("appletParameters","notranslate");var mt=pn.width,Et=pn.height;if(pn.disableAutoScale=pn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pn.disableAutoScale,pn.width!==void 0)if(Pe(Ae)<=4.4)lt(pn.showToolBar)&&(pn.height-=7),lt(pn.showAlgebraInput)&&(pn.height-=37),pn.width<605&<(pn.showToolBar)&&(pn.width=605,mt=605);else{var on=100;(lt(pn.showToolBar)||lt(pn.showMenuBar))&&(pn.hasOwnProperty("customToolBar")&&(pn.customToolbar=pn.customToolBar),on=lt(pn.showMenuBar)?245:155),mt<on&&(pn.width=on,mt=on)}Gt.style.border="none",Gt.style.display="inline-block";for(var Yt in pn)pn.hasOwnProperty(Yt)&&Yt!=="appletOnLoad"&&Gt.setAttribute("data-param-"+Yt,pn[Yt]);ve&&Gt.setAttribute("data-param-fontscssurl",ve),Cn.resize=function(){GGBAppletUtils.responsiveResize(At,pn)},window.addEventListener("resize",function(Zt){Cn.resize()});var ze=typeof pn.appletOnLoad=="function"?pn.appletOnLoad:function(){};if(!ln&&pn.width!==void 0){pn.hasOwnProperty("showSplash")||Gt.setAttribute("data-param-showSplash","false");var be=At.querySelector(".applet_scaler.prerender"),Ce=be!==null;if(Ce)var De=be.querySelector(".ggb_preview");else{var De=vn(mt,Et,pn.borderColor,!1);be=document.createElement("div"),be.className="applet_scaler",be.style.position="relative",be.style.display="block",be.style.width=mt+"px",be.style.height=Et+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(be,"66%"),Pe(Ae)>=5?(pn.appletOnLoad=function(Zt){var qn=At.querySelector(".ggb_preview");qn&&qn.parentNode.removeChild(qn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(be),window.GGBT_wsf_view&&$(window).trigger("resize"),ze(Zt)},Ce||be.appendChild(De)):Gt.appendChild(De),be.appendChild(Gt),Ce||At.appendChild(be),setTimeout(function(){Cn.resize()},1)}else{var Ge=document.createElement("div");Ge.className="applet_scaler",Ge.style.position="relative",Ge.style.display="block",Ge.appendChild(Gt),At.appendChild(Ge),pn.appletOnLoad=function(Zt){Cn.resize(),ze(Zt)}}function Fe(Zt,qn){qn&&typeof qn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Zt,qn.appletOnLoad):renderGGBElement(Zt),mn("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",qn)}function qe(Zt,qn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Zt,params:qn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function($n){Fe($n.article,$n.params)}),html5AppletsToProcess=null)},Pe(Ae)<5&&(Zt.className+=" geogebraweb")):Fe(Zt,qn)}if(jn){scriptLoadStarted=!0;for(var rn=0;rn<Gt.childNodes.length;rn++){var Kn=Gt.childNodes[rn].tagName;Kn==="TABLE"&&(Gt.removeChild(Gt.childNodes[rn]),rn--)}if(ggbHTML5LoadedScript!==null){var Zn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Zn!=null&&Zn.parentNode.removeChild(Zn)}var $t=document.createElement("script"),Nn=function(){qe(Gt,pn)};$t.src=Ft+ne,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=Ae,ggbHTML5LoadedScript=$t.src,mn("GeoGebra HTML5 codebase loaded: '"+Ft+"'.",pn),!He&&(!Be||Be=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Nn()):Ft.requirejs?__webpack_require__.e(12).then(function(){var Zt=[__webpack_require__(12)];Nn.apply(null,Zt)}.bind(this)).catch(__webpack_require__.oe):($t.onload=Nn,At.appendChild($t))}else qe(Gt,pn);pn.height=Et,pn.width=mt},Mt=function(At,pn,ln){var jn=vn(pn.width,pn.height,pn.borderColor,ln),Gt=document.createElement("div");Gt.style.position="relative",Gt.style.display="block",Gt.style.width=pn.width+"px",Gt.style.height=pn.height+"px",Gt.className="applet_screenshot applet_scaler"+(ln?" applet_screenshot_play":""),Gt.appendChild(jn);var mt=GGBAppletUtils.getScale(pn,At,ln);ln?(At.appendChild(tn()),window.GGBT_wsf_view||(At.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Gt,"66%"),At.appendChild(Gt),mt!==1&&!isNaN(mt)&&(GGBAppletUtils.scaleElement(Gt,mt),Gt.style.width=pn.width+"px",Gt.style.height=pn.height+"px",Gt.parentNode.style.width=pn.width*mt+"px",Gt.parentNode.style.height=pn.height*mt+"px"),Cn.resize=function(){pt(At,jn,Gt,ln)},window.addEventListener("resize",function(Et){Cn.resize()}),Cn.resize()};function pt(At,pn,ln,jn){if(At.contains(pn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(At.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(At)}var Gt=GGBAppletUtils.getScale(Me,At,jn);ln.parentNode!==null&&(!isNaN(Gt)&&Gt!==1?(GGBAppletUtils.scaleElement(ln,Gt),ln.parentNode.style.width=Me.width*Gt+"px",ln.parentNode.style.height=Me.height*Gt+"px"):(GGBAppletUtils.scaleElement(ln,1),ln.parentNode.style.width=Me.width+"px",ln.parentNode.style.height=Me.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(At),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Cn.onExitFullscreen=function(At,pn){pn.appendChild(At)};var dn=function(At,pn,ln,jn){Mt(At,pn,!0);for(var Gt=function(){var on=[];for(Et=0;Et<At.childNodes.length;Et++)on.push(At.childNodes[Et]);if(window.GGBT_wsf_view){var Yt=window.GGBT_wsf_view.renderFullScreen(At,pn.id),ze=document.getElementById("fullscreencontainer"),be=jQuery(At).find(".fullscreencontent");be.length>0?(Yt.remove(),be.attr("id","fullscreencontent").show(),jQuery(ze).append(be),window.dispatchEvent(new Event("resize"))):Lt(Yt,pn,!1),window.GGBT_wsf_view.launchFullScreen(ze)}else Bt=jn,Lt(At,pn,!1);if(!window.GGBT_wsf_view)for(Et=0;Et<on.length;Et++)At.removeChild(on[Et])},mt=At.getElementsByClassName("ggb_preview_play"),Et=0;Et<mt.length;Et++)mt[Et].addEventListener("click",Gt,!1),mt[Et].addEventListener("ontouchstart",Gt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(At),Re()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},tn=function(){var At=document.createElement("div");if(At.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pn='.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");}',ln=document.createElement("style");ln.styleSheet?ln.styleSheet.cssText=pn:ln.appendChild(document.createTextNode(pn)),document.getElementsByTagName("head")[0].appendChild(ln)}return At},vn=function(At,pn,ln,jn){var Gt=document.createElement("div");Gt.className="ggb_preview",Gt.style.position="absolute",Gt.style.zIndex="90",Gt.style.width=At-2+"px",Gt.style.height=pn-2+"px",Gt.style.top="0px",Gt.style.left="0px",Gt.style.overflow="hidden",Gt.style.backgroundColor="white";var mt="lightgrey";ln!==void 0&&(ln==="none"?mt="transparent":mt=ln),Gt.style.border="1px solid "+mt;var Et=document.createElement("img");if(Et.style.position="relative",Et.style.zIndex="1000",Et.style.top="-1px",Et.style.left="-1px",ue!==null&&Et.setAttribute("src",ue),Et.style.opacity=.7,se!==null){var on,Yt,ze;if(!jn){on=document.createElement("img"),on.style.position="absolute",on.style.zIndex="1001",on.style.opacity=1,Et.style.opacity=.3,Yt=360,Yt>At/4*3&&(Yt=At/4*3),ze=Yt/5.8,on.setAttribute("src",se),on.setAttribute("width",Yt),on.setAttribute("height",ze);var be=(At-Yt)/2,Ce=(pn-ze)/2;on.style.left=be+"px",on.style.top=Ce+"px",Gt.appendChild(on)}}return Gt.appendChild(Et),Gt},Tn=function(At){return At=At.toLowerCase(),At==="html5"||At==="screenshot"?At:"html5"},Ve=["web","webSimple","web3d","tablet","tablet3d","phone"],Ze=function(At,pn){if(Ae=At,pn){Qe(Ae,!0);return}var ln=!Ke;if(ln){var jn=Pe(Ae);!isNaN(jn)&&jn<4.4&&(ln=!1)}var Gt,mt;window.location.protocol.substr(0,4)==="http"?Gt=window.location.protocol:Gt="http:";var Et=Ae.indexOf("//");Et>0?mt=Ae:Et===0?mt=Gt+Ae:mt="https://www.geogebra.org/apps/5.2.814.0/";for(var on in Ve)if(Ae.slice(Ve[on].length*-1)===Ve[on]||Ae.slice((Ve[on].length+1)*-1)===Ve[on]+"/"){Qe(mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ln&&!fe.is3D&&!fe.AV&&!fe.SV&&!fe.CV&&!fe.EV2&&!fe.CP&&!fe.PC&&!fe.DA&&!fe.FI&&!fe.PV&&!lt(Me.showToolBar)&&!lt(Me.showMenuBar)&&!lt(Me.showAlgebraInput)&&!lt(Me.enableRightClick)&&(!Me.appName||Me.appName=="classic")?mt+="webSimple/":mt+="web3d/",Qe(mt,!1)},Qe=function(At,pn){if(At.requirejs){Ft=At;return}At.slice(-1)!=="/"&&(At+="/"),Ft=At,pn===null&&(pn=At.indexOf("http")===-1),Nt=pn,ne="web.nocache.js",te=!1;var ln=Ft.split("/");ln.length>1&&(!pn&&ln[ln.length-2]==="webSimple"?(ne="webSimple.nocache.js",te=!0):Ve.indexOf(ln[ln.length-2])>=0&&(ne=ln[ln.length-2]+".nocache.js")),ln=At.split("/"),Ae=ln[ln.length-3],Ae.substr(0,4)==="test"?Ae=Ae.substr(4,1)+"."+Ae.substr(5,1):(Ae.substr(0,3)==="war"||Ae.substr(0,4)==="beta")&&(Ae="5.0");var jn=parseFloat(Ae);jn!==NaN&&jn<5&&At.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+jn+" is deprecated. Using version latest instead."),Ze("5.0",pn))},mn=function(At,pn){window.console&&window.console.log&&(!pn||typeof pn.showLogging=="undefined"||pn.showLogging&&pn.showLogging!=="false")&&console.log(At)};Me.material_id!==void 0?tt(kn):kn();function kn(){var At=On;Be!==null?At=Be:parseFloat(At)<5&&(At="5.0"),Ze(At,!1),He!==null&&Qe(He,Nt),ft=!0}return Cn},GGBAppletUtils=function(){"use strict";function Cn(){return window.GGBT_wsf_edit!==void 0}function On(ft,Be){Be!=1?(ft.style.transformOrigin="0% 0% 0px",ft.style.webkitTransformOrigin="0% 0% 0px",ft.style.transform="scale("+Be+","+Be+")",ft.style.webkitTransform="scale("+Be+","+Be+")",ft.style.maxWidth="initial",ft.querySelector(".ggb_preview")!==null&&(ft.querySelector(".ggb_preview").style.maxWidth="initial"),ft.querySelectorAll(".ggb_preview img")[0]!==void 0&&(ft.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),ft.querySelectorAll(".ggb_preview img")[1]!==void 0&&(ft.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(ft.style.transform="none",ft.style.webkitTransform="none")}function Me(ft,Be,He,gt,it,st){var Ft=null;if(st!=null&&st!="")for(var Nt=ft.parentNode;Nt!=null;)if((" "+Nt.className+" ").indexOf(" "+st+" ")>-1){Ft=Nt;break}else Nt=Nt.parentNode;var Bt=0,Ae=0,ne=0,te=0,ue=0,se=0,pe=0;if(Ft)Bt=Ft.offsetWidth,Ae=Math.max(gt?Ft.offsetWidth:0,Ft.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Bt=Math.min(window.innerWidth,document.documentElement.clientWidth),Ae=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=Bt):(Bt=window.innerWidth,Ae=window.innerHeight,ne=window.innerWidth),ft){var ve=ft.getBoundingClientRect();ve.left>0&&ve.left<=Bt&&(it===void 0||!it)&&(document.dir==="rtl"?(ue=Bt-ve.width-ve.left,se=ne<=480?10:30):(se=ve.left,ue=ne<=480?10:30),te=se+ue)}if(ft&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var Se=ft.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,pe=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,pe=40)}}return ft&&((He===void 0||!He)&&Be>0&&Be+te<Bt?Bt=Be:Bt-=te,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(He===void 0||!He)&&(Ae-=pe)),{width:Bt,height:Ae}}function fe(ft,Be,He,gt,it){if(ft.isScreenshoGenerator)return 1;var st=gt!==void 0&>,Ft=ft.noScaleMargin!=null&&ft.noScaleMargin,Nt=function(Se){return Se&&Se!=="false"},Bt=Nt(ft.autoHeight),Ae=Me(Be,ft.width,He,Bt,st&&window.GGBT_wsf_view||Ft,it),ne=parseInt(Ae.width),te=ft.width,ue=ft.height;if(te===void 0){var se=Be.querySelector(".appletParameters");se&&(te=se.offsetWidth,ue=se.offsetHeight)}var pe=ne/te,ve=st?1:Ae.height/ue;return He!==void 0&&!He&&(pe=Math.min(1,pe),ve=Math.min(1,ve)),Math.min(pe,ve)}function Ke(ft,Be,He){var gt=1,it,st=!1;if(ft.hasOwnProperty("allowUpscale")&&(st=ft.allowUpscale),ft.hasOwnProperty("scale")&&(gt=parseFloat(ft.scale),(isNaN(gt)||gt===null||gt===0)&&(gt=1),gt>1&&(st=!0)),Be&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(st=!0),!(ft.hasOwnProperty("disableAutoScale")&&ft.disableAutoScale))it=fe(ft,Be,st,He,ft.scaleContainerClass);else return gt;return st&&(!ft.hasOwnProperty("scale")||gt===1)?it:Math.min(gt,it)}function St(ft){var Be=Math.min(window.innerWidth,document.documentElement.clientWidth),He=Math.min(window.innerHeight,document.documentElement.clientHeight),gt=ft.getBoundingClientRect(),it=(Be-gt.width)/2,st=(He-gt.height)/2;st<0&&(st=0),ft.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(it<40?ft.style.left="40px":ft.style.left=it+"px",ft.style.top=st+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(st<40?ft.style.top="40px":ft.style.top=st+"px",ft.style.left=it+"px")}function zt(ft,Be){var He=ft.querySelector(".appletParameters");if(He){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Be.id!==He.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(ft)}if(He.parentElement&&/fullscreen/.test(He.parentElement.className))return;var gt=Ke(Be,ft);Cn()&&He.setAttribute("data-param-scale",gt);for(var it=null,st=0;st<ft.childNodes.length;st++)if(ft.childNodes[st].className!==void 0&&ft.childNodes[st].className.match(/^applet_scaler/)){it=ft.childNodes[st];break}if(it!==null&&it.querySelector(".noscale")!==null)return;var Ft=Be.id!==void 0?Be.id:"ggbApplet",Nt=window[Ft];(Nt==null||!Nt.recalculateEnvironments)&&it!==null&&!it.className.match(/fullscreen/)&&(it.parentNode.style.transform="",!isNaN(gt)&>!==1?(it.parentNode.style.width=Be.width*gt+"px",it.parentNode.style.height=Be.height*gt+"px",On(it,gt)):(On(it,1),it.parentNode.style.width=Be.width+"px",it.parentNode.style.height=Be.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&St(ft),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(He).parents(".content-added-content"))}}return{responsiveResize:zt,isFlexibleWorksheetEditor:Cn,positionCenter:St,getScale:Ke,scaleElement:On}}();__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 Cn=n.location.search;return Cn.indexOf(J)!=-1||Cn.indexOf(K)!=-1}function q(Cn,On){}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(Cn){var On=s[L].bindings;s[L].bindings=function(){for(var Me=On?On():{},fe=Cn[webModule.__softPermutationId],Ke=O;Ke<fe.length;Ke++){var St=fe[Ke];Me[St[O]]=St[P]}return Me}};var t;function u(){return v(),t}function v(){if(!t){var Cn=o.createElement(Q);if(Cn.id=L,Cn.style.cssText=R+S,Cn.tabIndex=-1,o.body.appendChild(Cn),t=Cn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var On=document.compatMode==U?V:W;t.write(On+X),t.close()}}}function w(Cn){function On(fe){function Ke(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var St=Ke();if(St){fe();return}function zt(){if(!St){if(!Ke())return;St=!0,fe(),o.removeEventListener&&o.removeEventListener(Z,zt,!1),ft&&clearInterval(ft)}}o.addEventListener&&o.addEventListener(Z,zt,!1);var ft=setInterval(function(){zt()},$)}function Me(fe){var Ke=u(),St=Ke.body,zt=Ke.createElement(_);zt.language=ab,zt.crossOrigin=W,zt.src=fe,webModule.__errFn&&(zt.onerror=function(){webModule.__errFn(L,new Error(bb+fe))}),St.appendChild(zt)}On(function(){Me(Cn)})}webModule.__startLoadingFragment=function(Cn){return C(Cn)},webModule.__installRunAsyncCode=function(Cn){var On=u(),Me=On.body,fe=On.createElement(_);fe.language=ab,fe.text=Cn,Me.appendChild(fe),Me.removeChild(fe)};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(Cn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Cn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Cn){var On=c[Cn];return On==null?null:On},r=d,webModule.__errFn=e}function B(){function Cn(ft){var Be=ft.lastIndexOf(rb);Be==-1&&(Be=ft.length);var He=ft.indexOf(sb);He==-1&&(He=ft.length);var gt=ft.lastIndexOf(tb,Math.min(He,Be));return gt>=O?ft.substring(O,gt+P):W}function On(ft){if(!ft.match(/^\w+:\/\//)){var Be=o.createElement(ub);Be.src=ft+vb,ft=Cn(Be.src)}return ft}function Me(){var ft=__gwt_getMetaProperty(wb);return ft!=null?ft:W}function fe(){for(var ft=o.getElementsByTagName(_),Be=O;Be<ft.length;++Be)if(ft[Be].src.indexOf(xb)!=-1)return Cn(ft[Be].src);return W}function Ke(){var ft=o.getElementsByTagName(yb);return ft.length>O?ft[ft.length-P].href:W}function St(){var ft=o.location;return ft.href==ft.protocol+zb+ft.host+ft.pathname+ft.search+ft.hash}var zt=Me();return zt==W&&(zt=fe()),zt==W&&(zt=Ke()),zt==W&&St()&&(zt=Cn(o.location.href)),zt=On(zt),zt}function C(Cn){return Cn.match(/^\//)||Cn.match(/^[a-zA-Z]+:\/\//)?Cn:webModule.__moduleBase+Cn}function D(){var Cn=[],On=O,Me=[],fe=[];function Ke(ft){var Be=fe[ft](),He=Me[ft];if(Be in He)return Be;var gt=[];for(var it in He)gt[He[it]]=it;throw r&&r(ft,gt,Be),null}if(__gwt_isKnownPropertyValue=function(ft,Be){return Be in Me[ft]},webModule.__getPropMap=function(){var ft={};for(var Be in Me)Me.hasOwnProperty(Be)&&(ft[Be]=Ke(Be));return ft},webModule.__computePropValue=Ke,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var St;try{St=Cb;var zt=St.indexOf(Db);zt!=-1&&(On=parseInt(St.substring(zt+P),$),St=St.substring(O,zt))}catch(ft){}return webModule.__softPermutationId=On,C(St+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},15476:function(Cn,On,Me){"use strict";Me.d(On,{Ax:function(){return zt},Ds:function(){return ft},KI:function(){return He},SI:function(){return St},f1:function(){return Ke}});var fe=Me(11320);function Ke(gt){let it=!0;if(gt.length>0){for(let st=0;st<gt.length;st++)if(gt[st].compile_success==0||!gt[st].compile_success){it=!1;break}}else it=!1;return it}function St(gt,it=""){let st=[];for(let Ft=0;Ft<gt.length;Ft++){let Nt=gt[Ft],Bt=it?`${it}/${Nt.name}`:`${Nt.name}`;st.push({title:Nt.name,type:Nt.type,isLeaf:Nt.type!=="tree",key:Bt})}return st}function zt(gt,it,st){for(let Ft=0;Ft<gt.length;Ft++){let Nt=gt[Ft];if(Nt.key===it){Nt.children=st;break}Nt.children&&zt(Nt.children,it,st)}return gt}function ft(gt,it,st){let Ft;return function(){let Nt=this,Bt=arguments,Ae=function(){Ft=null,st||gt.apply(Nt,Bt)},ne=st&&!Ft;clearTimeout(Ft),Ft=setTimeout(Ae,it),ne&>.apply(Nt,Bt)}}const Be=!0,He=fe.Z.API_SERVER},60580:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ae}});var fe=Me(85804),Ke=Me(67294),St=Object.defineProperty,zt=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,it=(ne,te,ue)=>te in ne?St(ne,te,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ne[te]=ue,st=(ne,te)=>{for(var ue in te||(te={}))He.call(te,ue)&&it(ne,ue,te[ue]);if(Be)for(var ue of Be(te))gt.call(te,ue)&&it(ne,ue,te[ue]);return ne},Ft=(ne,te)=>zt(ne,ft(te)),Nt=(ne,te)=>{var ue={};for(var se in ne)He.call(ne,se)&&te.indexOf(se)<0&&(ue[se]=ne[se]);if(ne!=null&&Be)for(var se of Be(ne))te.indexOf(se)<0&>.call(ne,se)&&(ue[se]=ne[se]);return ue},Bt=(ne,te,ue)=>new Promise((se,pe)=>{var ve=Oe=>{try{Pe(ue.next(Oe))}catch(Re){pe(Re)}},Se=Oe=>{try{Pe(ue.throw(Oe))}catch(Re){pe(Re)}},Pe=Oe=>Oe.done?se(Oe.value):Promise.resolve(Oe.value).then(ve,Se);Pe((ue=ue.apply(ne,te)).next())});const Ae=ne=>{var te=ne,{children:ue}=te,se=Nt(te,["children"]);const[pe,ve]=(0,Ke.useState)(!1);return Ke.createElement(fe.ZP,Ft(st({},se),{loading:pe,onClick:Se=>Bt(void 0,null,function*(){try{ve(!0),yield se.onClick(Se),ve(!1)}catch(Pe){console.error(Pe),ve(!1)}})}),ue)}},63037:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Bt}});var fe=Me(67294),Ke=Me(2453),St=Me(28802),zt={codeBox:"codeBox___WpkVl"},ft=Me(94184),Be=Me.n(ft),He=Object.defineProperty,gt=(Ae,ne,te)=>ne in Ae?He(Ae,ne,{enumerable:!0,configurable:!0,writable:!0,value:te}):Ae[ne]=te,it=(Ae,ne,te)=>gt(Ae,typeof ne!="symbol"?ne+"":ne,te),st=(Ae,ne,te)=>new Promise((ue,se)=>{var pe=Pe=>{try{Se(te.next(Pe))}catch(Oe){se(Oe)}},ve=Pe=>{try{Se(te.throw(Pe))}catch(Oe){se(Oe)}},Se=Pe=>Pe.done?ue(Pe.value):Promise.resolve(Pe.value).then(pe,ve);Se((te=te.apply(Ae,ne)).next())});class Ft extends fe.Component{constructor(ne){super(ne),it(this,"canvas"),it(this,"randomNum",(te,ue)=>Math.floor(Math.random()*(ue-te)+te)),it(this,"drawPic",()=>{this.randomCode()}),it(this,"reloadPic",()=>{this.drawPic()}),it(this,"changeCode",te=>{console.log(te.target.value,222),this.setState({value:te.target.value,showError:!1})}),it(this,"onVerify",()=>{let te;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(te=!0,Ke.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(te=!0,Ke.ZP.error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):this.state.value.toLowerCase()===this.state.code.toLowerCase()&&(te=!1),this.setState({showError:te}),te}),this.canvas=fe.createRef(),this.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1}}componentDidMount(){this.drawPic()}randomColor(ne,te){const ue=this.randomNum(ne,te),se=this.randomNum(ne,te),pe=this.randomNum(ne,te);return`rgb(${ue}, ${se}, ${pe})`}drawText(ne,te,ue){ne.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);const se=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);ne.font=se+"px SimHei";const pe=10,ve=(this.state.contentWidth-40)/(this.state.code.length-1);let Se=pe;ue>0&&(Se=pe+ue*ve);let Pe=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Pe=40);const Oe=this.randomNum(-10,10);ne.translate(Se,Pe),ne.rotate(Oe*Math.PI/180),ne.fillText(te,0,0),ne.rotate(-Oe*Math.PI/180),ne.translate(-Se,-Pe)}drawLine(ne){for(let te=0;te<1;te++)ne.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),ne.beginPath(),ne.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),ne.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),ne.stroke()}drawDot(ne){for(let te=0;te<100;te++)ne.fillStyle=this.randomColor(0,255),ne.beginPath(),ne.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),ne.fill()}randomCode(){let ne="";const te="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890";for(let ue=0;ue<this.state.codeLength;ue++){const se=Math.floor(Math.random()*57);ne+=te[se]}this.setState({code:ne},()=>{const se=this.canvas.current.getContext("2d");se.textBaseline="bottom",se.fillStyle=this.randomColor(this.state.backgroundColorMin,this.state.backgroundColorMax),se.fillRect(0,0,this.state.contentWidth,this.state.contentHeight);for(let pe=0;pe<this.state.code.length;pe++)this.drawText(se,this.state.code[pe],pe);this.drawLine(se),this.drawDot(se)})}render(){const{className:ne,width:te=300}=this.props;return fe.createElement("div",{className:Be()(zt.codeBox,ne),style:{width:te}},fe.createElement("aside",null,fe.createElement(St.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),fe.createElement("div",null,fe.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),fe.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const Nt=(Ae,ne)=>{let te;Modal.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:React.createElement("div",null,React.createElement("p",null,ne),React.createElement(Ft,{ref:ue=>te=ue})),onOk:()=>st(void 0,null,function*(){if(te.onVerify())return Promise.reject();Ae()})})};var Bt=Ft},73646:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return it}});var fe=Me(67294),Ke=Me(28802),St=Me(66309),zt=Me(2453),ft={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},Be=Me(38308);const{TextArea:He}=Ke.default;class gt extends fe.Component{constructor(Ft){super(Ft),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Ft,onAnswerChange:Nt,addChildAnswer:Bt,exerciseIsPublish:Ae,answers:ne,activeOptionErrorIndex:te,flex:ue="0 0 1000px"}=this.props;console.log("----",ne);let{inputVisible:se,EditInputIndex:pe}=this.state;return fe.createElement("div",{className:ft.flex},fe.createElement("div",{className:`${ft.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Ft+1,"):"),fe.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},ne==null?void 0:ne.map((ve,Se)=>fe.createElement(fe.Fragment,null,pe!==Se?(ve==null?void 0:ve.length)>0?fe.createElement(St.default,{className:"edit-tag",key:ve,closable:!((ne==null?void 0:ne.length)===1&&Se===0),onClose:Pe=>{Pe.preventDefault(),(ne==null?void 0:ne.length)===1&&Se===0?this.props.deleteChildAnswermain(Ft,Se):this.props.deleteChildAnswer(Ft,Se)}},fe.createElement("span",{onDoubleClick:Pe=>{this.setState({EditInputIndex:Se}),Pe.preventDefault()}},ve)):fe.createElement(Ke.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Pe=>{if(Pe.target.value.replaceAll(" ","").length<=0){zt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Nt(Ft,Se,Pe.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):fe.createElement(Ke.default,{defaultValue:ve,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Pe=>{if(Pe.target.value.replaceAll(" ","").length<=0){zt.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Nt(Ft,Se,Pe.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&fe.createElement(St.default,{className:"site-tag-plus",onClick:()=>{Bt(Ft),this.setState({inputVisible:!0})}},fe.createElement(Be.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var it=gt},35566:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ae}});var fe=Me(67294),Ke=Me(35567),St=Object.defineProperty,zt=Object.defineProperties,ft=Object.getOwnPropertyDescriptors,Be=Object.getOwnPropertySymbols,He=Object.prototype.hasOwnProperty,gt=Object.prototype.propertyIsEnumerable,it=(ne,te,ue)=>te in ne?St(ne,te,{enumerable:!0,configurable:!0,writable:!0,value:ue}):ne[te]=ue,st=(ne,te)=>{for(var ue in te||(te={}))He.call(te,ue)&&it(ne,ue,te[ue]);if(Be)for(var ue of Be(te))gt.call(te,ue)&&it(ne,ue,te[ue]);return ne},Ft=(ne,te)=>zt(ne,ft(te)),Nt=(ne,te,ue)=>it(ne,typeof te!="symbol"?te+"":te,ue);const Bt="\u2581";class Ae extends fe.Component{constructor(){super(...arguments),Nt(this,"getChCountBeforeCursor",(te,ue)=>{const se=ue.line;let pe=0;for(let Se=0;Se<se;Se++)pe+=te.getLine(Se).split(Bt).length-1;const ve=te.getLine(se).substring(0,ue.ch);return pe+=ve.split(Bt).length-1,pe}),Nt(this,"onCMBeforeChange",(te,ue)=>{const se=te.getRange(ue.from,ue.to);let pe=0;if(ue.text.forEach(ve=>{pe+=ve.split(Bt).length-1}),se&&se.indexOf(Bt)!=-1){const ve=se.split(Bt).length-1,Se=this.getChCountBeforeCursor(te,ue.from);console.log(`\u5220\u9664${ve}\u4E2A\uFF0C \u4E4B\u524D\u6709${Se}\u4E2A\uFF0C\u65B0\u589E${pe}\u4E2A`),this.props.deleteEmptyDisabled?ue.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(Se,ve,pe)}else if(pe){const ve=this.getChCountBeforeCursor(te,ue.from);console.log(`\u65B0\u589E${pe}\u4E2A\uFF0C\u4E4B\u524D\u6709${ve}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ve,0,pe)}})}render(){return fe.createElement(Ke.Z,Ft(st({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},20670:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Be}});var fe=Me(55241),Ke={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},St=Me(32637),zt=Me(67294),Be=({type:He,style:gt})=>{const it=zt.createElement("div",{className:Ke.wrap,onClick:st=>{st.preventDefault(),st.stopPropagation()}},zt.createElement("p",null,He==="shixun"||He==="paths"?"\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u662F\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002":"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",zt.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",He==="paths"?"\u53D1\u9001\u5230\u8BFE\u5802":"\u53D1\u5E03","\u4F7F\u7528\u4E4B\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),zt.createElement("div",{className:Ke.contact},zt.createElement("div",{className:Ke.img},zt.createElement("img",{src:St,width:"124px",height:"124px"})),zt.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return zt.createElement(fe.Z,{content:it},zt.createElement("span",{className:Ke.text,style:gt},"\u9AD8\u6D88\u8017"))}},63205:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ft}});var fe=Me(67294),Ke={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},St=Me(94184),zt=Me.n(St),ft=Me(74330),Be=Me(15979),He=Me(33170),gt=Me(28706),it=(Nt,Bt,Ae)=>new Promise((ne,te)=>{var ue=ve=>{try{pe(Ae.next(ve))}catch(Se){te(Se)}},se=ve=>{try{pe(Ae.throw(ve))}catch(Se){te(Se)}},pe=ve=>ve.done?ne(ve.value):Promise.resolve(ve.value).then(ue,se);pe((Ae=Ae.apply(Nt,Bt)).next())}),Ft=({data:Nt,className:Bt,fullWidth:Ae,style:ne={},onClose:te,onOk:ue,showFullTools:se,noAssociationId:pe})=>{const ve=(0,fe.useRef)(null),Se=(0,fe.useRef)(null),Pe=(0,fe.useRef)(null),Oe=(0,fe.useRef)(null),[Re,tt]=(0,fe.useState)(!1),[rt,Je]=(0,fe.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,fe.useEffect)(()=>(Pe.current||(Pe.current=document.createElement("style"),document.head.appendChild(Pe.current)),Nt!=null&&Nt.visible?(document.body.setAttribute("data-custom","y-hidden"),Pe.current.innerHTML=" html { overflow-y: hidden; }",Nt!=null&&Nt.src&&bt()):(document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)),()=>{document.body.removeAttribute("data-custom"),Pe.current&&(document.head.removeChild(Pe.current),Pe.current=null)}),[Nt==null?void 0:Nt.visible]);const bt=()=>it(void 0,null,function*(){tt(!0),Je("\u6B63\u5728\u52A0\u8F7D\u4E2D");const pt=yield(0,gt.ZJ)(Nt==null?void 0:Nt.src);ve.current.src="",ve.current.src=pt,ve.current.onload=function(){Mt()},tt(!1),Je("")}),lt=pt=>it(void 0,null,function*(){tt(!0),Je("\u6B63\u5728\u4FDD\u5B58\u4E2D");const dn=yield(0,He.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Nt.title,file:pt.dataUrl}});dn!=null&&dn.id&&!pe?(yield(0,He.ZP)(`/api/attachments/${Nt.id}/add_subitem.json`,{method:"post",body:{subitem_id:dn==null?void 0:dn.id,settings:JSON.stringify(pt.state)}})).status===0&&ue():dn!=null&&dn.id&&ue(dn),tt(!1),Je("")}),Lt=()=>{const pt=document.querySelector('a[href="https://markerjs.com/"]');pt&&pt.parentNode&&(pt.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(tn=>{const vn=document.querySelector(tn.name);vn&&vn.setAttribute("title",tn.title)})},Mt=()=>{Se.current=new Be.hP(ve.current),Se.current.targetRoot=Oe.current,Se.current.addEventListener("render",lt),Se.current.addEventListener("beforeclose",te),se&&(Se.current.availableMarkerTypes=Se.current.ALL_MARKER_TYPES,Se.current.uiStyleSettings.redoButtonVisible=!0,Se.current.uiStyleSettings.notesButtonVisible=!0,Se.current.uiStyleSettings.zoomButtonVisible=!0,Se.current.uiStyleSettings.zoomOutButtonVisible=!0,Se.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=Se.current.uiStyleSettings,Se.current.show(),Nt!=null&&Nt.snapshotData&&Se.current.restoreState(Nt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Lt()},300)};return fe.createElement(fe.Fragment,null,(Nt==null?void 0:Nt.visible)&&fe.createElement(ft.Z,{spinning:Re,tip:rt,style:{position:"absolute",width:"100vw"}},fe.createElement("div",{ref:Oe,className:zt()(Ke.imageDimensions,Bt,Ae?Ke.fullWidth:""),style:ne},fe.createElement("img",{className:Ke.img,ref:ve}))))}},35713:function(Cn,On,Me){"use strict";var fe=Me(67294),Ke=Me(71736),St=Me(84279),zt=Me(36527),ft=Me(62844),Be=Me(67294);const He=(0,fe.forwardRef)(({callback:gt,width:it,onChange:st,disabled:Ft,readOnly:Nt,type:Bt="",value:Ae="",style:ne={}},te)=>{const ue=(0,fe.useRef)(),se=(0,fe.useRef)(),[pe,ve]=(0,fe.useState)(0),[Se,Pe]=(0,fe.useState)(0),[Oe,Re]=(0,fe.useState)(!1),tt=()=>{var lt=document.createElement("div");lt.innerHTML=ue.current.getValue();var Lt=lt.innerText;return gt&>(Lt),Lt};(0,fe.useImperativeHandle)(te,()=>({getData:tt}));const rt=lt=>{lt.preventDefault();const Lt=lt.clientX-pe,Mt=lt.clientY-Se;document.body.onmousemove=pt=>{let dn=pt.clientX-Lt,tn=pt.clientY-Mt;const vn=document.getElementsByClassName("markdown-popup-form")[0],Tn=window.innerWidth-vn.offsetWidth,Ve=window.innerHeight-vn.offsetHeight;dn=Math.max(0,Math.min(dn,Tn)),tn=Math.max(0,Math.min(tn,Ve)),Je(pt.clientX,pt.clientY,Lt,Mt)&&(ve(dn),Pe(tn))},document.body.onmouseup=function(){document.body.onmousemove=null}},Je=(lt,Lt,Mt,pt)=>{const dn=document.body.clientHeight,tn=document.body.clientWidth;return lt<20&&Mt>lt||lt>tn-20&&Mt<lt||Lt<20&&pt>Lt||Lt>dn-20&&pt<Lt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,fe.useEffect)(()=>{Oe&&setTimeout(()=>{const lt=document.getElementsByClassName("markdown-popup-form")[0],Lt=window.innerWidth/2-lt.offsetWidth/2,Mt=window.innerHeight/2-lt.offsetHeight/2;ve(Lt),Pe(Mt)},0)},[Oe]);const bt=()=>{Ft||Nt||Re(!0)};return Be.createElement("div",{style:ne},Be.createElement("div",{style:{width:it||"100%",position:"relative"},className:`${Ke.Z.mathFillWrap} ${Ft||Nt?"cursorDefault":""}`,onClick:()=>bt()},Be.createElement("math-field",{disabled:Ft,locale:"zh_cn",class:`${Ke.Z.mathField} ${Bt}`,readOnly:Nt,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ue,style:{width:"100%",fontSize:Ae?18:14},value:Ae||""})),Be.createElement(ft.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:pe,top:Se},title:Be.createElement("div",{style:{cursor:"move"},onMouseDown:rt},"\u8F93\u5165\u516C\u5F0F"),open:Oe,onOk:()=>{const lt=se.current.getData();ue.current.setValue(lt),st(lt),Re(!1)},onCancel:()=>{Re(!1)},destroyOnClose:!0,className:"markdown-popup-form"},Be.createElement(zt.Z,{value:Ae,ref:se,onChange:st,showSaveButton:!1})))});On.Z=He},36527:function(Cn,On,Me){"use strict";var fe=Me(67294),Ke=Me(71230),St=Me(15746),zt=Me(55238),ft=Me(85804),Be=Me(65226),He=Me(71736),gt=Me(84279),it=Me(67294);const st=(0,fe.forwardRef)(({callback:Ft,showSaveButton:Nt,value:Bt=""},Ae)=>{const ne=(0,fe.useRef)(),te=[{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 "}]}]}],ue=[{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}`}]}]}],se=Se=>{ne.current.setValue(ne.current.getValue()+" "+Se.value+" ")},pe=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:it.createElement(Ke.Z,{className:He.Z.lists,gutter:[10,10]},te.map((Se,Pe)=>it.createElement(St.Z,{flex:"110px",className:He.Z.item},it.createElement("div",null,it.createElement(Be.Z,{value:`$$${Se.value}$$`}),Se.name),it.createElement("div",{className:He.Z.children},Se.children.map((Oe,Re)=>it.createElement("div",{key:Re},it.createElement("h1",null,Oe.name),it.createElement(Ke.Z,{gutter:[10,10]},Oe.data.map((tt,rt)=>it.createElement(St.Z,{key:rt,onClick:()=>se(tt),className:He.Z.diamond},it.createElement(Be.Z,{value:"`$$"+tt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:it.createElement(Ke.Z,{className:He.Z.lists,gutter:[10,10]},ue.map((Se,Pe)=>it.createElement(St.Z,{flex:"110px",className:He.Z.item},it.createElement("div",null,it.createElement(Be.Z,{value:"`$$"+Se.value+"$$`"}),Se.name),it.createElement("div",{className:He.Z.children},Se.children.map((Oe,Re)=>it.createElement("div",{key:Re},Oe.name&&it.createElement("h1",null,Oe.name),it.createElement(Ke.Z,{gutter:[10,10]},Oe.data.map((tt,rt)=>it.createElement(St.Z,{key:rt,onClick:()=>se(tt),className:He.Z.diamond},it.createElement(Be.Z,{value:"`$$"+tt.value+"$$`"}))))))))))}],ve=()=>{var Se=document.createElement("div");Se.innerHTML=ne.current.getValue();var Pe=Se.innerText;return Ft&&Ft(Pe),Pe};return(0,fe.useImperativeHandle)(Ae,()=>({getData:ve})),it.createElement("div",{className:He.Z.mathWrap},it.createElement(zt.default,{defaultActiveKey:"1",items:pe}),it.createElement("math-field",{locale:"zh_cn",className:He.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},Bt||""),Nt&&it.createElement("div",{className:He.Z.button},it.createElement(ft.ZP,{size:"large",onClick:ve,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});On.Z=st},26194:function(Cn,On,Me){"use strict";var fe=Me(67294),Ke=Me(4977),St=Me(85804),zt=Object.defineProperty,ft=Object.defineProperties,Be=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,gt=Object.prototype.hasOwnProperty,it=Object.prototype.propertyIsEnumerable,st=(Ae,ne,te)=>ne in Ae?zt(Ae,ne,{enumerable:!0,configurable:!0,writable:!0,value:te}):Ae[ne]=te,Ft=(Ae,ne)=>{for(var te in ne||(ne={}))gt.call(ne,te)&&st(Ae,te,ne[te]);if(He)for(var te of He(ne))it.call(ne,te)&&st(Ae,te,ne[te]);return Ae},Nt=(Ae,ne)=>ft(Ae,Be(ne));const Bt=({img:Ae,buttonProps:ne={},styles:te={},customText:ue,ButtonText:se,ButtonClick:pe,Buttonclass:ve,ButtonTwo:Se,imgStyles:Pe,loading:Oe=!1,className:Re=""})=>fe.createElement("section",{className:`tc animated fadeIn ${Re}`,style:Ft({color:"#999",margin:"100px auto",visibility:Oe?"hidden":"visible"},te)},fe.createElement("img",{src:Ae||Ke,style:Nt(Ft({},Pe),{pointerEvents:"none",userSelect:"none"})}),fe.createElement("p",{className:"mt20 font14"},ue||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&fe.createElement(St.ZP,Ft({className:ve,onClick:pe},ne),se),Se&&Se);On.Z=Bt},20819:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return ve}});var fe=Me(67294),Ke={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},St=Me(85804),zt=Me(30153),ft=Me(36295),Be=Me(83062),He=Me(28706),gt=Me(15835),it=Me(26194),st=Me(11320),Ft=Me(66540),Nt=Me(67294),Bt=Object.defineProperty,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(Se,Pe,Oe)=>Pe in Se?Bt(Se,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Se[Pe]=Oe,se=(Se,Pe)=>{for(var Oe in Pe||(Pe={}))ne.call(Pe,Oe)&&ue(Se,Oe,Pe[Oe]);if(Ae)for(var Oe of Ae(Pe))te.call(Pe,Oe)&&ue(Se,Oe,Pe[Oe]);return Se},pe=(Se,Pe,Oe)=>new Promise((Re,tt)=>{var rt=lt=>{try{bt(Oe.next(lt))}catch(Lt){tt(Lt)}},Je=lt=>{try{bt(Oe.throw(lt))}catch(Lt){tt(Lt)}},bt=lt=>lt.done?Re(lt.value):Promise.resolve(lt.value).then(rt,Je);bt((Oe=Oe.apply(Se,Pe)).next())}),ve=({editOffice:Se="view",data:Pe,issaver:Oe,onSaver:Re,theme:tt,type:rt,filename:Je,monacoEditor:bt,className:lt,style:Lt,close:Mt,onClose:pt,hasMask:dn,disabledDownload:tn,onImgDimensions:vn,showNodata:Tn,recordInfo:Ve})=>{const[Ze,Qe]=(0,fe.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[mn,kn]=(0,fe.useState)(""),[At,pn]=(0,fe.useState)(),ln=window.ENV==="build"?"/react/build":"",jn=location.host.startsWith("localhost")?st.Z.PROXY_SERVER:st.Z.API_SERVER,mt=10*(1024*1024),Et=(0,fe.useRef)();Pe!=null&&Pe.startsWith("/api")&&rt!=="txt"&&(Pe=st.Z.API_SERVER+Pe);const on=De=>De.substring(De.lastIndexOf("/")+1).split(".").pop();Je&&bt&&(bt.filename=Je),(0,fe.useEffect)(()=>{var De,Ge;const Fe=(Ge=(De=document.cookie)==null?void 0:De.replace(/\s/g,""))==null?void 0:Ge.split(";");Fe==null||Fe.map(qe=>{let rn=qe.split("=");rn[0]==="_educoder_session"&&kn(rn[1])})},[]),(0,fe.useEffect)(()=>{rt==="office"&&(Pe.indexOf("bigfilescdn.")>-1||Pe.indexOf("bigfiles1")>-1?pn({url:Pe,fileType:on(Pe),model:Pe.indexOf("model=edit")?"edit":"view"}):ze())},[rt,Pe]);function Yt(De){return pe(this,null,function*(){De.data.type==="pdfdata"&&(Re(De.data.data),window.removeEventListener("message",Yt,!1)),console.log("mess---:",De.data)})}const ze=()=>pe(void 0,null,function*(){console.log("data:",Pe);let De=Pe;Pe.startsWith("http")||(De=location.origin+De);let Ge=new URL(De).pathname.split("/").pop();const Fe=yield(0,gt.gJ)({attachment_id:Ge});Fe.url=jn+Fe.url,pn(Fe)}),be=()=>{if(Pe.startsWith("http")||Pe.startsWith("blob:")){Ce();return}(0,He.Sv)(Je||"educoder",Pe,Je)},Ce=()=>{Ve&&(0,Ft.fc)({id:Ve==null?void 0:Ve.id,watch_type:1,course_id:Ve==null?void 0:Ve.course_id}),(0,He.Nd)(Je||"educoder",decodeURIComponent(Pe))};return Nt.createElement("div",{style:se({},Lt||{}),className:`${dn&&Ke.bgBlack} ${rt?Ke.wrp:"hide"}`},Mt&&Nt.createElement("div",{className:Ke.close,ref:Et},!!vn&&Nt.createElement(Be.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Et.current},Nt.createElement("span",{onClick:()=>{pt(),vn()}},Nt.createElement("i",{className:"icon-yulanpizhu"}))),!tn&&Nt.createElement(Be.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Et.current},Nt.createElement("span",{onClick:Ce},Nt.createElement("i",{className:"icon-quxiaozhiding"}))),Oe&&Nt.createElement(Be.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Et.current},Nt.createElement("span",{className:"",onClick:()=>{const De=document.getElementById("pdfiframe");window.addEventListener("message",Yt,!1),setTimeout(()=>{De.contentWindow.postMessage("getData","*")},300)}},Nt.createElement("i",{className:"icon-baocun"}))),Nt.createElement(Be.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Et.current},Nt.createElement("span",{className:"",onClick:()=>{pt()}},Nt.createElement("i",{className:"icon-guanbi1"})))),Nt.createElement("div",{className:`${Ke[lt]} ${lt} ${Ke.monaco} ${rt==="txt"?"show":"hide"}`},rt==="txt"&&Nt.createElement(Nt.Fragment,null,Nt.createElement(ft.ZP,se({},bt)))),rt==="audio"&&Nt.createElement("audio",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Pe}`,autoPlay:!0}),rt==="video"&&Nt.createElement(Nt.Fragment,null,(Pe==null?void 0:Pe.indexOf("http"))>-1?Nt.createElement("video",{controls:!0,src:`${Pe}`,autoPlay:!0}):Nt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Pe}`,autoPlay:!0})),rt==="office"&&At&&Nt.createElement("iframe",{src:`${ln}/office.html?key=${At.key}&url=${btoa(At.url)}&callbackUrl=${jn+(At.callbackUrl||"")}&fileType=${At.fileType}&title=${At.title||""}&model=${Se}&officeServer=${st.Z.ONLYOFFICE}&disabledDownload=${!!tn}`}),rt==="html"&&Nt.createElement("iframe",{src:Pe+"&disposition=inline"}),rt==="pdf"&&Nt.createElement("iframe",{id:"pdfiframe",src:`${ln}/js/pdfview/index.html?filename=${Je||"educoder.pdf"}&url=${encodeURIComponent(Pe)}&disabledDownload=${!!tn}&model=${Se}`}),rt==="image"&&Nt.createElement("img",{src:`${(Pe==null?void 0:Pe.indexOf("http://"))>-1||(Pe==null?void 0:Pe.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Pe}`}),(rt==="other"||rt==="download")&&Nt.createElement(Nt.Fragment,null,Tn?Nt.createElement(it.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Nt.createElement(St.ZP,{icon:Nt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:be,disabled:tn},"\u4E0B\u8F7D")}):Nt.createElement(St.ZP,{type:"primary",size:"middle",onClick:be,disabled:tn},Nt.createElement(zt.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},15312:function(Cn,On,Me){"use strict";Me.d(On,{t:function(){return Ce}});var fe=Me(67294),Ke=Me(28802),St=Me(91773),zt=Me(62844),ft=Me(71230),Be=Me(15746),He=Me(37720),gt=Me(88044),it=Me(98813),st=Me(41307),Ft=Me(35973),Nt=Me(52654),Bt=Me(2453),Ae=Me(85804),ne=Me(74330),te=Me(19575),ue={flex_box_center:"flex_box_center___kOQ8P",flex_space_between:"flex_space_between___fY6jt",flex_box_vertical_center:"flex_box_vertical_center___bDSSI",flex_box_center_end:"flex_box_center_end___mQ6mU",flex_box_column:"flex_box_column___F15G0",result:"result___UYRo8",left:"left___TRaH5",right:"right___twp9s",box:"box___vwndt",li:"li___hRe2d"},se=Me(33170),pe=Me(88742),ve=Me(35567),Se=Me(74855),Pe=Me(96707),Oe=Me(67294),Re=Object.defineProperty,tt=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,Je=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,Lt=(De,Ge,Fe)=>Ge in De?Re(De,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):De[Ge]=Fe,Mt=(De,Ge)=>{for(var Fe in Ge||(Ge={}))bt.call(Ge,Fe)&&Lt(De,Fe,Ge[Fe]);if(Je)for(var Fe of Je(Ge))lt.call(Ge,Fe)&&Lt(De,Fe,Ge[Fe]);return De},pt=(De,Ge)=>tt(De,rt(Ge)),dn=(De,Ge,Fe)=>new Promise((qe,rn)=>{var Kn=Nn=>{try{$t(Fe.next(Nn))}catch(Zt){rn(Zt)}},Zn=Nn=>{try{$t(Fe.throw(Nn))}catch(Zt){rn(Zt)}},$t=Nn=>Nn.done?qe(Nn.value):Promise.resolve(Nn.value).then(Kn,Zn);$t((Fe=Fe.apply(De,Ge)).next())}),vn=({buttonProps:De,buttonText:Ge,form:Fe,hackIdentifier:qe="",answerKey:rn,data:Kn})=>{const[Zn,$t]=(0,fe.useState)(!1),[Nn,Zt]=(0,fe.useState)(!1),[qn,$n]=(0,fe.useState)(!1),[oi,ri]=(0,fe.useState)({}),[fr,wr]=(0,fe.useState)(""),[Li,Ai]=(0,fe.useState)(""),Ur=(0,fe.useRef)(qe),Yn=(0,fe.useRef)(""),Rn=(0,fe.useRef)(!1);(0,fe.useEffect)(()=>{qn&&lr()},[qn]),(0,fe.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const sr=()=>new Date().getTime(),xr=Kn==null?void 0:Kn.code,Ni=()=>{var ti,hi;let Ii=xr?Kn==null?void 0:Kn.code:(ti=Fe.getFieldValue("hack_codes"))==null?void 0:ti.code,ir=xr?Kn==null?void 0:Kn.answer_content:Fe.getFieldValue(rn),zi=xr?Kn==null?void 0:Kn.input:(hi=Fe.getFieldValue("hack_sets"))==null?void 0:hi.input;ir==null||ir.forEach(an=>{const we=an.value||an.answer_text||"";Ii=Ii.replace(/(@▁@|@▁▁@)/,we)}),Ai(zi),wr(Ii),ri({}),$n(!0)},lr=()=>dn(void 0,null,function*(){var ti,hi,Ii,ir;const zi=sr(),an=xr?Kn==null?void 0:Kn.time_limit:(ti=Fe.getFieldsValue())==null?void 0:ti.hack.time_limit,we=xr?(hi=Kn==null?void 0:Kn.answer_content)==null?void 0:hi.length:(ir=(Ii=Fe.getFieldsValue())==null?void 0:Ii.standard_answers)==null?void 0:ir.length;$t(!0),yield(0,pe.bM)(Yn.current,{test_hack_code:fr,test_input:Li});function Ut(){return dn(this,null,function*(){const{status:en,data:cn}=yield(0,pe.rX)(Yn.current,"submit"),In=sr()-zi>(an+3)*1e3*we;if(Rn.current){if(In){Bt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),$t(!1);return}if(en===0){$t(!1),ri(pt(Mt({},cn),{showText:!0}));return}setTimeout(Ut,1e3)}})}Ut()}),mo=()=>dn(void 0,null,function*(){var ti,hi,Ii,ir,zi,an,we;if(!Kn){try{yield Fe.validateFields()}catch(xn){(Ii=(hi=(ti=xn==null?void 0:xn.errorFields)==null?void 0:ti[0])==null?void 0:hi.name)!=null&&Ii.includes("standard_answers")?Bt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):Bt.ZP.error(xn.errorFields[0].errors[0]),Fe.scrollToField(xn.errorFields[0].name,{behavior:"smooth",block:"center"});return}Zt(!0);let en="";const cn=Fe.getFieldsValue();Ur.current?en=yield(0,se.ZP)(`/api/problems/${Ur.current}.json`,{method:"put",body:pt(Mt({},cn),{hack:pt(Mt({},cn==null?void 0:cn.hack),{sub_discipline_id:(we=(an=cn==null?void 0:cn.hack)==null?void 0:an.sub_discipline_id)==null?void 0:we[1],difficult:cn.difficulty,item_banks_group_id:cn.item_banks_group_id}),hack_codes:pt(Mt({},cn.hack_codes),{code:te.Base64.encode(cn.hack_codes.code)}),update_hack_sets:[Mt({},cn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}):(en=yield(0,se.ZP)("/api/problems.json",{method:"post",body:pt(Mt({},cn),{hack:pt(Mt({},cn==null?void 0:cn.hack),{sub_discipline_id:(zi=(ir=cn==null?void 0:cn.hack)==null?void 0:ir.sub_discipline_id)==null?void 0:zi[1],difficult:cn.difficulty,item_banks_group_id:cn.item_banks_group_id}),hack_codes:pt(Mt({},cn.hack_codes),{code:te.Base64.encode(cn.hack_codes.code)}),hack_sets:[Mt({},cn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}),Ur.current=en==null?void 0:en.identifier,sessionStorage.projectFill=en==null?void 0:en.identifier)}const Ut=yield(0,se.ZP)(`/api/problems/${Ur.current}/start.json`,{method:"get"});if((Ut==null?void 0:Ut.status)===0){Yn.current=Ut==null?void 0:Ut.identifier,Rn.current=!0,Zt(!1),Ni();return}Zt(!1)}),pi=ti=>{const{status:hi,error_msg:Ii,execute_time:ir,output:zi,input:an,expected_output:we}=ti;let Ut=null;switch(hi){case Pe.h.OK:Ut=Oe.createElement(Oe.Fragment,null,Oe.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",ir/1e3,"\u79D2"),Oe.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Pe.h.NOMATCH:Ut=Oe.createElement(Oe.Fragment,null,Oe.createElement("div",null,"\u8F93\u5165\uFF1A"),Oe.createElement("pre",{style:{fontFamily:"initial"}},an),Oe.createElement("div",null,"\u8F93\u51FA\uFF1A"),Oe.createElement("pre",{style:{fontFamily:"initial"}},zi&&te.Base64.decode(zi)),Oe.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Oe.createElement("pre",{style:{fontFamily:"initial"}},we&&te.Base64.decode(we)));break;case Pe.h.EXECUTEFAILURE:Ut=Oe.createElement(Oe.Fragment,null,Oe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Oe.createElement("pre",null,an)),Oe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Oe.createElement("pre",{className:"error"},te.Base64.decode(Ii)));break;case Pe.h.COMPILEFAILURE:Ut=Oe.createElement(Oe.Fragment,null,Oe.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Oe.createElement("pre",null,an)),Oe.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Oe.createElement("pre",{className:"error"},te.Base64.decode(Ii)));break;case Pe.h.PODFAILURE:Ut=Oe.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Pe.h.TIMEOUT:Ut=Oe.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Oe.createElement(Oe.Fragment,null," ",Ut," ")};return Oe.createElement("div",null,Oe.createElement(Ae.ZP,pt(Mt({loading:Nn},De),{onClick:mo}),Ge),Oe.createElement(zt.default,{open:qn,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:Zn,cancelButtonProps:{style:{display:"none"}},onOk:()=>lr(),onCancel:()=>{Rn.current=!1,$n(!1)}},Oe.createElement("div",{className:ue.result},Oe.createElement("div",{className:ue.left},Oe.createElement("div",{className:"mb20"},Oe.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!Kn&&Oe.createElement(Se.CopyToClipboard,{text:fr,onCopy:()=>Bt.ZP.success("\u590D\u5236\u6210\u529F")},Oe.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Oe.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Oe.createElement(ve.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:fr,onChange:ti=>wr(ti)})),Oe.createElement("div",{className:ue.right},Oe.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Oe.createElement("div",{className:ue.box},Oe.createElement("div",{className:ue.li},Oe.createElement(Ke.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:Li,onChange:ti=>Ai(ti.target.value),bordered:!1,style:{height:180}}))),Oe.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Oe.createElement("div",{className:ue.box},Oe.createElement(ne.Z,{spinning:Zn,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Oe.createElement("div",{className:ue.li,style:{height:196,overflow:"auto",padding:10}},pi(oi))))))))},Tn=Me(55304),Ve=Me(67294),Ze=Object.defineProperty,Qe=Object.defineProperties,mn=Object.getOwnPropertyDescriptors,kn=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,pn=Object.prototype.propertyIsEnumerable,ln=(De,Ge,Fe)=>Ge in De?Ze(De,Ge,{enumerable:!0,configurable:!0,writable:!0,value:Fe}):De[Ge]=Fe,jn=(De,Ge)=>{for(var Fe in Ge||(Ge={}))At.call(Ge,Fe)&&ln(De,Fe,Ge[Fe]);if(kn)for(var Fe of kn(Ge))pn.call(Ge,Fe)&&ln(De,Fe,Ge[Fe]);return De},Gt=(De,Ge)=>Qe(De,mn(Ge)),mt=(De,Ge)=>{var Fe={};for(var qe in De)At.call(De,qe)&&Ge.indexOf(qe)<0&&(Fe[qe]=De[qe]);if(De!=null&&kn)for(var qe of kn(De))Ge.indexOf(qe)<0&&pn.call(De,qe)&&(Fe[qe]=De[qe]);return Fe};const{TextArea:Et}=Ke.default,on=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Yt=({value:De,onChange:Ge})=>Ve.createElement(Switch,{checked:De,onChange:Fe=>{Ge(Fe)}}),ze="@\u2581@",be="@\u2581\u2581@",Ce=({questionTitlePlaceholder:De,form:Ge,scoreByBlank:Fe=!1,hackidentifier:qe,answerKey:rn})=>{const[Kn,Zn]=(0,fe.useState)(!1),[$t,Nn]=(0,fe.useState)(!1),qn=(0,Ft.useParams)().type==="edit",$n=(Yn,Rn)=>{const sr=Rn.line;let xr=0;for(let lr=0;lr<sr;lr++)xr+=Yn.getLine(lr).split(ze).length-1;for(let lr=0;lr<sr;lr++)xr+=Yn.getLine(lr).split(be).length-1;const Ni=Yn.getLine(sr).substring(0,Rn.ch);return xr+=Ni.split(ze).length-1,xr+=Ni.split(be).length-1,xr},oi=(Yn,Rn,sr,xr)=>{const Ni=Yn.getRange(Rn.from,Rn.to);let lr=0;if(Rn.text.forEach(mo=>{lr+=mo.split(ze).length-1}),Rn.text.forEach(mo=>{lr+=mo.split(be).length-1}),Rn.origin!=="setValue"){if(Ni&&(Ni.indexOf(ze)!==-1||Ni.indexOf(be)!==-1)){const mo=Ni.split(ze).length-1+Ni.split(be).length-1,pi=$n(Yn,Rn.from);if(console.log(`\u5220\u9664${mo}\u4E2A\uFF0C \u524D\u9762\u6709${pi}\u4E2A\uFF0C\u65B0\u589E${lr}\u4E2A`),mo>1){const ti=Array.from({length:mo},(hi,Ii)=>pi+Ii);xr(ti)}else xr(pi)}else if(lr>0){const mo=$n(Yn,Rn.from);console.log(`\u65B0\u589E${lr}\u4E2A\uFF0C\u4E4B\u524D\u6709${mo}\u4E2A`),sr(lr,mo)}}},ri=()=>{const Yn=Ge.getFieldValue(rn);Ge.setFieldsValue({[rn]:Yn==null?void 0:Yn.map((Rn,sr)=>Gt(jn({},Rn),{position:sr+1}))})},fr=(0,fe.useRef)(),wr=(Yn,Rn)=>{for(let sr=0;sr<Yn;sr++)fr.current({position:null,answer_text:""},Rn+sr);ri()},Li=(0,fe.useRef)(),Ai=Yn=>{Li.current(Yn),ri()},Ur=St.default.useWatch(rn,Ge);return Ve.createElement("div",{className:Nt.Z.wrap},Ve.createElement(St.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},Ve.createElement(st.h,{scrollId:"name",watch:!0,height:140})),Ve.createElement("div",{className:Nt.Z.questionTitleEditorWrap},Ve.createElement(St.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},Ve.createElement(st.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(Yn,Rn)=>{const sr=Ge.getFieldValue(rn);console.log("--preAnswerData",sr,Rn),Ge.setFieldsValue({[rn]:sr==null?void 0:sr.map((xr,Ni)=>{var lr;return Gt(jn({},xr),{position:Ni+1,multi_line:(lr=Rn==null?void 0:Rn[Ni])==null?void 0:lr.multiLine})})})},placeholder:De,onCMBeforeChange:(Yn,Rn)=>{oi(Yn,Rn,wr,Ai)}}))),Ve.createElement(St.default.List,{name:rn,rules:[{validator(Yn,Rn){if(!(Rn!=null&&Rn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const sr of Rn){const{answer_text:xr}=sr||{};if((xr==null?void 0:xr.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Yn,{add:Rn,remove:sr},{errors:xr})=>(fr.current=Rn,Li.current=sr,Ve.createElement(Ve.Fragment,null,Ve.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Ve.createElement(St.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),Ve.createElement("div",{onClick:()=>{zt.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:Ve.createElement("div",null,Ve.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",Ve.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),Ve.createElement("div",{style:{marginTop:10}},"2.\u8BD5\u9898\u7B97\u5206\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u5C06\u7A0B\u5E8F\u91CC\u9762\u7684\u6240\u6709\u7A7A\u66FF\u6362\u6210\u5B66\u751F\u7684\u7B54\u6848\u8FDB\u884C\u8BC4\u6D4B\u3002\u8F93\u51FA\u7684\u7ED3\u679C\u4E0E\u6D4B\u8BD5\u96C6\u6BD4\u5BF9\uFF0C\u5B8C\u5168\u6B63\u786E\u5219\u5F97\u6EE1\u5206\uFF1B\u82E5\u4E0D\u5B8C\u5168\u6B63\u786E\uFF0C\u5219\u4F9D\u6B21\u5C06\u6BCF\u4E2A\u7A7A\u6362\u6210\u5B66\u751F\u63D0\u4EA4\u7684\u7B54\u6848\uFF0C\u540C\u65F6\u5C06\u5176\u4ED6\u7A7A\u66FF\u6362\u6210\u6807\u51C6\u7B54\u6848\uFF0C\u8FD0\u884C\u7A0B\u5E8F\u3002\u5982\u679C\u8FD9\u4E2A\u7A7A\u7684\u5B66\u751F\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7ED3\u5408\u80FD\u5F97\u5230\u6B63\u786E\u8F93\u51FA\uFF0C\u5219\u8FD9\u4E2A\u7A7A\u5F97\u5230\u8BE5\u7A7A\u7684\u6EE1\u5206\uFF0C\u5426\u5219\u8BE5\u7A7A\u5F970\u5206\u3002"))})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"}},Ve.createElement(Tn.Z,{style:{marginRight:3,color:"#3061D0"}}),Ve.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),Yn.map((Ni,lr)=>{var mo=Ni,{key:pi,name:ti}=mo,hi=mt(mo,["key","name"]),Ii,ir;return Ve.createElement(ft.Z,{className:"mb20",key:pi,align:"middle",wrap:!1},Ve.createElement(Be.Z,{flex:"0 0 auto",className:`${Nt.Z.blankIndex}`},"\u586B\u7A7A\u9879",lr+1),Ve.createElement(Be.Z,{flex:1},Ve.createElement(ft.Z,{align:"top",justify:"space-between",wrap:!1},Ve.createElement(Be.Z,null,Ve.createElement(St.default.Item,Gt(jn({},hi),{name:[ti,"answer_text"],noStyle:!0}),(Ii=Ur==null?void 0:Ur[ti])!=null&&Ii.multi_line||(ir=Ur==null?void 0:Ur[ti])!=null&&ir.multiLine?Ve.createElement(Et,{spellCheck:!1,style:{marginLeft:10,width:550}}):Ve.createElement(Ke.default,{style:{marginLeft:10,width:550},className:Nt.Z.blankInput,size:"large",maxLength:1e3,onBlur:zi=>{}}))),Fe&&Ve.createElement(Be.Z,{flex:"224px"},Ve.createElement(St.default.Item,Gt(jn({},hi),{name:[ti,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Ve.createElement(He.Z,{size:"large",className:Nt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),Ve.createElement("div",{onClick:()=>Zn(!0)},Ve.createElement(St.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ve.createElement(st.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Kn}))),Ve.createElement(St.default.Item,{label:"\u7F16\u7A0B\u8BED\u8A00",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u7F16\u7A0B\u8BED\u8A00"}]},Ve.createElement(gt.default,{size:"large"},on.map(Yn=>Ve.createElement(gt.default.Option,{key:Yn.title,value:Yn.key}," ",Yn.title)))),Ve.createElement(St.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},Ve.createElement(St.default.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"},{type:"number",min:3,message:"\u6700\u5C0F\u9650\u5236\u65F6\u95F4\u662F3\u79D2"}],noStyle:!0},Ve.createElement(He.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),Ve.createElement("span",{className:"ml10 font14"},"\u79D2")),Ve.createElement(St.default.Item,{label:"\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BC4\u6D4B\u65F6\u7A7A\u683C\u5904\u7406"}]},Ve.createElement(it.ZP.Group,{style:{marginTop:-10}},Ve.createElement(it.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Ve.createElement(it.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Ve.createElement(it.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),Ve.createElement(St.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),Ve.createElement("div",{style:{background:"#F6F7F9",padding:15}},Ve.createElement(St.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},Ve.createElement(Et,{rows:4})),Ve.createElement(St.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Ve.createElement(Et,{rows:4}))),Ve.createElement(vn,{form:Ge,answerKey:rn,hackIdentifier:qe,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:Ve.createElement("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}}))}},11776:function(Cn,On,Me){"use strict";Me.d(On,{u:function(){return Oe}});var fe=Me(67294),Ke=Me(71230),St=Me(15746),zt=Me(83062),ft=Me(91773),Be=Me(52654),He=Me(40043),gt=Me(24018),it=Me(41307),st=Me(67294),Ft=Object.defineProperty,Nt=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(Re,tt,rt)=>tt in Re?Ft(Re,tt,{enumerable:!0,configurable:!0,writable:!0,value:rt}):Re[tt]=rt,se=(Re,tt)=>{for(var rt in tt||(tt={}))ne.call(tt,rt)&&ue(Re,rt,tt[rt]);if(Ae)for(var rt of Ae(tt))te.call(tt,rt)&&ue(Re,rt,tt[rt]);return Re},pe=(Re,tt)=>Nt(Re,Bt(tt)),ve=(Re,tt)=>{var rt={};for(var Je in Re)ne.call(Re,Je)&&tt.indexOf(Je)<0&&(rt[Je]=Re[Je]);if(Re!=null&&Ae)for(var Je of Ae(Re))tt.indexOf(Je)<0&&te.call(Re,Je)&&(rt[Je]=Re[Je]);return rt};const Se=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Pe=({value:Re,onChange:tt,choiceTextKey:rt,answerKey:Je,index:bt,isEdit:lt,setInputActive:Lt,form:Mt,choiceOptionsPath:pt,allowChangeMode:dn,showAddIcon:tn,addItem:vn,deleteItem:Tn})=>{console.log(Re,"value");const Ve=(Re==null?void 0:Re[Je])===1,Ze=()=>{const mn=Mt.getFieldValue(pt);Mt.setFieldValue(pt,mn.map(kn=>pe(se({},kn),{[Je]:0})))},Qe=()=>{Ve?tt(pe(se({},Re),{[Je]:0})):(dn||Ze(),tt(pe(se({},Re),{[Je]:1})))};return st.createElement(Ke.Z,{className:Be.Z.choiceWrap,align:"middle",wrap:!1},st.createElement(St.Z,{onClick:Qe,className:`${Be.Z.choiceIndex} ${Ve?Be.Z.activeAnswer:""}`},Se[bt]),st.createElement(St.Z,{flex:1,className:`${Be.Z.editorWrap} ml15`,onClick:Lt},st.createElement(it.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:lt,value:Re==null?void 0:Re[rt],onChange:mn=>{tt(pe(se({},Re),{[rt]:mn}))}})),st.createElement(St.Z,{flex:"0 0 auto",className:"ml15"},st.createElement("div",{onClick:Qe,className:`${Be.Z.setAnswerBtn} ${Ve?Be.Z.activeAnswer:""}`},Ve?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),st.createElement(St.Z,{className:Be.Z.actionWrapper},st.createElement(zt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},st.createElement(He.Z,{className:Be.Z.addIcon,onClick:vn,style:{visibility:tn?"visible":"hidden"}})),st.createElement(zt.Z,{title:"\u5220\u9664"},st.createElement(gt.Z,{className:Be.Z.deleteIcon,onClick:Tn,style:{visibility:bt>1?"visible":"hidden"}}))))},Oe=({questionTitlePlaceholder:Re,titleKey:tt,choiceKey:rt,analysisKey:Je,choiceTextKey:bt,answerKey:lt,choiceOptionsPath:Lt,allowChangeMode:Mt=!0,form:pt,showAnalysis:dn=!0})=>{const[tn,vn]=(0,fe.useState)(),[Tn,Ve]=(0,fe.useState)(!1);return st.createElement("div",{className:Be.Z.wrap},st.createElement("div",{className:Be.Z.questionTitleEditorWrap},st.createElement(ft.default.Item,{label:"\u9898\u5E72",name:tt,labelCol:{span:24},rules:[{required:!0}]},st.createElement(it.h,{scrollId:Array.isArray(tt)?tt.join("_"):`${tt}`,watch:!0,height:140,placeholder:Re}))),st.createElement(ft.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),st.createElement(ft.default.List,{name:rt,rules:[{validator(Ze,Qe){const mn=Qe.some(At=>At[lt]===1),kn=Qe.findIndex(At=>{var pn;return((pn=At[bt])==null?void 0:pn.length)<=0});return kn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Se[kn]}\u9009\u9879\u7684\u5185\u5BB9`)):mn?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ze,{add:Qe,remove:mn})=>st.createElement("div",{id:Array.isArray(Lt)?Lt.join("_"):`${Lt}`},Ze.map((kn,At)=>{var pn=kn,{key:ln,name:jn}=pn,Gt=ve(pn,["key","name"]);const mt=tn===ln,Et=()=>{vn(ln)},on=At<7&&At===Ze.length-1,Yt=()=>Qe({[bt]:"",[lt]:0}),ze=()=>mn(jn);return st.createElement(ft.default.Item,pe(se({},Gt),{key:ln,name:jn,className:Be.Z.choiceListWrap,rules:[{validator(be,Ce){return Ce!=null&&Ce.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Se[At]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),st.createElement(Pe,{choiceTextKey:bt,answerKey:lt,index:At,isEdit:mt,setInputActive:Et,form:pt,choiceOptionsPath:Lt,allowChangeMode:Mt,showAddIcon:on,addItem:Yt,deleteItem:ze}))}),Ze.length<8&&st.createElement("div",{className:`${Be.Z.addBtn} mb30`,onClick:()=>Qe({[bt]:"",[lt]:0})},"\u6DFB\u52A0\u9009\u9879"))),dn&&st.createElement("div",{onClick:()=>Ve(!0)},st.createElement(ft.default.Item,{name:Je,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},st.createElement(it.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Tn}))))}},81580:function(Cn,On,Me){"use strict";Me.d(On,{u:function(){return Mt}});var fe=Me(67294),Ke=Me(62844),St=Me(71230),zt=Me(15746),ft=Me(28802),Be=Me(83062),He=Me(59637),gt=Me(91773),it=Me(98813),st=Me(37720),Ft=Me(41307),Nt=Me(24018),Bt=Me(17663),Ae=Me(52654),ne=Me(35713),te=Me(67294),ue=Object.defineProperty,se=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,Se=Object.prototype.hasOwnProperty,Pe=Object.prototype.propertyIsEnumerable,Oe=(pt,dn,tn)=>dn in pt?ue(pt,dn,{enumerable:!0,configurable:!0,writable:!0,value:tn}):pt[dn]=tn,Re=(pt,dn)=>{for(var tn in dn||(dn={}))Se.call(dn,tn)&&Oe(pt,tn,dn[tn]);if(ve)for(var tn of ve(dn))Pe.call(dn,tn)&&Oe(pt,tn,dn[tn]);return pt},tt=(pt,dn)=>se(pt,pe(dn)),rt=(pt,dn)=>{var tn={};for(var vn in pt)Se.call(pt,vn)&&dn.indexOf(vn)<0&&(tn[vn]=pt[vn]);if(pt!=null&&ve)for(var vn of ve(pt))dn.indexOf(vn)<0&&Pe.call(pt,vn)&&(tn[vn]=pt[vn]);return tn};const Je=({value:pt,onChange:dn})=>{const tn=Tn=>{Ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const Ve=[...pt];Ve.splice(Tn,1),dn(Ve)}})},vn=()=>{const Tn=[...pt];Tn.push(""),dn(Tn)};return te.createElement(St.Z,{className:"ml20"},te.createElement(zt.Z,{flex:1},pt==null?void 0:pt.map((Tn,Ve)=>te.createElement(St.Z,{key:`${Tn}_${Ve}`,className:"mb20"},te.createElement(ft.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Tn,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ze=>{const Qe=[...pt],mn=Ze.target.value.trim();Qe[Ve]=mn,dn(Qe)}}),te.createElement(Be.Z,{title:"\u5220\u9664"},te.createElement(Nt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:Ve>0?"visible":"hidden"},onClick:()=>tn(Ve)}))))),te.createElement(zt.Z,null,te.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{vn()}},"\u65B0\u589E\u7B54\u6848")))},bt=({value:pt,onChange:dn})=>{const tn=Tn=>{Ke.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Ae.Z.modal,onOk:()=>{const Ve=[...pt];Ve.splice(Tn,1),dn(Ve)}})},vn=()=>{const Tn=[...pt];Tn.push(""),dn(Tn)};return te.createElement(St.Z,{className:"ml20"},te.createElement(zt.Z,{flex:1},pt==null?void 0:pt.map((Tn,Ve)=>te.createElement(St.Z,{key:`${Tn}_${Ve}`,align:"middle",className:"mb20"},te.createElement(ne.Z,{value:Tn,style:{flex:1},onChange:Ze=>{const Qe=[...pt];Qe[Ve]=Ze,dn(Qe)}}),te.createElement(Be.Z,{title:"\u5220\u9664"},te.createElement(Nt.Z,{className:Ae.Z.deleteIcon,style:{marginLeft:15,visibility:Ve>0?"visible":"hidden"},onClick:()=>tn(Ve)}))))),te.createElement(zt.Z,null,te.createElement("div",{className:`${Ae.Z.addBtn}`,onClick:()=>{vn()}},"\u65B0\u589E\u7B54\u6848")))},lt=({value:pt=!0,onChange:dn})=>te.createElement(He.Z,{checked:!pt,onChange:tn=>{dn(!tn)}}),Lt="\u2581",Mt=({questionTitlePlaceholder:pt,form:dn,scoreByBlank:tn=!1,answerKey:vn})=>{const[Tn,Ve]=(0,fe.useState)(!1),Ze=(Gt,mt)=>{const Et=mt.line;let on=0;for(let ze=0;ze<Et;ze++)on+=Gt.getLine(ze).split(Lt).length-1;const Yt=Gt.getLine(Et).substring(0,mt.ch);return on+=Yt.split(Lt).length-1,on},Qe=(Gt,mt,Et,on)=>{const Yt=Gt.getRange(mt.from,mt.to);let ze=0;if(mt.text.forEach(be=>{ze+=be.split(Lt).length-1}),mt.origin!=="setValue"){if(Yt&&Yt.indexOf(Lt)!==-1){const be=Yt.split(Lt).length-1,Ce=Ze(Gt,mt.from);if(console.log(`\u5220\u9664${be}\u4E2A\uFF0C \u524D\u9762\u6709${Ce}\u4E2A\uFF0C\u65B0\u589E${ze}\u4E2A`),be>1){const De=Array.from({length:be},(Ge,Fe)=>Ce+Fe);on(De)}else on(Ce)}else if(ze>0){const be=Ze(Gt,mt.from);console.log(`\u65B0\u589E${ze}\u4E2A\uFF0C\u4E4B\u524D\u6709${be}\u4E2A`),Et(ze,be)}}},mn=()=>{const Gt=dn.getFieldValue(vn);dn.setFieldsValue({[vn]:Gt.map((mt,Et)=>tt(Re({},mt),{position:Et+1}))})},kn=(0,fe.useRef)(),At=(Gt,mt)=>{for(let Et=0;Et<Gt;Et++)kn.current({position:null,answer_text:[""],model:1},mt+Et);mn()},pn=(0,fe.useRef)(),ln=Gt=>{pn.current(Gt),mn()},jn=gt.default.useWatch(vn,dn);return te.createElement("div",{className:Ae.Z.wrap},te.createElement("div",{className:Ae.Z.questionTitleEditorWrap},te.createElement(gt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},te.createElement(Ft.h,{scrollId:"name",watch:!0,height:140,placeholder:pt,showNullButton:!0,onCMBeforeChange:(Gt,mt)=>{Qe(Gt,mt,At,ln)}}))),te.createElement(gt.default.List,{name:vn,rules:[{validator(Gt,mt){if(!(mt!=null&&mt.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Et of mt){const{answer_text:on}=Et||{};if(on!=null&&on.some(Yt=>(Yt==null?void 0:Yt.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Gt,{add:mt,remove:Et},{errors:on})=>(kn.current=mt,pn.current=Et,te.createElement(te.Fragment,null,te.createElement(gt.default.Item,{label:te.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Gt!=null&&Gt.length)&&te.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Gt.map((Yt,ze)=>{var be=Yt,{key:Ce,name:De}=be,Ge=rt(be,["key","name"]),Fe,qe;return te.createElement("div",{style:{marginBottom:10},key:Ce},te.createElement(St.Z,{className:"mb20",align:"middle",wrap:!1},te.createElement(zt.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Ae.Z.blankIndex}`},"\u586B\u7A7A\u9879",ze+1),te.createElement(gt.default.Item,tt(Re({},Ge),{name:[De,"model"],noStyle:!0}),te.createElement(it.ZP.Group,{onChange:()=>{const rn=dn.getFieldValue(vn);dn.setFieldsValue({[vn]:rn.map((Kn,Zn)=>tt(Re({},Kn),{answer_text:De===Zn?[""]:Kn.answer_text}))})}},te.createElement(it.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",te.createElement(Be.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},te.createElement(Bt.Z,null))),te.createElement(it.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",te.createElement(Be.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},te.createElement(Bt.Z,null)))))),te.createElement(St.Z,{style:{marginLeft:20},align:"middle",wrap:!1},te.createElement(zt.Z,{flex:1},te.createElement(St.Z,{align:"top",justify:"space-between",wrap:!1},te.createElement(zt.Z,{flex:1},te.createElement(gt.default.Item,tt(Re({},Ge),{name:[De,"answer_text"],noStyle:!0}),((qe=(Fe=dn.getFieldValue(vn))==null?void 0:Fe[De])==null?void 0:qe.model)===1?te.createElement(Je,null):te.createElement(bt,null))),tn&&te.createElement(zt.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},te.createElement(gt.default.Item,tt(Re({},Ge),{name:[De,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ae.Z.blankInputNumberWrapper}),te.createElement(st.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),te.createElement(gt.default.Item,tt(Re({},Ge),{name:[De,"position"],noStyle:!0}),te.createElement(ft.default,{type:"hidden"})))))})))),te.createElement(St.Z,{align:"middle"},te.createElement(gt.default.Item,{name:"downcase",valuePropName:"checked"},te.createElement(He.Z,null)),te.createElement(zt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),te.createElement(St.Z,{align:"middle"},te.createElement(gt.default.Item,{name:"no_space",valuePropName:"checked"},te.createElement(He.Z,null)),te.createElement(zt.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(jn==null?void 0:jn.length)>1&&te.createElement(St.Z,{align:"middle",className:(jn==null?void 0:jn.length)>1?"mb30":`${Ae.Z.hide}`},te.createElement(gt.default.Item,{name:"is_ordered"},te.createElement(lt,null)),te.createElement(zt.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),te.createElement("div",{onClick:()=>Ve(!0)},te.createElement(gt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},te.createElement(Ft.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Tn}))))}},66495:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return ve}});var fe=Me(67294),Ke=Me(71230),St=Me(15746),zt=Me(91773),ft=Me(52654),Be=Me(41307),He=Me(67294),gt=Object.defineProperty,it=Object.defineProperties,st=Object.getOwnPropertyDescriptors,Ft=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Ae=(Se,Pe,Oe)=>Pe in Se?gt(Se,Pe,{enumerable:!0,configurable:!0,writable:!0,value:Oe}):Se[Pe]=Oe,ne=(Se,Pe)=>{for(var Oe in Pe||(Pe={}))Nt.call(Pe,Oe)&&Ae(Se,Oe,Pe[Oe]);if(Ft)for(var Oe of Ft(Pe))Bt.call(Pe,Oe)&&Ae(Se,Oe,Pe[Oe]);return Se},te=(Se,Pe)=>it(Se,st(Pe)),ue=(Se,Pe)=>{var Oe={};for(var Re in Se)Nt.call(Se,Re)&&Pe.indexOf(Re)<0&&(Oe[Re]=Se[Re]);if(Se!=null&&Ft)for(var Re of Ft(Se))Pe.indexOf(Re)<0&&Bt.call(Se,Re)&&(Oe[Re]=Se[Re]);return Oe};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},pe=({value:Se,onChange:Pe,form:Oe})=>{const Re=(Se==null?void 0:Se.is_answer)===1,tt=Se==null?void 0:Se.choice_text,rt=()=>{const Je=Oe.getFieldsValue().choices.map(bt=>({choice_text:bt.choice_text,is_answer:0}));Oe.setFieldsValue({choices:Je}),Pe(te(ne({},Se),{is_answer:1}))};return He.createElement(Ke.Z,{className:ft.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},He.createElement(St.Z,{onClick:rt,className:`${ft.Z.choiceIndex} ${ft.Z.judgementIndex} ${Re?ft.Z.activeAnswer:""}`},se[tt]),He.createElement(St.Z,{flex:1,className:`${ft.Z.editorWrap} ml15`},He.createElement("div",{className:`${ft.Z.inputBorder} ${ft.Z.placeholder} ${Re?ft.Z.activeJudgementAnswer:""}`},tt)),He.createElement(St.Z,{flex:"0 0 auto",className:"ml15"},He.createElement("div",{onClick:rt,className:`${ft.Z.setAnswerBtn} ${Re?ft.Z.activeAnswer:""}`},Re?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ve=({questionTitlePlaceholder:Se,choiceKey:Pe,form:Oe})=>{const[Re,tt]=(0,fe.useState)(!1);return He.createElement("div",{className:ft.Z.wrap},He.createElement("div",{className:ft.Z.questionTitleEditorWrap},He.createElement(zt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},He.createElement(Be.h,{scrollId:"name",watch:!0,height:140,placeholder:Se}))),He.createElement(zt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},He.createElement(zt.default.List,{name:"choices",rules:[{validator(rt,Je){return Je.some(lt=>(lt==null?void 0:lt.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},rt=>He.createElement("div",{id:"choices"},rt.map(Je=>{var bt=Je,{key:lt,name:Lt}=bt,Mt=ue(bt,["key","name"]);return He.createElement(zt.default.Item,te(ne({},Mt),{key:lt,name:Lt,noStyle:!0}),He.createElement(pe,{form:Oe}))})))),He.createElement("div",{onClick:()=>tt(!0)},He.createElement(zt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},He.createElement(Be.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Re}))))}},41307:function(Cn,On,Me){"use strict";Me.d(On,{h:function(){return ne},x:function(){return te}});var fe=Me(35567),Ke=Me(52654),St=Me(65226),zt=Me(67294),ft=Object.defineProperty,Be=Object.defineProperties,He=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,it=Object.prototype.hasOwnProperty,st=Object.prototype.propertyIsEnumerable,Ft=(ue,se,pe)=>se in ue?ft(ue,se,{enumerable:!0,configurable:!0,writable:!0,value:pe}):ue[se]=pe,Nt=(ue,se)=>{for(var pe in se||(se={}))it.call(se,pe)&&Ft(ue,pe,se[pe]);if(gt)for(var pe of gt(se))st.call(se,pe)&&Ft(ue,pe,se[pe]);return ue},Bt=(ue,se)=>Be(ue,He(se)),Ae=(ue,se)=>{var pe={};for(var ve in ue)it.call(ue,ve)&&se.indexOf(ve)<0&&(pe[ve]=ue[ve]);if(ue!=null&>)for(var ve of gt(ue))se.indexOf(ve)<0&&st.call(ue,ve)&&(pe[ve]=ue[ve]);return pe};const ne=ue=>{var se=ue,{value:pe,onChange:ve,scrollId:Se}=se,Pe=Ae(se,["value","onChange","scrollId"]);return zt.createElement("div",{id:Se||""},zt.createElement(fe.Z,Bt(Nt({},Pe),{defaultValue:pe,onChange:(Oe,Re)=>{Re!=null&&Re.length?ve(Oe,Re):ve(Oe)}})))},te=({value:ue,onChange:se,placeholder:pe,height:ve=140,isEdit:Se,miniToolbar:Pe,watch:Oe=!0})=>Se?zt.createElement(fe.Z,{watch:Oe,isFocus:!0,height:ve||void 0,placeholder:pe,defaultValue:ue,onChange:se,miniToolbar:Pe}):zt.createElement("div",{style:{cursor:"pointer"}},ue?zt.createElement(St.Z,{className:Ke.Z.inputBorder,value:ue}):zt.createElement("div",{className:`${Ke.Z.inputBorder} ${Ke.Z.placeholder} inputBorderError`},pe))},77792:function(Cn,On,Me){"use strict";Me.d(On,{W:function(){return bt}});var fe=Me(67294),Ke=Me(2453),St=Me(66309),zt=Me(91773),ft=Me(59637),Be=Me(71230),He=Me(15746),gt=Me(83062),it=Me(28802),st=Me(37720),Ft=Me(52654),Nt=Me(41307),Bt=Me(35567),Ae=Me(17663),ne=Object.defineProperty,te=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ve=Object.prototype.propertyIsEnumerable,Se=(lt,Lt,Mt)=>Lt in lt?ne(lt,Lt,{enumerable:!0,configurable:!0,writable:!0,value:Mt}):lt[Lt]=Mt,Pe=(lt,Lt)=>{for(var Mt in Lt||(Lt={}))pe.call(Lt,Mt)&&Se(lt,Mt,Lt[Mt]);if(se)for(var Mt of se(Lt))ve.call(Lt,Mt)&&Se(lt,Mt,Lt[Mt]);return lt},Oe=(lt,Lt)=>te(lt,ue(Lt)),Re=(lt,Lt)=>{var Mt={};for(var pt in lt)pe.call(lt,pt)&&Lt.indexOf(pt)<0&&(Mt[pt]=lt[pt]);if(lt!=null&&se)for(var pt of se(lt))Lt.indexOf(pt)<0&&ve.call(lt,pt)&&(Mt[pt]=lt[pt]);return Mt};const tt=lt=>{var Lt=lt,{value:Mt,onChange:pt}=Lt,dn=Re(Lt,["value","onChange"]);const tn=vn=>{pt([vn])};return fe.createElement(Bt.Z,Oe(Pe({},dn),{defaultValue:Mt==null?void 0:Mt[0],onChange:tn}))},rt=lt=>{if(!lt)return!1;if(/^s*$/.test(lt)||lt.trim()===""){Ke.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Lt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return lt==="|"?(Ke.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Je=({value:lt=[],onClose:Lt})=>fe.createElement(St.default,{closable:!0,onClose:Lt,className:Ft.Z.keywordTag},fe.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},lt.join(" \u6216 "))),bt=({questionTitlePlaceholder:lt,form:Lt,showKeywords:Mt,isMustKeyWords:pt=Mt})=>{const[dn,tn]=(0,fe.useState)(!1),[vn,Tn]=(0,fe.useState)(""),Ve=zt.default.useWatch("use_keywords",Lt),Ze=zt.default.useWatch("question_score",Lt);return fe.createElement("div",{className:Ft.Z.wrap},fe.createElement("div",{className:Ft.Z.questionTitleEditorWrap},fe.createElement(zt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},fe.createElement(Nt.h,{scrollId:"name",watch:!0,height:140,placeholder:lt}))),fe.createElement(zt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},fe.createElement(tt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Mt&&!pt&&fe.createElement(zt.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},fe.createElement(ft.Z,{defaultChecked:!0})),Mt&&pt&&fe.createElement(Be.Z,{align:"middle",className:"mb30"},fe.createElement(zt.default.Item,{name:"use_keywords",valuePropName:"checked"},fe.createElement(ft.Z,null)),fe.createElement(He.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),fe.createElement(He.Z,null,fe.createElement(gt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},fe.createElement(Ae.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Ve||!pt)&&fe.createElement(zt.default.List,{name:"keywords",rules:[{validator(Qe,mn){return pt?mn!=null&&mn.length?(mn==null?void 0:mn.reduce((At,pn)=>At+pn.score,0))>parseFloat(Ze)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Qe,{add:mn,remove:kn})=>fe.createElement(fe.Fragment,null,fe.createElement("div",{className:`${Ft.Z.title} mb10`},pt?"\u5173\u952E\u8BCD":fe.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),fe.createElement(Be.Z,{align:"middle",className:"font14 mb30"},fe.createElement(He.Z,{flex:1},fe.createElement(it.default,{value:vn,onChange:At=>{Tn(At.target.value)},maxLength:50,allowClear:!0,onPressEnter:At=>{var pn,ln,jn,Gt;const mt=`${(pn=At.target)==null?void 0:pn.value}`,Et=(jn=(ln=mt==null?void 0:mt.split("|"))==null?void 0:ln.filter(ze=>!!ze))==null?void 0:jn.map(ze=>ze==null?void 0:ze.trim()),on=Lt.getFieldValue("keywords"),Yt=((Gt=on==null?void 0:on.map(ze=>ze==null?void 0:ze.keyword))==null?void 0:Gt.flat())||[];for(const ze of Et)if(Yt.includes(ze)){Ke.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}rt(mt)&&(mn({keyword:Et,score:1}),Tn(""))},className:Ft.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),fe.createElement(He.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Qe.map(At=>{var pn=At,{key:ln,name:jn}=pn,Gt=Re(pn,["key","name"]);return fe.createElement(Be.Z,{key:ln,className:"mb20",style:{marginRight:148}},fe.createElement(He.Z,{flex:1},fe.createElement(Be.Z,{align:"middle",justify:"space-between"},fe.createElement(zt.default.Item,Oe(Pe({},Gt),{name:[jn,"keyword"]}),fe.createElement(Je,{onClose:()=>kn(jn)})),pt&&fe.createElement(zt.default.Item,Oe(Pe({},Gt),{name:[jn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ft.Z.blankInputNumberWrapper}),fe.createElement(st.Z,{className:Ft.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),fe.createElement("div",{onClick:()=>tn(!0)},fe.createElement(zt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},fe.createElement(Nt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:dn}))))}},30351:function(Cn,On,Me){"use strict";Me.d(On,{tc:function(){return mo.t},uh:function(){return fe.u},rL:function(){return lr},u8:function(){return St.u},ZZ:function(){return Ke.Z},Wk:function(){return zt.W}});var fe=Me(11776),Ke=Me(66495),St=Me(81580),zt=Me(77792),ft=Me(67294),Be=Me(69234),He=Me(91773),gt=Me(71230),it=Me(15746),st=Me(37720),Ft=Me(83062),Nt=Me(85418),Bt=Me(52654),Ae=Me(24018),ne=Me(41307),te=Me(62844),ue=Me(28802),se=Me(59637),pe=Me(67294),ve=Object.defineProperty,Se=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,rt=(pi,ti,hi)=>ti in pi?ve(pi,ti,{enumerable:!0,configurable:!0,writable:!0,value:hi}):pi[ti]=hi,Je=(pi,ti)=>{for(var hi in ti||(ti={}))Re.call(ti,hi)&&rt(pi,hi,ti[hi]);if(Oe)for(var hi of Oe(ti))tt.call(ti,hi)&&rt(pi,hi,ti[hi]);return pi},bt=(pi,ti)=>Se(pi,Pe(ti)),lt=(pi,ti)=>{var hi={};for(var Ii in pi)Re.call(pi,Ii)&&ti.indexOf(Ii)<0&&(hi[Ii]=pi[Ii]);if(pi!=null&&Oe)for(var Ii of Oe(pi))ti.indexOf(Ii)<0&&tt.call(pi,Ii)&&(hi[Ii]=pi[Ii]);return hi};const Lt=({value:pi,onChange:ti})=>{const hi=ir=>{te.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Bt.Z.modal,onOk:()=>{const zi=[...pi];zi.splice(ir,1),ti(zi)}})},Ii=()=>{const ir=[...pi];ir.push(""),ti(ir)};return pe.createElement(gt.Z,{className:"ml20"},pe.createElement(it.Z,{flex:1},pi==null?void 0:pi.map((ir,zi)=>pe.createElement(gt.Z,{key:`${ir}_${zi}`,align:"middle",className:"mb20"},pe.createElement(ue.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:ir,autoSize:{maxRows:3},maxLength:1e3,onBlur:an=>{const we=[...pi],Ut=an.target.value.trim();we[zi]=Ut,ti(we)}}),pe.createElement(Ft.Z,{title:"\u5220\u9664"},pe.createElement(Ae.Z,{className:Bt.Z.deleteIcon,style:{marginLeft:15,visibility:zi>0?"visible":"hidden"},onClick:()=>hi(zi)}))))),pe.createElement(it.Z,null,pe.createElement("div",{className:`${Bt.Z.addBtn}`,onClick:()=>{Ii()}},"\u65B0\u589E\u7B54\u6848")))},Mt=({value:pi=!0,onChange:ti})=>pe.createElement(se.Z,{checked:!pi,onChange:hi=>{ti(!hi)}}),pt="\u2581",dn=({questionTitlePlaceholder:pi,form:ti,name:hi,scoreByBlank:Ii=!1,answerKey:ir,titleKey:zi="name",analysisKey:an="analysis",isOrdered:we="is_ordered"})=>{var Ut,en;const[cn,xn]=(0,ft.useState)(!1),In=(Xn,_n)=>{const It=_n.line;let hn=0;for(let Ri=0;Ri<It;Ri++)hn+=Xn.getLine(Ri).split(pt).length-1;const Ci=Xn.getLine(It).substring(0,_n.ch);return hn+=Ci.split(pt).length-1,hn},ni=(Xn,_n,It,hn)=>{const Ci=Xn.getRange(_n.from,_n.to);let Ri=0;if(_n.text.forEach(Ln=>{Ri+=Ln.split(pt).length-1}),_n.origin!=="setValue"){if(Ci&&Ci.indexOf(pt)!==-1){const Ln=Ci.split(pt).length-1,Rt=In(Xn,_n.from);if(console.log(`\u5220\u9664${Ln}\u4E2A\uFF0C \u524D\u9762\u6709${Rt}\u4E2A\uFF0C\u65B0\u589E${Ri}\u4E2A`),Ln>1){const Si=Array.from({length:Ln},(Zi,Wr)=>Rt+Wr);hn(Si)}else hn(Rt)}else if(Ri>0){const Ln=In(Xn,_n.from);console.log(`\u65B0\u589E${Ri}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ln}\u4E2A`),It(Ri,Ln)}}},Ui=()=>{const Xn=ti.getFieldValue(["sub_item_banks",...ir]);ti.setFieldValue(["sub_item_banks",...ir],Xn==null?void 0:Xn.map((_n,It)=>bt(Je({},_n),{position:It+1})))},Ot=(0,ft.useRef)(),_t=(Xn,_n)=>{for(let It=0;It<Xn;It++)Ot.current({position:null,answer_text:[""]},_n+It);Ui()},Ct=(0,ft.useRef)(),Jt=Xn=>{Ct.current(Xn),Ui()},ci=(en=(Ut=ti.getFieldValue("sub_item_banks"))==null?void 0:Ut[ir==null?void 0:ir[0]])==null?void 0:en[ir==null?void 0:ir[1]];return(0,ft.useEffect)(()=>{console.log("========",ti.getFieldsValue())},[ti]),pe.createElement("div",{className:Bt.Z.wrap},pe.createElement("div",{className:Bt.Z.questionTitleEditorWrap},pe.createElement(He.default.Item,{label:"\u9898\u5E72",name:zi,labelCol:{span:24},rules:[{required:!0}]},pe.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:pi,showNullButton:!0,onCMBeforeChange:(Xn,_n)=>{ni(Xn,_n,_t,Jt)}}))),pe.createElement(He.default.List,{name:ir,rules:[{validator(Xn,_n){if((_n==null?void 0:_n.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const It of _n){const{answer_text:hn}=It||{};if(hn!=null&&hn.some(Ci=>(Ci==null?void 0:Ci.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Xn,{add:_n,remove:It},{errors:hn})=>(Ot.current=_n,Ct.current=It,pe.createElement(pe.Fragment,null,pe.createElement(He.default.Item,{label:pe.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Xn!=null&&Xn.length)&&pe.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),Xn.map((Ci,Ri)=>{var Ln=Ci,{key:Rt,name:Si}=Ln,Zi=lt(Ln,["key","name"]);return pe.createElement(gt.Z,{align:"top",key:Rt},pe.createElement(it.Z,{className:`${Bt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",Ri+1),pe.createElement(it.Z,{flex:1},pe.createElement(gt.Z,{align:"top",justify:"space-between"},pe.createElement(it.Z,{flex:1},pe.createElement(He.default.Item,bt(Je({},Zi),{name:[Si,"answer_text"],noStyle:!0}),pe.createElement(Lt,null))),Ii&&pe.createElement(it.Z,{flex:"224px"},pe.createElement(He.default.Item,bt(Je({},Zi),{name:[Si,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Bt.Z.blankInputNumberWrapper}),pe.createElement(st.Z,{className:Bt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),pe.createElement(He.default.Item,bt(Je({},Zi),{name:[Si,"position"],noStyle:!0}),pe.createElement(ue.default,{type:"hidden"}))))})))),pe.createElement(gt.Z,{align:"middle"},pe.createElement(He.default.Item,{name:[hi,"downcase"],valuePropName:"checked"},pe.createElement(se.Z,null)),pe.createElement(it.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),pe.createElement(gt.Z,{align:"middle"},pe.createElement(He.default.Item,{name:[hi,"no_space"],valuePropName:"checked"},pe.createElement(se.Z,null)),pe.createElement(it.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(ci==null?void 0:ci.length)>1&&pe.createElement(gt.Z,{align:"middle",className:(ci==null?void 0:ci.length)>1?"mb30":`${Bt.Z.hide}`},pe.createElement(He.default.Item,{name:we},pe.createElement(Mt,null)),pe.createElement(it.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),pe.createElement("div",{className:"mt30",onClick:()=>xn(!0)},pe.createElement(He.default.Item,{name:an,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},pe.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:cn}))))};var tn=Me(67294),vn=Object.defineProperty,Tn=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,Ze=Object.getOwnPropertySymbols,Qe=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,kn=(pi,ti,hi)=>ti in pi?vn(pi,ti,{enumerable:!0,configurable:!0,writable:!0,value:hi}):pi[ti]=hi,At=(pi,ti)=>{for(var hi in ti||(ti={}))Qe.call(ti,hi)&&kn(pi,hi,ti[hi]);if(Ze)for(var hi of Ze(ti))mn.call(ti,hi)&&kn(pi,hi,ti[hi]);return pi},pn=(pi,ti)=>Tn(pi,Ve(ti)),ln=(pi,ti)=>{var hi={};for(var Ii in pi)Qe.call(pi,Ii)&&ti.indexOf(Ii)<0&&(hi[Ii]=pi[Ii]);if(pi!=null&&Ze)for(var Ii of Ze(pi))ti.indexOf(Ii)<0&&mn.call(pi,Ii)&&(hi[Ii]=pi[Ii]);return hi};const jn={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Gt=({value:pi,onChange:ti,form:hi,choiceKey:Ii})=>{const ir=(pi==null?void 0:pi.is_answer)===1,zi=pi==null?void 0:pi.choice_text,an=()=>{var we;const Ut=(we=hi==null?void 0:hi.getFieldValue(["sub_item_banks",...Ii]))==null?void 0:we.map(en=>({choice_text:en.choice_text,is_answer:0}));hi==null||hi.setFieldValue(["sub_item_banks",...Ii],Ut),ti(pn(At({},pi),{is_answer:1}))};return tn.createElement(gt.Z,{className:Bt.Z.choiceWrap,align:"middle",wrap:!1},tn.createElement(it.Z,{onClick:an,className:`${Bt.Z.choiceIndex} ${Bt.Z.judgementIndex} ${ir?Bt.Z.activeAnswer:""}`},jn[zi]),tn.createElement(it.Z,{flex:1,className:`${Bt.Z.editorWrap} ml15`},tn.createElement("div",{className:`${Bt.Z.inputBorder} ${Bt.Z.placeholder} ${ir?Bt.Z.activeJudgementAnswer:""}`},zi)),tn.createElement(it.Z,{flex:"0 0 auto",className:"ml15"},tn.createElement("div",{onClick:an,className:`${Bt.Z.setAnswerBtn} ${ir?Bt.Z.activeAnswer:""}`},ir?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},mt=({questionTitlePlaceholder:pi,choiceKey:ti="choices",form:hi,titleKey:Ii="name",analysisKey:ir="analysis"})=>{const[zi,an]=(0,ft.useState)(!1);return tn.createElement("div",{className:Bt.Z.wrap},tn.createElement("div",{className:Bt.Z.questionTitleEditorWrap},tn.createElement(He.default.Item,{label:"\u9898\u5E72",name:Ii,labelCol:{span:24},rules:[{required:!0}]},tn.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),tn.createElement(He.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},tn.createElement(He.default.List,{name:ti,rules:[{validator(we,Ut){return Ut.some(cn=>(cn==null?void 0:cn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},we=>tn.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},we.map(Ut=>{var en=Ut,{key:cn,name:xn}=en,In=ln(en,["key","name"]);return tn.createElement(He.default.Item,pn(At({},In),{key:cn,name:xn,noStyle:!0}),tn.createElement(Gt,{form:hi,choiceKey:ti}))})))),tn.createElement("div",{className:"mt30",onClick:()=>an(!0)},tn.createElement(He.default.Item,{name:ir,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},tn.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:zi}))))};var Et=Me(2453),on=Me(66309),Yt=Me(35567),ze=Me(17663),be=Object.defineProperty,Ce=Object.defineProperties,De=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,rn=(pi,ti,hi)=>ti in pi?be(pi,ti,{enumerable:!0,configurable:!0,writable:!0,value:hi}):pi[ti]=hi,Kn=(pi,ti)=>{for(var hi in ti||(ti={}))Fe.call(ti,hi)&&rn(pi,hi,ti[hi]);if(Ge)for(var hi of Ge(ti))qe.call(ti,hi)&&rn(pi,hi,ti[hi]);return pi},Zn=(pi,ti)=>Ce(pi,De(ti)),$t=(pi,ti)=>{var hi={};for(var Ii in pi)Fe.call(pi,Ii)&&ti.indexOf(Ii)<0&&(hi[Ii]=pi[Ii]);if(pi!=null&&Ge)for(var Ii of Ge(pi))ti.indexOf(Ii)<0&&qe.call(pi,Ii)&&(hi[Ii]=pi[Ii]);return hi};const Nn=pi=>{var ti=pi,{value:hi,onChange:Ii}=ti,ir=$t(ti,["value","onChange"]);const zi=an=>{Ii([an])};return ft.createElement(Yt.Z,Zn(Kn({},ir),{defaultValue:hi==null?void 0:hi[0],onChange:zi}))},Zt=pi=>{if(!pi)return!1;let ti=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return pi==="|"?(Et.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},qn=({value:pi=[],onClose:ti})=>ft.createElement(on.default,{closable:!0,onClose:ti,className:Bt.Z.keywordTag},ft.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},pi.join(" \u6216 "))),$n=({questionTitlePlaceholder:pi,form:ti,showKeywords:hi,isMustKeyWords:Ii=hi,titleKey:ir="name",analysisKey:zi="analysis",answerTexts:an="answer_texts",keywords:we="keywords",useKeywords:Ut="use_keywords",indexs:en})=>{const[cn,xn]=(0,ft.useState)(!1),[In,ni]=(0,ft.useState)(""),[Ui,Ot]=(0,ft.useState)(!1),_t=He.default.useWatch("question_score",ti);return ft.createElement("div",{className:Bt.Z.wrap},ft.createElement("div",{className:Bt.Z.questionTitleEditorWrap},ft.createElement(He.default.Item,{label:"\u9898\u5E72",name:ir,labelCol:{span:24},rules:[{required:!0}]},ft.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),ft.createElement(He.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:an,labelCol:{span:24}},ft.createElement(Nn,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),hi&&!Ii&&ft.createElement(He.default.Item,{hidden:!0,name:Ut,valuePropName:"checked"},ft.createElement(se.Z,{defaultChecked:!0})),hi&&Ii&&ft.createElement(gt.Z,{align:"middle",className:"mb30"},ft.createElement(He.default.Item,{name:Ut,valuePropName:"checked"},ft.createElement(se.Z,{onChange:()=>{var Ct,Jt,ci,Xn,_n,It;console.log(ti.getFieldsValue()),Ot((ci=(Jt=(Ct=ti.getFieldsValue())==null?void 0:Ct.sub_item_banks)==null?void 0:Jt[en])==null?void 0:ci.use_keywords),console.log((It=(_n=(Xn=ti.getFieldsValue())==null?void 0:Xn.sub_item_banks)==null?void 0:_n[en])==null?void 0:It.use_keywords),console.log(Ui)}})),ft.createElement(it.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),ft.createElement(it.Z,null,ft.createElement(Ft.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},ft.createElement(ze.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Ui||!Ii)&&ft.createElement(He.default.List,{name:we,rules:[{validator(Ct,Jt){return Ii?Jt!=null&&Jt.length?(Jt==null?void 0:Jt.reduce((Xn,_n)=>Xn+_n.score,0))>parseFloat(_t)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(Ct,{add:Jt,remove:ci})=>ft.createElement(ft.Fragment,null,ft.createElement("div",{className:`${Bt.Z.title} mb10`},Ii?"\u5173\u952E\u8BCD":ft.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),ft.createElement(gt.Z,{align:"middle",className:"font14 mb30"},ft.createElement(it.Z,{flex:1},ft.createElement(ue.default,{value:In,onChange:Xn=>{ni(Xn.target.value)},maxLength:50,allowClear:!0,onPressEnter:Xn=>{var _n,It,hn,Ci;const Ri=`${(_n=Xn.target)==null?void 0:_n.value}`,Ln=(hn=(It=Ri==null?void 0:Ri.split("|"))==null?void 0:It.filter(Zi=>!!Zi))==null?void 0:hn.map(Zi=>Zi==null?void 0:Zi.trim()),Rt=ti.getFieldValue(["sub_item_banks",...we]),Si=((Ci=Rt==null?void 0:Rt.map(Zi=>Zi==null?void 0:Zi.keyword))==null?void 0:Ci.flat())||[];for(const Zi of Ln)if(Si.includes(Zi)){Et.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Zt(Ri)&&(Jt({keyword:Ln,score:1}),ni(""))},className:Bt.Z.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),ft.createElement(it.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Ct.map(Xn=>{var _n=Xn,{key:It,name:hn}=_n,Ci=$t(_n,["key","name"]);return ft.createElement(gt.Z,{key:It,className:"mb20",style:{marginRight:148}},ft.createElement(it.Z,{flex:1},ft.createElement(gt.Z,{align:"middle",justify:"space-between"},ft.createElement(He.default.Item,Zn(Kn({},Ci),{name:[hn,"keyword"]}),ft.createElement(qn,{onClose:()=>ci(hn)})),Ii&&ft.createElement(He.default.Item,Zn(Kn({},Ci),{name:[hn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Bt.Z.blankInputNumberWrapper}),ft.createElement(st.Z,{className:Bt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),ft.createElement("div",{onClick:()=>xn(!0)},ft.createElement(He.default.Item,{name:zi,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ft.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:cn}))))};var oi=Me(67294),ri=Object.defineProperty,fr=Object.defineProperties,wr=Object.getOwnPropertyDescriptors,Li=Object.getOwnPropertySymbols,Ai=Object.prototype.hasOwnProperty,Ur=Object.prototype.propertyIsEnumerable,Yn=(pi,ti,hi)=>ti in pi?ri(pi,ti,{enumerable:!0,configurable:!0,writable:!0,value:hi}):pi[ti]=hi,Rn=(pi,ti)=>{for(var hi in ti||(ti={}))Ai.call(ti,hi)&&Yn(pi,hi,ti[hi]);if(Li)for(var hi of Li(ti))Ur.call(ti,hi)&&Yn(pi,hi,ti[hi]);return pi},sr=(pi,ti)=>fr(pi,wr(ti)),xr=(pi,ti)=>{var hi={};for(var Ii in pi)Ai.call(pi,Ii)&&ti.indexOf(Ii)<0&&(hi[Ii]=pi[Ii]);if(pi!=null&&Li)for(var Ii of Li(pi))ti.indexOf(Ii)<0&&Ur.call(pi,Ii)&&(hi[Ii]=pi[Ii]);return hi};const{Panel:Ni}=Be.default,lr=({questionTitlePlaceholder:pi,choiceKey:ti,form:hi,withScore:Ii})=>{const[ir,zi]=(0,ft.useState)([]),an=we=>{zi(we)};return oi.createElement("div",{className:Bt.Z.wrap},oi.createElement("div",{className:Bt.Z.questionTitleEditorWrap},oi.createElement(He.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},oi.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:pi}))),oi.createElement(He.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),oi.createElement(He.default.List,{name:"sub_item_banks",rules:[{validator(we,Ut){return Ut?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(we,{add:Ut,remove:en,move:cn})=>{const xn=hi.getFieldValue("sub_item_banks");return oi.createElement(oi.Fragment,null,oi.createElement(Be.default,{className:we.length>0?Bt.Z.collapseWrapper:"",bordered:!1,activeKey:ir,onChange:an,expandIcon:({isActive:In})=>oi.createElement("i",{className:`iconfont icon-weizhankai ${In?Bt.Z.open:Bt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},we.map((In,ni)=>{var Ui=In,{key:Ot,name:_t}=Ui,Ct=xr(Ui,["key","name"]),Jt,ci,Xn,_n,It,hn,Ci,Ri,Ln,Rt;return oi.createElement(Ni,{className:Bt.Z.panel,forceRender:!0,header:oi.createElement("div",{className:Bt.Z.panelHeader},"\u7B2C",ni+1,"\u5C0F\u9898",oi.createElement("span",null,"\uFF08",((Jt=xn==null?void 0:xn[_t])==null?void 0:Jt.item_type)=="SINGLE"?"\u5355\u9009\u9898":((ci=xn==null?void 0:xn[_t])==null?void 0:ci.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((Xn=xn==null?void 0:xn[_t])==null?void 0:Xn.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((_n=xn==null?void 0:xn[_t])==null?void 0:_n.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:_t,extra:oi.createElement(gt.Z,{align:"middle",onClick:Si=>Si.stopPropagation()},Ii&&oi.createElement(it.Z,null,oi.createElement(He.default.Item,sr(Rn({},Ct),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[_t,"question_score"],className:Bt.Z.blankInputNumberWrapper}),oi.createElement(st.Z,{className:Bt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),oi.createElement(it.Z,null,oi.createElement(gt.Z,{align:"middle",className:"pl40",justify:"end"},ni!==0&&oi.createElement("div",{onClick:()=>{var Si;cn(ni,ni-1);const Zi=(Si=hi.getFieldValue("sub_item_banks"))==null?void 0:Si.map((Wr,En)=>(we.map((li,bo)=>{En===bo&&(Wr.q_position=Number(li.name)+1)}),Wr));hi.setFieldValue("sub_item_banks",Zi)}},oi.createElement(Ft.Z,{title:"\u4E0A\u79FB"},oi.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),ni<we.length-1&&oi.createElement("div",{onClick:()=>{var Si;cn(ni,ni+1);const Zi=(Si=hi.getFieldValue("sub_item_banks"))==null?void 0:Si.map((Wr,En)=>(we.map((li,bo)=>{En===bo&&(Wr.q_position=Number(li.name)+1)}),Wr));hi.setFieldValue("sub_item_banks",Zi)},className:ni===0?"":"ml15"},oi.createElement(Ft.Z,{title:"\u4E0B\u79FB"},oi.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),oi.createElement(it.Z,null,oi.createElement(Ft.Z,{title:"\u5220\u9664"},oi.createElement(Ae.Z,{className:`${Bt.Z.deleteIcon} ml15`,onClick:()=>en(_t)}))))},oi.createElement(He.default.Item,sr(Rn({},Ct),{name:_t}),(((It=xn==null?void 0:xn[_t])==null?void 0:It.item_type)=="SINGLE"||((hn=xn==null?void 0:xn[_t])==null?void 0:hn.item_type)=="MULTIPLE")&&oi.createElement(fe.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Ci=xn==null?void 0:xn[_t])==null?void 0:Ci.item_type)=="MULTIPLE",form:hi,choiceKey:[_t,"choices"],titleKey:[_t,"name"],analysisKey:[_t,"analysis"],choiceOptionsPath:["sub_item_banks",_t,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((Ri=xn==null?void 0:xn[_t])==null?void 0:Ri.item_type)=="COMPLETION"&&oi.createElement(dn,{form:hi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:_t,titleKey:[_t,"name"],analysisKey:[_t,"analysis"],isOrdered:[_t,"is_ordered"],answerKey:[_t,"standard_answers"]}),((Ln=xn==null?void 0:xn[_t])==null?void 0:Ln.item_type)=="JUDGMENT"&&oi.createElement(mt,{form:hi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[_t,"name"],analysisKey:[_t,"analysis"],choiceKey:[_t,"choices"]}),((Rt=xn==null?void 0:xn[_t])==null?void 0:Rt.item_type)=="SUBJECTIVE"&&oi.createElement($n,{showKeywords:!0,isMustKeyWords:!1,form:hi,titleKey:[_t,"name"],analysisKey:[_t,"analysis"],answerTexts:[_t,"answer_texts"],useKeywords:[_t,"use_keywords"],keywords:[_t,"keywords"],indexs:_t,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),we.length<20&&oi.createElement(Nt.Z,{menu:{items:[{label:oi.createElement("div",{onClick:()=>{Ut({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),zi([we==null?void 0:we.length,...ir])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:oi.createElement("div",{onClick:()=>{Ut({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),zi([we==null?void 0:we.length,...ir])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:oi.createElement("div",{onClick:()=>{Ut({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),zi([we==null?void 0:we.length,...ir])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:oi.createElement("div",{onClick:()=>{Ut({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),zi([we==null?void 0:we.length,...ir])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:oi.createElement("div",{onClick:()=>{Ut({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),zi([we==null?void 0:we.length,...ir])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(In=>In.show).map(In=>({label:In.label,key:In.key}))}},oi.createElement("div",{className:`${Bt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var mo=Me(15312)},65226:function(Cn,On,Me){"use strict";Me.d(On,{z:function(){return rt},Z:function(){return Je}});var fe=Me(67294),Ke=Me(81897),St=Me(51161),zt=Me(11771),ft=Me(67631),Be=Me.n(ft),He=Me(11320),gt=Me(28706),it=Me(20527),st=Me(25934),Ft=Me(20819),Nt=Me(67294),Ae=({html:bt})=>{const lt=(0,fe.useRef)(null),Lt=(0,fe.useRef)(null),Mt=`.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,fe.useEffect)(()=>{const pt=lt.current.attachShadow({mode:"open"});Lt.current=document.createElement("div"),Lt.current.className="markdown-body",Lt.current.innerHTML=bt,pt.appendChild(Lt.current);const dn=document.createElement("style");return dn.textContent=Mt,pt.appendChild(dn),()=>{pt.innerHTML=""}},[]),(0,fe.useEffect)(()=>{Lt.current&&(Lt.current.innerHTML=bt)},[bt]),Nt.createElement("div",{ref:lt})};function ne(bt){const lt=["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"],Lt=new RegExp(`\\b(${lt.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return bt.replace(Lt,"").trim()}var te=Object.defineProperty,ue=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,ve=(bt,lt,Lt)=>lt in bt?te(bt,lt,{enumerable:!0,configurable:!0,writable:!0,value:Lt}):bt[lt]=Lt,Se=(bt,lt)=>{for(var Lt in lt||(lt={}))se.call(lt,Lt)&&ve(bt,Lt,lt[Lt]);if(ue)for(var Lt of ue(lt))pe.call(lt,Lt)&&ve(bt,Lt,lt[Lt]);return bt};const Pe="@\u2581\u2581@",Oe="@\u2581@",Re=/<pre[^>]*>/g;function tt(bt){let lt=document.createElement("div");return lt.innerHTML=bt,lt.childNodes.length===0?"":lt.childNodes[0].nodeValue}const rt=(bt,lt)=>{bt=bt||"";const Lt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Mt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,pt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,dn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return lt?bt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Lt,(tn,vn,Tn,Ve,Ze,Qe,mn)=>{const kn=vn||Ve||Qe,At=Tn||Ze||mn||"?";return He.Z.API_SERVER+"/api/attachments/"+kn+At+"&t="+(0,gt.Jn)(kn,Date.now())+(tn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(bt=bt.replace(dn,(tn,vn,Tn,Ve,Ze,Qe,mn)=>{const kn=vn||Ve||Qe,At=Tn||Ze||mn||"?";return He.Z.API_SERVER+"/attachments/download/"+kn+At+"&t="+(0,gt.Jn)(kn,Date.now())+(tn.indexOf(")")>-1?")":"&")}).replace(Lt,(tn,vn,Tn,Ve,Ze,Qe,mn)=>{const kn=vn||Ve||Qe,At=Tn||Ze||mn||"?";return He.Z.API_SERVER+"/api/attachments/"+kn+At+"&t="+(0,gt.Jn)(kn,Date.now())+(tn.indexOf(")")>-1?")":"&")}).replace(Mt,(tn,vn,Tn,Ve,Ze)=>{const Qe=vn||Ve,mn=Tn||Ze||"";return'"'+He.Z.API_SERVER+"/api/attachments/"+Qe+mn+Qe+mn+"&t="+(0,gt.Jn)(Qe,Date.now())}).replace(pt,(tn,vn,Tn,Ve,Ze)=>{const Qe=vn||Ve,mn=Tn||Ze||"";return"("+He.Z.API_SERVER+"/files/uploads/"+Qe+mn+Qe+mn+"&t="+(0,gt.Jn)(Qe,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,`
|
|
`),bt)};var Je=({value:bt="",className:lt,showTextOnly:Lt,showLines:Mt,style:pt={},stylesPrev:dn={},highlightKeywords:tn,showProgramFill:vn,isProgramFill:Tn,disabledFill:Ve=!1,programFillValue:Ze,onFillChange:Qe=At=>{},onFillBlur:mn=()=>{},onFillFocus:kn=()=>{}})=>{let At=ne(String(bt||""));const[pn,ln]=(0,fe.useState)(""),[jn,Gt]=(0,fe.useState)("office"),[mt,Et]=(0,fe.useState)([]),on=(0,fe.useRef)("a"+(0,st.Z)()),Yt={},ze=Zt=>/<style[\s\S]*?>/i.test(Zt||""),be=(Zt,qn,$n)=>{const oi=document.createElement(Zt===Oe?"input":"textarea");oi.style.width="100%",oi.style.height=Zt===Oe?"40px":"151px",oi.rows=5,oi.spellcheck=!1,oi.name="edu-program-fill",oi.placeholder="\u8BF7\u8F93\u5165",oi.dataset.id=qn;const ri=Object.keys(Yt).length;return Yt[ri]=oi,`<span class="edu-program-fill-wrap ${Zt===Oe?"":"show"}" style="width:${Zt===Oe?"600px":"100%"}" title=${$n||""}><span>${oi.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ce(Zt){return Zt=Zt.replace(/!\[.*?\]\(.*?\)/g,""),Zt=Zt.replace(/\[.*?\]\(.*?\)/g,""),Zt=Zt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Zt=Zt.replace(/<embed.*?>/g,""),Zt=Zt.replace(/<img.*?>/g,""),Zt=Zt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Zt=Zt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Zt=Zt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Zt=Zt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Zt}const De=Zt=>!Lt&&ze(At)?Zt:Zt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(qn,$n){let oi=$n.replace(/(\n|\r)/g,"").split("}"),ri=[];return oi.map(fr=>{fr!=""&&ri.push(`.${on.current} ${fr}`)}),`<style>${ri.join("}")}</style>`}),Ge=(0,fe.useMemo)(()=>{try{const oi=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,ri=/\"\/api\/attachments\/|\"\/attachments\/download\//g,fr=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,wr=/\(\/attachments\/download\//g;At=At.replace(wr,"("+He.Z.API_SERVER+"/attachments/download/").replace(oi,"("+He.Z.API_SERVER+"/api/attachments/").replace(ri,'"'+He.Z.API_SERVER+"/api/attachments/").replace(fr,'"'+He.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(oi){}if(vn){let oi=-1;return At=At.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(ri,fr,wr){var Li;return++oi,be(ri,oi,(Li=Ze==null?void 0:Ze[oi])==null?void 0:Li.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${De(At||"")}</pre>`}let Zt=De(At);Zt=(0,St.ZP)(Zt);const qn=(0,St.ez)();At.match(/\[TOC\]/)&&(Zt=Zt.replace("<p>[TOC]</p>",(0,St.Qv)()),(0,St.Iy)()),Zt=Zt.replace(/(__special_katext_id_\d+__)/g,(oi,ri)=>{const{type:fr,expression:wr}=qn[ri];return(0,it.renderToString)(tt(wr)||"",{displayMode:fr==="block",throwOnError:!1,output:"html"})}),Zt=Zt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,St.AL)();const $n=document.createElement("div");if($n.innerHTML=Zt,Lt)return $n.innerText;if(tn){const oi=tn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Kn($n,oi),$n.innerHTML}return setTimeout(()=>Nn(),500),$n.innerHTML},[At,tn]);(0,fe.useEffect)(()=>{Zn.current&&Zn.current.querySelectorAll(["input","textarea"]).forEach(qn=>{qn.oninput=Fe,qn.onblur=qe,qn.onfocus=rn})},[mt]),(0,fe.useEffect)(()=>{var Zt,qn,$n,oi,ri;if(Ze!=null&&Ze.length)try{const fr=Zn.current.querySelectorAll(".edu-program-fill-score"),wr=Zn.current.querySelectorAll('[name="edu-program-fill"]');for(const[Li,Ai]of wr.entries())Ai.value=((Zt=Ze==null?void 0:Ze[Li])==null?void 0:Zt.value)||"",((qn=Ze==null?void 0:Ze[Li])==null?void 0:qn.type)==="warning"?Ai.className="program-fill-warning":(($n=Ze==null?void 0:Ze[Li])==null?void 0:$n.type)==="success"?Ai.className="program-fill-success":Ai.className="";for(const[Li,Ai]of fr.entries())Ai.innerHTML=(oi=Ze==null?void 0:Ze[Li])!=null&&oi.score?`${(ri=Ze==null?void 0:Ze[Li])==null?void 0:ri.score}\u5206`:"";Et(Ze)}catch(fr){console.log(fr,"error")}},[Ze]);const Fe=Zt=>{mt[Zt.target.dataset.id]=mt[Zt.target.dataset.id]||{},mt[Zt.target.dataset.id].value=Zt.target.value,Et([...mt]),Qe(mt,Zt.target.dataset.id)},qe=Zt=>{mt[Zt.target.dataset.id]=mt[Zt.target.dataset.id]||{},mt[Zt.target.dataset.id].value=Zt.target.value,Et([...mt]),mn(mt,Zt.target.dataset.id)},rn=Zt=>{mt[Zt.target.dataset.id]=mt[Zt.target.dataset.id]||{},mt[Zt.target.dataset.id].value=Zt.target.value,Et([...mt]),kn(mt,Zt.target.dataset.id)};function Kn(Zt,qn){return Zt.childNodes.forEach($n=>{var oi;if($n.childNodes.length>0)Kn($n,qn);else if($n.nodeName!=="IMG")if($n.innerHTML)$n.innerHTML=(oi=$n.innerHTML)==null?void 0:oi.replace(new RegExp(qn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const ri=document.createElement("span");ri.innerHTML=$n.textContent.replace(new RegExp(qn,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),$n.replaceWith(ri)}})}const Zn=(0,fe.useRef)();St.jb.WebkitLineClamp=Mt,Mt&&(pt=Se(Se({},pt),St.jb));function $t(Zt){let qn=Zt.target;if(qn.tagName.toUpperCase()==="A"){let $n=qn.getAttribute("href");if($n.indexOf("office")>-1)Zt.preventDefault(),ln($n),Gt("office");else if($n.indexOf("application/pdf")>-1)Zt.preventDefault(),ln($n),Gt("pdf");else if($n.indexOf("text/html")>-1)Zt.preventDefault(),ln($n),Gt("html");else if($n.startsWith("#")){Zt.preventDefault();let oi=document.getElementById($n.replace("#",""));oi&&oi.scrollIntoView(!0)}}}const Nn=()=>{var Zt;const qn=(Zt=Zn.current)==null?void 0:Zt.querySelectorAll("video");qn==null||qn.forEach($n=>{if($n.oncontextmenu=()=>!1,$n.src.indexOf(".m3u8")>-1&&!$n.canPlayType("application/vnd.apple.mpegurl")){if(Be().isSupported()){var oi=new(Be());oi.loadSource($n.src),oi.attachMedia($n)}}})};return(0,fe.useEffect)(()=>{if(Zn.current&&Ge&&Ge.match(Re)&&window.PR.prettyPrint(),Zn.current)return Zn.current.addEventListener("click",$t),()=>{var Zt;(Zt=Zn.current)==null||Zt.removeEventListener("click",$t),(0,St.AL)(),(0,St.Iy)()}},[Ge,Zn.current,$t]),(0,fe.useEffect)(()=>{var Zt;const qn=$n=>{$n.preventDefault(),$n.clipboardData.setData("text",window.getSelection().toString())};return(Zt=Zn.current)==null||Zt.addEventListener("copy",qn),()=>{var $n;($n=Zn.current)==null||$n.removeEventListener("copy",qn)}},[Zn.current]),fe.createElement(fe.Fragment,null,Lt&&fe.createElement("div",{ref:Zn},Ge),!Lt&&!ze(Ge)&&fe.createElement("div",{ref:Zn,style:Se({},pt),className:`${lt||""} ${Ve?"disabled-fill":""} markdown-body ${on.current}`,dangerouslySetInnerHTML:{__html:Ge}}),!Lt&&ze(Ge)&&fe.createElement(Ae,{html:Ge}),fe.createElement(Ft.Z,{close:!0,data:pn,type:pn!=null&&pn.length?jn:"",style:Se({},dn),onClose:()=>ln("")}))}},48994:function(Cn,On,Me){"use strict";Me.d(On,{C:function(){return dn}});var fe=Me(67294),Ke={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},St=Me(94184),zt=Me.n(St),ft=Me(84567),Be=Me(71230),He=Me(2453),gt=Me(83062),it=Me(85804),st=Me(62844),Ft=Me(57399),Nt=Me(37720),Bt=Me(91773),Ae=Me(74330),ne=Me(28706),te=Me(33170),ue=Me(52262),se=Me(63037),pe=Me(30001),ve=Object.defineProperty,Se=Object.defineProperties,Pe=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,Re=Object.prototype.hasOwnProperty,tt=Object.prototype.propertyIsEnumerable,rt=(tn,vn,Tn)=>vn in tn?ve(tn,vn,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):tn[vn]=Tn,Je=(tn,vn)=>{for(var Tn in vn||(vn={}))Re.call(vn,Tn)&&rt(tn,Tn,vn[Tn]);if(Oe)for(var Tn of Oe(vn))tt.call(vn,Tn)&&rt(tn,Tn,vn[Tn]);return tn},bt=(tn,vn)=>Se(tn,Pe(vn)),lt=(tn,vn,Tn)=>new Promise((Ve,Ze)=>{var Qe=At=>{try{kn(Tn.next(At))}catch(pn){Ze(pn)}},mn=At=>{try{kn(Tn.throw(At))}catch(pn){Ze(pn)}},kn=At=>At.done?Ve(At.value):Promise.resolve(At.value).then(Qe,mn);kn((Tn=Tn.apply(tn,vn)).next())});const Lt=ft.default.Group,Mt=({className:tn,title:vn,items:Tn=[],value:Ve,onChange:Ze})=>{const Qe=(Tn==null?void 0:Tn.length)===(Ve==null?void 0:Ve.length),mn=(Ve==null?void 0:Ve.length)>0&&(Ve==null?void 0:Ve.length)<(Tn==null?void 0:Tn.length),kn=At=>{const pn=Tn.map(ln=>ln.id);Ze(At.target.checked?pn:[])};return fe.createElement(Be.Z,{align:"middle",className:tn},!!vn&&fe.createElement("div",{className:"mr20",style:{color:"#5F6368"}},vn),fe.createElement(ft.default,{indeterminate:mn,onChange:kn,checked:Qe},"\u5168\u90E8"),fe.createElement(Lt,{value:Ve,onChange:Ze},Tn.map(At=>fe.createElement(ft.default,{className:"ml30 c-black",key:At.id,value:At.id},At.name,fe.createElement("span",null,`(${At.count})`)))))};var dn=({className:tn,style:vn,dataSource:Tn})=>{var Ve,Ze,Qe,mn,kn,At,pn;const[ln,jn]=(0,fe.useState)({}),[Gt,mt]=(0,fe.useState)(!0),[Et,on]=(0,fe.useState)(!1),[Yt,ze]=(0,fe.useState)(!1),[be,Ce]=(0,fe.useState)(null),[De,Ge]=(0,fe.useState)(0),[Fe,qe]=(0,fe.useState)({}),[rn,Kn]=(0,fe.useState)(!0),[Zn,$t]=(0,fe.useState)(0),[Nn,Zt]=(0,fe.useState)(0),[qn,$n]=(0,fe.useState)(!1),oi=(0,fe.useRef)(null),[ri,fr]=(0,fe.useState)(!1),[wr,Li]=(0,fe.useState)(!0),[Ai,Ur]=(0,fe.useState)([]),Yn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[Rn,sr]=(0,fe.useState)(Je({},Yn));(0,fe.useEffect)(()=>{Tn!=null&&Tn.question_id&&jn(Tn)},[Tn==null?void 0:Tn.question_id]),(0,fe.useEffect)(()=>{var Ut;if(((Ut=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ut.status)==="running"){const en=setInterval(()=>{lr()},3e3);return()=>clearInterval(en)}},[(Ve=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ve.status]),(0,fe.useEffect)(()=>{var Ut;Yt&&(Yt===1&&(Rn.question_status=mo.map(en=>en.value),Rn.review=pi.map(en=>en.value)),Yt===2&&(Rn.exercise_question_resubmit_id=(Ut=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ut.id,be===1&&(Rn.success_status=[1]),be===2&&(Rn.success_status=[0])),sr(Je({},Rn)),xr(Rn),Zt(ln!=null&&ln.is_mirror?3:10),$t(ln!=null&&ln.is_mirror?1:5))},[Yt]),(0,fe.useEffect)(()=>{ri&&Ni()},[ri]);const xr=Ut=>lt(void 0,null,function*(){mt(!0);const en=yield(0,te.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_student_list.json`,{method:"get",params:Ut});(en==null?void 0:en.status)==0&&(qe(en||[]),Ge(en==null?void 0:en.count)),mt(!1)}),Ni=()=>lt(void 0,null,function*(){Li(!0);const Ut=yield(0,te.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_history.json`,{method:"get"});(Ut==null?void 0:Ut.status)==0&&Ur((Ut==null?void 0:Ut.data)||[]),Li(!1)}),lr=()=>lt(void 0,null,function*(){const Ut=yield(0,te.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit_status.json`,{method:"get"});(Ut==null?void 0:Ut.status)==0&&jn(bt(Je({},ln),{show_resubmit_history:!0,exercise_question_resubmit:(Ut==null?void 0:Ut.data)||{}}))}),mo=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],pi=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],ti=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],hi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(Ut,en,cn)=>fe.createElement("span",{className:"c-black"},cn+1+(Rn.page-1)*Rn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:Ut=>fe.createElement("span",{className:"c-black"},Ut)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:Ut=>fe.createElement("span",{className:"c-grey-666"},Ut||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:Ut=>fe.createElement("span",{className:"c-black"},Ut)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:Ut=>{const{label:en,color:cn}=mo.find(xn=>xn.value===Ut)||{};return fe.createElement("span",{style:{color:cn}},en)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:Ut=>fe.createElement("span",{className:"c-black"},Ut)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:Ut=>fe.createElement("span",{className:"c-black"},Ut)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:Ut=>{const{label:en,color:cn}=pi.find(xn=>xn.value===Ut)||{};return fe.createElement("span",{style:{color:cn}},en)}},Yt===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:Ut=>{const{label:en,color:cn}=ti.find(xn=>xn.value===Ut)||{};return fe.createElement("span",{style:{color:cn}},en)}}].filter(Boolean),Ii=(Ut,en,cn)=>{Rn.page=Ut==null?void 0:Ut.current,Rn.per_page=Ut==null?void 0:Ut.pageSize,cn!=null&&cn.order?(Rn.sort_by=cn==null?void 0:cn.field,Rn.direction=(cn==null?void 0:cn.order)==="ascend"?"asc":"desc"):(Rn.sort_by=null,Rn.direction=null),sr(Je({},Rn)),xr(Rn)},ir=()=>{if(!Zn){He.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}$n(!0)},zi=()=>lt(void 0,null,function*(){var Ut,en;if((Ut=oi.current)!=null&&Ut.onVerify())return;on(!0);const cn=yield(0,te.ZP)(`/api/exercise_questions/${ln==null?void 0:ln.question_id}/resubmit.json`,{method:"post",body:{keyword:Rn.keyword,question_status:Rn.question_status,review:Rn.review_status,success_status:Rn.success_status,use_max_score:rn,permits:Zn,exercise_question_resubmit_id:Yt===1?null:(en=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:en.id}});(cn==null?void 0:cn.status)==0&&(yield lr(),He.ZP.success("\u64CD\u4F5C\u6210\u529F"),$n(!1),ze(!1)),on(!1)}),an=(Ut,en)=>{Rn.page=1,Rn[en]=Ut,sr(Je({},Rn)),xr(Rn)},we=["","\u5F53\u524D\u9898\u76EE\u7684\u5B9E\u9A8C\u8D44\u6E90\u4E3A\u4E13\u6709\u4E91\uFF0C\u4E0D\u652F\u6301\u91CD\u65B0\u8BC4\u6D4B~","\u8BE5\u529F\u80FD\u4EC5\u8BFE\u5802\u7BA1\u7406\u5458\u548C\u8003\u8BD5\u7684\u521B\u5EFA\u8005\u53EF\u4EE5\u64CD\u4F5C~"];return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:zt()(Ke.recalculation,tn),style:vn},fe.createElement(gt.Z,{title:we[(ln==null?void 0:ln.disable_resubmit_reason)||0]},fe.createElement(it.ZP,{disabled:(ln==null?void 0:ln.disable_resubmit)||((Ze=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Ze.status)==="running",onClick:()=>ze(1),icon:fe.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(ln==null?void 0:ln.show_resubmit_history)&&fe.createElement(fe.Fragment,null,((Qe=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:Qe.status)==="running"?fe.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",fe.createElement("span",{className:"c-light-primary ml3"},(mn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:mn.rate)):fe.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",fe.createElement("span",{onClick:()=>{ze(2),Ce(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(kn=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:kn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",fe.createElement("span",{onClick:()=>{ze(2),Ce(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(At=ln==null?void 0:ln.exercise_question_resubmit)==null?void 0:At.fail_count),"\u4EBA"),fe.createElement(gt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},fe.createElement("i",{onClick:()=>fr(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),fe.createElement(st.default,{centered:!0,open:!!Yt,title:`\u91CD\u65B0\u8BC4\u6D4B${Yt===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>ze(!1),onOk:ir,afterClose:()=>{Kn(!0),Ce(null),sr(Je({},Yn))}},fe.createElement("div",{className:Ke.filter},Yt===1&&fe.createElement(fe.Fragment,null,fe.createElement("div",{className:Ke.tips},fe.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},fe.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),fe.createElement("div",null,"1.\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206\u6D41\u7A0B\uFF1A \u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u5B66\u751F\u5728\u8003\u8BD5\u9875\u9762\u4FDD\u5B58\u7684\u6700\u65B0\u4EE3\u7801\uFF0C\u5E76\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\uFF0C\u4ECE\u800C\u7CBE\u51C6\u8BA1\u7B97\u51FA\u5B66\u751F\u7684\u6700\u7EC8\u5F97\u5206\uFF1B"),fe.createElement("div",{style:{margin:"2px 0"}},"2.\u91CD\u65B0\u8BC4\u6D4B\u6761\u4EF6\uFF1A \u8003\u8BD5\u7ED3\u675F\u540E\uFF0C\u4EC5\u5BF9\u5DF2\u63D0\u4EA4\u8BD5\u5377\u4E14\u5DF2\u4F5C\u7B54\u8BE5\u9898\u76EE\u7684\u5B66\u751F\u8FDB\u884C\u91CD\u65B0\u8BC4\u6D4B\u4E0E\u7B97\u5206\uFF1B"),fe.createElement("div",null,"3.\u91CD\u65B0\u8BC4\u6D4B\u65F6\uFF0C\u8BF7\u786E\u4FDD\u5B9E\u9A8C\u73AF\u5883\u80FD\u6B63\u5E38\u542F\u52A8\u5E76\u53EF\u8FD0\u884C\u8BC4\u6D4B\u3002")),fe.createElement(Mt,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(Fe==null?void 0:Fe.question_status)||[],value:Rn.question_status,onChange:Ut=>an(Ut,"question_status")}),fe.createElement(Mt,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(Fe==null?void 0:Fe.review_status)||[],value:Rn.review,onChange:Ut=>an(Ut,"review")})),Yt===2&&fe.createElement(fe.Fragment,null,fe.createElement(Mt,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(Fe==null?void 0:Fe.success_status)||[],value:Rn.success_status,onChange:Ut=>an(Ut,"success_status")})),fe.createElement(pe.t7,{className:Ke.input,style:{bottom:Yt===1?10:-5},value:Rn.keyword,onChange:Ut=>an(Ut,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),fe.createElement(Ft.default,{className:"mt20",columns:hi,scroll:((pn=Fe==null?void 0:Fe.data)==null?void 0:pn.length)>7?{y:300}:{},dataSource:(Fe==null?void 0:Fe.data)||[],loading:Gt,onChange:Ii,pagination:{total:De,pageSize:Rn.per_page,current:Rn.page,hideOnSinglePage:!De,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:ne.rU}}),fe.createElement(Be.Z,{justify:"space-between",align:"middle",className:"mt10"},fe.createElement(ft.default,{className:"c-black",checked:rn,onChange:Ut=>Kn(Ut.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,ue.Ny)()&&fe.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",fe.createElement(Nt.Z,{className:"ml10 mr10",value:Zn,max:Nn,min:1,precision:0,onChange:Ut=>$t(Ut)}),"\u4EBA",fe.createElement(gt.Z,{overlayStyle:{maxWidth:450},title:"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A20\u4EBA\uFF08\u81EA\u5B9A\u4E49\u955C\u50CF\u7684\u6700\u5927\u5E76\u53D1\u4EBA\u6570\u4E3A3\u4EBA\uFF09\u3002"},fe.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),fe.createElement(st.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:qn,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:Et,destroyOnClose:!0,onOk:zi,onCancel:()=>$n(!1)},fe.createElement(Bt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},fe.createElement(se.Z,{ref:Ut=>oi.current=Ut}))),fe.createElement(st.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:ri,width:710,onCancel:()=>fr(!1),footer:null},fe.createElement(Ae.Z,{spinning:wr},fe.createElement("div",{className:Ke.operating},Ai.map((Ut,en)=>fe.createElement("div",{key:en,className:Ke.operatingItem},fe.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},Ut==null?void 0:Ut.created_at),fe.createElement("div",{className:"c-black"},Ut==null?void 0:Ut.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(Ut==null?void 0:Ut.status)==="running"?fe.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",fe.createElement("span",{className:"c-light-primary ml3"},Ut==null?void 0:Ut.rate)):fe.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",fe.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},Ut==null?void 0:Ut.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",fe.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},Ut==null?void 0:Ut.fail_count),"\u4EBA")))),fe.createElement("div",{style:{height:20}}))))}},96332:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return gt}});var fe=Me(67294),Ke={flex_box_center:"flex_box_center___rQJfc",flex_space_between:"flex_space_between___MDW24",flex_box_vertical_center:"flex_box_vertical_center___RZbAv",flex_box_center_end:"flex_box_center_end___ILhJA",flex_box_column:"flex_box_column___Fmij7",orangeColor:"orangeColor___U5vU6",redColor:"redColor___qYa6X",statustitle:"statustitle___pTBLm",statusbody:"statusbody___qUPQx",flex:"flex___VtL45"},St=Me(62844),zt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",ft="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",Be=(it,st,Ft)=>new Promise((Nt,Bt)=>{var Ae=ue=>{try{te(Ft.next(ue))}catch(se){Bt(se)}},ne=ue=>{try{te(Ft.throw(ue))}catch(se){Bt(se)}},te=ue=>ue.done?Nt(ue.value):Promise.resolve(ue.value).then(Ae,ne);te((Ft=Ft.apply(it,st)).next())}),gt=({type:it,resdata:st,onok:Ft,oktext:Nt,okloading:Bt})=>{const[Ae,ne]=(0,fe.useState)(!1),{can_copy_list:te,can_copy_num:ue,challenge_type:se,course_data_list:pe,no_copy_list:ve,no_copy_num:Se,no_use_list:Pe,no_use_num:Oe,repeat_shixun_num:Re,student_count:tt,total_num:rt,use_num:Je}=st;let bt=ue>0||it==="exercise";(0,fe.useEffect)(()=>{(st==null?void 0:st.student_count)>0&&ne(!0)},[st]),console.log("---11",Bt),(0,fe.useEffect)(()=>{Bt||ne(!1)},[Bt]);const lt=()=>{if(it==="exercise"&&se===1)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u4F5C\u7B54\u5DF2\u6311\u6218\u8FC7\u7684\u5B9E\u8BAD\u9898\u3002"));if(it==="exercise"&&se===2)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="shixun"&&se===1)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="shixun"&&se===2)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="subject"&&se===1)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="subject"&&se===2)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",fe.createElement("span",{className:Ke.orangeColor},tt)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",fe.createElement("span",{className:Ke.orangeColor},Je)," \u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="exercisepush")return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u5728\u5F53\u524D\u8003\u8BD5\u4E2D\u8FDB\u884C\u4F5C\u7B54\u3002"));if(it==="shixunpush"&&se===1)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(it==="shixunpush"&&se===2)return fe.createElement(fe.Fragment,null,"\u8BFE\u5802\u5185\u6709",fe.createElement("span",{className:Ke.orangeColor},tt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",fe.createElement("span",{className:Ke.orangeColor},Je),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E14\u4F5C\u4E1A\u5DF2\u5F00\u542F\u201C\u4F5C\u4E1A\u622A\u6B62\u540E\u4E0D\u5141\u8BB8\u5B66\u751F\u7F16\u8F91\u4EE3\u7801\u201D\u8BBE\u7F6E\u9879\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Lt=()=>{if(it==="exercise"||it==="subject"||it==="exercisepush"||it==="shixunpush")return fe.createElement("div",{style:{marginTop:20}},Se>0&&fe.createElement("div",null,fe.createElement("span",{className:Ke.flex},fe.createElement("img",{src:ft,style:{width:14}}),fe.createElement("span",{className:Ke.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),fe.createElement("div",{className:Ke.statusbody},it==="exercise"&&fe.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",fe.createElement("span",{className:Ke.redColor},"\u4EE5\u4E0B\u8BD5\u9898\u5C06\u4E0D\u4F1A\u88AB\u53D1\u9001\u81F3\u8BFE\u5802\u4E2D\u3002"),"\u60A8\u4E5F\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),(it==="subject"||it==="exercisepush")&&fe.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt&&fe.createElement("span",{className:Ke.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),it==="shixunpush"&&fe.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",bt&&fe.createElement("span",{className:Ke.redColor},"\u4E00\u952E\u590D\u5236\u4E0D\u4F1A\u590D\u5236\u6B64\u90E8\u5206\u9879\u76EE\u3002"),"\u5EFA\u8BAE\u60A8\u91CD\u65B0\u9009\u62E9\u5B9E\u8DF5\u9879\u76EE\u518D\u53D1\u5E03\u4F5C\u4E1A\uFF0C\u4E5F\u53EF\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002"),fe.createElement("div",null,ve==null?void 0:ve.map((Mt,pt)=>fe.createElement("a",{href:`/shixuns/${Mt.identifier}/challenges`,target:"_blank"},"\u300A",Mt==null?void 0:Mt.name,"\u300B",pt+1!==Se&&"\u3001"))))),ue>0&&fe.createElement("div",{style:{marginTop:20}},fe.createElement("span",{className:Ke.flex},fe.createElement("img",{src:zt,style:{width:14}}),fe.createElement("span",{className:Ke.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),fe.createElement("div",{className:Ke.statusbody},it==="exercise"&&fe.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u8BD5\u5377\u4E2D\u7684\u539F\u8BD5\u9898\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),(it==="subject"||it==="exercisepush")&&fe.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),it==="shixunpush"&&fe.createElement("div",{style:{marginBottom:15}},"\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362\u8BD5\u9898\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\u66FF\u6362\u5F53\u524D\u4F5C\u4E1A\u4E2D\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002"),fe.createElement("div",null,te==null?void 0:te.map((Mt,pt)=>fe.createElement("a",{href:`/shixuns/${Mt.identifier}/challenges`,target:"_blank"},"\u300A",Mt==null?void 0:Mt.name,"\u300B",pt+1!==ue&&"\u3001"))))));if(it==="shixun")return fe.createElement("div",{style:{marginTop:20}},ue>0?"\u8BE5\u9879\u76EE\u652F\u6301\u590D\u5236\uFF0C\u5EFA\u8BAE\u60A8\u4E00\u952E\u590D\u5236\u5E76\u53D1\u9001\uFF08\u5C06\u590D\u5236\u5E76\u521B\u5EFA\u4E00\u4E2A\u65B0\u7684\u9879\u76EE\uFF0C\u4E0D\u4F1A\u590D\u5236\u5B66\u751F\u7684\u6311\u6218\u8BB0\u5F55\uFF0C\u65B0\u7684\u9879\u76EE\u652F\u6301\u8FDB\u884C\u7F16\u8F91\u5E76\u4E0E\u539F\u9879\u76EE\u4FE1\u606F\u4E92\u4E0D\u5F71\u54CD\uFF09\u3002":"\u8BE5\u9879\u76EE\u4E0D\u652F\u6301\u590D\u5236\uFF0C\u60A8\u53EF\u4EE5\u8054\u7CFB\u9879\u76EE\u521B\u5EFA\u8005\u5F00\u542F\u590D\u5236\u6743\u9650\u6216\u8005\u8054\u7CFB\u5E73\u53F0\u6559\u7814\u52A9\u7406\u8FDB\u884C\u534F\u52A9\u3002")};return fe.createElement(St.default,{open:Ae,onCancel:()=>{ne(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!bt&&"none"}},zIndex:1003,confirmLoading:Bt,okText:bt?Nt:"\u6211\u77E5\u9053\u4E86",onOk:()=>Be(void 0,null,function*(){bt?yield Ft([...te,...Pe]):ne(!1)})},fe.createElement("div",{style:{maxHeight:600,overflow:"auto"}},lt(),Lt()))}},2715:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Be}});var fe=Me(67294),Ke={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},St=Me(94184),zt=Me.n(St),Be=({className:He,style:gt,state:it,onClick:st})=>{var Ft,Nt;return fe.createElement("div",{onClick:st,className:zt()(it?(Ft=Ke)==null?void 0:Ft.redBtn:(Nt=Ke)==null?void 0:Nt.btn,He),style:gt},it?fe.createElement(fe.Fragment,null,fe.createElement("i",{className:"iconfont icon-biaoji1"}),fe.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):fe.createElement(fe.Fragment,null,fe.createElement("i",{className:"iconfont icon-biaojigaiti"}),fe.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},57444:function(Cn,On,Me){"use strict";Me.d(On,{h:function(){return Se}});var fe=Me(67294),Ke=Me(88044),St=Me(91773),zt=Me(85804),ft=Me(4631),Be=Me.n(ft),He=Me(71749),gt=Me(30483),it=Object.defineProperty,st=Object.defineProperties,Ft=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Bt=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,ne=(Pe,Oe,Re)=>Oe in Pe?it(Pe,Oe,{enumerable:!0,configurable:!0,writable:!0,value:Re}):Pe[Oe]=Re,te=(Pe,Oe)=>{for(var Re in Oe||(Oe={}))Bt.call(Oe,Re)&&ne(Pe,Re,Oe[Re]);if(Nt)for(var Re of Nt(Oe))Ae.call(Oe,Re)&&ne(Pe,Re,Oe[Re]);return Pe},ue=(Pe,Oe)=>st(Pe,Ft(Oe));const se=Ke.default.Option,pe={labelCol:{span:4},wrapperCol:{span:20}},ve={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"]};On.Z=({callback:Pe,onCancel:Oe})=>{const[Re,tt]=(0,fe.useState)("python");function rt(bt){tt(ve[bt][1])}function Je(bt){Pe(bt)}return fe.createElement(St.default,ue(te({},pe),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Je,style:{width:500}}),fe.createElement(St.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},fe.createElement(Ke.default,{getPopupContainer:bt=>bt.parentNode,onChange:rt},Object.keys(ve).map(bt=>fe.createElement(se,{key:bt,value:bt},ve[bt][0])))),fe.createElement(St.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},fe.createElement(Se,{mode:Re})),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(zt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(zt.ZP,{type:"ghost",onClick:Oe},"\u53D6\u6D88")))};function Se({value:Pe,onChange:Oe,mode:Re,options:tt={}}){const rt=(0,fe.useRef)(),[Je,bt]=(0,fe.useState)();return(0,fe.useEffect)(()=>{if(Je){let lt=function(Lt){const Mt=Lt.getValue();Oe&&Oe(Mt)};return Je.on("change",lt),()=>{Je.off("change",lt)}}},[Je,Oe]),(0,fe.useEffect)(()=>{Je&&Je.setOption("mode",Re)},[Je,Re]),(0,fe.useEffect)(()=>{Je&&(Pe!==Je.getValue()||Pe==="")&&setTimeout(()=>{Je.setValue(Pe||"")},300)},[Je,Pe]),(0,fe.useEffect)(()=>{if(rt.current&&!Je){const lt=Be().fromTextArea(rt.current,te({mode:Re,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},tt));bt(lt)}},[rt.current,Je]),fe.createElement("div",{className:"my-codemirror-container"},fe.createElement("textarea",{ref:rt}))}},35567:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ui}});var fe=Me(67294),Ke=Me(4631),St=Me.n(Ke),zt=Me(91033),ft=Me(71749),Be=Me(57341),He=Me(82801),gt=Me(88386),it=Me(49047),st=Me(80785),Ft=Me(65226),Nt=({value:Ot="",className:_t,showTextOnly:Ct,showLines:Jt,style:ci={}})=>{const Xn=(0,fe.useMemo)(()=>"",[Ot]);return fe.createElement(fe.Fragment,null,fe.createElement("div",{dangerouslySetInnerHTML:{__html:Xn}}))},Bt=Object.defineProperty,Ae=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,pe=(Ot,_t,Ct)=>_t in Ot?Bt(Ot,_t,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Ot[_t]=Ct,ve=(Ot,_t)=>{for(var Ct in _t||(_t={}))ue.call(_t,Ct)&&pe(Ot,Ct,_t[Ct]);if(te)for(var Ct of te(_t))se.call(_t,Ct)&&pe(Ot,Ct,_t[Ct]);return Ot},Se=(Ot,_t)=>Ae(Ot,ne(_t));let Pe=[{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 Oe({onActionCallback:Ot,title:_t,icon:Ct,actionName:Jt,className:ci="",children:Xn}){function _n(){Ot(Jt)}return fe.createElement("a",{title:_t,className:ci,onClick:_n},fe.createElement("i",{className:`${Ct}`}),Xn)}var Re=({watch:Ot,showNullButton:_t,showNullProgramButton:Ct,onActionCallback:Jt,fullScreen:ci,insertTemp:Xn,hidetoolBar:_n,extraUse:It})=>{const hn=[...Pe,{title:`${Ot?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Ot?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return fe.createElement("ul",{className:"markdown-toolbar-container"},!_n&&hn.map((Ci,Ri)=>fe.createElement("li",{key:Ri},Ci.actionName?fe.createElement(Oe,Se(ve({},Ci),{onActionCallback:Jt})):fe.createElement("span",{className:"v-line"}))),_t?fe.createElement("li",null,fe.createElement(Oe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:Jt},fe.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ct?fe.createElement(fe.Fragment,null,fe.createElement("li",null,fe.createElement(Oe,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:Jt},fe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),fe.createElement("li",null,fe.createElement(Oe,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:Jt},fe.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Xn&&fe.createElement("li",null,fe.createElement(Oe,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Xn}`,onActionCallback:Jt},fe.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),It&&fe.createElement("li",null,It),fe.createElement("li",{className:"btn-full-screen"},fe.createElement(Oe,{icon:`${ci?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:ci?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:Jt})))},tt=Me(76621),rt=Me(91773),Je=Me(28802),bt=Me(85804),lt=Object.defineProperty,Lt=Object.defineProperties,Mt=Object.getOwnPropertyDescriptors,pt=Object.getOwnPropertySymbols,dn=Object.prototype.hasOwnProperty,tn=Object.prototype.propertyIsEnumerable,vn=(Ot,_t,Ct)=>_t in Ot?lt(Ot,_t,{enumerable:!0,configurable:!0,writable:!0,value:Ct}):Ot[_t]=Ct,Tn=(Ot,_t)=>{for(var Ct in _t||(_t={}))dn.call(_t,Ct)&&vn(Ot,Ct,_t[Ct]);if(pt)for(var Ct of pt(_t))tn.call(_t,Ct)&&vn(Ot,Ct,_t[Ct]);return Ot},Ve=(Ot,_t)=>Lt(Ot,Mt(_t));const Ze={labelCol:{span:4},wrapperCol:{span:20}};var Qe=({callback:Ot,onCancel:_t})=>{function Ct(Jt){Ot(Jt)}return fe.createElement(rt.default,Ve(Tn({},Ze),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ct,style:{width:500}}),fe.createElement(rt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},fe.createElement(Je.default,null)),fe.createElement(rt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},fe.createElement(Je.default,null)),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(bt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(bt.ZP,{type:"ghost",onClick:_t},"\u53D6\u6D88")))},mn=Me(57444),kn=Me(70859),At=Me(62844),pn=Me(71230),ln=Me(63205),jn=Me(67294),Gt=({callback:Ot,onCancel:_t})=>{const Ct=document.createElement("canvas"),Jt=Ct.getContext("2d");Ct.width=1e3,Ct.height=800,Jt.fillStyle="#ffffff",Jt.fillRect(0,0,Ct.width,Ct.height);const ci=Ct.toDataURL("image/png");return jn.createElement(At.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},jn.createElement(pn.Z,{style:{height:"100vh"}},jn.createElement(ln.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:ci,visible:!0,title:String(Date.now())},onOk:Xn=>{Ot({src:Xn.url})},onClose:_t})))},mt=Me(23495);function Et(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(Et,go.CommandHandler),Et.prototype.canAlignSelection=function(){var Ot=this.diagram;return!(Ot===null||Ot.isReadOnly||Ot.isModelReadOnly||Ot.selection.count<2)},Et.prototype.alignLeft=function(){var Ot=this.diagram;Ot.startTransaction("aligning left");var _t=1/0;Ot.selection.each(function(Ct){Ct instanceof go.Link||(_t=Math.min(Ct.position.x,_t))}),Ot.selection.each(function(Ct){Ct instanceof go.Link||Ct.move(new go.Point(_t,Ct.position.y))}),Ot.commitTransaction("aligning left")},Et.prototype.alignRight=function(){var Ot=this.diagram;Ot.startTransaction("aligning right");var _t=-1/0;Ot.selection.each(function(Ct){if(!(Ct instanceof go.Link)){var Jt=Ct.actualBounds.x+Ct.actualBounds.width;_t=Math.max(Jt,_t)}}),Ot.selection.each(function(Ct){Ct instanceof go.Link||Ct.move(new go.Point(_t-Ct.actualBounds.width,Ct.position.y))}),Ot.commitTransaction("aligning right")},Et.prototype.alignTop=function(){var Ot=this.diagram;Ot.startTransaction("alignTop");var _t=1/0;Ot.selection.each(function(Ct){Ct instanceof go.Link||(_t=Math.min(Ct.position.y,_t))}),Ot.selection.each(function(Ct){Ct instanceof go.Link||Ct.move(new go.Point(Ct.position.x,_t))}),Ot.commitTransaction("alignTop")},Et.prototype.alignBottom=function(){var Ot=this.diagram;Ot.startTransaction("aligning bottom");var _t=-1/0;Ot.selection.each(function(Ct){if(!(Ct instanceof go.Link)){var Jt=Ct.actualBounds.y+Ct.actualBounds.height;_t=Math.max(Jt,_t)}}),Ot.selection.each(function(Ct){Ct instanceof go.Link||Ct.move(new go.Point(Ct.actualBounds.x,_t-Ct.actualBounds.height))}),Ot.commitTransaction("aligning bottom")},Et.prototype.alignCenterX=function(){var Ot=this.diagram,_t=Ot.selection.first();if(_t){Ot.startTransaction("aligning Center X");var Ct=_t.actualBounds.x+_t.actualBounds.width/2;Ot.selection.each(function(Jt){Jt instanceof go.Link||Jt.move(new go.Point(Ct-Jt.actualBounds.width/2,Jt.actualBounds.y))}),Ot.commitTransaction("aligning Center X")}},Et.prototype.alignCenterY=function(){var Ot=this.diagram,_t=Ot.selection.first();if(_t){Ot.startTransaction("aligning Center Y");var Ct=_t.actualBounds.y+_t.actualBounds.height/2;Ot.selection.each(function(Jt){Jt instanceof go.Link||Jt.move(new go.Point(Jt.actualBounds.x,Ct-Jt.actualBounds.height/2))}),Ot.commitTransaction("aligning Center Y")}},Et.prototype.alignColumn=function(Ot){var _t=this.diagram;_t.startTransaction("align Column"),Ot===void 0&&(Ot=0),Ot=parseFloat(Ot);var Ct=new Array;_t.selection.each(function(It){It instanceof go.Link||Ct.push(It)});for(var Jt=0;Jt<Ct.length-1;Jt++){var ci=Ct[Jt],Xn=ci.actualBounds.y+ci.actualBounds.height+Ot,_n=Ct[Jt+1];_n.move(new go.Point(ci.actualBounds.x,Xn))}_t.commitTransaction("align Column")},Et.prototype.alignRow=function(Ot){Ot===void 0&&(Ot=0),Ot=parseFloat(Ot);var _t=this.diagram;_t.startTransaction("align Row");var Ct=new Array;_t.selection.each(function(It){It instanceof go.Link||Ct.push(It)});for(var Jt=0;Jt<Ct.length-1;Jt++){var ci=Ct[Jt],Xn=ci.actualBounds.x+ci.actualBounds.width+Ot,_n=Ct[Jt+1];_n.move(new go.Point(Xn,ci.actualBounds.y))}_t.commitTransaction("align Row")},Et.prototype.canRotate=function(Ot){var _t=this.diagram;return!(_t===null||_t.isReadOnly||_t.isModelReadOnly||_t.selection.count<1)},Et.prototype.rotate=function(Ot){Ot===void 0&&(Ot=90);var _t=this.diagram;_t.startTransaction("rotate "+Ot.toString());var _t=this.diagram;_t.selection.each(function(Ct){Ct instanceof go.Link||Ct instanceof go.Group||(Ct.angle+=Ot)}),_t.commitTransaction("rotate "+Ot.toString())},Et.prototype.pullToFront=function(){var Ot=this.diagram;Ot.startTransaction("pullToFront");var _t=new go.Map;Ot.selection.each(function(Ct){_t.set(Ct.layer,0)}),_t.iteratorKeys.each(function(Ct){var Jt=0;Ct.parts.each(function(ci){if(!ci.isSelected){var Xn=ci.zOrder;isNaN(Xn)?ci.zOrder=0:Jt=Math.max(Jt,Xn)}}),_t.set(Ct,Jt)}),Ot.selection.each(function(Ct){Et._assignZOrder(Ct,_t.get(Ct.layer)+1)}),Ot.commitTransaction("pullToFront")},Et.prototype.pushToBack=function(){var Ot=this.diagram;Ot.startTransaction("pushToBack");var _t=new go.Map;Ot.selection.each(function(Ct){_t.set(Ct.layer,0)}),_t.iteratorKeys.each(function(Ct){var Jt=0;Ct.parts.each(function(ci){if(!ci.isSelected){var Xn=ci.zOrder;isNaN(Xn)?ci.zOrder=0:Jt=Math.min(Jt,Xn)}}),_t.set(Ct,Jt)}),Ot.selection.each(function(Ct){Et._assignZOrder(Ct,_t.get(Ct.layer)-1-Et._findGroupDepth(Ct))}),Ot.commitTransaction("pushToBack")},Et._assignZOrder=function(Ot,_t,Ct){Ct===void 0&&(Ct=Ot),Ot.layer===Ct.layer&&(Ot.zOrder=_t),Ot instanceof go.Group&&Ot.memberParts.each(function(Jt){Et._assignZOrder(Jt,_t+1,Ct)})},Et._findGroupDepth=function(Ot){if(Ot instanceof go.Group){var _t=0;return Ot.memberParts.each(function(Ct){_t=Math.max(_t,Et._findGroupDepth(Ct))}),_t+1}else return 0},Et.prototype.doKeyDown=function(){var Ot=this.diagram;if(Ot!==null){var _t=Ot.lastInput;if(_t.key==="Up"||_t.key==="Down"||_t.key==="Left"||_t.key==="Right"){var Ct=this.arrowKeyBehavior;if(Ct==="none")return;if(Ct==="select"){this._arrowKeySelect();return}else if(Ct==="move"){this._arrowKeyMove();return}else if(Ct==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},Et.prototype._getAllParts=function(){var Ot=new Array;return this.diagram.nodes.each(function(_t){Ot.push(_t)}),this.diagram.parts.each(function(_t){Ot.push(_t)}),Ot},Et.prototype._arrowKeyMove=function(){var Ot=this.diagram,_t=Ot.lastInput,Ct=0,Jt=0;if(_t.control||_t.meta)Ct=1,Jt=1;else if(Ot.grid!==null){var ci=Ot.grid.gridCellSize;Jt=ci.width,Ct=ci.height}Ot.startTransaction("arrowKeyMove"),Ot.selection.each(function(Xn){_t.key==="Up"?Xn.move(new go.Point(Xn.actualBounds.x,Xn.actualBounds.y-Ct)):_t.key==="Down"?Xn.move(new go.Point(Xn.actualBounds.x,Xn.actualBounds.y+Ct)):_t.key==="Left"?Xn.move(new go.Point(Xn.actualBounds.x-Jt,Xn.actualBounds.y)):_t.key==="Right"&&Xn.move(new go.Point(Xn.actualBounds.x+Jt,Xn.actualBounds.y))}),Ot.commitTransaction("arrowKeyMove")},Et.prototype._arrowKeySelect=function(){var Ot=this.diagram,_t=Ot.lastInput,Ct=null;_t.key==="Up"?Ct=this._findNearestPartTowards(270):_t.key==="Down"?Ct=this._findNearestPartTowards(90):_t.key==="Left"?Ct=this._findNearestPartTowards(180):_t.key==="Right"&&(Ct=this._findNearestPartTowards(0)),Ct!==null&&(_t.shift?Ct.isSelected=!0:_t.control||_t.meta?Ct.isSelected=!Ct.isSelected:Ot.select(Ct))},Et.prototype._findNearestPartTowards=function(Ot){var _t=this.diagram.selection.first();if(_t===null)return null;for(var Ct=_t.actualBounds.center,Jt=this._getAllParts(),ci=1/0,Xn=_t,_n=0;_n<Jt.length;_n++){var It=Jt[_n];if(It!==_t&&It.canSelect()){var hn=It.actualBounds.center,Ci=Ct.directionPoint(hn),Ri=this._angleCloseness(Ci,Ot);if(Ri<=45){var Ln=Ct.distanceSquaredPoint(hn);Ln*=1+Math.sin(Ri*Math.PI/180),Ln<ci&&(ci=Ln,Xn=It)}}}return Xn},Et.prototype._angleCloseness=function(Ot,_t){return Math.min(Math.abs(_t-Ot),Math.min(Math.abs(_t+360-Ot),Math.abs(_t-360-Ot)))},Et.prototype._arrowKeyTree=function(){var Ot=this.diagram,_t=Ot.selection.first();if(_t instanceof go.Node){var Ct=Ot.lastInput;if(Ct.key==="Right"){if(!_t.isTreeLeaf)if(!_t.isTreeExpanded)Ot.commandHandler.canExpandTree(_t)&&Ot.commandHandler.expandTree(_t);else{var Jt=this._sortTreeChildrenByY(_t).first();Jt!==null&&Ot.select(Jt)}}else if(Ct.key==="Left")if(!_t.isTreeLeaf&&_t.isTreeExpanded)Ot.commandHandler.canCollapseTree(_t)&&Ot.commandHandler.collapseTree(_t);else{var ci=_t.findTreeParentNode();ci!==null&&Ot.select(ci)}else if(Ct.key==="Up"){var ci=_t.findTreeParentNode();if(ci!==null){var Xn=this._sortTreeChildrenByY(ci),_n=Xn.indexOf(_t);if(_n>0){for(var It=Xn.elt(_n-1);It!==null&&It.isTreeExpanded&&!It.isTreeLeaf;){var hn=this._sortTreeChildrenByY(It);It=hn.last()}It!==null&&Ot.select(It)}else Ot.select(ci)}}else if(Ct.key==="Down")if(_t.isTreeExpanded&&!_t.isTreeLeaf){var Jt=this._sortTreeChildrenByY(_t).first();Jt!==null&&Ot.select(Jt)}else for(;_t!==null;){var ci=_t.findTreeParentNode();if(ci===null)break;var Xn=this._sortTreeChildrenByY(ci),_n=Xn.indexOf(_t);if(_n<Xn.length-1){Ot.select(Xn.elt(_n+1));break}else _t=ci}var Ci=Ot.selection.first();Ci!==null&&Ot.scrollToRect(Ci.actualBounds)}},Et.prototype._sortTreeChildrenByY=function(Ot){var _t=new go.List().addAll(Ot.findTreeChildrenNodes());return _t.sort(function(Ct,Jt){var ci=Ct.location,Xn=Jt.location;return ci.y<Xn.y?-1:ci.y>Xn.y?1:ci.x<Xn.x?-1:ci.x>Xn.x?1:0}),_t},Et.prototype.copyToClipboard=function(Ot){go.CommandHandler.prototype.copyToClipboard.call(this,Ot),this._lastPasteOffset.set(this.pasteOffset)},Et.prototype.pasteFromClipboard=function(){var Ot=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Ot,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Ot},Object.defineProperty(Et.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Ot){if(Ot!=="move"&&Ot!=="select"&&Ot!=="scroll"&&Ot!=="tree"&&Ot!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Ot);this._arrowKeyBehavior=Ot}}),Object.defineProperty(Et.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Ot){if(!(Ot instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Ot);this._pasteOffset.set(Ot)}});var on=Et,Yt=Me(18023),ze=Me(15746),be=Me(33170),Ce={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},De=Me(52262),Ge=Me(67294),Fe=(Ot,_t,Ct)=>new Promise((Jt,ci)=>{var Xn=hn=>{try{It(Ct.next(hn))}catch(Ci){ci(Ci)}},_n=hn=>{try{It(Ct.throw(hn))}catch(Ci){ci(Ci)}},It=hn=>hn.done?Jt(hn.value):Promise.resolve(hn.value).then(Xn,_n);It((Ct=Ct.apply(Ot,_t)).next())});function qe({onCancel:Ot,callback:_t}){let Ct=(0,fe.useRef)(),Jt=(0,fe.useRef)(),ci=(0,fe.useRef)(),Xn=(0,fe.useRef)(!1);const _n=(0,fe.useRef)(!1),[It,hn]=(0,fe.useState)(0);function Ci(){const Ln=mt.bx.make,Rt={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"};Ct.current=new mt.S0(Jt.current,{padding:20,grid:Ln(mt.s_,"Grid",Ln(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ln(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Wt=>{var $i=Wt.diagram.commandHandler.addTopLevelParts(Wt.diagram.selection,!0);$i||Wt.diagram.currentTool.doCancel()},commandHandler:Ln(on),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Wt=>{var $i=Wt.subject;$i.location=$i.location.copy().snapToGridPoint(Wt.diagram.grid.gridOrigin,Wt.diagram.grid.gridCellSize),setTimeout(()=>{Wt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Wt=>{var $i=Wt.subject;setTimeout(()=>{Wt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Wt=>{var $i=Wt.parameter.part;$i.invalidateConnectedLinks();var Vo=Wt.subject;Wt.diagram.toolManager.linkingTool.isForwards?Vo.toNode.invalidateConnectedLinks():Vo.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ct.current.nodeTemplate=Ln(mt.NB,"Auto",{locationSpot:mt.z6.Center,locationObjectName:"SHAPE",desiredSize:new mt.$u(120,60),minSize:new mt.$u(40,40),resizable:!0,resizeCellSize:new mt.$u(10,10),rotatable:!0},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),new mt.KX("desiredSize","size",mt.$u.parse).makeTwoWay(mt.$u.stringify),Ln(mt.bn,{name:"SHAPE",fill:Rt.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("figure"),new mt.KX("fill"),new mt.KX("stroke","borderColor"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ln(mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Ln(mt.al,{margin:1,textAlign:"center",overflow:mt.al.OverflowEllipsis,editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Ct.current.nodeTemplate.toolTip=Ln("ToolTip",Ln(mt.s_,"Vertical",{maxSize:new mt.$u(200,NaN)},Ln(mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new mt.KX("text")),Ln(mt.al,{font:"10pt sans-serif",textAlign:"center"},new mt.KX("text","details"))));function Si(Wt,$i){var Vo=(Pr,Ia)=>{Pr.handled=!0,Pr.diagram.model.commit(zo=>{var na=Ia.part.adornedPart,Fo=new mt.E9().setRectSpot(na.actualBounds,Wt);Fo.subtract(na.location),Fo.scale(2,2),Fo.x+=Math.sign(Fo.x)*130,Fo.y+=Math.sign(Fo.y)*130,Fo.add(na.location),Fo.snapToGridPoint(Pr.diagram.grid.gridOrigin,Pr.diagram.grid.gridCellSize);var _o=zo.copyNodeData(na.data);zo.setGroupKeyForNodeData(_o,zo.getGroupKeyForNodeData(na.data)),zo.addNodeData(_o);var da={from:na.key,to:zo.getKeyForNodeData(_o)};zo.addLinkData(da);var bn=Pr.diagram.findNodeForData(_o);bn.location=Fo,Pr.diagram.select(bn),setTimeout(()=>{Pr.diagram.commandHandler.editTextBlock()},20)})};return Ln(mt.bn,{figure:$i,alignment:Wt,alignmentFocus:Wt.opposite(),width:Wt.equals(mt.z6.Top)||Wt.equals(mt.z6.Bottom)?25:18,height:Wt.equals(mt.z6.Top)||Wt.equals(mt.z6.Bottom)?18:25,fill:"orange",stroke:Rt.white,strokeWidth:4,mouseEnter:(Pr,Ia)=>Ia.fill="dodgerblue",mouseLeave:(Pr,Ia)=>Ia.fill="orange",isActionable:!0,click:Vo,contextClick:Vo})}function Zi(Wt){return Ln(mt.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:($i,Vo)=>Vo.fill="dodgerblue",mouseLeave:($i,Vo)=>Vo.fill="orange",click:($i,Vo)=>{$i.diagram.commandHandler.showContextMenu(Vo.part.adornedPart)}},Wt||{})}Ct.current.nodeTemplate.selectionAdornmentTemplate=Ln(mt.uz,"Spot",Ln(mt.Vm,{padding:10}),Si(mt.z6.Top,"TriangleUp"),Si(mt.z6.Left,"TriangleLeft"),Si(mt.z6.Right,"TriangleRight"),Si(mt.z6.Bottom,"TriangleDown"),Zi({alignment:new mt.z6(.75,0)}));function Wr(Wt,$i){return(Vo,Pr)=>{Vo.handled=!0,Vo.diagram.model.commit(Ia=>{Ia.set(Pr.part.adornedPart.data,Wt,$i)})}}function En(Wt,$i){return $i||($i="color"),Ln(mt.bn,{width:16,height:16,stroke:"lightgray",fill:Wt,margin:1,background:"transparent",mouseEnter:(Vo,Pr)=>Pr.stroke="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.stroke="lightgray",click:Wr($i,Wt),contextClick:Wr($i,Wt)})}function li(){return[Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",En(Rt.white,"fill"),En(Rt.beige,"fill"),En(Rt.extralightblue,"fill"),En(Rt.extralightred,"fill"))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",En(Rt.lightgray,"fill"),En(Rt.lightgreen,"fill"),En(Rt.lightblue,"fill"),En(Rt.lightred,"fill")))]}function bo(){return[Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",En(Rt.black),En(Rt.green),En(Rt.blue),En(Rt.red))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",En(Rt.white),En(Rt.magenta),En(Rt.purple),En(Rt.orange)))]}function La(Wt,$i){return $i||($i="thickness"),Ln(mt.bn,"LineH",{width:16,height:16,strokeWidth:Wt,margin:1,background:"transparent",mouseEnter:(Vo,Pr)=>Pr.background="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.background="transparent",click:Wr($i,Wt),contextClick:Wr($i,Wt)})}function sa(Wt,$i){return $i||($i="dash"),Ln(mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Wt,margin:1,background:"transparent",mouseEnter:(Vo,Pr)=>Pr.background="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.background="transparent",click:Wr($i,Wt),contextClick:Wr($i,Wt)})}function Yi(){return[Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",La(1),La(2),La(3),La(4))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",sa(null),sa([2,4]),sa([4,4])))]}function Wi(Wt,$i){return $i||($i="figure"),Ln(mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Wt,margin:1,background:"transparent",mouseEnter:(Vo,Pr)=>Pr.fill="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.fill="lightgray",click:Wr($i,Wt),contextClick:Wr($i,Wt)})}Ct.current.nodeTemplate.contextMenu=Ln("ContextMenu",Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",Wi("Rectangle"),Wi("RoundedRectangle"),Wi("Ellipse"),Wi("Diamond"))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",Wi("Parallelogram2"),Wi("ManualOperation"),Wi("Procedure"),Wi("Cylinder1"))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",Wi("Terminator"),Wi("CreateRequest"),Wi("Document"),Wi("TriangleDown"))),li(),bo(),Yi()),Ct.current.groupTemplate=Ln(mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Wt,$i)=>{var Vo=$i.addMembers($i.diagram.selection,!0);Vo||$i.diagram.currentTool.doCancel()},avoidable:!1},new mt.KX("location","loc",mt.E9.parse).makeTwoWay(mt.E9.stringify),Ln(mt.s_,"Auto",{name:"BODY"},Ln(mt.bn,{parameter1:10,fill:Rt.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:mt.z6.AllSides,toSpot:mt.z6.AllSides},new mt.KX("fill"),new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ln(mt.Vm,{background:"transparent",margin:20})),Ln(mt.al,{alignment:mt.z6.Top,alignmentFocus:mt.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new mt.KX("text"),new mt.KX("stroke","color"))),Ct.current.groupTemplate.selectionAdornmentTemplate=Ln(mt.uz,"Spot",Ln(mt.s_,"Auto",Ln(mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Ln(mt.Vm,{margin:1.5})),Zi({alignment:mt.z6.TopRight,alignmentFocus:mt.z6.BottomRight})),Ct.current.groupTemplate.contextMenu=Ln("ContextMenu",li(),bo(),Yi()),Ct.current.linkTemplate=Ln(mt.rU,{layerName:"Foreground",routing:mt.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new mt.KX("fromSpot","fromSpot",mt.z6.parse),new mt.KX("toSpot","toSpot",mt.z6.parse),new mt.KX("fromShortLength","dir",Wt=>Wt>=1?10:0),new mt.KX("toShortLength","dir",Wt=>Wt>=1?10:0),new mt.KX("points").makeTwoWay(),Ln(mt.bn,{strokeWidth:2},new mt.KX("stroke","color"),new mt.KX("strokeWidth","thickness"),new mt.KX("strokeDashArray","dash")),Ln(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,0),segmentOrientation:mt.rU.OrientAlong,alignmentFocus:mt.z6.Right,figure:"circle",width:10,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Wt=>Wt===1)),Ln(mt.bn,{segmentIndex:-1,segmentOffset:new mt.E9(-10,6),segmentOrientation:mt.rU.OrientPlus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Wt=>Wt>=1),new mt.KX("width","thickness",Wt=>7+3*Wt),new mt.KX("height","thickness",Wt=>7+3*Wt),new mt.KX("segmentOffset","thickness",Wt=>new mt.E9(-15,4+1.5*Wt))),Ln(mt.bn,{segmentIndex:0,segmentOffset:new mt.E9(15,-6),segmentOrientation:mt.rU.OrientMinus90,alignmentFocus:mt.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new mt.KX("fill","color"),new mt.KX("visible","dir",Wt=>Wt===2),new mt.KX("width","thickness",Wt=>7+3*Wt),new mt.KX("height","thickness",Wt=>7+3*Wt),new mt.KX("segmentOffset","thickness",Wt=>new mt.E9(-15,4+1.5*Wt))),Ln(mt.al,{alignmentFocus:new mt.z6(0,1,-4,0),editable:!0},new mt.KX("text").makeTwoWay(),new mt.KX("stroke","color"))),Ct.current.linkTemplate.selectionAdornmentTemplate=Ln(mt.uz,Ln(mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:er(2)},new mt.KX("pathPattern","thickness",er)),Zi({alignmentFocus:new mt.z6(0,0,-6,-4)}));function er(Wt){return Ln(mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Wt+4).toString()+" H3"})}function Mo(Wt){var $i="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Wt===0?$i="M0 0 M16 16 M0 8 L16 8":Wt===2&&($i="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Ln(mt.bn,{geometryString:$i,margin:2,background:"transparent",mouseEnter:(Vo,Pr)=>Pr.background="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.background="transparent",click:Wr("dir",Wt),contextClick:Wr("dir",Wt)})}function ra(Wt){var $i=(Vo,Pr)=>{Vo.handled=!0,Vo.diagram.model.commit(Ia=>{var zo=Pr.part.adornedPart;Ia.set(zo.data,Wt?"toSpot":"fromSpot",mt.z6.stringify(mt.z6.AllSides)),(Wt?zo.toNode:zo.fromNode).invalidateConnectedLinks()})};return Ln(mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(Vo,Pr)=>Pr.background="dodgerblue",mouseLeave:(Vo,Pr)=>Pr.background="transparent",click:$i,contextClick:$i})}function ai(Wt,$i){var Vo=0,Pr=mt.z6.RightSide;Wt.equals(mt.z6.Top)?(Vo=270,Pr=mt.z6.TopSide):Wt.equals(mt.z6.Left)?(Vo=180,Pr=mt.z6.LeftSide):Wt.equals(mt.z6.Bottom)&&(Vo=90,Pr=mt.z6.BottomSide),$i||(Vo-=180);var Ia=(zo,na)=>{zo.handled=!0,zo.diagram.model.commit(Fo=>{var _o=na.part.adornedPart;Fo.set(_o.data,$i?"toSpot":"fromSpot",mt.z6.stringify(Pr)),($i?_o.toNode:_o.fromNode).invalidateConnectedLinks()})};return Ln(mt.bn,{alignment:Wt,alignmentFocus:Wt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:Vo,background:"transparent",mouseEnter:(zo,na)=>na.background="dodgerblue",mouseLeave:(zo,na)=>na.background="transparent",click:Ia,contextClick:Ia})}Ct.current.linkTemplate.contextMenu=Ln("ContextMenu",bo(),Yi(),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",Mo(0),Mo(1),Mo(2))),Ln("ContextMenuButton",Ln(mt.s_,"Horizontal",Ln(mt.s_,"Spot",ra(!1),ai(mt.z6.Top,!1),ai(mt.z6.Left,!1),ai(mt.z6.Right,!1),ai(mt.z6.Bottom,!1)),Ln(mt.s_,"Spot",{margin:new mt.Zt(0,0,0,2)},ra(!0),ai(mt.z6.Top,!0),ai(mt.z6.Left,!0),ai(mt.z6.Right,!0),ai(mt.z6.Bottom,!0)))));const Mr=`{ "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 ml=["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 xs(Wt){return console.log("shapeName:",Wt),ml.indexOf(Wt)>=0}var $a=new mt.YI(ci.current,{maxSelectionCount:1,linkTemplate:Ln(mt.rU,{locationSpot:mt.z6.Center,selectionAdornmentTemplate:Ln(mt.uz,"Link",{locationSpot:mt.z6.Center},Ln(mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Ln(mt.bn,{toArrow:"Standard",stroke:null}))},{routing:mt.rU.AvoidsNodes,curve:mt.rU.JumpOver,corner:5,toShortLength:4},new mt.KX("points"),Ln(mt.bn,{isPanelMain:!0,strokeWidth:2}),Ln(mt.bn,{toArrow:"Standard",stroke:null})),model:new mt.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...mt.bn.getFigureGenerators().toArray().map(Wt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Wt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ct.current.addDiagramListener("TextEdited",function(Wt){var $i;const Vo=Wt.subject.part;var Pr=($i=document.activeElement)==null?void 0:$i.value;typeof Pr=="string"&&Pr.trim()===""&&Ct.current.model.commit(function(Ia){Ia.set(Vo.data,"text","\u672A\u547D\u540D"),Ct.current.commandHandler.stopCommand()},"increment")}),$a.nodeTemplate=Ln(mt.NB,"Auto",{locationSpot:mt.z6.Center},new mt.KX("location","location",mt.E9.parse).makeTwoWay(mt.E9.stringify),Ln(mt.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 mt.KX("stroke").makeTwoWay(),new mt.KX("fill").makeTwoWay(),new mt.KX("figure")),Ln(mt.al,{margin:new mt.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new mt.$u(16,16),maxSize:new mt.$u(10,NaN),textAlign:"center",editable:!0},new mt.KX("key").makeTwoWay())),setTimeout(()=>{Ct.current.grid=Ln(mt.s_,"Grid",Ln(mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Ln(mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ct.current.grid.visible=!0,Ct.current.grid.gridCellStroke="darkgray",Ct.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ct.current,Ct.current}const Ri=()=>Fe(this,null,function*(){var Ln,Rt=Ct.current.makeImage();const Si=yield(0,be.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Rt.src,file_data:JSON.stringify({login:(Ln=(0,De.eY)())==null?void 0:Ln.login,data:JSON.parse(Ct.current.model.toJson())})}});_t({src:Si.url})});return(0,fe.useEffect)(()=>(setTimeout(()=>{Ci()},500),hn(It+1),()=>{Ct.current=null}),[]),Ge.createElement("div",{ref:_n,className:"body-overflow-initial"},Ge.createElement(At.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!It,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ge.createElement(pn.Z,null,Ge.createElement(ze.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ge.createElement(ze.Z,{onClick:()=>{var Ln,Rt,Si=Ct.current.selection.first();if(Xn.current=!Xn.current,document.activeElement&&Si){let Zi=(Rt=(Ln=document.activeElement)==null?void 0:Ln.value)==null?void 0:Rt.trim();typeof Zi=="string"&&Ct.current.model.commit(function(Wr){Wr.set(Si.data,"text",Zi||"\u672A\u547D\u540D"),Ct.current.commandHandler.stopCommand()},"increment")}hn(It+1)}},Ge.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Ot},Ge.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Xn.current?"none":"block"},className:Ce.flowChartWrp},Ge.createElement("div",{style:{display:"flex",height:"100%"}},Ge.createElement("div",{style:{width:"300px",height:"100%"}},Ge.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ge.createElement("div",{style:{height:"calc(100% - 50px)"},className:Ce.myPaletteDiv,ref:ci})),Ge.createElement("div",{style:{flex:1,position:"relative"}},Ge.createElement("div",{ref:Jt,style:{height:"80vh"}}))),Ge.createElement("div",{className:"tr"},Ge.createElement(bt.ZP,{size:"large",onClick:Ri,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var rn=qe,Kn=Me(98813),Zn=Me(37720);const $t=Kn.ZP.Group,Nn={margin:"0 8px"};var Zt=({callback:Ot,onCancel:_t})=>{function Ct(Jt){Ot(Jt)}return fe.createElement(rt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ct},fe.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},fe.createElement("span",{style:Nn},"\u5355\u5143\u683C\u6570\uFF1A"),fe.createElement("span",{style:Nn},"\u884C\u6570"),fe.createElement(rt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},fe.createElement(Zn.Z,null)),fe.createElement("span",{style:Nn},"\u5217\u6570"),fe.createElement(rt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},fe.createElement(Zn.Z,null))),fe.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},fe.createElement("span",{style:Nn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),fe.createElement(rt.default.Item,{name:"align"},fe.createElement($t,null,fe.createElement(Kn.ZP,{value:"default"},fe.createElement("i",{className:"fa fa-align-justify"})),fe.createElement(Kn.ZP,{value:"left"},fe.createElement("i",{className:"fa fa-align-left"})),fe.createElement(Kn.ZP,{value:"center"},fe.createElement("i",{className:"fa fa-align-center"})),fe.createElement(Kn.ZP,{value:"right"},fe.createElement("i",{className:"fa fa-align-right"}))))),fe.createElement("div",{className:"flex-container flex-end"},fe.createElement(bt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),fe.createElement(bt.ZP,{type:"ghost",onClick:_t},"\u53D6\u6D88")))},qn=Me(59637),$n=Me(61016),oi=Me.n($n),fr=(0,fe.forwardRef)(({use3d:Ot,width:_t,height:Ct,callback:Jt,showSaveButton:ci},Xn)=>{const _n=(0,fe.useRef)(),It=(0,fe.useRef)(),[hn,Ci]=(0,fe.useState)(!1),Ri=(0,fe.useRef)({id:_n,appName:"graphing",width:_t||1e3,height:Ct||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,fe.useEffect)(()=>{It.current=new(oi())(Ri.current,!0),window.onload=function(){It.current.inject("applet_container")}},[]);const Ln=()=>{var Rt=window.ggbApplet.getPNGBase64(1,!0,72);return Jt&&Jt(Rt),Rt};return(0,fe.useEffect)(()=>{Ri.current.appName=hn?"3D":"graphing",It.current.inject("applet_container")},[hn]),(0,fe.useEffect)(()=>{Ci(Ot)},[Ot]),(0,fe.useImperativeHandle)(Xn,()=>({getImgData:Ln})),fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:_n}),fe.createElement(pn.Z,{align:"middle"},fe.createElement(ze.Z,{flex:1},fe.createElement(qn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:hn,onChange:Rt=>Ci(Rt)})),fe.createElement(ze.Z,null,fe.createElement(bt.ZP,{size:"large",onClick:Ln,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),wr=Me(36527),Li=Me(2453);const Ai="link",Ur="upload-image",Yn="add-flowchart",Rn="draw-image",sr="add-flowchart",xr="code-block",Ni="add-table",lr="------------",mo={default:lr,left:`:${lr}`,center:`:${lr}:`,right:`${lr}:`};var pi=Me(99914);function ti(){}let hi=0;const Ii=1e4,ir="\u2581",zi="@\u2581\u2581@",an="@\u2581@",we=`
|
|
**\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`,Ut=["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 en(Ot){return/^\d+$/.test(Ot)?`${Ot}px`:Ot}const xn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",In={[xn+"-B"]:"bold",[xn+"-I"]:"italic"},ni={[Ai]:"\u6DFB\u52A0\u94FE\u63A5",[xr]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ur]:"\u6DFB\u52A0\u56FE\u7247",[Rn]:"\u6DFB\u52A0\u753B\u56FE",[Yn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Ni]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ui=({defaultValue:Ot="",onChange:_t,width:Ct="100%",height:Jt=400,miniToolbar:ci=!1,isFocus:Xn=!1,watch:_n,insertTemp:It,mode:hn="markdown",id:Ci="markdown-editor-id",showResizeBar:Ri=!1,noStorage:Ln=!1,showNullButton:Rt=!1,showNullProgramButton:Si=!1,hidetoolBar:Zi=!1,fullScreen:Wr=!1,onBlur:En,onCMBeforeChange:li,onFullScreen:bo,className:La="",disablePaste:sa=!1,disabled:Yi=!1,disabledFill:Wi=!1,placeholder:er="",values:Mo="",extraUse:ra})=>{const[ai,Mr]=(0,fe.useState)(null),[ml,xs]=(0,fe.useState)(Ot),[$a,Wt]=(0,fe.useState)(_n),[$i,Vo]=(0,fe.useState)(Wr),[Pr,Ia]=(0,fe.useState)(""),[zo,na]=(0,fe.useState)(0),[Fo,_o]=(0,fe.useState)(Jt),[da,bn]=(0,fe.useState)(!1),[Ga,Sn]=(0,fe.useState)(0),[Zo,js]=(0,fe.useState)(0),Vr=(0,fe.useRef)(),Ll=(0,fe.useRef)(),Ha=(0,fe.useRef)(),$o=(0,fe.useRef)();(0,fe.useEffect)(()=>{const Nr=window.scrollY||window.pageYOffset;xs(Mo),ai==null||ai.setValue(Mo),window.scrollTo(0,Nr)},[Mo]),(0,fe.useEffect)(()=>{bo==null||bo($i)},[$i]),(0,fe.useEffect)(()=>{if(Vr.current){let Nr=function(uo,un){var Gr;if(sa){un.preventDefault();return}const Io=un.clipboardData;if(Io){const Va=Io.types.toString(),Ta=Io.items;if(Va==="Files"||Io.types.indexOf("Files")>-1){if(un.preventDefault(),hn=="stex")return;try{let os=Ta[1];((Gr=Ta[0])==null?void 0:Gr.kind)==="file"&&(os=Ta[0]);const Ws=os.getAsFile(),vl=Ws.name.split(".").pop();(0,kn.I)(Ws,yl=>{var xu,Ou,Xt;yl.id?((xu=Ws==null?void 0:Ws.type)==null?void 0:xu.indexOf("image"))>-1?vr.replaceSelection(`<img width="100%" src="/api/attachments/${yl.id}?type=${yl.content_type})" alt="" />`):((Ou=Ws==null?void 0:Ws.type)==null?void 0:Ou.indexOf("video"))>-1?vr.replaceSelection(`<video width="100%" controls src="/api/attachments/${yl.id}"></video>`):((Xt=Ws==null?void 0:Ws.type)==null?void 0:Xt.indexOf("pdf"))>-1?vr.replaceSelection(`<a href="/api/attachments/${yl.id}?type=${Ws.type}&disposition=inline" target="_blank">${Ws.name}</a>`):Ut.includes(vl)?vr.replaceSelection(`<a href="/api/attachments/${yl.id}?type=office&disposition=inline" target="_blank">${Ws.name}</a>`):vr.replaceSelection(`[${Ws.name}](/api/attachments/${yl.id}?type=${yl.content_type})`):(yl==null?void 0:yl.status)===401&&(document.location.href="/user/login")})}catch(os){Li.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const vr=St().fromTextArea(Vr.current,{mode:hn,lineNumbers:!ci,lineWrapping:!0,value:Ot,autoCloseTags:!0,autoCloseBrackets:!0});return vr.on("keyup",function(uo,un){un.keyCode===8&&(uo.getValue()==""?vr.setOption("placeholder",er):vr.setOption("placeholder",null))}),vr.on("keydown",function(uo,un){if(un.keyCode===8){var Gr=nl(uo);Gr&&un.preventDefault()}}),Xn&&vr.focus(),vr.on("paste",Nr),Yi&&vr.on("beforeChange",function(uo,un){(un.origin==="paste"||un.origin==="+input")&&un.cancel()}),Mr(vr),()=>{vr.off("paste",Nr)}}},[]);const Ba=(0,fe.useCallback)(()=>{if(Ll.current)try{}catch(Nr){console.log(Nr,"---- to set md editor body height")}},[Fo,Ll,$i]);(0,fe.useEffect)(()=>{function Nr(){let vr=new zt.Z(uo=>{for(let un of uo)(un.target.offsetHeight>0||un.target.offsetWidth>0)&&(Ba(),ai.setSize("100%","100%"),ai.refresh())});return vr.observe(Vr.current.parentElement),vr}if(ai){const vr=Nr();return()=>{var uo,un;(uo=Vr.current)!=null&&uo.parentElement&&vr.unobserve((un=Vr.current)==null?void 0:un.parentElement)}}},[ai,Ba]),(0,fe.useEffect)(()=>{if(ai){let Nr=[];for(const[vr,uo]of Object.entries(In)){let un={[vr]:()=>{wa(uo)}};Nr.push(un),ai.addKeyMap(un)}return()=>{for(let vr of Nr)ai.removeKeyMap(vr)}}},[ai]),(0,fe.useEffect)(()=>{Wr!==$i&&Vo(Wr)},[Wr]),(0,pi.Z)(()=>{if(!Ln&&zo>0){let Nr=new Date().getTime(),vr=window.sessionStorage.getItem(Ci);Nr>=zo+Ii&&(!vr||vr!==ml)&&(window.sessionStorage.setItem(Ci,ml),bn(!0))}},Ii),(0,fe.useEffect)(()=>{Wt(_n)},[ai,_n]),(0,fe.useEffect)(()=>{ai&&Xn&&ai.focus()},[ai,Xn]),(0,fe.useEffect)(()=>{if($a&&ai){let Nr=function(uo){let un=uo.target;if($o.current){let Gr=un.scrollTop/un.scrollHeight;$o.current.scrollTop=$o.current.scrollHeight*Gr}};const vr=ai.getScrollerElement();return vr.addEventListener("scroll",Nr),()=>{vr.removeEventListener("scroll",Nr)}}},[ai,$a]),(0,fe.useEffect)(()=>{if(ai&&li){let Nr=function(vr,uo){li(vr,uo)};return ai.on("beforeChange",Nr),()=>{ai.off("beforeChange",Nr)}}},[ai,li]),(0,fe.useEffect)(()=>{if(ai&&En){let Nr=function(){En(ai.getValue())};return ai.on("blur",Nr),()=>{ai.off("blur",Nr)}}},[ai,En]);function nl(Nr,vr){var uo=Nr.getDoc(),un=uo.getCursor(),Gr=uo.getLine(un.line),Io=Gr.charAt(un.ch-1),Va=Gr.lastIndexOf("@\u2581@",un.ch),Ta=Gr.lastIndexOf("@\u2581\u2581@",un.ch),os=Va>Ta?Va:Ta,Ws=Va>Ta?3:4;if(zi.indexOf(Io)===-1)return null;if(console.log("change1:",vr,Nr,Gr,un,os,Va,Ta,Io),os>=0&&un.ch-os<5){var vl=os+Ws;return uo.replaceRange("",{line:un.line,ch:os},{line:un.line,ch:vl}),{line:un.line,ch:vl}}return null}(0,fe.useEffect)(()=>{if(ai){let Nr=function(vr,uo){const un=vr.getValue();xs(un),na(new Date().getTime()),vr.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),_t&&(Si?_t(un,zl(un)):_t(un))};return ai.on("change",Nr),()=>{ai.off("change",Nr)}}},[ai,_t]),(0,fe.useEffect)(()=>{if(ai)if(Ot==null)ai.setValue(""),xs("");else{const Nr=window.scrollY||window.pageYOffset;Ot!==ai.getValue()&&(ai.setValue(Ot),xs(Ot),ai.setCursor(Yi?1:ai.lineCount(),0),window.scrollTo(0,Nr))}},[ai,Ot]);const wa=(0,fe.useCallback)(Nr=>{const vr=ai.getCursor(),uo=ai.getSelection();let un=uo.split(`
|
|
`);switch(Nr){case"bold":return ai.replaceSelection("**"+uo+"**"),uo===""&&ai.setCursor(vr.line,vr.ch+2),ai.focus();case"italic":return ai.replaceSelection("*"+uo+"*"),uo===""&&ai.setCursor(vr.line,vr.ch+1),ai.focus();case"code":return ai.replaceSelection("`"+uo+"`"),uo===""&&ai.setCursor(vr.line,vr.ch+1),ai.focus();case"inline-latex":return Ia("inline-latex"),ai.focus();case"latex":return ai.replaceSelection("```latex\n"+uo+"\n```"),ai.setCursor(vr.line+1,uo.length+1),ai.focus();case"line-break":return ai.replaceSelection(`<br/>
|
|
`),ai.focus();case"list-ul":return uo===""?ai.replaceSelection("- "+uo):ai.replaceSelection(un.map(Gr=>Gr===""?"":`- ${Gr}`).join(`
|
|
`)),ai.focus();case"list-ol":return uo===""?ai.replaceSelection("1. "+uo):ai.replaceSelection(un.map((Gr,Io)=>Gr===""?"":`${Io+1}. ${Gr}`).join(`
|
|
`)),ai.focus();case"add-null-ch":return uo===""&&ai.setCursor(vr.line,vr.ch),ai.replaceSelection(ir),ai.focus();case"add-signal":return uo===""&&ai.setCursor(vr.line,vr.ch),ai.replaceSelection(an),ai.focus();case"add-multiple":return uo===""&&ai.setCursor(vr.line,vr.ch),ai.replaceSelection(zi),ai.focus();case"inster-template-1":return uo===""&&ai.setCursor(vr.line,vr.ch),ai.replaceSelection(we),ai.focus();case"eraser":return ai.setValue(""),ai.focus();case"trigger-watch":return Wt(!$a),ai.focus();case"trigger-full-screen":return Vo(!$i),ai.focus();case Ai:Ia(Ai);return;case xr:Ia(xr);return;case Ur:Ia(Ur);return;case Rn:Ia(Rn);return;case"maths-latex":Ia("maths-latex");return;case Yn:Ia(Yn);return;case Ni:Ia(Ni);return;default:throw new Error}},[ai,$a,$i]),ki=(0,fe.useCallback)((Nr,vr)=>{var uo,un,Gr,Io,Va,Ta;switch(Ia(""),Pr){case Ai:const{title:xu,link:Ou}=Nr;return ai.replaceSelection(`[${xu}](${Ou})`),ai.focus();case xr:const{language:Xt,content:El}=Nr;return ai.replaceSelection(["```"+Xt,El,"```"].join(`
|
|
`)),ai.focus();case"maths-latex":for(var os=atob(Nr),Ws=new Uint8Array(os.length),vl=0;vl<os.length;vl++)Ws[vl]=os.charCodeAt(vl);var yl=new Blob([Ws],{type:"image/png"});(0,kn.I)(yl,Bo=>{Bo.id?ai.replaceSelection(``):(Bo==null?void 0:Bo.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":ai.replaceSelection("`$$"+Nr+"$$`");break;case Ur:case Rn:case sr:const{src:Gl,alt:wu}=Nr,vs=vr,Yu=(Gr=(un=(uo=vs==null?void 0:vs.name)==null?void 0:uo.split("."))==null?void 0:un.pop)==null?void 0:Gr.call(un);return((Io=vs==null?void 0:vs.type)==null?void 0:Io.indexOf("image"))>-1||!(vs!=null&&vs.type)?vs!=null&&vs.align||vs!=null&&vs.width?ai.replaceSelection(`<p style="text-align:${vs.align||"initial"}"><img width="${vs.width?vs.width+"%":"initial"}" src="${Gl}" alt="${wu||""}" /></p>`):ai.replaceSelection(`<img width="100%" src="${Gl}" alt="${wu||""}" />`):((Va=vs==null?void 0:vs.type)==null?void 0:Va.indexOf("video"))>-1?ai.replaceSelection(`<video width="100%" controls src="${Gl}"></video>`):((Ta=vs==null?void 0:vs.type)==null?void 0:Ta.indexOf("pdf"))>-1?ai.replaceSelection(`<a href="${Gl}?type=${vs.type}&disposition=inline" target="_blank">${vs.name}</a>`):Ut.includes(Yu)?ai.replaceSelection(`<a href="${Gl}?type=office&disposition=inline" target="_blank">${vs.name}</a>`):ai.replaceSelection(`[${vs.name}](${Gl})`),ai.focus();case Ni:const{row:Hh,col:yh,align:Ka}=Nr;let Ko=`
|
|
`;for(let Bo=0;Bo<Hh;Bo++){let ia=[],Ua=[];for(let cs=0;cs<yh;cs++)Bo===1&&Ua.push(mo[Ka]),ia.push(" ");Bo===1&&(Ko+=`| ${Ua.join(" | ")} |
|
|
`),Ko+=`| ${ia.join(yh===1?"":" | ")} |
|
|
`}return ai.replaceSelection(Ko+`
|
|
`),ai.focus();default:throw new Error}},[ai,Pr]),$e=(0,fe.useMemo)(()=>{switch(Pr){case Ai:return fe.createElement(Qe,{callback:ki,onCancel:rs});case xr:return fe.createElement(mn.Z,{callback:ki,onCancel:rs});case Ur:return fe.createElement(kn.Z,{callback:ki,onCancel:rs});case Yn:return fe.createElement(rn,{callback:ki,onCancel:rs});case Ni:return fe.createElement(Zt,{callback:ki,onCancel:rs});case"maths-latex":return fe.createElement(fr,{showSaveButton:!0,callback:ki});case"inline-latex":return fe.createElement(wr.Z,{showSaveButton:!0,callback:ki});default:return null}},[Pr]);function rs(){Ia("")}(0,fe.useEffect)(()=>{if(Ha.current){let Nr=function(Va){Gr=!0,Io=Va.pageY},vr=function(){Gr=!1},uo=function(Va){if(Gr){let Ta=Va.pageY-Io;Ta<0&&(Ta=0),Ta>300&&(Ta=300);let os=Jt+Ta+"px";_o(os)}},un=Ha.current,Gr=!1,Io=0;return un.addEventListener("mousedown",Nr),document.addEventListener("mousemove",uo),document.addEventListener("mouseup",vr),()=>{un.removeEventListener("mousedown",Nr),document.removeEventListener("mousemove",uo),document.removeEventListener("mouseup",vr)}}},[ai,Ha]),(0,fe.useEffect)(()=>{_o(Jt)},[Jt]);const hu=en(Ct),cu=en(Fo),ul={width:hu,height:cu},kl=(0,fe.useMemo)(()=>{if(zo){let Nr=new Date(zo),vr=Nr.getHours(),uo=Nr.getMinutes(),un=Nr.getSeconds();return vr=vr<10?"0"+vr:vr,uo=uo<10?"0"+uo:uo,un=un<10?"0"+un:un,`${vr}:${uo}:${un}`}return 0},[zo]),zl=Nr=>{const vr=[];if(Si){let uo=-1;Nr=Nr.replace(/(@▁▁@|@▁@)/g,function(un,Gr,Io){vr.push({multiLine:un!==an})})}return vr};function sh(){window.sessionStorage.removeItem(Ci),bn(!1),na(0)}function Su(){bn(!1),na(0),ai.setValue(window.sessionStorage.getItem(Ci))}(0,fe.useEffect)(()=>{ni[Pr]&&Pr!==Rn&&Pr!==Yn&&setTimeout(()=>{const Nr=document.getElementsByClassName("markdown-popup-form")[0],vr=window.innerWidth/2-Nr.offsetWidth/2,uo=window.innerHeight/2-Nr.offsetHeight/2;Sn(vr),js(uo)},0)},[Pr]);const Ra=Nr=>{Nr.preventDefault();const vr=Nr.clientX-Ga,uo=Nr.clientY-Zo;document.body.onmousemove=un=>{let Gr=un.clientX-vr,Io=un.clientY-uo;const Va=document.getElementsByClassName("markdown-popup-form")[0],Ta=window.innerWidth-Va.offsetWidth,os=window.innerHeight-Va.offsetHeight;Gr=Math.max(0,Math.min(Gr,Ta)),Io=Math.max(0,Math.min(Io,os)),qa(un.clientX,un.clientY,vr,uo)&&(Sn(Gr),js(Io))},document.body.onmouseup=function(){document.body.onmousemove=null}},qa=(Nr,vr,uo,un)=>{const Gr=document.body.clientHeight,Io=document.body.clientWidth;return Nr<20&&uo>Nr||Nr>Io-20&&uo<Nr||vr<20&&un>vr||vr>Gr-20&&un<vr?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:"markdown-editor-wrapper",ref:Ll},fe.createElement("div",{className:`markdown-editor-container ${La} ${$a?"on-preview":""} ${ci?"mini":""} ${$i?"full-screen":""}`,style:ul},fe.createElement(Re,{insertTemp:It,watch:$a,fullScreen:$i,showNullButton:Rt,showNullProgramButton:Si,onActionCallback:wa,hidetoolBar:Zi,extraUse:ra}),fe.createElement("div",{className:"markdown-editor-body"},fe.createElement("div",{className:"codemirror-container"},fe.createElement("textarea",{ref:Vr,placeholder:er})),$a?fe.createElement("div",{ref:$o,className:"preview-container"},hn==="stex"&&fe.createElement(Nt,{value:ml}),hn!=="stex"&&fe.createElement(Ft.Z,{disabledFill:Wi,showProgramFill:Si,value:ml})):null))),Ri?fe.createElement("a",{ref:Ha,className:"editor-resize"}):null,Pr===Rn&&fe.createElement(Gt,{callback:ki,onCancel:rs}),Pr===Yn&&fe.createElement(rn,{callback:ki,onCancel:rs}),fe.createElement(tt.Z,null,ni[Pr]&&Pr!==Rn&&Pr!==Yn?fe.createElement(At.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Ga,top:Zo},title:fe.createElement("div",{style:{cursor:"move"},onMouseDown:Ra},ni[Pr]),open:!0,onCancel:rs,footer:null,destroyOnClose:!0,width:Pr===Yn?"1200px":null,height:Pr===Yn?"80vh":null,className:"markdown-popup-form"},$e):null))}},70859:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Oe},I:function(){return tt}});var fe=Me(91773),Ke=Me(2453),St=Me(28802),zt=Me(78957),ft=Me(37720),Be=Me(98813),He=Me(85804),gt=Me(15476),it=Me(67294),st=Me(67294),Ft=Object.defineProperty,Nt=Object.defineProperties,Bt=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ue=(rt,Je,bt)=>Je in rt?Ft(rt,Je,{enumerable:!0,configurable:!0,writable:!0,value:bt}):rt[Je]=bt,se=(rt,Je)=>{for(var bt in Je||(Je={}))ne.call(Je,bt)&&ue(rt,bt,Je[bt]);if(Ae)for(var bt of Ae(Je))te.call(Je,bt)&&ue(rt,bt,Je[bt]);return rt},pe=(rt,Je)=>Nt(rt,Bt(Je));const{useForm:ve}=fe.default,Se={width:280,marginRight:10},Pe={labelCol:{span:5},wrapperCol:{span:19}};var Oe=({callback:rt,onCancel:Je})=>{const[bt]=ve();let lt=(0,it.useRef)();function Lt(dn){lt.current.width=bt.getFieldValue("width"),lt.current.align=bt.getFieldValue("align"),rt(dn,lt.current)}function Mt(dn,tn){if(dn.status===-1){Ke.ZP.error(dn.message);return}bt.setFieldsValue({src:`/api/attachments/${dn.id}`,type:tn.type})}function pt(dn){let tn=dn.target.files[0];lt.current=tn,tt(tn,Mt)}return st.createElement(fe.default,pe(se({form:bt},Pe),{className:"upload-image-panel",onFinish:Lt,style:{width:470,overflow:"hidden"}}),st.createElement(fe.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},st.createElement("div",{className:"flex-container"},st.createElement(fe.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},st.createElement(St.default,{style:Se})),st.createElement(Re,{onFileChange:pt}))),st.createElement(fe.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},st.createElement(St.default,{style:{width:264}})),st.createElement(fe.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},st.createElement(zt.Z,null,st.createElement(fe.default.Item,{name:"width",style:{margin:0}},st.createElement(ft.Z,{style:{width:264}})),st.createElement("span",{className:"ml8"},"%"))),st.createElement(fe.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},st.createElement(Be.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"}]})),st.createElement("aside",null,st.createElement(fe.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},st.createElement(He.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),st.createElement(He.ZP,{type:"default",onClick:Je},"\u53D6\u6D88"))))};function Re({onFileChange:rt}){return st.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",st.createElement("input",{type:"file",onChange:rt}))}function tt(rt,Je){if(!rt)throw new String("\u6CA1\u6709\u6587\u4EF6");let bt=new FormData;bt.append("editormd-image-file",rt),bt.append("file_param_name","editormd-image-file"),bt.append("byxhr","true");var lt=new window.XMLHttpRequest;lt.withCredentials=!0,lt.addEventListener("load",function(Lt){Je(JSON.parse(Lt.target.responseText),rt)},!1),lt.addEventListener("error",function(Lt){console.error(Lt)},!1),lt.open("POST",`${gt.KI}/api/attachments.json`),lt.send(bt)}},76621:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return St}});var fe=Me(67294),Ke=Me(73935);class St extends fe.Component{constructor(ft){super(ft);const Be=window.document;this.node=Be.createElement("div"),Be.body.appendChild(this.node)}render(){const{children:ft}=this.props;return(0,Ke.createPortal)(ft,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(Cn,On,Me){"use strict";Me.d(On,{SV:function(){return mt},ZP:function(){return Gt}});var fe=Me(67294),Ke=Me(91033);const St={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"]},zt={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"]},ft={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(`
|
|
`)}]},Be={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(`
|
|
`)}]},He={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 gt=Me(84204),it=Me.n(gt),st=(Et,on,Yt)=>new Promise((ze,be)=>{var Ce=Fe=>{try{Ge(Yt.next(Fe))}catch(qe){be(qe)}},De=Fe=>{try{Ge(Yt.throw(Fe))}catch(qe){be(qe)}},Ge=Fe=>Fe.done?ze(Fe.value):Promise.resolve(Fe.value).then(Ce,De);Ge((Yt=Yt.apply(Et,on)).next())});const Ft={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"]}},Nt=(Et,on,Yt,ze)=>{const be=on.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:Yt.lineNumber,endColumn:Yt.column});return Array.from(new Set(be.match(/\b\w{2,}\b/g)||[])).map(De=>({label:De,kind:Et.languages.CompletionItemKind.Text,insertText:De,range:ze}))},Bt=(Et,on,Yt,ze)=>{Et.languages.registerCompletionItemProvider(on,{provideCompletionItems(be,Ce){const De=be.getWordUntilPosition(Ce),Ge={startLineNumber:Ce.lineNumber,endLineNumber:Ce.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},Fe=be.getLineContent(Ce.lineNumber).substring(De.startColumn-2,De.endColumn);return{suggestions:[...Nt(Et,be,Ce,Ge),...Yt.map(rn=>({label:rn,kind:Et.languages.CompletionItemKind.Keyword,documentation:rn,insertText:rn,insertTextRules:Et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ge})),...ze.map(rn=>({label:rn.label,kind:Et.languages.CompletionItemKind.Snippet,documentation:rn.content,insertText:Fe.startsWith("#")?rn.content.replace(/#/,""):rn.content,insertTextRules:Et.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ge}))]}}})};var Ae=Et=>{Ft.languages.forEach(on=>{Et.languages.registerDocumentFormattingEditProvider(on,{provideDocumentFormattingEdits(Yt){return st(this,null,function*(){const ze=it()(Yt.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:Yt.getFullModelRange(),text:ze}]})}})}),Bt(Et,"java",zt.keywords,zt.quickKey),Bt(Et,"cpp",ft.keywords,ft.quickKey),Bt(Et,"c",St.keywords,[]),Bt(Et,"python",Be.keywords,Be.quickKey),Bt(Et,"scala",He.keywords,He.quickKey)};const ne="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var te=Object.defineProperty,ue=(Et,on,Yt)=>on in Et?te(Et,on,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):Et[on]=Yt,se=(Et,on,Yt)=>ue(Et,typeof on!="symbol"?on+"":on,Yt);const pe=class px{constructor(on,Yt,ze){this.placeholder=on,this.editor=Yt,this.monaco=ze,Yt.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return px.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};se(pe,"ID","editor.widget.placeholderHint");var Se=pe,Pe=Me(84144),Oe=Me(2453),Re=Me(83062),tt=Me(96486),rt=Me(33054),Je=Me(74855),bt=Object.defineProperty,lt=Object.defineProperties,Lt=Object.getOwnPropertyDescriptors,Mt=Object.getOwnPropertySymbols,pt=Object.prototype.hasOwnProperty,dn=Object.prototype.propertyIsEnumerable,tn=(Et,on,Yt)=>on in Et?bt(Et,on,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):Et[on]=Yt,vn=(Et,on)=>{for(var Yt in on||(on={}))pt.call(on,Yt)&&tn(Et,Yt,on[Yt]);if(Mt)for(var Yt of Mt(on))dn.call(on,Yt)&&tn(Et,Yt,on[Yt]);return Et},Tn=(Et,on)=>lt(Et,Lt(on)),Ve=(Et,on)=>{var Yt={};for(var ze in Et)pt.call(Et,ze)&&on.indexOf(ze)<0&&(Yt[ze]=Et[ze]);if(Et!=null&&Mt)for(var ze of Mt(Et))on.indexOf(ze)<0&&dn.call(Et,ze)&&(Yt[ze]=Et[ze]);return Yt},Ze=(Et,on,Yt)=>new Promise((ze,be)=>{var Ce=Fe=>{try{Ge(Yt.next(Fe))}catch(qe){be(qe)}},De=Fe=>{try{Ge(Yt.throw(Fe))}catch(qe){be(qe)}},Ge=Fe=>Fe.done?ze(Fe.value):Promise.resolve(Fe.value).then(Ce,De);Ge((Yt=Yt.apply(Et,on)).next())});function Qe(Et){return/^\d+$/.test(Et)?`${Et}px`:Et}function mn(){}let kn=!1;const At={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function pn(Et=[]){let on=Et;if(Array.isArray(Et)){for(let Yt=0;Yt<Et.length;Yt++){let ze=At[Et[Yt]];if(ze)return ze}return on[0]}return At[on]||on}let ln=null;const jn=()=>Ze(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(Et){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",Et)}});var Gt=Et=>{var on=Et,{width:Yt="100%",height:ze="100%",value:be,language:Ce="javascript",style:De={},options:Ge={},overrideServices:Fe={},theme:qe="vs-dark",onEditBlur:rn,isCopy:Kn=!1,onSave:Zn,autoHeight:$t=!1,forbidCopy:Nn=!1,onChange:Zt=mn,editorDidMount:qn=mn,onFocus:$n=mn,onBreakPoint:oi=mn,breakPointValue:ri=[],filename:fr="educoder.txt",errorLine:wr,errorContent:Li="",highlightLine:Ai,openBreakPoint:Ur=!1,placeholder:Yn="",showMiniMap:Rn=!0}=on,sr=Ve(on,["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 xr=(0,fe.useRef)(),Ni=(0,fe.useRef)({}),lr=(0,fe.useRef)(),mo=(0,fe.useRef)(),pi=(0,fe.useRef)([]),ti=(0,fe.useRef)(!1),hi=(0,fe.useRef)(),Ii=(0,fe.useRef)(),ir=(0,fe.useRef)(!1),[zi,an]=(0,fe.useState)(!1);function we(){let It;return xr.current&&(It=new Ke.Z(hn=>{for(let Ci of hn)(Ci.target.offsetHeight>0||Ci.target.offsetWidth>0)&&Ni.current.instance.layout()}),It.observe(xr.current)),It}function Ut(){Oe.ZP.warning({content:decodeURIComponent(ne),key:"monaco-editor-tip"})}const en=()=>{let It=Ni.current.instance;if(be!=null&&It&&zi){const hn=It.getModel();hn&&be!==hn.getValue()&&(kn=!0,hn.setValue(be),It.layout(),kn=!1)}};(0,fe.useEffect)(()=>{const It=rt.Z.subscribe("formatDocument",hn=>{var Ci;let Ri=Ni.current.instance;(Ci=Ri==null?void 0:Ri.getAction)==null||Ci.call(Ri,"editor.action.formatDocument").run()});return window.updateMonacoValue=hn=>{Zt(hn)},It},[]),(0,fe.useEffect)(()=>{var It;let hn=Ni.current.instance;mo.current&&clearTimeout(mo.current),mo.current=setTimeout(()=>{en()},500),be&&(be!=null&&be.length)&&((It=hn==null?void 0:hn.updateOptions)==null||It.call(hn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(be.split(/\r\n|\r|\n/g).length))+3,5)}))},[be,zi,Ni.current]),(0,fe.useEffect)(()=>{if(wr&&Ni.current&&Ni.current.instance){let hn=Ni.current.instance;hn.changeViewZones(function(Ci){var Ri=document.createElement("div");Ri.style.padding="10px 20px",Ri.style.width="calc(100% - 20px)",Ri.className="my-error-line-wrp",Ri.innerHTML=Li,Ci.addZone({afterLineNumber:wr||11,heightInLines:3,domNode:Ri})});var It={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}};hn.addOverlayWidget(It),hn.revealPositionInCenter({lineNumber:20,column:1})}},[wr,Ni.current,zi]);const cn=(It="",hn)=>{if(!It||It.trim()==="")return!0;const Ri=Ni.current.instance.getModel().getLineTokens(hn);let Ln=!1;for(let Rt=0;Rt<2;Rt++)Ri.getStandardTokenType(Rt)===1&&(Ln=!0);return Ln};(0,fe.useEffect)(()=>{var It;const hn=(It=Ni.current)==null?void 0:It.instance;if(hn&&zi&&Nn){const Ci=hn.onDidBlurEditorWidget(()=>{ir.current=!1}),Ri=hn.onDidFocusEditorText(()=>{ir.current=!0});return()=>{Ci.dispose(),Ri.dispose()}}},[Ni.current,zi,Nn]),(0,fe.useEffect)(()=>{var It;if((It=Ni.current)!=null&&It.instance&&zi&&Ur){let hn=Ni.current.instance,Ci=hn.getModel();if(!Ci)return;(()=>{var Yi;let Wi=[],er=[];const Mo=Ci.getAllDecorations();for(let ai of Mo)ai.options.className==="highlighted-line"&&(Wi.push((Yi=ai==null?void 0:ai.range)==null?void 0:Yi.startLineNumber),er.push(ai==null?void 0:ai.id));if(Ai===Wi[0])return;Ci.deltaDecorations(er,[]);const ra=Ci.getLineCount();Ai&&Ai<=ra&&(hn.deltaDecorations([],[{range:new ln.Range(Ai,1,Ai,Ci.getLineMaxColumn(Ai)),options:{isWholeLine:!0,className:"highlighted-line"}}]),hn.revealLineInCenter(Ai))})();const Ln=(Yi=!1)=>{var Wi;let er=[],Mo=[];const ra=Ci.getAllDecorations();for(let ai of ra)ai.options.linesDecorationsClassName==="breakpoints-select"&&(er.push((Wi=ai==null?void 0:ai.range)==null?void 0:Wi.startLineNumber),Mo.push(ai==null?void 0:ai.id));if(Yi)return{lines:er,ids:Mo};oi(er)},Rt=Yi=>Ze(void 0,null,function*(){let Wi={range:new ln.Range(Yi,1,Yi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ci.deltaDecorations([],[Wi]),Ln()}),Si=Yi=>Ze(void 0,null,function*(){let Wi=[];const er=hn.getLineDecorations(Yi);for(let Mo of er)Mo.options.linesDecorationsClassName==="breakpoints-select"&&Wi.push(Mo.id);yield Ci.deltaDecorations(Wi,[]),Ln()}),Zi=Yi=>{let Wi=hn.getLineDecorations(Yi);for(let er of Wi)if(er.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,tt.isEqual)(ri,Ln(!0).lines)){Ci.deltaDecorations(Ln(!0).ids,[]);const Yi=ri.map(Wi=>({range:new ln.Range(Wi,1,Wi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ci.deltaDecorations([],Yi)}const Wr=hn.onDidChangeModelContent(Yi=>{let Wi=hn.getPosition();if(Wi){let er=Wi.lineNumber;clearTimeout(Ii.current),Ii.current=setTimeout(()=>{cn(Ci.getLineContent(er),er)?Si(er):Zi(er)?(Si(er),Rt(er)):Ln()},100)}}),En=hn.onMouseDown(Yi=>{var Wi,er,Mo;if(Yi.target.detail&&((Mo=(er=(Wi=Yi.target)==null?void 0:Wi.element)==null?void 0:er.className)!=null&&Mo.includes("line-numbers"))){let ra=Yi.target.position.lineNumber;if(cn(Ci.getLineContent(ra),ra))return;Zi(ra)?Si(ra):Rt(ra)}}),li=Yi=>{let Wi={range:new ln.Range(Yi,1,Yi,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};pi.current=hn.deltaDecorations(pi.current,[Wi])},bo=()=>{pi.current=hn.deltaDecorations(pi.current,[])},La=hn.onMouseMove(Yi=>{var Wi,er,Mo;if(bo(),Yi.target.detail&&((Mo=(er=(Wi=Yi.target)==null?void 0:Wi.element)==null?void 0:er.className)!=null&&Mo.includes("line-numbers"))){let ra=Yi.target.position.lineNumber;if(cn(Ci.getLineContent(ra),ra))return;li(ra)}}),sa=hn.onMouseLeave(()=>{bo()});return()=>{Wr.dispose(),En.dispose(),La.dispose(),sa.dispose()}}},[Ni.current,zi,ri,Ai,Ur,Ce]),(0,fe.useEffect)(()=>{var It;(It=Ni.current)!=null&&It.instance&&Ur&&Ni.current.instance.setPosition({lineNumber:0,column:0})},[Ai]);function xn(){let It=Ni.current.instance;if(It){const hn=It.getSelection(),Ci=Ni.current.pastePos||{},Ri=new ln.Range(Ci.startLineNumber||hn.endLineNumber,Ci.startColumn||hn.endColumn,Ci.endLineNumber||hn.endLineNumber,Ci.endColumn||hn.endColumn);setTimeout(()=>{It.executeEdits("",[{range:Ri,text:""}])},300)}}function In(It){(window.navigator.platform.match("Mac")?It.metaKey:It.ctrlKey)&&It.keyCode==83&&(It.preventDefault(),Zn())}const ni=()=>{if($t&&Ni.current.instance){const It=Ni.current.instance.getContentHeight();Xn(It<ze?ze:It)}else Xn(ze)};function Ui(It){var hn=document.createEvent("MouseEvents");hn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),It.dispatchEvent(hn)}const Ot=It=>{if(!ir.current)return;const{keyCode:hn,ctrlKey:Ci,metaKey:Ri,target:Ln,type:Rt}=It;return(Rt==="paste"||(hn===67||hn===86)&&(Ri||Ci))&&Ln.nodeName==="TEXTAREA"&&(Ut(),It.preventDefault()),!1};function _t(It,hn){var Ci=window.URL||window.webkitURL||window,Ri=new Blob([hn]),Ln=document.createElementNS("http://www.w3.org/1999/xhtml","a");Ln.href=Ci.createObjectURL(Ri),Ln.download=It,Ui(Ln)}(0,fe.useEffect)(()=>{ni()},[ni]),(0,fe.useEffect)(()=>{xr.current&&!zi&&Promise.all([Me.e(5552),Me.e(9651)]).then(Me.bind(Me,55826)).then(It=>{try{ln=It,Ni.current.instance=ln.editor.create(xr.current,{value:be,language:pn(Ce),theme:qe,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Rn||!1}},Fe);const hn=Ni.current.instance;let Ln=[...Pe.BH._menuItems].find(Wr=>Wr[0]._debugName=="EditorContext")[1],Rt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Si=(Wr,En)=>{var li,bo;let La=Wr._first;do En.includes((bo=(li=La.element)==null?void 0:li.command)==null?void 0:bo.id)&&Wr._remove(La);while(La=La.next)};if(qn(hn,ln),setTimeout(()=>{ni(),Ni.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{_t(fr||"educoder.txt",hn.getValue())}})},500),Ni.current.subscription=hn.onDidChangeModelContent(Wr=>{ti.current?clearTimeout(hi.current):(ni(),Zt(hn.getValue(),Wr)),hi.current=setTimeout(()=>{ti.current=!1},500)}),window.Monaco||Ae(ln,pn(Ce)),Nn&&(Si(Ln,Rt),xr.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Ot),window.removeEventListener("paste",Ot),window.addEventListener("keydown",Ot),window.addEventListener("paste",Ot)),window.Monaco=ln,rn&&hn.onDidBlurEditorWidget(()=>{rn(hn.getValue())}),$n&&hn.onDidFocusEditorText(()=>{Nn&&jn(),$n(hn.getValue())}),Nn){jn();try{hn.onDidPaste(Wr=>{const En=hn.getSelection(),li=Ni.current.pastePos||{},bo=new ln.Range(li.startLineNumber||En.endLineNumber,li.startColumn||En.endColumn,li.endLineNumber||En.endLineNumber,li.endColumn||En.endColumn);hn.executeEdits("",[{range:Wr.range,text:""}])})}catch(Wr){}}let Zi=we();return Yn&&typeof Yn=="string"&&new Se(Yn,hn,ln),an(!0),()=>{const Wr=Ni.current.instance;Wr.dispose();const En=Wr.getModel();En&&En.dispose(),Ni.current.subscription&&Ni.current.subscription.dispose(),Zi.unobserve(xr.current)}}catch(hn){}})},[]),(0,fe.useEffect)(()=>{if(Ni.current.instance&&zi)return document.addEventListener("keydown",In,!1),()=>{document.removeEventListener("keydown",In)}},[Zn,zi]),(0,fe.useEffect)(()=>{let It=Ni.current.instance;if(It&&zi){let hn=pn(Ce);ln.editor.setModelLanguage(It.getModel(),hn)}},[Ce,zi]),(0,fe.useEffect)(()=>{Ni.current.instance&&zi&&ln.editor.setTheme(qe)},[qe,zi]),(0,fe.useEffect)(()=>{let It=Ni.current.instance;lr.current=Ge,It&&zi&&(It.updateOptions(vn({},Ge)),setTimeout(()=>{It.getModel().updateOptions(vn({},Ge))},200))},[JSON.stringify(Ge),zi]),(0,fe.useEffect)(()=>{let It=Ni.current.instance;It&&zi&&It.layout()},[Yt,ze,zi]);const[Ct,Jt]=(0,fe.useState)(Qe(Yt)),[ci,Xn]=(0,fe.useState)(Qe(ze)),_n=Tn(vn({},De),{width:Ct,height:ci,position:"relative"});return fe.createElement("div",{className:"my-monaco-editor",ref:xr,style:_n},Kn&&fe.createElement(Je.CopyToClipboard,{text:be,onCopy:()=>Oe.ZP.success("\u590D\u5236\u6210\u529F")},fe.createElement(Re.Z,{title:"\u590D\u5236\u4EE3\u7801"},fe.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},fe.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function mt({width:Et="100%",height:on="100%",original:Yt,modified:ze,language:be,options:Ce={}}){const De=(0,fe.useRef)(),[Ge,Fe]=(0,fe.useState)(null);function qe($t){let Nn;return De.current&&(Nn=new Ke.Z(Zt=>{for(let qn of Zt)(qn.target.offsetHeight>0||qn.target.offsetWidth>0)&&$t.layout()}),Nn.observe(De.current)),Nn}(0,fe.useEffect)(()=>(De.current&&Promise.all([Me.e(5552),Me.e(9404)]).then(Me.bind(Me,50048)).then($t=>{ln=$t;const Nn=ln.editor.createDiffEditor(De.current,Tn(vn({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},Ce),{wordWrap:!0}));Fe(Nn);let Zt=qe(Nn);return()=>{Nn.dispose();const qn=Nn.getModel();qn&&qn.dispose(),Zt.unobserve(De.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,fe.useEffect)(()=>{Ge&&Ge.setModel({original:ln.editor.createModel(Yt,be),modified:ln.editor.createModel(ze,be)})},[Yt,ze,be,Ge]);const rn=Qe(Et),Kn=Qe(on),Zn={width:rn,height:Kn};return fe.createElement("div",{className:"my-diff-editor",ref:De,style:Zn})}},5476:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ft}});var fe={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"},Ke=Me(74330),St=Me(83062),zt=Me(94184),ft=Me.n(zt),Be=Me(28706),He=Me(26194),gt=Me(52262),it=Me(67294),Ft=({className:Nt,dataSource:Bt=[],col:Ae=4,right:ne,bottom:te=23,precision:ue=0,wrapWidth:se=1200,trackEventItems:pe,loading:ve,onRemove:Se=()=>{},isCurrent:Pe=!0,showAlias:Oe=!1})=>{const Re=Math.floor((se-(Ae-1)*ne)/Ae),tt=[{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 it.createElement(Ke.Z,{spinning:ve},it.createElement("div",{className:ft()(fe.list,Nt)},!!(Bt!=null&&Bt.length)&&(Bt==null?void 0:Bt.map((rt,Je)=>{var bt;const{name:lt,id:Lt,identifier:Mt,featured:pt,school_name:dn,image_url:tn,excellent:vn,is_plan:Tn}=rt;return it.createElement("div",{key:Lt,className:fe.wrap,style:{width:Re,marginRight:(1+Je)%Ae===0?0:ne+ue,marginBottom:te}},it.createElement("a",{className:fe.li,onClick:Ve=>{Ve.preventDefault(),Ve.stopPropagation(),pe&&(0,Be.L9)([pe]),(0,Be.xg)(`/paths/${Mt}`)}},it.createElement("div",{className:fe.img},it.createElement("img",{className:fe.cover,src:`${tn}`}),Pe&&(0,gt.bg)()&&(rt==null?void 0:rt.studying)&&it.createElement("div",{className:`${fe.movebq} user-path-items`,onClick:Ve=>{Ve.stopPropagation(),Se(rt)}},it.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),it.createElement("span",{className:"c-red"},"\u79FB\u9664")),(bt=rt==null?void 0:rt.subject_tags)==null?void 0:bt.map((Ve,Ze)=>{var Qe,mn;if(Ze===0){const At=(Qe=tt.find(pn=>pn.name==Ve))==null?void 0:Qe.swimg;return it.createElement("img",{className:fe.sign,src:At,style:{left:"-4px"}})}const kn=(mn=tt.find(At=>At.name==Ve))==null?void 0:mn.ptimg;return it.createElement("img",{className:fe.sign,src:kn,style:{left:`${48+52*(Ze-1)+2*Ze}px`}})}),it.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(rt==null?void 0:rt.excellent)&&it.createElement("div",{className:fe.bq},"\u5F00\u653E\u8BFE\u7A0B"))),it.createElement("div",{className:fe.name},it.createElement(St.Z,{title:Oe&&(rt!=null&&rt.excellent_alias_name)?it.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${lt}`,it.createElement("br",null),it.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${rt==null?void 0:rt.excellent_alias_name}`)):lt},it.createElement("span",{className:fe.e},Oe&&(rt==null?void 0:rt.excellent_alias_name)||lt))),it.createElement(St.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${dn}`},it.createElement("div",{className:fe.unit},it.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),dn)),it.createElement("div",{className:fe.tags},it.createElement("div",null,it.createElement(St.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},it.createElement("span",null,it.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),it.createElement("span",null,rt.stages_count))),it.createElement(St.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},it.createElement("span",null,it.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),it.createElement("span",null,rt.members_count)))))))})),!Bt.length&&it.createElement(He.Z,null)))}},30001:function(Cn,On,Me){"use strict";Me.d(On,{jL:function(){return ft},w9:function(){return Qe},QD:function(){return wr},cQ:function(){return tn.Z},op:function(){return Zt},O5:function(){return en},_b:function(){return sr},t7:function(){return se},Gi:function(){return jn},YG:function(){return pn},qp:function(){return Ft},vr:function(){return Ur},qE:function(){return oi},Je:function(){return Se},wb:function(){return dn},cq:function(){return ze},tp:function(){return Ae}});var fe=Me(67294),Ke={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"},St="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iSy6IqYRnfmPq66YojPILbYbqpGXuhRhRrFPMSUaP+6OTAtuPff8ze97xceK8KuJGG/oBl4XsaKMTTsiwDKVXZjm1qsgRBU84TXi5VXqo24/syP5ce2xEg0gBDeAZWFijo79JnpLQxXSo7iICiIyD8qUfdxuQRRx24x5MvB95uBzfW1G+XFn4GoMMojQNOYWUK45b+jG9mW+PvFNAKEkqVYgI583VZcOB7WRrCqGwiaQovU1lAlaXKM/BMQNIGbN0FLGh0lySCVv0OP3aPOnKf2a2XCm+3ghuc1AvzOdwmLSwIwkQlBoxMtgZYCkvwQLafBYo0l2v6gBcCxRxQyifwM9PckRCniXIGbjo8wiI4bgnRRFul0XAZMABbaggVoytvo12vff7Qt/Rc8LqBm5jQndrBr3MFHOwyemaJbGaaAKzMp00zV2O+6VVnSTCPcYCNdrItEGAOcKxpVUQKLjPZ6VHVgEuf3Kf/rLk0Y4ViTpiAEUYKJaEgVDg2OTq1+j3r5w68FHi7TXFDU/El1Yr8VLudDM4IjUpLVWW2Mg0GgubybATNfN/0C5+eqjQ9oO0ngAmR0ZF5X2bKjLRZBUFgNE03AKhcPqk62wJsm+qjvyM4Aa0idFN1zcmvHraq90uvObihqej4YsH6nzCEyHwRB0WFZeZJ05xupsZSp6sty+2mXX2a/5rP0fT8MAHRZpmWph48J38zi6xUF1Vqft9KAg2BES6PmyChGGFTBVJ1kb/dq7XeeuTBs0deLLxXrLhHn2nP6+4s3Gk7Yl6Q5mpZMMjAGWjT0o+dgkR6BVnUzJSW2PpzhpHVqIygdPiEET3rzwiHP2QCSlrjUm1epE0el+R1/E6SmjDa2nGEat5Bu9089bC9O7/1moDT0GJkMv5eR6f1oVY7MRfjp2SiNgOO5pkFBpnkadmD/qflRrAtiUrBhJFdPnauJhI6SU6noXSyb2BmUZUqzYKEqSSSZ6SUSU34WagYVUsg9N27R7DtkONWrmRcf8HHK1Lc4EjrqHJn6ZdxBIsXkXU2MqVZqU/ja5ZU/MyWR5/Bps1/wfD2p+G7TUy1QziWRHfZgVXsREd3H1YtnoW+vl709nSjv7f0V4MwPnRaRUGlxSm8rG7N0pAMlim/CE4Jk+tRbTxmAoYK4Qit/Mhb9/a9eze9ILW/YQwv5jvmM/fcs720YMnMDeWStabtJrmVUVaqtsy3sRqgAm+96yH85qbb4DZqWNjfi57uHlRKJViWjSCM0Wr5aDRaqDebqDeaqLkRLFugp7OIQudMrFn+JvT3z8Ee8+dgVldxp+tkpUB42ZZgqLrEnyUq89MkODkunjVVoREFMao5G367een6lZ2fejEQXrbiBgbbn+qZUbyETcWs2KZ/Ynsoi6aMgEPjLVz6Xz/B1OjT2P8tyzB7Zm/i6IMQYRghDGk2ielkLaKIPiiM4PshGk0XzWYDU40a6m6Ickmi3N2Lt+y1B5a+eQ+sXLIQM7rLxi1QiR47I2l3xPizFFyitsQnmqhq8juNks1go2BrDRG4WwMv3veItT1TLwTvZYH7w0NP9y7sn3NPqSgXMiCYRuNz1MbE9eEnRnDhpVdh1fxu7L1iCYIwghcECKMYUfaMY4Rh8jogxJgQNQjP+CECpUK4H8bwPR8tgmzW0Ao8lEsW+vrn4sA1S7Fs2VKsXDIP1UrO3BymMD7PEwvj6wJjnjTTJFAEsUJOJj4y8iMUWIfE8bp1Kzs2virgtg23PtHTV7os9JI0wASFNPWg4vI54LGBMZz/je/i71YvQv/sWXA9D2EYIooiAzCOYoRxDM/z4Xo+PC+Az2MR31NpkU4fpKGUQKRkoiSCjCSiSCAKVPLddgON9hQsK0TXjA7su3YVDjt0Hdbu82ZzbQYgVZb6OJOW0GQjZW54XtACInTkHXjt5kXr9+r4zG4Hd/bZZ8uTTz1rY7liHxiHiR9h+sFAQHNxJMulCGed/x2jtHlv6ofruogILaZpEl6MIAiML2u1XQRhaIDxeKZGqoEAObgoTkBGkUp7bvRRfC0QRpZRkYqk6SjHcYDQryNXVNj/oLX4yIc/iMULZyVVSFr0GxVmlQWDg0xSFG5j372rV1fXr1wpdhldX7Kpbn2mtbqrs7jRkqLIC6VDzgIBwZUKwGXfuwFjA49g331WoO26CSwDh/BieK6HyakaPM9LTZbv0WQJL0r2o9ioMkhN2gDka0JkDhYpExW1FtCQEMKGlg6gbWhTxjPFaKBvZgUfP/njOHz9WrRS5QXG9AkvzeXoHxXrVw0n9puxEm8+dGVlaFeqe8ngBifiT1Y65aUha7+0+M7Sj0IeeOixYXznO1fiHQfvY1REs4wiBoIAcRQZkBOTk/B9P1GSCRBBoraQn/dTmDxOiATGLV+nioxjA49wINjAY4YtIaQFwX1hQYtkn/AtW+Okfzsdf/+OA9H2Uj+XdoiZltBebaGh2a9DrONYvfdtK8q/2L3gaurXxaI4WqUJJH2ETTPltVsaX73wvzG7IjGrrwce4RhoieKCMMDY+LiBZ2AwGJjAQKg0Sx6jCrWBmQAlTJo3vx+ZvIvOXLBEEAJCMPFNQrkBBwnNfcuGMFAFlIqRyxdw+he/gv1WL0PDTftzSicd41jBYaURa/SUHLTrjc+vX9mxy47JS1LcpoGB4qKOuZvzebFMpyUPT0BoTD023P0wfvWL67DfPsvhut4O80z8Woip+hQma41UWVQRDMwEXIQ43Se4OApSYEAYeAijwADSmp1RghPGt3Kb5MMJxEx9VJ2QNu8mYNlQUYj+hUtx9nnnolIpw83KrrSSMOCURmfOQejWr37bis6P7DbFba/ptZal77SlyPFy6WC5ZedBKYWLLrkKs6oOCvl8AoR+zWwjeL6L4dFRuJ5CEGpTsEeBQBD4iFWMWEWIwjpU6Ca+kNswNll+zCgECSkcKM02CQtS/nK0oxPDFDzRIYFSfYRIcFRfzgDktRz7z5/E8Scci7ar0g4xc0aePen0VaSAiLxHutVTe6/cRfn1khQ3OBEdU6xYv4oZbzjJopJISrX96aFtuOaH12D5ogXw/QABVZQFhCDC5NQ4xienEIQCbijh+RKTvXPhVYrIPTGAXLOOOJ4AwhAxzTKomTTEdHy1l/guc5voWTmXSPWFSVAwf7FRH83YuD5jxgQooS3HqE9Bomf2fJx9wcXo7KjAp3swLSZApjPeJUvDioLBkttYvHZtf/v5VPeSwD09Fp9Z7pDnEhzvD1MEqo2d2ut+swEPbr4fM3p7jIqYbhjlBKHxdcMjQ0ZtXmjDbSsMLFqJx048AWDWv/kvWPjNy2DXB5hXAHEIpZqwZNVct1INSFkyoJRyE1g6hjaFnp2IDyrxezqFaMClHQdjsjljsrzuk8/4Cg46ZF9zPQYc05k0qpYswFH+uCW9VYcsm7F994CbiL5fKlkf4lyC1nSswnRlWcBfftVP0RgZRqGQR2jKKd/4JZrpxOQExicmEIQWvDCHhu9gyz99FN76VQCt0AZmnnUxSg/cAUuGEKoJaBdSZjVpBCk7EnDahxRlKHCfjbccNPMis29mWSGMH6TqNKQxWStJVayccQvrjv4ATj7lRLTcpL1k2kym0GUJJlASvuvo6JADV3RtfsngbtXa3gsoBA3k3Rakb8GtiuiaUtk+xveUqRjoU9gmKuYFLr/yGkwMjSBH5xrQ4dNPBaYiGBwehOu24QUCXuhgSnTjsTPOQDxvRjqjrNB31tdRfvwB5O0cEI9BaA9SVhCpGqA56+NAa/oIC5AER2XlmfdDhT60FLBoxlYAof0UnjLukAo1arPyxhev2vcAnHbWOSaJNmWe6elRCAm4TukrS0XvOGivrt+9aHDba8GaQt56r4A8XADztYIVKgimXH6M7iDUebackzJLIm8LlIsSP/jRz/HU1ieQcywDLnHwAWq1BsbGR5M6lYrzJEZmLsHw5z8LlOm0AWwfQ885X0Ol/oypHRFPwpZF2FYXwngEgoBEHpEaNwpTyJsqROsCgupMtFeshLt8Oap/ug8d998CKQgvgICfRFppm/QEBAdg1oIlOOMrF6BcLsAPlCnHIjPvClQcgW4nhFThPxy8ovPXLwjugaGh8uxyzwXlvPOxsoPC9PUaZpYoLZobHtAMtAEhoVDKSXSUHdy+YSN+d9MGFKm4NK0gwKHhUTSaNZPL+ZEFzwXGVrwNk6edlkDjHMLmrei78DzkLR8W18qoEUiRgxR5xKoJ2+ox4EJVh5B9UDqPel8vWgccAW/Naug5Myk84OkJzDn3FOTbIwacFASXJMSC/XOZhxISHTP6ceZ5F6GzuxNekEb5IKlIOvISvU7AhPiog5ZVbtgluE0DurigHPx4RnfunXQXbNJm8wEZQAYCphDs99c9YMqDKbALtjJNyNGRQVx++dWwtDA5GHMyz/ewfXAYntdE4AfwjFkINHsXY+JzXwPmdptGXunKH6D79uuRzxVhqwBKDSFnzTTRNIrHIQXz+RAxTVF1obFqPcY/ehLQVU2CLG+AApwNGzHjR99GTk0Bqg0pvCQ9sRxIY6o5aGmjWOnCmed/A70zZ8INmCpxbGwoAF0Fgd5cEBVkfNj+Szvu2CW4rUPumTN6C+faCijwxqTTeNmXssV+bM1w9oiqm2wToELgt1AtSHQULVxzzU/w5/u2mKUMcRCg3W7hmeFhBF4rKaPY6WDGJDrQnrcUrdX7wRkcQuXe22HHU7CFgDT+zE/AKR9au7CsPkSqAWWiaieG3nkCvPe9G+DSGQrqwUdRuHUjylvvQS4ahaObELoBAVqFSCsJzto4Jkg4OQdn/sd/ord/Plw/MtAIj5Y1oywxq+DXrThae8CKzq3PC+6ux4dndRZ67uut2nM68sn6jWxtx/QvZebKiWKCq7WAmtm2IZSPGR0FjI9uxxVXfB+tqTokYgNu++AQVOSZ1EErunSWRBXTyYASkLIAbdGnMBhI6Lhu5COlA61Ck39JUTHRVAtO73ej0TMbEyeeBj1vjlGauP8RVL7/A+SDQdiowVF1SN02UVaa2fAkl2NU5TNnC5z+5QswY/5iuG4EN1KmhtWxwNwuBws7w+G85S1ftaBr8nnB3f1Y8/hqtfzDzhzQU0qm0v4WOLam6ecIjl2GWhuYaFF5IcamJtFZtNDX4WDzvZvxv9dej9BzoaIIo+Oj0FEAzSxfhyYSa50W5iAU20RNafIuwmol/k0yGPAGJJ0OZSJqHkqWEcU22vPegua/nAR0dxvVWZv+iI6fXomcrsNRDWhNU9UmAWZoVVYOgsFBOCjlLXzqjC+ia+6eaHsRmp5GMScxu8NCf4eF7qKIRBQ8mnfkz4PQ/83SuX/d2BSbHmne3Fktv72vDHQUEsWxGnjuIwPH3hf93FQbGKnTXDUeGhiCFDFmVHPoKlu49dYN+O1vb4alYozXpqBjggvNBHDyYIHDhJVQ+IiSYolFuXHqBQhGT+VCWiUTGaOYQIuIhYWQ34tLcBeugH/ch4DuXmBkEJXvXoB8ewwWXGiT77GWSBoA9G9cKBcLB92dFZx02umI8r0m9Vszv4QVsx10FYUZu7GuNHeuN1XkB9FN7Xbwmb0XVh/KuIhNWwOvs2Tn+6rCZAecITezU9PWc5i0Ml0JZKbfwsTHDU0Bky6wYcs20w7qrThGeaW8xJ0bN+HW2+5Eo9k0lQT9jWkEMVHl2dnhoNp4VLBc4uI4JrKRAcgEO7HDXFLQE64oGNz0k0pUkvUhCxZDrz4A4tEHkXvwLtgihNSJa0gEQNfAXp0NZTnGVSxeuADHHHcCpJXD+9f0YcUc2zRgn6sXnr9O3yeBlqeGJyfDE1cvKlxvkuvfP6512QF6y8kCFwYHllHZsgSezAwh7ZhyPIRHH/fMJDDWAn72x8dQb7XRVbZNoKgWLBRyAvfe/wBuuf0u1CYnIWVaQ9K5pRMrdNw8v5khM2rjZ2iYVGJWfxJunJbwBGjm0kx6ohj/zQpryyS82lKQpopgI0AnLodmaop9C4rVAwTWH3wgluy9Fh/cbxbWLSqa6idbJfpcS3PNupNkQnuioVrDk976I1eV7xW3b2lvL5eKczoLQKWQrIqk6rIeWwYuWw1kymwFTLaAgQlgsK5xxa1bUGu66ChYqOSpXMss4Ms5EtsGnsatGzahMTaWhutsLWsaug2s7F5nix7S/CKZ/08L+7RlZMqpDJ4hk62JShWbLj805Ve2II9zlCbJQqW7C/sftA4HrZiPUw/vRweD7S7A0a/XXW1SsLYSeGpIbxiZeOpIccufG8dVOys/5r2o5JNVQaw9WUrxhDRbk46k62/5moobbySKu397gK/9ZgsKFlDNSZQJzhHI2xKOJVDISTRbbfzpwS0YePxxxL73rJzNwNJZ62yG2dzydNlOUqVnK4PTdpKRWLqfLe/JPpO9nuZnTFRNyFj5Apbtswr5rpn4wpELcPiyqhHKrhTHsTJ4TLnCWNdgA3Dr/lHiuo2j1XJf7x2VvNiHTbZyBs9OA8U02zcTMjKJrsNTwEgT+NE9ow9864Ytt/dVZVDNW6LsSBT5XUsgZ7P7L5BzbDPX+qeHH8HAlr+YZQeJjSWpwk4P2pdhk05mcHfHa3YyzXKa9GD6mez9hOiOhHjHwjzzOzZ65s3B/D2XolSt7nnh+5a9a0mfZcZLkTz3MrJronVxoQ+ziPEWsL3GXDZ60NjIr/6sjynk8EsHEPRxDBK8E1ztw+k+njhHFTqJCTMl4Qm21eDd/KR7+NePLt35fPnO/8fj592ljz5sPn49rwBUC4mF0bqmp2HZMguKhOC4kpPpF8fNgLEjkPzyz/qzjo3zcwKSyqOfy2avePKuNHgwUjEB3j4FbB1R973/3zfsh9ten/+nerk35RM36MPfswdu2qMDoqOY9BO59jhb6zJdbVneyhSMixPpnphR7BSBr3tAf9i2cH45j9k0Dy58Zreitwr0dSRK5J0YbwJDLfo39eWTDrTOebkDeL2+13e5nnPZfrh/UTdmVvOJb6fq6OsIzziK9H8lCI6RldtMcX46ZbDT9V//oJ6fAz4iBI7VMfYp5SBmEFw1uTNcezFcB56YQPv329qHfPXo8n2vF4BX8rsXbdS/WD0L72ZThfA4NrqiLIdlMGSfjtBYn1Nx9HH1wDQ7Nj9v6/zGB3S5HWCvUlFfvWiGWMYFQpQzzXSoAfxlWD1w0X1y33tPEkyy33CPk6/TBx8yF7f05pDjuIrOzuaaVUoExxKT43a5akFCtVys3+Wcwweu1dbHV+LxN3VhPsEx8jANGfOAh4eiL5x0iHPeG47YtAv+9I3xp9f0yIvLDAw6ySIY/ExSnpkqVcels/x/syLgtXHpx9bhlF2CO/tanVuzHHfPqmJVOf0nNdr5SFP7D02Eb/3iEfkdtdsbFeCXbtYfXlDGueU85iKZsjXZklnpyZdpGmgWFcS4pGsQnzvuOBG/4CzXFX/Qp+zZi28pPzkZHeNIS337X2+Qp+IckWajb1RsyXWffqOeN8tRH+rKyWOhsSBnYyYziiCAa0k8EQKb2kF01acPc3akXS8IbsW1Onf6AnVib16ewqWz21vq9qu2yNPeqL7thW7xZ65391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",ft=({dataSource:cn=[],img:xn,imgWidth:In=346,title:ni,sunTitle:Ui,bannerExtraContent:Ot})=>fe.createElement("div",{className:Ke.banner},fe.createElement("div",{className:Ke.content},fe.createElement("aside",null,fe.createElement("p",null,fe.createElement("b",null,ni),fe.createElement("span",null,Ui)),cn.length>0&&fe.createElement("div",{className:Ke.btns},cn.map((_t,Ct)=>fe.createElement("div",{key:Ct,onClick:_t.click},_t.name,_t.sign?fe.createElement("img",{src:St,width:39}):null))),Ot),xn&&fe.createElement("img",{style:{marginTop:33,marginRight:38},src:xn,width:In}))),Be={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"},He=Me(94184),gt=Me.n(He),it=Me(96486),Ft=({dataSource:cn=[],value:xn,onChange:In,onTitleChange:ni,className:Ui,title:Ot,titleWidth:_t=41,style:Ct={},fontColor:Jt="#6A7283",showCount:ci})=>{const[Xn,_n]=(0,fe.useState)(0),[It,hn]=(0,fe.useState)(!1),Ci=(0,fe.useRef)(null),Ri=(0,fe.useRef)(null);return(0,fe.useEffect)(()=>{var Ln;cn.length!==0&&(((Ln=Ci==null?void 0:Ci.current)==null?void 0:Ln.clientHeight)>97?_n(1):_n(0)),cn.length===0&&_n(0),hn(!1)},[cn]),fe.createElement("div",{className:gt()(Be.row,Ui),style:Ct},fe.createElement("div",{onClick:(0,it.throttle)(()=>ni==null?void 0:ni(),2e3),style:{width:_t,marginTop:It?12:4},className:`${Be.title} ${ni?"current":""}`},Ot),fe.createElement("div",{className:It?`${Be.tagsWrap} ${Be.tagsBorderWrap}`:Be.tagsWrap},fe.createElement("div",{className:Be.bar,ref:Ri,style:Xn>0?{height:Xn===1?97:"auto",overflow:Xn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},fe.createElement("div",{className:Be.tag,ref:Ci},cn==null?void 0:cn.map(Ln=>fe.createElement("span",{onClick:()=>In(Ln.id),key:Ln.id,style:{color:Jt},className:xn===Ln.id?Be.active:""},fe.createElement("span",{title:Ln.name,className:Be.name},Ln.name),!!ci&&fe.createElement("span",{className:Be.num},Ln.count))))),!!Xn&&fe.createElement(fe.Fragment,null,Xn===1?fe.createElement("div",{onClick:()=>{var Ln;_n(2),((Ln=Ci==null?void 0:Ci.current)==null?void 0:Ln.clientHeight)>245?hn(!0):hn(!1)},className:Be.action},"\u5C55\u5F00",fe.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):fe.createElement("div",{onClick:()=>{Ri.current.scrollTop=0,_n(1),hn(!1)},className:Be.action},"\u6536\u8D77",fe.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Nt={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"},Ae=({dataSource:cn=[],value:xn,onChange:In,className:ni,style:Ui={}})=>fe.createElement("div",{style:Ui,className:gt()(Nt.tabs,ni)},cn.map(Ot=>fe.createElement("span",{onClick:()=>In(Ot.id),className:xn===Ot.id?Nt.active:"",key:Ot.id},Ot.name))),ne={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"},te=Me(28802),se=({dataSource:cn=[],value:xn="",onChange:In,onInputChange:ni=()=>{},className:Ui,style:Ot={},placeholder:_t,allowClear:Ct=!1})=>{var Jt;const[ci,Xn]=(0,fe.useState)(""),[_n,It]=(0,fe.useState)("");(0,fe.useEffect)(()=>{var Ri;let Ln=xn;(Ri=JSON.stringify(xn))!=null&&Ri.includes("{")&&(Xn(xn.id),Ln=xn.value||"");try{It(decodeURIComponent(Ln||""))}catch(Rt){It(decodeURIComponent(Ln||""))}},[xn]);const hn=()=>{In(encodeURIComponent(_n),ci||null)},Ci=Ri=>{Ri!==ci&&(Xn(Ri),In(encodeURIComponent(_n),Ri))};return fe.createElement("div",{className:gt()(ne.input,Ui),style:Ot},!!cn.length&&fe.createElement("div",{className:ne.dropdown},fe.createElement("div",{className:ne.text},(Jt=cn.find(Ri=>Ri.id===ci))==null?void 0:Jt.name,fe.createElement("i",{className:"iconfont icon-zhankai4"}),fe.createElement("b",{className:ne.b1}),fe.createElement("b",{className:ne.b2})),fe.createElement("div",{className:ne.menu},cn.map((Ri,Ln)=>fe.createElement("div",{key:Ln,onClick:()=>Ci(Ri.id)},Ri.name)))),fe.createElement(te.default,{onPressEnter:hn,value:_n,onChange:Ri=>{It(Ri.target.value),ni(encodeURIComponent(Ri.target.value),ci||null)},bordered:!1,placeholder:_t}),fe.createElement("i",{onClick:hn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},pe={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"},Se=({value:cn,onChange:xn,className:In,total:ni,pageSize:Ui,style:Ot={}})=>{const _t=cn<2,Ct=cn>=Math.ceil(ni/Ui);return ni<=Ui?fe.createElement(fe.Fragment,null):fe.createElement("div",{className:gt()(pe.quickPager,In),style:Ot},fe.createElement("div",{onClick:()=>{_t||xn(cn-1,"prev")},className:_t?pe.disabled:""},"\u4E0A\u4E00\u9875"),fe.createElement("div",{onClick:()=>{Ct||xn(cn+1,"next")},className:Ct?pe.disabled:""},"\u4E0B\u4E00\u9875"))},Pe={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"},Oe=Me(74330),Re=Me(83062),tt=Me(57097),rt=Me(11320),Je=Me(28706),bt=Me(96908),lt=Me(57177),Lt=Me(81378),Mt=Me(26194),dn=({className:cn,dataSource:xn=[],col:In=4,right:ni,bottom:Ui=23,precision:Ot=0,wrapWidth:_t=1200,trackEventItems:Ct,loading:Jt})=>{const ci=Math.floor((_t-(In-1)*ni)/In);return fe.createElement(Oe.Z,{spinning:Jt},fe.createElement("div",{className:gt()(Pe.list,cn)},!!xn.length&&xn.map((Xn,_n)=>{const{name:It,id:hn,identifier:Ci,power:Ri,cover_image_id:Ln,pic:Rt}=Xn;return fe.createElement("div",{className:Pe.wrap,key:hn,style:{width:ci,marginRight:(1+_n)%In===0?0:ni+Ot,marginBottom:Ui}},fe.createElement("a",{target:"_blank",href:`/shixuns/${Ci}/challenges`,className:Pe.li,onClick:Si=>{Si.preventDefault(),Ct&&(0,Je.L9)([Ct]),Ri&&(0,Je.xg)(`/shixuns/${Ci}/challenges`)}},fe.createElement("div",{className:Pe.img},fe.createElement("img",{className:Pe.cover,src:`${Rt}`}),Xn.is_jupyter&&fe.createElement("img",{className:Pe.sign,src:bt}),Xn.is_jupyter_lab&&fe.createElement("img",{className:Pe.sign,src:lt}),Xn.is_unity_3d&&fe.createElement("img",{className:Pe.sign,src:Lt})),fe.createElement("div",{className:Pe.name},fe.createElement(Re.Z,{title:It||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},fe.createElement("span",{className:Pe.e},It||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),fe.createElement("div",{className:Pe.tags},fe.createElement(Re.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},fe.createElement("span",null,fe.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),fe.createElement("span",null,Xn.challenges_count))),!!Xn.myshixuns_count&&fe.createElement(Re.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},fe.createElement("span",null,fe.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),fe.createElement("span",null,Xn.myshixuns_count))),fe.createElement(Re.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},fe.createElement("span",null,fe.createElement("span",null,Xn.level))),fe.createElement("div",{className:Pe.rate},fe.createElement(tt.Z,{allowHalf:!0,disabled:!0,defaultValue:Xn.score_info}),fe.createElement("span",null,"\xA0",Xn.score_info?`${Xn.score_info}\u5206`:"5\u5206")))),!Ri&&fe.createElement("div",{className:Pe.lockWrap},fe.createElement("img",{src:`${rt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),fe.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!xn.length&&fe.createElement(Mt.Z,null)))},tn=Me(5476),vn={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"},Tn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbTV5GmHeL3JBLRxzttof45awCLRYo9vpuZE7YGdyG2Q0R5UvQBWxYwKwBn8pWPEPg7IlhdiKDYnrMIXAz6WDrh/mu3bXcNcEC5P7wIbrdQzH9eQCZF7+2WkrsCWPZcD/TgRbZsF1zTmrBrBX5HN3tyxwD7YTOVRy8KVL0Bd65Vmo667q2dStcdASx6rofyjouqUK/B9dsXFUohcksnenLbAMtemy1UfnrRiLE84NZ6IdqRirtvbdfi1TbA2Xz5r5j5j5Z5ehe705RMf51KRP64ncVoC2BxHLDH9/batlz2gJPnFc7PArNVgvjViABH6Zhm/ZErQoxkH7AmxYhHlsX71s7aWr9XbNek6M52HBQtA6xdflx5pldCVaEMHDuvcK5A8AjI5oB8EShXgEoZKFeBSgVQCohEgKjr/4z3AUP9gCIg7jLWpBn9fa9lsMXa5d7UqquxJYCFYrOFyk964c8V4F44oVCsEs5lgfNZIJcHPMFIk27wU0sbof/V0UcyBgz2AyMDQDQCbBzwXrtAEz2airu/3ErQQEsA5wqVT3qe93WbPKfqAS+eUsiWCWdmgJPTQLVaB2gjw6oB3U9B0azbsGz5XV6KsWFg01pAzGqXjniIua89ilZK3ZWMu99ohklTgP0YqsqLNlnz+SJh7ymF8xkf2JKEkFu+BOx1Y8CGNcBAH2P9gGe5h5VujqZTCfeKZjFeTQHO5EpfA/ApW9N5ZYYweU5h6jhwPlfHcpux5Ha/BxCLAldfBqSijMtHX2sg4x/SyejvLIXNkgAHoa07bEnNe48rnCkQDr8CFBokehh2q1ntIizYsOVG3y/g6AH7dl3gykuAvj4gAkahSihUCCVP9nryJfNgj1dguIrQ5wKJCCMZZaSjjOGEh6jV9LbuSUb2YAW+ZamQ3CUBzubLT9mKW95zTOFkhnDoqC8NL8clL0oqSYgnCSoCVIM92580axAjji+BuyqQ4RgQOq8wUKrK/0jv83Ilo8BQzMO6VBUDseWYQfM+JO46lYi8cbE7FwVYZxxUvf9u3kXzOyZnCIfPKuw/FAhSgcxTz3GbyFQLpOh6Ics877qE9AAQiZEGSyJUI6JGOT5VxlxocEWvdgTcAGQBUtQwWRTDTQTkYhXIlQnZElD2fMBjDmMizdjYX0VkhSlbOepXF/M6LQpwJl/ebiOd5FyR8PxxhQNHgGKP8+9EL04PKU2tAr5LjIQLJB0DJmswDbACpuP41KuBFYDlEwBsKFdz72ClZqvA2SJpI4yALc+PJ6rYPCDSevOXvSd3EG1PJyK/1KjthgBLIhg8frjbwYgq9MRhB5PHgXOZha01k5nq9d4FalEgowk4/UMKTp/fR59iJBX0nqkBo8ASpsGVPdYHVD7yuwY8uLcGcrAyNZCljbopZErAqQKhWPGB3pD2cEl/RUyK3S5d+88renujhLeGI8nmyv9rI8vv+aMKh6cJk8eC8Tbjye1Oi4BEkpDo91lxVDFSjghS/lVjuQZgMXc6DDdgxRrYEAWbl0GDHwC6FMBmuLkycKJAKFUJMQe4YriCwdjy6t6S1ZhKRn6l0TY37386Pxd4st21rr9fWNnTkw72HeyNnit7Z/+YAsn+CUbaBWJ68wzADbFZQ8GaJSuex6INy9ZCVmDvNkBLW2Y/DrPpxdbmTBGYLhCYCBvSVWzury4rNSvgTfX5yQsoOJMr/T2AJXWrVsDfeUThldOEoydbubu9e9wIYWBUFtJnxwPOHPuct28KyHWs1yHWVCsgCgULwAZkDXBA3ealaAdgmYWoXlNZ0vtzfx9wzUhZ97NM19fSyeinw33NA1jKJmTzlePdZtaL40Cod8+BQGq2OLtIFBgcVVrlSTiMtDPXeHgy+ndDgYFkrPfZEBUb9cgA7H8X7M/B3m0o17QXNLvkjGRsx/OkJW+R2q8erWjW3fuLZlIJdyJcTmIewPl85QNV9r7X7UD2nVTYd4wweXTplpoZNuqf7osB6WEFD4xBw5IbdFG/b8rfMlENoKZQn01rISvYg42qNPcSzLFneRH0FWL/razR6QLh7KxvNLl2tLwsUrZD6oOJhHu3Gd88gLP5skRH3tnK4Je6Z/tBBwenGkvOnbYtHqL+Nb5DeFgMFK2wPSNBB9gYdu2zaNZg14QsvZfPl6r1ixH+NFCfms3nfBk4lSdEXcK1Y2X0tTLuZo0u8T0R3ZtKRN67AGApVZQrVI52W81GDANPHnGw64XA5RcaTODsWbSswGJCthguhsYJHjNGWwXXEJ0BSChYfjdsGKzB05Qb/M/swWGVSb8MwbMycNNGeG9uhse5EnC6qLShRUAWga5Xl1T/ScbddabEU42CbbkEX55W2DtFONAg87WZltToBZAFHV4rbBkYiDASLSzOPLYUAtgA6APFvkFD2HQAvBikjSQt1C036BdAKDt4EbSEbQwjIQNIM8BEXz5fJu3Zunqkt7basCuxthbZfOm7zPjNZgNt9v3OSYWXpgjHpxf655sB3Kjt0XEhLyDpMvrrBZVGqmadXlDbPo3QFLJUacOJYuhce+NXDu4z0nRY0hbDiTgu6oWxZmsi30sXIniJk0NUKDGK9Ooiwr+kEtGPhsQGCZEpH7NRQc7sv9PnlgzA0HNrZslKpgnxftKq0FCHZkAjYEl/AkxNWBKngo4aYWxdR7h8Qr5f3AJVKDF2H/FNnZHASSHgmz26FbCkv6kcoQrCVaMVpHsUiCAV+VLJyNoawEHtxz2tDLLZPT894OClI37oTTeXcoHRCaUdBbLvLrH2S3YzT481+CrA84CKJ2oc49feRHA1T176+vlBT8eGxSJ+PJgxc7ZjmRQ9+WiOEHMJ142WemYIibqRqyVYXs8qkyv9HoCvNptgK98/+rKD3S8CxVIrdy9+z8ioguoDBiOMePO1X9hQ6JkwFcuNQkns+UaJSpnx4V8iOC28QY+/6KFSBeIxaJVHuxoDo0k7sz1bIpwrETalq5hI9oxVfzadjP6dD3C+/B9gfn87g1zs3u2HHDz9/CIGjmY8OWhUjBlD4wpR8lWijq6wcyD4XW/ZQTBfqeJHbM5WGB9/W2sA/2yvp6k+0Qckoj6rNlaxdsYoe/8reV/6u3GsBKcdFtBqR0T/kU5EPqABzuZLLzPjklafXeq+n73s4JkXgFIXFDw2IdIMMBbh1vTdRgOqM0roNQwiN8TLpcEtC6dhfPK25gCLivbALtZUm4wDcQFYjCQdbh/ioDg1q3TwwIaUfSomwqFUInqpVOiK5QqVnK16yz854OCFg/LSLBSi6nFopBaJnXlkgtBHjCEb9WVDDgPDmiVao6zBBUR4+sztPsAvHmU89KwvOMn+KuDJfhuLsLZ7y/8kPFc+ArDEZndCwWYdROAShnLjmjKUZSqWetfJuJuk7Cxfx5XyszaoV9rQQtYkMD3TWYsjYwQ3ThgV6u1k7w11G1aRTJy1sEfJnBAOU5DPLOOzd/gA//wA49+3+/ZoAU8C9hIxRqoPSCeAlAG3zwc+2uEebIaYKQPTswqbByoYj9t3L5IbuZ5s2Z/NoB9/WWH/FOHY6QZ6cIM45nAQnbQxsVHpSIzRaGcvSPgpAViANTZvEazEEWDYswB8+QTjnTdKGA7hbJbx7YeBM1mgT8CNCqjsAxuHTpOR/Ve+kxfA2LE7JT6zF8vLcs2wfeOH2KUpVyh/3vP4i90vp9/CnuMKe15pbMlqxqJF700PkdYPJSKjkyvs9dEB8SEjhuy9IgUbAeuWrcC1m+aziVKF8cOngJdPCKA8n3KjQFxYdjRwMYZiuToZqzxzukjIVwnXj5T1S2PzUoq+QNl86dvM+JithjNFwtOTCk8+17zFeqF6fK2CijLWRHyvTzeX5gwBBUs7QrkSzSl6rLDW224A1gws3snOA4xnXvapt541a0NHKOynm3FKQN+JosLGlIeJpKR22LuI8B3K5sr3M/id9pr19+Fn9/sJZK3mFkn/Gy5ROjpj1IJwpfdcAVhin4U1e6ISARMDwLbrhAqbv0FHzzCeeInR5wCpuL/v9sneKy9gyG/czdrJMEVlSrmErcN2UzwI9GPK5MuP2U7mfmZS4YVX/Bjo8LWUGizS85p1hGSdE7+txTP6bqAOCRVrlajqS83XbwbecJnOs2252fwsQ6hZ2pFMRtl/ayG3gamy5cYWufFkUYLwCTeNWbZsEe2gbK70LAPXdTvI8PPTeYKA/OTu4L9GQFzCXzgwAKSGFIYc7spnKtgZdUgAFvelsOZrNwE3X946sOH5VD3Gjn2sbdkxAdmCgBVuX9yJ58oKVw1XkLSY50zAc7IHWzNyhAf96AEH+yehpelWrjVjhGiSMBZlcR51fIUBFoFKqFcMGrddD1w63hnAMpgn93uQUCRRmbQU3aWKFJ5gvgKcLilc2l/FSMye0UOMHZTJlU/bzBw0Az+dIzx3TGHHLn8PbHZt2KSgHMZ4N+qRsVYFrFnSUWXfFYPGO28ELptYCHClyrjnCeCJF32Hxi1XAnfcLFLy/Hu37w0ADqxYhoprHqpmE1zie9HLjxUUxpNVLWzZu2iasvnyLDN3s6yLjuexgw4OHAUOmbjoJUa++RKlY5bFc9TxFQZY2HPZ/+RngXe/Hrh87UKAv79DTJDzA99Fwn7PG+ff+8huD/kS0C/6cNwXtsRUaSNiUnawyRxhKAZcNmBPHyaiUk8Bzs4SnplSePw5P5uwfgsOC12XvE7BdRgjXfDnmr3ZWKvEHBkAfMfrgS3rFgL8Z//M+gUQsIxrUSTmP//Q/Hsf2OXp+/qTvtokurCoSyaeuuOXMnjwlRwhFSVcMWRPktYA94pFmwnvO6EgyWdPPOdLtDUvf92KXHKZ7z3qxLEvL4oSyVli8uTEQckOrPgClrxYuSLjzpsJV6xfCPBf/AvrPVrAMi+gWKw+5/thatf9z3g4XwAGk0DaOBsCn7D2NNZnQrSJ+NG8H30pgpa9S7Po3ghZ4UE+dUjh+DnCzr3zSy6E77lsi9KpJ+0ArM2QoRIe2lsURGr4rkDfW5QtAu97E+HKBgDf97RIyHMAS5ti4br9pvkA3/e0h5k8MBAALGZM0Yd1THUQ01XLoOhAljteJN3ONRbjtbSQ1Qs1qf4NFIqS/fjISWDfoSDZuq6myqVbFGLi/zXSQJ3tPaxpSfvakCFxVAFXEEuV1nsFYDFJGndghZErAO+/hXDVhsZC1oPPAruP+C/LdZuBt1+3UMj6wROM0xnGQMKn4Hk26SDHycRxmQS2dijxaIEQUaQzIWxdWk2ylSbabFCirkim4akZ4NmXfBDCe/DlW5SOvdJOBpNxv0ijJiPfUKuxVA0lgY0jvgAkL4BsCcb+fOm4sNcOSCsYw6GTrL1P2gccfKTfmTxr27b8XwcAhCxcbdhTMCUsOgJcPWSRRRM9JqbKHzH49mYA2fheFuSpIw7OFYCn9wRhPQHKW7YqXdhsIsicr0VfBB2HKdgYMgyI8vKsHwLeek17Viobc2Jm7J1iZIq+AaRmp24zlMcXsoArLAJMoPutOxtaWbTnjymcLRB27YcOr5Vr6xWkY5Q3JedaMKCaMknyjfEQyXeyzwqFFivAnW/ojkJbGfdi92SLjJ0HWbsXta06FAjQChXLnCbzhOE+xusG7TkctLPBtruw1YU6lSHsP62QLQC7DwJrxhWqirFloI5FByjXtuTQPlsTpMrAb79t+anXzFWo+Me7WEd6yN4sTgmTEtMKwBL8d7ygsDZZxXqLhg7tLrTt8G8VYHPfoWmF4znC0TMKmSrwun5PmwH9sjfBj9CebGpVihnSWKlyReBTv9KhA7ndAS9y/z1PeugPoj5MOE+rEZe5ih/ZIUaOIYuJ49rhbztkp5P1kr10+wEXB2cIG/s9DPbNVa+rUYnZi4N4ZpGShTVLPctMAfjM7Z0BfOgE4+cHgfN5YP0ocOtVrbkS6+f5b9s9DKUCCTtg1SbdpdmazJT8tJZrR+xmIOqQHdtBd80ms9j3UtTkP3dHMBpnbOpnQ8C1MoXmOSMxi+QqUq2w+Ewe+My72gf4wV2Me570JV/tpPB8gH7/DmDNYHsS93d/4gNcs3QFOnIrtmrRgUWWuGmNPQm6FnQnC7ccxo5WgL/72QgqHuPGCV4ArBG05Kdmz2UgN+sDfDYL/O672wN4aprxt/fMpaEIECacdt0w8Ad3tgfwPz3kYbQfWk/WwQFBWG0zgEWNFwl6oA/YMmgT4CBsVhY+ky/fDebfaAWEXt7zyAEHR2YUbpjwEHfnDCI1cg4iNLQLMGDPYj48m2kfYKHeR3b7QpGoNgZg8TzJnv4XH5bvWgf5Hx/0MNLvmzLDADdzRuSrUqlH6XoeaxIWPUnhwHebqSvdvABTM8CDByLYMMDYPNA4jNQYLjQQs5J240dBtsuif/A4Y9+UgMFatRGAhTMUSqT39N/eBmwYaR3gbz7oYTQNDKR8Z4REf7TibZJojlmPcMOo9bzhudQVm8ln3QAsz37vWVez5zdvDAEc+tUALM53EbBmAoA//c72WPR9TzFePsma2kR/FR1cABbqPZ8nfPhWYP1wewCPpIHBNgAWs6qwZynWstWigUPWcV7ymd6HLaWPdgvwzikHe04oXD/uYbjBIXnzKLgInAsAvqtNNen+ZxiTp1mrNkJtYkcWwU24grT5628mrG0DYM2iDcChPXgpFi2hOjNlhcstq0cL0kcDQctKAni3AIv/9vu7I7rK683rF7LpBQAXgDMZ4BPvaI+CJc/o2FnW3iHRW8UTJHu7ULAIbe+5mTAx1DoFf+thD8MCcEjIMtV7Gq2JCXqX6gLXj5XbCgRstsYNE8BtlXBo1nkr3+84pPDSGQc3rfMwUkfFJq9XVCRh0YaCP/QWQryFUFjTv0RonJzxU1I0BSs/+kMoeCbruwvHW1SVJL/p7sdYAyxStE5Oa6ImCfWeLYlwVcF4wm7aSsMSDraKsLQCYLN7ciXgnr0RXQfrzZt4XtEWDXCdFC37sGQoXLe5dYr72R4PJ87DZ9GBkGUo+FweeMd1tGRgfHgOzx1mPH+E9f4rAGtX4hIAy94r3iOXCNePlawmni1ahMVn03bKKDUDsJXv/++4g+eOKlw55mHT4NwT2oMU6MEiaIkeLFQsku8Nl0jUhqScNAf68X0eTmXmwm8MixbOIJXof/kawmj/0u3kZhn7p4Bdh31hTbPn4IURgBfLPJR0lUyZsGWwiuG4RdXIP1upcRklWcKVtkuHgfc8xg/3RFGsspaoE0G2gzZ0BA59baoUVSnvmxoF5GyBtIVL9nJxRsglViqxb+uEMskUjPvClXwkPEe8P1pNEs9UYB0TKpb2MtKelA4O0l5M6SVxKMjeLWqWBOJJW8LujbNBUk8bxWsVKuJYIKTlqAGL0Rtm7ZYshGarlGErFNrKPScyhAdecrXA9cYNfhlgk60gYMii66C6or93SuSGRD4KSKUKaVYuFK9LFjoCJOv9Viq362zBIM9Xx2OJqTJg/aYt+SltSx+Vqm9OlMu0pdNLg7YkXlpKOwi7X6x+R1lYc9Yv43PDSFn7j+1eTUoZSme2ipHaGviuowq7TzgYTTJuWucLI8Yebfbi2QBUne8rlBscpCXgGoAFZDE8SByVpj5x64XSQOV7aVf2YT8x3P+ISVTUJ+nLpLqatvTBXAElS1smrSVc+9Ksg6mwU2afNY9YZs26H6X+Ph13PxNe+wWbjK1ywrYAFl/rAy9FcSoHbB5kbBllDZpJKtPpoKGUUJGEBSShNh35EQiopui3T30+0Pr0tKDAmc4hDgQ4kw1hgJW/dX9BrrGpVGteGOEAus0glMcUSgvXddHFSSukzZGXWXTqh9e5pXLCWtiyVBDcFsiywD960UVmlnDNuIe16YCKg2o5RjfWe7MAEQBsYrfmFSM1Vd5DZYRN8W8twAVCnGlT/5T4MX34g++gNtXwxN+rSz0EFfG0V6pW8HRu9lKUVFyCUuXuqhH75Rq0nNFqQXDNpi2V9LcFsLQjqtOPX3Qhhca3jjHWpX1nhA7eC1ixYd36b3koFCigIx39lai5B8Phrvr2IGHcsHbNBYLgwHDYkC6FGDows1Yhvu5QD2nTgCv7vtTFsl2Lo7bG7ZT01yBbOpTDJsiZWeDhgxEtSIlDQth1GBQTqFeLugx1HsSm+1uVsOPQWQ4B7r7TKngpwjU9arFhcxWF5yrBm1LFQQeGLcvzx/KEfIV0wtq1wz0sDE70WDoReUujtV5U0bN5rI5NkCUT75EDEQjYw3HGNeNz0nWAT8jP2KDnYMZm4o1ipswLop9eysgUqsUVbsdUs9NV36OMa0Z7w5bN7Do6VkfvxRYPxrIJsuzJ2w9HcCLrn4N07bicUGazh87bkvpXx3JySAhhPCkCVaV3bNk3bHR2MJZM0fbRdp0vW+Mnxeu055QDqTa1cRDYNMAd17TsdmyyX5+UksEl2eMJW4aqGLPpwG/EjLo92k7vxZYPp+x2Ieufl1NOdr7i4lxRLEuMSwcYo6mFZxzZ7te0J3vtzKwvTMk5iAMxxpXDlR4YMRrOoLvDKX3J0v7xsrYXW3Rl8T7tOen4xUIjrIWwsYSd/N1G4xXVSYA9UyRUPKkeC1w+WMVo74qL1g3D0vGy0upqciUu9XJIwN6+0w4OTit9rI2rWLsb1yQZ6b7OSxKbPkVHlvMLZ2ZJq23i55LDpzcNVrE26fV0r62ft7UDogMq7tkR77apWdqrMuPwjMLhGQdydqI2TijW8dZyVKzYjyWoT2zBi1URFtYrOrcOrq+I98ePwxbmLwYNOdlsfdrDaHx5D7/S62X7iHdf4OKNVa4804t6Hr0A2bQpOvPRjIOTOYWzRd/VOFel3a9ma8yYNcNJrQSir0zJ/RHJXY5D25BFOhYz5cpcNO2Qe1MiQQ1OxVg4ouaO09AzuWLlDvb4XlsHRi/3AklJ4POzCjkpyD0rjgmlvUQV5uBsYXHC+6BHHKF01npsqo+RtFCcrdv5yoHQpOjOZMy9r9W22gJYGs3my3/FzH/UagcX77O3AkT016lE5I/babFtgJnZzRYqP7VdHa+dQV+Q9xLtSMXdtxJRW+kPbQMc7MfrPZR3MGPjBbnYyzxpIkwqRG5JJGiq3a47Alg68YPlK4++2oSudhdo5e+n6ajr3ionqHQylo4B9im59Ase6EFmbhCi3slwLj4TXgEiyivwOxKJ6OOdrkxXAEun4nVij+VQS+sRRp1O6rXwnOy1pOi9yZj7P93Mp2uApfNMvvIRAn/nIsjdQDH3rIDLoI+lE+6/dtuiFYBDlHz3RXbdHSTClknRB7qlXDMKawCbPbnK9F8XBa9OQRYrFb+nmz23vmerABvpulwt339RhWoPZFGFIk7k9k6l5cV6sw6w0ZOrqHzvojGkRZCJdjhwP9iJntush54ALJ2KwJUrVL4M4A9frbbrZovX7fdiWwbwN8m4+7l2LVSt9t0zgM0AxEHhVflbF/flBbvjtHLot9pxHLQK6jxdupOH2n1GuxpR+S6Yb2332dfk/USPOnA/2qrLr5s16DkFm8EJm84Xq5/wPP7LC5eaaVop+pNEzPlmwJ67wa6lZ5cN4BDQw9l8+StEdNeFsjcLmMz89VQi8qdEdKYlZCzdtOwAm3EHIblfZeabLc1lVTYjccsK/NlEIvrESgxwxQAOCWHv9jz+Aph/cSUWoGd9Ej2mFH3RlkWq03GuOMBm4JLwRh4+z+DbOp3ManhOsvxY4UvpeOSR1TGe1TCK0BiC/OS7APoQwKHqHKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",Ve=Me(67294),Qe=({className:cn,dataSource:xn=[],col:In=4,right:ni,bottom:Ui=23,precision:Ot=0,wrapWidth:_t=1200,trackEventItems:Ct,loading:Jt,handleVery:ci=()=>!0})=>{const Xn=Math.floor((_t-(In-1)*ni)/In);return Ve.createElement(Oe.Z,{spinning:Jt},Ve.createElement("div",{className:gt()(vn.list,cn)},!!xn.length&&xn.map((_n,It)=>{const{subject_identifier:hn,id:Ci,identifier:Ri,power:Ln}=_n,Rt=_n.is_public!=0&&_n.is_public;return Ve.createElement("div",{className:vn.wrap,key:Ci,style:{width:Xn,marginRight:(1+It)%In===0?0:ni+Ot,marginBottom:Ui}},Ve.createElement("a",{className:vn.li,onClick:Si=>{Si.preventDefault(),ci(_n==null?void 0:_n.first_category_url)&&(Ct&&(0,Je.L9)([Ct]),(0,Je.xg)(_n.first_category_url))}},Ve.createElement("div",{className:vn.top},Ve.createElement(Re.Z,{title:_n.name},Ve.createElement("div",{className:vn.name},_n.name)),Ve.createElement("img",{className:vn.img,src:rt.Z.IMG_SERVER+"/images/"+_n.avatar_url}),Ve.createElement("div",{className:vn.text,title:_n.creator},_n.creator),hn&&Ve.createElement("div",{className:vn.btns},Ve.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Ve.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Rt&&Ve.createElement("div",{className:vn.sign},"\u516C\u5F00")),Ve.createElement("div",{className:vn.bottom},_n.visits>0&&Ve.createElement(Re.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Ve.createElement("span",null,Ve.createElement("i",{className:"iconfont icon-liulanyan"}),Ve.createElement("span",null,_n.visits))),_n.course_members_count>0&&Ve.createElement(Re.Z,{title:"\u6210\u5458",placement:"bottom"},Ve.createElement("span",null,Ve.createElement("i",{className:"iconfont icon-chengyuan"}),_n.course_members_count)),_n.tasks_count>0&&Ve.createElement(Re.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Ve.createElement("span",null,Ve.createElement("i",{className:"iconfont icon-zuoye"}),_n.tasks_count)),_n.is_end?Ve.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Ve.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!_n.is_accessible&&Ve.createElement("div",{className:vn.lockWrap},Ve.createElement("img",{src:`${rt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Ve.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!xn.length&&Ve.createElement(Mt.Z,null)))},mn={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"},kn=Me(35973),pn=({dataSource:cn=[],value:xn,onChange:In,className:ni,style:Ui={},tabBarExtraContent:Ot})=>fe.createElement("div",{className:gt()(mn.tabs,ni),style:Ui},fe.createElement("div",{className:mn.tabsWrap},cn.map((_t,Ct)=>!(_t!=null&&_t.hide)&&fe.createElement("aside",{className:mn.tab,onClick:()=>{In(_t.id),_t.link&&kn.history.push(_t.link)},key:Ct},fe.createElement("div",{className:xn===_t.id?mn.active:""},_t.name),(_t==null?void 0:_t.resetCount)==null&&(_t==null?void 0:_t.total)!==void 0&&fe.createElement("span",null,"\uFF08",_t==null?void 0:_t.total,"\uFF09"),(_t==null?void 0:_t.resetCount)!==void 0&&(_t==null?void 0:_t.total)!==void 0&&fe.createElement(Re.Z,{title:(_t==null?void 0:_t.tip)!=null?_t==null?void 0:_t.tip:""},fe.createElement("span",{style:{color:"#9096A3"}},"\uFF08",fe.createElement("span",{style:{color:"#000"}},_t==null?void 0:_t.resetCount),"/",fe.createElement("span",null,_t==null?void 0:_t.total),"\uFF09"))))),fe.createElement("div",{className:mn.tabBar},Ot)),jn=({className:cn,style:xn={},children:In})=>fe.createElement("div",{className:gt()(cn),style:xn},In),Gt={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"},mt=Me(85418),Et=Me(50136);const on=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var ze=({sortValue:cn,dropValue:xn,className:In,onSort:ni,onDrop:Ui,dataSource:Ot=on})=>{var _t;return fe.createElement("div",{className:gt()(Gt.orderWrap,In)},fe.createElement(mt.Z,{dropdownRender:()=>fe.createElement(Et.default,null,Ot.map((Ct,Jt)=>fe.createElement(Et.default.Item,{key:Jt,onClick:()=>Ui(Ct.id)},Ct.name)))},fe.createElement("span",{className:Gt.orderTextWrap},(_t=Ot.find(Ct=>xn===Ct.id))==null?void 0:_t.name)),fe.createElement("span",{className:Gt.orderIconWrap},fe.createElement("span",{className:Gt.orderAsc},fe.createElement("i",{className:cn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Gt.cursorPointer} ${Gt.active}`:`iconfont icon-sanjiaoxing-up font12 ${Gt.cursorPointer}`,onClick:()=>ni(cn==="asc"?"desc":"asc")})),fe.createElement("span",{className:Gt.orderDesc},fe.createElement("i",{className:cn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Gt.cursorPointer} ${Gt.active}`:`iconfont icon-sanjiaoxing-down font12 ${Gt.cursorPointer}`,onClick:()=>ni(cn==="asc"?"desc":"asc")}))))},be={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"},Ce=Me(85804),De=Object.defineProperty,Ge=Object.getOwnPropertySymbols,Fe=Object.prototype.hasOwnProperty,qe=Object.prototype.propertyIsEnumerable,rn=(cn,xn,In)=>xn in cn?De(cn,xn,{enumerable:!0,configurable:!0,writable:!0,value:In}):cn[xn]=In,Kn=(cn,xn)=>{for(var In in xn||(xn={}))Fe.call(xn,In)&&rn(cn,In,xn[In]);if(Ge)for(var In of Ge(xn))qe.call(xn,In)&&rn(cn,In,xn[In]);return cn},Zn=(cn,xn)=>{var In={};for(var ni in cn)Fe.call(cn,ni)&&xn.indexOf(ni)<0&&(In[ni]=cn[ni]);if(cn!=null&&Ge)for(var ni of Ge(cn))xn.indexOf(ni)<0&&qe.call(cn,ni)&&(In[ni]=cn[ni]);return In},$t=(cn,xn,In)=>new Promise((ni,Ui)=>{var Ot=Jt=>{try{Ct(In.next(Jt))}catch(ci){Ui(ci)}},_t=Jt=>{try{Ct(In.throw(Jt))}catch(ci){Ui(ci)}},Ct=Jt=>Jt.done?ni(Jt.value):Promise.resolve(Jt.value).then(Ot,_t);Ct((In=In.apply(cn,xn)).next())}),Zt=cn=>{var xn=cn,{className:In,style:ni,children:Ui,loading:Ot=!1,openLoading:_t,onClick:Ct=()=>{},size:Jt="middle",shape:ci="round"}=xn,Xn=Zn(xn,["className","style","children","loading","openLoading","onClick","size","shape"]);const[_n,It]=(0,fe.useState)(!1);return fe.createElement(Ce.ZP,Kn({onClick:(0,it.throttle)(hn=>$t(void 0,null,function*(){_t&&It(!0);try{yield Ct(hn)}catch(Ci){console.log("error",Ci)}_t&&It(!1)}),2e3,{leading:!0,trailing:!1}),className:gt()(be.btn,be[`${Jt}-${ci}`],In),style:ni,size:Jt,shape:ci,loading:_n||Ot},Xn),Ui)},qn={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"},oi=({className:cn,style:xn,children:In=null,onClick:ni,title:Ui})=>fe.createElement("div",{className:gt()(qn.head,cn),style:xn},fe.createElement("span",{className:"primary-hover",onClick:ni},fe.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),fe.createElement("b",{title:Ui},Ui),fe.createElement("div",{className:qn.node},In)),ri={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"},wr=({confirmShow:cn=!0,confirmTitle:xn,confirmClick:In,cancelShow:ni=!0,cancelTitle:Ui,cancelClick:Ot,className:_t,style:Ct,confirmLoading:Jt=!1})=>fe.createElement("div",{className:gt()(ri.btns,_t),style:Ct},cn&&fe.createElement(Ce.ZP,{loading:Jt,onClick:In,type:"primary",className:ri.confirm},xn),ni&&fe.createElement(Ce.ZP,{onClick:Ot,className:ri.cancel},Ui)),Li={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"},Ur=({className:cn,style:xn={},LeftContent:In,children:ni,RightContent:Ui})=>fe.createElement("div",{className:gt()(Li.fixedBottom,cn),style:xn},fe.createElement("div",{className:Li.wrap},fe.createElement("div",{className:Li.left},In),fe.createElement("div",{className:Li.center},ni),fe.createElement("div",{className:Li.right},Ui))),Yn={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:cn,style:xn={},dataSource:In=[]})=>fe.createElement("div",{className:gt()(Yn.crumbs,cn),style:xn},In.map((ni,Ui)=>Ui<In.length-1?fe.createElement(fe.Fragment,{key:Ui},ni.path||ni.onClick?fe.createElement("span",{className:Yn.hover,onClick:ni!=null&&ni.onClick?ni.onClick:()=>kn.history.push(ni.path)},ni.name):fe.createElement("span",null,ni.name),fe.createElement("span",null,"\xA0",">","\xA0")):fe.createElement("span",{key:Ui,style:{color:"#5F6368"}},ni.name))),xr=Me(55054),Ni=Object.defineProperty,lr=Object.defineProperties,mo=Object.getOwnPropertyDescriptors,pi=Object.getOwnPropertySymbols,ti=Object.prototype.hasOwnProperty,hi=Object.prototype.propertyIsEnumerable,Ii=(cn,xn,In)=>xn in cn?Ni(cn,xn,{enumerable:!0,configurable:!0,writable:!0,value:In}):cn[xn]=In,ir=(cn,xn)=>{for(var In in xn||(xn={}))ti.call(xn,In)&&Ii(cn,In,xn[In]);if(pi)for(var In of pi(xn))hi.call(xn,In)&&Ii(cn,In,xn[In]);return cn},zi=(cn,xn)=>lr(cn,mo(xn)),an=(cn,xn)=>{var In={};for(var ni in cn)ti.call(cn,ni)&&xn.indexOf(ni)<0&&(In[ni]=cn[ni]);if(cn!=null&&pi)for(var ni of pi(cn))xn.indexOf(ni)<0&&hi.call(cn,ni)&&(In[ni]=cn[ni]);return In};const{Countdown:we}=xr.default;var en=cn=>{var xn=cn,{onChange:In}=xn,ni=an(xn,["onChange"]);const[Ui,Ot]=(0,fe.useState)(null);(0,fe.useEffect)(()=>{typeof Ui=="number"&&Ui>=0&&In(Ui)},[Ui]);const _t=Ct=>{const Jt=Math.floor(Ct/1e3);Ot(Jt)};return fe.createElement(we,zi(ir({},ni),{onChange:_t}))}},99914:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Ke}});var fe=Me(67294);function Ke(St,zt){const ft=(0,fe.useRef)();(0,fe.useEffect)(()=>{ft.current=St}),(0,fe.useEffect)(()=>{function Be(){ft.current()}if(zt!==null){let He=setInterval(Be,zt);return()=>clearInterval(He)}},[zt])}},96707:function(Cn,On,Me){"use strict";Me.d(On,{h:function(){return fe}});var fe=(Ke=>(Ke[Ke.NOMATCH=-1]="NOMATCH",Ke[Ke.OK=0]="OK",Ke[Ke.TIMEOUT=2]="TIMEOUT",Ke[Ke.PODFAILURE=3]="PODFAILURE",Ke[Ke.COMPILEFAILURE=4]="COMPILEFAILURE",Ke[Ke.EXECUTEFAILURE=5]="EXECUTEFAILURE",Ke[Ke.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Ke))(fe||{})},88742:function(Cn,On,Me){"use strict";Me.d(On,{H7:function(){return ne},MK:function(){return Ae},MU:function(){return st},X6:function(){return Nt},bM:function(){return it},fi:function(){return te},fu:function(){return gt},n4:function(){return ue},rX:function(){return Bt},vl:function(){return se},zO:function(){return Ft}});var fe=Me(33170),Ke=Object.defineProperty,St=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Be=(pe,ve,Se)=>ve in pe?Ke(pe,ve,{enumerable:!0,configurable:!0,writable:!0,value:Se}):pe[ve]=Se,He=(pe,ve)=>{for(var Se in ve||(ve={}))zt.call(ve,Se)&&Be(pe,Se,ve[Se]);if(St)for(var Se of St(ve))ft.call(ve,Se)&&Be(pe,Se,ve[Se]);return pe};function gt(pe,ve){return(0,fe.U2)(`myproblems/${pe}.json`,He({hidePopLogin:!0},ve||{}))}function it(pe,ve){return(0,fe.v_)(`myproblems/${pe}/code_submit.json`,ve)}function st(pe,ve){return(0,fe.v_)(`myproblems/${pe}/code_debug.json`,ve)}function Ft(pe,ve){return ve.language&&(ve.language=encodeURIComponent(ve.language)),(0,fe.U2)(`myproblems/${pe}/submit_records.json`,ve)}function Nt(pe){return(0,fe.U2)("myproblems/record_detail.json",{id:pe})}function Bt(pe,ve){return(0,fe.U2)(`myproblems/${pe}/result.json`,{mode:ve})}function Ae(pe,ve){return(0,fe.v_)(`myproblems/${pe}/add_notes.json`,ve)}function ne(pe,ve){return(0,fe.v_)(`myproblems/${pe}/restore_initial_code.json`,ve)}function te(pe){return(0,fe.v_)(`myproblems/${pe}/sync_code.json`)}function ue(pe,ve){return(0,fe.v_)(`myproblems/${pe}/update_code.json`,ve)}function se(pe,ve){return(0,fe.v_)(`discusses/${pe}/plus.json`,ve)}},38884:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Fc}});var fe=Me(67294),Ke={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI",btn_warp:"btn_warp___fOE2S"},St=Me(91773),zt=Me(83062),ft=Me(85804),Be=Me(62844),He=Me(37720),gt=Me(2453),it=Me(28802),st=Me(96074),Ft=Me(84567),Nt=Me(55241),Bt=Me(71230),Ae=Me(15746),ne=Me(14845),te=Object.defineProperty,ue=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,pe=Object.prototype.propertyIsEnumerable,ve=(ct,Vt,Ie)=>Vt in ct?te(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,Se=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))se.call(Vt,Ie)&&ve(ct,Ie,Vt[Ie]);if(ue)for(var Ie of ue(Vt))pe.call(Vt,Ie)&&ve(ct,Ie,Vt[Ie]);return ct};const Pe=ct=>React.createElement("svg",Se({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},ct),React.createElement("title",null,"\u7F16\u7EC4 6"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E4E6FD",width:34,height:34,rx:10}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M13.808 11.448a.558.558 0 0 1 0 .788l-1.564 1.565a.558.558 0 1 1-.789-.79l1.564-1.563a.558.558 0 0 1 .79 0Zm9.882 2.462a.558.558 0 0 1-.789 0l-1.564-1.563a.558.558 0 1 1 .789-.789l1.564 1.564a.556.556 0 0 1 0 .788Z",fill:"#6678EB"}),React.createElement("path",{d:"M21.753 21.707a5.937 5.937 0 1 0-8.58.015l-.937.936a.558.558 0 1 0 .789.788l.995-.994a5.91 5.91 0 0 0 3.436 1.095c1.287 0 2.48-.41 3.452-1.106l.992.992a.558.558 0 1 0 .789-.789l-.936-.937Z",fill:"#6678EB"}),React.createElement("path",{d:"m20.858 18.95-3.024-1.745v-2.054a.558.558 0 1 0-1.117 0v2.351c0 .064.011.126.031.184a.551.551 0 0 0 .258.33l3.293 1.9a.557.557 0 0 0 .559-.966Z",fill:"#FFF"}))));var Oe="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",Re=Me(65226),tt=Me(35973),rt=Me(28706),Je=Me(33170),bt=Object.defineProperty,lt=Object.getOwnPropertySymbols,Lt=Object.prototype.hasOwnProperty,Mt=Object.prototype.propertyIsEnumerable,pt=(ct,Vt,Ie)=>Vt in ct?bt(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,dn=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Lt.call(Vt,Ie)&&pt(ct,Ie,Vt[Ie]);if(lt)for(var Ie of lt(Vt))Mt.call(Vt,Ie)&&pt(ct,Ie,Vt[Ie]);return ct};const tn=ct=>React.createElement("svg",dn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},ct),React.createElement("title",null,"\u7F16\u7EC4 12"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{width:34,height:34,rx:10,fill:"#EAF3F4"}),React.createElement("path",{d:"M25.905 15.37a.775.775 0 0 0-.626-.529l-4.814-.7-2.152-4.362a.776.776 0 0 0-1.392 0l-2.153 4.363-4.814.699a.775.775 0 0 0-.43 1.323l3.484 3.396-.823 4.794a.777.777 0 0 0 1.126.818l4.306-2.264 4.305 2.264a.778.778 0 0 0 .817-.059.777.777 0 0 0 .31-.759l-.823-4.794 3.483-3.396a.777.777 0 0 0 .196-.795Z",fill:"#21C0A6",fillRule:"nonzero"})));var vn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",Tn=Object.defineProperty,Ve=Object.getOwnPropertySymbols,Ze=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,mn=(ct,Vt,Ie)=>Vt in ct?Tn(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,kn=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Ze.call(Vt,Ie)&&mn(ct,Ie,Vt[Ie]);if(Ve)for(var Ie of Ve(Vt))Qe.call(Vt,Ie)&&mn(ct,Ie,Vt[Ie]);return ct};const At=ct=>React.createElement("svg",kn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},ct),React.createElement("title",null,"\u9898\u76EE"),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"#E7F3FF",width:34,height:34,rx:10}),React.createElement("g",{fill:"#4C6FFF",fillRule:"nonzero"},React.createElement("path",{d:"m23.719 13.325-4.098-3.94c-.097-.13-.225-.162-.355-.162-.129 0-.258.064-.387.161l-7.55 7.753c-.065.065-.098.162-.13.227l-1.032 5.427c-.033.194.032.323.16.484.13.13.227.162.389.162h.096l4.776-1.099c.097-.032.194-.064.258-.161l7.841-8.108c.194-.162.194-.517.033-.744h-.001Zm-8.1 8.044a.534.534 0 0 1-.386.162.56.56 0 0 1-.388-.162l-3-2.81c-.226-.194-.226-.517-.033-.743.194-.227.517-.227.743-.033l3 2.811c.259.226.291.55.065.776ZM17 22.92h6.844v1.055H17z"}))));var pn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",ln=Me(14375),jn=Me(35567),Gt=Me(35566),mt=Me(73646),Et={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},on=Me(67294),Yt=Object.defineProperty,ze=Object.defineProperties,be=Object.getOwnPropertyDescriptors,Ce=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,Fe=(ct,Vt,Ie)=>Vt in ct?Yt(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,qe=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))De.call(Vt,Ie)&&Fe(ct,Ie,Vt[Ie]);if(Ce)for(var Ie of Ce(Vt))Ge.call(Vt,Ie)&&Fe(ct,Ie,Vt[Ie]);return ct},rn=(ct,Vt)=>ze(ct,be(Vt)),Kn=(ct,Vt)=>{var Ie={};for(var wt in ct)De.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&Ce)for(var wt of Ce(ct))Vt.indexOf(wt)<0&&Ge.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const Zn=null,$t=(ct,Vt)=>{var Ie=ct,{globalSetting:wt,loading:no,dispatch:Ar,isEdit:ko,editData:Tr}=Ie,Ir=Kn(Ie,["globalSetting","loading","dispatch","isEdit","editData"]);const[la,vo]=(0,fe.useState)(""),[qr,Ki]=(0,fe.useState)(""),[No,Gi]=(0,fe.useState)([]),[ur,Qi]=(0,fe.useState)(""),[eo,Or]=(0,fe.useState)(),[Yr,Eo]=(0,fe.useState)(!1),[Vi,Hr]=(0,fe.useState)({}),[xi,tr]=(0,fe.useState)([]);(0,fe.useEffect)(()=>{!Tr||!ko||(vo(Tr==null?void 0:Tr.name),Ki(Tr==null?void 0:Tr.analysis),Or(Tr==null?void 0:Tr.is_ordered),Hr(Tr),Eo(!0))},[Tr]),(0,fe.useEffect)(()=>{if(!Yr)return;const Ro=Tr==null?void 0:Tr.standard_answer.map(ds=>ds==null?void 0:ds.answer_text);Gi(Ro);const Xr=Tr==null?void 0:Tr.standard_answer.map(ds=>ds==null?void 0:ds.score);tr(Xr),Eo(!1)},[Yr]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Er,Clear:Ao}));const Er=()=>{let Ro=[],Xr=!1;return la?(No.forEach((ds,Fa)=>{Ro.push({position:Fa+1,answer_text:[],score:xi[Fa]}),ds==null||ds.forEach((Gs,Xu)=>{Ro[Fa].answer_text.push(Gs),(!Gs||!(0,rt.eR)(Gs,1e4))&&(Qi(`${Fa}-${Xu}`),gt.ZP.info(Gs?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),Xr=!0)})}),Xr?!1:(Ro==null?void 0:Ro.length)>20?(gt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:la,analysis:qr,standard_answers:Ro,is_ordered:eo,downcase:Vi==null?void 0:Vi.downcase,no_space:Vi==null?void 0:Vi.no_space,use_blank_score:Vi==null?void 0:Vi.use_blank_score}):(gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},Ao=()=>{vo(""),Ki(""),Gi([]),Or(!1)},Ho=(Ro,Xr,ds)=>{const Fa=No.slice();if(Xr&&Fa.splice(Ro,Xr),ds)for(let Gs=0;Gs<ds;Gs++)Fa.splice(Ro+Gs,0,[""]);Gi(Fa)},Pa=(Ro,Xr,ds)=>{Qi("");let Fa=No.slice();Fa[Ro][Xr]=ds,Gi(Fa)},qi=Ro=>{let Xr=No.slice();Xr[Ro]=[...Xr[Ro],""],Gi(Xr)},Vs=(Ro,Xr)=>{let ds=No.slice();if(!ds[Ro][Xr]){ds[Ro]=ds[Ro].filter((Fa,Gs)=>Gs!==Xr),Gi(ds);return}Be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Et.modal,onOk:()=>{ds[Ro]=ds[Ro].filter((Fa,Gs)=>Gs!==Xr),Gi(ds)}})},kr=Ro=>{Be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:Et.modal,onOk:()=>{let Xr=No.slice();Xr=No.filter((ds,Fa)=>Ro!==Fa),Gi(Xr)}})};return on.createElement("section",{className:Et.wrap},on.createElement("p",{className:Et.titleWrap},on.createElement("span",{className:Et.required},"*"),on.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),on.createElement("div",null,on.createElement(Gt.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:la,onChange:Ro=>vo(Ro),showNullButton:!0,onPlaceholderChange:Ho})),on.createElement("div",{className:"mt20"},No.map((Ro,Xr)=>on.createElement("div",{style:{display:"flex"}},on.createElement("div",{style:{flex:1}},on.createElement(mt.Z,{key:Xr,answers:Ro,index:Xr,flex:1,is_md:!0,activeOptionErrorIndex:ur,onAnswerChange:Pa,addChildAnswer:qi,deleteChildAnswer:Vs,deleteChildAnswermain:kr})),Vi.use_blank_score&&on.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},on.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",on.createElement(He.Z,{style:{width:"100px"},size:"large",defaultValue:xi[Xr],onBlur:ds=>{xi[Xr]=ds.target.value,tr([...xi])}}))))),on.createElement("div",null,on.createElement(Ft.default,{className:`${Et.color333} font14 mt20`,checked:Vi.use_blank_score,onChange:Ro=>Hr(rn(qe({},Vi),{use_blank_score:Ro.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),on.createElement("span",{style:{color:"#999999",fontSize:"12px"}},"\uFF08\u9009\u4E2D\uFF0C\u5219\u9700\u8981\u8BBE\u7F6E\u6BCF\u7A7A\u5206\u503C\uFF0C\u5B66\u751F\u7B54\u6848\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206\uFF09")),on.createElement("div",null,on.createElement(Ft.default,{className:`${Et.color333} font14 mt20`,checked:Vi.downcase,onChange:Ro=>Hr(rn(qe({},Vi),{downcase:Ro.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),on.createElement("div",null,on.createElement(Ft.default,{className:`${Et.color333} font14 mt20`,checked:Vi.no_space,onChange:Ro=>Hr(rn(qe({},Vi),{no_space:Ro.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),on.createElement("div",{className:"mt20"},(No==null?void 0:No.length)>1&&on.createElement("span",null,on.createElement(Ft.default,{checked:eo,onChange:Ro=>Or(Ro.target.checked),className:`${Et.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),on.createElement("span",{className:`${Et.color999} font12`},"\uFF08\u9009\u4E2D\uFF0C\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u987A\u5E8F\u5FC5\u987B\u4E0E\u53C2\u8003\u7B54\u6848\u4E00\u81F4\uFF09"))),on.createElement("p",{className:Et.titleWrap},on.createElement("span",{className:Et.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),on.createElement(jn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:qr,onChange:Ro=>Ki(Ro)}))};var Nn=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)($t)),Zt=Me(98813),qn=Object.getOwnPropertySymbols,$n=Object.prototype.hasOwnProperty,oi=Object.prototype.propertyIsEnumerable,ri=(ct,Vt)=>{var Ie={};for(var wt in ct)$n.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&qn)for(var wt of qn(ct))Vt.indexOf(wt)<0&&oi.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const fr=null,wr=(ct,Vt)=>{var Ie=ct,{globalSetting:wt,loading:no,editData:Ar,dispatch:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=ri(Ie,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)(),[Ki,No]=(0,fe.useState)(""),[Gi,ur]=(0,fe.useState)("");(0,fe.useEffect)(()=>{if(!Ar||!Ir)return;No(Ar==null?void 0:Ar.name),ur(Ar==null?void 0:Ar.analysis);const Or=Ar==null?void 0:Ar.choices.find(Yr=>Yr.is_answer);qr(Or.choice_text==="\u6B63\u786E"?"0":"1")},[Ar]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Qi,Clear:eo}));const Qi=()=>Ki?vo?{name:Ki,choices:[{choice_text:"\u6B63\u786E",is_answer:vo==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:vo==="1"?1:0}],analysis:Gi}:(gt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),eo=()=>{No(""),ur(""),qr("")};return fe.createElement("section",{className:Et.wrap},fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),fe.createElement(jn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ki,onChange:Or=>No(Or)}),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u7B54\u6848\u9009\u9879\uFF1A",fe.createElement("span",{className:Et.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),fe.createElement(Zt.ZP.Group,{buttonStyle:"solid",value:vo,onChange:Or=>qr(Or.target.value)},fe.createElement(Zt.ZP.Button,{value:"0",className:`${Et.radio} mr40`},"\u6B63\u786E"),fe.createElement(Zt.ZP.Button,{value:"1",className:Et.radio},"\u9519\u8BEF")),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),fe.createElement(jn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Gi,onChange:Or=>ur(Or)}))};var Li=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(wr)),Ai=Object.getOwnPropertySymbols,Ur=Object.prototype.hasOwnProperty,Yn=Object.prototype.propertyIsEnumerable,Rn=(ct,Vt)=>{var Ie={};for(var wt in ct)Ur.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&Ai)for(var wt of Ai(ct))Vt.indexOf(wt)<0&&Yn.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const sr=null,xr=(ct,Vt)=>{var Ie=ct,{globalSetting:wt,loading:no,editData:Ar,dispatch:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=Rn(Ie,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)([]);(0,fe.useEffect)(()=>{var ur;if(!Ar||!Ir)return;const Qi=(ur=Ar==null?void 0:Ar.shixun)==null?void 0:ur.challenges.map(eo=>({id:eo==null?void 0:eo.id,score:eo.score}));qr(Qi)},[Ar]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Ki,Clear:No}));const Ki=()=>({challenges:[...vo]}),No=()=>{qr([])};console.log("editData--",Ar);const Gi=ur=>{var Qi,eo;return fe.createElement("div",null,(eo=(Qi=ur==null?void 0:ur.shixun)==null?void 0:Qi.challenges)==null?void 0:eo.map((Or,Yr)=>{var Eo;return fe.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},fe.createElement("div",null,fe.createElement("span",{className:"mr5"},"\u7B2C",Yr+1,"\u5173"),fe.createElement(zt.Z,{key:Yr,title:Or==null?void 0:Or.challenge_name},fe.createElement("span",null,(0,rt.Pq)(Or==null?void 0:Or.challenge_name,44)))),fe.createElement("p",{style:{marginBottom:0}},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u5206\u503C\uFF1A"),fe.createElement(He.Z,{precision:1,min:1,max:100,className:Et.baseFormItem,style:{width:176},value:(Eo=vo.find(Vi=>Vi.id===Or.id))==null?void 0:Eo.score,onChange:Vi=>{vo.find(Hr=>Hr.id===Or.id).score=Vi,qr([...vo])}})))}),fe.createElement("div",{style:{clear:"both"}}))};return fe.createElement("section",{className:Et.wrap},fe.createElement(Re.Z,{style:{paddingRight:10},className:Et.titleHtml,value:`${Ar==null?void 0:Ar.position}\u3001${Ar==null?void 0:Ar.name}`}),fe.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u5173\u5361")),Gi(Ar))};var Ni=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(xr)),lr=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,pi=Object.prototype.propertyIsEnumerable,ti=(ct,Vt)=>{var Ie={};for(var wt in ct)mo.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&lr)for(var wt of lr(ct))Vt.indexOf(wt)<0&&pi.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const hi=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Ii=(ct,Vt)=>{var Ie=ct,{editData:wt,globalSetting:no,loading:Ar,dispatch:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=ti(Ie,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)([]),[Ki,No]=(0,fe.useState)(),[Gi,ur]=(0,fe.useState)([]),[Qi,eo]=(0,fe.useState)(""),[Or,Yr]=(0,fe.useState)("");(0,fe.useEffect)(()=>{qr(["","","",""])},[]),(0,fe.useEffect)(()=>{if(!wt||!Ir)return;eo(wt==null?void 0:wt.name),Yr(wt==null?void 0:wt.analysis),qr(wt==null?void 0:wt.choices.map(xi=>xi.choice_text));const Hr=[];wt==null||wt.choices.map((xi,tr)=>{xi.is_answer&&Hr.push(tr)}),ur(Hr)},[wt]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Eo,Clear:Vi}));const Eo=()=>{if(!Qi)return gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Hr=vo.findIndex(tr=>!tr);if(Hr>-1)return gt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${hi[Hr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Gi.length)return gt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;if(Gi.length<2)return gt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const xi=vo.map((tr,Er)=>({choice_text:tr,is_answer:Gi.includes(Er)?1:0}));return{name:Qi,choices:xi,analysis:Or}},Vi=()=>{qr(["","","",""]),eo(""),Yr(""),ur("")};return fe.createElement("section",{className:Et.wrap},fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),fe.createElement(jn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qi,onChange:Hr=>eo(Hr)}),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u7B54\u6848\u9009\u9879\uFF1A",fe.createElement("span",{className:Et.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),vo.map((Hr,xi)=>fe.createElement("div",{className:Et.choiceWrap,key:xi},fe.createElement(zt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},fe.createElement("div",{className:`${Et.answer} ${Gi.includes(xi)?Et.activeAnswer:""}`,onClick:()=>{Gi.includes(xi)?ur(Gi.filter(tr=>tr!==xi)):ur([...Gi,xi])}},hi[xi])),fe.createElement("div",{className:Et.editorWrap},Ki===xi?fe.createElement(jn.Z,{id:`single-question-option-${xi}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Hr,onChange:tr=>{vo[xi]=tr,qr(vo)}}):fe.createElement("div",{className:Et.htmlWrap,onClick:()=>No(xi)},fe.createElement(Re.Z,{value:Hr}))),xi>1&&fe.createElement(zt.Z,{title:"\u5220\u9664"},fe.createElement("i",{className:`${Et.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{qr(vo.filter((tr,Er)=>Er!==xi)),Gi.includes(xi)?ur(Gi.filter(tr=>tr!==xi)):ur([...Gi,xi])}})),xi<7&&xi===vo.length-1&&fe.createElement(zt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},fe.createElement("i",{className:`${Et.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>qr([...vo,""])})))),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),fe.createElement(jn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Or,onChange:Hr=>Yr(Hr)}))};var ir=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(Ii)),zi=Object.getOwnPropertySymbols,an=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,Ut=(ct,Vt)=>{var Ie={};for(var wt in ct)an.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&zi)for(var wt of zi(ct))Vt.indexOf(wt)<0&&we.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const en=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],cn=(ct,Vt)=>{var Ie=ct,{editData:wt,globalSetting:no,loading:Ar,dispatch:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=Ut(Ie,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)([]),[Ki,No]=(0,fe.useState)(),[Gi,ur]=(0,fe.useState)(),[Qi,eo]=(0,fe.useState)(""),[Or,Yr]=(0,fe.useState)("");(0,fe.useEffect)(()=>{qr(["","","",""])},[]),(0,fe.useEffect)(()=>{if(!wt||!Ir)return;const Hr=[],xi=[];wt==null||wt.choices.forEach((tr,Er)=>{Hr.push(tr.choice_text),tr.is_answer&&xi.push(Er)}),eo(wt==null?void 0:wt.name),Yr(wt==null?void 0:wt.analysis),qr(Hr),ur(xi)},[wt]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Eo,Clear:Vi}));const Eo=()=>{if(!Qi)return gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const Hr=vo.findIndex(tr=>!tr);if(Hr>-1)return gt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${en[Hr]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(Gi))return gt.ZP.info("\u8BF7\u8BBE\u7F6E\u672C\u9898\u7684\u6B63\u786E\u7B54\u6848\uFF0C\u70B9\u51FB\u9009\u9879A/B...\u5373\u53EF\u5B8C\u6210\u8BBE\u7F6E"),!1;const xi=vo.map((tr,Er)=>({choice_text:tr,is_answer:Gi.includes(Er)?1:0}));return{name:Qi,choices:xi,analysis:Or}},Vi=()=>{qr(["","","",""]),eo(""),Yr(""),ur("")};return fe.createElement("section",{className:Et.wrap},fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),fe.createElement(jn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Qi,onChange:Hr=>eo(Hr)}),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.required},"*"),fe.createElement("span",{className:Et.title},"\u7B54\u6848\u9009\u9879\uFF1A",fe.createElement("span",{className:Et.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),vo.map((Hr,xi)=>fe.createElement("div",{className:Et.choiceWrap,key:xi},fe.createElement(zt.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},fe.createElement("div",{className:`${Et.answer} ${Gi!=null&&Gi.includes(xi)?Et.activeAnswer:""}`,onClick:()=>ur([xi])},en[xi])),fe.createElement("div",{className:Et.editorWrap},Ki===xi?fe.createElement(jn.Z,{id:`single-question-option-${xi}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:Hr,onChange:tr=>{vo[xi]=tr,qr(vo)}}):fe.createElement("div",{className:Et.htmlWrap,onClick:()=>No(xi)},fe.createElement(Re.Z,{value:Hr}))),xi>1&&fe.createElement(zt.Z,{title:"\u5220\u9664"},fe.createElement("i",{className:`${Et.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{qr(vo.filter((tr,Er)=>Er!==xi)),xi===Gi&&ur(null)}})),xi<7&&xi===vo.length-1&&fe.createElement(zt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},fe.createElement("i",{className:`${Et.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>qr([...vo,""])})))),fe.createElement("p",{className:Et.titleWrap},fe.createElement("span",{className:Et.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),fe.createElement(jn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Or,onChange:Hr=>Yr(Hr)}))};var xn=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(cn)),In=Me(66309),ni=Me(59637),Ui=Me(17663),Ot=Me(67294),_t=Object.defineProperty,Ct=Object.defineProperties,Jt=Object.getOwnPropertyDescriptors,ci=Object.getOwnPropertySymbols,Xn=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,It=(ct,Vt,Ie)=>Vt in ct?_t(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,hn=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Xn.call(Vt,Ie)&&It(ct,Ie,Vt[Ie]);if(ci)for(var Ie of ci(Vt))_n.call(Vt,Ie)&&It(ct,Ie,Vt[Ie]);return ct},Ci=(ct,Vt)=>Ct(ct,Jt(Vt)),Ri=(ct,Vt)=>{var Ie={};for(var wt in ct)Xn.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&ci)for(var wt of ci(ct))Vt.indexOf(wt)<0&&_n.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie},Ln=(ct,Vt,Ie)=>new Promise((wt,no)=>{var Ar=Ir=>{try{Tr(Ie.next(Ir))}catch(la){no(la)}},ko=Ir=>{try{Tr(Ie.throw(Ir))}catch(la){no(la)}},Tr=Ir=>Ir.done?wt(Ir.value):Promise.resolve(Ir.value).then(Ar,ko);Tr((Ie=Ie.apply(ct,Vt)).next())});const Rt=ct=>{if(!ct)return!1;if(/^s*$/.test(ct)||ct.trim()===""){gt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Vt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return ct==="|"?(gt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Si=({value:ct=[],onClose:Vt})=>Ot.createElement(In.default,{closable:!0,onClose:Vt,className:Et.keywordTag},Ot.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},ct.join(" \u6216 "))),Zi=(ct,Vt)=>{var Ie=ct,{editData:wt,globalSetting:no,loading:Ar,dispatch:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=Ri(Ie,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)(""),[Ki,No]=(0,fe.useState)(""),[Gi,ur]=(0,fe.useState)(""),[Qi,eo]=(0,fe.useState)(""),[Or]=St.default.useForm(),Yr=St.default.useWatch("use_keywords",Or);(0,fe.useEffect)(()=>{var xi;!wt||!Ir||(qr(wt==null?void 0:wt.name),No(wt==null?void 0:wt.analysis),ur((xi=wt==null?void 0:wt.answer_texts)==null?void 0:xi[0]),Or.setFieldsValue(hn({},wt)))},[wt]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:Eo,Clear:Vi}));const Eo=()=>Ln(void 0,null,function*(){if(!vo)return gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Or.validateFields()}catch(tr){gt.ZP.error(tr.errorFields[0].errors[0]);return}const xi=Or.getFieldsValue();return console.log(xi,"values"),hn({name:vo,answer_texts:[Gi],analysis:Ki},xi)}),Vi=()=>{qr(""),No(""),ur(""),Or.resetFields()},Hr=wt==null?void 0:wt.score;return Ot.createElement("section",{className:Et.wrap},Ot.createElement("p",{className:Et.titleWrap},Ot.createElement("span",{className:Et.required},"*"),Ot.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),Ot.createElement(jn.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:vo,onChange:xi=>qr(xi)}),Ot.createElement("p",{className:Et.titleWrap},Ot.createElement("span",{className:Et.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),Ot.createElement(jn.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Gi,onChange:xi=>ur(xi)}),Ot.createElement("p",{className:Et.titleWrap},Ot.createElement("span",{className:Et.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Ot.createElement(jn.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ki,onChange:xi=>No(xi)}),Ot.createElement(St.default,{form:Or,size:"large",onFinishFailed:xi=>Ln(void 0,null,function*(){var tr,Er;gt.ZP.error(xi.errorFields[0].errors[0]),Or.scrollToField((Er=(tr=xi==null?void 0:xi.errorFields)==null?void 0:tr[0])==null?void 0:Er.name,{behavior:"smooth",block:"center"})})},Ot.createElement(Bt.Z,{align:"middle",className:"mb30 mt20"},Ot.createElement(St.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},Ot.createElement(ni.Z,null)),Ot.createElement(Ae.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Ot.createElement(Ae.Z,null,Ot.createElement(zt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},Ot.createElement(Ui.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Yr&&Ot.createElement(St.default.List,{name:"keywords",rules:[{validator(xi,tr){return tr!=null&&tr.length?(tr==null?void 0:tr.reduce((Ao,Ho)=>Ao+Ho.score,0))>parseFloat(Hr)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD"))}}]},(xi,{add:tr,remove:Er})=>Ot.createElement(Ot.Fragment,null,Ot.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),Ot.createElement(Bt.Z,{align:"middle",className:"font14 mb30"},Ot.createElement(Ae.Z,{flex:1},Ot.createElement(it.default,{value:Qi,onChange:Ao=>{eo(Ao.target.value)},maxLength:50,allowClear:!0,onPressEnter:Ao=>{var Ho,Pa,qi,Vs;const kr=`${(Ho=Ao.target)==null?void 0:Ho.value}`,Ro=(qi=(Pa=kr==null?void 0:kr.split("|"))==null?void 0:Pa.filter(Fa=>!!Fa))==null?void 0:qi.map(Fa=>Fa==null?void 0:Fa.trim()),Xr=Or.getFieldValue("keywords"),ds=((Vs=Xr==null?void 0:Xr.map(Fa=>Fa==null?void 0:Fa.keyword))==null?void 0:Vs.flat())||[];for(const Fa of Ro)if(ds.includes(Fa)){gt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Rt(kr)&&(tr({keyword:Ro,score:1}),eo(""))},className:Et.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),Ot.createElement(Ae.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),xi.map(Ao=>{var Ho=Ao,{key:Pa,name:qi}=Ho,Vs=Ri(Ho,["key","name"]);return Ot.createElement(Bt.Z,{key:Pa,style:{marginRight:148}},Ot.createElement(Ae.Z,{flex:1},Ot.createElement(Bt.Z,{align:"middle",justify:"space-between"},Ot.createElement(St.default.Item,Ci(hn({},Vs),{name:[qi,"keyword"]}),Ot.createElement(Si,{onClose:()=>Er(qi)})),Ot.createElement(St.default.Item,Ci(hn({},Vs),{name:[qi,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Ot.createElement(He.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Wr=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(Zi)),En=Me(69234),li={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},bo=Me(40043),La=Me(24018),sa=Object.defineProperty,Yi=Object.defineProperties,Wi=Object.getOwnPropertyDescriptors,er=Object.getOwnPropertySymbols,Mo=Object.prototype.hasOwnProperty,ra=Object.prototype.propertyIsEnumerable,ai=(ct,Vt,Ie)=>Vt in ct?sa(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,Mr=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Mo.call(Vt,Ie)&&ai(ct,Ie,Vt[Ie]);if(er)for(var Ie of er(Vt))ra.call(Vt,Ie)&&ai(ct,Ie,Vt[Ie]);return ct},ml=(ct,Vt)=>Yi(ct,Wi(Vt)),xs=(ct,Vt)=>{var Ie={};for(var wt in ct)Mo.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&er)for(var wt of er(ct))Vt.indexOf(wt)<0&&ra.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const $a=ct=>{var Vt=ct,{value:Ie,onChange:wt,scrollId:no}=Vt,Ar=xs(Vt,["value","onChange","scrollId"]);return fe.createElement("div",{id:no||""},fe.createElement(jn.Z,ml(Mr({},Ar),{defaultValue:Ie,onChange:(ko,Tr)=>{Tr!=null&&Tr.length?wt(ko,Tr):wt(ko)}})))},Wt=({value:ct,onChange:Vt,placeholder:Ie,height:wt=140,isEdit:no})=>no?fe.createElement(jn.Z,{watch:!0,isFocus:!0,height:wt,placeholder:Ie,defaultValue:ct,onChange:Vt}):fe.createElement("div",{style:{cursor:"pointer"}},ct?fe.createElement(Re.Z,{className:li.inputBorder,value:ct}):fe.createElement("div",{className:`${li.inputBorder} ${li.placeholder}`},Ie));var $i=Me(67294),Vo=Object.defineProperty,Pr=Object.defineProperties,Ia=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertySymbols,na=Object.prototype.hasOwnProperty,Fo=Object.prototype.propertyIsEnumerable,_o=(ct,Vt,Ie)=>Vt in ct?Vo(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,da=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))na.call(Vt,Ie)&&_o(ct,Ie,Vt[Ie]);if(zo)for(var Ie of zo(Vt))Fo.call(Vt,Ie)&&_o(ct,Ie,Vt[Ie]);return ct},bn=(ct,Vt)=>Pr(ct,Ia(Vt)),Ga=(ct,Vt)=>{var Ie={};for(var wt in ct)na.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&zo)for(var wt of zo(ct))Vt.indexOf(wt)<0&&Fo.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const Sn=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],Zo=({value:ct,onChange:Vt,choiceTextKey:Ie,answerKey:wt,index:no,isEdit:Ar,setInputActive:ko,form:Tr,choiceOptionsPath:Ir,allowChangeMode:la,showAddIcon:vo,addItem:qr,deleteItem:Ki})=>{const No=(ct==null?void 0:ct[wt])===!0,Gi=()=>{const Qi=Tr.getFieldValue(Ir);Tr.setFieldValue(Ir,Qi.map(eo=>bn(da({},eo),{[wt]:!1})))},ur=()=>{No?Vt(bn(da({},ct),{[wt]:!1})):(la||Gi(),Vt(bn(da({},ct),{[wt]:!0})))};return $i.createElement(Bt.Z,{className:li.choiceWrap,align:"middle",wrap:!1},$i.createElement(Ae.Z,{onClick:ur,className:`${li.choiceIndex} ${No?li.activeAnswer:""}`},Sn[no]),$i.createElement(Ae.Z,{flex:1,className:`${li.editorWrap} ml15`,onClick:ko},$i.createElement(Wt,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:Ar,value:ct==null?void 0:ct[Ie],onChange:Qi=>{Vt(bn(da({},ct),{[Ie]:Qi}))}})),$i.createElement(Ae.Z,{flex:"0 0 auto",className:"ml15"},$i.createElement("div",{onClick:ur,className:`${li.setAnswerBtn} ${No?li.activeAnswer:""}`},No?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),$i.createElement(Ae.Z,{className:li.actionWrapper},$i.createElement(zt.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},$i.createElement(bo.Z,{className:li.addIcon,onClick:qr,style:{visibility:vo?"visible":"hidden"}})),$i.createElement(zt.Z,{title:"\u5220\u9664"},$i.createElement(La.Z,{className:li.deleteIcon,onClick:Ki,style:{visibility:no>1?"visible":"hidden"}}))))},js=({questionTitlePlaceholder:ct,titleKey:Vt,choiceKey:Ie,analysisKey:wt,choiceTextKey:no,answerKey:Ar,choiceOptionsPath:ko,allowChangeMode:Tr=!0,form:Ir,showAnalysis:la=!0})=>{const[vo,qr]=(0,fe.useState)(),[Ki,No]=(0,fe.useState)(!1);return $i.createElement("div",{className:li.wrap},$i.createElement("div",{className:li.questionTitleEditorWrap},$i.createElement(St.default.Item,{label:"\u9898\u5E72",name:Vt,labelCol:{span:24},rules:[{required:!0}]},$i.createElement($a,{scrollId:Array.isArray(Vt)?Vt.join("_"):`${Vt}`,watch:!0,height:140,placeholder:ct}))),$i.createElement(St.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),$i.createElement(St.default.List,{name:Ie,rules:[{validator(Gi,ur){const Qi=ur.some(Or=>Or[Ar]),eo=ur.findIndex(Or=>{var Yr;return((Yr=Or[no])==null?void 0:Yr.length)<=0});return eo!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${Sn[eo]}\u9009\u9879\u7684\u5185\u5BB9`)):Qi?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Gi,{add:ur,remove:Qi})=>$i.createElement("div",{id:Array.isArray(ko)?ko.join("_"):`${ko}`},Gi.map((eo,Or)=>{var Yr=eo,{key:Eo,name:Vi}=Yr,Hr=Ga(Yr,["key","name"]);const xi=vo===Eo,tr=()=>{qr(Eo)},Er=Or<7&&Or===Gi.length-1,Ao=()=>ur({[no]:"",[Ar]:0}),Ho=()=>Qi(Vi);return $i.createElement(St.default.Item,bn(da({},Hr),{key:Eo,name:Vi,noStyle:!0}),$i.createElement(Zo,{choiceTextKey:no,answerKey:Ar,index:Or,isEdit:xi,setInputActive:tr,form:Ir,choiceOptionsPath:ko,allowChangeMode:Tr,showAddIcon:Er,addItem:Ao,deleteItem:Ho}))}),Gi.length<8&&$i.createElement("div",{className:`${li.addBtn} mb30`,onClick:()=>ur({[no]:"",[Ar]:0})},"\u6DFB\u52A0\u9009\u9879"))),la&&$i.createElement("div",{onClick:()=>No(!0)},$i.createElement(St.default.Item,{name:wt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},$i.createElement(Wt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ki}))))};var Vr=Me(67294),Ll=Object.defineProperty,Ha=Object.defineProperties,$o=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,nl=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable,ki=(ct,Vt,Ie)=>Vt in ct?Ll(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,$e=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))nl.call(Vt,Ie)&&ki(ct,Ie,Vt[Ie]);if(Ba)for(var Ie of Ba(Vt))wa.call(Vt,Ie)&&ki(ct,Ie,Vt[Ie]);return ct},rs=(ct,Vt)=>Ha(ct,$o(Vt)),hu=(ct,Vt)=>{var Ie={};for(var wt in ct)nl.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&Ba)for(var wt of Ba(ct))Vt.indexOf(wt)<0&&wa.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const cu=({value:ct,onChange:Vt})=>{const Ie=no=>{Be.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u8BA4\u8981\u5220\u9664\u8FD9\u4E2A\u53C2\u8003\u7B54\u6848\u5417\uFF1F",className:li.modal,onOk:()=>{const Ar=[...ct];Ar.splice(no,1),Vt(Ar)}})},wt=()=>{const no=[...ct];no.push(""),Vt(no)};return Vr.createElement(Bt.Z,{align:"middle",className:"ml20",gutter:[40,20]},ct==null?void 0:ct.map((no,Ar)=>Vr.createElement(Ae.Z,{key:`${no}_${Ar}`,className:li.blankWrapper},Vr.createElement(it.default,{className:li.blankInput,defaultValue:no,maxLength:1e3,onBlur:ko=>{const Tr=[...ct],Ir=ko.target.value.trim();Tr[Ar]=Ir,Vt(Tr)}}),Vr.createElement(zt.Z,{title:"\u5220\u9664"},Vr.createElement(La.Z,{className:li.deleteIcon,style:{marginLeft:15,visibility:Ar>0?"visible":"hidden"},onClick:()=>Ie(Ar)})))),Vr.createElement(Ae.Z,null,Vr.createElement("div",{className:`${li.addBtn}`,onClick:()=>{wt()}},"\u65B0\u589E\u7B54\u6848")))},ul=({value:ct=!0,onChange:Vt})=>Vr.createElement(ni.Z,{checked:!ct,onChange:Ie=>{Vt(!Ie)}}),kl="\u2581",zl=({questionTitlePlaceholder:ct,form:Vt,name:Ie,scoreByBlank:wt="use_blank_score",answerKey:no,titleKey:Ar="name",analysisKey:ko="analysis",isOrdered:Tr="is_ordered"})=>{var Ir,la;const[vo,qr]=(0,fe.useState)(!1),Ki=(Eo,Vi)=>{const Hr=Vi.line;let xi=0;for(let Er=0;Er<Hr;Er++)xi+=Eo.getLine(Er).split(kl).length-1;const tr=Eo.getLine(Hr).substring(0,Vi.ch);return xi+=tr.split(kl).length-1,xi},No=(Eo,Vi,Hr,xi)=>{const tr=Eo.getRange(Vi.from,Vi.to);let Er=0;if(Vi.text.forEach(Ao=>{Er+=Ao.split(kl).length-1}),Vi.origin!=="setValue"){if(tr&&tr.indexOf(kl)!==-1){const Ao=tr.split(kl).length-1,Ho=Ki(Eo,Vi.from);if(console.log(`\u5220\u9664${Ao}\u4E2A\uFF0C \u524D\u9762\u6709${Ho}\u4E2A\uFF0C\u65B0\u589E${Er}\u4E2A`),Ao>1){const Pa=Array.from({length:Ao},(qi,Vs)=>Ho+Vs);xi(Pa)}else xi(Ho)}else if(Er>0){const Ao=Ki(Eo,Vi.from);console.log(`\u65B0\u589E${Er}\u4E2A\uFF0C\u4E4B\u524D\u6709${Ao}\u4E2A`),Hr(Er,Ao)}}},Gi=()=>{const Eo=Vt.getFieldValue(["sub_item_banks",...no]);Vt.setFieldValue(["sub_item_banks",...no],Eo==null?void 0:Eo.map((Vi,Hr)=>rs($e({},Vi),{position:Hr+1})))},ur=(0,fe.useRef)(),Qi=(Eo,Vi)=>{for(let Hr=0;Hr<Eo;Hr++)ur.current({position:null,answer_text:[""]},Vi+Hr);Gi()},eo=(0,fe.useRef)(),Or=Eo=>{eo.current(Eo),Gi()},Yr=(la=(Ir=Vt.getFieldValue("sub_item_banks"))==null?void 0:Ir[no==null?void 0:no[0]])==null?void 0:la[no==null?void 0:no[1]];return Vr.createElement("div",{className:li.wrap},Vr.createElement("div",{className:li.questionTitleEditorWrap},Vr.createElement(St.default.Item,{label:"\u9898\u5E72",name:Ar,labelCol:{span:24},rules:[{required:!0}]},Vr.createElement($a,{scrollId:"name",watch:!0,height:140,placeholder:ct,showNullButton:!0,onCMBeforeChange:(Eo,Vi)=>{No(Eo,Vi,Qi,Or)}}))),Vr.createElement(St.default.List,{name:no,rules:[{validator(Eo,Vi){if((Vi==null?void 0:Vi.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Hr of Vi){const{answer_text:xi}=Hr||{};if(xi!=null&&xi.some(tr=>(tr==null?void 0:tr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Eo,{add:Vi,remove:Hr},{errors:xi})=>(ur.current=Vi,eo.current=Hr,Vr.createElement(Vr.Fragment,null,Vr.createElement(St.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Eo.map((tr,Er)=>{var Ao=tr,{key:Ho,name:Pa}=Ao,qi=hu(Ao,["key","name"]);return Vr.createElement(Bt.Z,{className:"mb20",key:Ho,align:"middle",wrap:!1},Vr.createElement(Ae.Z,{flex:"0 0 auto",className:`${li.blankIndex}`},"\u586B\u7A7A\u9879",Er+1),Vr.createElement(Ae.Z,{flex:1},Vr.createElement(Bt.Z,{align:"top",justify:"space-between",wrap:!1},Vr.createElement(Ae.Z,null,Vr.createElement(St.default.Item,rs($e({},qi),{name:[Pa,"answer_text"],noStyle:!0}),Vr.createElement(cu,null))),(Vt==null?void 0:Vt.getFieldValue(["sub_item_banks",...wt]))&&Vr.createElement(Ae.Z,{flex:"224px"},Vr.createElement(St.default.Item,rs($e({},qi),{name:[Pa,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:li.blankInputNumberWrapper}),Vr.createElement(He.Z,{className:li.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),Vr.createElement(St.default.Item,rs($e({},qi),{name:[Pa,"position"],noStyle:!0}),Vr.createElement(it.default,{type:"hidden"}))))})))),Vr.createElement(Bt.Z,{align:"middle"},Vr.createElement(St.default.Item,{name:[Ie,"downcase"],valuePropName:"checked"},Vr.createElement(ni.Z,null)),Vr.createElement(Ae.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),Vr.createElement(Bt.Z,{align:"middle"},Vr.createElement(St.default.Item,{name:[Ie,"no_space"],valuePropName:"checked"},Vr.createElement(ni.Z,null)),Vr.createElement(Ae.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Yr==null?void 0:Yr.length)>1&&Vr.createElement(Bt.Z,{align:"middle",className:(Yr==null?void 0:Yr.length)>1?"mb30":`${li.hide}`},Vr.createElement(St.default.Item,{name:Tr},Vr.createElement(ul,null)),Vr.createElement(Ae.Z,{className:"ml10"},"\u5141\u8BB8\u5B66\u751F\u6BCF\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u4E0E\u6807\u51C6\u7B54\u6848\u7684\u987A\u5E8F\u4E0D\u4E00\u81F4")),Vr.createElement("div",{onClick:()=>qr(!0)},Vr.createElement(St.default.Item,{name:ko,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Vr.createElement(Wt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:vo}))))};var sh=Object.defineProperty,Su=Object.defineProperties,Ra=Object.getOwnPropertyDescriptors,qa=Object.getOwnPropertySymbols,Nr=Object.prototype.hasOwnProperty,vr=Object.prototype.propertyIsEnumerable,uo=(ct,Vt,Ie)=>Vt in ct?sh(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,un=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Nr.call(Vt,Ie)&&uo(ct,Ie,Vt[Ie]);if(qa)for(var Ie of qa(Vt))vr.call(Vt,Ie)&&uo(ct,Ie,Vt[Ie]);return ct},Gr=(ct,Vt)=>Su(ct,Ra(Vt)),Io=(ct,Vt)=>{var Ie={};for(var wt in ct)Nr.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&qa)for(var wt of qa(ct))Vt.indexOf(wt)<0&&vr.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const Va={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ta=({value:ct,onChange:Vt,form:Ie,choiceKey:wt})=>{const no=(ct==null?void 0:ct.is_answer)===!0,Ar=ct==null?void 0:ct.choice_text,ko=()=>{var Tr;const Ir=(Tr=Ie==null?void 0:Ie.getFieldValue(["sub_item_banks",...wt]))==null?void 0:Tr.map(la=>({choice_text:la==null?void 0:la.choice_text,is_answer:!1}));Ie==null||Ie.setFieldValue(["sub_item_banks",...wt],Ir),Vt(Gr(un({},ct),{is_answer:!0}))};return fe.createElement(Bt.Z,{className:li.choiceWrap,align:"middle",wrap:!1},fe.createElement(Ae.Z,{onClick:ko,className:`${li.choiceIndex} ${li.judgementIndex} ${no?li.activeAnswer:""}`},Va[Ar]),fe.createElement(Ae.Z,{flex:1,className:`${li.editorWrap} ml15`},fe.createElement("div",{className:`${li.inputBorder} ${li.placeholder} ${no?li.activeJudgementAnswer:""}`},Ar)),fe.createElement(Ae.Z,{flex:"0 0 auto",className:"ml15"},fe.createElement("div",{onClick:ko,className:`${li.setAnswerBtn} ${no?li.activeAnswer:""}`},no?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},os=({questionTitlePlaceholder:ct,choiceKey:Vt="choices",form:Ie,titleKey:wt="name",analysisKey:no="analysis"})=>{const[Ar,ko]=(0,fe.useState)(!1);return fe.createElement("div",{className:li.wrap},fe.createElement("div",{className:li.questionTitleEditorWrap},fe.createElement(St.default.Item,{label:"\u9898\u5E72",name:wt,labelCol:{span:24},rules:[{required:!0}]},fe.createElement($a,{scrollId:"name",watch:!0,height:140,placeholder:ct}))),fe.createElement(St.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},fe.createElement(St.default.List,{name:Vt,rules:[{validator(Tr,Ir){return Ir.some(vo=>(vo==null?void 0:vo.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Tr=>fe.createElement("div",{id:"choices"},Tr.map(Ir=>{var la=Ir,{key:vo,name:qr}=la,Ki=Io(la,["key","name"]);return fe.createElement(St.default.Item,Gr(un({},Ki),{key:vo,name:qr,noStyle:!0}),fe.createElement(Ta,{form:Ie,choiceKey:Vt}))})))),fe.createElement("div",{onClick:()=>ko(!0)},fe.createElement(St.default.Item,{name:no,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},fe.createElement(Wt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ar}))))};var Ws=Object.defineProperty,vl=Object.defineProperties,yl=Object.getOwnPropertyDescriptors,xu=Object.getOwnPropertySymbols,Ou=Object.prototype.hasOwnProperty,Xt=Object.prototype.propertyIsEnumerable,El=(ct,Vt,Ie)=>Vt in ct?Ws(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,Gl=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Ou.call(Vt,Ie)&&El(ct,Ie,Vt[Ie]);if(xu)for(var Ie of xu(Vt))Xt.call(Vt,Ie)&&El(ct,Ie,Vt[Ie]);return ct},wu=(ct,Vt)=>vl(ct,yl(Vt)),vs=(ct,Vt)=>{var Ie={};for(var wt in ct)Ou.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&xu)for(var wt of xu(ct))Vt.indexOf(wt)<0&&Xt.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie};const Yu=ct=>{var Vt=ct,{value:Ie,onChange:wt}=Vt,no=vs(Vt,["value","onChange"]);const Ar=ko=>{wt([ko])};return fe.createElement(jn.Z,wu(Gl({},no),{defaultValue:Ie==null?void 0:Ie[0],onChange:Ar}))},Hh=ct=>{if(!ct)return!1;let Vt=new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~\uFF01@#\uFFE5\u2026\u2026&*\uFF08\uFF09\u2014\u3010\u3011\u2018\uFF1B\uFF1A\u201D\u201C\u3002\uFF0C\u3001\uFF1F\u300C\u300D\u300E\u300F_\\+\\-\xB7%\u300A\u300B]|[\\\\/]");return ct==="|"?(gt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},yh=({value:ct=[],onClose:Vt})=>fe.createElement(In.default,{closable:!0,onClose:Vt,className:li.keywordTag},ct==null?void 0:ct.join(" \u6216 ")),Ka=({questionTitlePlaceholder:ct,form:Vt,showKeywords:Ie,isMustKeyWords:wt=Ie,titleKey:no="name",analysisKey:Ar="analysis",answerTexts:ko="answer_texts",keywords:Tr="keywords",useKeywords:Ir="use_keywords",indexs:la})=>{const[vo,qr]=(0,fe.useState)(!1),[Ki,No]=(0,fe.useState)(""),Gi=St.default.useWatch("sub_item_banks",Vt),{use_keywords:ur,score:Qi}=(Gi==null?void 0:Gi[la])||{};return console.log(ur,Qi,"itemValues"),fe.createElement("div",{className:li.wrap},fe.createElement("div",{className:li.questionTitleEditorWrap},fe.createElement(St.default.Item,{label:"\u9898\u5E72",name:no,labelCol:{span:24},rules:[{required:!0}]},fe.createElement($a,{scrollId:"name",watch:!0,height:140,placeholder:ct}))),fe.createElement(St.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:ko,labelCol:{span:24}},fe.createElement(Yu,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Ie&&!wt&&fe.createElement(St.default.Item,{hidden:!0,name:Ir,valuePropName:"checked"},fe.createElement(ni.Z,{defaultChecked:!0})),Ie&&wt&&fe.createElement(Bt.Z,{align:"middle",className:"mb30"},fe.createElement(St.default.Item,{name:Ir,valuePropName:"checked"},fe.createElement(ni.Z,null)),fe.createElement(Ae.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),fe.createElement(Ae.Z,null,fe.createElement(zt.Z,{placement:"right",title:"\u9009\u4E2D\u540E\uFF0C\u9700\u8981\u8BBE\u7F6E\u6BCF\u4E2A\u5173\u952E\u8BCD\u7684\u5206\u503C\uFF0C\u7CFB\u7EDF\u4F1A\u6839\u636E\u8BBE\u7F6E\u7684\u5173\u952E\u8BCD\u8FDB\u884C\u81EA\u52A8\u5224\u5206\uFF1B \u6240\u6709\u5173\u952E\u8BCD\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u5C0F\u9898\u5206\u503C\u3002"},fe.createElement(Ui.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(ur||!wt)&&fe.createElement(St.default.List,{name:Tr,rules:[{validator(eo,Or){return wt?Or!=null&&Or.length?(Or==null?void 0:Or.reduce((Eo,Vi)=>Eo+Vi.score,0))>parseFloat(Qi)?Promise.reject(new Error("\u6240\u6709\u5173\u952E\u8BCD\u7684\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u5C0F\u4E8E\u7B49\u4E8E\u8BE5\u5C0F\u9898\u7684\u5206\u503C")):Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u5224\u5206\u5173\u952E\u8BCD")):Promise.resolve()}}]},(eo,{add:Or,remove:Yr})=>fe.createElement(fe.Fragment,null,fe.createElement("div",{className:`${li.title} mb10`},wt?"\u5173\u952E\u8BCD":fe.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),fe.createElement(Bt.Z,{align:"middle",className:"font14 mb30"},fe.createElement(Ae.Z,{flex:1},fe.createElement(it.default,{value:Ki,onChange:Eo=>{No(Eo.target.value)},maxLength:50,allowClear:!0,onPressEnter:Eo=>{var Vi,Hr,xi,tr;const Er=`${(Vi=Eo.target)==null?void 0:Vi.value}`,Ao=(xi=(Hr=Er==null?void 0:Er.split("|"))==null?void 0:Hr.filter(qi=>!!qi))==null?void 0:xi.map(qi=>qi==null?void 0:qi.trim()),Ho=Vt.getFieldValue(["sub_item_banks",...Tr]),Pa=((tr=Ho==null?void 0:Ho.map(qi=>qi==null?void 0:qi.keyword))==null?void 0:tr.flat())||[];for(const qi of Ao)if(Pa.includes(qi)){gt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Hh(Er)&&(Or({keyword:Ao,score:1}),No(""))},className:li.inputBorder,placeholder:"\u652F\u6301\u8BBE\u7F6E\u591A\u4E2A\u5173\u952E\u8BCD\uFF1B\u5E76\u5217\u5173\u952E\u8BCD\uFF08\u6216\u7684\u5173\u7CFB\uFF09\u8BF7\u7528\u201C|\u201D\u5206\u9694\u5F00"})),fe.createElement(Ae.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),eo.map(Eo=>{var Vi=Eo,{key:Hr,name:xi}=Vi,tr=vs(Vi,["key","name"]);return fe.createElement(Bt.Z,{key:Hr,className:"mb20",style:{marginRight:148}},fe.createElement(Ae.Z,{flex:1},fe.createElement(Bt.Z,{align:"middle",justify:"space-between"},fe.createElement(St.default.Item,wu(Gl({},tr),{name:[xi,"keyword"]}),fe.createElement(yh,{onClose:()=>Yr(xi)})),wt&&fe.createElement(St.default.Item,wu(Gl({},tr),{name:[xi,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:li.blankInputNumberWrapper}),fe.createElement(He.Z,{className:li.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),fe.createElement("div",{onClick:()=>qr(!0)},fe.createElement(St.default.Item,{name:Ar,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},fe.createElement(Wt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:vo}))))};var Ko=Me(67294),Bo=Object.defineProperty,ia=Object.defineProperties,Ua=Object.getOwnPropertyDescriptors,cs=Object.getOwnPropertySymbols,Sr=Object.prototype.hasOwnProperty,Zh=Object.prototype.propertyIsEnumerable,_u=(ct,Vt,Ie)=>Vt in ct?Bo(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,Sl=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))Sr.call(Vt,Ie)&&_u(ct,Ie,Vt[Ie]);if(cs)for(var Ie of cs(Vt))Zh.call(Vt,Ie)&&_u(ct,Ie,Vt[Ie]);return ct},Wh=(ct,Vt)=>ia(ct,Ua(Vt)),lh=(ct,Vt)=>{var Ie={};for(var wt in ct)Sr.call(ct,wt)&&Vt.indexOf(wt)<0&&(Ie[wt]=ct[wt]);if(ct!=null&&cs)for(var wt of cs(ct))Vt.indexOf(wt)<0&&Zh.call(ct,wt)&&(Ie[wt]=ct[wt]);return Ie},Di=(ct,Vt,Ie)=>new Promise((wt,no)=>{var Ar=Ir=>{try{Tr(Ie.next(Ir))}catch(la){no(la)}},ko=Ir=>{try{Tr(Ie.throw(Ir))}catch(la){no(la)}},Tr=Ir=>Ir.done?wt(Ir.value):Promise.resolve(Ir.value).then(Ar,ko);Tr((Ie=Ie.apply(ct,Vt)).next())});const{Panel:Ms}=En.default,Os=null,Iu=(ct,Vt)=>{var Ie=ct,{globalSetting:wt,loading:no,dispatch:Ar,editData:ko,onRef:Tr=()=>{},isEdit:Ir}=Ie,la=lh(Ie,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[vo,qr]=(0,fe.useState)(""),[Ki,No]=(0,fe.useState)([]),[Gi]=St.default.useForm();(0,fe.useEffect)(()=>{!ko||!Ir||(qr(ko==null?void 0:ko.name),No(ko==null?void 0:ko.sub_item_banks),Gi.setFieldsValue(Sl({},ko)))},[ko]),(0,fe.useEffect)(()=>{No(Gi.getFieldValue("sub_item_banks"))},[St.default.useWatch("sub_item_banks",Gi)]),(0,fe.useImperativeHandle)(Vt,()=>({onSave:ur,Clear:Qi}));const ur=()=>Di(void 0,null,function*(){if(!vo)return gt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Gi.validateFields()}catch(Hr){return console.log(Hr,"errInfo"),gt.ZP.error(Hr.errorFields[0].errors[0]),!1}const Vi=Ki.map(Hr=>Sl({id:Hr.id>1?Hr.id:null},Hr));return{name:vo,sub_item_banks:Vi}}),Qi=()=>{qr(""),No([])},eo={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},Or=({value:Vi})=>Ko.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},Vi),[Yr,Eo]=(0,fe.useState)();return Ko.createElement("section",{className:Et.wrap},Ko.createElement("p",{className:Et.titleWrap},Ko.createElement("span",{className:Et.required},"*"),Ko.createElement("span",{className:Et.title},"\u9898\u5E72\uFF1A")),Ko.createElement(jn.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:vo,onChange:Vi=>qr(Vi)}),Ko.createElement(St.default,{form:Gi,autoComplete:"off"},Ko.createElement(St.default.List,{name:"sub_item_banks",rules:[{validator(Vi,Hr){return Hr?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Vi,{add:Hr,remove:xi})=>{const tr=Gi.getFieldValue("sub_item_banks");return Ko.createElement(Ko.Fragment,null,Ko.createElement(En.default,{className:Vi.length>0?Et.collapseWrapper:"",bordered:!1,expandIcon:({isActive:Er})=>Ko.createElement("i",{className:`iconfont icon-weizhankai ${Er?Et.open:Et.close}`,style:{fontSize:14,transition:"all .2s"}})},Vi.map((Er,Ao)=>{var Ho=Er,{key:Pa,name:qi}=Ho,Vs=lh(Ho,["key","name"]),kr,Ro,Xr,ds,Fa,Gs,Xu,Ah,Cu,ju,gr,cl;return Ko.createElement(Ms,{className:Et.panel,forceRender:!0,header:Ko.createElement("div",{className:Et.panelHeader},"\u7B2C",Ao+1,"\u5C0F\u9898",Ko.createElement("span",null,"\uFF08",eo[(kr=tr==null?void 0:tr[qi])==null?void 0:kr.item_type],"\uFF09")),extra:Ko.createElement(Bt.Z,{align:"middle",onClick:We=>We.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Ro=tr==null?void 0:tr[qi])==null?void 0:Ro.item_type)=="completion"&&Ko.createElement(St.default.Item,Wh(Sl({},Vs),{name:[qi,"score"],className:Et.blankInputNumberWrapper,style:{marginBottom:0}}),((Xr=tr==null?void 0:tr[qi])==null?void 0:Xr.item_type)=="completion"&&Ko.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Ko.createElement(Or,{value:(ds=tr==null?void 0:tr[qi])==null?void 0:ds.score}),"\u5206")),((Fa=tr==null?void 0:tr[qi])==null?void 0:Fa.item_type)=="completion"&&Ko.createElement(Ko.Fragment,null,Ko.createElement(Zt.ZP.Group,{defaultValue:(Gs=tr==null?void 0:tr[qi])==null?void 0:Gs.use_blank_score,className:Et.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:We=>{var dt;console.log(Gi.getFieldsValue()),Gi==null||Gi.setFieldValue(["sub_item_banks",qi,"use_blank_score"],(dt=We==null?void 0:We.target)==null?void 0:dt.value),Eo(new Date)}}),Ko.createElement(zt.Z,{overlayInnerStyle:{width:460},title:Ko.createElement("div",null,"\u6309\u7A7A\u7ED9\u5206\uFF1A\u9700\u8981\u5206\u522B\u8BBE\u7F6E\u6BCF\u4E2A\u586B\u7A7A\u9879\u7684\u5206\u503C\uFF0C\u586B\u7A7A\u9879\u7B54\u5BF9\u4E4B\u540E\u5219\u83B7\u5F97\u5BF9\u5E94\u7684\u5206\u503C\u3002",Ko.createElement("br",null),"\u6309\u9898\u7ED9\u5206\uFF1A\u7B54\u5BF9\u5168\u90E8\u586B\u7A7A\u9879\u4E4B\u540E\u624D\u80FD\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\u3002")},Ko.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Pa},Ko.createElement(St.default.Item,Wh(Sl({},Vs),{name:qi}),(((Xu=tr==null?void 0:tr[qi])==null?void 0:Xu.item_type)=="single"||((Ah=tr==null?void 0:tr[qi])==null?void 0:Ah.item_type)=="multiple")&&Ko.createElement(js,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Cu=tr==null?void 0:tr[qi])==null?void 0:Cu.item_type)!="single",form:Gi,choiceKey:[qi,"choices"],titleKey:[qi,"name"],analysisKey:[qi,"analysis"],choiceOptionsPath:["sub_item_banks",qi,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((ju=tr==null?void 0:tr[qi])==null?void 0:ju.item_type)=="completion"&&Ko.createElement(zl,{form:Gi,name:qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[qi,"use_blank_score"],titleKey:[qi,"name"],analysisKey:[qi,"analysis"],isOrdered:[qi,"is_ordered"],answerKey:[qi,"standard_answer"],key:Yr}),((gr=tr==null?void 0:tr[qi])==null?void 0:gr.item_type)=="judgement"&&Ko.createElement(os,{form:Gi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[qi,"name"],analysisKey:[qi,"analysis"],choiceKey:[qi,"choices"]}),((cl=tr==null?void 0:tr[qi])==null?void 0:cl.item_type)=="subjective"&&Ko.createElement(Ka,{showKeywords:!0,form:Gi,titleKey:[qi,"name"],analysisKey:[qi,"analysis"],answerTexts:[qi,"answer_texts"],useKeywords:[qi,"use_keywords"],keywords:[qi,"keywords"],indexs:qi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var sc=(0,tt.connect)(({loading:ct,globalSetting:Vt})=>({globalSetting:Vt,loading:ct.effects}),null,null,{forwardRef:!0})((0,fe.forwardRef)(Iu)),Vh=Me(60580),Oo=Me(38089),Fh=Me(88044),Pu=Me(57399),zs={flex_box_center:"flex_box_center___xDdtW",flex_space_between:"flex_space_between___J4mFI",flex_box_vertical_center:"flex_box_vertical_center___hDYn6",flex_box_center_end:"flex_box_center_end___H7l1j",flex_box_column:"flex_box_column___TPd2T",questionInfo:"questionInfo___ABq66",label:"label___VQOr7",content:"content____HZ6z",leftPart:"leftPart___YB0y5",rightPart:"rightPart___UVMmS",dragItem:"dragItem___Hbx8k",blackText:"blackText___U4u33",greyText:"greyText___rWIL_",iconWrapper:"iconWrapper___I0kek",contentArea:"contentArea___hGC13",dragging:"dragging___z7VVY",hidden:"hidden___nWAxb",dragIcon:"dragIcon___j91TC",deleteIcon:"deleteIcon___cmCqc",disabled:"disabled___ZlKMj",challengeNameWrapper:"challengeNameWrapper___SpiRb",challengeName:"challengeName___lmQe2",shixunPreviewFooter:"shixunPreviewFooter___u0CzD",shixunInfoWrapper:"shixunInfoWrapper___HzLHD",shixunInfo:"shixunInfo___qaQlF",btnToDetail:"btnToDetail___scXqr",fixedBottom:"fixedBottom___wTBAR",cancelBtn:"cancelBtn___Km4Gi",confirmBtn:"confirmBtn___WrECz",previewBtn:"previewBtn____oGPS",setScoreModalTable:"setScoreModalTable___CjDlp",title:"title___cQWdZ",tipcontent:"tipcontent___A8tZ5",name:"name___CvfT9",tip:"tip___EvoCF",info:"info___y_ayi",img:"img___X9CNn"},il=Me(30001),kh=Me(99678),lc=Me(89779),Ml=Me(9343),Eu=Me(26194),uc=Me(20670),hc=({open:ct,onCancel:Vt,onOk:Ie})=>{const wt=(0,kh.g)(),[no,Ar,ko,Tr]=(0,Ml.U)(lc.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[Ir,la]=(0,fe.useState)(!1);(0,fe.useEffect)(()=>{ct&&ko({page:1,limit:10,type:0},!0).then(Gi=>{(Gi==null?void 0:Gi.shixuns_count)===0&&la(!0)})},[ct]);const[vo,qr]=(0,fe.useState)([]),[Ki,No]=(0,fe.useState)([]);return fe.createElement(Be.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:ct,width:948,centered:!0,closable:!0,onCancel:Vt,onOk:()=>Ie(Ki),destroyOnClose:!0},fe.createElement(Bt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},fe.createElement(Ae.Z,null,fe.createElement(Oo.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:wt,onChange:Gi=>{ko({page:1,discipline_id:Gi==null?void 0:Gi[0],sub_discipline_id:Gi==null?void 0:Gi[1]})}}),fe.createElement(Fh.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u521D\u7EA7",value:1},{label:"\u4E2D\u7EA7",value:2},{label:"\u4E2D\u9AD8\u7EA7",value:3},{label:"\u9AD8\u7EA7",value:4}],onChange:Gi=>ko({page:1,diff:Gi})}),fe.createElement(Fh.default,{className:"ml20",placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"large",allowClear:!0,options:[{label:"\u672A\u53D1\u5E03",value:"unpublish"},{label:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{label:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],onChange:Gi=>ko({page:1,shixun_publish_status:Gi})})),fe.createElement(il.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Gi=>{ko({keyword:Gi,page:1})}})),Ir?fe.createElement("div",null,fe.createElement(Eu.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,rt.xg)("/shixuns")})):fe.createElement(Pu.default,{loading:Ar,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Gi,ur)=>fe.createElement("div",{style:{display:"flex",alignItems:"center"}},fe.createElement("div",{className:ur!=null&&ur.high_resources_consume?zs.title:"",title:Gi||"--"},fe.createElement(Re.Z,{key:1,showLines:1,showTextOnly:!0,value:Gi||"--"})),(ur==null?void 0:ur.high_resources_consume)&&fe.createElement(uc.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Gi,ur,Qi)=>fe.createElement("span",null,Gi||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:fe.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",fe.createElement(zt.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},fe.createElement(Ui.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Gi,ur,Qi)=>fe.createElement("span",null,Gi||"- -")},{title:"\u64CD\u4F5C",render(Gi,ur){const{title:Qi,challenge_names:eo,author_name:Or,identifier:Yr,author_school_name:Eo,study_count:Vi}=ur||{};return fe.createElement("div",null,fe.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Be.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:fe.createElement("div",null,fe.createElement(Re.Z,{value:Qi,style:{marginBottom:18}}),fe.createElement("div",{className:zs.challengeNameWrapper},eo.map((Hr,xi)=>fe.createElement("div",{className:zs.challengeName,key:xi},"\u7B2C",(0,rt.EM)(xi+1),"\u9898\xA0",Hr))),fe.createElement(Bt.Z,{className:zs.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},fe.createElement(Ae.Z,{className:zs.shixunInfoWrapper},fe.createElement("span",null,"\u521B\u5EFA\u8005"),fe.createElement("span",{className:zs.shixunInfo},Or.split("\u3001")[0]),fe.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),fe.createElement("span",{className:zs.shixunInfo},Eo),fe.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),fe.createElement("span",{className:zs.shixunInfo},Vi)),fe.createElement(ft.ZP,{type:"primary",className:zs.btnToDetail,onClick:()=>(0,rt.xg)(`/shixuns/${Yr}/challenges?exercise=true`)},fe.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(ur==null?void 0:ur.shixun_tag_num)===1&&fe.createElement("a",{target:"_blank",href:`/shixuns/${ur==null?void 0:ur.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:Tr==null?void 0:Tr.items,rowSelection:{type:"radio",selectedRowKeys:vo,preserveSelectedRowKeys:!0,getCheckboxProps:Gi=>({disabled:Gi.shixun_tag_num===1}),onChange(Gi,ur){var Qi,eo,Or;console.log(Gi),qr(Gi);const Yr=[];for(const Vi of Ki)Gi.includes(Vi.id)&&Yr.push(Vi);const Eo=Yr.map(Vi=>Vi.id);for(const Vi of ur)Vi&&Gi.includes(Vi.id)&&!Eo.includes(Vi.id)&&Yr.push({id:Vi.id,difficulty:Vi.level,identifier:Vi.identifier,name:Vi.name,real_name:(Qi=Vi==null?void 0:Vi.author_name)==null?void 0:Qi.split("\u3001")[0],school_name:Vi.author_school_name,challenge_names:Vi.challenge_names,challenges:(eo=Vi.challenge_names)==null?void 0:eo.map((Hr,xi)=>({subject:Hr,id:xi,score:5})),score:((Or=Vi.challenge_names)==null?void 0:Or.length)*5,study_count:Vi.study_count,challenges_count:Vi.challenges_count});No(Yr)}},pagination:{current:no.page,pageSize:no.limit,total:Tr==null?void 0:Tr.items_count,showTotal:Gi=>fe.createElement("span",null,"\u5171\xA0",fe.createElement("span",{style:{color:"#165DFF"}},Gi),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Gi,ur){ko({page:Gi,limit:ur})},size:"default"},scroll:{y:400}}))},ad=Me(96332),bc=Me(93686),Jl=(ct,Vt,Ie)=>new Promise((wt,no)=>{var Ar=Ir=>{try{Tr(Ie.next(Ir))}catch(la){no(la)}},ko=Ir=>{try{Tr(Ie.throw(Ir))}catch(la){no(la)}},Tr=Ir=>Ir.done?wt(Ir.value):Promise.resolve(Ir.value).then(Ar,ko);Tr((Ie=Ie.apply(ct,Vt)).next())}),Ru=({visible:ct,getdata:Vt,onCancel:Ie,onRandomExchange:wt,selectFromProblemSet:no,questionParams:Ar})=>{const[ko,Tr]=(0,fe.useState)(!1),[Ir,la]=(0,fe.useState)(!1),[vo,qr]=(0,fe.useState)({}),Ki=(0,tt.useParams)(),[No,Gi]=(0,fe.useState)(),ur=(Qi,eo)=>Jl(void 0,null,function*(){la(!0);const Or=yield(0,Je.ZP)(`/api/exercises/${Ki.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:Ar.id,item_bank_id:Qi,shixuns_info:[{id:Qi,is_copy:eo!=1,is_use:eo!=1}]}});la(!1),Or!=null&&Or.status||(gt.ZP.info("\u6362\u9898\u6210\u529F"),Ie(),Vt())});return fe.createElement(Be.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:ct,onCancel:Ie,centered:!0,maskClosable:!0,footer:null},fe.createElement(Bt.Z,{justify:"center",className:"pb20"},fe.createElement(Vh.Z,{onClick:wt},"\u968F\u673A\u66F4\u6362"),(Ar==null?void 0:Ar.type)!=="PRACTICAL"&&fe.createElement(ft.ZP,{style:{marginLeft:24},onClick:no},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(Ar==null?void 0:Ar.type)==="PRACTICAL"&&fe.createElement(ft.ZP,{style:{marginLeft:24},onClick:()=>{Tr(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),fe.createElement(hc,{open:ko,onCancel:()=>Tr(!1),onOk:Qi=>Jl(void 0,null,function*(){if(console.log("----selectedRows",Qi,Ki),(Qi==null?void 0:Qi.length)<=0){gt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let eo=Qi==null?void 0:Qi.map(Yr=>Yr==null?void 0:Yr.id),Or=yield(0,bc.Tr)({id:[...eo],course_id:Ki.coursesId,type:"shixun"});(Or==null?void 0:Or.student_count)===0?ur(eo==null?void 0:eo[0],1):(Gi(eo),qr(Or)),Tr(!1)})}),fe.createElement(ad.Z,{resdata:vo,type:"shixun",okloading:Ir,oktext:(vo==null?void 0:vo.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Qi=>Jl(void 0,null,function*(){ur(No==null?void 0:No[0],2)})}))},Kh=Me(30351),Uh=Me(19575),Lc=Me(2715),Fs=Me(48994),Yh=Me(52810),Mc=Me(52262),cc=Object.defineProperty,Sh=Object.defineProperties,Fl=Object.getOwnPropertyDescriptors,hl=Object.getOwnPropertySymbols,_s=Object.prototype.hasOwnProperty,Qs=Object.prototype.propertyIsEnumerable,Xh=(ct,Vt,Ie)=>Vt in ct?cc(ct,Vt,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):ct[Vt]=Ie,ys=(ct,Vt)=>{for(var Ie in Vt||(Vt={}))_s.call(Vt,Ie)&&Xh(ct,Ie,Vt[Ie]);if(hl)for(var Ie of hl(Vt))Qs.call(Vt,Ie)&&Xh(ct,Ie,Vt[Ie]);return ct},Ya=(ct,Vt)=>Sh(ct,Fl(Vt)),Nl=(ct,Vt,Ie)=>new Promise((wt,no)=>{var Ar=Ir=>{try{Tr(Ie.next(Ir))}catch(la){no(la)}},ko=Ir=>{try{Tr(Ie.throw(Ir))}catch(la){no(la)}},Tr=Ir=>Ir.done?wt(Ir.value):Promise.resolve(Ir.value).then(Ar,ko);Tr((Ie=Ie.apply(ct,Vt)).next())});const dc=({data:ct,submit:Vt,goBack:Ie,loading:wt,onTypeScore:no,editPreview:Ar=!1,onSkipExamination:ko,selectValue:Tr,onExchange:Ir,getdata:la,handleMarkWrongQuestion:vo,dispatch:qr})=>{var Ki,No,Gi,ur,Qi,eo,Or,Yr,Eo,Vi,Hr;const xi=(0,fe.useRef)(),[tr,Er]=(0,fe.useState)(null),[Ao,Ho]=(0,fe.useState)(!1),[Pa,qi]=(0,fe.useState)(!1),Vs=(0,fe.useRef)(),[kr]=St.default.useForm(),Ro=(0,tt.useParams)(),[Xr,ds]=(0,fe.useState)(!1),[Fa,Gs]=(0,fe.useState)([]);(0,fe.useEffect)(()=>{Ho(!0)},[]),(0,fe.useEffect)(()=>{Ar||(0,rt.Dk)("\u8BD5\u5377\u9884\u89C8")},[Ar]),(0,fe.useEffect)(()=>{var Tt;((Tt=ct==null?void 0:ct.questionList)==null?void 0:Tt.length)>0&&(ct==null||ct.questionList.forEach(Dn=>{var ii;Dn.type==="PRACTICAL"&&((ii=Dn==null?void 0:Dn.questions)==null||ii.forEach((fi,Bn)=>{var Oi;Fa[Bn]=!((Oi=fi==null?void 0:fi.shixun)!=null&&Oi.ignore_prompt),Gs([...Fa])}))}))},[ct]);const Xu=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],Ah={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898"},Cu={single:"\u5355\u9009\u9898",multiple:"\u591A\u9009\u9898",judgement:"\u5224\u65AD\u9898",completion:"\u586B\u7A7A\u9898",subjective:"\u7B80\u7B54\u9898",practical:"\u5B9E\u8BAD\u9898",program:"\u7F16\u7A0B\u9898",bprogram:"\u7A0B\u5E8F\u586B\u7A7A\u9898",combination:"\u7EC4\u5408\u9898"},ju=Tt=>{var Dn;const ii=[];return fe.createElement(fe.Fragment,null,fe.createElement("aside",{className:Ke.single},(Dn=Tt==null?void 0:Tt.choices)==null?void 0:Dn.map((fi,Bn)=>(fi.is_answer&&ii.push(Yh.k4[Bn]),fe.createElement("ul",{key:Bn},fe.createElement("li",null,Yh.k4[Bn],"\u3001"),fe.createElement("li",null,fe.createElement(Re.Z,{value:fi.choice_text})))))),fe.createElement("div",{className:Ke.analysis},fe.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",ii.join(""),fe.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Xu[Tt.difficulty])),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:Tt.analysis?Tt.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Tt==null?void 0:Tt.tag_discipline_name)))))},gr=(Tt,Dn)=>{var ii;const fi=(ii=Tt==null?void 0:Tt.standard_answer)==null?void 0:ii.map((Bn,Oi)=>{var Cr;return fe.createElement("div",{key:Oi},`\u7B54\u6848\uFF08\u586B\u7A7A${Bn==null?void 0:Bn.position}\uFF09\uFF1A${(Cr=Bn==null?void 0:Bn.answer_text)==null?void 0:Cr.join("\u3001")}`)});return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:Ke.analysis},fe.createElement("div",{style:{display:"flex"}},fe.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),fe.createElement("div",null,fi)),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:Tt.analysis?Tt.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Dn?`${(Dn==null?void 0:Dn.discipline_name)||"--"}/${Dn==null?void 0:Dn.sub_discipline_name}`:`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Dn?Dn==null?void 0:Dn.tag_discipline_name:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Dn?Dn==null?void 0:Dn.tag_discipline_name:Tt==null?void 0:Tt.tag_discipline_name)))))},cl=Tt=>{var Dn;const ii=(Dn=Tt==null?void 0:Tt.standard_answer)==null?void 0:Dn.map((fi,Bn)=>fe.createElement("div",{key:Bn},`\u7B54\u6848\uFF08\u586B\u7A7A${(fi==null?void 0:fi.position)||(fi==null?void 0:fi.exercise_choice_id)}\uFF09\uFF1A${fi==null?void 0:fi.answer_text}`));return fe.createElement(fe.Fragment,null,fe.createElement("div",{className:Ke.analysis},fe.createElement("div",{style:{display:"flex"}},fe.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),fe.createElement("div",null,ii)),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:Tt.analysis?Tt.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Tt==null?void 0:Tt.tag_discipline_name)))))},We=(Tt,Dn)=>{var ii;return fe.createElement("div",{className:Ke.analysis},fe.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(ii=Tt==null?void 0:Tt.answer_texts)==null?void 0:ii[0]),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:Tt.analysis?Tt.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),Dn?`${(Dn==null?void 0:Dn.discipline_name)||"--"}/${Dn==null?void 0:Dn.sub_discipline_name}`:`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Dn?Dn==null?void 0:Dn.tag_discipline_name:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Dn?Dn==null?void 0:Dn.tag_discipline_name:Tt==null?void 0:Tt.tag_discipline_name))))},dt=Tt=>{var Dn,ii;return fe.createElement("div",{className:Ke.analysis},fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u9884\u671F\u8F93\u51FA:"),fe.createElement(Re.Z,{value:(Dn=Tt==null?void 0:Tt.program_attr)==null?void 0:Dn.description})),fe.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((ii=Tt==null?void 0:Tt.program_attr)==null?void 0:ii.answer_text)||"--"),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:Tt.analysis?Tt.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Tt==null?void 0:Tt.tag_discipline_name))))},yt=(Tt,Dn)=>{var ii;return fe.createElement("div",null,(ii=Tt==null?void 0:Tt.sub_item_banks)==null?void 0:ii.map((fi,Bn)=>{var Oi,Cr;const pr=[];return fe.createElement(fe.Fragment,null,fe.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},Dn+1+"."+(Bn+1),"\uFF08",Ah[fi.item_type]||Cu[fi.item_type],"\uFF09",fi.name),(fi.item_type=="SINGLE"||fi.item_type=="MULTIPLE"||fi.item_type=="JUDGMENT"||fi.item_type=="single"||fi.item_type=="multiple"||fi.item_type=="judgement")&&fe.createElement(fe.Fragment,null,fe.createElement("aside",{className:Ke.single},(Oi=fi==null?void 0:fi.choices)==null?void 0:Oi.map((rr,ua)=>(rr.is_answer&&pr.push(Yh.k4[ua]),fe.createElement("ul",{key:ua},fe.createElement("li",null,Yh.k4[ua],"\u3001"),fe.createElement("li",null,fe.createElement(Re.Z,{value:rr.choice_text})))))),fe.createElement("div",{className:Ke.analysis},fe.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",pr.join(""),fe.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Xu[fi.difficulty])),fe.createElement("aside",null,fe.createElement("span",{className:Ke.text},"\u89E3\u6790:"),fe.createElement(Re.Z,{value:fi.analysis?fi.analysis:"\u6682\u65E0\u89E3\u6790"})),fe.createElement("ul",null,fe.createElement("li",null,fe.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Tt==null?void 0:Tt.discipline_name)||"--"}/${Tt==null?void 0:Tt.sub_discipline_name}`),fe.createElement(zt.Z,{title:Tt==null?void 0:Tt.tag_discipline_name},fe.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},fe.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Tt==null?void 0:Tt.tag_discipline_name))))),(fi.item_type=="COMPLETION"||fi.item_type=="completion")&&gr(fi,Tt),(fi.item_type=="SUBJECTIVE"||fi.item_type=="subjective")&&We(fi,Tt),((Cr=ct==null?void 0:ct.exam)==null?void 0:Cr.exercise_status)===3&&fe.createElement("div",{className:"flex gap-20px mt20"},fe.createElement(Lc.Z,{state:fi==null?void 0:fi.is_wrong,onClick:()=>{vo==null||vo({value:Ya(ys({},fi),{question_id:fi==null?void 0:fi.id,question_score:fi==null?void 0:fi.score})})}}),fi.item_type=="single"&&fe.createElement(ft.ZP,{style:{color:"#3061D0"},onClick:()=>{ei({value:fi})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},Pt=Tt=>{var Dn,ii,fi;return fe.createElement("div",{style:{marginTop:"12px"}},(ii=(Dn=Tt==null?void 0:Tt.shixun)==null?void 0:Dn.challenges)==null?void 0:ii.map((Bn,Oi)=>fe.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},fe.createElement("div",null,fe.createElement("span",{className:"mr5"},"\u7B2C",Oi+1,"\u5173"),fe.createElement(zt.Z,{key:Oi,title:Bn==null?void 0:Bn.challenge_name},fe.createElement("span",null,(0,rt.Pq)(Bn==null?void 0:Bn.challenge_name,44)))),Ar&&fe.createElement("div",null,"\u5206\u503C\uFF1A",Bn.score,"\u5206"))),fe.createElement(tt.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(fi=Tt==null?void 0:Tt.shixun)==null?void 0:fi.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),fe.createElement("div",{style:{clear:"both"}}))},Ht=Tt=>{let Dn=Tt.questions_score/Tt.questions_count;Be.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:fe.createElement("div",{className:Ke.modalColumn},fe.createElement("div",{className:Ke.modalRow,style:{justifyContent:"flex-start"}},fe.createElement("sup",{className:Ke.sup},"*"),fe.createElement("span",null,Tt==null?void 0:Tt.name,"\uFF1A"),fe.createElement(He.Z,{min:0,precision:1,defaultValue:Dn,onChange:ii=>{Dn=ii}}),fe.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Nl(void 0,null,function*(){var ii;if(!Dn)return gt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const fi={type:Tt==null?void 0:Tt.type,score:Dn,scoreTotal:Number((ii=Dn*Tt.questions_count)==null?void 0:ii.toFixed(1))};no(fi)})})},Qt=()=>{let Tt="";Be.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:fe.createElement("div",{className:Ke.modalColumn},fe.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},fe.createElement("img",{style:{marginRight:5},src:ln.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),fe.createElement("div",{className:Ke.modalRow,style:{marginTop:20}},fe.createElement("sup",{className:Ke.sup},"*"),fe.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),fe.createElement(it.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:Tt,onChange:Dn=>{Tt=Dn.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Nl(void 0,null,function*(){var Dn;if(!Tt)return gt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const ii=[],fi=[],Bn=[],Oi=[];(Dn=ct==null?void 0:ct.questionList)==null||Dn.forEach(pr=>{var rr;(rr=pr.questions)==null||rr.forEach(ua=>{let Qr=pr.questions_score/pr.questions_count;Qr=Qr&&Qr.toFixed(1),pr.type==="COMBINATION"&&Bn.push({id:ua.id,sub_item_bank_ids:ua.sub_item_banks.map(io=>io.id)}),pr.type==="PRACTICAL"?Oi.push(ua.id):(ii.push(ua.id),fi.push(Qr))})}),console.log("-----",Bn),yield Vt({item_bank_ids:ii,item_bank_scores:fi,name:Tt,combination_item_banks:Bn,shixun_ids:Oi})})})},nn=(Tt,Dn,ii,fi)=>{var Bn;const Oi=`${location.pathname}${location.search}`,Cr=(Bn=fi.questions)==null?void 0:Bn.map(pr=>pr==null?void 0:pr.id);if(Oi.includes("exercise"))Vs.current={id:Tt,ids:Cr,type:Dn,index:ii},qi(!0);else{let pr=Be.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u8981\u66F4\u6362\u8BE5\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Nl(void 0,null,function*(){pr.update({cancelButtonProps:{disabled:!0}}),yield Ir({single_question_id:Tt,seleted_item_bank_ids:Cr},{type:Dn,index:ii}),pr.update({cancelButtonProps:{disabled:!1}}),gt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},wn=Tt=>{var Dn;const ii=(Dn=Tt.questions)==null?void 0:Dn.map(Oi=>Oi==null?void 0:Oi.id),fi=Tt.name;let Bn=Be.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${fi}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Nl(void 0,null,function*(){Bn.update({cancelButtonProps:{disabled:!0}}),yield Ir({seleted_item_bank_ids:ii},{type:Tt.type}),Bn.update({cancelButtonProps:{disabled:!1}}),gt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${fi}\u8BD5\u9898`)})})},Un=()=>{let Tt=Be.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:"\u786E\u8BA4\u66F4\u6362\u9884\u89C8\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Nl(void 0,null,function*(){Tt.update({cancelButtonProps:{disabled:!0}}),yield Ir(),Tt.update({cancelButtonProps:{disabled:!1}}),gt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},An=Tt=>{console.log(Tt,"key"),ko(Tt-1)},Pi=(Tt,Dn)=>{var ii,fi;if(Dn==="SINGLE")return fe.createElement(fe.Fragment,null,fe.createElement(xn,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="MULTIPLE")return fe.createElement(fe.Fragment,null,fe.createElement(ir,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="JUDGMENT")return fe.createElement(fe.Fragment,null,fe.createElement(Li,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="COMPLETION")return fe.createElement(fe.Fragment,null,fe.createElement(Nn,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="SUBJECTIVE")return fe.createElement(fe.Fragment,null,fe.createElement(Wr,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="COMBINATION")return fe.createElement(fe.Fragment,null,fe.createElement(sc,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null));if(Dn==="BPROGRAM")return fe.createElement(fe.Fragment,null,fe.createElement(St.default,{form:kr,style:{marginTop:20},onFinishFailed:Bn=>{var Oi,Cr;Bn.errorFields[0].name.includes("standard_answers")?gt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):gt.ZP.error(Bn.errorFields[0].errors[0]),kr.scrollToField((Cr=(Oi=Bn==null?void 0:Bn.errorFields)==null?void 0:Oi[0])==null?void 0:Cr.name,{behavior:"smooth",block:"center"})},onFinish:Bn=>Nl(void 0,null,function*(){var Oi;let Cr=Ya(ys({question_score:Tt.score},Bn),{question_type:8,hack:Ya(ys({},Bn.hack),{difficult:Tt.program_attr.difficult}),hack_codes:Ya(ys({},Bn.hack_codes),{code:Uh.Base64.encode((Oi=Bn.hack_codes)==null?void 0:Oi.code)})});Xr&&(Cr.is_cover=1);const pr=yield(0,Je.ZP)(`/api/exercise_questions/${Tt.id}.json`,{method:"put",body:Cr});(pr==null?void 0:pr.status)===0&&(gt.ZP.success("\u7F16\u8F91\u6210\u529F"),An(Tr+1)),Er(null)})},fe.createElement(Kh.tc,{form:kr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(ii=Tt==null?void 0:Tt.program_attr)==null?void 0:ii.identifier,answerKey:"standard_answers"}),fe.createElement(st.Z,null)));if(Dn==="PROGRAM"&&tt.history.push(`/problems/${(fi=Tt==null?void 0:Tt.program_attr)==null?void 0:fi.identifier}/edit?type=exercises&express_id=${Ro.categoryId}&question_id=${Tt==null?void 0:Tt.id}&score=${Tt==null?void 0:Tt.score}&callback_url=${location.pathname}&select=${Tr}&exercise=true`),Dn==="PRACTICAL")return fe.createElement(fe.Fragment,null,fe.createElement(Ni,{ref:xi,editData:Tt,isEdit:!0}),fe.createElement(st.Z,null))},zn=(Tt,Dn)=>Nl(void 0,null,function*(){var ii,fi,Bn,Oi,Cr,pr;const rr=yield(ii=xi.current)==null?void 0:ii.onSave();if(!rr)return;const ua=Hn=>{const br=Hn.map(ke=>ke.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(br).size!==br.length},Qr={question_score:Dn.score,analysis:rr.analysis};if(Tt==="SINGLE"||Tt==="MULTIPLE"||Tt==="JUDGMENT"){if(Tt!=="JUDGMENT"&&ua(rr==null?void 0:rr.choices)){gt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const Hn=[],br=[];Qr.question_type=Tt==="JUDGMENT"?2:1,Qr.question_title=rr==null?void 0:rr.name,(fi=rr==null?void 0:rr.choices)==null||fi.forEach((ho,ke)=>{Hn.push(ho.choice_text),ho!=null&&ho.is_answer&&br.push(ke+1)}),Qr.question_choices=Hn,Qr.standard_answers=br}if(Tt==="COMPLETION"){let Hn=(Bn=rr==null?void 0:rr.standard_answers)==null?void 0:Bn.map((ke,Te)=>(ke==null?void 0:ke.score)<=0?Te+1:null).filter(ke=>ke!==null);if((Hn==null?void 0:Hn.length)>0)return gt.ZP.warning(`\u7B2C${Hn.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let br=(Oi=rr==null?void 0:rr.standard_answers)==null?void 0:Oi.reduce((ke,Te)=>ke+(Number(Te==null?void 0:Te.score)||0),0);if(parseFloat(br.toFixed(2))!=(Qr==null?void 0:Qr.question_score))return gt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Qr.is_ordered=rr.is_ordered,Qr.question_title=rr==null?void 0:rr.name,Qr.use_blank_score=rr==null?void 0:rr.use_blank_score,Qr.question_type=3;const ho=[];(Cr=rr==null?void 0:rr.standard_answers)==null||Cr.forEach((ke,Te)=>{ho.push({choice_id:ke.position,answer_text:ke.answer_text,score:ke.score})}),Qr.standard_answers=ho,Qr.downcase=rr==null?void 0:rr.downcase,Qr.no_space=rr==null?void 0:rr.no_space}if(Tt==="SUBJECTIVE"&&(console.log("editorData"),console.log(rr),Qr.question_title=rr==null?void 0:rr.name,Qr.question_type=4,Qr.answer_texts=rr==null?void 0:rr.answer_texts,Qr.use_keywords=rr==null?void 0:rr.use_keywords,Qr.keywords=rr==null?void 0:rr.keywords),Tt==="COMBINATION"){Qr.question_title=rr==null?void 0:rr.name,Qr.question_type=7;try{Qr.sub_questions=(pr=rr==null?void 0:rr.sub_item_banks)==null?void 0:pr.map((Hn,br)=>{var ho,ke,Te;if((Hn==null?void 0:Hn.item_type)=="single"||(Hn==null?void 0:Hn.item_type)=="multiple"){if(ua(Hn==null?void 0:Hn.choices))throw new Error(`\u7B2C${br+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const et=[],at=[];return(ho=Hn==null?void 0:Hn.choices)==null||ho.forEach((jt,qt)=>{et.push(jt.choice_text),jt!=null&&jt.is_answer&&at.push(qt+1)}),{id:Hn.id,question_id:Hn.id,question_title:Hn.name,difficulty:Hn.difficulty,question_type:(Hn==null?void 0:Hn.item_type)=="single"?0:(Hn==null?void 0:Hn.item_type)=="multiple"?1:2,question_choices:et,standard_answers:at,analysis:Hn.analysis,question_score:Hn==null?void 0:Hn.score}}else if((Hn==null?void 0:Hn.item_type)=="completion"){let et=(ke=Hn==null?void 0:Hn.standard_answer)==null?void 0:ke.reduce((jt,qt)=>jt+(Number(qt==null?void 0:qt.score)||0),0);if(parseFloat(et.toFixed(2))!=(Hn==null?void 0:Hn.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const at=[];return(Te=Hn==null?void 0:Hn.standard_answer)==null||Te.forEach((jt,qt)=>{at.push({choice_id:jt.position,answer_text:jt.answer_text,score:jt.score})}),{id:Hn.id,question_id:Hn.id,is_ordered:Hn.is_ordered,question_title:Hn.name,difficulty:Hn.difficulty,question_type:3,standard_answers:at,use_blank_score:Hn.use_blank_score,analysis:Hn.analysis,downcase:Hn==null?void 0:Hn.downcase,no_space:Hn==null?void 0:Hn.no_space,question_score:Hn==null?void 0:Hn.score}}else if((Hn==null?void 0:Hn.item_type)=="subjective")return{id:Hn.id,question_id:Hn.id,question_title:Hn.name,question_type:4,difficulty:Hn.difficulty,answer_texts:Hn==null?void 0:Hn.answer_texts,analysis:Hn.analysis,question_score:Hn==null?void 0:Hn.score,use_keywords:Hn.use_keywords,keywords:Hn==null?void 0:Hn.keywords}})}catch(Hn){gt.ZP.warning(Hn.message);return}delete Qr.analysis}let io=!1;(Dn==null?void 0:Dn.is_my)===1&&(io=yield new Promise((br,ho)=>{Be.default.confirm({title:"\u63D0\u793A",content:"\u6B64\u9898\u76EE\u5DF2\u5B58\u5728\u4E8E\u8BD5\u9898\u5E93\uFF0C\u662F\u5426\u5C06\u4FEE\u6539\u540E\u7684\u9898\u76EE\u8986\u76D6\u8BD5\u9898\u5E93\u7684\u539F\u9898\uFF1F",okText:"\u8986\u76D6\u539F\u9898",cancelText:"\u4E0D\u8986\u76D6",keyboard:!1,onOk:()=>{br(!0)},onCancel:()=>{br(!1)}})})),io&&(Qr.is_cover=1);const So=Tt!=="PRACTICAL"?yield(0,Je.ZP)(`/api/exercise_questions/${Dn.id}.json`,{method:"put",body:Qr}):yield(0,Je.ZP)(`/api/exercise_questions/${Dn.id}/update_shixun_score.json`,{method:"post",body:ys({},rr)});(So==null?void 0:So.status)===0&&(gt.ZP.success("\u7F16\u8F91\u6210\u529F"),An(Tr+1),Er(null))}),di=()=>Nl(void 0,null,function*(){(0,tt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,Je.ZP)(`/api/exercises/${Ro.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield ko(Tr),gt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,tt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),ei=({value:Tt}={})=>{var Dn;const ii=[];let fi=[];const Bn=(Dn=Tt==null?void 0:Tt.choices)==null?void 0:Dn.map((Cr,pr)=>{var rr;const ua=pr+1;return Cr!=null&&Cr.is_answer&&(ii.push(ua),fi.push(ua)),{value:ua,label:fe.createElement(Re.Z,{className:"c-black font14",value:`${(rr=Yh.k4)==null?void 0:rr[pr]}. ${Cr==null?void 0:Cr.choice_text}`}),disabled:Cr==null?void 0:Cr.origin_standard_answer}}),Oi=Be.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:fe.createElement(fe.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",ii==null?void 0:ii.map(Cr=>{var pr;return(pr=Yh.k4)==null?void 0:pr[Cr-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",fe.createElement("br",null),"\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u9009\u4E2D\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u4EFB\u4E00\u9009\u9879\u7684\u5B66\u751F\u4E5F\u4F1A\u83B7\u5F97\u8BE5\u5C0F\u9898\u7684\u5206\u503C\uFF0C\u4F46\u4E0D\u4F1A\u4FEE\u6539\u5F53\u524D\u8BD5\u9898\u7684\u9898\u578B\u3002\u53D6\u6D88\u52FE\u9009\u63D0\u4EA4\u4E4B\u540E\uFF0C\u4E5F\u4F1A\u91CD\u65B0\u8BA1\u7B97\u5BF9\u5E94\u5B66\u751F\u7684\u5F97\u5206\u3002",fe.createElement("br",null),fe.createElement(Ft.default.Group,{className:"flex-col mt20",options:Bn,defaultValue:fi,onChange:Cr=>{fi=Cr}})),onOk:()=>Nl(void 0,null,function*(){const Cr=yield(0,Je.ZP)(`/api/exercises/${Ro.categoryId}/questions/${Tt==null?void 0:Tt.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:fi}});(Cr==null?void 0:Cr.status)===0&&(gt.ZP.success("\u4FEE\u6539\u6210\u529F"),An(Tr+1))})})},Bi=(Ki=ct==null?void 0:ct.questionList)==null?void 0:Ki.reduce((Tt,Dn)=>Tt+Number(Dn.questions_score),0),Xi=Ar&&((No=ct==null?void 0:ct.exam)==null?void 0:No.exercise_status)!==1,yr=Tt=>Nl(void 0,null,function*(){const Dn=yield(0,Je.ZP)(`/api/courses/${Ro==null?void 0:Ro.coursesId}/sync_shixuns.json`,{method:"post",body:{exercise_ids:[Ro==null?void 0:Ro.categoryId],exercise_question_id:Tt.id}});(Dn==null?void 0:Dn.status)===0&&(qr({type:"classroomList/setActionTabs",payload:{}}),gt.ZP.info("\u5B9E\u8BAD\u540C\u6B65\u4E2D\uFF0C\u8BF7\u7A0D\u540E"))}),Jr=(Tt,Dn)=>Nl(void 0,null,function*(){let ii=yield(0,Je.ZP)(`/api/courses/${Ro==null?void 0:Ro.coursesId}/ignore_prompt.json`,{method:"post",body:{container_type:"Exercise",container_id:Ro==null?void 0:Ro.categoryId,exercise_question_id:Tt==null?void 0:Tt.id}});(ii==null?void 0:ii.status)===0&&(Fa[Dn]=!1,Gs([...Fa]))});return fe.createElement("section",{className:Ke.wrap},fe.createElement("div",{id:"id_left_preview",className:Ke.left,onMouseEnter:Tt=>{const Dn=document.getElementById("id_left_preview");Dn.style.overflowY="auto"},onMouseLeave:Tt=>{const Dn=document.getElementById("id_left_preview");Dn.style.overflowY="hidden"}},fe.createElement("div",{className:Ke.title},fe.createElement("div",{className:"body-overflow-initial"},fe.createElement("b",null),fe.createElement("span",null,"\u7B54\u9898\u5361"))),fe.createElement("div",{className:Ke.total},fe.createElement("div",null,fe.createElement("img",{src:vn}),fe.createElement("span",null,"\u9898\u6570(\u9053)"),fe.createElement("aside",null,ct==null?void 0:ct.all_questions_count)),fe.createElement("div",{className:"mr30 ml30"},fe.createElement("img",{src:pn}),fe.createElement("span",null,"\u603B\u5206(\u5206)"),fe.createElement("aside",null,Bi&&Bi.toFixed(1))),fe.createElement("div",null,fe.createElement("img",{src:Oe}),fe.createElement("span",null,"\u65F6\u957F(\u5206)"),fe.createElement("aside",null,((Gi=ct==null?void 0:ct.exam)==null?void 0:Gi.time)===-1||((ur=ct==null?void 0:ct.exam)==null?void 0:ur.time)===null?"\u4E0D\u9650":(Qi=ct==null?void 0:ct.exam)==null?void 0:Qi.time))),(eo=ct==null?void 0:ct.questionList)==null?void 0:eo.map((Tt,Dn)=>{var ii;return fe.createElement("div",{className:Ke.list,key:Dn},fe.createElement("div",{className:Ke.name},fe.createElement("b",null),fe.createElement("span",null,Tt.name)),fe.createElement("aside",null,fe.createElement("div",null,"\u5171",fe.createElement("span",{className:Ke.b},Tt.questions_count),"\u9898 ",fe.createElement("span",{className:Ke.l},"|"),"\u5171",fe.createElement("span",{className:Ke.r},Tt.questions_score),"\u5206"),fe.createElement("div",{className:Ke.answerSheet},(ii=Tt==null?void 0:Tt.questions)==null?void 0:ii.map((fi,Bn)=>fe.createElement("div",{onClick:()=>{const Oi=`Anchor_${fi==null?void 0:fi.id}`;let Cr=document.getElementById(Oi);Cr&&setTimeout(()=>Cr.scrollIntoView({block:"center",behavior:"smooth"}))},key:fi==null?void 0:fi.id,className:Ke.tag},Bn+1)))))})),fe.createElement("div",{className:Ke.right},fe.createElement("div",{className:Ke.examName,id:"examName"},fe.createElement("div",{className:Ke.name},fe.createElement(zt.Z,{title:(Or=ct==null?void 0:ct.exam)==null?void 0:Or.name,getPopupContainer:Tt=>Tt.parentNode},fe.createElement("span",{className:Ke.t},(Yr=ct==null?void 0:ct.exam)==null?void 0:Yr.name))),Ar&&((Eo=ct==null?void 0:ct.exam)==null?void 0:Eo.exercise_status)===1&&fe.createElement(il.op,{openLoading:!0,shape:"default",onClick:()=>{Be.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u6839\u636E\u6700\u65B0\u7684\u968F\u673A\u7EC4\u5377\u62BD\u9898\u89C4\u5219\u91CD\u65B0\u751F\u6210\u8BD5\u5377\u5417\uFF1F",onOk:()=>{di()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!Ar&&fe.createElement(ft.ZP,{onClick:Un,type:"primary"},"\u968F\u673A\u66F4\u6362")),fe.createElement("div",{className:Ke.topWarp},(Vi=ct==null?void 0:ct.questionList)==null?void 0:Vi.map((Tt,Dn)=>{var ii,fi;return fe.createElement(fe.Fragment,{key:Dn},fe.createElement("div",{className:Ke.head,style:Dn===0?{border:0,marginTop:-16}:{}},fe.createElement("div",{className:Ke.name},fe.createElement("b",null),fe.createElement("span",null,Tt.name)),fe.createElement("div",{className:Ke.so},"\u5171",fe.createElement("span",{className:Ke.b},Tt.questions_count," "),"\u9898 ",Tt.type==="COMBINATION"&&`\uFF08\u5305\u542B${(ii=Tt==null?void 0:Tt.questions)==null?void 0:ii.map(Bn=>{var Oi;return(Oi=Bn==null?void 0:Bn.sub_item_banks)==null?void 0:Oi.length}).reduce((Bn,Oi)=>Bn+Oi)}\u5C0F\u9898\uFF09`,fe.createElement("span",{className:Ke.l},"|"),"\u5171",fe.createElement("span",{className:Ke.r},Tt.questions_score),"\u5206"),!Ar&&fe.createElement("div",{className:Ke.btn},fe.createElement(ft.ZP,{onClick:()=>{Ht(Tt)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),fe.createElement(ft.ZP,{onClick:()=>wn(Tt),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(fi=Tt==null?void 0:Tt.questions)==null?void 0:fi.map((Bn,Oi)=>{var Cr,pr,rr,ua,Qr;return tr===(Bn==null?void 0:Bn.id)?fe.createElement("div",{id:`Anchor_${Bn==null?void 0:Bn.id}`,className:Ke.content,style:{padding:0,marginTop:24},key:Bn==null?void 0:Bn.id},fe.createElement("div",{style:{float:"right",marginTop:`${(Tt==null?void 0:Tt.type)==="PRACTICAL"?"-2px":"-6px"}`}},fe.createElement(ft.ZP,{onClick:()=>Er(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),fe.createElement(ft.ZP,{onClick:()=>{zn(Tt==null?void 0:Tt.type,Bn)},type:"primary"},"\u4FDD\u5B58")),Pi(Bn,Tt.type)):fe.createElement("div",{id:`Anchor_${Bn==null?void 0:Bn.id}`,className:Ke.content,key:Bn==null?void 0:Bn.id},fe.createElement("div",{className:Ke.titleWrap},(Bn==null?void 0:Bn.item_type)==="bprogram"?fe.createElement(Re.Z,{style:{paddingRight:10},value:Oi+1+"\u3001"+((Cr=Bn==null?void 0:Bn.program_attr)==null?void 0:Cr.description)}):fe.createElement(Re.Z,{style:{paddingRight:10},className:Ke.titleHtml,value:Oi+1+`\u3001${(Bn==null?void 0:Bn.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(Bn==null?void 0:Bn.name)}),(0,Mc.G5)()&&((pr=Bn==null?void 0:Bn.shixun)==null?void 0:pr.shixun_change)&&fe.createElement(Nt.Z,{trigger:"click",open:Fa[Oi],onOpenChange:io=>{Fa[Oi]=!0,Gs([...Fa])},placement:"bottomLeft",autoAdjustOverflow:!1,title:null,content:fe.createElement("div",{style:{width:"310px",color:"#000"}},fe.createElement("div",null,"\u5B9E\u8BAD\u7BA1\u7406\u5458\u5BF9\u8BD5\u5377\u4E2D\u4F7F\u7528\u7684\u5B9E\u8DF5\u9879\u76EE\u8FDB\u884C\u4E86\u4FEE\u6539\uFF0C\u8BF7\u68C0\u67E5\u540E\uFF0C\u786E\u8BA4\u662F\u5426\u9700\u8981\u540C\u6B65\u5230\u8BD5\u5377\u4E2D"),fe.createElement("div",{className:Ke.btn_warp},fe.createElement(ft.ZP,{size:"small",onClick:()=>Jr(Bn,Oi)},"\u5FFD\u7565"),fe.createElement(ft.ZP,{className:"ml20",size:"small",type:"primary",onClick:()=>{Fa[Oi]=!1,Gs([...Fa]),qr({type:"classroomList/setActionTabs",payload:{key:"\u5B9E\u8BAD\u540C\u6B65\u786E\u8BA4",onOK:()=>yr(Bn)}})}},"\u786E\u8BA4\u540C\u6B65"),fe.createElement(ft.ZP,{className:"ml20",size:"small",type:"primary",onClick:()=>(0,rt.xg)(`/shixuns/${Bn==null?void 0:Bn.forked_shixun_identifier}/challenges?exercise=true`)},"\u524D\u5F80\u67E5\u770B")))},fe.createElement("i",{className:"iconfont icon-tongzhi1 pl10 current",style:{fontSize:"16px",color:"#F7B500"},onClick:io=>io.stopPropagation()})),Ar&&fe.createElement(ft.ZP,{onClick:()=>{var io,So,Hn;if(tr){gt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}kr.setFieldsValue({standard_answers:Bn==null?void 0:Bn.standard_answer,hack:ys(ys({},Bn),Bn==null?void 0:Bn.program_attr),hack_codes:Ya(ys({},Bn==null?void 0:Bn.program_attr),{code:Uh.Base64.decode(((io=Bn==null?void 0:Bn.program_attr)==null?void 0:io.code)||"")}),hack_sets:ys({},(So=Bn==null?void 0:Bn.hack_sets)==null?void 0:So[0])}),(Bn==null?void 0:Bn.item_type)=="program"?tt.history.push(`/problems/newedit/${(Hn=Bn==null?void 0:Bn.program_attr)==null?void 0:Hn.identifier}?type=exercises&express_id=${Ro.categoryId}&question_id=${Bn==null?void 0:Bn.id}&score=${Bn==null?void 0:Bn.score}&exercise=true&callback_url=/classrooms/${Ro.coursesId}/exercise/${Ro.categoryId}/detail?random=true`):Er(Bn==null?void 0:Bn.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!Xi&&fe.createElement(ft.ZP,{disabled:Xi,className:"ml20",onClick:()=>nn(Bn==null?void 0:Bn.id,Tt.type,Oi,Tt),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(Bn==null?void 0:Bn.item_type)==="bprogram"&&fe.createElement(Re.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Ke.titleHtml,value:Uh.Base64.decode(((rr=Bn==null?void 0:Bn.program_attr)==null?void 0:rr.code)||"")}),(Tt.type==="SINGLE"||Tt.type==="JUDGMENT"||Tt.type==="MULTIPLE")&&ju(Bn),Tt.type==="COMPLETION"&&gr(Bn),Tt.type==="SUBJECTIVE"&&We(Bn),Tt.type==="PROGRAM"&&dt(Bn),Tt.type==="BPROGRAM"&&cl(Bn),Tt.type==="COMBINATION"&&yt(Bn,Oi),Tt.type==="PRACTICAL"&&Pt(Bn),fe.createElement(Bt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},((ua=ct==null?void 0:ct.exam)==null?void 0:ua.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(Tt.type)&&fe.createElement(Ae.Z,null,fe.createElement(Lc.Z,{state:Bn==null?void 0:Bn.is_wrong,onClick:()=>{vo==null||vo({value:Ya(ys({},Bn),{question_id:Bn==null?void 0:Bn.id,question_score:Bn==null?void 0:Bn.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(Tt.type)&&(Bn==null?void 0:Bn.show_resubmit)&&fe.createElement(Ae.Z,null,fe.createElement(Fs.C,{dataSource:Ya(ys({},Bn),{question_id:Bn==null?void 0:Bn.id})})),((Qr=ct==null?void 0:ct.exam)==null?void 0:Qr.exercise_status)===3&&["SINGLE"].includes(Tt.type)&&fe.createElement(Ae.Z,null,fe.createElement(ft.ZP,{style:{color:"#3061D0"},onClick:()=>{ei({value:Bn})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),Ar?fe.createElement(il.vr,null,fe.createElement(ne.Z,{showTotal:rt.rU,total:(Hr=ct==null?void 0:ct.exam)==null?void 0:Hr.total_num,pageSize:1,current:Tr+1,showSizeChanger:!1,onChange:An,showQuickJumper:!1,hideOnSinglePage:!1})):fe.createElement(il.vr,{LeftContent:fe.createElement(il.op,{onClick:Ie,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:fe.createElement(Bt.Z,{align:"middle"},fe.createElement(Nt.Z,{color:"#55575D",overlayClassName:Ke.popover,open:Ao,getPopupContainer:Tt=>Tt==null?void 0:Tt.parentNode,content:"\u5982\u60A8\u5BF9\u6B64\u4EFD\u8BD5\u9898\u6EE1\u610F\uFF0C\u53EF\u5C06\u6B64\u4EFD\u8BD5\u9898\u4FDD\u5B58\u4E3A\u56FA\u5B9A\u8BD5\u5377"},fe.createElement(il.op,{onMouseEnter:()=>Ho(!0),onMouseLeave:()=>Ho(!1),onClick:()=>Qt(),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),fe.createElement(il.op,{shape:"default",type:"primary",onClick:()=>Vt(),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),fe.createElement(Ru,{visible:Pa,questionParams:Vs.current,getdata:la,onRandomExchange:()=>Nl(void 0,null,function*(){const Tt=Vs.current;yield Ir({single_question_id:Tt.id,seleted_item_bank_ids:Tt.ids},{type:Tt.type,index:Tt.index}),qi(!1)}),selectFromProblemSet:()=>{const Tt=Vs.current,Dn=`${location.pathname}${location.search}`;Dn.includes("exercise")&&tt.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${Tt.id}&qtype=${Tt.type}&exerciseid=${Ro.categoryId}&from=${Dn}`)},onCancel:()=>{qi(!1)}}))};var Fc=(0,tt.connect)(({classroomList:ct})=>({classroomList:ct}))(dc)},72911:function(Cn,On,Me){"use strict";Me.r(On),Me.d(On,{default:function(){return se}});var fe=Me(67294),Ke=Me(35973),St={flex_box_center:"flex_box_center___kQBcj",flex_space_between:"flex_space_between___Znlbo",flex_box_vertical_center:"flex_box_vertical_center___CPD50",flex_box_center_end:"flex_box_center_end___jzPvK",flex_box_column:"flex_box_column___cvIBS",wrap:"wrap___lab8O",crumbs:"crumbs___qvTza"},zt=Me(38884),ft=Me(2453),Be=Me(48054),He=Me(33170),gt=Me(28706),it=Me(67294),st=Object.defineProperty,Ft=Object.getOwnPropertySymbols,Nt=Object.prototype.hasOwnProperty,Bt=Object.prototype.propertyIsEnumerable,Ae=(pe,ve,Se)=>ve in pe?st(pe,ve,{enumerable:!0,configurable:!0,writable:!0,value:Se}):pe[ve]=Se,ne=(pe,ve)=>{for(var Se in ve||(ve={}))Nt.call(ve,Se)&&Ae(pe,Se,ve[Se]);if(Ft)for(var Se of Ft(ve))Bt.call(ve,Se)&&Ae(pe,Se,ve[Se]);return pe},te=(pe,ve,Se)=>new Promise((Pe,Oe)=>{var Re=Je=>{try{rt(Se.next(Je))}catch(bt){Oe(bt)}},tt=Je=>{try{rt(Se.throw(Je))}catch(bt){Oe(bt)}},rt=Je=>Je.done?Pe(Je.value):Promise.resolve(Je.value).then(Re,tt);rt((Se=Se.apply(pe,ve)).next())});const ue=({paperlibrary:pe,user:ve,globalSetting:Se,dispatch:Pe,location:Oe})=>{var Re,tt,rt,Je;const[bt]=(0,Ke.useSearchParams)(),lt=bt.get("select")||0,[Lt,Mt]=(0,fe.useState)(!1),[pt,dn]=(0,fe.useState)(!0),[tn,vn]=(0,fe.useState)(Number(lt)),[Tn,Ve]=(0,fe.useState)({}),Ze=(0,Ke.useParams)(),{userInfo:Qe}=ve,{actionTabs:mn}=pe;(0,fe.useEffect)(()=>(Pe({type:"globalSetting/footerToggle",payload:!1}),()=>{Pe({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,fe.useEffect)(()=>(Pe({type:"globalSetting/onlyShowBackTopToggle",payload:!1}),Pe({type:"globalSetting/onlyShowBackTopIconToggle",payload:!1}),Pe({type:"exercise/getWorkSetting",payload:ne({},Ze)}),()=>{Pe({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),Pe({type:"globalSetting/onlyShowBackTopIconToggle",payload:!0})}),[]),(0,fe.useEffect)(()=>{kn(tn)},[]),(0,fe.useEffect)(()=>{var mt;(mt=mn==null?void 0:mn.params)!=null&&mt.isUpdateData&&kn(tn)},[(Re=mn==null?void 0:mn.params)==null?void 0:Re.isUpdateData]);const kn=(mt=0)=>te(void 0,null,function*(){console.log(Ze),dn(!0);const Et=yield(0,He.ZP)(`/api/exercises/${Ze.categoryId}/preview_random_exercise.json`,{method:"get",params:{num:mt}});Pe({type:"paperlibrary/setActionTabs",payload:{params:{isUpdateData:!1}}}),dn(!1),Ve((0,gt.PF)(Et))}),At=()=>{Ke.history.push(`/classrooms/${Ze.coursesId}/exercise`)},pn=()=>{alert("\u4FDD\u5B58")},ln=(mt,Et)=>te(void 0,null,function*(){const on=yield(0,He.ZP)(`/api/exercises/${Ze.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:mt==null?void 0:mt.single_question_id}});on!=null&&on.question&&(ft.ZP.info("\u6362\u9898\u6210\u529F"),kn(tn))}),jn=mt=>te(void 0,null,function*(){document.body.scrollIntoView(),vn(mt),yield kn(mt)}),Gt=mt=>{Pe({type:"exercise/setActionTabs",payload:{key:"\u6807\u8BB0\u9519\u9898",params:mt}})};return console.log((0,Ke.useLocation)(),"location333"),it.createElement("section",{className:St.wrap},it.createElement(Be.Z,{loading:pt,active:!0,paragraph:{rows:5}},((rt=(tt=(0,Ke.useLocation)())==null?void 0:tt.pathname)==null?void 0:rt.includes("preview"))&&it.createElement("div",{className:St.crumbs},it.createElement("b",null),it.createElement("span",{className:"current",onClick:()=>Ke.history.push(`/classrooms/${Ze.coursesId}/exercise`)},`${(Je=Qe==null?void 0:Qe.course)==null?void 0:Je.course_name}>`),it.createElement("span",{className:"current",onClick:()=>Ke.history.push(`/classrooms/${Ze.coursesId}/exercise`)},"\u8BD5\u5377\u5217\u8868>"),it.createElement("span",{style:{color:"#bebebe"}},"\u9884\u89C8")),it.createElement(zt.Z,{loading:Lt,submit:pn,goBack:At,data:Tn,getdata:()=>{kn(tn)},selectValue:tn,editPreview:!0,onExchange:ln,onSkipExamination:jn,handleMarkWrongQuestion:Gt})))};var se=(0,Ke.connect)(({paperlibrary:pe,user:ve,globalSetting:Se})=>({paperlibrary:pe,user:ve,globalSetting:Se}))(ue)},99678:function(Cn,On,Me){"use strict";Me.d(On,{g:function(){return ft}});var fe=Me(67294),Ke=Me(56443),St=Me(53430),zt=(Be,He,gt)=>new Promise((it,st)=>{var Ft=Ae=>{try{Bt(gt.next(Ae))}catch(ne){st(ne)}},Nt=Ae=>{try{Bt(gt.throw(Ae))}catch(ne){st(ne)}},Bt=Ae=>Ae.done?it(Ae.value):Promise.resolve(Ae.value).then(Ft,Nt);Bt((gt=gt.apply(Be,He)).next())});const ft=()=>{const[Be,He]=(0,fe.useState)([]);return(0,fe.useEffect)(()=>{zt(void 0,null,function*(){const it=yield(0,Ke.d1)({source:"question"});it!=null&&it.disciplines&&He((0,St.L)(it==null?void 0:it.disciplines))})},[]),Be}},9343:function(Cn,On,Me){"use strict";Me.d(On,{U:function(){return it}});var fe=Me(67294),Ke=Object.defineProperty,St=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,ft=Object.prototype.propertyIsEnumerable,Be=(st,Ft,Nt)=>Ft in st?Ke(st,Ft,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):st[Ft]=Nt,He=(st,Ft)=>{for(var Nt in Ft||(Ft={}))zt.call(Ft,Nt)&&Be(st,Nt,Ft[Nt]);if(St)for(var Nt of St(Ft))ft.call(Ft,Nt)&&Be(st,Nt,Ft[Nt]);return st},gt=(st,Ft,Nt)=>new Promise((Bt,Ae)=>{var ne=se=>{try{ue(Nt.next(se))}catch(pe){Ae(pe)}},te=se=>{try{ue(Nt.throw(se))}catch(pe){Ae(pe)}},ue=se=>se.done?Bt(se.value):Promise.resolve(se.value).then(ne,te);ue((Nt=Nt.apply(st,Ft)).next())});function it(st,Ft){const[Nt,Bt]=(0,fe.useState)(Ft),[Ae,ne]=(0,fe.useState)(!1),[te,ue]=(0,fe.useState)();return[Nt,Ae,(pe,ve=!1)=>gt(this,null,function*(){const Se=ve?Ft:He(He({},Nt),pe);ne(!0),Bt(Se);const Pe=yield st(Se);return ne(!1),ue(Pe),Pe}),te,ue]}},51161:function(Cn,On,Me){"use strict";Me.d(On,{AL:function(){return Se},Iy:function(){return Ft},Qv:function(){return Ae},ez:function(){return ve},jb:function(){return Nt}});var fe=Me(47084),Ke=Me.n(fe),St=Me(90621),zt=Me.n(St);let ft=1;function Be(rt,Je){const bt=rt.match(/^(\s+)(?:```)/);if(bt===null)return Je;const lt=bt[1];return Je.split(`
|
|
`).map(Lt=>{const Mt=Lt.match(/^\s+/);if(Mt===null)return Lt;const[pt]=Mt;return pt.length>=lt.length?Lt.slice(lt.length):Lt}).join(`
|
|
`)}let He=[],gt=["<ul>"];const it=new(Ke()).Renderer,st=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ft(){He.length=0,gt=["<ul>"]}const Nt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Bt(rt,Je,bt,lt){if(Je>=rt.length||rt[Je].level<=bt)return Je;var Lt=rt[Je];lt.push("<li><a href='#"+ft+Lt.anchor+"'>"+Lt.text+"</a>"),Je++;var Mt=[];return Je=Bt(rt,Je,Lt.level,Mt),Mt.length>0&&(lt.push("<ul>"),Mt.forEach(function(pt){lt.push(pt)}),lt.push("</ul>")),lt.push("</li>"),Je=Bt(rt,Je,bt,lt),Je}function Ae(){return Bt(He,0,0,gt),gt.push("</ul>"),gt.join("")}const ne={heading(rt){const Je=st.exec(rt);if(ft+=1,Je)return{type:"heading",raw:Je[0],depth:Je[1].length,text:Je[2]}},fences(rt){const Je=this.rules.block.fences.exec(rt);if(Je){const bt=Je[0];let lt=Be(bt,Je[3]||"");const Lt=Je[2]?Je[2].trim():Je[2];if(["latex","katex","math"].indexOf(Lt)>=0){const Mt=se(),pt=lt;lt=Mt,pe[Mt]={type:"block",expression:pt}}return{type:"code",raw:bt,lang:Lt,text:lt}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ue=0;const se=()=>`__special_katext_id_${ue++}__`;let pe={};function ve(){return pe}function Se(){ue=0,pe={}}function Pe(rt){return rt=rt.replace(te,(Je,bt)=>{const lt=se();return pe[lt]={type:"inline",expression:bt},lt}),rt}const Oe=it.listitem;it.listitem=function(rt){return Oe(Pe(rt))};const Re=it.paragraph;it.paragraph=function(rt){return Re(Pe(rt))};const tt=it.tablecell;it.tablecell=function(rt,Je){return tt(Pe(rt),Je)},it.code=function(rt,Je,bt){const lt=(Je||"").match(/\S*/)[0];return lt?["latex","katex","math"].indexOf(lt)>=0?`<p class='editormd-tex'>${rt}</p>`:`<pre class="prettyprint linenums"><code class="language-${Je}">${bt?rt:(0,St.escape)(rt,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(bt?rt:(0,St.escape)(rt,!0))+"</code></pre>"},it.heading=function(rt,Je,bt){let lt=this.options.headerPrefix+bt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return He.push({anchor:lt,level:Je,text:rt}),"<h"+Je+' id="'+ft+lt+'">'+rt+"</h"+Je+">"},Ke().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ke().use({tokenizer:ne,renderer:it}),On.ZP=Ke()},88386:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){fe.defineOption("placeholder","",function(gt,it,st){var Ft=st&&st!=fe.Init;if(it&&!Ft)gt.on("blur",ft),gt.on("change",Be),gt.on("swapDoc",Be),fe.on(gt.getInputField(),"compositionupdate",gt.state.placeholderCompose=function(){zt(gt)}),Be(gt);else if(!it&&Ft){gt.off("blur",ft),gt.off("change",Be),gt.off("swapDoc",Be),fe.off(gt.getInputField(),"compositionupdate",gt.state.placeholderCompose),Ke(gt);var Nt=gt.getWrapperElement();Nt.className=Nt.className.replace(" CodeMirror-empty","")}it&&!gt.hasFocus()&&ft(gt)});function Ke(gt){gt.state.placeholder&&(gt.state.placeholder.parentNode.removeChild(gt.state.placeholder),gt.state.placeholder=null)}function St(gt){Ke(gt);var it=gt.state.placeholder=document.createElement("pre");it.style.cssText="height: 0; overflow: visible",it.style.direction=gt.getOption("direction"),it.className="CodeMirror-placeholder CodeMirror-line-like";var st=gt.getOption("placeholder");typeof st=="string"&&(st=document.createTextNode(st)),it.appendChild(st),gt.display.lineSpace.insertBefore(it,gt.display.lineSpace.firstChild)}function zt(gt){setTimeout(function(){var it=!1,st=gt.getInputField();st.nodeName=="TEXTAREA"?it=!st.value:gt.lineCount()==1&&(it=!/[^\u200b]/.test(st.querySelector(".CodeMirror-line").textContent)),it?St(gt):Ke(gt)},20)}function ft(gt){He(gt)&&St(gt)}function Be(gt){var it=gt.getWrapperElement(),st=He(gt);it.className=it.className.replace(" CodeMirror-empty","")+(st?" CodeMirror-empty":""),st?St(gt):Ke(gt)}function He(gt){return gt.lineCount()===1&>.getLine(0)===""}})},82801:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){var Ke={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},St=fe.Pos;fe.defineOption("autoCloseBrackets",!1,function(ne,te,ue){ue&&ue!=fe.Init&&(ne.removeKeyMap(ft),ne.state.closeBrackets=null),te&&(Be(zt(te,"pairs")),ne.state.closeBrackets=te,ne.addKeyMap(ft))});function zt(ne,te){return te=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[te]!=null?ne[te]:Ke[te]}var ft={Backspace:it,Enter:st};function Be(ne){for(var te=0;te<ne.length;te++){var ue=ne.charAt(te),se="'"+ue+"'";ft[se]||(ft[se]=He(ue))}}Be(Ke.pairs+"`");function He(ne){return function(te){return Nt(te,ne)}}function gt(ne){var te=ne.state.closeBrackets;if(!te||te.override)return te;var ue=ne.getModeAt(ne.getCursor());return ue.closeBrackets||te}function it(ne){var te=gt(ne);if(!te||ne.getOption("disableInput"))return fe.Pass;for(var ue=zt(te,"pairs"),se=ne.listSelections(),pe=0;pe<se.length;pe++){if(!se[pe].empty())return fe.Pass;var ve=Bt(ne,se[pe].head);if(!ve||ue.indexOf(ve)%2!=0)return fe.Pass}for(var pe=se.length-1;pe>=0;pe--){var Se=se[pe].head;ne.replaceRange("",St(Se.line,Se.ch-1),St(Se.line,Se.ch+1),"+delete")}}function st(ne){var te=gt(ne),ue=te&&zt(te,"explode");if(!ue||ne.getOption("disableInput"))return fe.Pass;for(var se=ne.listSelections(),pe=0;pe<se.length;pe++){if(!se[pe].empty())return fe.Pass;var ve=Bt(ne,se[pe].head);if(!ve||ue.indexOf(ve)%2!=0)return fe.Pass}ne.operation(function(){var Se=ne.lineSeparator()||`
|
|
`;ne.replaceSelection(Se+Se,null),ne.execCommand("goCharLeft"),se=ne.listSelections();for(var Pe=0;Pe<se.length;Pe++){var Oe=se[Pe].head.line;ne.indentLine(Oe,null,!0),ne.indentLine(Oe+1,null,!0)}})}function Ft(ne){var te=fe.cmpPos(ne.anchor,ne.head)>0;return{anchor:new St(ne.anchor.line,ne.anchor.ch+(te?-1:1)),head:new St(ne.head.line,ne.head.ch+(te?1:-1))}}function Nt(ne,te){var ue=gt(ne);if(!ue||ne.getOption("disableInput"))return fe.Pass;var se=zt(ue,"pairs"),pe=se.indexOf(te);if(pe==-1)return fe.Pass;for(var ve=zt(ue,"closeBefore"),Se=zt(ue,"triples"),Pe=se.charAt(pe+1)==te,Oe=ne.listSelections(),Re=pe%2==0,tt,rt=0;rt<Oe.length;rt++){var Je=Oe[rt],bt=Je.head,lt,Lt=ne.getRange(bt,St(bt.line,bt.ch+1));if(Re&&!Je.empty())lt="surround";else if((Pe||!Re)&&Lt==te)Pe&&Ae(ne,bt)?lt="both":Se.indexOf(te)>=0&&ne.getRange(bt,St(bt.line,bt.ch+3))==te+te+te?lt="skipThree":lt="skip";else if(Pe&&bt.ch>1&&Se.indexOf(te)>=0&&ne.getRange(St(bt.line,bt.ch-2),bt)==te+te){if(bt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(St(bt.line,bt.ch-2))))return fe.Pass;lt="addFour"}else if(Pe){var Mt=bt.ch==0?" ":ne.getRange(St(bt.line,bt.ch-1),bt);if(!fe.isWordChar(Lt)&&Mt!=te&&!fe.isWordChar(Mt))lt="both";else return fe.Pass}else if(Re&&(Lt.length===0||/\s/.test(Lt)||ve.indexOf(Lt)>-1))lt="both";else return fe.Pass;if(!tt)tt=lt;else if(tt!=lt)return fe.Pass}var pt=pe%2?se.charAt(pe-1):te,dn=pe%2?te:se.charAt(pe+1);ne.operation(function(){if(tt=="skip")ne.execCommand("goCharRight");else if(tt=="skipThree")for(var tn=0;tn<3;tn++)ne.execCommand("goCharRight");else if(tt=="surround"){for(var vn=ne.getSelections(),tn=0;tn<vn.length;tn++)vn[tn]=pt+vn[tn]+dn;ne.replaceSelections(vn,"around"),vn=ne.listSelections().slice();for(var tn=0;tn<vn.length;tn++)vn[tn]=Ft(vn[tn]);ne.setSelections(vn)}else tt=="both"?(ne.replaceSelection(pt+dn,null),ne.triggerElectric(pt+dn),ne.execCommand("goCharLeft")):tt=="addFour"&&(ne.replaceSelection(pt+pt+pt+pt,"before"),ne.execCommand("goCharRight"))})}function Bt(ne,te){var ue=ne.getRange(St(te.line,te.ch-1),St(te.line,te.ch+1));return ue.length==2?ue:null}function Ae(ne,te){var ue=ne.getTokenAt(St(te.line,te.ch+1));return/\bstring/.test(ue.type)&&ue.start==te.ch&&(te.ch==0||!/\bstring/.test(ne.getTokenTypeAt(te)))}})},57341:function(Cn,On,Me){(function(fe){fe(Me(4631),Me(4786))})(function(fe){fe.defineOption("autoCloseTags",!1,function(it,st,Ft){if(Ft!=fe.Init&&Ft&&it.removeKeyMap("autoCloseTags"),!!st){var Nt={name:"autoCloseTags"};(typeof st!="object"||st.whenClosing!==!1)&&(Nt["'/'"]=function(Bt){return Be(Bt)}),(typeof st!="object"||st.whenOpening!==!1)&&(Nt["'>'"]=function(Bt){return zt(Bt)}),it.addKeyMap(Nt)}});var Ke=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],St=["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 zt(it){if(it.getOption("disableInput"))return fe.Pass;for(var st=it.listSelections(),Ft=[],Nt=it.getOption("autoCloseTags"),Bt=0;Bt<st.length;Bt++){if(!st[Bt].empty())return fe.Pass;var Ae=st[Bt].head,ne=it.getTokenAt(Ae),te=fe.innerMode(it.getMode(),ne.state),ue=te.state,se=te.mode.xmlCurrentTag&&te.mode.xmlCurrentTag(ue),pe=se&&se.name;if(!pe)return fe.Pass;var ve=te.mode.configuration=="html",Se=typeof Nt=="object"&&Nt.dontCloseTags||ve&&Ke,Pe=typeof Nt=="object"&&Nt.indentTags||ve&&St;ne.end>Ae.ch&&(pe=pe.slice(0,pe.length-ne.end+Ae.ch));var Oe=pe.toLowerCase();if(!pe||ne.type=="string"&&(ne.end!=Ae.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==Ae.ch-ne.start-1||Se&&He(Se,Oe)>-1||gt(it,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(ue)||[],pe,Ae,!0))return fe.Pass;var Re=typeof Nt=="object"&&Nt.emptyTags;if(Re&&He(Re,pe)>-1){Ft[Bt]={text:"/>",newPos:fe.Pos(Ae.line,Ae.ch+2)};continue}var tt=Pe&&He(Pe,Oe)>-1;Ft[Bt]={indent:tt,text:">"+(tt?`
|
|
|
|
`:"")+"</"+pe+">",newPos:tt?fe.Pos(Ae.line+1,0):fe.Pos(Ae.line,Ae.ch+1)}}for(var rt=typeof Nt=="object"&&Nt.dontIndentOnAutoClose,Bt=st.length-1;Bt>=0;Bt--){var Je=Ft[Bt];it.replaceRange(Je.text,st[Bt].head,st[Bt].anchor,"+insert");var bt=it.listSelections().slice(0);bt[Bt]={head:Je.newPos,anchor:Je.newPos},it.setSelections(bt),!rt&&Je.indent&&(it.indentLine(Je.newPos.line,null,!0),it.indentLine(Je.newPos.line+1,null,!0))}}function ft(it,st){for(var Ft=it.listSelections(),Nt=[],Bt=st?"/":"</",Ae=it.getOption("autoCloseTags"),ne=typeof Ae=="object"&&Ae.dontIndentOnSlash,te=0;te<Ft.length;te++){if(!Ft[te].empty())return fe.Pass;var ue=Ft[te].head,se=it.getTokenAt(ue),pe=fe.innerMode(it.getMode(),se.state),ve=pe.state;if(st&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ue.ch-1))return fe.Pass;var Se,Pe=pe.mode.name!="xml"&&it.getMode().name=="htmlmixed";if(Pe&&pe.mode.name=="javascript")Se=Bt+"script";else if(Pe&&pe.mode.name=="css")Se=Bt+"style";else{var Oe=pe.mode.xmlCurrentContext&&pe.mode.xmlCurrentContext(ve);if(!Oe||Oe.length&>(it,Oe,Oe[Oe.length-1],ue))return fe.Pass;Se=Bt+Oe[Oe.length-1]}it.getLine(ue.line).charAt(se.end)!=">"&&(Se+=">"),Nt[te]=Se}if(it.replaceSelections(Nt),Ft=it.listSelections(),!ne)for(var te=0;te<Ft.length;te++)(te==Ft.length-1||Ft[te].head.line<Ft[te+1].head.line)&&it.indentLine(Ft[te].head.line)}function Be(it){return it.getOption("disableInput")?fe.Pass:ft(it,!0)}fe.commands.closeTag=function(it){return ft(it)};function He(it,st){if(it.indexOf)return it.indexOf(st);for(var Ft=0,Nt=it.length;Ft<Nt;++Ft)if(it[Ft]==st)return Ft;return-1}function gt(it,st,Ft,Nt,Bt){if(!fe.scanForClosingTag)return!1;var Ae=Math.min(it.lastLine()+1,Nt.line+500),ne=fe.scanForClosingTag(it,Nt,null,Ae);if(!ne||ne.tag!=Ft)return!1;for(var te=Bt?1:0,ue=st.length-1;ue>=0&&st[ue]==Ft;ue--)++te;Nt=ne.to;for(var ue=1;ue<te;ue++){var se=fe.scanForClosingTag(it,Nt,null,Ae);if(!se||se.tag!=Ft)return!1;Nt=se.to}return!0}})},4786:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){"use strict";var Ke=fe.Pos;function St(ue,se){return ue.line-se.line||ue.ch-se.ch}var zt="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",ft=zt+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Be=new RegExp("<(/?)(["+zt+"]["+ft+"]*)","g");function He(ue,se,pe,ve){this.line=se,this.ch=pe,this.cm=ue,this.text=ue.getLine(se),this.min=ve?Math.max(ve.from,ue.firstLine()):ue.firstLine(),this.max=ve?Math.min(ve.to-1,ue.lastLine()):ue.lastLine()}function gt(ue,se){var pe=ue.cm.getTokenTypeAt(Ke(ue.line,se));return pe&&/\btag\b/.test(pe)}function it(ue){if(!(ue.line>=ue.max))return ue.ch=0,ue.text=ue.cm.getLine(++ue.line),!0}function st(ue){if(!(ue.line<=ue.min))return ue.text=ue.cm.getLine(--ue.line),ue.ch=ue.text.length,!0}function Ft(ue){for(;;){var se=ue.text.indexOf(">",ue.ch);if(se==-1){if(it(ue))continue;return}if(!gt(ue,se+1)){ue.ch=se+1;continue}var pe=ue.text.lastIndexOf("/",se),ve=pe>-1&&!/\S/.test(ue.text.slice(pe+1,se));return ue.ch=se+1,ve?"selfClose":"regular"}}function Nt(ue){for(;;){var se=ue.ch?ue.text.lastIndexOf("<",ue.ch-1):-1;if(se==-1){if(st(ue))continue;return}if(!gt(ue,se+1)){ue.ch=se;continue}Be.lastIndex=se,ue.ch=se;var pe=Be.exec(ue.text);if(pe&&pe.index==se)return pe}}function Bt(ue){for(;;){Be.lastIndex=ue.ch;var se=Be.exec(ue.text);if(!se){if(it(ue))continue;return}if(!gt(ue,se.index+1)){ue.ch=se.index+1;continue}return ue.ch=se.index+se[0].length,se}}function Ae(ue){for(;;){var se=ue.ch?ue.text.lastIndexOf(">",ue.ch-1):-1;if(se==-1){if(st(ue))continue;return}if(!gt(ue,se+1)){ue.ch=se;continue}var pe=ue.text.lastIndexOf("/",se),ve=pe>-1&&!/\S/.test(ue.text.slice(pe+1,se));return ue.ch=se+1,ve?"selfClose":"regular"}}function ne(ue,se){for(var pe=[];;){var ve=Bt(ue),Se,Pe=ue.line,Oe=ue.ch-(ve?ve[0].length:0);if(!ve||!(Se=Ft(ue)))return;if(Se!="selfClose")if(ve[1]){for(var Re=pe.length-1;Re>=0;--Re)if(pe[Re]==ve[2]){pe.length=Re;break}if(Re<0&&(!se||se==ve[2]))return{tag:ve[2],from:Ke(Pe,Oe),to:Ke(ue.line,ue.ch)}}else pe.push(ve[2])}}function te(ue,se){for(var pe=[];;){var ve=Ae(ue);if(!ve)return;if(ve=="selfClose"){Nt(ue);continue}var Se=ue.line,Pe=ue.ch,Oe=Nt(ue);if(!Oe)return;if(Oe[1])pe.push(Oe[2]);else{for(var Re=pe.length-1;Re>=0;--Re)if(pe[Re]==Oe[2]){pe.length=Re;break}if(Re<0&&(!se||se==Oe[2]))return{tag:Oe[2],from:Ke(ue.line,ue.ch),to:Ke(Se,Pe)}}}}fe.registerHelper("fold","xml",function(ue,se){for(var pe=new He(ue,se.line,0);;){var ve=Bt(pe);if(!ve||pe.line!=se.line)return;var Se=Ft(pe);if(!Se)return;if(!ve[1]&&Se!="selfClose"){var Pe=Ke(pe.line,pe.ch),Oe=ne(pe,ve[2]);return Oe&&St(Oe.from,Pe)>0?{from:Pe,to:Oe.from}:null}}}),fe.findMatchingTag=function(ue,se,pe){var ve=new He(ue,se.line,se.ch,pe);if(!(ve.text.indexOf(">")==-1&&ve.text.indexOf("<")==-1)){var Se=Ft(ve),Pe=Se&&Ke(ve.line,ve.ch),Oe=Se&&Nt(ve);if(!(!Se||!Oe||St(ve,se)>0)){var Re={from:Ke(ve.line,ve.ch),to:Pe,tag:Oe[2]};return Se=="selfClose"?{open:Re,close:null,at:"open"}:Oe[1]?{open:te(ve,Oe[2]),close:Re,at:"close"}:(ve=new He(ue,Pe.line,Pe.ch,pe),{open:Re,close:ne(ve,Oe[2]),at:"open"})}}},fe.findEnclosingTag=function(ue,se,pe,ve){for(var Se=new He(ue,se.line,se.ch,pe);;){var Pe=te(Se,ve);if(!Pe)break;var Oe=new He(ue,se.line,se.ch,pe),Re=ne(Oe,Pe.tag);if(Re)return{open:Pe,close:Re}}},fe.scanForClosingTag=function(ue,se,pe,ve){var Se=new He(ue,se.line,se.ch,ve?{from:0,to:ve}:null);return ne(Se,pe)}})},4631:function(Cn){(function(On,Me){Cn.exports=Me()})(this,function(){"use strict";var On=navigator.userAgent,Me=navigator.platform,fe=/gecko\/\d/i.test(On),Ke=/MSIE \d/.test(On),St=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(On),zt=/Edge\/(\d+)/.exec(On),ft=Ke||St||zt,Be=ft&&(Ke?document.documentMode||6:+(zt||St)[1]),He=!zt&&/WebKit\//.test(On),gt=He&&/Qt\/\d+\.\d+/.test(On),it=!zt&&/Chrome\//.test(On),st=/Opera\//.test(On),Ft=/Apple Computer/.test(navigator.vendor),Nt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(On),Bt=/PhantomJS/.test(On),Ae=!zt&&/AppleWebKit/.test(On)&&/Mobile\/\w+/.test(On),ne=/Android/.test(On),te=Ae||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(On),ue=Ae||/Mac/.test(Me),se=/\bCrOS\b/.test(On),pe=/win/i.test(Me),ve=st&&On.match(/Version\/(\d*\.\d*)/);ve&&(ve=Number(ve[1])),ve&&ve>=15&&(st=!1,He=!0);var Se=ue&&(gt||st&&(ve==null||ve<12.11)),Pe=fe||ft&&Be>=9;function Oe(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var Re=function(ie,ae){var de=ie.className,ce=Oe(ae).exec(de);if(ce){var me=de.slice(ce.index+ce[0].length);ie.className=de.slice(0,ce.index)+(me?ce[1]+me:"")}};function tt(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function rt(ie,ae){return tt(ie).appendChild(ae)}function Je(ie,ae,de,ce){var me=document.createElement(ie);if(de&&(me.className=de),ce&&(me.style.cssText=ce),typeof ae=="string")me.appendChild(document.createTextNode(ae));else if(ae)for(var Le=0;Le<ae.length;++Le)me.appendChild(ae[Le]);return me}function bt(ie,ae,de,ce){var me=Je(ie,ae,de,ce);return me.setAttribute("role","presentation"),me}var lt;document.createRange?lt=function(ie,ae,de,ce){var me=document.createRange();return me.setEnd(ce||ie,de),me.setStart(ie,ae),me}:lt=function(ie,ae,de){var ce=document.body.createTextRange();try{ce.moveToElementText(ie.parentNode)}catch(me){return ce}return ce.collapse(!0),ce.moveEnd("character",de),ce.moveStart("character",ae),ce};function Lt(ie,ae){if(ae.nodeType==3&&(ae=ae.parentNode),ie.contains)return ie.contains(ae);do if(ae.nodeType==11&&(ae=ae.host),ae==ie)return!0;while(ae=ae.parentNode)}function Mt(){var ie;try{ie=document.activeElement}catch(ae){ie=document.body||null}for(;ie&&ie.shadowRoot&&ie.shadowRoot.activeElement;)ie=ie.shadowRoot.activeElement;return ie}function pt(ie,ae){var de=ie.className;Oe(ae).test(de)||(ie.className+=(de?" ":"")+ae)}function dn(ie,ae){for(var de=ie.split(" "),ce=0;ce<de.length;ce++)de[ce]&&!Oe(de[ce]).test(ae)&&(ae+=" "+de[ce]);return ae}var tn=function(ie){ie.select()};Ae?tn=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:ft&&(tn=function(ie){try{ie.select()}catch(ae){}});function vn(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function Tn(ie,ae,de){ae||(ae={});for(var ce in ie)ie.hasOwnProperty(ce)&&(de!==!1||!ae.hasOwnProperty(ce))&&(ae[ce]=ie[ce]);return ae}function Ve(ie,ae,de,ce,me){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Le=ce||0,_e=me||0;;){var Xe=ie.indexOf(" ",Le);if(Xe<0||Xe>=ae)return _e+(ae-Le);_e+=Xe-Le,_e+=de-_e%de,Le=Xe+1}}var Ze=function(){this.id=null,this.f=null,this.time=0,this.handler=vn(this.onTimeout,this)};Ze.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ze.prototype.set=function(ie,ae){this.f=ae;var de=+new Date+ie;(!this.id||de<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=de)};function Qe(ie,ae){for(var de=0;de<ie.length;++de)if(ie[de]==ae)return de;return-1}var mn=50,kn={toString:function(){return"CodeMirror.Pass"}},At={scroll:!1},pn={origin:"*mouse"},ln={origin:"+move"};function jn(ie,ae,de){for(var ce=0,me=0;;){var Le=ie.indexOf(" ",ce);Le==-1&&(Le=ie.length);var _e=Le-ce;if(Le==ie.length||me+_e>=ae)return ce+Math.min(_e,ae-me);if(me+=Le-ce,me+=de-me%de,ce=Le+1,me>=ae)return ce}}var Gt=[""];function mt(ie){for(;Gt.length<=ie;)Gt.push(Et(Gt)+" ");return Gt[ie]}function Et(ie){return ie[ie.length-1]}function on(ie,ae){for(var de=[],ce=0;ce<ie.length;ce++)de[ce]=ae(ie[ce],ce);return de}function Yt(ie,ae,de){for(var ce=0,me=de(ae);ce<ie.length&&de(ie[ce])<=me;)ce++;ie.splice(ce,0,ae)}function ze(){}function be(ie,ae){var de;return Object.create?de=Object.create(ie):(ze.prototype=ie,de=new ze),ae&&Tn(ae,de),de}var Ce=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function De(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Ce.test(ie))}function Ge(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&De(ie)?!0:ae.test(ie):De(ie)}function Fe(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var qe=/[\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 rn(ie){return ie.charCodeAt(0)>=768&&qe.test(ie)}function Kn(ie,ae,de){for(;(de<0?ae>0:ae<ie.length)&&rn(ie.charAt(ae));)ae+=de;return ae}function Zn(ie,ae,de){for(var ce=ae>de?-1:1;;){if(ae==de)return ae;var me=(ae+de)/2,Le=ce<0?Math.ceil(me):Math.floor(me);if(Le==ae)return ie(Le)?ae:de;ie(Le)?de=Le:ae=Le+ce}}function $t(ie,ae,de,ce){if(!ie)return ce(ae,de,"ltr",0);for(var me=!1,Le=0;Le<ie.length;++Le){var _e=ie[Le];(_e.from<de&&_e.to>ae||ae==de&&_e.to==ae)&&(ce(Math.max(_e.from,ae),Math.min(_e.to,de),_e.level==1?"rtl":"ltr",Le),me=!0)}me||ce(ae,de,"ltr")}var Nn=null;function Zt(ie,ae,de){var ce;Nn=null;for(var me=0;me<ie.length;++me){var Le=ie[me];if(Le.from<ae&&Le.to>ae)return me;Le.to==ae&&(Le.from!=Le.to&&de=="before"?ce=me:Nn=me),Le.from==ae&&(Le.from!=Le.to&&de!="before"?ce=me:Nn=me)}return ce!=null?ce:Nn}var qn=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function de(ht){return ht<=247?ie.charAt(ht):1424<=ht&&ht<=1524?"R":1536<=ht&&ht<=1785?ae.charAt(ht-1536):1774<=ht&&ht<=2220?"r":8192<=ht&&ht<=8203?"w":ht==8204?"b":"L"}var ce=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,me=/[stwN]/,Le=/[LRr]/,_e=/[Lb1n]/,Xe=/[1n]/;function Ue(ht,Kt,xt){this.level=ht,this.from=Kt,this.to=xt}return function(ht,Kt){var xt=Kt=="ltr"?"L":"R";if(ht.length==0||Kt=="ltr"&&!ce.test(ht))return!1;for(var yn=ht.length,fn=[],wi=0;wi<yn;++wi)fn.push(de(ht.charCodeAt(wi)));for(var Mi=0,Hi=xt;Mi<yn;++Mi){var dr=fn[Mi];dr=="m"?fn[Mi]=Hi:Hi=dr}for(var oo=0,Dr=xt;oo<yn;++oo){var Po=fn[oo];Po=="1"&&Dr=="r"?fn[oo]="n":Le.test(Po)&&(Dr=Po,Po=="r"&&(fn[oo]="R"))}for(var aa=1,Br=fn[0];aa<yn-1;++aa){var Aa=fn[aa];Aa=="+"&&Br=="1"&&fn[aa+1]=="1"?fn[aa]="1":Aa==","&&Br==fn[aa+1]&&(Br=="1"||Br=="n")&&(fn[aa]=Br),Br=Aa}for(var Ys=0;Ys<yn;++Ys){var Kl=fn[Ys];if(Kl==",")fn[Ys]="N";else if(Kl=="%"){var sl=void 0;for(sl=Ys+1;sl<yn&&fn[sl]=="%";++sl);for(var th=Ys&&fn[Ys-1]=="!"||sl<yn&&fn[sl]=="1"?"1":"N",ku=Ys;ku<sl;++ku)fn[ku]=th;Ys=sl-1}}for(var Il=0,uh=xt;Il<yn;++Il){var fu=fn[Il];uh=="L"&&fu=="1"?fn[Il]="L":Le.test(fu)&&(uh=fu)}for(var Rl=0;Rl<yn;++Rl)if(me.test(fn[Rl])){var hs=void 0;for(hs=Rl+1;hs<yn&&me.test(fn[hs]);++hs);for(var fl=(Rl?fn[Rl-1]:xt)=="L",ql=(hs<yn?fn[hs]:xt)=="L",gu=fl==ql?fl?"L":"R":xt,Qh=Rl;Qh<hs;++Qh)fn[Qh]=gu;Rl=hs-1}for(var ll=[],Th,Pl=0;Pl<yn;)if(_e.test(fn[Pl])){var jf=Pl;for(++Pl;Pl<yn&&_e.test(fn[Pl]);++Pl);ll.push(new Ue(0,jf,Pl))}else{var xh=Pl,hh=ll.length,nh=Kt=="rtl"?1:0;for(++Pl;Pl<yn&&fn[Pl]!="L";++Pl);for(var Bs=xh;Bs<Pl;)if(Xe.test(fn[Bs])){xh<Bs&&(ll.splice(hh,0,new Ue(1,xh,Bs)),hh+=nh);var eu=Bs;for(++Bs;Bs<Pl&&Xe.test(fn[Bs]);++Bs);ll.splice(hh,0,new Ue(2,eu,Bs)),hh+=nh,xh=Bs}else++Bs;xh<Pl&&ll.splice(hh,0,new Ue(1,xh,Pl))}return Kt=="ltr"&&(ll[0].level==1&&(Th=ht.match(/^\s+/))&&(ll[0].from=Th[0].length,ll.unshift(new Ue(0,0,Th[0].length))),Et(ll).level==1&&(Th=ht.match(/\s+$/))&&(Et(ll).to-=Th[0].length,ll.push(new Ue(0,yn-Th[0].length,yn)))),Kt=="rtl"?ll.reverse():ll}}();function $n(ie,ae){var de=ie.order;return de==null&&(de=ie.order=qn(ie.text,ae)),de}var oi=[],ri=function(ie,ae,de){if(ie.addEventListener)ie.addEventListener(ae,de,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,de);else{var ce=ie._handlers||(ie._handlers={});ce[ae]=(ce[ae]||oi).concat(de)}};function fr(ie,ae){return ie._handlers&&ie._handlers[ae]||oi}function wr(ie,ae,de){if(ie.removeEventListener)ie.removeEventListener(ae,de,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,de);else{var ce=ie._handlers,me=ce&&ce[ae];if(me){var Le=Qe(me,de);Le>-1&&(ce[ae]=me.slice(0,Le).concat(me.slice(Le+1)))}}}function Li(ie,ae){var de=fr(ie,ae);if(de.length)for(var ce=Array.prototype.slice.call(arguments,2),me=0;me<de.length;++me)de[me].apply(null,ce)}function Ai(ie,ae,de){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),Li(ie,de||ae.type,ie,ae),Ni(ae)||ae.codemirrorIgnore}function Ur(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var de=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),ce=0;ce<ae.length;++ce)Qe(de,ae[ce])==-1&&de.push(ae[ce])}function Yn(ie,ae){return fr(ie,ae).length>0}function Rn(ie){ie.prototype.on=function(ae,de){ri(this,ae,de)},ie.prototype.off=function(ae,de){wr(this,ae,de)}}function sr(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function xr(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function Ni(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function lr(ie){sr(ie),xr(ie)}function mo(ie){return ie.target||ie.srcElement}function pi(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),ue&&ie.ctrlKey&&ae==1&&(ae=3),ae}var ti=function(){if(ft&&Be<9)return!1;var ie=Je("div");return"draggable"in ie||"dragDrop"in ie}(),hi;function Ii(ie){if(hi==null){var ae=Je("span","\u200B");rt(ie,Je("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(hi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(ft&&Be<8))}var de=hi?Je("span","\u200B"):Je("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return de.setAttribute("cm-text",""),de}var ir;function zi(ie){if(ir!=null)return ir;var ae=rt(ie,document.createTextNode("A\u062EA")),de=lt(ae,0,1).getBoundingClientRect(),ce=lt(ae,1,2).getBoundingClientRect();return tt(ie),!de||de.left==de.right?!1:ir=ce.right-de.right<3}var an=`
|
|
|
|
b`.split(/\n/).length!=3?function(ie){for(var ae=0,de=[],ce=ie.length;ae<=ce;){var me=ie.indexOf(`
|
|
`,ae);me==-1&&(me=ie.length);var Le=ie.slice(ae,ie.charAt(me-1)=="\r"?me-1:me),_e=Le.indexOf("\r");_e!=-1?(de.push(Le.slice(0,_e)),ae+=_e+1):(de.push(Le),ae=me+1)}return de}:function(ie){return ie.split(/\r\n?|\n/)},we=window.getSelection?function(ie){try{return ie.selectionStart!=ie.selectionEnd}catch(ae){return!1}}:function(ie){var ae;try{ae=ie.ownerDocument.selection.createRange()}catch(de){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},Ut=function(){var ie=Je("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),en=null;function cn(ie){if(en!=null)return en;var ae=rt(ie,Je("span","x")),de=ae.getBoundingClientRect(),ce=lt(ae,0,1).getBoundingClientRect();return en=Math.abs(de.left-ce.left)>1}var xn={},In={};function ni(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),xn[ie]=ae}function Ui(ie,ae){In[ie]=ae}function Ot(ie){if(typeof ie=="string"&&In.hasOwnProperty(ie))ie=In[ie];else if(ie&&typeof ie.name=="string"&&In.hasOwnProperty(ie.name)){var ae=In[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=be(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Ot("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Ot("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function _t(ie,ae){ae=Ot(ae);var de=xn[ae.name];if(!de)return _t(ie,"text/plain");var ce=de(ie,ae);if(Ct.hasOwnProperty(ae.name)){var me=Ct[ae.name];for(var Le in me)me.hasOwnProperty(Le)&&(ce.hasOwnProperty(Le)&&(ce["_"+Le]=ce[Le]),ce[Le]=me[Le])}if(ce.name=ae.name,ae.helperType&&(ce.helperType=ae.helperType),ae.modeProps)for(var _e in ae.modeProps)ce[_e]=ae.modeProps[_e];return ce}var Ct={};function Jt(ie,ae){var de=Ct.hasOwnProperty(ie)?Ct[ie]:Ct[ie]={};Tn(ae,de)}function ci(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var de={};for(var ce in ae){var me=ae[ce];me instanceof Array&&(me=me.concat([])),de[ce]=me}return de}function Xn(ie,ae){for(var de;ie.innerMode&&(de=ie.innerMode(ae),!(!de||de.mode==ie));)ae=de.state,ie=de.mode;return de||{mode:ie,state:ae}}function _n(ie,ae,de){return ie.startState?ie.startState(ae,de):!0}var It=function(ie,ae,de){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=de};It.prototype.eol=function(){return this.pos>=this.string.length},It.prototype.sol=function(){return this.pos==this.lineStart},It.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},It.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},It.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),de;if(typeof ie=="string"?de=ae==ie:de=ae&&(ie.test?ie.test(ae):ie(ae)),de)return++this.pos,ae},It.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},It.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},It.prototype.skipToEnd=function(){this.pos=this.string.length},It.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},It.prototype.backUp=function(ie){this.pos-=ie},It.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ve(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},It.prototype.indentation=function(){return Ve(this.string,null,this.tabSize)-(this.lineStart?Ve(this.string,this.lineStart,this.tabSize):0)},It.prototype.match=function(ie,ae,de){if(typeof ie=="string"){var ce=function(_e){return de?_e.toLowerCase():_e},me=this.string.substr(this.pos,ie.length);if(ce(me)==ce(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Le=this.string.slice(this.pos).match(ie);return Le&&Le.index>0?null:(Le&&ae!==!1&&(this.pos+=Le[0].length),Le)}},It.prototype.current=function(){return this.string.slice(this.start,this.pos)},It.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},It.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},It.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function hn(ie,ae){if(ae-=ie.first,ae<0||ae>=ie.size)throw new Error("There is no line "+(ae+ie.first)+" in the document.");for(var de=ie;!de.lines;)for(var ce=0;;++ce){var me=de.children[ce],Le=me.chunkSize();if(ae<Le){de=me;break}ae-=Le}return de.lines[ae]}function Ci(ie,ae,de){var ce=[],me=ae.line;return ie.iter(ae.line,de.line+1,function(Le){var _e=Le.text;me==de.line&&(_e=_e.slice(0,de.ch)),me==ae.line&&(_e=_e.slice(ae.ch)),ce.push(_e),++me}),ce}function Ri(ie,ae,de){var ce=[];return ie.iter(ae,de,function(me){ce.push(me.text)}),ce}function Ln(ie,ae){var de=ae-ie.height;if(de)for(var ce=ie;ce;ce=ce.parent)ce.height+=de}function Rt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,de=Qe(ae.lines,ie),ce=ae.parent;ce;ae=ce,ce=ce.parent)for(var me=0;ce.children[me]!=ae;++me)de+=ce.children[me].chunkSize();return de+ae.first}function Si(ie,ae){var de=ie.first;e:do{for(var ce=0;ce<ie.children.length;++ce){var me=ie.children[ce],Le=me.height;if(ae<Le){ie=me;continue e}ae-=Le,de+=me.chunkSize()}return de}while(!ie.lines);for(var _e=0;_e<ie.lines.length;++_e){var Xe=ie.lines[_e],Ue=Xe.height;if(ae<Ue)break;ae-=Ue}return de+_e}function Zi(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Wr(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function En(ie,ae,de){if(de===void 0&&(de=null),!(this instanceof En))return new En(ie,ae,de);this.line=ie,this.ch=ae,this.sticky=de}function li(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function bo(ie,ae){return ie.sticky==ae.sticky&&li(ie,ae)==0}function La(ie){return En(ie.line,ie.ch)}function sa(ie,ae){return li(ie,ae)<0?ae:ie}function Yi(ie,ae){return li(ie,ae)<0?ie:ae}function Wi(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function er(ie,ae){if(ae.line<ie.first)return En(ie.first,0);var de=ie.first+ie.size-1;return ae.line>de?En(de,hn(ie,de).text.length):Mo(ae,hn(ie,ae.line).text.length)}function Mo(ie,ae){var de=ie.ch;return de==null||de>ae?En(ie.line,ae):de<0?En(ie.line,0):ie}function ra(ie,ae){for(var de=[],ce=0;ce<ae.length;ce++)de[ce]=er(ie,ae[ce]);return de}var ai=function(ie,ae){this.state=ie,this.lookAhead=ae},Mr=function(ie,ae,de,ce){this.state=ae,this.doc=ie,this.line=de,this.maxLookAhead=ce||0,this.baseTokens=null,this.baseTokenPos=1};Mr.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},Mr.prototype.baseToken=function(ie){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=ie;)this.baseTokenPos+=2;var ae=this.baseTokens[this.baseTokenPos+1];return{type:ae&&ae.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-ie}},Mr.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mr.fromSaved=function(ie,ae,de){return ae instanceof ai?new Mr(ie,ci(ie.mode,ae.state),de,ae.lookAhead):new Mr(ie,ci(ie.mode,ae),de)},Mr.prototype.save=function(ie){var ae=ie!==!1?ci(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ai(ae,this.maxLookAhead):ae};function ml(ie,ae,de,ce){var me=[ie.state.modeGen],Le={};na(ie,ae.text,ie.doc.mode,de,function(ht,Kt){return me.push(ht,Kt)},Le,ce);for(var _e=de.state,Xe=function(ht){de.baseTokens=me;var Kt=ie.state.overlays[ht],xt=1,yn=0;de.state=!0,na(ie,ae.text,Kt.mode,de,function(fn,wi){for(var Mi=xt;yn<fn;){var Hi=me[xt];Hi>fn&&me.splice(xt,1,fn,me[xt+1],Hi),xt+=2,yn=Math.min(fn,Hi)}if(wi)if(Kt.opaque)me.splice(Mi,xt-Mi,fn,"overlay "+wi),xt=Mi+2;else for(;Mi<xt;Mi+=2){var dr=me[Mi+1];me[Mi+1]=(dr?dr+" ":"")+"overlay "+wi}},Le),de.state=_e,de.baseTokens=null,de.baseTokenPos=1},Ue=0;Ue<ie.state.overlays.length;++Ue)Xe(Ue);return{styles:me,classes:Le.bgClass||Le.textClass?Le:null}}function xs(ie,ae,de){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var ce=$a(ie,Rt(ae)),me=ae.text.length>ie.options.maxHighlightLength&&ci(ie.doc.mode,ce.state),Le=ml(ie,ae,ce);me&&(ce.state=me),ae.stateAfter=ce.save(!me),ae.styles=Le.styles,Le.classes?ae.styleClasses=Le.classes:ae.styleClasses&&(ae.styleClasses=null),de===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function $a(ie,ae,de){var ce=ie.doc,me=ie.display;if(!ce.mode.startState)return new Mr(ce,!0,ae);var Le=Fo(ie,ae,de),_e=Le>ce.first&&hn(ce,Le-1).stateAfter,Xe=_e?Mr.fromSaved(ce,_e,Le):new Mr(ce,_n(ce.mode),Le);return ce.iter(Le,ae,function(Ue){Wt(ie,Ue.text,Xe);var ht=Xe.line;Ue.stateAfter=ht==ae-1||ht%5==0||ht>=me.viewFrom&&ht<me.viewTo?Xe.save():null,Xe.nextLine()}),de&&(ce.modeFrontier=Xe.line),Xe}function Wt(ie,ae,de,ce){var me=ie.doc.mode,Le=new It(ae,ie.options.tabSize,de);for(Le.start=Le.pos=ce||0,ae==""&&$i(me,de.state);!Le.eol();)Vo(me,Le,de.state),Le.start=Le.pos}function $i(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var de=Xn(ie,ae);if(de.mode.blankLine)return de.mode.blankLine(de.state)}}function Vo(ie,ae,de,ce){for(var me=0;me<10;me++){ce&&(ce[0]=Xn(ie,de).mode);var Le=ie.token(ae,de);if(ae.pos>ae.start)return Le}throw new Error("Mode "+ie.name+" failed to advance stream.")}var Pr=function(ie,ae,de){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=de};function Ia(ie,ae,de,ce){var me=ie.doc,Le=me.mode,_e;ae=er(me,ae);var Xe=hn(me,ae.line),Ue=$a(ie,ae.line,de),ht=new It(Xe.text,ie.options.tabSize,Ue),Kt;for(ce&&(Kt=[]);(ce||ht.pos<ae.ch)&&!ht.eol();)ht.start=ht.pos,_e=Vo(Le,ht,Ue.state),ce&&Kt.push(new Pr(ht,_e,ci(me.mode,Ue.state)));return ce?Kt:new Pr(ht,_e,Ue.state)}function zo(ie,ae){if(ie)for(;;){var de=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!de)break;ie=ie.slice(0,de.index)+ie.slice(de.index+de[0].length);var ce=de[1]?"bgClass":"textClass";ae[ce]==null?ae[ce]=de[2]:new RegExp("(?:^|\\s)"+de[2]+"(?:$|\\s)").test(ae[ce])||(ae[ce]+=" "+de[2])}return ie}function na(ie,ae,de,ce,me,Le,_e){var Xe=de.flattenSpans;Xe==null&&(Xe=ie.options.flattenSpans);var Ue=0,ht=null,Kt=new It(ae,ie.options.tabSize,ce),xt,yn=ie.options.addModeClass&&[null];for(ae==""&&zo($i(de,ce.state),Le);!Kt.eol();){if(Kt.pos>ie.options.maxHighlightLength?(Xe=!1,_e&&Wt(ie,ae,ce,Kt.pos),Kt.pos=ae.length,xt=null):xt=zo(Vo(de,Kt,ce.state,yn),Le),yn){var fn=yn[0].name;fn&&(xt="m-"+(xt?fn+" "+xt:fn))}if(!Xe||ht!=xt){for(;Ue<Kt.start;)Ue=Math.min(Kt.start,Ue+5e3),me(Ue,ht);ht=xt}Kt.start=Kt.pos}for(;Ue<Kt.pos;){var wi=Math.min(Kt.pos,Ue+5e3);me(wi,ht),Ue=wi}}function Fo(ie,ae,de){for(var ce,me,Le=ie.doc,_e=de?-1:ae-(ie.doc.mode.innerMode?1e3:100),Xe=ae;Xe>_e;--Xe){if(Xe<=Le.first)return Le.first;var Ue=hn(Le,Xe-1),ht=Ue.stateAfter;if(ht&&(!de||Xe+(ht instanceof ai?ht.lookAhead:0)<=Le.modeFrontier))return Xe;var Kt=Ve(Ue.text,null,ie.options.tabSize);(me==null||ce>Kt)&&(me=Xe-1,ce=Kt)}return me}function _o(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var de=ie.first,ce=ae-1;ce>de;ce--){var me=hn(ie,ce).stateAfter;if(me&&(!(me instanceof ai)||ce+me.lookAhead<ae)){de=ce+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,de)}}var da=!1,bn=!1;function Ga(){da=!0}function Sn(){bn=!0}function Zo(ie,ae,de){this.marker=ie,this.from=ae,this.to=de}function js(ie,ae){if(ie)for(var de=0;de<ie.length;++de){var ce=ie[de];if(ce.marker==ae)return ce}}function Vr(ie,ae){for(var de,ce=0;ce<ie.length;++ce)ie[ce]!=ae&&(de||(de=[])).push(ie[ce]);return de}function Ll(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function Ha(ie,ae,de){var ce;if(ie)for(var me=0;me<ie.length;++me){var Le=ie[me],_e=Le.marker,Xe=Le.from==null||(_e.inclusiveLeft?Le.from<=ae:Le.from<ae);if(Xe||Le.from==ae&&_e.type=="bookmark"&&(!de||!Le.marker.insertLeft)){var Ue=Le.to==null||(_e.inclusiveRight?Le.to>=ae:Le.to>ae);(ce||(ce=[])).push(new Zo(_e,Le.from,Ue?null:Le.to))}}return ce}function $o(ie,ae,de){var ce;if(ie)for(var me=0;me<ie.length;++me){var Le=ie[me],_e=Le.marker,Xe=Le.to==null||(_e.inclusiveRight?Le.to>=ae:Le.to>ae);if(Xe||Le.from==ae&&_e.type=="bookmark"&&(!de||Le.marker.insertLeft)){var Ue=Le.from==null||(_e.inclusiveLeft?Le.from<=ae:Le.from<ae);(ce||(ce=[])).push(new Zo(_e,Ue?null:Le.from-ae,Le.to==null?null:Le.to-ae))}}return ce}function Ba(ie,ae){if(ae.full)return null;var de=Zi(ie,ae.from.line)&&hn(ie,ae.from.line).markedSpans,ce=Zi(ie,ae.to.line)&&hn(ie,ae.to.line).markedSpans;if(!de&&!ce)return null;var me=ae.from.ch,Le=ae.to.ch,_e=li(ae.from,ae.to)==0,Xe=Ha(de,me,_e),Ue=$o(ce,Le,_e),ht=ae.text.length==1,Kt=Et(ae.text).length+(ht?me:0);if(Xe)for(var xt=0;xt<Xe.length;++xt){var yn=Xe[xt];if(yn.to==null){var fn=js(Ue,yn.marker);fn?ht&&(yn.to=fn.to==null?null:fn.to+Kt):yn.to=me}}if(Ue)for(var wi=0;wi<Ue.length;++wi){var Mi=Ue[wi];if(Mi.to!=null&&(Mi.to+=Kt),Mi.from==null){var Hi=js(Xe,Mi.marker);Hi||(Mi.from=Kt,ht&&(Xe||(Xe=[])).push(Mi))}else Mi.from+=Kt,ht&&(Xe||(Xe=[])).push(Mi)}Xe&&(Xe=nl(Xe)),Ue&&Ue!=Xe&&(Ue=nl(Ue));var dr=[Xe];if(!ht){var oo=ae.text.length-2,Dr;if(oo>0&&Xe)for(var Po=0;Po<Xe.length;++Po)Xe[Po].to==null&&(Dr||(Dr=[])).push(new Zo(Xe[Po].marker,null,null));for(var aa=0;aa<oo;++aa)dr.push(Dr);dr.push(Ue)}return dr}function nl(ie){for(var ae=0;ae<ie.length;++ae){var de=ie[ae];de.from!=null&&de.from==de.to&&de.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function wa(ie,ae,de){var ce=null;if(ie.iter(ae.line,de.line+1,function(fn){if(fn.markedSpans)for(var wi=0;wi<fn.markedSpans.length;++wi){var Mi=fn.markedSpans[wi].marker;Mi.readOnly&&(!ce||Qe(ce,Mi)==-1)&&(ce||(ce=[])).push(Mi)}}),!ce)return null;for(var me=[{from:ae,to:de}],Le=0;Le<ce.length;++Le)for(var _e=ce[Le],Xe=_e.find(0),Ue=0;Ue<me.length;++Ue){var ht=me[Ue];if(!(li(ht.to,Xe.from)<0||li(ht.from,Xe.to)>0)){var Kt=[Ue,1],xt=li(ht.from,Xe.from),yn=li(ht.to,Xe.to);(xt<0||!_e.inclusiveLeft&&!xt)&&Kt.push({from:ht.from,to:Xe.from}),(yn>0||!_e.inclusiveRight&&!yn)&&Kt.push({from:Xe.to,to:ht.to}),me.splice.apply(me,Kt),Ue+=Kt.length-3}}return me}function ki(ie){var ae=ie.markedSpans;if(ae){for(var de=0;de<ae.length;++de)ae[de].marker.detachLine(ie);ie.markedSpans=null}}function $e(ie,ae){if(ae){for(var de=0;de<ae.length;++de)ae[de].marker.attachLine(ie);ie.markedSpans=ae}}function rs(ie){return ie.inclusiveLeft?-1:0}function hu(ie){return ie.inclusiveRight?1:0}function cu(ie,ae){var de=ie.lines.length-ae.lines.length;if(de!=0)return de;var ce=ie.find(),me=ae.find(),Le=li(ce.from,me.from)||rs(ie)-rs(ae);if(Le)return-Le;var _e=li(ce.to,me.to)||hu(ie)-hu(ae);return _e||ae.id-ie.id}function ul(ie,ae){var de=bn&&ie.markedSpans,ce;if(de)for(var me=void 0,Le=0;Le<de.length;++Le)me=de[Le],me.marker.collapsed&&(ae?me.from:me.to)==null&&(!ce||cu(ce,me.marker)<0)&&(ce=me.marker);return ce}function kl(ie){return ul(ie,!0)}function zl(ie){return ul(ie,!1)}function sh(ie,ae){var de=bn&&ie.markedSpans,ce;if(de)for(var me=0;me<de.length;++me){var Le=de[me];Le.marker.collapsed&&(Le.from==null||Le.from<ae)&&(Le.to==null||Le.to>ae)&&(!ce||cu(ce,Le.marker)<0)&&(ce=Le.marker)}return ce}function Su(ie,ae,de,ce,me){var Le=hn(ie,ae),_e=bn&&Le.markedSpans;if(_e)for(var Xe=0;Xe<_e.length;++Xe){var Ue=_e[Xe];if(Ue.marker.collapsed){var ht=Ue.marker.find(0),Kt=li(ht.from,de)||rs(Ue.marker)-rs(me),xt=li(ht.to,ce)||hu(Ue.marker)-hu(me);if(!(Kt>=0&&xt<=0||Kt<=0&&xt>=0)&&(Kt<=0&&(Ue.marker.inclusiveRight&&me.inclusiveLeft?li(ht.to,de)>=0:li(ht.to,de)>0)||Kt>=0&&(Ue.marker.inclusiveRight&&me.inclusiveLeft?li(ht.from,ce)<=0:li(ht.from,ce)<0)))return!0}}}function Ra(ie){for(var ae;ae=kl(ie);)ie=ae.find(-1,!0).line;return ie}function qa(ie){for(var ae;ae=zl(ie);)ie=ae.find(1,!0).line;return ie}function Nr(ie){for(var ae,de;ae=zl(ie);)ie=ae.find(1,!0).line,(de||(de=[])).push(ie);return de}function vr(ie,ae){var de=hn(ie,ae),ce=Ra(de);return de==ce?ae:Rt(ce)}function uo(ie,ae){if(ae>ie.lastLine())return ae;var de=hn(ie,ae),ce;if(!un(ie,de))return ae;for(;ce=zl(de);)de=ce.find(1,!0).line;return Rt(de)+1}function un(ie,ae){var de=bn&&ae.markedSpans;if(de){for(var ce=void 0,me=0;me<de.length;++me)if(ce=de[me],!!ce.marker.collapsed){if(ce.from==null)return!0;if(!ce.marker.widgetNode&&ce.from==0&&ce.marker.inclusiveLeft&&Gr(ie,ae,ce))return!0}}}function Gr(ie,ae,de){if(de.to==null){var ce=de.marker.find(1,!0);return Gr(ie,ce.line,js(ce.line.markedSpans,de.marker))}if(de.marker.inclusiveRight&&de.to==ae.text.length)return!0;for(var me=void 0,Le=0;Le<ae.markedSpans.length;++Le)if(me=ae.markedSpans[Le],me.marker.collapsed&&!me.marker.widgetNode&&me.from==de.to&&(me.to==null||me.to!=de.from)&&(me.marker.inclusiveLeft||de.marker.inclusiveRight)&&Gr(ie,ae,me))return!0}function Io(ie){ie=Ra(ie);for(var ae=0,de=ie.parent,ce=0;ce<de.lines.length;++ce){var me=de.lines[ce];if(me==ie)break;ae+=me.height}for(var Le=de.parent;Le;de=Le,Le=de.parent)for(var _e=0;_e<Le.children.length;++_e){var Xe=Le.children[_e];if(Xe==de)break;ae+=Xe.height}return ae}function Va(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,de,ce=ie;de=kl(ce);){var me=de.find(0,!0);ce=me.from.line,ae+=me.from.ch-me.to.ch}for(ce=ie;de=zl(ce);){var Le=de.find(0,!0);ae-=ce.text.length-Le.from.ch,ce=Le.to.line,ae+=ce.text.length-Le.to.ch}return ae}function Ta(ie){var ae=ie.display,de=ie.doc;ae.maxLine=hn(de,de.first),ae.maxLineLength=Va(ae.maxLine),ae.maxLineChanged=!0,de.iter(function(ce){var me=Va(ce);me>ae.maxLineLength&&(ae.maxLineLength=me,ae.maxLine=ce)})}var os=function(ie,ae,de){this.text=ie,$e(this,ae),this.height=de?de(this):1};os.prototype.lineNo=function(){return Rt(this)},Rn(os);function Ws(ie,ae,de,ce){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),ki(ie),$e(ie,de);var me=ce?ce(ie):1;me!=ie.height&&Ln(ie,me)}function vl(ie){ie.parent=null,ki(ie)}var yl={},xu={};function Ou(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var de=ae.addModeClass?xu:yl;return de[ie]||(de[ie]=ie.replace(/\S+/g,"cm-$&"))}function Xt(ie,ae){var de=bt("span",null,null,He?"padding-right: .1px":null),ce={pre:bt("pre",[de],"CodeMirror-line"),content:de,col:0,pos:0,cm:ie,trailingSpace:!1,splitSpaces:ie.getOption("lineWrapping")};ae.measure={};for(var me=0;me<=(ae.rest?ae.rest.length:0);me++){var Le=me?ae.rest[me-1]:ae.line,_e=void 0;ce.pos=0,ce.addToken=Gl,zi(ie.display.measure)&&(_e=$n(Le,ie.doc.direction))&&(ce.addToken=vs(ce.addToken,_e)),ce.map=[];var Xe=ae!=ie.display.externalMeasured&&Rt(Le);Hh(Le,ce,xs(ie,Le,Xe)),Le.styleClasses&&(Le.styleClasses.bgClass&&(ce.bgClass=dn(Le.styleClasses.bgClass,ce.bgClass||"")),Le.styleClasses.textClass&&(ce.textClass=dn(Le.styleClasses.textClass,ce.textClass||""))),ce.map.length==0&&ce.map.push(0,0,ce.content.appendChild(Ii(ie.display.measure))),me==0?(ae.measure.map=ce.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(ce.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(He){var Ue=ce.content.lastChild;(/\bcm-tab\b/.test(Ue.className)||Ue.querySelector&&Ue.querySelector(".cm-tab"))&&(ce.content.className="cm-tab-wrap-hack")}return Li(ie,"renderLine",ie,ae.line,ce.pre),ce.pre.className&&(ce.textClass=dn(ce.pre.className,ce.textClass||"")),ce}function El(ie){var ae=Je("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Gl(ie,ae,de,ce,me,Le,_e){if(ae){var Xe=ie.splitSpaces?wu(ae,ie.trailingSpace):ae,Ue=ie.cm.state.specialChars,ht=!1,Kt;if(!Ue.test(ae))ie.col+=ae.length,Kt=document.createTextNode(Xe),ie.map.push(ie.pos,ie.pos+ae.length,Kt),ft&&Be<9&&(ht=!0),ie.pos+=ae.length;else{Kt=document.createDocumentFragment();for(var xt=0;;){Ue.lastIndex=xt;var yn=Ue.exec(ae),fn=yn?yn.index-xt:ae.length-xt;if(fn){var wi=document.createTextNode(Xe.slice(xt,xt+fn));ft&&Be<9?Kt.appendChild(Je("span",[wi])):Kt.appendChild(wi),ie.map.push(ie.pos,ie.pos+fn,wi),ie.col+=fn,ie.pos+=fn}if(!yn)break;xt+=fn+1;var Mi=void 0;if(yn[0]==" "){var Hi=ie.cm.options.tabSize,dr=Hi-ie.col%Hi;Mi=Kt.appendChild(Je("span",mt(dr),"cm-tab")),Mi.setAttribute("role","presentation"),Mi.setAttribute("cm-text"," "),ie.col+=dr}else yn[0]=="\r"||yn[0]==`
|
|
`?(Mi=Kt.appendChild(Je("span",yn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Mi.setAttribute("cm-text",yn[0]),ie.col+=1):(Mi=ie.cm.options.specialCharPlaceholder(yn[0]),Mi.setAttribute("cm-text",yn[0]),ft&&Be<9?Kt.appendChild(Je("span",[Mi])):Kt.appendChild(Mi),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,Mi),ie.pos++}}if(ie.trailingSpace=Xe.charCodeAt(ae.length-1)==32,de||ce||me||ht||Le||_e){var oo=de||"";ce&&(oo+=ce),me&&(oo+=me);var Dr=Je("span",[Kt],oo,Le);if(_e)for(var Po in _e)_e.hasOwnProperty(Po)&&Po!="style"&&Po!="class"&&Dr.setAttribute(Po,_e[Po]);return ie.content.appendChild(Dr)}ie.content.appendChild(Kt)}}function wu(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var de=ae,ce="",me=0;me<ie.length;me++){var Le=ie.charAt(me);Le==" "&&de&&(me==ie.length-1||ie.charCodeAt(me+1)==32)&&(Le="\xA0"),ce+=Le,de=Le==" "}return ce}function vs(ie,ae){return function(de,ce,me,Le,_e,Xe,Ue){me=me?me+" cm-force-border":"cm-force-border";for(var ht=de.pos,Kt=ht+ce.length;;){for(var xt=void 0,yn=0;yn<ae.length&&(xt=ae[yn],!(xt.to>ht&&xt.from<=ht));yn++);if(xt.to>=Kt)return ie(de,ce,me,Le,_e,Xe,Ue);ie(de,ce.slice(0,xt.to-ht),me,Le,null,Xe,Ue),Le=null,ce=ce.slice(xt.to-ht),ht=xt.to}}}function Yu(ie,ae,de,ce){var me=!ce&&de.widgetNode;me&&ie.map.push(ie.pos,ie.pos+ae,me),!ce&&ie.cm.display.input.needsContentAttribute&&(me||(me=ie.content.appendChild(document.createElement("span"))),me.setAttribute("cm-marker",de.id)),me&&(ie.cm.display.input.setUneditable(me),ie.content.appendChild(me)),ie.pos+=ae,ie.trailingSpace=!1}function Hh(ie,ae,de){var ce=ie.markedSpans,me=ie.text,Le=0;if(!ce){for(var _e=1;_e<de.length;_e+=2)ae.addToken(ae,me.slice(Le,Le=de[_e]),Ou(de[_e+1],ae.cm.options));return}for(var Xe=me.length,Ue=0,ht=1,Kt="",xt,yn,fn=0,wi,Mi,Hi,dr,oo;;){if(fn==Ue){wi=Mi=Hi=yn="",oo=null,dr=null,fn=1/0;for(var Dr=[],Po=void 0,aa=0;aa<ce.length;++aa){var Br=ce[aa],Aa=Br.marker;if(Aa.type=="bookmark"&&Br.from==Ue&&Aa.widgetNode)Dr.push(Aa);else if(Br.from<=Ue&&(Br.to==null||Br.to>Ue||Aa.collapsed&&Br.to==Ue&&Br.from==Ue)){if(Br.to!=null&&Br.to!=Ue&&fn>Br.to&&(fn=Br.to,Mi=""),Aa.className&&(wi+=" "+Aa.className),Aa.css&&(yn=(yn?yn+";":"")+Aa.css),Aa.startStyle&&Br.from==Ue&&(Hi+=" "+Aa.startStyle),Aa.endStyle&&Br.to==fn&&(Po||(Po=[])).push(Aa.endStyle,Br.to),Aa.title&&((oo||(oo={})).title=Aa.title),Aa.attributes)for(var Ys in Aa.attributes)(oo||(oo={}))[Ys]=Aa.attributes[Ys];Aa.collapsed&&(!dr||cu(dr.marker,Aa)<0)&&(dr=Br)}else Br.from>Ue&&fn>Br.from&&(fn=Br.from)}if(Po)for(var Kl=0;Kl<Po.length;Kl+=2)Po[Kl+1]==fn&&(Mi+=" "+Po[Kl]);if(!dr||dr.from==Ue)for(var sl=0;sl<Dr.length;++sl)Yu(ae,0,Dr[sl]);if(dr&&(dr.from||0)==Ue){if(Yu(ae,(dr.to==null?Xe+1:dr.to)-Ue,dr.marker,dr.from==null),dr.to==null)return;dr.to==Ue&&(dr=!1)}}if(Ue>=Xe)break;for(var th=Math.min(Xe,fn);;){if(Kt){var ku=Ue+Kt.length;if(!dr){var Il=ku>th?Kt.slice(0,th-Ue):Kt;ae.addToken(ae,Il,xt?xt+wi:wi,Hi,Ue+Il.length==fn?Mi:"",yn,oo)}if(ku>=th){Kt=Kt.slice(th-Ue),Ue=th;break}Ue=ku,Hi=""}Kt=me.slice(Le,Le=de[ht++]),xt=Ou(de[ht++],ae.cm.options)}}}function yh(ie,ae,de){this.line=ae,this.rest=Nr(ae),this.size=this.rest?Rt(Et(this.rest))-de+1:1,this.node=this.text=null,this.hidden=un(ie,ae)}function Ka(ie,ae,de){for(var ce=[],me,Le=ae;Le<de;Le=me){var _e=new yh(ie.doc,hn(ie.doc,Le),Le);me=Le+_e.size,ce.push(_e)}return ce}var Ko=null;function Bo(ie){Ko?Ko.ops.push(ie):ie.ownsGroup=Ko={ops:[ie],delayedCallbacks:[]}}function ia(ie){var ae=ie.delayedCallbacks,de=0;do{for(;de<ae.length;de++)ae[de].call(null);for(var ce=0;ce<ie.ops.length;ce++){var me=ie.ops[ce];if(me.cursorActivityHandlers)for(;me.cursorActivityCalled<me.cursorActivityHandlers.length;)me.cursorActivityHandlers[me.cursorActivityCalled++].call(null,me.cm)}}while(de<ae.length)}function Ua(ie,ae){var de=ie.ownsGroup;if(de)try{ia(de)}finally{Ko=null,ae(de)}}var cs=null;function Sr(ie,ae){var de=fr(ie,ae);if(de.length){var ce=Array.prototype.slice.call(arguments,2),me;Ko?me=Ko.delayedCallbacks:cs?me=cs:(me=cs=[],setTimeout(Zh,0));for(var Le=function(Xe){me.push(function(){return de[Xe].apply(null,ce)})},_e=0;_e<de.length;++_e)Le(_e)}}function Zh(){var ie=cs;cs=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function _u(ie,ae,de,ce){for(var me=0;me<ae.changes.length;me++){var Le=ae.changes[me];Le=="text"?Di(ie,ae):Le=="gutter"?Os(ie,ae,de,ce):Le=="class"?Ms(ie,ae):Le=="widget"&&Iu(ie,ae,ce)}ae.changes=null}function Sl(ie){return ie.node==ie.text&&(ie.node=Je("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),ft&&Be<8&&(ie.node.style.zIndex=2)),ie.node}function Wh(ie,ae){var de=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(de&&(de+=" CodeMirror-linebackground"),ae.background)de?ae.background.className=de:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(de){var ce=Sl(ae);ae.background=ce.insertBefore(Je("div",null,de),ce.firstChild),ie.display.input.setUneditable(ae.background)}}function lh(ie,ae){var de=ie.display.externalMeasured;return de&&de.line==ae.line?(ie.display.externalMeasured=null,ae.measure=de.measure,de.built):Xt(ie,ae)}function Di(ie,ae){var de=ae.text.className,ce=lh(ie,ae);ae.text==ae.node&&(ae.node=ce.pre),ae.text.parentNode.replaceChild(ce.pre,ae.text),ae.text=ce.pre,ce.bgClass!=ae.bgClass||ce.textClass!=ae.textClass?(ae.bgClass=ce.bgClass,ae.textClass=ce.textClass,Ms(ie,ae)):de&&(ae.text.className=de)}function Ms(ie,ae){Wh(ie,ae),ae.line.wrapClass?Sl(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var de=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=de||""}function Os(ie,ae,de,ce){if(ae.gutter&&(ae.node.removeChild(ae.gutter),ae.gutter=null),ae.gutterBackground&&(ae.node.removeChild(ae.gutterBackground),ae.gutterBackground=null),ae.line.gutterClass){var me=Sl(ae);ae.gutterBackground=Je("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?ce.fixedPos:-ce.gutterTotalWidth)+"px; width: "+ce.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),me.insertBefore(ae.gutterBackground,ae.text)}var Le=ae.line.gutterMarkers;if(ie.options.lineNumbers||Le){var _e=Sl(ae),Xe=ae.gutter=Je("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?ce.fixedPos:-ce.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(Xe),_e.insertBefore(Xe,ae.text),ae.line.gutterClass&&(Xe.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Le||!Le["CodeMirror-linenumbers"])&&(ae.lineNumber=Xe.appendChild(Je("div",Wr(ie.options,de),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ce.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Le)for(var Ue=0;Ue<ie.display.gutterSpecs.length;++Ue){var ht=ie.display.gutterSpecs[Ue].className,Kt=Le.hasOwnProperty(ht)&&Le[ht];Kt&&Xe.appendChild(Je("div",[Kt],"CodeMirror-gutter-elt","left: "+ce.gutterLeft[ht]+"px; width: "+ce.gutterWidth[ht]+"px"))}}}function Iu(ie,ae,de){ae.alignable&&(ae.alignable=null);for(var ce=Oe("CodeMirror-linewidget"),me=ae.node.firstChild,Le=void 0;me;me=Le)Le=me.nextSibling,ce.test(me.className)&&ae.node.removeChild(me);Vh(ie,ae,de)}function sc(ie,ae,de,ce){var me=lh(ie,ae);return ae.text=ae.node=me.pre,me.bgClass&&(ae.bgClass=me.bgClass),me.textClass&&(ae.textClass=me.textClass),Ms(ie,ae),Os(ie,ae,de,ce),Vh(ie,ae,ce),ae.node}function Vh(ie,ae,de){if(Oo(ie,ae.line,ae,de,!0),ae.rest)for(var ce=0;ce<ae.rest.length;ce++)Oo(ie,ae.rest[ce],ae,de,!1)}function Oo(ie,ae,de,ce,me){if(ae.widgets)for(var Le=Sl(de),_e=0,Xe=ae.widgets;_e<Xe.length;++_e){var Ue=Xe[_e],ht=Je("div",[Ue.node],"CodeMirror-linewidget"+(Ue.className?" "+Ue.className:""));Ue.handleMouseEvents||ht.setAttribute("cm-ignore-events","true"),Fh(Ue,ht,de,ce),ie.display.input.setUneditable(ht),me&&Ue.above?Le.insertBefore(ht,de.gutter||de.text):Le.appendChild(ht),Sr(Ue,"redraw")}}function Fh(ie,ae,de,ce){if(ie.noHScroll){(de.alignable||(de.alignable=[])).push(ae);var me=ce.wrapperWidth;ae.style.left=ce.fixedPos+"px",ie.coverGutter||(me-=ce.gutterTotalWidth,ae.style.paddingLeft=ce.gutterTotalWidth+"px"),ae.style.width=me+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-ce.gutterTotalWidth+"px"))}function Pu(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Lt(document.body,ie.node)){var de="position: relative;";ie.coverGutter&&(de+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(de+="width: "+ae.display.wrapper.clientWidth+"px;"),rt(ae.display.measure,Je("div",[ie.node],null,de))}return ie.height=ie.node.parentNode.offsetHeight}function zs(ie,ae){for(var de=mo(ae);de!=ie.wrapper;de=de.parentNode)if(!de||de.nodeType==1&&de.getAttribute("cm-ignore-events")=="true"||de.parentNode==ie.sizer&&de!=ie.mover)return!0}function il(ie){return ie.lineSpace.offsetTop}function kh(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function lc(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=rt(ie.measure,Je("pre","x","CodeMirror-line-like")),de=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,ce={left:parseInt(de.paddingLeft),right:parseInt(de.paddingRight)};return!isNaN(ce.left)&&!isNaN(ce.right)&&(ie.cachedPaddingH=ce),ce}function Ml(ie){return mn-ie.display.nativeBarWidth}function Eu(ie){return ie.display.scroller.clientWidth-Ml(ie)-ie.display.barWidth}function uc(ie){return ie.display.scroller.clientHeight-Ml(ie)-ie.display.barHeight}function od(ie,ae,de){var ce=ie.options.lineWrapping,me=ce&&Eu(ie);if(!ae.measure.heights||ce&&ae.measure.width!=me){var Le=ae.measure.heights=[];if(ce){ae.measure.width=me;for(var _e=ae.text.firstChild.getClientRects(),Xe=0;Xe<_e.length-1;Xe++){var Ue=_e[Xe],ht=_e[Xe+1];Math.abs(Ue.bottom-ht.bottom)>2&&Le.push((Ue.bottom+ht.top)/2-de.top)}}Le.push(de.bottom-de.top)}}function hc(ie,ae,de){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var ce=0;ce<ie.rest.length;ce++)if(ie.rest[ce]==ae)return{map:ie.measure.maps[ce],cache:ie.measure.caches[ce]};for(var me=0;me<ie.rest.length;me++)if(Rt(ie.rest[me])>de)return{map:ie.measure.maps[me],cache:ie.measure.caches[me],before:!0}}function ad(ie,ae){ae=Ra(ae);var de=Rt(ae),ce=ie.display.externalMeasured=new yh(ie.doc,ae,de);ce.lineN=de;var me=ce.built=Xt(ie,ce);return ce.text=me.pre,rt(ie.display.lineMeasure,me.pre),ce}function bc(ie,ae,de,ce){return Ru(ie,Nh(ie,ae),de,ce)}function Jl(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Gi(ie,ae)];var de=ie.display.externalMeasured;if(de&&ae>=de.lineN&&ae<de.lineN+de.size)return de}function Nh(ie,ae){var de=Rt(ae),ce=Jl(ie,de);ce&&!ce.text?ce=null:ce&&ce.changes&&(_u(ie,ce,de,la(ie)),ie.curOp.forceUpdate=!0),ce||(ce=ad(ie,ae));var me=hc(ce,ae,de);return{line:ae,view:ce,rect:null,map:me.map,cache:me.cache,before:me.before,hasHeights:!1}}function Ru(ie,ae,de,ce,me){ae.before&&(de=-1);var Le=de+(ce||""),_e;return ae.cache.hasOwnProperty(Le)?_e=ae.cache[Le]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(od(ie,ae.view,ae.rect),ae.hasHeights=!0),_e=Fs(ie,ae,de,ce),_e.bogus||(ae.cache[Le]=_e)),{left:_e.left,right:_e.right,top:me?_e.rtop:_e.top,bottom:me?_e.rbottom:_e.bottom}}var Kh={left:0,right:0,top:0,bottom:0};function Uh(ie,ae,de){for(var ce,me,Le,_e,Xe,Ue,ht=0;ht<ie.length;ht+=3)if(Xe=ie[ht],Ue=ie[ht+1],ae<Xe?(me=0,Le=1,_e="left"):ae<Ue?(me=ae-Xe,Le=me+1):(ht==ie.length-3||ae==Ue&&ie[ht+3]>ae)&&(Le=Ue-Xe,me=Le-1,ae>=Ue&&(_e="right")),me!=null){if(ce=ie[ht+2],Xe==Ue&&de==(ce.insertLeft?"left":"right")&&(_e=de),de=="left"&&me==0)for(;ht&&ie[ht-2]==ie[ht-3]&&ie[ht-1].insertLeft;)ce=ie[(ht-=3)+2],_e="left";if(de=="right"&&me==Ue-Xe)for(;ht<ie.length-3&&ie[ht+3]==ie[ht+4]&&!ie[ht+5].insertLeft;)ce=ie[(ht+=3)+2],_e="right";break}return{node:ce,start:me,end:Le,collapse:_e,coverStart:Xe,coverEnd:Ue}}function Lc(ie,ae){var de=Kh;if(ae=="left")for(var ce=0;ce<ie.length&&(de=ie[ce]).left==de.right;ce++);else for(var me=ie.length-1;me>=0&&(de=ie[me]).left==de.right;me--);return de}function Fs(ie,ae,de,ce){var me=Uh(ae.map,de,ce),Le=me.node,_e=me.start,Xe=me.end,Ue=me.collapse,ht;if(Le.nodeType==3){for(var Kt=0;Kt<4;Kt++){for(;_e&&rn(ae.line.text.charAt(me.coverStart+_e));)--_e;for(;me.coverStart+Xe<me.coverEnd&&rn(ae.line.text.charAt(me.coverStart+Xe));)++Xe;if(ft&&Be<9&&_e==0&&Xe==me.coverEnd-me.coverStart?ht=Le.parentNode.getBoundingClientRect():ht=Lc(lt(Le,_e,Xe).getClientRects(),ce),ht.left||ht.right||_e==0)break;Xe=_e,_e=_e-1,Ue="right"}ft&&Be<11&&(ht=Yh(ie.display.measure,ht))}else{_e>0&&(Ue=ce="right");var xt;ie.options.lineWrapping&&(xt=Le.getClientRects()).length>1?ht=xt[ce=="right"?xt.length-1:0]:ht=Le.getBoundingClientRect()}if(ft&&Be<9&&!_e&&(!ht||!ht.left&&!ht.right)){var yn=Le.parentNode.getClientRects()[0];yn?ht={left:yn.left,right:yn.left+Ir(ie.display),top:yn.top,bottom:yn.bottom}:ht=Kh}for(var fn=ht.top-ae.rect.top,wi=ht.bottom-ae.rect.top,Mi=(fn+wi)/2,Hi=ae.view.measure.heights,dr=0;dr<Hi.length-1&&!(Mi<Hi[dr]);dr++);var oo=dr?Hi[dr-1]:0,Dr=Hi[dr],Po={left:(Ue=="right"?ht.right:ht.left)-ae.rect.left,right:(Ue=="left"?ht.left:ht.right)-ae.rect.left,top:oo,bottom:Dr};return!ht.left&&!ht.right&&(Po.bogus=!0),ie.options.singleCursorHeightPerLine||(Po.rtop=fn,Po.rbottom=wi),Po}function Yh(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!cn(ie))return ae;var de=screen.logicalXDPI/screen.deviceXDPI,ce=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*de,right:ae.right*de,top:ae.top*ce,bottom:ae.bottom*ce}}function Mc(ie){if(ie.measure&&(ie.measure.cache={},ie.measure.heights=null,ie.rest))for(var ae=0;ae<ie.rest.length;ae++)ie.measure.caches[ae]={}}function cc(ie){ie.display.externalMeasure=null,tt(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Mc(ie.display.view[ae])}function Sh(ie){cc(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function Fl(){return it&&ne?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function hl(){return it&&ne?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function _s(ie){var ae=0;if(ie.widgets)for(var de=0;de<ie.widgets.length;++de)ie.widgets[de].above&&(ae+=Pu(ie.widgets[de]));return ae}function Qs(ie,ae,de,ce,me){if(!me){var Le=_s(ae);de.top+=Le,de.bottom+=Le}if(ce=="line")return de;ce||(ce="local");var _e=Io(ae);if(ce=="local"?_e+=il(ie.display):_e-=ie.display.viewOffset,ce=="page"||ce=="window"){var Xe=ie.display.lineSpace.getBoundingClientRect();_e+=Xe.top+(ce=="window"?0:hl());var Ue=Xe.left+(ce=="window"?0:Fl());de.left+=Ue,de.right+=Ue}return de.top+=_e,de.bottom+=_e,de}function Xh(ie,ae,de){if(de=="div")return ae;var ce=ae.left,me=ae.top;if(de=="page")ce-=Fl(),me-=hl();else if(de=="local"||!de){var Le=ie.display.sizer.getBoundingClientRect();ce+=Le.left,me+=Le.top}var _e=ie.display.lineSpace.getBoundingClientRect();return{left:ce-_e.left,top:me-_e.top}}function ys(ie,ae,de,ce,me){return ce||(ce=hn(ie.doc,ae.line)),Qs(ie,ce,bc(ie,ce,ae.ch,me),de)}function Ya(ie,ae,de,ce,me,Le){ce=ce||hn(ie.doc,ae.line),me||(me=Nh(ie,ce));function _e(wi,Mi){var Hi=Ru(ie,me,wi,Mi?"right":"left",Le);return Mi?Hi.left=Hi.right:Hi.right=Hi.left,Qs(ie,ce,Hi,de)}var Xe=$n(ce,ie.doc.direction),Ue=ae.ch,ht=ae.sticky;if(Ue>=ce.text.length?(Ue=ce.text.length,ht="before"):Ue<=0&&(Ue=0,ht="after"),!Xe)return _e(ht=="before"?Ue-1:Ue,ht=="before");function Kt(wi,Mi,Hi){var dr=Xe[Mi],oo=dr.level==1;return _e(Hi?wi-1:wi,oo!=Hi)}var xt=Zt(Xe,Ue,ht),yn=Nn,fn=Kt(Ue,xt,ht=="before");return yn!=null&&(fn.other=Kt(Ue,yn,ht!="before")),fn}function Nl(ie,ae){var de=0;ae=er(ie.doc,ae),ie.options.lineWrapping||(de=Ir(ie.display)*ae.ch);var ce=hn(ie.doc,ae.line),me=Io(ce)+il(ie.display);return{left:de,right:de,top:me,bottom:me+ce.height}}function dc(ie,ae,de,ce,me){var Le=En(ie,ae,de);return Le.xRel=me,ce&&(Le.outside=ce),Le}function Fc(ie,ae,de){var ce=ie.doc;if(de+=ie.display.viewOffset,de<0)return dc(ce.first,0,null,-1,-1);var me=Si(ce,de),Le=ce.first+ce.size-1;if(me>Le)return dc(ce.first+ce.size-1,hn(ce,Le).text.length,null,1,1);ae<0&&(ae=0);for(var _e=hn(ce,me);;){var Xe=wt(ie,_e,me,ae,de),Ue=sh(_e,Xe.ch+(Xe.xRel>0||Xe.outside>0?1:0));if(!Ue)return Xe;var ht=Ue.find(1);if(ht.line==me)return ht;_e=hn(ce,me=ht.line)}}function ct(ie,ae,de,ce){ce-=_s(ae);var me=ae.text.length,Le=Zn(function(_e){return Ru(ie,de,_e-1).bottom<=ce},me,0);return me=Zn(function(_e){return Ru(ie,de,_e).top>ce},Le,me),{begin:Le,end:me}}function Vt(ie,ae,de,ce){de||(de=Nh(ie,ae));var me=Qs(ie,ae,Ru(ie,de,ce),"line").top;return ct(ie,ae,de,me)}function Ie(ie,ae,de,ce){return ie.bottom<=de?!1:ie.top>de?!0:(ce?ie.left:ie.right)>ae}function wt(ie,ae,de,ce,me){me-=Io(ae);var Le=Nh(ie,ae),_e=_s(ae),Xe=0,Ue=ae.text.length,ht=!0,Kt=$n(ae,ie.doc.direction);if(Kt){var xt=(ie.options.lineWrapping?Ar:no)(ie,ae,de,Le,Kt,ce,me);ht=xt.level!=1,Xe=ht?xt.from:xt.to-1,Ue=ht?xt.to:xt.from-1}var yn=null,fn=null,wi=Zn(function(aa){var Br=Ru(ie,Le,aa);return Br.top+=_e,Br.bottom+=_e,Ie(Br,ce,me,!1)?(Br.top<=me&&Br.left<=ce&&(yn=aa,fn=Br),!0):!1},Xe,Ue),Mi,Hi,dr=!1;if(fn){var oo=ce-fn.left<fn.right-ce,Dr=oo==ht;wi=yn+(Dr?0:1),Hi=Dr?"after":"before",Mi=oo?fn.left:fn.right}else{!ht&&(wi==Ue||wi==Xe)&&wi++,Hi=wi==0?"after":wi==ae.text.length?"before":Ru(ie,Le,wi-(ht?1:0)).bottom+_e<=me==ht?"after":"before";var Po=Ya(ie,En(de,wi,Hi),"line",ae,Le);Mi=Po.left,dr=me<Po.top?-1:me>=Po.bottom?1:0}return wi=Kn(ae.text,wi,1),dc(de,wi,Hi,dr,ce-Mi)}function no(ie,ae,de,ce,me,Le,_e){var Xe=Zn(function(xt){var yn=me[xt],fn=yn.level!=1;return Ie(Ya(ie,En(de,fn?yn.to:yn.from,fn?"before":"after"),"line",ae,ce),Le,_e,!0)},0,me.length-1),Ue=me[Xe];if(Xe>0){var ht=Ue.level!=1,Kt=Ya(ie,En(de,ht?Ue.from:Ue.to,ht?"after":"before"),"line",ae,ce);Ie(Kt,Le,_e,!0)&&Kt.top>_e&&(Ue=me[Xe-1])}return Ue}function Ar(ie,ae,de,ce,me,Le,_e){var Xe=ct(ie,ae,ce,_e),Ue=Xe.begin,ht=Xe.end;/\s/.test(ae.text.charAt(ht-1))&&ht--;for(var Kt=null,xt=null,yn=0;yn<me.length;yn++){var fn=me[yn];if(!(fn.from>=ht||fn.to<=Ue)){var wi=fn.level!=1,Mi=Ru(ie,ce,wi?Math.min(ht,fn.to)-1:Math.max(Ue,fn.from)).right,Hi=Mi<Le?Le-Mi+1e9:Mi-Le;(!Kt||xt>Hi)&&(Kt=fn,xt=Hi)}}return Kt||(Kt=me[me.length-1]),Kt.from<Ue&&(Kt={from:Ue,to:Kt.to,level:Kt.level}),Kt.to>ht&&(Kt={from:Kt.from,to:ht,level:Kt.level}),Kt}var ko;function Tr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(ko==null){ko=Je("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)ko.appendChild(document.createTextNode("x")),ko.appendChild(Je("br"));ko.appendChild(document.createTextNode("x"))}rt(ie.measure,ko);var de=ko.offsetHeight/50;return de>3&&(ie.cachedTextHeight=de),tt(ie.measure),de||1}function Ir(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=Je("span","xxxxxxxxxx"),de=Je("pre",[ae],"CodeMirror-line-like");rt(ie.measure,de);var ce=ae.getBoundingClientRect(),me=(ce.right-ce.left)/10;return me>2&&(ie.cachedCharWidth=me),me||10}function la(ie){for(var ae=ie.display,de={},ce={},me=ae.gutters.clientLeft,Le=ae.gutters.firstChild,_e=0;Le;Le=Le.nextSibling,++_e){var Xe=ie.display.gutterSpecs[_e].className;de[Xe]=Le.offsetLeft+Le.clientLeft+me,ce[Xe]=Le.clientWidth}return{fixedPos:vo(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:de,gutterWidth:ce,wrapperWidth:ae.wrapper.clientWidth}}function vo(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function qr(ie){var ae=Tr(ie.display),de=ie.options.lineWrapping,ce=de&&Math.max(5,ie.display.scroller.clientWidth/Ir(ie.display)-3);return function(me){if(un(ie.doc,me))return 0;var Le=0;if(me.widgets)for(var _e=0;_e<me.widgets.length;_e++)me.widgets[_e].height&&(Le+=me.widgets[_e].height);return de?Le+(Math.ceil(me.text.length/ce)||1)*ae:Le+ae}}function Ki(ie){var ae=ie.doc,de=qr(ie);ae.iter(function(ce){var me=de(ce);me!=ce.height&&Ln(ce,me)})}function No(ie,ae,de,ce){var me=ie.display;if(!de&&mo(ae).getAttribute("cm-not-content")=="true")return null;var Le,_e,Xe=me.lineSpace.getBoundingClientRect();try{Le=ae.clientX-Xe.left,_e=ae.clientY-Xe.top}catch(xt){return null}var Ue=Fc(ie,Le,_e),ht;if(ce&&Ue.xRel>0&&(ht=hn(ie.doc,Ue.line).text).length==Ue.ch){var Kt=Ve(ht,ht.length,ie.options.tabSize)-ht.length;Ue=En(Ue.line,Math.max(0,Math.round((Le-lc(ie.display).left)/Ir(ie.display))-Kt))}return Ue}function Gi(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var de=ie.display.view,ce=0;ce<de.length;ce++)if(ae-=de[ce].size,ae<0)return ce}function ur(ie,ae,de,ce){ae==null&&(ae=ie.doc.first),de==null&&(de=ie.doc.first+ie.doc.size),ce||(ce=0);var me=ie.display;if(ce&&de<me.viewTo&&(me.updateLineNumbers==null||me.updateLineNumbers>ae)&&(me.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=me.viewTo)bn&&vr(ie.doc,ae)<me.viewTo&&eo(ie);else if(de<=me.viewFrom)bn&&uo(ie.doc,de+ce)>me.viewFrom?eo(ie):(me.viewFrom+=ce,me.viewTo+=ce);else if(ae<=me.viewFrom&&de>=me.viewTo)eo(ie);else if(ae<=me.viewFrom){var Le=Or(ie,de,de+ce,1);Le?(me.view=me.view.slice(Le.index),me.viewFrom=Le.lineN,me.viewTo+=ce):eo(ie)}else if(de>=me.viewTo){var _e=Or(ie,ae,ae,-1);_e?(me.view=me.view.slice(0,_e.index),me.viewTo=_e.lineN):eo(ie)}else{var Xe=Or(ie,ae,ae,-1),Ue=Or(ie,de,de+ce,1);Xe&&Ue?(me.view=me.view.slice(0,Xe.index).concat(Ka(ie,Xe.lineN,Ue.lineN)).concat(me.view.slice(Ue.index)),me.viewTo+=ce):eo(ie)}var ht=me.externalMeasured;ht&&(de<ht.lineN?ht.lineN+=ce:ae<ht.lineN+ht.size&&(me.externalMeasured=null))}function Qi(ie,ae,de){ie.curOp.viewChanged=!0;var ce=ie.display,me=ie.display.externalMeasured;if(me&&ae>=me.lineN&&ae<me.lineN+me.size&&(ce.externalMeasured=null),!(ae<ce.viewFrom||ae>=ce.viewTo)){var Le=ce.view[Gi(ie,ae)];if(Le.node!=null){var _e=Le.changes||(Le.changes=[]);Qe(_e,de)==-1&&_e.push(de)}}}function eo(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Or(ie,ae,de,ce){var me=Gi(ie,ae),Le,_e=ie.display.view;if(!bn||de==ie.doc.first+ie.doc.size)return{index:me,lineN:de};for(var Xe=ie.display.viewFrom,Ue=0;Ue<me;Ue++)Xe+=_e[Ue].size;if(Xe!=ae){if(ce>0){if(me==_e.length-1)return null;Le=Xe+_e[me].size-ae,me++}else Le=Xe-ae;ae+=Le,de+=Le}for(;vr(ie.doc,de)!=de;){if(me==(ce<0?0:_e.length-1))return null;de+=ce*_e[me-(ce<0?1:0)].size,me+=ce}return{index:me,lineN:de}}function Yr(ie,ae,de){var ce=ie.display,me=ce.view;me.length==0||ae>=ce.viewTo||de<=ce.viewFrom?(ce.view=Ka(ie,ae,de),ce.viewFrom=ae):(ce.viewFrom>ae?ce.view=Ka(ie,ae,ce.viewFrom).concat(ce.view):ce.viewFrom<ae&&(ce.view=ce.view.slice(Gi(ie,ae))),ce.viewFrom=ae,ce.viewTo<de?ce.view=ce.view.concat(Ka(ie,ce.viewTo,de)):ce.viewTo>de&&(ce.view=ce.view.slice(0,Gi(ie,de)))),ce.viewTo=de}function Eo(ie){for(var ae=ie.display.view,de=0,ce=0;ce<ae.length;ce++){var me=ae[ce];!me.hidden&&(!me.node||me.changes)&&++de}return de}function Vi(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function Hr(ie,ae){ae===void 0&&(ae=!0);for(var de=ie.doc,ce={},me=ce.cursors=document.createDocumentFragment(),Le=ce.selection=document.createDocumentFragment(),_e=0;_e<de.sel.ranges.length;_e++)if(!(!ae&&_e==de.sel.primIndex)){var Xe=de.sel.ranges[_e];if(!(Xe.from().line>=ie.display.viewTo||Xe.to().line<ie.display.viewFrom)){var Ue=Xe.empty();(Ue||ie.options.showCursorWhenSelecting)&&xi(ie,Xe.head,me),Ue||Er(ie,Xe,Le)}}return ce}function xi(ie,ae,de){var ce=Ya(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),me=de.appendChild(Je("div","\xA0","CodeMirror-cursor"));if(me.style.left=ce.left+"px",me.style.top=ce.top+"px",me.style.height=Math.max(0,ce.bottom-ce.top)*ie.options.cursorHeight+"px",ce.other){var Le=de.appendChild(Je("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Le.style.display="",Le.style.left=ce.other.left+"px",Le.style.top=ce.other.top+"px",Le.style.height=(ce.other.bottom-ce.other.top)*.85+"px"}}function tr(ie,ae){return ie.top-ae.top||ie.left-ae.left}function Er(ie,ae,de){var ce=ie.display,me=ie.doc,Le=document.createDocumentFragment(),_e=lc(ie.display),Xe=_e.left,Ue=Math.max(ce.sizerWidth,Eu(ie)-ce.sizer.offsetLeft)-_e.right,ht=me.direction=="ltr";function Kt(Dr,Po,aa,Br){Po<0&&(Po=0),Po=Math.round(Po),Br=Math.round(Br),Le.appendChild(Je("div",null,"CodeMirror-selected","position: absolute; left: "+Dr+`px;
|
|
top: `+Po+"px; width: "+(aa==null?Ue-Dr:aa)+`px;
|
|
height: `+(Br-Po)+"px"))}function xt(Dr,Po,aa){var Br=hn(me,Dr),Aa=Br.text.length,Ys,Kl;function sl(Il,uh){return ys(ie,En(Dr,Il),"div",Br,uh)}function th(Il,uh,fu){var Rl=Vt(ie,Br,null,Il),hs=uh=="ltr"==(fu=="after")?"left":"right",fl=fu=="after"?Rl.begin:Rl.end-(/\s/.test(Br.text.charAt(Rl.end-1))?2:1);return sl(fl,hs)[hs]}var ku=$n(Br,me.direction);return $t(ku,Po||0,aa==null?Aa:aa,function(Il,uh,fu,Rl){var hs=fu=="ltr",fl=sl(Il,hs?"left":"right"),ql=sl(uh-1,hs?"right":"left"),gu=Po==null&&Il==0,Qh=aa==null&&uh==Aa,ll=Rl==0,Th=!ku||Rl==ku.length-1;if(ql.top-fl.top<=3){var Pl=(ht?gu:Qh)&&ll,jf=(ht?Qh:gu)&&Th,xh=Pl?Xe:(hs?fl:ql).left,hh=jf?Ue:(hs?ql:fl).right;Kt(xh,fl.top,hh-xh,fl.bottom)}else{var nh,Bs,eu,kc;hs?(nh=ht&&gu&&ll?Xe:fl.left,Bs=ht?Ue:th(Il,fu,"before"),eu=ht?Xe:th(uh,fu,"after"),kc=ht&&Qh&&Th?Ue:ql.right):(nh=ht?th(Il,fu,"before"):Xe,Bs=!ht&&gu&&ll?Ue:fl.right,eu=!ht&&Qh&&Th?Xe:ql.left,kc=ht?th(uh,fu,"after"):Ue),Kt(nh,fl.top,Bs-nh,fl.bottom),fl.bottom<ql.top&&Kt(Xe,fl.bottom,null,ql.top),Kt(eu,ql.top,kc-eu,ql.bottom)}(!Ys||tr(fl,Ys)<0)&&(Ys=fl),tr(ql,Ys)<0&&(Ys=ql),(!Kl||tr(fl,Kl)<0)&&(Kl=fl),tr(ql,Kl)<0&&(Kl=ql)}),{start:Ys,end:Kl}}var yn=ae.from(),fn=ae.to();if(yn.line==fn.line)xt(yn.line,yn.ch,fn.ch);else{var wi=hn(me,yn.line),Mi=hn(me,fn.line),Hi=Ra(wi)==Ra(Mi),dr=xt(yn.line,yn.ch,Hi?wi.text.length+1:null).end,oo=xt(fn.line,Hi?0:null,fn.ch).start;Hi&&(dr.top<oo.top-2?(Kt(dr.right,dr.top,null,dr.bottom),Kt(Xe,oo.top,oo.left,oo.bottom)):Kt(dr.right,dr.top,oo.left-dr.right,dr.bottom)),dr.bottom<oo.top&&Kt(Xe,dr.bottom,null,oo.top)}de.appendChild(Le)}function Ao(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var de=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Vs(ie),ae.cursorDiv.style.visibility=(de=!de)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function Ho(ie){ie.state.focused||(ie.display.input.focus(),qi(ie))}function Pa(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Vs(ie))},100)}function qi(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Li(ie,"focus",ie,ae),ie.state.focused=!0,pt(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),He&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),Ao(ie))}function Vs(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(Li(ie,"blur",ie,ae),ie.state.focused=!1,Re(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function kr(ie){for(var ae=ie.display,de=ae.lineDiv.offsetTop,ce=0;ce<ae.view.length;ce++){var me=ae.view[ce],Le=ie.options.lineWrapping,_e=void 0,Xe=0;if(!me.hidden){if(ft&&Be<8){var Ue=me.node.offsetTop+me.node.offsetHeight;_e=Ue-de,de=Ue}else{var ht=me.node.getBoundingClientRect();_e=ht.bottom-ht.top,!Le&&me.text.firstChild&&(Xe=me.text.firstChild.getBoundingClientRect().right-ht.left-1)}var Kt=me.line.height-_e;if((Kt>.005||Kt<-.005)&&(Ln(me.line,_e),Ro(me.line),me.rest))for(var xt=0;xt<me.rest.length;xt++)Ro(me.rest[xt]);if(Xe>ie.display.sizerWidth){var yn=Math.ceil(Xe/Ir(ie.display));yn>ie.display.maxLineLength&&(ie.display.maxLineLength=yn,ie.display.maxLine=me.line,ie.display.maxLineChanged=!0)}}}}function Ro(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var de=ie.widgets[ae],ce=de.node.parentNode;ce&&(de.height=ce.offsetHeight)}}function Xr(ie,ae,de){var ce=de&&de.top!=null?Math.max(0,de.top):ie.scroller.scrollTop;ce=Math.floor(ce-il(ie));var me=de&&de.bottom!=null?de.bottom:ce+ie.wrapper.clientHeight,Le=Si(ae,ce),_e=Si(ae,me);if(de&&de.ensure){var Xe=de.ensure.from.line,Ue=de.ensure.to.line;Xe<Le?(Le=Xe,_e=Si(ae,Io(hn(ae,Xe))+ie.wrapper.clientHeight)):Math.min(Ue,ae.lastLine())>=_e&&(Le=Si(ae,Io(hn(ae,Ue))-ie.wrapper.clientHeight),_e=Ue)}return{from:Le,to:Math.max(_e,Le+1)}}function ds(ie,ae){if(!Ai(ie,"scrollCursorIntoView")){var de=ie.display,ce=de.sizer.getBoundingClientRect(),me=null;if(ae.top+ce.top<0?me=!0:ae.bottom+ce.top>(window.innerHeight||document.documentElement.clientHeight)&&(me=!1),me!=null&&!Bt){var Le=Je("div","\u200B",null,`position: absolute;
|
|
top: `+(ae.top-de.viewOffset-il(ie.display))+`px;
|
|
height: `+(ae.bottom-ae.top+Ml(ie)+de.barHeight)+`px;
|
|
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Le),Le.scrollIntoView(me),ie.display.lineSpace.removeChild(Le)}}}function Fa(ie,ae,de,ce){ce==null&&(ce=0);var me;!ie.options.lineWrapping&&ae==de&&(ae=ae.ch?En(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,de=ae.sticky=="before"?En(ae.line,ae.ch+1,"before"):ae);for(var Le=0;Le<5;Le++){var _e=!1,Xe=Ya(ie,ae),Ue=!de||de==ae?Xe:Ya(ie,de);me={left:Math.min(Xe.left,Ue.left),top:Math.min(Xe.top,Ue.top)-ce,right:Math.max(Xe.left,Ue.left),bottom:Math.max(Xe.bottom,Ue.bottom)+ce};var ht=Xu(ie,me),Kt=ie.doc.scrollTop,xt=ie.doc.scrollLeft;if(ht.scrollTop!=null&&(dt(ie,ht.scrollTop),Math.abs(ie.doc.scrollTop-Kt)>1&&(_e=!0)),ht.scrollLeft!=null&&(Pt(ie,ht.scrollLeft),Math.abs(ie.doc.scrollLeft-xt)>1&&(_e=!0)),!_e)break}return me}function Gs(ie,ae){var de=Xu(ie,ae);de.scrollTop!=null&&dt(ie,de.scrollTop),de.scrollLeft!=null&&Pt(ie,de.scrollLeft)}function Xu(ie,ae){var de=ie.display,ce=Tr(ie.display);ae.top<0&&(ae.top=0);var me=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:de.scroller.scrollTop,Le=uc(ie),_e={};ae.bottom-ae.top>Le&&(ae.bottom=ae.top+Le);var Xe=ie.doc.height+kh(de),Ue=ae.top<ce,ht=ae.bottom>Xe-ce;if(ae.top<me)_e.scrollTop=Ue?0:ae.top;else if(ae.bottom>me+Le){var Kt=Math.min(ae.top,(ht?Xe:ae.bottom)-Le);Kt!=me&&(_e.scrollTop=Kt)}var xt=ie.options.fixedGutter?0:de.gutters.offsetWidth,yn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:de.scroller.scrollLeft-xt,fn=Eu(ie)-de.gutters.offsetWidth,wi=ae.right-ae.left>fn;return wi&&(ae.right=ae.left+fn),ae.left<10?_e.scrollLeft=0:ae.left<yn?_e.scrollLeft=Math.max(0,ae.left+xt-(wi?0:10)):ae.right>fn+yn-3&&(_e.scrollLeft=ae.right+(wi?0:10)-fn),_e}function Ah(ie,ae){ae!=null&&(cl(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function Cu(ie){cl(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function ju(ie,ae,de){(ae!=null||de!=null)&&cl(ie),ae!=null&&(ie.curOp.scrollLeft=ae),de!=null&&(ie.curOp.scrollTop=de)}function gr(ie,ae){cl(ie),ie.curOp.scrollToPos=ae}function cl(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var de=Nl(ie,ae.from),ce=Nl(ie,ae.to);We(ie,de,ce,ae.margin)}}function We(ie,ae,de,ce){var me=Xu(ie,{left:Math.min(ae.left,de.left),top:Math.min(ae.top,de.top)-ce,right:Math.max(ae.right,de.right),bottom:Math.max(ae.bottom,de.bottom)+ce});ju(ie,me.scrollLeft,me.scrollTop)}function dt(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(fe||br(ie,{top:ae}),yt(ie,ae,!0),fe&&br(ie),Cr(ie,100))}function yt(ie,ae,de){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!de)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function Pt(ie,ae,de,ce){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((de?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!ce)&&(ie.doc.scrollLeft=ae,et(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function Ht(ie){var ae=ie.display,de=ae.gutters.offsetWidth,ce=Math.round(ie.doc.height+kh(ie.display));return{clientHeight:ae.scroller.clientHeight,viewHeight:ae.wrapper.clientHeight,scrollWidth:ae.scroller.scrollWidth,clientWidth:ae.scroller.clientWidth,viewWidth:ae.wrapper.clientWidth,barLeft:ie.options.fixedGutter?de:0,docHeight:ce,scrollHeight:ce+Ml(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:de}}var Qt=function(ie,ae,de){this.cm=de;var ce=this.vert=Je("div",[Je("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),me=this.horiz=Je("div",[Je("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ce.tabIndex=me.tabIndex=-1,ie(ce),ie(me),ri(ce,"scroll",function(){ce.clientHeight&&ae(ce.scrollTop,"vertical")}),ri(me,"scroll",function(){me.clientWidth&&ae(me.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,ft&&Be<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Qt.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,de=ie.scrollHeight>ie.clientHeight+1,ce=ie.nativeBarWidth;if(de){this.vert.style.display="block",this.vert.style.bottom=ae?ce+"px":"0";var me=ie.viewHeight-(ae?ce:0);this.vert.firstChild.style.height=Math.max(0,ie.scrollHeight-ie.clientHeight+me)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(ae){this.horiz.style.display="block",this.horiz.style.right=de?ce+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Le=ie.viewWidth-ie.barLeft-(de?ce:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Le)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(ce==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:de?ce:0,bottom:ae?ce:0}},Qt.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Qt.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Qt.prototype.zeroWidthHack=function(){var ie=ue&&!Nt?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ze,this.disableVert=new Ze},Qt.prototype.enableZeroWidthBar=function(ie,ae,de){ie.style.pointerEvents="auto";function ce(){var me=ie.getBoundingClientRect(),Le=de=="vert"?document.elementFromPoint(me.right-1,(me.top+me.bottom)/2):document.elementFromPoint((me.right+me.left)/2,me.bottom-1);Le!=ie?ie.style.pointerEvents="none":ae.set(1e3,ce)}ae.set(1e3,ce)},Qt.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var nn=function(){};nn.prototype.update=function(){return{bottom:0,right:0}},nn.prototype.setScrollLeft=function(){},nn.prototype.setScrollTop=function(){},nn.prototype.clear=function(){};function wn(ie,ae){ae||(ae=Ht(ie));var de=ie.display.barWidth,ce=ie.display.barHeight;Un(ie,ae);for(var me=0;me<4&&de!=ie.display.barWidth||ce!=ie.display.barHeight;me++)de!=ie.display.barWidth&&ie.options.lineWrapping&&kr(ie),Un(ie,Ht(ie)),de=ie.display.barWidth,ce=ie.display.barHeight}function Un(ie,ae){var de=ie.display,ce=de.scrollbars.update(ae);de.sizer.style.paddingRight=(de.barWidth=ce.right)+"px",de.sizer.style.paddingBottom=(de.barHeight=ce.bottom)+"px",de.heightForcer.style.borderBottom=ce.bottom+"px solid transparent",ce.right&&ce.bottom?(de.scrollbarFiller.style.display="block",de.scrollbarFiller.style.height=ce.bottom+"px",de.scrollbarFiller.style.width=ce.right+"px"):de.scrollbarFiller.style.display="",ce.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(de.gutterFiller.style.display="block",de.gutterFiller.style.height=ce.bottom+"px",de.gutterFiller.style.width=ae.gutterWidth+"px"):de.gutterFiller.style.display=""}var An={native:Qt,null:nn};function Pi(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&Re(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new An[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),ri(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,de){de=="horizontal"?Pt(ie,ae):dt(ie,ae)},ie),ie.display.scrollbars.addClass&&pt(ie.display.wrapper,ie.display.scrollbars.addClass)}var zn=0;function di(ie){ie.curOp={cm:ie,viewChanged:!1,startHeight:ie.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:++zn},Bo(ie.curOp)}function ei(ie){var ae=ie.curOp;ae&&Ua(ae,function(de){for(var ce=0;ce<de.ops.length;ce++)de.ops[ce].cm.curOp=null;Bi(de)})}function Bi(ie){for(var ae=ie.ops,de=0;de<ae.length;de++)Xi(ae[de]);for(var ce=0;ce<ae.length;ce++)yr(ae[ce]);for(var me=0;me<ae.length;me++)Jr(ae[me]);for(var Le=0;Le<ae.length;Le++)Tt(ae[Le]);for(var _e=0;_e<ae.length;_e++)Dn(ae[_e])}function Xi(ie){var ae=ie.cm,de=ae.display;ua(ae),ie.updateMaxLine&&Ta(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<de.viewFrom||ie.scrollToPos.to.line>=de.viewTo)||de.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new rr(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function yr(ie){ie.updatedDisplay=ie.mustUpdate&&So(ie.cm,ie.update)}function Jr(ie){var ae=ie.cm,de=ae.display;ie.updatedDisplay&&kr(ae),ie.barMeasure=Ht(ae),de.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=bc(ae,de.maxLine,de.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(de.scroller.clientWidth,de.sizer.offsetLeft+ie.adjustWidthTo+Ml(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,de.sizer.offsetLeft+ie.adjustWidthTo-Eu(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=de.input.prepareSelection())}function Tt(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&Pt(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var de=ie.focus&&ie.focus==Mt();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,de),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&wn(ae,ie.barMeasure),ie.updatedDisplay&&Te(ae,ie.barMeasure),ie.selectionChanged&&Ao(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),de&&Ho(ie.cm)}function Dn(ie){var ae=ie.cm,de=ae.display,ce=ae.doc;if(ie.updatedDisplay&&Hn(ae,ie.update),de.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(de.wheelStartX=de.wheelStartY=null),ie.scrollTop!=null&&yt(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&Pt(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var me=Fa(ae,er(ce,ie.scrollToPos.from),er(ce,ie.scrollToPos.to),ie.scrollToPos.margin);ds(ae,me)}var Le=ie.maybeHiddenMarkers,_e=ie.maybeUnhiddenMarkers;if(Le)for(var Xe=0;Xe<Le.length;++Xe)Le[Xe].lines.length||Li(Le[Xe],"hide");if(_e)for(var Ue=0;Ue<_e.length;++Ue)_e[Ue].lines.length&&Li(_e[Ue],"unhide");de.wrapper.offsetHeight&&(ce.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&Li(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function ii(ie,ae){if(ie.curOp)return ae();di(ie);try{return ae()}finally{ei(ie)}}function fi(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);di(ie);try{return ae.apply(ie,arguments)}finally{ei(ie)}}}function Bn(ie){return function(){if(this.curOp)return ie.apply(this,arguments);di(this);try{return ie.apply(this,arguments)}finally{ei(this)}}}function Oi(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);di(ae);try{return ie.apply(this,arguments)}finally{ei(ae)}}}function Cr(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,vn(pr,ie))}function pr(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var de=+new Date+ie.options.workTime,ce=$a(ie,ae.highlightFrontier),me=[];ae.iter(ce.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Le){if(ce.line>=ie.display.viewFrom){var _e=Le.styles,Xe=Le.text.length>ie.options.maxHighlightLength?ci(ae.mode,ce.state):null,Ue=ml(ie,Le,ce,!0);Xe&&(ce.state=Xe),Le.styles=Ue.styles;var ht=Le.styleClasses,Kt=Ue.classes;Kt?Le.styleClasses=Kt:ht&&(Le.styleClasses=null);for(var xt=!_e||_e.length!=Le.styles.length||ht!=Kt&&(!ht||!Kt||ht.bgClass!=Kt.bgClass||ht.textClass!=Kt.textClass),yn=0;!xt&&yn<_e.length;++yn)xt=_e[yn]!=Le.styles[yn];xt&&me.push(ce.line),Le.stateAfter=ce.save(),ce.nextLine()}else Le.text.length<=ie.options.maxHighlightLength&&Wt(ie,Le.text,ce),Le.stateAfter=ce.line%5==0?ce.save():null,ce.nextLine();if(+new Date>de)return Cr(ie,ie.options.workDelay),!0}),ae.highlightFrontier=ce.line,ae.modeFrontier=Math.max(ae.modeFrontier,ce.line),me.length&&ii(ie,function(){for(var Le=0;Le<me.length;Le++)Qi(ie,me[Le],"text")})}}var rr=function(ie,ae,de){var ce=ie.display;this.viewport=ae,this.visible=Xr(ce,ie.doc,ae),this.editorIsHidden=!ce.wrapper.offsetWidth,this.wrapperHeight=ce.wrapper.clientHeight,this.wrapperWidth=ce.wrapper.clientWidth,this.oldDisplayWidth=Eu(ie),this.force=de,this.dims=la(ie),this.events=[]};rr.prototype.signal=function(ie,ae){Yn(ie,ae)&&this.events.push(arguments)},rr.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)Li.apply(null,this.events[ie])};function ua(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Ml(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Ml(ie)+"px",ae.scrollbarsClipped=!0)}function Qr(ie){if(ie.hasFocus())return null;var ae=Mt();if(!ae||!Lt(ie.display.lineDiv,ae))return null;var de={activeElt:ae};if(window.getSelection){var ce=window.getSelection();ce.anchorNode&&ce.extend&&Lt(ie.display.lineDiv,ce.anchorNode)&&(de.anchorNode=ce.anchorNode,de.anchorOffset=ce.anchorOffset,de.focusNode=ce.focusNode,de.focusOffset=ce.focusOffset)}return de}function io(ie){if(!(!ie||!ie.activeElt||ie.activeElt==Mt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Lt(document.body,ie.anchorNode)&&Lt(document.body,ie.focusNode))){var ae=window.getSelection(),de=document.createRange();de.setEnd(ie.anchorNode,ie.anchorOffset),de.collapse(!1),ae.removeAllRanges(),ae.addRange(de),ae.extend(ie.focusNode,ie.focusOffset)}}function So(ie,ae){var de=ie.display,ce=ie.doc;if(ae.editorIsHidden)return eo(ie),!1;if(!ae.force&&ae.visible.from>=de.viewFrom&&ae.visible.to<=de.viewTo&&(de.updateLineNumbers==null||de.updateLineNumbers>=de.viewTo)&&de.renderedView==de.view&&Eo(ie)==0)return!1;at(ie)&&(eo(ie),ae.dims=la(ie));var me=ce.first+ce.size,Le=Math.max(ae.visible.from-ie.options.viewportMargin,ce.first),_e=Math.min(me,ae.visible.to+ie.options.viewportMargin);de.viewFrom<Le&&Le-de.viewFrom<20&&(Le=Math.max(ce.first,de.viewFrom)),de.viewTo>_e&&de.viewTo-_e<20&&(_e=Math.min(me,de.viewTo)),bn&&(Le=vr(ie.doc,Le),_e=uo(ie.doc,_e));var Xe=Le!=de.viewFrom||_e!=de.viewTo||de.lastWrapHeight!=ae.wrapperHeight||de.lastWrapWidth!=ae.wrapperWidth;Yr(ie,Le,_e),de.viewOffset=Io(hn(ie.doc,de.viewFrom)),ie.display.mover.style.top=de.viewOffset+"px";var Ue=Eo(ie);if(!Xe&&Ue==0&&!ae.force&&de.renderedView==de.view&&(de.updateLineNumbers==null||de.updateLineNumbers>=de.viewTo))return!1;var ht=Qr(ie);return Ue>4&&(de.lineDiv.style.display="none"),ho(ie,de.updateLineNumbers,ae.dims),Ue>4&&(de.lineDiv.style.display=""),de.renderedView=de.view,io(ht),tt(de.cursorDiv),tt(de.selectionDiv),de.gutters.style.height=de.sizer.style.minHeight=0,Xe&&(de.lastWrapHeight=ae.wrapperHeight,de.lastWrapWidth=ae.wrapperWidth,Cr(ie,400)),de.updateLineNumbers=null,!0}function Hn(ie,ae){for(var de=ae.viewport,ce=!0;;ce=!1){if(!ce||!ie.options.lineWrapping||ae.oldDisplayWidth==Eu(ie)){if(de&&de.top!=null&&(de={top:Math.min(ie.doc.height+kh(ie.display)-uc(ie),de.top)}),ae.visible=Xr(ie.display,ie.doc,de),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else ce&&(ae.visible=Xr(ie.display,ie.doc,de));if(!So(ie,ae))break;kr(ie);var me=Ht(ie);Vi(ie),wn(ie,me),Te(ie,me),ae.force=!1}ae.signal(ie,"update",ie),(ie.display.viewFrom!=ie.display.reportedViewFrom||ie.display.viewTo!=ie.display.reportedViewTo)&&(ae.signal(ie,"viewportChange",ie,ie.display.viewFrom,ie.display.viewTo),ie.display.reportedViewFrom=ie.display.viewFrom,ie.display.reportedViewTo=ie.display.viewTo)}function br(ie,ae){var de=new rr(ie,ae);if(So(ie,de)){kr(ie),Hn(ie,de);var ce=Ht(ie);Vi(ie),wn(ie,ce),Te(ie,ce),de.finish()}}function ho(ie,ae,de){var ce=ie.display,me=ie.options.lineNumbers,Le=ce.lineDiv,_e=Le.firstChild;function Xe(wi){var Mi=wi.nextSibling;return He&&ue&&ie.display.currentWheelTarget==wi?wi.style.display="none":wi.parentNode.removeChild(wi),Mi}for(var Ue=ce.view,ht=ce.viewFrom,Kt=0;Kt<Ue.length;Kt++){var xt=Ue[Kt];if(!xt.hidden)if(!xt.node||xt.node.parentNode!=Le){var yn=sc(ie,xt,ht,de);Le.insertBefore(yn,_e)}else{for(;_e!=xt.node;)_e=Xe(_e);var fn=me&&ae!=null&&ae<=ht&&xt.lineNumber;xt.changes&&(Qe(xt.changes,"gutter")>-1&&(fn=!1),_u(ie,xt,ht,de)),fn&&(tt(xt.lineNumber),xt.lineNumber.appendChild(document.createTextNode(Wr(ie.options,ht)))),_e=xt.node.nextSibling}ht+=xt.size}for(;_e;)_e=Xe(_e)}function ke(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Te(ie,ae){ie.display.sizer.style.minHeight=ae.docHeight+"px",ie.display.heightForcer.style.top=ae.docHeight+"px",ie.display.gutters.style.height=ae.docHeight+ie.display.barHeight+Ml(ie)+"px"}function et(ie){var ae=ie.display,de=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var ce=vo(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,me=ae.gutters.offsetWidth,Le=ce+"px",_e=0;_e<de.length;_e++)if(!de[_e].hidden){ie.options.fixedGutter&&(de[_e].gutter&&(de[_e].gutter.style.left=Le),de[_e].gutterBackground&&(de[_e].gutterBackground.style.left=Le));var Xe=de[_e].alignable;if(Xe)for(var Ue=0;Ue<Xe.length;Ue++)Xe[Ue].style.left=Le}ie.options.fixedGutter&&(ae.gutters.style.left=ce+me+"px")}}function at(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,de=Wr(ie.options,ae.first+ae.size-1),ce=ie.display;if(de.length!=ce.lineNumChars){var me=ce.measure.appendChild(Je("div",[Je("div",de)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Le=me.firstChild.offsetWidth,_e=me.offsetWidth-Le;return ce.lineGutter.style.width="",ce.lineNumInnerWidth=Math.max(Le,ce.lineGutter.offsetWidth-_e)+1,ce.lineNumWidth=ce.lineNumInnerWidth+_e,ce.lineNumChars=ce.lineNumInnerWidth?de.length:-1,ce.lineGutter.style.width=ce.lineNumWidth+"px",ke(ie.display),!0}return!1}function jt(ie,ae){for(var de=[],ce=!1,me=0;me<ie.length;me++){var Le=ie[me],_e=null;if(typeof Le!="string"&&(_e=Le.style,Le=Le.className),Le=="CodeMirror-linenumbers")if(ae)ce=!0;else continue;de.push({className:Le,style:_e})}return ae&&!ce&&de.push({className:"CodeMirror-linenumbers",style:null}),de}function qt(ie){var ae=ie.gutters,de=ie.gutterSpecs;tt(ae),ie.lineGutter=null;for(var ce=0;ce<de.length;++ce){var me=de[ce],Le=me.className,_e=me.style,Xe=ae.appendChild(Je("div",null,"CodeMirror-gutter "+Le));_e&&(Xe.style.cssText=_e),Le=="CodeMirror-linenumbers"&&(ie.lineGutter=Xe,Xe.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=de.length?"":"none",ke(ie)}function gn(ie){qt(ie.display),ur(ie),et(ie)}function Vn(ie,ae,de,ce){var me=this;this.input=de,me.scrollbarFiller=Je("div",null,"CodeMirror-scrollbar-filler"),me.scrollbarFiller.setAttribute("cm-not-content","true"),me.gutterFiller=Je("div",null,"CodeMirror-gutter-filler"),me.gutterFiller.setAttribute("cm-not-content","true"),me.lineDiv=bt("div",null,"CodeMirror-code"),me.selectionDiv=Je("div",null,null,"position: relative; z-index: 1"),me.cursorDiv=Je("div",null,"CodeMirror-cursors"),me.measure=Je("div",null,"CodeMirror-measure"),me.lineMeasure=Je("div",null,"CodeMirror-measure"),me.lineSpace=bt("div",[me.measure,me.lineMeasure,me.selectionDiv,me.cursorDiv,me.lineDiv],null,"position: relative; outline: none");var Le=bt("div",[me.lineSpace],"CodeMirror-lines");me.mover=Je("div",[Le],null,"position: relative"),me.sizer=Je("div",[me.mover],"CodeMirror-sizer"),me.sizerWidth=null,me.heightForcer=Je("div",null,null,"position: absolute; height: "+mn+"px; width: 1px;"),me.gutters=Je("div",null,"CodeMirror-gutters"),me.lineGutter=null,me.scroller=Je("div",[me.sizer,me.heightForcer,me.gutters],"CodeMirror-scroll"),me.scroller.setAttribute("tabIndex","-1"),me.wrapper=Je("div",[me.scrollbarFiller,me.gutterFiller,me.scroller],"CodeMirror"),ft&&Be<8&&(me.gutters.style.zIndex=-1,me.scroller.style.paddingRight=0),!He&&!(fe&&te)&&(me.scroller.draggable=!0),ie&&(ie.appendChild?ie.appendChild(me.wrapper):ie(me.wrapper)),me.viewFrom=me.viewTo=ae.first,me.reportedViewFrom=me.reportedViewTo=ae.first,me.view=[],me.renderedView=null,me.externalMeasured=null,me.viewOffset=0,me.lastWrapHeight=me.lastWrapWidth=0,me.updateLineNumbers=null,me.nativeBarWidth=me.barHeight=me.barWidth=0,me.scrollbarsClipped=!1,me.lineNumWidth=me.lineNumInnerWidth=me.lineNumChars=null,me.alignWidgets=!1,me.cachedCharWidth=me.cachedTextHeight=me.cachedPaddingH=null,me.maxLine=null,me.maxLineLength=0,me.maxLineChanged=!1,me.wheelDX=me.wheelDY=me.wheelStartX=me.wheelStartY=null,me.shift=!1,me.selForContextMenu=null,me.activeTouch=null,me.gutterSpecs=jt(ce.gutters,ce.lineNumbers),qt(me),de.init(me)}var Qn=0,Gn=null;ft?Gn=-.53:fe?Gn=15:it?Gn=-.7:Ft&&(Gn=-1/3);function gi(ie){var ae=ie.wheelDeltaX,de=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),de==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?de=ie.detail:de==null&&(de=ie.wheelDelta),{x:ae,y:de}}function yi(ie){var ae=gi(ie);return ae.x*=Gn,ae.y*=Gn,ae}function _i(ie,ae){var de=gi(ae),ce=de.x,me=de.y,Le=ie.display,_e=Le.scroller,Xe=_e.scrollWidth>_e.clientWidth,Ue=_e.scrollHeight>_e.clientHeight;if(ce&&Xe||me&&Ue){if(me&&ue&&He){e:for(var ht=ae.target,Kt=Le.view;ht!=_e;ht=ht.parentNode)for(var xt=0;xt<Kt.length;xt++)if(Kt[xt].node==ht){ie.display.currentWheelTarget=ht;break e}}if(ce&&!fe&&!st&&Gn!=null){me&&Ue&&dt(ie,Math.max(0,_e.scrollTop+me*Gn)),Pt(ie,Math.max(0,_e.scrollLeft+ce*Gn)),(!me||me&&Ue)&&sr(ae),Le.wheelStartX=null;return}if(me&&Gn!=null){var yn=me*Gn,fn=ie.doc.scrollTop,wi=fn+Le.wrapper.clientHeight;yn<0?fn=Math.max(0,fn+yn-50):wi=Math.min(ie.doc.height,wi+yn+50),br(ie,{top:fn,bottom:wi})}Qn<20&&(Le.wheelStartX==null?(Le.wheelStartX=_e.scrollLeft,Le.wheelStartY=_e.scrollTop,Le.wheelDX=ce,Le.wheelDY=me,setTimeout(function(){if(Le.wheelStartX!=null){var Mi=_e.scrollLeft-Le.wheelStartX,Hi=_e.scrollTop-Le.wheelStartY,dr=Hi&&Le.wheelDY&&Hi/Le.wheelDY||Mi&&Le.wheelDX&&Mi/Le.wheelDX;Le.wheelStartX=Le.wheelStartY=null,dr&&(Gn=(Gn*Qn+dr)/(Qn+1),++Qn)}},200)):(Le.wheelDX+=ce,Le.wheelDY+=me))}}var mi=function(ie,ae){this.ranges=ie,this.primIndex=ae};mi.prototype.primary=function(){return this.ranges[this.primIndex]},mi.prototype.equals=function(ie){if(ie==this)return!0;if(ie.primIndex!=this.primIndex||ie.ranges.length!=this.ranges.length)return!1;for(var ae=0;ae<this.ranges.length;ae++){var de=this.ranges[ae],ce=ie.ranges[ae];if(!bo(de.anchor,ce.anchor)||!bo(de.head,ce.head))return!1}return!0},mi.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new ui(La(this.ranges[ae].anchor),La(this.ranges[ae].head));return new mi(ie,this.primIndex)},mi.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},mi.prototype.contains=function(ie,ae){ae||(ae=ie);for(var de=0;de<this.ranges.length;de++){var ce=this.ranges[de];if(li(ae,ce.from())>=0&&li(ie,ce.to())<=0)return de}return-1};var ui=function(ie,ae){this.anchor=ie,this.head=ae};ui.prototype.from=function(){return Yi(this.anchor,this.head)},ui.prototype.to=function(){return sa(this.anchor,this.head)},ui.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function Fi(ie,ae,de){var ce=ie&&ie.options.selectionsMayTouch,me=ae[de];ae.sort(function(yn,fn){return li(yn.from(),fn.from())}),de=Qe(ae,me);for(var Le=1;Le<ae.length;Le++){var _e=ae[Le],Xe=ae[Le-1],Ue=li(Xe.to(),_e.from());if(ce&&!_e.empty()?Ue>0:Ue>=0){var ht=Yi(Xe.from(),_e.from()),Kt=sa(Xe.to(),_e.to()),xt=Xe.empty()?_e.from()==_e.head:Xe.from()==Xe.head;Le<=de&&--de,ae.splice(--Le,2,new ui(xt?Kt:ht,xt?ht:Kt))}}return new mi(ae,de)}function ji(ie,ae){return new mi([new ui(ie,ae||ie)],0)}function Rr(ie){return ie.text?En(ie.from.line+ie.text.length-1,Et(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function ao(ie,ae){if(li(ie,ae.from)<0)return ie;if(li(ie,ae.to)<=0)return Rr(ae);var de=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,ce=ie.ch;return ie.line==ae.to.line&&(ce+=Rr(ae).ch-ae.to.ch),En(de,ce)}function Fr(ie,ae){for(var de=[],ce=0;ce<ie.sel.ranges.length;ce++){var me=ie.sel.ranges[ce];de.push(new ui(ao(me.anchor,ae),ao(me.head,ae)))}return Fi(ie.cm,de,ie.sel.primIndex)}function jr(ie,ae,de){return ie.line==ae.line?En(de.line,ie.ch-ae.ch+de.ch):En(de.line+(ie.line-ae.line),ie.ch)}function To(ie,ae,de){for(var ce=[],me=En(ie.first,0),Le=me,_e=0;_e<ae.length;_e++){var Xe=ae[_e],Ue=jr(Xe.from,me,Le),ht=jr(Rr(Xe),me,Le);if(me=Xe.to,Le=ht,de=="around"){var Kt=ie.sel.ranges[_e],xt=li(Kt.head,Kt.anchor)<0;ce[_e]=new ui(xt?ht:Ue,xt?Ue:ht)}else ce[_e]=new ui(Ue,Ue)}return new mi(ce,ie.sel.primIndex)}function bi(ie){ie.doc.mode=_t(ie.options,ie.doc.modeOption),Kr(ie)}function Kr(ie){ie.doc.iter(function(ae){ae.stateAfter&&(ae.stateAfter=null),ae.styles&&(ae.styles=null)}),ie.doc.modeFrontier=ie.doc.highlightFrontier=ie.doc.first,Cr(ie,100),ie.state.modeGen++,ie.curOp&&ur(ie)}function or(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&Et(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Zr(ie,ae,de,ce){function me(oo){return de?de[oo]:null}function Le(oo,Dr,Po){Ws(oo,Dr,Po,ce),Sr(oo,"change",oo,ae)}function _e(oo,Dr){for(var Po=[],aa=oo;aa<Dr;++aa)Po.push(new os(ht[aa],me(aa),ce));return Po}var Xe=ae.from,Ue=ae.to,ht=ae.text,Kt=hn(ie,Xe.line),xt=hn(ie,Ue.line),yn=Et(ht),fn=me(ht.length-1),wi=Ue.line-Xe.line;if(ae.full)ie.insert(0,_e(0,ht.length)),ie.remove(ht.length,ie.size-ht.length);else if(or(ie,ae)){var Mi=_e(0,ht.length-1);Le(xt,xt.text,fn),wi&&ie.remove(Xe.line,wi),Mi.length&&ie.insert(Xe.line,Mi)}else if(Kt==xt)if(ht.length==1)Le(Kt,Kt.text.slice(0,Xe.ch)+yn+Kt.text.slice(Ue.ch),fn);else{var Hi=_e(1,ht.length-1);Hi.push(new os(yn+Kt.text.slice(Ue.ch),fn,ce)),Le(Kt,Kt.text.slice(0,Xe.ch)+ht[0],me(0)),ie.insert(Xe.line+1,Hi)}else if(ht.length==1)Le(Kt,Kt.text.slice(0,Xe.ch)+ht[0]+xt.text.slice(Ue.ch),me(0)),ie.remove(Xe.line+1,wi);else{Le(Kt,Kt.text.slice(0,Xe.ch)+ht[0],me(0)),Le(xt,yn+xt.text.slice(Ue.ch),fn);var dr=_e(1,ht.length-1);wi>1&&ie.remove(Xe.line+1,wi-1),ie.insert(Xe.line+1,dr)}Sr(ie,"change",ie,ae)}function xo(ie,ae,de){function ce(me,Le,_e){if(me.linked)for(var Xe=0;Xe<me.linked.length;++Xe){var Ue=me.linked[Xe];if(Ue.doc!=Le){var ht=_e&&Ue.sharedHist;de&&!ht||(ae(Ue.doc,ht),ce(Ue.doc,me,ht))}}}ce(ie,null,!0)}function nr(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,Ki(ie),bi(ie),jo(ie),ie.options.lineWrapping||Ta(ie),ie.options.mode=ae.modeOption,ur(ie)}function jo(ie){(ie.doc.direction=="rtl"?pt:Re)(ie.display.lineDiv,"CodeMirror-rtl")}function co(ie){ii(ie,function(){jo(ie),ur(ie)})}function oa(ie){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=ie||1}function ro(ie,ae){var de={from:La(ae.from),to:Rr(ae),text:Ci(ie,ae.from,ae.to)};return Ma(ie,de,ae.from.line,ae.to.line+1),xo(ie,function(ce){return Ma(ce,de,ae.from.line,ae.to.line+1)},!0),de}function Uo(ie){for(;ie.length;){var ae=Et(ie);if(ae.ranges)ie.pop();else break}}function fa(ie,ae){if(ae)return Uo(ie.done),Et(ie.done);if(ie.done.length&&!Et(ie.done).ranges)return Et(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),Et(ie.done)}function Ea(ie,ae,de,ce){var me=ie.history;me.undone.length=0;var Le=+new Date,_e,Xe;if((me.lastOp==ce||me.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&me.lastModTime>Le-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(_e=fa(me,me.lastOp==ce)))Xe=Et(_e.changes),li(ae.from,ae.to)==0&&li(ae.from,Xe.to)==0?Xe.to=Rr(ae):_e.changes.push(ro(ie,ae));else{var Ue=Et(me.done);for((!Ue||!Ue.ranges)&&Co(ie.sel,me.done),_e={changes:[ro(ie,ae)],generation:me.generation},me.done.push(_e);me.done.length>me.undoDepth;)me.done.shift(),me.done[0].ranges||me.done.shift()}me.done.push(de),me.generation=++me.maxGeneration,me.lastModTime=me.lastSelTime=Le,me.lastOp=me.lastSelOp=ce,me.lastOrigin=me.lastSelOrigin=ae.origin,Xe||Li(ie,"historyAdded")}function ga(ie,ae,de,ce){var me=ae.charAt(0);return me=="*"||me=="+"&&de.ranges.length==ce.ranges.length&&de.somethingSelected()==ce.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function _r(ie,ae,de,ce){var me=ie.history,Le=ce&&ce.origin;de==me.lastSelOp||Le&&me.lastSelOrigin==Le&&(me.lastModTime==me.lastSelTime&&me.lastOrigin==Le||ga(ie,Le,Et(me.done),ae))?me.done[me.done.length-1]=ae:Co(ae,me.done),me.lastSelTime=+new Date,me.lastSelOrigin=Le,me.lastSelOp=de,ce&&ce.clearRedo!==!1&&Uo(me.undone)}function Co(ie,ae){var de=Et(ae);de&&de.ranges&&de.equals(ie)||ae.push(ie)}function Ma(ie,ae,de,ce){var me=ae["spans_"+ie.id],Le=0;ie.iter(Math.max(ie.first,de),Math.min(ie.first+ie.size,ce),function(_e){_e.markedSpans&&((me||(me=ae["spans_"+ie.id]={}))[Le]=_e.markedSpans),++Le})}function pa(ie){if(!ie)return null;for(var ae,de=0;de<ie.length;++de)ie[de].marker.explicitlyCleared?ae||(ae=ie.slice(0,de)):ae&&ae.push(ie[de]);return ae?ae.length?ae:null:ie}function Da(ie,ae){var de=ae["spans_"+ie.id];if(!de)return null;for(var ce=[],me=0;me<ae.text.length;++me)ce.push(pa(de[me]));return ce}function ka(ie,ae){var de=Da(ie,ae),ce=Ba(ie,ae);if(!de)return ce;if(!ce)return de;for(var me=0;me<de.length;++me){var Le=de[me],_e=ce[me];if(Le&&_e)e:for(var Xe=0;Xe<_e.length;++Xe){for(var Ue=_e[Xe],ht=0;ht<Le.length;++ht)if(Le[ht].marker==Ue.marker)continue e;Le.push(Ue)}else _e&&(de[me]=_e)}return de}function Xa(ie,ae,de){for(var ce=[],me=0;me<ie.length;++me){var Le=ie[me];if(Le.ranges){ce.push(de?mi.prototype.deepCopy.call(Le):Le);continue}var _e=Le.changes,Xe=[];ce.push({changes:Xe});for(var Ue=0;Ue<_e.length;++Ue){var ht=_e[Ue],Kt=void 0;if(Xe.push({from:ht.from,to:ht.to,text:ht.text}),ae)for(var xt in ht)(Kt=xt.match(/^spans_(\d+)$/))&&Qe(ae,Number(Kt[1]))>-1&&(Et(Xe)[xt]=ht[xt],delete ht[xt])}}return ce}function Oa(ie,ae,de,ce){if(ce){var me=ie.anchor;if(de){var Le=li(ae,me)<0;Le!=li(de,me)<0?(me=ae,ae=de):Le!=li(ae,de)<0&&(ae=de)}return new ui(me,ae)}else return new ui(de||ae,ae)}function es(ie,ae,de,ce,me){me==null&&(me=ie.cm&&(ie.cm.display.shift||ie.extend)),ar(ie,new mi([Oa(ie.sel.primary(),ae,de,me)],0),ce)}function Hs(ie,ae,de){for(var ce=[],me=ie.cm&&(ie.cm.display.shift||ie.extend),Le=0;Le<ie.sel.ranges.length;Le++)ce[Le]=Oa(ie.sel.ranges[Le],ae[Le],null,me);var _e=Fi(ie.cm,ce,ie.sel.primIndex);ar(ie,_e,de)}function as(ie,ae,de,ce){var me=ie.sel.ranges.slice(0);me[ae]=de,ar(ie,Fi(ie.cm,me,ie.sel.primIndex),ce)}function wo(ie,ae,de,ce){ar(ie,ji(ae,de),ce)}function yo(ie,ae,de){var ce={ranges:ae.ranges,update:function(me){this.ranges=[];for(var Le=0;Le<me.length;Le++)this.ranges[Le]=new ui(er(ie,me[Le].anchor),er(ie,me[Le].head))},origin:de&&de.origin};return Li(ie,"beforeSelectionChange",ie,ce),ie.cm&&Li(ie.cm,"beforeSelectionChange",ie.cm,ce),ce.ranges!=ae.ranges?Fi(ie.cm,ce.ranges,ce.ranges.length-1):ae}function fo(ie,ae,de){var ce=ie.history.done,me=Et(ce);me&&me.ranges?(ce[ce.length-1]=ae,mr(ie,ae,de)):ar(ie,ae,de)}function ar(ie,ae,de){mr(ie,ae,de),_r(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,de)}function mr(ie,ae,de){(Yn(ie,"beforeSelectionChange")||ie.cm&&Yn(ie.cm,"beforeSelectionChange"))&&(ae=yo(ie,ae,de));var ce=de&&de.bias||(li(ae.primary().head,ie.sel.primary().head)<0?-1:1);so(ie,ha(ie,ae,ce,!0)),!(de&&de.scroll===!1)&&ie.cm&&Cu(ie.cm)}function so(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Ur(ie.cm)),Sr(ie,"cursorActivity",ie))}function Jo(ie){so(ie,ha(ie,ie.sel,null,!1))}function ha(ie,ae,de,ce){for(var me,Le=0;Le<ae.ranges.length;Le++){var _e=ae.ranges[Le],Xe=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Le],Ue=ss(ie,_e.anchor,Xe&&Xe.anchor,de,ce),ht=ss(ie,_e.head,Xe&&Xe.head,de,ce);(me||Ue!=_e.anchor||ht!=_e.head)&&(me||(me=ae.ranges.slice(0,Le)),me[Le]=new ui(Ue,ht))}return me?Fi(ie.cm,me,ae.primIndex):ae}function Yo(ie,ae,de,ce,me){var Le=hn(ie,ae.line);if(Le.markedSpans)for(var _e=0;_e<Le.markedSpans.length;++_e){var Xe=Le.markedSpans[_e],Ue=Xe.marker,ht="selectLeft"in Ue?!Ue.selectLeft:Ue.inclusiveLeft,Kt="selectRight"in Ue?!Ue.selectRight:Ue.inclusiveRight;if((Xe.from==null||(ht?Xe.from<=ae.ch:Xe.from<ae.ch))&&(Xe.to==null||(Kt?Xe.to>=ae.ch:Xe.to>ae.ch))){if(me&&(Li(Ue,"beforeCursorEnter"),Ue.explicitlyCleared))if(Le.markedSpans){--_e;continue}else break;if(!Ue.atomic)continue;if(de){var xt=Ue.find(ce<0?1:-1),yn=void 0;if((ce<0?Kt:ht)&&(xt=ks(ie,xt,-ce,xt&&xt.line==ae.line?Le:null)),xt&&xt.line==ae.line&&(yn=li(xt,de))&&(ce<0?yn<0:yn>0))return Yo(ie,xt,ae,ce,me)}var fn=Ue.find(ce<0?-1:1);return(ce<0?ht:Kt)&&(fn=ks(ie,fn,ce,fn.line==ae.line?Le:null)),fn?Yo(ie,fn,ae,ce,me):null}}return ae}function ss(ie,ae,de,ce,me){var Le=ce||1,_e=Yo(ie,ae,de,Le,me)||!me&&Yo(ie,ae,de,Le,!0)||Yo(ie,ae,de,-Le,me)||!me&&Yo(ie,ae,de,-Le,!0);return _e||(ie.cantEdit=!0,En(ie.first,0))}function ks(ie,ae,de,ce){return de<0&&ae.ch==0?ae.line>ie.first?er(ie,En(ae.line-1)):null:de>0&&ae.ch==(ce||hn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?En(ae.line+1,0):null:new En(ae.line,ae.ch+de)}function Za(ie){ie.setSelection(En(ie.firstLine(),0),En(ie.lastLine()),At)}function Ks(ie,ae,de){var ce={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return ce.canceled=!0}};return de&&(ce.update=function(me,Le,_e,Xe){me&&(ce.from=er(ie,me)),Le&&(ce.to=er(ie,Le)),_e&&(ce.text=_e),Xe!==void 0&&(ce.origin=Xe)}),Li(ie,"beforeChange",ie,ce),ie.cm&&Li(ie.cm,"beforeChange",ie.cm,ce),ce.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:ce.from,to:ce.to,text:ce.text,origin:ce.origin}}function ns(ie,ae,de){if(ie.cm){if(!ie.cm.curOp)return fi(ie.cm,ns)(ie,ae,de);if(ie.cm.state.suppressEdits)return}if(!((Yn(ie,"beforeChange")||ie.cm&&Yn(ie.cm,"beforeChange"))&&(ae=Ks(ie,ae,!0),!ae))){var ce=da&&!de&&wa(ie,ae.from,ae.to);if(ce)for(var me=ce.length-1;me>=0;--me)fs(ie,{from:ce[me].from,to:ce[me].to,text:me?[""]:ae.text,origin:ae.origin});else fs(ie,ae)}}function fs(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&li(ae.from,ae.to)==0)){var de=Fr(ie,ae);Ea(ie,ae,de,ie.cm?ie.cm.curOp.id:NaN),ws(ie,ae,de,Ba(ie,ae));var ce=[];xo(ie,function(me,Le){!Le&&Qe(ce,me.history)==-1&&(Cl(me.history,ae),ce.push(me.history)),ws(me,ae,null,Ba(me,ae))})}}function ps(ie,ae,de){var ce=ie.cm&&ie.cm.state.suppressEdits;if(!(ce&&!de)){for(var me=ie.history,Le,_e=ie.sel,Xe=ae=="undo"?me.done:me.undone,Ue=ae=="undo"?me.undone:me.done,ht=0;ht<Xe.length&&(Le=Xe[ht],!(de?Le.ranges&&!Le.equals(ie.sel):!Le.ranges));ht++);if(ht!=Xe.length){for(me.lastOrigin=me.lastSelOrigin=null;;)if(Le=Xe.pop(),Le.ranges){if(Co(Le,Ue),de&&!Le.equals(ie.sel)){ar(ie,Le,{clearRedo:!1});return}_e=Le}else if(ce){Xe.push(Le);return}else break;var Kt=[];Co(_e,Ue),Ue.push({changes:Kt,generation:me.generation}),me.generation=Le.generation||++me.maxGeneration;for(var xt=Yn(ie,"beforeChange")||ie.cm&&Yn(ie.cm,"beforeChange"),yn=function(Mi){var Hi=Le.changes[Mi];if(Hi.origin=ae,xt&&!Ks(ie,Hi,!1))return Xe.length=0,{};Kt.push(ro(ie,Hi));var dr=Mi?Fr(ie,Hi):Et(Xe);ws(ie,Hi,dr,ka(ie,Hi)),!Mi&&ie.cm&&ie.cm.scrollIntoView({from:Hi.from,to:Rr(Hi)});var oo=[];xo(ie,function(Dr,Po){!Po&&Qe(oo,Dr.history)==-1&&(Cl(Dr.history,Hi),oo.push(Dr.history)),ws(Dr,Hi,null,ka(Dr,Hi))})},fn=Le.changes.length-1;fn>=0;--fn){var wi=yn(fn);if(wi)return wi.v}}}}function rl(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new mi(on(ie.sel.ranges,function(me){return new ui(En(me.anchor.line+ae,me.anchor.ch),En(me.head.line+ae,me.head.ch))}),ie.sel.primIndex),ie.cm)){ur(ie.cm,ie.first,ie.first-ae,ae);for(var de=ie.cm.display,ce=de.viewFrom;ce<de.viewTo;ce++)Qi(ie.cm,ce,"gutter")}}function ws(ie,ae,de,ce){if(ie.cm&&!ie.cm.curOp)return fi(ie.cm,ws)(ie,ae,de,ce);if(ae.to.line<ie.first){rl(ie,ae.text.length-1-(ae.to.line-ae.from.line));return}if(!(ae.from.line>ie.lastLine())){if(ae.from.line<ie.first){var me=ae.text.length-1-(ie.first-ae.from.line);rl(ie,me),ae={from:En(ie.first,0),to:En(ae.to.line+me,ae.to.ch),text:[Et(ae.text)],origin:ae.origin}}var Le=ie.lastLine();ae.to.line>Le&&(ae={from:ae.from,to:En(Le,hn(ie,Le).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=Ci(ie,ae.from,ae.to),de||(de=Fr(ie,ae)),ie.cm?Ps(ie.cm,ae,ce):Zr(ie,ae,ce),mr(ie,de,At),ie.cantEdit&&ss(ie,En(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function Ps(ie,ae,de){var ce=ie.doc,me=ie.display,Le=ae.from,_e=ae.to,Xe=!1,Ue=Le.line;ie.options.lineWrapping||(Ue=Rt(Ra(hn(ce,Le.line))),ce.iter(Ue,_e.line+1,function(fn){if(fn==me.maxLine)return Xe=!0,!0})),ce.sel.contains(ae.from,ae.to)>-1&&Ur(ie),Zr(ce,ae,de,qr(ie)),ie.options.lineWrapping||(ce.iter(Ue,Le.line+ae.text.length,function(fn){var wi=Va(fn);wi>me.maxLineLength&&(me.maxLine=fn,me.maxLineLength=wi,me.maxLineChanged=!0,Xe=!1)}),Xe&&(ie.curOp.updateMaxLine=!0)),_o(ce,Le.line),Cr(ie,400);var ht=ae.text.length-(_e.line-Le.line)-1;ae.full?ur(ie):Le.line==_e.line&&ae.text.length==1&&!or(ie.doc,ae)?Qi(ie,Le.line,"text"):ur(ie,Le.line,_e.line+1,ht);var Kt=Yn(ie,"changes"),xt=Yn(ie,"change");if(xt||Kt){var yn={from:Le,to:_e,text:ae.text,removed:ae.removed,origin:ae.origin};xt&&Sr(ie,"change",ie,yn),Kt&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(yn)}ie.display.selForContextMenu=null}function ts(ie,ae,de,ce,me){var Le;ce||(ce=de),li(ce,de)<0&&(Le=[ce,de],de=Le[0],ce=Le[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),ns(ie,{from:de,to:ce,text:ae,origin:me})}function ms(ie,ae,de,ce){de<ie.line?ie.line+=ce:ae<ie.line&&(ie.line=ae,ie.ch=0)}function xl(ie,ae,de,ce){for(var me=0;me<ie.length;++me){var Le=ie[me],_e=!0;if(Le.ranges){Le.copied||(Le=ie[me]=Le.deepCopy(),Le.copied=!0);for(var Xe=0;Xe<Le.ranges.length;Xe++)ms(Le.ranges[Xe].anchor,ae,de,ce),ms(Le.ranges[Xe].head,ae,de,ce);continue}for(var Ue=0;Ue<Le.changes.length;++Ue){var ht=Le.changes[Ue];if(de<ht.from.line)ht.from=En(ht.from.line+ce,ht.from.ch),ht.to=En(ht.to.line+ce,ht.to.ch);else if(ae<=ht.to.line){_e=!1;break}}_e||(ie.splice(0,me+1),me=0)}}function Cl(ie,ae){var de=ae.from.line,ce=ae.to.line,me=ae.text.length-(ce-de)-1;xl(ie.done,de,ce,me),xl(ie.undone,de,ce,me)}function lo(ie,ae,de,ce){var me=ae,Le=ae;return typeof ae=="number"?Le=hn(ie,Wi(ie,ae)):me=Rt(ae),me==null?null:(ce(Le,me)&&ie.cm&&Qi(ie.cm,me,de),Le)}function zr(ie){this.lines=ie,this.parent=null;for(var ae=0,de=0;de<ie.length;++de)ie[de].parent=this,ae+=ie[de].height;this.height=ae}zr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var de=ie,ce=ie+ae;de<ce;++de){var me=this.lines[de];this.height-=me.height,vl(me),Sr(me,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,de){this.height+=de,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var ce=0;ce<ae.length;++ce)ae[ce].parent=this},iterN:function(ie,ae,de){for(var ce=ie+ae;ie<ce;++ie)if(de(this.lines[ie]))return!0}};function to(ie){this.children=ie;for(var ae=0,de=0,ce=0;ce<ie.length;++ce){var me=ie[ce];ae+=me.chunkSize(),de+=me.height,me.parent=this}this.size=ae,this.height=de,this.parent=null}to.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var de=0;de<this.children.length;++de){var ce=this.children[de],me=ce.chunkSize();if(ie<me){var Le=Math.min(ae,me-ie),_e=ce.height;if(ce.removeInner(ie,Le),this.height-=_e-ce.height,me==Le&&(this.children.splice(de--,1),ce.parent=null),(ae-=Le)==0)break;ie=0}else ie-=me}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof zr))){var Xe=[];this.collapse(Xe),this.children=[new zr(Xe)],this.children[0].parent=this}},collapse:function(ie){for(var ae=0;ae<this.children.length;++ae)this.children[ae].collapse(ie)},insertInner:function(ie,ae,de){this.size+=ae.length,this.height+=de;for(var ce=0;ce<this.children.length;++ce){var me=this.children[ce],Le=me.chunkSize();if(ie<=Le){if(me.insertInner(ie,ae,de),me.lines&&me.lines.length>50){for(var _e=me.lines.length%25+25,Xe=_e;Xe<me.lines.length;){var Ue=new zr(me.lines.slice(Xe,Xe+=25));me.height-=Ue.height,this.children.splice(++ce,0,Ue),Ue.parent=this}me.lines=me.lines.slice(0,_e),this.maybeSpill()}break}ie-=Le}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),de=new to(ae);if(ie.parent){ie.size-=de.size,ie.height-=de.height;var me=Qe(ie.parent.children,ie);ie.parent.children.splice(me+1,0,de)}else{var ce=new to(ie.children);ce.parent=ie,ie.children=[ce,de],ie=ce}de.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,de){for(var ce=0;ce<this.children.length;++ce){var me=this.children[ce],Le=me.chunkSize();if(ie<Le){var _e=Math.min(ae,Le-ie);if(me.iterN(ie,_e,de))return!0;if((ae-=_e)==0)break;ie=0}else ie-=Le}}};var va=function(ie,ae,de){if(de)for(var ce in de)de.hasOwnProperty(ce)&&(this[ce]=de[ce]);this.doc=ie,this.node=ae};va.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,de=this.line,ce=Rt(de);if(!(ce==null||!ae)){for(var me=0;me<ae.length;++me)ae[me]==this&&ae.splice(me--,1);ae.length||(de.widgets=null);var Le=Pu(this);Ln(de,Math.max(0,de.height-Le)),ie&&(ii(ie,function(){Es(ie,de,-Le),Qi(ie,ce,"widget")}),Sr(ie,"lineWidgetCleared",ie,this,ce))}},va.prototype.changed=function(){var ie=this,ae=this.height,de=this.doc.cm,ce=this.line;this.height=null;var me=Pu(this)-ae;me&&(un(this.doc,ce)||Ln(ce,ce.height+me),de&&ii(de,function(){de.curOp.forceUpdate=!0,Es(de,ce,me),Sr(de,"lineWidgetChanged",de,ie,Rt(ce))}))},Rn(va);function Es(ie,ae,de){Io(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&Ah(ie,de)}function Zs(ie,ae,de,ce){var me=new va(ie,de,ce),Le=ie.cm;return Le&&me.noHScroll&&(Le.display.alignWidgets=!0),lo(ie,ae,"widget",function(_e){var Xe=_e.widgets||(_e.widgets=[]);if(me.insertAt==null?Xe.push(me):Xe.splice(Math.min(Xe.length-1,Math.max(0,me.insertAt)),0,me),me.line=_e,Le&&!un(ie,_e)){var Ue=Io(_e)<ie.scrollTop;Ln(_e,_e.height+Pu(me)),Ue&&Ah(Le,me.height),Le.curOp.forceUpdate=!0}return!0}),Le&&Sr(Le,"lineWidgetAdded",Le,me,typeof ae=="number"?ae:Rt(ae)),me}var Al=0,kt=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++Al};kt.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&di(ie),Yn(this,"clear")){var de=this.find();de&&Sr(this,"clear",de.from,de.to)}for(var ce=null,me=null,Le=0;Le<this.lines.length;++Le){var _e=this.lines[Le],Xe=js(_e.markedSpans,this);ie&&!this.collapsed?Qi(ie,Rt(_e),"text"):ie&&(Xe.to!=null&&(me=Rt(_e)),Xe.from!=null&&(ce=Rt(_e))),_e.markedSpans=Vr(_e.markedSpans,Xe),Xe.from==null&&this.collapsed&&!un(this.doc,_e)&&ie&&Ln(_e,Tr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var Ue=0;Ue<this.lines.length;++Ue){var ht=Ra(this.lines[Ue]),Kt=Va(ht);Kt>ie.display.maxLineLength&&(ie.display.maxLine=ht,ie.display.maxLineLength=Kt,ie.display.maxLineChanged=!0)}ce!=null&&ie&&this.collapsed&&ur(ie,ce,me+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Jo(ie.doc)),ie&&Sr(ie,"markerCleared",ie,this,ce,me),ae&&ei(ie),this.parent&&this.parent.clear()}},kt.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var de,ce,me=0;me<this.lines.length;++me){var Le=this.lines[me],_e=js(Le.markedSpans,this);if(_e.from!=null&&(de=En(ae?Le:Rt(Le),_e.from),ie==-1))return de;if(_e.to!=null&&(ce=En(ae?Le:Rt(Le),_e.to),ie==1))return ce}return de&&{from:de,to:ce}},kt.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),de=this,ce=this.doc.cm;!ae||!ce||ii(ce,function(){var me=ae.line,Le=Rt(ae.line),_e=Jl(ce,Le);if(_e&&(Mc(_e),ce.curOp.selectionChanged=ce.curOp.forceUpdate=!0),ce.curOp.updateMaxLine=!0,!un(de.doc,me)&&de.height!=null){var Xe=de.height;de.height=null;var Ue=Pu(de)-Xe;Ue&&Ln(me,me.height+Ue)}Sr(ce,"markerChanged",ce,ie)})},kt.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Qe(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},kt.prototype.detachLine=function(ie){if(this.lines.splice(Qe(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},Rn(kt);function Hl(ie,ae,de,ce,me){if(ce&&ce.shared)return Ql(ie,ae,de,ce,me);if(ie.cm&&!ie.cm.curOp)return fi(ie.cm,Hl)(ie,ae,de,ce,me);var Le=new kt(ie,me),_e=li(ae,de);if(ce&&Tn(ce,Le,!1),_e>0||_e==0&&Le.clearWhenEmpty!==!1)return Le;if(Le.replacedWith&&(Le.collapsed=!0,Le.widgetNode=bt("span",[Le.replacedWith],"CodeMirror-widget"),ce.handleMouseEvents||Le.widgetNode.setAttribute("cm-ignore-events","true"),ce.insertLeft&&(Le.widgetNode.insertLeft=!0)),Le.collapsed){if(Su(ie,ae.line,ae,de,Le)||ae.line!=de.line&&Su(ie,de.line,ae,de,Le))throw new Error("Inserting collapsed marker partially overlapping an existing one");Sn()}Le.addToHistory&&Ea(ie,{from:ae,to:de,origin:"markText"},ie.sel,NaN);var Xe=ae.line,Ue=ie.cm,ht;if(ie.iter(Xe,de.line+1,function(xt){Ue&&Le.collapsed&&!Ue.options.lineWrapping&&Ra(xt)==Ue.display.maxLine&&(ht=!0),Le.collapsed&&Xe!=ae.line&&Ln(xt,0),Ll(xt,new Zo(Le,Xe==ae.line?ae.ch:null,Xe==de.line?de.ch:null)),++Xe}),Le.collapsed&&ie.iter(ae.line,de.line+1,function(xt){un(ie,xt)&&Ln(xt,0)}),Le.clearOnEnter&&ri(Le,"beforeCursorEnter",function(){return Le.clear()}),Le.readOnly&&(Ga(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Le.collapsed&&(Le.id=++Al,Le.atomic=!0),Ue){if(ht&&(Ue.curOp.updateMaxLine=!0),Le.collapsed)ur(Ue,ae.line,de.line+1);else if(Le.className||Le.startStyle||Le.endStyle||Le.css||Le.attributes||Le.title)for(var Kt=ae.line;Kt<=de.line;Kt++)Qi(Ue,Kt,"text");Le.atomic&&Jo(Ue.doc),Sr(Ue,"markerAdded",Ue,Le)}return Le}var $s=function(ie,ae){this.markers=ie,this.primary=ae;for(var de=0;de<ie.length;++de)ie[de].parent=this};$s.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();Sr(this,"clear")}},$s.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},Rn($s);function Ql(ie,ae,de,ce,me){ce=Tn(ce),ce.shared=!1;var Le=[Hl(ie,ae,de,ce,me)],_e=Le[0],Xe=ce.widgetNode;return xo(ie,function(Ue){Xe&&(ce.widgetNode=Xe.cloneNode(!0)),Le.push(Hl(Ue,er(Ue,ae),er(Ue,de),ce,me));for(var ht=0;ht<Ue.linked.length;++ht)if(Ue.linked[ht].isParent)return;_e=Et(Le)}),new $s(Le,_e)}function Ju(ie){return ie.findMarks(En(ie.first,0),ie.clipPos(En(ie.lastLine())),function(ae){return ae.parent})}function Us(ie,ae){for(var de=0;de<ae.length;de++){var ce=ae[de],me=ce.find(),Le=ie.clipPos(me.from),_e=ie.clipPos(me.to);if(li(Le,_e)){var Xe=Hl(ie,Le,_e,ce.primary,ce.primary.type);ce.markers.push(Xe),Xe.parent=ce}}}function Go(ie){for(var ae=function(ce){var me=ie[ce],Le=[me.primary.doc];xo(me.primary.doc,function(Ue){return Le.push(Ue)});for(var _e=0;_e<me.markers.length;_e++){var Xe=me.markers[_e];Qe(Le,Xe.doc)==-1&&(Xe.parent=null,me.markers.splice(_e--,1))}},de=0;de<ie.length;de++)ae(de)}var ja=0,Wo=function(ie,ae,de,ce,me){if(!(this instanceof Wo))return new Wo(ie,ae,de,ce,me);de==null&&(de=0),to.call(this,[new zr([new os("",null)])]),this.first=de,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=de;var Le=En(de,0);this.sel=ji(Le),this.history=new oa(null),this.id=++ja,this.modeOption=ae,this.lineSep=ce,this.direction=me=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Zr(this,{from:Le,to:Le,text:ie}),ar(this,ji(Le),At)};Wo.prototype=be(to.prototype,{constructor:Wo,iter:function(ie,ae,de){de?this.iterN(ie-this.first,ae-ie,de):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var de=0,ce=0;ce<ae.length;++ce)de+=ae[ce].height;this.insertInner(ie-this.first,ae,de)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=Ri(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Oi(function(ie){var ae=En(this.first,0),de=this.first+this.size-1;ns(this,{from:ae,to:En(de,hn(this,de).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&ju(this.cm,0,0),ar(this,ji(ae),At)}),replaceRange:function(ie,ae,de,ce){ae=er(this,ae),de=de?er(this,de):ae,ts(this,ie,ae,de,ce)},getRange:function(ie,ae,de){var ce=Ci(this,er(this,ie),er(this,ae));return de===!1?ce:ce.join(de||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(Zi(this,ie))return hn(this,ie)},getLineNumber:function(ie){return Rt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=hn(this,ie)),Ra(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return er(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),de;return ie==null||ie=="head"?de=ae.head:ie=="anchor"?de=ae.anchor:ie=="end"||ie=="to"||ie===!1?de=ae.to():de=ae.from(),de},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Oi(function(ie,ae,de){wo(this,er(this,typeof ie=="number"?En(ie,ae||0):ie),null,de)}),setSelection:Oi(function(ie,ae,de){wo(this,er(this,ie),er(this,ae||ie),de)}),extendSelection:Oi(function(ie,ae,de){es(this,er(this,ie),ae&&er(this,ae),de)}),extendSelections:Oi(function(ie,ae){Hs(this,ra(this,ie),ae)}),extendSelectionsBy:Oi(function(ie,ae){var de=on(this.sel.ranges,ie);Hs(this,ra(this,de),ae)}),setSelections:Oi(function(ie,ae,de){if(ie.length){for(var ce=[],me=0;me<ie.length;me++)ce[me]=new ui(er(this,ie[me].anchor),er(this,ie[me].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),ar(this,Fi(this.cm,ce,ae),de)}}),addSelection:Oi(function(ie,ae,de){var ce=this.sel.ranges.slice(0);ce.push(new ui(er(this,ie),er(this,ae||ie))),ar(this,Fi(this.cm,ce,ce.length-1),de)}),getSelection:function(ie){for(var ae=this.sel.ranges,de,ce=0;ce<ae.length;ce++){var me=Ci(this,ae[ce].from(),ae[ce].to());de=de?de.concat(me):me}return ie===!1?de:de.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],de=this.sel.ranges,ce=0;ce<de.length;ce++){var me=Ci(this,de[ce].from(),de[ce].to());ie!==!1&&(me=me.join(ie||this.lineSeparator())),ae[ce]=me}return ae},replaceSelection:function(ie,ae,de){for(var ce=[],me=0;me<this.sel.ranges.length;me++)ce[me]=ie;this.replaceSelections(ce,ae,de||"+input")},replaceSelections:Oi(function(ie,ae,de){for(var ce=[],me=this.sel,Le=0;Le<me.ranges.length;Le++){var _e=me.ranges[Le];ce[Le]={from:_e.from(),to:_e.to(),text:this.splitLines(ie[Le]),origin:de}}for(var Xe=ae&&ae!="end"&&To(this,ce,ae),Ue=ce.length-1;Ue>=0;Ue--)ns(this,ce[Ue]);Xe?fo(this,Xe):this.cm&&Cu(this.cm)}),undo:Oi(function(){ps(this,"undo")}),redo:Oi(function(){ps(this,"redo")}),undoSelection:Oi(function(){ps(this,"undo",!0)}),redoSelection:Oi(function(){ps(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,de=0,ce=0;ce<ie.done.length;ce++)ie.done[ce].ranges||++ae;for(var me=0;me<ie.undone.length;me++)ie.undone[me].ranges||++de;return{undo:ae,redo:de}},clearHistory:function(){var ie=this;this.history=new oa(this.history.maxGeneration),xo(this,function(ae){return ae.history=ie.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(ie){return ie&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(ie){return this.history.generation==(ie||this.cleanGeneration)},getHistory:function(){return{done:Xa(this.history.done),undone:Xa(this.history.undone)}},setHistory:function(ie){var ae=this.history=new oa(this.history.maxGeneration);ae.done=Xa(ie.done.slice(0),null,!0),ae.undone=Xa(ie.undone.slice(0),null,!0)},setGutterMarker:Oi(function(ie,ae,de){return lo(this,ie,"gutter",function(ce){var me=ce.gutterMarkers||(ce.gutterMarkers={});return me[ae]=de,!de&&Fe(me)&&(ce.gutterMarkers=null),!0})}),clearGutter:Oi(function(ie){var ae=this;this.iter(function(de){de.gutterMarkers&&de.gutterMarkers[ie]&&lo(ae,de,"gutter",function(){return de.gutterMarkers[ie]=null,Fe(de.gutterMarkers)&&(de.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!Zi(this,ie)||(ae=ie,ie=hn(this,ie),!ie))return null}else if(ae=Rt(ie),ae==null)return null;return{line:ae,handle:ie,text:ie.text,gutterMarkers:ie.gutterMarkers,textClass:ie.textClass,bgClass:ie.bgClass,wrapClass:ie.wrapClass,widgets:ie.widgets}},addLineClass:Oi(function(ie,ae,de){return lo(this,ie,ae=="gutter"?"gutter":"class",function(ce){var me=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!ce[me])ce[me]=de;else{if(Oe(de).test(ce[me]))return!1;ce[me]+=" "+de}return!0})}),removeLineClass:Oi(function(ie,ae,de){return lo(this,ie,ae=="gutter"?"gutter":"class",function(ce){var me=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Le=ce[me];if(Le)if(de==null)ce[me]=null;else{var _e=Le.match(Oe(de));if(!_e)return!1;var Xe=_e.index+_e[0].length;ce[me]=Le.slice(0,_e.index)+(!_e.index||Xe==Le.length?"":" ")+Le.slice(Xe)||null}else return!1;return!0})}),addLineWidget:Oi(function(ie,ae,de){return Zs(this,ie,ae,de)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,de){return Hl(this,er(this,ie),er(this,ae),de,de&&de.type||"range")},setBookmark:function(ie,ae){var de={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=er(this,ie),Hl(this,ie,ie,de,"bookmark")},findMarksAt:function(ie){ie=er(this,ie);var ae=[],de=hn(this,ie.line).markedSpans;if(de)for(var ce=0;ce<de.length;++ce){var me=de[ce];(me.from==null||me.from<=ie.ch)&&(me.to==null||me.to>=ie.ch)&&ae.push(me.marker.parent||me.marker)}return ae},findMarks:function(ie,ae,de){ie=er(this,ie),ae=er(this,ae);var ce=[],me=ie.line;return this.iter(ie.line,ae.line+1,function(Le){var _e=Le.markedSpans;if(_e)for(var Xe=0;Xe<_e.length;Xe++){var Ue=_e[Xe];!(Ue.to!=null&&me==ie.line&&ie.ch>=Ue.to||Ue.from==null&&me!=ie.line||Ue.from!=null&&me==ae.line&&Ue.from>=ae.ch)&&(!de||de(Ue.marker))&&ce.push(Ue.marker.parent||Ue.marker)}++me}),ce},getAllMarks:function(){var ie=[];return this.iter(function(ae){var de=ae.markedSpans;if(de)for(var ce=0;ce<de.length;++ce)de[ce].from!=null&&ie.push(de[ce].marker)}),ie},posFromIndex:function(ie){var ae,de=this.first,ce=this.lineSeparator().length;return this.iter(function(me){var Le=me.text.length+ce;if(Le>ie)return ae=ie,!0;ie-=Le,++de}),er(this,En(de,ae))},indexFromPos:function(ie){ie=er(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var de=this.lineSeparator().length;return this.iter(this.first,ie.line,function(ce){ae+=ce.text.length+de}),ae},copy:function(ie){var ae=new Wo(Ri(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return ae.scrollTop=this.scrollTop,ae.scrollLeft=this.scrollLeft,ae.sel=this.sel,ae.extend=!1,ie&&(ae.history.undoDepth=this.history.undoDepth,ae.setHistory(this.getHistory())),ae},linkedDoc:function(ie){ie||(ie={});var ae=this.first,de=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<de&&(de=ie.to);var ce=new Wo(Ri(this,ae,de),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(ce.history=this.history),(this.linked||(this.linked=[])).push({doc:ce,sharedHist:ie.sharedHist}),ce.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],Us(ce,Ju(this)),ce},unlinkDoc:function(ie){if(ie instanceof is&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var de=this.linked[ae];if(de.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Go(Ju(this));break}}if(ie.history==this.history){var ce=[ie.id];xo(ie,function(me){return ce.push(me.id)},!0),ie.history=new oa(null),ie.history.done=Xa(this.history.done,ce),ie.history.undone=Xa(this.history.undone,ce)}},iterLinkedDocs:function(ie){xo(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):an(ie)},lineSeparator:function(){return this.lineSep||`
|
|
`},setDirection:Oi(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&co(this.cm))})}),Wo.prototype.eachLine=Wo.prototype.iter;var ol=0;function Zl(ie){var ae=this;if(ca(ae),!(Ai(ae,ie)||zs(ae.display,ie))){sr(ie),ft&&(ol=+new Date);var de=No(ae,ie,!0),ce=ie.dataTransfer.files;if(!(!de||ae.isReadOnly()))if(ce&&ce.length&&window.FileReader&&window.File)for(var me=ce.length,Le=Array(me),_e=0,Xe=function(){++_e==me&&fi(ae,function(){de=er(ae.doc,de);var fn={from:de,to:de,text:ae.doc.splitLines(Le.filter(function(wi){return wi!=null}).join(ae.doc.lineSeparator())),origin:"paste"};ns(ae.doc,fn),fo(ae.doc,ji(er(ae.doc,de),er(ae.doc,Rr(fn))))})()},Ue=function(fn,wi){if(ae.options.allowDropFileTypes&&Qe(ae.options.allowDropFileTypes,fn.type)==-1){Xe();return}var Mi=new FileReader;Mi.onerror=function(){return Xe()},Mi.onload=function(){var Hi=Mi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Hi)){Xe();return}Le[wi]=Hi,Xe()},Mi.readAsText(fn)},ht=0;ht<ce.length;ht++)Ue(ce[ht],ht);else{if(ae.state.draggingText&&ae.doc.sel.contains(de)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var Kt=ie.dataTransfer.getData("Text");if(Kt){var xt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(xt=ae.listSelections()),mr(ae.doc,ji(de,de)),xt)for(var yn=0;yn<xt.length;++yn)ts(ae.doc,"",xt[yn].anchor,xt[yn].head,"drag");ae.replaceSelection(Kt,"around","paste"),ae.display.input.focus()}}catch(fn){}}}}function Xo(ie,ae){if(ft&&(!ie.state.draggingText||+new Date-ol<100)){lr(ae);return}if(!(Ai(ie,ae)||zs(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Ft)){var de=Je("img",null,null,"position: fixed; left: 0; top: 0;");de.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",st&&(de.width=de.height=1,ie.display.wrapper.appendChild(de),de._top=de.offsetTop),ae.dataTransfer.setDragImage(de,0,0),st&&de.parentNode.removeChild(de)}}function Ca(ie,ae){var de=No(ie,ae);if(de){var ce=document.createDocumentFragment();xi(ie,de,ce),ie.display.dragCursor||(ie.display.dragCursor=Je("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),rt(ie.display.dragCursor,ce)}}function ca(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function ma(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),de=[],ce=0;ce<ae.length;ce++){var me=ae[ce].CodeMirror;me&&de.push(me)}de.length&&de[0].operation(function(){for(var Le=0;Le<de.length;Le++)ie(de[Le])})}}var ls=!1;function Ja(){ls||(du(),ls=!0)}function du(){var ie;ri(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,ma(Qu)},100))}),ri(window,"blur",function(){return ma(Vs)})}function Qu(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var Bl={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"},al=0;al<10;al++)Bl[al+48]=Bl[al+96]=String(al);for(var $u=65;$u<=90;$u++)Bl[$u]=String.fromCharCode($u);for(var zu=1;zu<=12;zu++)Bl[zu+111]=Bl[zu+63235]="F"+zu;var Tl={};Tl.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"},Tl.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"},Tl.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"},Tl.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"]},Tl.default=ue?Tl.macDefault:Tl.pcDefault;function sd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var de,ce,me,Le,_e=0;_e<ae.length-1;_e++){var Xe=ae[_e];if(/^(cmd|meta|m)$/i.test(Xe))Le=!0;else if(/^a(lt)?$/i.test(Xe))de=!0;else if(/^(c|ctrl|control)$/i.test(Xe))ce=!0;else if(/^s(hift)?$/i.test(Xe))me=!0;else throw new Error("Unrecognized modifier name: "+Xe)}return de&&(ie="Alt-"+ie),ce&&(ie="Ctrl-"+ie),Le&&(ie="Cmd-"+ie),me&&(ie="Shift-"+ie),ie}function Na(ie){var ae={};for(var de in ie)if(ie.hasOwnProperty(de)){var ce=ie[de];if(/^(name|fallthrough|(de|at)tach)$/.test(de))continue;if(ce=="..."){delete ie[de];continue}for(var me=on(de.split(" "),sd),Le=0;Le<me.length;Le++){var _e=void 0,Xe=void 0;Le==me.length-1?(Xe=me.join(" "),_e=ce):(Xe=me.slice(0,Le+1).join(" "),_e="...");var Ue=ae[Xe];if(!Ue)ae[Xe]=_e;else if(Ue!=_e)throw new Error("Inconsistent bindings for "+Xe)}delete ie[de]}for(var ht in ae)ie[ht]=ae[ht];return ie}function qo(ie,ae,de,ce){ae=Wl(ae);var me=ae.call?ae.call(ie,ce):ae[ie];if(me===!1)return"nothing";if(me==="...")return"multi";if(me!=null&&de(me))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return qo(ie,ae.fallthrough,de,ce);for(var Le=0;Le<ae.fallthrough.length;Le++){var _e=qo(ie,ae.fallthrough[Le],de,ce);if(_e)return _e}}}function qs(ie){var ae=typeof ie=="string"?ie:Bl[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function bu(ie,ae,de){var ce=ie;return ae.altKey&&ce!="Alt"&&(ie="Alt-"+ie),(Se?ae.metaKey:ae.ctrlKey)&&ce!="Ctrl"&&(ie="Ctrl-"+ie),(Se?ae.ctrlKey:ae.metaKey)&&ce!="Mod"&&(ie="Cmd-"+ie),!de&&ae.shiftKey&&ce!="Shift"&&(ie="Shift-"+ie),ie}function Dl(ie,ae){if(st&&ie.keyCode==34&&ie.char)return!1;var de=Bl[ie.keyCode];return de==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(de=ie.code),bu(de,ie,ae))}function Wl(ie){return typeof ie=="string"?Tl[ie]:ie}function wl(ie,ae){for(var de=ie.doc.sel.ranges,ce=[],me=0;me<de.length;me++){for(var Le=ae(de[me]);ce.length&&li(Le.from,Et(ce).to)<=0;){var _e=ce.pop();if(li(_e.from,Le.from)<0){Le.from=_e.from;break}}ce.push(Le)}ii(ie,function(){for(var Xe=ce.length-1;Xe>=0;Xe--)ts(ie.doc,"",ce[Xe].from,ce[Xe].to,"+delete");Cu(ie)})}function Bh(ie,ae,de){var ce=Kn(ie.text,ae+de,de);return ce<0||ce>ie.text.length?null:ce}function Ns(ie,ae,de){var ce=Bh(ie,ae.ch,de);return ce==null?null:new En(ae.line,ce,de<0?"after":"before")}function fc(ie,ae,de,ce,me){if(ie){ae.doc.direction=="rtl"&&(me=-me);var Le=$n(de,ae.doc.direction);if(Le){var _e=me<0?Et(Le):Le[0],Xe=me<0==(_e.level==1),Ue=Xe?"after":"before",ht;if(_e.level>0||ae.doc.direction=="rtl"){var Kt=Nh(ae,de);ht=me<0?de.text.length-1:0;var xt=Ru(ae,Kt,ht).top;ht=Zn(function(yn){return Ru(ae,Kt,yn).top==xt},me<0==(_e.level==1)?_e.from:_e.to-1,ht),Ue=="before"&&(ht=Bh(de,ht,1))}else ht=me<0?_e.to:_e.from;return new En(ce,ht,Ue)}}return new En(ce,me<0?de.text.length:0,me<0?"before":"after")}function sf(ie,ae,de,ce){var me=$n(ae,ie.doc.direction);if(!me)return Ns(ae,de,ce);de.ch>=ae.text.length?(de.ch=ae.text.length,de.sticky="before"):de.ch<=0&&(de.ch=0,de.sticky="after");var Le=Zt(me,de.ch,de.sticky),_e=me[Le];if(ie.doc.direction=="ltr"&&_e.level%2==0&&(ce>0?_e.to>de.ch:_e.from<de.ch))return Ns(ae,de,ce);var Xe=function(dr,oo){return Bh(ae,dr instanceof En?dr.ch:dr,oo)},Ue,ht=function(dr){return ie.options.lineWrapping?(Ue=Ue||Nh(ie,ae),Vt(ie,ae,Ue,dr)):{begin:0,end:ae.text.length}},Kt=ht(de.sticky=="before"?Xe(de,-1):de.ch);if(ie.doc.direction=="rtl"||_e.level==1){var xt=_e.level==1==ce<0,yn=Xe(de,xt?1:-1);if(yn!=null&&(xt?yn<=_e.to&&yn<=Kt.end:yn>=_e.from&&yn>=Kt.begin)){var fn=xt?"before":"after";return new En(de.line,yn,fn)}}var wi=function(dr,oo,Dr){for(var Po=function(Ys,Kl){return Kl?new En(de.line,Xe(Ys,1),"before"):new En(de.line,Ys,"after")};dr>=0&&dr<me.length;dr+=oo){var aa=me[dr],Br=oo>0==(aa.level!=1),Aa=Br?Dr.begin:Xe(Dr.end,-1);if(aa.from<=Aa&&Aa<aa.to||(Aa=Br?aa.from:Xe(aa.to,-1),Dr.begin<=Aa&&Aa<Dr.end))return Po(Aa,Br)}},Mi=wi(Le+ce,ce,Kt);if(Mi)return Mi;var Hi=ce>0?Kt.end:Xe(Kt.begin,-1);return Hi!=null&&!(ce>0&&Hi==ae.text.length)&&(Mi=wi(ce>0?0:me.length-1,ce,ht(Hi)),Mi)?Mi:null}var gc={selectAll:Za,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),At)},killLine:function(ie){return wl(ie,function(ae){if(ae.empty()){var de=hn(ie.doc,ae.head.line).text.length;return ae.head.ch==de&&ae.head.line<ie.lastLine()?{from:ae.head,to:En(ae.head.line+1,0)}:{from:ae.head,to:En(ae.head.line,de)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return wl(ie,function(ae){return{from:En(ae.from().line,0),to:er(ie.doc,En(ae.to().line+1,0))}})},delLineLeft:function(ie){return wl(ie,function(ae){return{from:En(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return wl(ie,function(ae){var de=ie.charCoords(ae.head,"div").top+5,ce=ie.coordsChar({left:0,top:de},"div");return{from:ce,to:ae.from()}})},delWrappedLineRight:function(ie){return wl(ie,function(ae){var de=ie.charCoords(ae.head,"div").top+5,ce=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:de},"div");return{from:ae.from(),to:ce}})},undo:function(ie){return ie.undo()},redo:function(ie){return ie.redo()},undoSelection:function(ie){return ie.undoSelection()},redoSelection:function(ie){return ie.redoSelection()},goDocStart:function(ie){return ie.extendSelection(En(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(En(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return ld(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return lf(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return Zc(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var de=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:de},"div")},ln)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var de=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:de},"div")},ln)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var de=ie.cursorCoords(ae.head,"div").top+5,ce=ie.coordsChar({left:0,top:de},"div");return ce.ch<ie.getLine(ce.line).search(/\S/)?lf(ie,ae.head):ce},ln)},goLineUp:function(ie){return ie.moveV(-1,"line")},goLineDown:function(ie){return ie.moveV(1,"line")},goPageUp:function(ie){return ie.moveV(-1,"page")},goPageDown:function(ie){return ie.moveV(1,"page")},goCharLeft:function(ie){return ie.moveH(-1,"char")},goCharRight:function(ie){return ie.moveH(1,"char")},goColumnLeft:function(ie){return ie.moveH(-1,"column")},goColumnRight:function(ie){return ie.moveH(1,"column")},goWordLeft:function(ie){return ie.moveH(-1,"word")},goGroupRight:function(ie){return ie.moveH(1,"group")},goGroupLeft:function(ie){return ie.moveH(-1,"group")},goWordRight:function(ie){return ie.moveH(1,"word")},delCharBefore:function(ie){return ie.deleteH(-1,"codepoint")},delCharAfter:function(ie){return ie.deleteH(1,"char")},delWordBefore:function(ie){return ie.deleteH(-1,"word")},delWordAfter:function(ie){return ie.deleteH(1,"word")},delGroupBefore:function(ie){return ie.deleteH(-1,"group")},delGroupAfter:function(ie){return ie.deleteH(1,"group")},indentAuto:function(ie){return ie.indentSelection("smart")},indentMore:function(ie){return ie.indentSelection("add")},indentLess:function(ie){return ie.indentSelection("subtract")},insertTab:function(ie){return ie.replaceSelection(" ")},insertSoftTab:function(ie){for(var ae=[],de=ie.listSelections(),ce=ie.options.tabSize,me=0;me<de.length;me++){var Le=de[me].from(),_e=Ve(ie.getLine(Le.line),Le.ch,ce);ae.push(mt(ce-_e%ce))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return ii(ie,function(){for(var ae=ie.listSelections(),de=[],ce=0;ce<ae.length;ce++)if(ae[ce].empty()){var me=ae[ce].head,Le=hn(ie.doc,me.line).text;if(Le){if(me.ch==Le.length&&(me=new En(me.line,me.ch-1)),me.ch>0)me=new En(me.line,me.ch+1),ie.replaceRange(Le.charAt(me.ch-1)+Le.charAt(me.ch-2),En(me.line,me.ch-2),me,"+transpose");else if(me.line>ie.doc.first){var _e=hn(ie.doc,me.line-1).text;_e&&(me=new En(me.line,1),ie.replaceRange(Le.charAt(0)+ie.doc.lineSeparator()+_e.charAt(_e.length-1),En(me.line-1,_e.length-1),me,"+transpose"))}}de.push(new ui(me,me))}ie.setSelections(de)})},newlineAndIndent:function(ie){return ii(ie,function(){for(var ae=ie.listSelections(),de=ae.length-1;de>=0;de--)ie.replaceRange(ie.doc.lineSeparator(),ae[de].anchor,ae[de].head,"+input");ae=ie.listSelections();for(var ce=0;ce<ae.length;ce++)ie.indentLine(ae[ce].from().line,null,!0);Cu(ie)})},openLine:function(ie){return ie.replaceSelection(`
|
|
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function ld(ie,ae){var de=hn(ie.doc,ae),ce=Ra(de);return ce!=de&&(ae=Rt(ce)),fc(!0,ie,ce,ae,1)}function Zc(ie,ae){var de=hn(ie.doc,ae),ce=qa(de);return ce!=de&&(ae=Rt(ce)),fc(!0,ie,de,ae,-1)}function lf(ie,ae){var de=ld(ie,ae.line),ce=hn(ie.doc,de.line),me=$n(ce,ie.doc.direction);if(!me||me[0].level==0){var Le=Math.max(de.ch,ce.text.search(/\S/)),_e=ae.line==de.line&&ae.ch<=Le&&ae.ch;return En(de.line,_e?0:Le,de.sticky)}return de}function ud(ie,ae,de){if(typeof ae=="string"&&(ae=gc[ae],!ae))return!1;ie.display.input.ensurePolled();var ce=ie.display.shift,me=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),de&&(ie.display.shift=!1),me=ae(ie)!=kn}finally{ie.display.shift=ce,ie.state.suppressEdits=!1}return me}function uf(ie,ae,de){for(var ce=0;ce<ie.state.keyMaps.length;ce++){var me=qo(ae,ie.state.keyMaps[ce],de,ie);if(me)return me}return ie.options.extraKeys&&qo(ae,ie.options.extraKeys,de,ie)||qo(ae,ie.options.keyMap,de,ie)}var Jh=new Ze;function Wc(ie,ae,de,ce){var me=ie.state.keySeq;if(me){if(qs(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:Jh.set(50,function(){ie.state.keySeq==me&&(ie.state.keySeq=null,ie.display.input.reset())}),hf(ie,me+" "+ae,de,ce))return!0}return hf(ie,ae,de,ce)}function hf(ie,ae,de,ce){var me=uf(ie,ae,ce);return me=="multi"&&(ie.state.keySeq=ae),me=="handled"&&Sr(ie,"keyHandled",ie,ae,de),(me=="handled"||me=="multi")&&(sr(de),Ao(ie)),!!me}function cf(ie,ae){var de=Dl(ae,!0);return de?ae.shiftKey&&!ie.state.keySeq?Wc(ie,"Shift-"+de,ae,function(ce){return ud(ie,ce,!0)})||Wc(ie,de,ae,function(ce){if(typeof ce=="string"?/^go[A-Z]/.test(ce):ce.motion)return ud(ie,ce)}):Wc(ie,de,ae,function(ce){return ud(ie,ce)}):!1}function Dd(ie,ae,de){return Wc(ie,"'"+de+"'",ae,function(ce){return ud(ie,ce,!0)})}var pc=null;function us(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=Mt(),!Ai(ae,ie))){ft&&Be<11&&ie.keyCode==27&&(ie.returnValue=!1);var de=ie.keyCode;ae.display.shift=de==16||ie.shiftKey;var ce=cf(ae,ie);st&&(pc=ce?de:null,!ce&&de==88&&!Ut&&(ue?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),fe&&!ue&&!ce&&de==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),de==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&Wa(ae)}}function Wa(ie){var ae=ie.display.lineDiv;pt(ae,"CodeMirror-crosshair");function de(ce){(ce.keyCode==18||!ce.altKey)&&(Re(ae,"CodeMirror-crosshair"),wr(document,"keyup",de),wr(document,"mouseover",de))}ri(document,"keyup",de),ri(document,"mouseover",de)}function Lu(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),Ai(this,ie)}function dl(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(zs(ae.display,ie)||Ai(ae,ie)||ie.ctrlKey&&!ie.altKey||ue&&ie.metaKey)){var de=ie.keyCode,ce=ie.charCode;if(st&&de==pc){pc=null,sr(ie);return}if(!(st&&(!ie.which||ie.which<10)&&cf(ae,ie))){var me=String.fromCharCode(ce==null?de:ce);me!="\b"&&(Dd(ae,ie,me)||ae.display.input.onKeyPress(ie))}}}var Ol=400,$l=function(ie,ae,de){this.time=ie,this.pos=ae,this.button=de};$l.prototype.compare=function(ie,ae,de){return this.time+Ol>ie&&li(ae,this.pos)==0&&de==this.button};var qu,Mu;function mc(ie,ae){var de=+new Date;return Mu&&Mu.compare(de,ie,ae)?(qu=Mu=null,"triple"):qu&&qu.compare(de,ie,ae)?(Mu=new $l(de,ie,ae),qu=null,"double"):(qu=new $l(de,ie,ae),Mu=null,"single")}function Fu(ie){var ae=this,de=ae.display;if(!(Ai(ae,ie)||de.activeTouch&&de.input.supportsTouch())){if(de.input.ensurePolled(),de.shift=ie.shiftKey,zs(de,ie)){He||(de.scroller.draggable=!1,setTimeout(function(){return de.scroller.draggable=!0},100));return}if(!ug(ae,ie)){var ce=No(ae,ie),me=pi(ie),Le=ce?mc(ce,me):"single";window.focus(),me==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(ce&&vc(ae,me,ce,Le,ie))&&(me==1?ce?Od(ae,ce,Le,ie):mo(ie)==de.scroller&&sr(ie):me==2?(ce&&es(ae.doc,ce),setTimeout(function(){return de.input.focus()},20)):me==3&&(Pe?ae.display.input.onContextMenu(ie):Pa(ae)))}}}function vc(ie,ae,de,ce,me){var Le="Click";return ce=="double"?Le="Double"+Le:ce=="triple"&&(Le="Triple"+Le),Le=(ae==1?"Left":ae==2?"Middle":"Right")+Le,Wc(ie,bu(Le,me),me,function(_e){if(typeof _e=="string"&&(_e=gc[_e]),!_e)return!1;var Xe=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),Xe=_e(ie,de)!=kn}finally{ie.state.suppressEdits=!1}return Xe})}function Vc(ie,ae,de){var ce=ie.getOption("configureMouse"),me=ce?ce(ie,ae,de):{};if(me.unit==null){var Le=se?de.shiftKey&&de.metaKey:de.altKey;me.unit=Le?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(me.extend==null||ie.doc.extend)&&(me.extend=ie.doc.extend||de.shiftKey),me.addNew==null&&(me.addNew=ue?de.metaKey:de.ctrlKey),me.moveOnDrag==null&&(me.moveOnDrag=!(ue?de.altKey:de.ctrlKey)),me}function Od(ie,ae,de,ce){ft?setTimeout(vn(Ho,ie),0):ie.curOp.focus=Mt();var me=Vc(ie,de,ce),Le=ie.doc.sel,_e;ie.options.dragDrop&&ti&&!ie.isReadOnly()&&de=="single"&&(_e=Le.contains(ae))>-1&&(li((_e=Le.ranges[_e]).from(),ae)<0||ae.xRel>0)&&(li(_e.to(),ae)>0||ae.xRel<0)?ep(ie,ce,ae,me):tv(ie,ce,ae,me)}function ep(ie,ae,de,ce){var me=ie.display,Le=!1,_e=fi(ie,function(ht){He&&(me.scroller.draggable=!1),ie.state.draggingText=!1,wr(me.wrapper.ownerDocument,"mouseup",_e),wr(me.wrapper.ownerDocument,"mousemove",Xe),wr(me.scroller,"dragstart",Ue),wr(me.scroller,"drop",_e),Le||(sr(ht),ce.addNew||es(ie.doc,de,null,null,ce.extend),He&&!Ft||ft&&Be==9?setTimeout(function(){me.wrapper.ownerDocument.body.focus({preventScroll:!0}),me.input.focus()},20):me.input.focus())}),Xe=function(ht){Le=Le||Math.abs(ae.clientX-ht.clientX)+Math.abs(ae.clientY-ht.clientY)>=10},Ue=function(){return Le=!0};He&&(me.scroller.draggable=!0),ie.state.draggingText=_e,_e.copy=!ce.moveOnDrag,me.scroller.dragDrop&&me.scroller.dragDrop(),ri(me.wrapper.ownerDocument,"mouseup",_e),ri(me.wrapper.ownerDocument,"mousemove",Xe),ri(me.scroller,"dragstart",Ue),ri(me.scroller,"drop",_e),Pa(ie),setTimeout(function(){return me.input.focus()},20)}function tp(ie,ae,de){if(de=="char")return new ui(ae,ae);if(de=="word")return ie.findWordAt(ae);if(de=="line")return new ui(En(ae.line,0),er(ie.doc,En(ae.line+1,0)));var ce=de(ie,ae);return new ui(ce.from,ce.to)}function tv(ie,ae,de,ce){var me=ie.display,Le=ie.doc;sr(ae);var _e,Xe,Ue=Le.sel,ht=Ue.ranges;if(ce.addNew&&!ce.extend?(Xe=Le.sel.contains(de),Xe>-1?_e=ht[Xe]:_e=new ui(de,de)):(_e=Le.sel.primary(),Xe=Le.sel.primIndex),ce.unit=="rectangle")ce.addNew||(_e=new ui(de,de)),de=No(ie,ae,!0,!0),Xe=-1;else{var Kt=tp(ie,de,ce.unit);ce.extend?_e=Oa(_e,Kt.anchor,Kt.head,ce.extend):_e=Kt}ce.addNew?Xe==-1?(Xe=ht.length,ar(Le,Fi(ie,ht.concat([_e]),Xe),{scroll:!1,origin:"*mouse"})):ht.length>1&&ht[Xe].empty()&&ce.unit=="char"&&!ce.extend?(ar(Le,Fi(ie,ht.slice(0,Xe).concat(ht.slice(Xe+1)),0),{scroll:!1,origin:"*mouse"}),Ue=Le.sel):as(Le,Xe,_e,pn):(Xe=0,ar(Le,new mi([_e],0),pn),Ue=Le.sel);var xt=de;function yn(Dr){if(li(xt,Dr)!=0)if(xt=Dr,ce.unit=="rectangle"){for(var Po=[],aa=ie.options.tabSize,Br=Ve(hn(Le,de.line).text,de.ch,aa),Aa=Ve(hn(Le,Dr.line).text,Dr.ch,aa),Ys=Math.min(Br,Aa),Kl=Math.max(Br,Aa),sl=Math.min(de.line,Dr.line),th=Math.min(ie.lastLine(),Math.max(de.line,Dr.line));sl<=th;sl++){var ku=hn(Le,sl).text,Il=jn(ku,Ys,aa);Ys==Kl?Po.push(new ui(En(sl,Il),En(sl,Il))):ku.length>Il&&Po.push(new ui(En(sl,Il),En(sl,jn(ku,Kl,aa))))}Po.length||Po.push(new ui(de,de)),ar(Le,Fi(ie,Ue.ranges.slice(0,Xe).concat(Po),Xe),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Dr)}else{var uh=_e,fu=tp(ie,Dr,ce.unit),Rl=uh.anchor,hs;li(fu.anchor,Rl)>0?(hs=fu.head,Rl=Yi(uh.from(),fu.anchor)):(hs=fu.anchor,Rl=sa(uh.to(),fu.head));var fl=Ue.ranges.slice(0);fl[Xe]=am(ie,new ui(er(Le,Rl),hs)),ar(Le,Fi(ie,fl,Xe),pn)}}var fn=me.wrapper.getBoundingClientRect(),wi=0;function Mi(Dr){var Po=++wi,aa=No(ie,Dr,!0,ce.unit=="rectangle");if(aa)if(li(aa,xt)!=0){ie.curOp.focus=Mt(),yn(aa);var Br=Xr(me,Le);(aa.line>=Br.to||aa.line<Br.from)&&setTimeout(fi(ie,function(){wi==Po&&Mi(Dr)}),150)}else{var Aa=Dr.clientY<fn.top?-20:Dr.clientY>fn.bottom?20:0;Aa&&setTimeout(fi(ie,function(){wi==Po&&(me.scroller.scrollTop+=Aa,Mi(Dr))}),50)}}function Hi(Dr){ie.state.selectingText=!1,wi=1/0,Dr&&(sr(Dr),me.input.focus()),wr(me.wrapper.ownerDocument,"mousemove",dr),wr(me.wrapper.ownerDocument,"mouseup",oo),Le.history.lastSelOrigin=null}var dr=fi(ie,function(Dr){Dr.buttons===0||!pi(Dr)?Hi(Dr):Mi(Dr)}),oo=fi(ie,Hi);ie.state.selectingText=oo,ri(me.wrapper.ownerDocument,"mousemove",dr),ri(me.wrapper.ownerDocument,"mouseup",oo)}function am(ie,ae){var de=ae.anchor,ce=ae.head,me=hn(ie.doc,de.line);if(li(de,ce)==0&&de.sticky==ce.sticky)return ae;var Le=$n(me);if(!Le)return ae;var _e=Zt(Le,de.ch,de.sticky),Xe=Le[_e];if(Xe.from!=de.ch&&Xe.to!=de.ch)return ae;var Ue=_e+(Xe.from==de.ch==(Xe.level!=1)?0:1);if(Ue==0||Ue==Le.length)return ae;var ht;if(ce.line!=de.line)ht=(ce.line-de.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var Kt=Zt(Le,ce.ch,ce.sticky),xt=Kt-_e||(ce.ch-de.ch)*(Xe.level==1?-1:1);Kt==Ue-1||Kt==Ue?ht=xt<0:ht=xt>0}var yn=Le[Ue+(ht?-1:0)],fn=ht==(yn.level==1),wi=fn?yn.from:yn.to,Mi=fn?"after":"before";return de.ch==wi&&de.sticky==Mi?ae:new ui(new En(de.line,wi,Mi),ce)}function lg(ie,ae,de,ce){var me,Le;if(ae.touches)me=ae.touches[0].clientX,Le=ae.touches[0].clientY;else try{me=ae.clientX,Le=ae.clientY}catch(yn){return!1}if(me>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;ce&&sr(ae);var _e=ie.display,Xe=_e.lineDiv.getBoundingClientRect();if(Le>Xe.bottom||!Yn(ie,de))return Ni(ae);Le-=Xe.top-_e.viewOffset;for(var Ue=0;Ue<ie.display.gutterSpecs.length;++Ue){var ht=_e.gutters.childNodes[Ue];if(ht&&ht.getBoundingClientRect().right>=me){var Kt=Si(ie.doc,Le),xt=ie.display.gutterSpecs[Ue];return Li(ie,de,ie,Kt,xt.className,ae),Ni(ae)}}}function ug(ie,ae){return lg(ie,ae,"gutterClick",!0)}function hg(ie,ae){zs(ie.display,ae)||sm(ie,ae)||Ai(ie,ae,"contextmenu")||Pe||ie.display.input.onContextMenu(ae)}function sm(ie,ae){return Yn(ie,"gutterContextMenu")?lg(ie,ae,"gutterContextMenu",!1):!1}function cg(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Sh(ie)}var hd={toString:function(){return"CodeMirror.Init"}},np={},Df={};function lm(ie){var ae=ie.optionHandlers;function de(ce,me,Le,_e){ie.defaults[ce]=me,Le&&(ae[ce]=_e?function(Xe,Ue,ht){ht!=hd&&Le(Xe,Ue,ht)}:Le)}ie.defineOption=de,ie.Init=hd,de("value","",function(ce,me){return ce.setValue(me)},!0),de("mode",null,function(ce,me){ce.doc.modeOption=me,bi(ce)},!0),de("indentUnit",2,bi,!0),de("indentWithTabs",!1),de("smartIndent",!0),de("tabSize",4,function(ce){Kr(ce),Sh(ce),ur(ce)},!0),de("lineSeparator",null,function(ce,me){if(ce.doc.lineSep=me,!!me){var Le=[],_e=ce.doc.first;ce.doc.iter(function(Ue){for(var ht=0;;){var Kt=Ue.text.indexOf(me,ht);if(Kt==-1)break;ht=Kt+me.length,Le.push(En(_e,Kt))}_e++});for(var Xe=Le.length-1;Xe>=0;Xe--)ts(ce.doc,me,Le[Xe],En(Le[Xe].line,Le[Xe].ch+me.length))}}),de("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ce,me,Le){ce.state.specialChars=new RegExp(me.source+(me.test(" ")?"":"| "),"g"),Le!=hd&&ce.refresh()}),de("specialCharPlaceholder",El,function(ce){return ce.refresh()},!0),de("electricChars",!0),de("inputStyle",te?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),de("spellcheck",!1,function(ce,me){return ce.getInputField().spellcheck=me},!0),de("autocorrect",!1,function(ce,me){return ce.getInputField().autocorrect=me},!0),de("autocapitalize",!1,function(ce,me){return ce.getInputField().autocapitalize=me},!0),de("rtlMoveVisually",!pe),de("wholeLineUpdateBefore",!0),de("theme","default",function(ce){cg(ce),gn(ce)},!0),de("keyMap","default",function(ce,me,Le){var _e=Wl(me),Xe=Le!=hd&&Wl(Le);Xe&&Xe.detach&&Xe.detach(ce,_e),_e.attach&&_e.attach(ce,Xe||null)}),de("extraKeys",null),de("configureMouse",null),de("lineWrapping",!1,um,!0),de("gutters",[],function(ce,me){ce.display.gutterSpecs=jt(me,ce.options.lineNumbers),gn(ce)},!0),de("fixedGutter",!0,function(ce,me){ce.display.gutters.style.left=me?vo(ce.display)+"px":"0",ce.refresh()},!0),de("coverGutterNextToScrollbar",!1,function(ce){return wn(ce)},!0),de("scrollbarStyle","native",function(ce){Pi(ce),wn(ce),ce.display.scrollbars.setScrollTop(ce.doc.scrollTop),ce.display.scrollbars.setScrollLeft(ce.doc.scrollLeft)},!0),de("lineNumbers",!1,function(ce,me){ce.display.gutterSpecs=jt(ce.options.gutters,me),gn(ce)},!0),de("firstLineNumber",1,gn,!0),de("lineNumberFormatter",function(ce){return ce},gn,!0),de("showCursorWhenSelecting",!1,Vi,!0),de("resetSelectionOnContextMenu",!0),de("lineWiseCopyCut",!0),de("pasteLinesPerSelection",!0),de("selectionsMayTouch",!1),de("readOnly",!1,function(ce,me){me=="nocursor"&&(Vs(ce),ce.display.input.blur()),ce.display.input.readOnlyChanged(me)}),de("screenReaderLabel",null,function(ce,me){me=me===""?null:me,ce.display.input.screenReaderLabelChanged(me)}),de("disableInput",!1,function(ce,me){me||ce.display.input.reset()},!0),de("dragDrop",!0,dg),de("allowDropFileTypes",null),de("cursorBlinkRate",530),de("cursorScrollMargin",0),de("cursorHeight",1,Vi,!0),de("singleCursorHeightPerLine",!0,Vi,!0),de("workTime",100),de("workDelay",100),de("flattenSpans",!0,Kr,!0),de("addModeClass",!1,Kr,!0),de("pollInterval",100),de("undoDepth",200,function(ce,me){return ce.doc.history.undoDepth=me}),de("historyEventDelay",1250),de("viewportMargin",10,function(ce){return ce.refresh()},!0),de("maxHighlightLength",1e4,Kr,!0),de("moveInputWithCursor",!0,function(ce,me){me||ce.display.input.resetPosition()}),de("tabindex",null,function(ce,me){return ce.display.input.getField().tabIndex=me||""}),de("autofocus",null),de("direction","ltr",function(ce,me){return ce.doc.setDirection(me)},!0),de("phrases",null)}function dg(ie,ae,de){var ce=de&&de!=hd;if(!ae!=!ce){var me=ie.display.dragFunctions,Le=ae?ri:wr;Le(ie.display.scroller,"dragstart",me.start),Le(ie.display.scroller,"dragenter",me.enter),Le(ie.display.scroller,"dragover",me.over),Le(ie.display.scroller,"dragleave",me.leave),Le(ie.display.scroller,"drop",me.drop)}}function um(ie){ie.options.lineWrapping?(pt(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(Re(ie.display.wrapper,"CodeMirror-wrap"),Ta(ie)),Ki(ie),ur(ie),Sh(ie),setTimeout(function(){return wn(ie)},100)}function is(ie,ae){var de=this;if(!(this instanceof is))return new is(ie,ae);this.options=ae=ae?Tn(ae):{},Tn(np,ae,!1);var ce=ae.value;typeof ce=="string"?ce=new Wo(ce,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(ce.modeOption=ae.mode),this.doc=ce;var me=new is.inputStyles[ae.inputStyle](this),Le=this.display=new Vn(ie,ce,me,ae);Le.wrapper.CodeMirror=this,cg(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Pi(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 Ze,keySeq:null,specialChars:null},ae.autofocus&&!te&&Le.input.focus(),ft&&Be<11&&setTimeout(function(){return de.display.input.reset(!0)},20),df(this),Ja(),di(this),this.curOp.forceUpdate=!0,nr(this,ce),ae.autofocus&&!te||this.hasFocus()?setTimeout(function(){de.hasFocus()&&!de.state.focused&&qi(de)},20):Vs(this);for(var _e in Df)Df.hasOwnProperty(_e)&&Df[_e](this,ae[_e],hd);at(this),ae.finishInit&&ae.finishInit(this);for(var Xe=0;Xe<_d.length;++Xe)_d[Xe](this);ei(this),He&&ae.lineWrapping&&getComputedStyle(Le.lineDiv).textRendering=="optimizelegibility"&&(Le.lineDiv.style.textRendering="auto")}is.defaults=np,is.optionHandlers=Df;function df(ie){var ae=ie.display;ri(ae.scroller,"mousedown",fi(ie,Fu)),ft&&Be<11?ri(ae.scroller,"dblclick",fi(ie,function(Ue){if(!Ai(ie,Ue)){var ht=No(ie,Ue);if(!(!ht||ug(ie,Ue)||zs(ie.display,Ue))){sr(Ue);var Kt=ie.findWordAt(ht);es(ie.doc,Kt.anchor,Kt.head)}}})):ri(ae.scroller,"dblclick",function(Ue){return Ai(ie,Ue)||sr(Ue)}),ri(ae.scroller,"contextmenu",function(Ue){return hg(ie,Ue)}),ri(ae.input.getField(),"contextmenu",function(Ue){ae.scroller.contains(Ue.target)||hg(ie,Ue)});var de,ce={end:0};function me(){ae.activeTouch&&(de=setTimeout(function(){return ae.activeTouch=null},1e3),ce=ae.activeTouch,ce.end=+new Date)}function Le(Ue){if(Ue.touches.length!=1)return!1;var ht=Ue.touches[0];return ht.radiusX<=1&&ht.radiusY<=1}function _e(Ue,ht){if(ht.left==null)return!0;var Kt=ht.left-Ue.left,xt=ht.top-Ue.top;return Kt*Kt+xt*xt>20*20}ri(ae.scroller,"touchstart",function(Ue){if(!Ai(ie,Ue)&&!Le(Ue)&&!ug(ie,Ue)){ae.input.ensurePolled(),clearTimeout(de);var ht=+new Date;ae.activeTouch={start:ht,moved:!1,prev:ht-ce.end<=300?ce:null},Ue.touches.length==1&&(ae.activeTouch.left=Ue.touches[0].pageX,ae.activeTouch.top=Ue.touches[0].pageY)}}),ri(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),ri(ae.scroller,"touchend",function(Ue){var ht=ae.activeTouch;if(ht&&!zs(ae,Ue)&&ht.left!=null&&!ht.moved&&new Date-ht.start<300){var Kt=ie.coordsChar(ae.activeTouch,"page"),xt;!ht.prev||_e(ht,ht.prev)?xt=new ui(Kt,Kt):!ht.prev.prev||_e(ht,ht.prev.prev)?xt=ie.findWordAt(Kt):xt=new ui(En(Kt.line,0),er(ie.doc,En(Kt.line+1,0))),ie.setSelection(xt.anchor,xt.head),ie.focus(),sr(Ue)}me()}),ri(ae.scroller,"touchcancel",me),ri(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(dt(ie,ae.scroller.scrollTop),Pt(ie,ae.scroller.scrollLeft,!0),Li(ie,"scroll",ie))}),ri(ae.scroller,"mousewheel",function(Ue){return _i(ie,Ue)}),ri(ae.scroller,"DOMMouseScroll",function(Ue){return _i(ie,Ue)}),ri(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function(Ue){Ai(ie,Ue)||lr(Ue)},over:function(Ue){Ai(ie,Ue)||(Ca(ie,Ue),lr(Ue))},start:function(Ue){return Xo(ie,Ue)},drop:fi(ie,Zl),leave:function(Ue){Ai(ie,Ue)||ca(ie)}};var Xe=ae.input.getField();ri(Xe,"keyup",function(Ue){return Lu.call(ie,Ue)}),ri(Xe,"keydown",fi(ie,us)),ri(Xe,"keypress",fi(ie,dl)),ri(Xe,"focus",function(Ue){return qi(ie,Ue)}),ri(Xe,"blur",function(Ue){return Vs(ie,Ue)})}var _d=[];is.defineInitHook=function(ie){return _d.push(ie)};function Vl(ie,ae,de,ce){var me=ie.doc,Le;de==null&&(de="add"),de=="smart"&&(me.mode.indent?Le=$a(ie,ae).state:de="prev");var _e=ie.options.tabSize,Xe=hn(me,ae),Ue=Ve(Xe.text,null,_e);Xe.stateAfter&&(Xe.stateAfter=null);var ht=Xe.text.match(/^\s*/)[0],Kt;if(!ce&&!/\S/.test(Xe.text))Kt=0,de="not";else if(de=="smart"&&(Kt=me.mode.indent(Le,Xe.text.slice(ht.length),Xe.text),Kt==kn||Kt>150)){if(!ce)return;de="prev"}de=="prev"?ae>me.first?Kt=Ve(hn(me,ae-1).text,null,_e):Kt=0:de=="add"?Kt=Ue+ie.options.indentUnit:de=="subtract"?Kt=Ue-ie.options.indentUnit:typeof de=="number"&&(Kt=Ue+de),Kt=Math.max(0,Kt);var xt="",yn=0;if(ie.options.indentWithTabs)for(var fn=Math.floor(Kt/_e);fn;--fn)yn+=_e,xt+=" ";if(yn<Kt&&(xt+=mt(Kt-yn)),xt!=ht)return ts(me,xt,En(ae,0),En(ae,ht.length),"+input"),Xe.stateAfter=null,!0;for(var wi=0;wi<me.sel.ranges.length;wi++){var Mi=me.sel.ranges[wi];if(Mi.head.line==ae&&Mi.head.ch<ht.length){var Hi=En(ae,ht.length);as(me,wi,new ui(Hi,Hi));break}}}var eh=null;function Id(ie){eh=ie}function Of(ie,ae,de,ce,me){var Le=ie.doc;ie.display.shift=!1,ce||(ce=Le.sel);var _e=+new Date-200,Xe=me=="paste"||ie.state.pasteIncoming>_e,Ue=an(ae),ht=null;if(Xe&&ce.ranges.length>1)if(eh&&eh.text.join(`
|
|
`)==ae){if(ce.ranges.length%eh.text.length==0){ht=[];for(var Kt=0;Kt<eh.text.length;Kt++)ht.push(Le.splitLines(eh.text[Kt]))}}else Ue.length==ce.ranges.length&&ie.options.pasteLinesPerSelection&&(ht=on(Ue,function(dr){return[dr]}));for(var xt=ie.curOp.updateInput,yn=ce.ranges.length-1;yn>=0;yn--){var fn=ce.ranges[yn],wi=fn.from(),Mi=fn.to();fn.empty()&&(de&&de>0?wi=En(wi.line,wi.ch-de):ie.state.overwrite&&!Xe?Mi=En(Mi.line,Math.min(hn(Le,Mi.line).text.length,Mi.ch+Et(Ue).length)):Xe&&eh&&eh.lineWise&&eh.text.join(`
|
|
`)==Ue.join(`
|
|
`)&&(wi=Mi=En(wi.line,0)));var Hi={from:wi,to:Mi,text:ht?ht[yn%ht.length]:Ue,origin:me||(Xe?"paste":ie.state.cutIncoming>_e?"cut":"+input")};ns(ie.doc,Hi),Sr(ie,"inputRead",ie,Hi)}ae&&!Xe&&rp(ie,ae),Cu(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=xt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function ip(ie,ae){var de=ie.clipboardData&&ie.clipboardData.getData("Text");if(de)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&ii(ae,function(){return Of(ae,de,0,null,"paste")}),!0}function rp(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var de=ie.doc.sel,ce=de.ranges.length-1;ce>=0;ce--){var me=de.ranges[ce];if(!(me.head.ch>100||ce&&de.ranges[ce-1].head.line==me.head.line)){var Le=ie.getModeAt(me.head),_e=!1;if(Le.electricChars){for(var Xe=0;Xe<Le.electricChars.length;Xe++)if(ae.indexOf(Le.electricChars.charAt(Xe))>-1){_e=Vl(ie,me.head.line,"smart");break}}else Le.electricInput&&Le.electricInput.test(hn(ie.doc,me.head.line).text.slice(0,me.head.ch))&&(_e=Vl(ie,me.head.line,"smart"));_e&&Sr(ie,"electricInput",ie,me.head.line)}}}function op(ie){for(var ae=[],de=[],ce=0;ce<ie.doc.sel.ranges.length;ce++){var me=ie.doc.sel.ranges[ce].head.line,Le={anchor:En(me,0),head:En(me+1,0)};de.push(Le),ae.push(ie.getRange(Le.anchor,Le.head))}return{text:ae,ranges:de}}function ap(ie,ae,de,ce){ie.setAttribute("autocorrect",de?"":"off"),ie.setAttribute("autocapitalize",ce?"":"off"),ie.setAttribute("spellcheck",!!ae)}function sp(){var ie=Je("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=Je("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return He?ie.style.width="1000px":ie.setAttribute("wrap","off"),Ae&&(ie.style.border="1px solid black"),ap(ie),ae}function cd(ie){var ae=ie.optionHandlers,de=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ce,me){var Le=this.options,_e=Le[ce];Le[ce]==me&&ce!="mode"||(Le[ce]=me,ae.hasOwnProperty(ce)&&fi(this,ae[ce])(this,me,_e),Li(this,"optionChange",this,ce))},getOption:function(ce){return this.options[ce]},getDoc:function(){return this.doc},addKeyMap:function(ce,me){this.state.keyMaps[me?"push":"unshift"](Wl(ce))},removeKeyMap:function(ce){for(var me=this.state.keyMaps,Le=0;Le<me.length;++Le)if(me[Le]==ce||me[Le].name==ce)return me.splice(Le,1),!0},addOverlay:Bn(function(ce,me){var Le=ce.token?ce:ie.getMode(this.options,ce);if(Le.startState)throw new Error("Overlays may not be stateful.");Yt(this.state.overlays,{mode:Le,modeSpec:ce,opaque:me&&me.opaque,priority:me&&me.priority||0},function(_e){return _e.priority}),this.state.modeGen++,ur(this)}),removeOverlay:Bn(function(ce){for(var me=this.state.overlays,Le=0;Le<me.length;++Le){var _e=me[Le].modeSpec;if(_e==ce||typeof ce=="string"&&_e.name==ce){me.splice(Le,1),this.state.modeGen++,ur(this);return}}}),indentLine:Bn(function(ce,me,Le){typeof me!="string"&&typeof me!="number"&&(me==null?me=this.options.smartIndent?"smart":"prev":me=me?"add":"subtract"),Zi(this.doc,ce)&&Vl(this,ce,me,Le)}),indentSelection:Bn(function(ce){for(var me=this.doc.sel.ranges,Le=-1,_e=0;_e<me.length;_e++){var Xe=me[_e];if(Xe.empty())Xe.head.line>Le&&(Vl(this,Xe.head.line,ce,!0),Le=Xe.head.line,_e==this.doc.sel.primIndex&&Cu(this));else{var Ue=Xe.from(),ht=Xe.to(),Kt=Math.max(Le,Ue.line);Le=Math.min(this.lastLine(),ht.line-(ht.ch?0:1))+1;for(var xt=Kt;xt<Le;++xt)Vl(this,xt,ce);var yn=this.doc.sel.ranges;Ue.ch==0&&me.length==yn.length&&yn[_e].from().ch>0&&as(this.doc,_e,new ui(Ue,yn[_e].to()),At)}}}),getTokenAt:function(ce,me){return Ia(this,ce,me)},getLineTokens:function(ce,me){return Ia(this,En(ce),me,!0)},getTokenTypeAt:function(ce){ce=er(this.doc,ce);var me=xs(this,hn(this.doc,ce.line)),Le=0,_e=(me.length-1)/2,Xe=ce.ch,Ue;if(Xe==0)Ue=me[2];else for(;;){var ht=Le+_e>>1;if((ht?me[ht*2-1]:0)>=Xe)_e=ht;else if(me[ht*2+1]<Xe)Le=ht+1;else{Ue=me[ht*2+2];break}}var Kt=Ue?Ue.indexOf("overlay "):-1;return Kt<0?Ue:Kt==0?null:Ue.slice(0,Kt-1)},getModeAt:function(ce){var me=this.doc.mode;return me.innerMode?ie.innerMode(me,this.getTokenAt(ce).state).mode:me},getHelper:function(ce,me){return this.getHelpers(ce,me)[0]},getHelpers:function(ce,me){var Le=[];if(!de.hasOwnProperty(me))return Le;var _e=de[me],Xe=this.getModeAt(ce);if(typeof Xe[me]=="string")_e[Xe[me]]&&Le.push(_e[Xe[me]]);else if(Xe[me])for(var Ue=0;Ue<Xe[me].length;Ue++){var ht=_e[Xe[me][Ue]];ht&&Le.push(ht)}else Xe.helperType&&_e[Xe.helperType]?Le.push(_e[Xe.helperType]):_e[Xe.name]&&Le.push(_e[Xe.name]);for(var Kt=0;Kt<_e._global.length;Kt++){var xt=_e._global[Kt];xt.pred(Xe,this)&&Qe(Le,xt.val)==-1&&Le.push(xt.val)}return Le},getStateAfter:function(ce,me){var Le=this.doc;return ce=Wi(Le,ce==null?Le.first+Le.size-1:ce),$a(this,ce+1,me).state},cursorCoords:function(ce,me){var Le,_e=this.doc.sel.primary();return ce==null?Le=_e.head:typeof ce=="object"?Le=er(this.doc,ce):Le=ce?_e.from():_e.to(),Ya(this,Le,me||"page")},charCoords:function(ce,me){return ys(this,er(this.doc,ce),me||"page")},coordsChar:function(ce,me){return ce=Xh(this,ce,me||"page"),Fc(this,ce.left,ce.top)},lineAtHeight:function(ce,me){return ce=Xh(this,{top:ce,left:0},me||"page").top,Si(this.doc,ce+this.display.viewOffset)},heightAtLine:function(ce,me,Le){var _e=!1,Xe;if(typeof ce=="number"){var Ue=this.doc.first+this.doc.size-1;ce<this.doc.first?ce=this.doc.first:ce>Ue&&(ce=Ue,_e=!0),Xe=hn(this.doc,ce)}else Xe=ce;return Qs(this,Xe,{top:0,left:0},me||"page",Le||_e).top+(_e?this.doc.height-Io(Xe):0)},defaultTextHeight:function(){return Tr(this.display)},defaultCharWidth:function(){return Ir(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ce,me,Le,_e,Xe){var Ue=this.display;ce=Ya(this,er(this.doc,ce));var ht=ce.bottom,Kt=ce.left;if(me.style.position="absolute",me.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(me),Ue.sizer.appendChild(me),_e=="over")ht=ce.top;else if(_e=="above"||_e=="near"){var xt=Math.max(Ue.wrapper.clientHeight,this.doc.height),yn=Math.max(Ue.sizer.clientWidth,Ue.lineSpace.clientWidth);(_e=="above"||ce.bottom+me.offsetHeight>xt)&&ce.top>me.offsetHeight?ht=ce.top-me.offsetHeight:ce.bottom+me.offsetHeight<=xt&&(ht=ce.bottom),Kt+me.offsetWidth>yn&&(Kt=yn-me.offsetWidth)}me.style.top=ht+"px",me.style.left=me.style.right="",Xe=="right"?(Kt=Ue.sizer.clientWidth-me.offsetWidth,me.style.right="0px"):(Xe=="left"?Kt=0:Xe=="middle"&&(Kt=(Ue.sizer.clientWidth-me.offsetWidth)/2),me.style.left=Kt+"px"),Le&&Gs(this,{left:Kt,top:ht,right:Kt+me.offsetWidth,bottom:ht+me.offsetHeight})},triggerOnKeyDown:Bn(us),triggerOnKeyPress:Bn(dl),triggerOnKeyUp:Lu,triggerOnMouseDown:Bn(Fu),execCommand:function(ce){if(gc.hasOwnProperty(ce))return gc[ce].call(null,this)},triggerElectric:Bn(function(ce){rp(this,ce)}),findPosH:function(ce,me,Le,_e){var Xe=1;me<0&&(Xe=-1,me=-me);for(var Ue=er(this.doc,ce),ht=0;ht<me&&(Ue=_f(this.doc,Ue,Xe,Le,_e),!Ue.hitSide);++ht);return Ue},moveH:Bn(function(ce,me){var Le=this;this.extendSelectionsBy(function(_e){return Le.display.shift||Le.doc.extend||_e.empty()?_f(Le.doc,_e.head,ce,me,Le.options.rtlMoveVisually):ce<0?_e.from():_e.to()},ln)}),deleteH:Bn(function(ce,me){var Le=this.doc.sel,_e=this.doc;Le.somethingSelected()?_e.replaceSelection("",null,"+delete"):wl(this,function(Xe){var Ue=_f(_e,Xe.head,ce,me,!1);return ce<0?{from:Ue,to:Xe.head}:{from:Xe.head,to:Ue}})}),findPosV:function(ce,me,Le,_e){var Xe=1,Ue=_e;me<0&&(Xe=-1,me=-me);for(var ht=er(this.doc,ce),Kt=0;Kt<me;++Kt){var xt=Ya(this,ht,"div");if(Ue==null?Ue=xt.left:xt.left=Ue,ht=dd(this,xt,Xe,Le),ht.hitSide)break}return ht},moveV:Bn(function(ce,me){var Le=this,_e=this.doc,Xe=[],Ue=!this.display.shift&&!_e.extend&&_e.sel.somethingSelected();if(_e.extendSelectionsBy(function(Kt){if(Ue)return ce<0?Kt.from():Kt.to();var xt=Ya(Le,Kt.head,"div");Kt.goalColumn!=null&&(xt.left=Kt.goalColumn),Xe.push(xt.left);var yn=dd(Le,xt,ce,me);return me=="page"&&Kt==_e.sel.primary()&&Ah(Le,ys(Le,yn,"div").top-xt.top),yn},ln),Xe.length)for(var ht=0;ht<_e.sel.ranges.length;ht++)_e.sel.ranges[ht].goalColumn=Xe[ht]}),findWordAt:function(ce){var me=this.doc,Le=hn(me,ce.line).text,_e=ce.ch,Xe=ce.ch;if(Le){var Ue=this.getHelper(ce,"wordChars");(ce.sticky=="before"||Xe==Le.length)&&_e?--_e:++Xe;for(var ht=Le.charAt(_e),Kt=Ge(ht,Ue)?function(xt){return Ge(xt,Ue)}:/\s/.test(ht)?function(xt){return/\s/.test(xt)}:function(xt){return!/\s/.test(xt)&&!Ge(xt)};_e>0&&Kt(Le.charAt(_e-1));)--_e;for(;Xe<Le.length&&Kt(Le.charAt(Xe));)++Xe}return new ui(En(ce.line,_e),En(ce.line,Xe))},toggleOverwrite:function(ce){ce!=null&&ce==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?pt(this.display.cursorDiv,"CodeMirror-overwrite"):Re(this.display.cursorDiv,"CodeMirror-overwrite"),Li(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Mt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Bn(function(ce,me){ju(this,ce,me)}),getScrollInfo:function(){var ce=this.display.scroller;return{left:ce.scrollLeft,top:ce.scrollTop,height:ce.scrollHeight-Ml(this)-this.display.barHeight,width:ce.scrollWidth-Ml(this)-this.display.barWidth,clientHeight:uc(this),clientWidth:Eu(this)}},scrollIntoView:Bn(function(ce,me){ce==null?(ce={from:this.doc.sel.primary().head,to:null},me==null&&(me=this.options.cursorScrollMargin)):typeof ce=="number"?ce={from:En(ce,0),to:null}:ce.from==null&&(ce={from:ce,to:null}),ce.to||(ce.to=ce.from),ce.margin=me||0,ce.from.line!=null?gr(this,ce):We(this,ce.from,ce.to,ce.margin)}),setSize:Bn(function(ce,me){var Le=this,_e=function(Ue){return typeof Ue=="number"||/^\d+$/.test(String(Ue))?Ue+"px":Ue};ce!=null&&(this.display.wrapper.style.width=_e(ce)),me!=null&&(this.display.wrapper.style.height=_e(me)),this.options.lineWrapping&&cc(this);var Xe=this.display.viewFrom;this.doc.iter(Xe,this.display.viewTo,function(Ue){if(Ue.widgets){for(var ht=0;ht<Ue.widgets.length;ht++)if(Ue.widgets[ht].noHScroll){Qi(Le,Xe,"widget");break}}++Xe}),this.curOp.forceUpdate=!0,Li(this,"refresh",this)}),operation:function(ce){return ii(this,ce)},startOperation:function(){return di(this)},endOperation:function(){return ei(this)},refresh:Bn(function(){var ce=this.display.cachedTextHeight;ur(this),this.curOp.forceUpdate=!0,Sh(this),ju(this,this.doc.scrollLeft,this.doc.scrollTop),ke(this.display),(ce==null||Math.abs(ce-Tr(this.display))>.5||this.options.lineWrapping)&&Ki(this),Li(this,"refresh",this)}),swapDoc:Bn(function(ce){var me=this.doc;return me.cm=null,this.state.selectingText&&this.state.selectingText(),nr(this,ce),Sh(this),this.display.input.reset(),ju(this,ce.scrollLeft,ce.scrollTop),this.curOp.forceScroll=!0,Sr(this,"swapDoc",this,me),me}),phrase:function(ce){var me=this.options.phrases;return me&&Object.prototype.hasOwnProperty.call(me,ce)?me[ce]:ce},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}},Rn(ie),ie.registerHelper=function(ce,me,Le){de.hasOwnProperty(ce)||(de[ce]=ie[ce]={_global:[]}),de[ce][me]=Le},ie.registerGlobalHelper=function(ce,me,Le,_e){ie.registerHelper(ce,me,_e),de[ce]._global.push({pred:Le,val:_e})}}function _f(ie,ae,de,ce,me){var Le=ae,_e=de,Xe=hn(ie,ae.line),Ue=me&&ie.direction=="rtl"?-de:de;function ht(){var oo=ae.line+Ue;return oo<ie.first||oo>=ie.first+ie.size?!1:(ae=new En(oo,ae.ch,ae.sticky),Xe=hn(ie,oo))}function Kt(oo){var Dr;if(ce=="codepoint"){var Po=Xe.text.charCodeAt(ae.ch+(ce>0?0:-1));isNaN(Po)?Dr=null:Dr=new En(ae.line,Math.max(0,Math.min(Xe.text.length,ae.ch+de*(Po>=55296&&Po<56320?2:1))),-de)}else me?Dr=sf(ie.cm,Xe,ae,de):Dr=Ns(Xe,ae,de);if(Dr==null)if(!oo&&ht())ae=fc(me,ie.cm,Xe,ae.line,Ue);else return!1;else ae=Dr;return!0}if(ce=="char"||ce=="codepoint")Kt();else if(ce=="column")Kt(!0);else if(ce=="word"||ce=="group")for(var xt=null,yn=ce=="group",fn=ie.cm&&ie.cm.getHelper(ae,"wordChars"),wi=!0;!(de<0&&!Kt(!wi));wi=!1){var Mi=Xe.text.charAt(ae.ch)||`
|
|
`,Hi=Ge(Mi,fn)?"w":yn&&Mi==`
|
|
`?"n":!yn||/\s/.test(Mi)?null:"p";if(yn&&!wi&&!Hi&&(Hi="s"),xt&&xt!=Hi){de<0&&(de=1,Kt(),ae.sticky="after");break}if(Hi&&(xt=Hi),de>0&&!Kt(!wi))break}var dr=ss(ie,ae,Le,_e,!0);return bo(Le,dr)&&(dr.hitSide=!0),dr}function dd(ie,ae,de,ce){var me=ie.doc,Le=ae.left,_e;if(ce=="page"){var Xe=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Ue=Math.max(Xe-.5*Tr(ie.display),3);_e=(de>0?ae.bottom:ae.top)+de*Ue}else ce=="line"&&(_e=de>0?ae.bottom+3:ae.top-3);for(var ht;ht=Fc(ie,Le,_e),!!ht.outside;){if(de<0?_e<=0:_e>=me.height){ht.hitSide=!0;break}_e+=de*5}return ht}var As=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ze,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};As.prototype.init=function(ie){var ae=this,de=this,ce=de.cm,me=de.div=ie.lineDiv;ap(me,ce.options.spellcheck,ce.options.autocorrect,ce.options.autocapitalize);function Le(Xe){for(var Ue=Xe.target;Ue;Ue=Ue.parentNode){if(Ue==me)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Ue.className))break}return!1}ri(me,"paste",function(Xe){!Le(Xe)||Ai(ce,Xe)||ip(Xe,ce)||Be<=11&&setTimeout(fi(ce,function(){return ae.updateFromDOM()}),20)}),ri(me,"compositionstart",function(Xe){ae.composing={data:Xe.data,done:!1}}),ri(me,"compositionupdate",function(Xe){ae.composing||(ae.composing={data:Xe.data,done:!1})}),ri(me,"compositionend",function(Xe){ae.composing&&(Xe.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),ri(me,"touchstart",function(){return de.forceCompositionEnd()}),ri(me,"input",function(){ae.composing||ae.readFromDOMSoon()});function _e(Xe){if(!(!Le(Xe)||Ai(ce,Xe))){if(ce.somethingSelected())Id({lineWise:!1,text:ce.getSelections()}),Xe.type=="cut"&&ce.replaceSelection("",null,"cut");else if(ce.options.lineWiseCopyCut){var Ue=op(ce);Id({lineWise:!0,text:Ue.text}),Xe.type=="cut"&&ce.operation(function(){ce.setSelections(Ue.ranges,0,At),ce.replaceSelection("",null,"cut")})}else return;if(Xe.clipboardData){Xe.clipboardData.clearData();var ht=eh.text.join(`
|
|
`);if(Xe.clipboardData.setData("Text",ht),Xe.clipboardData.getData("Text")==ht){Xe.preventDefault();return}}var Kt=sp(),xt=Kt.firstChild;ce.display.lineSpace.insertBefore(Kt,ce.display.lineSpace.firstChild),xt.value=eh.text.join(`
|
|
`);var yn=document.activeElement;tn(xt),setTimeout(function(){ce.display.lineSpace.removeChild(Kt),yn.focus(),yn==me&&de.showPrimarySelection()},50)}}ri(me,"copy",_e),ri(me,"cut",_e)},As.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},As.prototype.prepareSelection=function(){var ie=Hr(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},As.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},As.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},As.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,de=ae.doc.sel.primary(),ce=de.from(),me=de.to();if(ae.display.viewTo==ae.display.viewFrom||ce.line>=ae.display.viewTo||me.line<ae.display.viewFrom){ie.removeAllRanges();return}var Le=If(ae,ie.anchorNode,ie.anchorOffset),_e=If(ae,ie.focusNode,ie.focusOffset);if(!(Le&&!Le.bad&&_e&&!_e.bad&&li(Yi(Le,_e),ce)==0&&li(sa(Le,_e),me)==0)){var Xe=ae.display.view,Ue=ce.line>=ae.display.viewFrom&&fg(ae,ce)||{node:Xe[0].measure.map[2],offset:0},ht=me.line<ae.display.viewTo&&fg(ae,me);if(!ht){var Kt=Xe[Xe.length-1].measure,xt=Kt.maps?Kt.maps[Kt.maps.length-1]:Kt.map;ht={node:xt[xt.length-1],offset:xt[xt.length-2]-xt[xt.length-3]}}if(!Ue||!ht){ie.removeAllRanges();return}var yn=ie.rangeCount&&ie.getRangeAt(0),fn;try{fn=lt(Ue.node,Ue.offset,ht.offset,ht.node)}catch(wi){}fn&&(!fe&&ae.state.focused?(ie.collapse(Ue.node,Ue.offset),fn.collapsed||(ie.removeAllRanges(),ie.addRange(fn))):(ie.removeAllRanges(),ie.addRange(fn)),yn&&ie.anchorNode==null?ie.addRange(yn):fe&&this.startGracePeriod()),this.rememberSelection()}},As.prototype.startGracePeriod=function(){var ie=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){ie.gracePeriod=!1,ie.selectionChanged()&&ie.cm.operation(function(){return ie.cm.curOp.selectionChanged=!0})},20)},As.prototype.showMultipleSelections=function(ie){rt(this.cm.display.cursorDiv,ie.cursors),rt(this.cm.display.selectionDiv,ie.selection)},As.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},As.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Lt(this.div,ae)},As.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},As.prototype.blur=function(){this.div.blur()},As.prototype.getField=function(){return this.div},As.prototype.supportsTouch=function(){return!0},As.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():ii(this.cm,function(){return ie.cm.curOp.selectionChanged=!0});function ae(){ie.cm.state.focused&&(ie.pollSelection(),ie.polling.set(ie.cm.options.pollInterval,ae))}this.polling.set(this.cm.options.pollInterval,ae)},As.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},As.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(ne&&it&&this.cm.display.gutterSpecs.length&&lp(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var de=If(ae,ie.anchorNode,ie.anchorOffset),ce=If(ae,ie.focusNode,ie.focusOffset);de&&ce&&ii(ae,function(){ar(ae.doc,ji(de,ce),At),(de.bad||ce.bad)&&(ae.curOp.selectionChanged=!0)})}}},As.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,de=ie.doc.sel.primary(),ce=de.from(),me=de.to();if(ce.ch==0&&ce.line>ie.firstLine()&&(ce=En(ce.line-1,hn(ie.doc,ce.line-1).length)),me.ch==hn(ie.doc,me.line).text.length&&me.line<ie.lastLine()&&(me=En(me.line+1,0)),ce.line<ae.viewFrom||me.line>ae.viewTo-1)return!1;var Le,_e,Xe;ce.line==ae.viewFrom||(Le=Gi(ie,ce.line))==0?(_e=Rt(ae.view[0].line),Xe=ae.view[0].node):(_e=Rt(ae.view[Le].line),Xe=ae.view[Le-1].node.nextSibling);var Ue=Gi(ie,me.line),ht,Kt;if(Ue==ae.view.length-1?(ht=ae.viewTo-1,Kt=ae.lineDiv.lastChild):(ht=Rt(ae.view[Ue+1].line)-1,Kt=ae.view[Ue+1].node.previousSibling),!Xe)return!1;for(var xt=ie.doc.splitLines(gf(ie,Xe,Kt,_e,ht)),yn=Ci(ie.doc,En(_e,0),En(ht,hn(ie.doc,ht).text.length));xt.length>1&&yn.length>1;)if(Et(xt)==Et(yn))xt.pop(),yn.pop(),ht--;else if(xt[0]==yn[0])xt.shift(),yn.shift(),_e++;else break;for(var fn=0,wi=0,Mi=xt[0],Hi=yn[0],dr=Math.min(Mi.length,Hi.length);fn<dr&&Mi.charCodeAt(fn)==Hi.charCodeAt(fn);)++fn;for(var oo=Et(xt),Dr=Et(yn),Po=Math.min(oo.length-(xt.length==1?fn:0),Dr.length-(yn.length==1?fn:0));wi<Po&&oo.charCodeAt(oo.length-wi-1)==Dr.charCodeAt(Dr.length-wi-1);)++wi;if(xt.length==1&&yn.length==1&&_e==ce.line)for(;fn&&fn>ce.ch&&oo.charCodeAt(oo.length-wi-1)==Dr.charCodeAt(Dr.length-wi-1);)fn--,wi++;xt[xt.length-1]=oo.slice(0,oo.length-wi).replace(/^\u200b+/,""),xt[0]=xt[0].slice(fn).replace(/\u200b+$/,"");var aa=En(_e,fn),Br=En(ht,yn.length?Et(yn).length-wi:0);if(xt.length>1||xt[0]||li(aa,Br))return ts(ie.doc,xt,aa,Br,"+input"),!0},As.prototype.ensurePolled=function(){this.forceCompositionEnd()},As.prototype.reset=function(){this.forceCompositionEnd()},As.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},As.prototype.readFromDOMSoon=function(){var ie=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(ie.readDOMTimeout=null,ie.composing)if(ie.composing.done)ie.composing=null;else return;ie.updateFromDOM()},80))},As.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&ii(this.cm,function(){return ur(ie.cm)})},As.prototype.setUneditable=function(ie){ie.contentEditable="false"},As.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||fi(this.cm,Of)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},As.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},As.prototype.onContextMenu=function(){},As.prototype.resetPosition=function(){},As.prototype.needsContentAttribute=!0;function fg(ie,ae){var de=Jl(ie,ae.line);if(!de||de.hidden)return null;var ce=hn(ie.doc,ae.line),me=hc(de,ce,ae.line),Le=$n(ce,ie.doc.direction),_e="left";if(Le){var Xe=Zt(Le,ae.ch);_e=Xe%2?"right":"left"}var Ue=Uh(me.map,ae.ch,_e);return Ue.offset=Ue.collapse=="right"?Ue.end:Ue.start,Ue}function lp(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function ff(ie,ae){return ae&&(ie.bad=!0),ie}function gf(ie,ae,de,ce,me){var Le="",_e=!1,Xe=ie.doc.lineSeparator(),Ue=!1;function ht(fn){return function(wi){return wi.id==fn}}function Kt(){_e&&(Le+=Xe,Ue&&(Le+=Xe),_e=Ue=!1)}function xt(fn){fn&&(Kt(),Le+=fn)}function yn(fn){if(fn.nodeType==1){var wi=fn.getAttribute("cm-text");if(wi){xt(wi);return}var Mi=fn.getAttribute("cm-marker"),Hi;if(Mi){var dr=ie.findMarks(En(ce,0),En(me+1,0),ht(+Mi));dr.length&&(Hi=dr[0].find(0))&&xt(Ci(ie.doc,Hi.from,Hi.to).join(Xe));return}if(fn.getAttribute("contenteditable")=="false")return;var oo=/^(pre|div|p|li|table|br)$/i.test(fn.nodeName);if(!/^br$/i.test(fn.nodeName)&&fn.textContent.length==0)return;oo&&Kt();for(var Dr=0;Dr<fn.childNodes.length;Dr++)yn(fn.childNodes[Dr]);/^(pre|p)$/i.test(fn.nodeName)&&(Ue=!0),oo&&(_e=!0)}else fn.nodeType==3&&xt(fn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;yn(ae),ae!=de;)ae=ae.nextSibling,Ue=!1;return Le}function If(ie,ae,de){var ce;if(ae==ie.display.lineDiv){if(ce=ie.display.lineDiv.childNodes[de],!ce)return ff(ie.clipPos(En(ie.display.viewTo-1)),!0);ae=null,de=0}else for(ce=ae;;ce=ce.parentNode){if(!ce||ce==ie.display.lineDiv)return null;if(ce.parentNode&&ce.parentNode==ie.display.lineDiv)break}for(var me=0;me<ie.display.view.length;me++){var Le=ie.display.view[me];if(Le.node==ce)return hm(Le,ae,de)}}function hm(ie,ae,de){var ce=ie.text.firstChild,me=!1;if(!ae||!Lt(ce,ae))return ff(En(Rt(ie.line),0),!0);if(ae==ce&&(me=!0,ae=ce.childNodes[de],de=0,!ae)){var Le=ie.rest?Et(ie.rest):ie.line;return ff(En(Rt(Le),Le.text.length),me)}var _e=ae.nodeType==3?ae:null,Xe=ae;for(!_e&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(_e=ae.firstChild,de&&(de=_e.nodeValue.length));Xe.parentNode!=ce;)Xe=Xe.parentNode;var Ue=ie.measure,ht=Ue.maps;function Kt(Hi,dr,oo){for(var Dr=-1;Dr<(ht?ht.length:0);Dr++)for(var Po=Dr<0?Ue.map:ht[Dr],aa=0;aa<Po.length;aa+=3){var Br=Po[aa+2];if(Br==Hi||Br==dr){var Aa=Rt(Dr<0?ie.line:ie.rest[Dr]),Ys=Po[aa]+oo;return(oo<0||Br!=Hi)&&(Ys=Po[aa+(oo?1:0)]),En(Aa,Ys)}}}var xt=Kt(_e,Xe,de);if(xt)return ff(xt,me);for(var yn=Xe.nextSibling,fn=_e?_e.nodeValue.length-de:0;yn;yn=yn.nextSibling){if(xt=Kt(yn,yn.firstChild,0),xt)return ff(En(xt.line,xt.ch-fn),me);fn+=yn.textContent.length}for(var wi=Xe.previousSibling,Mi=de;wi;wi=wi.previousSibling){if(xt=Kt(wi,wi.firstChild,-1),xt)return ff(En(xt.line,xt.ch+Mi),me);Mi+=wi.textContent.length}}var _l=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ze,this.hasSelection=!1,this.composing=null};_l.prototype.init=function(ie){var ae=this,de=this,ce=this.cm;this.createField(ie);var me=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Ae&&(me.style.width="0px"),ri(me,"input",function(){ft&&Be>=9&&ae.hasSelection&&(ae.hasSelection=null),de.poll()}),ri(me,"paste",function(_e){Ai(ce,_e)||ip(_e,ce)||(ce.state.pasteIncoming=+new Date,de.fastPoll())});function Le(_e){if(!Ai(ce,_e)){if(ce.somethingSelected())Id({lineWise:!1,text:ce.getSelections()});else if(ce.options.lineWiseCopyCut){var Xe=op(ce);Id({lineWise:!0,text:Xe.text}),_e.type=="cut"?ce.setSelections(Xe.ranges,null,At):(de.prevInput="",me.value=Xe.text.join(`
|
|
`),tn(me))}else return;_e.type=="cut"&&(ce.state.cutIncoming=+new Date)}}ri(me,"cut",Le),ri(me,"copy",Le),ri(ie.scroller,"paste",function(_e){if(!(zs(ie,_e)||Ai(ce,_e))){if(!me.dispatchEvent){ce.state.pasteIncoming=+new Date,de.focus();return}var Xe=new Event("paste");Xe.clipboardData=_e.clipboardData,me.dispatchEvent(Xe)}}),ri(ie.lineSpace,"selectstart",function(_e){zs(ie,_e)||sr(_e)}),ri(me,"compositionstart",function(){var _e=ce.getCursor("from");de.composing&&de.composing.range.clear(),de.composing={start:_e,range:ce.markText(_e,ce.getCursor("to"),{className:"CodeMirror-composing"})}}),ri(me,"compositionend",function(){de.composing&&(de.poll(),de.composing.range.clear(),de.composing=null)})},_l.prototype.createField=function(ie){this.wrapper=sp(),this.textarea=this.wrapper.firstChild},_l.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},_l.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,de=ie.doc,ce=Hr(ie);if(ie.options.moveInputWithCursor){var me=Ya(ie,de.sel.primary().head,"div"),Le=ae.wrapper.getBoundingClientRect(),_e=ae.lineDiv.getBoundingClientRect();ce.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,me.top+_e.top-Le.top)),ce.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,me.left+_e.left-Le.left))}return ce},_l.prototype.showSelection=function(ie){var ae=this.cm,de=ae.display;rt(de.cursorDiv,ie.cursors),rt(de.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},_l.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var de=ae.getSelection();this.textarea.value=de,ae.state.focused&&tn(this.textarea),ft&&Be>=9&&(this.hasSelection=de)}else ie||(this.prevInput=this.textarea.value="",ft&&Be>=9&&(this.hasSelection=null))}},_l.prototype.getField=function(){return this.textarea},_l.prototype.supportsTouch=function(){return!1},_l.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||Mt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},_l.prototype.blur=function(){this.textarea.blur()},_l.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},_l.prototype.receivedFocus=function(){this.slowPoll()},_l.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},_l.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function de(){var ce=ae.poll();!ce&&!ie?(ie=!0,ae.polling.set(60,de)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,de)},_l.prototype.poll=function(){var ie=this,ae=this.cm,de=this.textarea,ce=this.prevInput;if(this.contextMenuPending||!ae.state.focused||we(de)&&!ce&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var me=de.value;if(me==ce&&!ae.somethingSelected())return!1;if(ft&&Be>=9&&this.hasSelection===me||ue&&/[\uf700-\uf7ff]/.test(me))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Le=me.charCodeAt(0);if(Le==8203&&!ce&&(ce="\u200B"),Le==8666)return this.reset(),this.cm.execCommand("undo")}for(var _e=0,Xe=Math.min(ce.length,me.length);_e<Xe&&ce.charCodeAt(_e)==me.charCodeAt(_e);)++_e;return ii(ae,function(){Of(ae,me.slice(_e),ce.length-_e,null,ie.composing?"*compose":null),me.length>1e3||me.indexOf(`
|
|
`)>-1?de.value=ie.prevInput="":ie.prevInput=me,ie.composing&&(ie.composing.range.clear(),ie.composing.range=ae.markText(ie.composing.start,ae.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},_l.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},_l.prototype.onKeyPress=function(){ft&&Be>=9&&(this.hasSelection=null),this.fastPoll()},_l.prototype.onContextMenu=function(ie){var ae=this,de=ae.cm,ce=de.display,me=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Le=No(de,ie),_e=ce.scroller.scrollTop;if(!Le||st)return;var Xe=de.options.resetSelectionOnContextMenu;Xe&&de.doc.sel.contains(Le)==-1&&fi(de,ar)(de.doc,ji(Le),At);var Ue=me.style.cssText,ht=ae.wrapper.style.cssText,Kt=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",me.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
top: `+(ie.clientY-Kt.top-5)+"px; left: "+(ie.clientX-Kt.left-5)+`px;
|
|
z-index: 1000; background: `+(ft?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var xt;He&&(xt=window.scrollY),ce.input.focus(),He&&window.scrollTo(null,xt),ce.input.reset(),de.somethingSelected()||(me.value=ae.prevInput=" "),ae.contextMenuPending=fn,ce.selForContextMenu=de.doc.sel,clearTimeout(ce.detectingSelectAll);function yn(){if(me.selectionStart!=null){var Mi=de.somethingSelected(),Hi="\u200B"+(Mi?me.value:"");me.value="\u21DA",me.value=Hi,ae.prevInput=Mi?"":"\u200B",me.selectionStart=1,me.selectionEnd=Hi.length,ce.selForContextMenu=de.doc.sel}}function fn(){if(ae.contextMenuPending==fn&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=ht,me.style.cssText=Ue,ft&&Be<9&&ce.scrollbars.setScrollTop(ce.scroller.scrollTop=_e),me.selectionStart!=null)){(!ft||ft&&Be<9)&&yn();var Mi=0,Hi=function(){ce.selForContextMenu==de.doc.sel&&me.selectionStart==0&&me.selectionEnd>0&&ae.prevInput=="\u200B"?fi(de,Za)(de):Mi++<10?ce.detectingSelectAll=setTimeout(Hi,500):(ce.selForContextMenu=null,ce.input.reset())};ce.detectingSelectAll=setTimeout(Hi,200)}}if(ft&&Be>=9&&yn(),Pe){lr(ie);var wi=function(){wr(window,"mouseup",wi),setTimeout(fn,20)};ri(window,"mouseup",wi)}else setTimeout(fn,50)},_l.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},_l.prototype.setUneditable=function(){},_l.prototype.needsContentAttribute=!1;function cm(ie,ae){if(ae=ae?Tn(ae):{},ae.value=ie.value,!ae.tabindex&&ie.tabIndex&&(ae.tabindex=ie.tabIndex),!ae.placeholder&&ie.placeholder&&(ae.placeholder=ie.placeholder),ae.autofocus==null){var de=Mt();ae.autofocus=de==ie||ie.getAttribute("autofocus")!=null&&de==document.body}function ce(){ie.value=Xe.getValue()}var me;if(ie.form&&(ri(ie.form,"submit",ce),!ae.leaveSubmitMethodAlone)){var Le=ie.form;me=Le.submit;try{var _e=Le.submit=function(){ce(),Le.submit=me,Le.submit(),Le.submit=_e}}catch(Ue){}}ae.finishInit=function(Ue){Ue.save=ce,Ue.getTextArea=function(){return ie},Ue.toTextArea=function(){Ue.toTextArea=isNaN,ce(),ie.parentNode.removeChild(Ue.getWrapperElement()),ie.style.display="",ie.form&&(wr(ie.form,"submit",ce),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=me))}},ie.style.display="none";var Xe=is(function(Ue){return ie.parentNode.insertBefore(Ue,ie.nextSibling)},ae);return Xe}function pf(ie){ie.off=wr,ie.on=ri,ie.wheelEventPixels=yi,ie.Doc=Wo,ie.splitLines=an,ie.countColumn=Ve,ie.findColumn=jn,ie.isWordChar=De,ie.Pass=kn,ie.signal=Li,ie.Line=os,ie.changeEnd=Rr,ie.scrollbarModel=An,ie.Pos=En,ie.cmpPos=li,ie.modes=xn,ie.mimeModes=In,ie.resolveMode=Ot,ie.getMode=_t,ie.modeExtensions=Ct,ie.extendMode=Jt,ie.copyState=ci,ie.startState=_n,ie.innerMode=Xn,ie.commands=gc,ie.keyMap=Tl,ie.keyName=Dl,ie.isModifierKey=qs,ie.lookupKey=qo,ie.normalizeKeyMap=Na,ie.StringStream=It,ie.SharedTextMarker=$s,ie.TextMarker=kt,ie.LineWidget=va,ie.e_preventDefault=sr,ie.e_stopPropagation=xr,ie.e_stop=lr,ie.addClass=pt,ie.contains=Lt,ie.rmClass=Re,ie.keyNames=Bl}lm(is),cd(is);var Kc="iter insert remove copy getEditor constructor".split(" ");for(var Rf in Wo.prototype)Wo.prototype.hasOwnProperty(Rf)&&Qe(Kc,Rf)<0&&(is.prototype[Rf]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Wo.prototype[Rf]));return Rn(Wo),is.inputStyles={textarea:_l,contenteditable:As},is.defineMode=function(ie){!is.defaults.mode&&ie!="null"&&(is.defaults.mode=ie),ni.apply(this,arguments)},is.defineMIME=Ui,is.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),is.defineMIME("text/plain","null"),is.defineExtension=function(ie,ae){is.prototype[ie]=ae},is.defineDocExtension=function(ie,ae){Wo.prototype[ie]=ae},is.fromTextArea=cm,pf(is),is.version="5.58.2",is})},49047:function(Cn,On,Me){(function(fe){fe(Me(4631),Me(29589),Me(52539))})(function(fe){"use strict";fe.defineMode("markdown",function(Ke,St){var zt=fe.getMode(Ke,"text/html"),ft=zt.name=="null";function Be(Ve){if(fe.findModeByName){var Ze=fe.findModeByName(Ve);Ze&&(Ve=Ze.mime||Ze.mimes[0])}var Qe=fe.getMode(Ke,Ve);return Qe.name=="null"?null:Qe}St.highlightFormatting===void 0&&(St.highlightFormatting=!1),St.maxBlockquoteDepth===void 0&&(St.maxBlockquoteDepth=0),St.taskLists===void 0&&(St.taskLists=!1),St.strikethrough===void 0&&(St.strikethrough=!1),St.emoji===void 0&&(St.emoji=!1),St.fencedCodeBlockHighlighting===void 0&&(St.fencedCodeBlockHighlighting=!0),St.fencedCodeBlockDefaultMode===void 0&&(St.fencedCodeBlockDefaultMode="text/plain"),St.xml===void 0&&(St.xml=!0),St.tokenTypeOverrides===void 0&&(St.tokenTypeOverrides={});var He={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 gt in He)He.hasOwnProperty(gt)&&St.tokenTypeOverrides[gt]&&(He[gt]=St.tokenTypeOverrides[gt]);var it=/^([*\-_])(?:\s*\1){2,}\s*$/,st=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ft=/^\[(x| )\](?=\s)/i,Nt=St.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Bt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Ae=/^[^#!\[\]*_\\<>` "'(~:]+/,ne=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,te=/^\s*\[[^\]]+?\]:.*$/,ue=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,se=" ";function pe(Ve,Ze,Qe){return Ze.f=Ze.inline=Qe,Qe(Ve,Ze)}function ve(Ve,Ze,Qe){return Ze.f=Ze.block=Qe,Qe(Ve,Ze)}function Se(Ve){return!Ve||!/\S/.test(Ve.string)}function Pe(Ve){if(Ve.linkTitle=!1,Ve.linkHref=!1,Ve.linkText=!1,Ve.em=!1,Ve.strong=!1,Ve.strikethrough=!1,Ve.quote=0,Ve.indentedCode=!1,Ve.f==Re){var Ze=ft;if(!Ze){var Qe=fe.innerMode(zt,Ve.htmlState);Ze=Qe.mode.name=="xml"&&Qe.state.tagStart===null&&!Qe.state.context&&Qe.state.tokenize.isInText}Ze&&(Ve.f=bt,Ve.block=Oe,Ve.htmlState=null)}return Ve.trailingSpace=0,Ve.trailingSpaceNewLine=!1,Ve.prevLine=Ve.thisLine,Ve.thisLine={stream:null},null}function Oe(Ve,Ze){var Qe=Ve.column()===Ze.indentation,mn=Se(Ze.prevLine.stream),kn=Ze.indentedCode,At=Ze.prevLine.hr,pn=Ze.list!==!1,ln=(Ze.listStack[Ze.listStack.length-1]||0)+3;Ze.indentedCode=!1;var jn=Ze.indentation;if(Ze.indentationDiff===null&&(Ze.indentationDiff=Ze.indentation,pn)){for(Ze.list=null;jn<Ze.listStack[Ze.listStack.length-1];)Ze.listStack.pop(),Ze.listStack.length?Ze.indentation=Ze.listStack[Ze.listStack.length-1]:Ze.list=!1;Ze.list!==!1&&(Ze.indentationDiff=jn-Ze.listStack[Ze.listStack.length-1])}var Gt=!mn&&!At&&!Ze.prevLine.header&&(!pn||!kn)&&!Ze.prevLine.fencedCodeEnd,mt=(Ze.list===!1||At||mn)&&Ze.indentation<=ln&&Ve.match(it),Et=null;if(Ze.indentationDiff>=4&&(kn||Ze.prevLine.fencedCodeEnd||Ze.prevLine.header||mn))return Ve.skipToEnd(),Ze.indentedCode=!0,He.code;if(Ve.eatSpace())return null;if(Qe&&Ze.indentation<=ln&&(Et=Ve.match(Nt))&&Et[1].length<=6)return Ze.quote=0,Ze.header=Et[1].length,Ze.thisLine.header=!0,St.highlightFormatting&&(Ze.formatting="header"),Ze.f=Ze.inline,rt(Ze);if(Ze.indentation<=ln&&Ve.eat(">"))return Ze.quote=Qe?1:Ze.quote+1,St.highlightFormatting&&(Ze.formatting="quote"),Ve.eatSpace(),rt(Ze);if(!mt&&!Ze.setext&&Qe&&Ze.indentation<=ln&&(Et=Ve.match(st))){var on=Et[1]?"ol":"ul";return Ze.indentation=jn+Ve.current().length,Ze.list=!0,Ze.quote=0,Ze.listStack.push(Ze.indentation),Ze.em=!1,Ze.strong=!1,Ze.code=!1,Ze.strikethrough=!1,St.taskLists&&Ve.match(Ft,!1)&&(Ze.taskList=!0),Ze.f=Ze.inline,St.highlightFormatting&&(Ze.formatting=["list","list-"+on]),rt(Ze)}else{if(Qe&&Ze.indentation<=ln&&(Et=Ve.match(ne,!0)))return Ze.quote=0,Ze.fencedEndRE=new RegExp(Et[1]+"+ *$"),Ze.localMode=St.fencedCodeBlockHighlighting&&Be(Et[2]||St.fencedCodeBlockDefaultMode),Ze.localMode&&(Ze.localState=fe.startState(Ze.localMode)),Ze.f=Ze.block=tt,St.highlightFormatting&&(Ze.formatting="code-block"),Ze.code=-1,rt(Ze);if(Ze.setext||(!Gt||!pn)&&!Ze.quote&&Ze.list===!1&&!Ze.code&&!mt&&!te.test(Ve.string)&&(Et=Ve.lookAhead(1))&&(Et=Et.match(Bt)))return Ze.setext?(Ze.header=Ze.setext,Ze.setext=0,Ve.skipToEnd(),St.highlightFormatting&&(Ze.formatting="header")):(Ze.header=Et[0].charAt(0)=="="?1:2,Ze.setext=Ze.header),Ze.thisLine.header=!0,Ze.f=Ze.inline,rt(Ze);if(mt)return Ve.skipToEnd(),Ze.hr=!0,Ze.thisLine.hr=!0,He.hr;if(Ve.peek()==="[")return pe(Ve,Ze,dn)}return pe(Ve,Ze,Ze.inline)}function Re(Ve,Ze){var Qe=zt.token(Ve,Ze.htmlState);if(!ft){var mn=fe.innerMode(zt,Ze.htmlState);(mn.mode.name=="xml"&&mn.state.tagStart===null&&!mn.state.context&&mn.state.tokenize.isInText||Ze.md_inside&&Ve.current().indexOf(">")>-1)&&(Ze.f=bt,Ze.block=Oe,Ze.htmlState=null)}return Qe}function tt(Ve,Ze){var Qe=Ze.listStack[Ze.listStack.length-1]||0,mn=Ze.indentation<Qe,kn=Qe+3;if(Ze.fencedEndRE&&Ze.indentation<=kn&&(mn||Ve.match(Ze.fencedEndRE))){St.highlightFormatting&&(Ze.formatting="code-block");var At;return mn||(At=rt(Ze)),Ze.localMode=Ze.localState=null,Ze.block=Oe,Ze.f=bt,Ze.fencedEndRE=null,Ze.code=0,Ze.thisLine.fencedCodeEnd=!0,mn?ve(Ve,Ze,Ze.block):At}else return Ze.localMode?Ze.localMode.token(Ve,Ze.localState):(Ve.skipToEnd(),He.code)}function rt(Ve){var Ze=[];if(Ve.formatting){Ze.push(He.formatting),typeof Ve.formatting=="string"&&(Ve.formatting=[Ve.formatting]);for(var Qe=0;Qe<Ve.formatting.length;Qe++)Ze.push(He.formatting+"-"+Ve.formatting[Qe]),Ve.formatting[Qe]==="header"&&Ze.push(He.formatting+"-"+Ve.formatting[Qe]+"-"+Ve.header),Ve.formatting[Qe]==="quote"&&(!St.maxBlockquoteDepth||St.maxBlockquoteDepth>=Ve.quote?Ze.push(He.formatting+"-"+Ve.formatting[Qe]+"-"+Ve.quote):Ze.push("error"))}if(Ve.taskOpen)return Ze.push("meta"),Ze.length?Ze.join(" "):null;if(Ve.taskClosed)return Ze.push("property"),Ze.length?Ze.join(" "):null;if(Ve.linkHref?Ze.push(He.linkHref,"url"):(Ve.strong&&Ze.push(He.strong),Ve.em&&Ze.push(He.em),Ve.strikethrough&&Ze.push(He.strikethrough),Ve.emoji&&Ze.push(He.emoji),Ve.linkText&&Ze.push(He.linkText),Ve.code&&Ze.push(He.code),Ve.image&&Ze.push(He.image),Ve.imageAltText&&Ze.push(He.imageAltText,"link"),Ve.imageMarker&&Ze.push(He.imageMarker)),Ve.header&&Ze.push(He.header,He.header+"-"+Ve.header),Ve.quote&&(Ze.push(He.quote),!St.maxBlockquoteDepth||St.maxBlockquoteDepth>=Ve.quote?Ze.push(He.quote+"-"+Ve.quote):Ze.push(He.quote+"-"+St.maxBlockquoteDepth)),Ve.list!==!1){var mn=(Ve.listStack.length-1)%3;mn?mn===1?Ze.push(He.list2):Ze.push(He.list3):Ze.push(He.list1)}return Ve.trailingSpaceNewLine?Ze.push("trailing-space-new-line"):Ve.trailingSpace&&Ze.push("trailing-space-"+(Ve.trailingSpace%2?"a":"b")),Ze.length?Ze.join(" "):null}function Je(Ve,Ze){if(Ve.match(Ae,!0))return rt(Ze)}function bt(Ve,Ze){var Qe=Ze.text(Ve,Ze);if(typeof Qe!="undefined")return Qe;if(Ze.list)return Ze.list=null,rt(Ze);if(Ze.taskList){var mn=Ve.match(Ft,!0)[1]===" ";return mn?Ze.taskOpen=!0:Ze.taskClosed=!0,St.highlightFormatting&&(Ze.formatting="task"),Ze.taskList=!1,rt(Ze)}if(Ze.taskOpen=!1,Ze.taskClosed=!1,Ze.header&&Ve.match(/^#+$/,!0))return St.highlightFormatting&&(Ze.formatting="header"),rt(Ze);var kn=Ve.next();if(Ze.linkTitle){Ze.linkTitle=!1;var At=kn;kn==="("&&(At=")"),At=(At+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pn="^\\s*(?:[^"+At+"\\\\]+|\\\\\\\\|\\\\.)"+At;if(Ve.match(new RegExp(pn),!0))return He.linkHref}if(kn==="`"){var ln=Ze.formatting;St.highlightFormatting&&(Ze.formatting="code"),Ve.eatWhile("`");var jn=Ve.current().length;if(Ze.code==0&&(!Ze.quote||jn==1))return Ze.code=jn,rt(Ze);if(jn==Ze.code){var Gt=rt(Ze);return Ze.code=0,Gt}else return Ze.formatting=ln,rt(Ze)}else if(Ze.code)return rt(Ze);if(kn==="\\"&&(Ve.next(),St.highlightFormatting)){var mt=rt(Ze),Et=He.formatting+"-escape";return mt?mt+" "+Et:Et}if(kn==="!"&&Ve.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ze.imageMarker=!0,Ze.image=!0,St.highlightFormatting&&(Ze.formatting="image"),rt(Ze);if(kn==="["&&Ze.imageMarker&&Ve.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ze.imageMarker=!1,Ze.imageAltText=!0,St.highlightFormatting&&(Ze.formatting="image"),rt(Ze);if(kn==="]"&&Ze.imageAltText){St.highlightFormatting&&(Ze.formatting="image");var mt=rt(Ze);return Ze.imageAltText=!1,Ze.image=!1,Ze.inline=Ze.f=Lt,mt}if(kn==="["&&!Ze.image)return Ze.linkText&&Ve.match(/^.*?\]/)||(Ze.linkText=!0,St.highlightFormatting&&(Ze.formatting="link")),rt(Ze);if(kn==="]"&&Ze.linkText){St.highlightFormatting&&(Ze.formatting="link");var mt=rt(Ze);return Ze.linkText=!1,Ze.inline=Ze.f=Ve.match(/\(.*?\)| ?\[.*?\]/,!1)?Lt:bt,mt}if(kn==="<"&&Ve.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ze.f=Ze.inline=lt,St.highlightFormatting&&(Ze.formatting="link");var mt=rt(Ze);return mt?mt+=" ":mt="",mt+He.linkInline}if(kn==="<"&&Ve.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ze.f=Ze.inline=lt,St.highlightFormatting&&(Ze.formatting="link");var mt=rt(Ze);return mt?mt+=" ":mt="",mt+He.linkEmail}if(St.xml&&kn==="<"&&Ve.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var on=Ve.string.indexOf(">",Ve.pos);if(on!=-1){var Yt=Ve.string.substring(Ve.start,on);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(Yt)&&(Ze.md_inside=!0)}return Ve.backUp(1),Ze.htmlState=fe.startState(zt),ve(Ve,Ze,Re)}if(St.xml&&kn==="<"&&Ve.match(/^\/\w*?>/))return Ze.md_inside=!1,"tag";if(kn==="*"||kn==="_"){for(var ze=1,be=Ve.pos==1?" ":Ve.string.charAt(Ve.pos-2);ze<3&&Ve.eat(kn);)ze++;var Ce=Ve.peek()||" ",De=!/\s/.test(Ce)&&(!ue.test(Ce)||/\s/.test(be)||ue.test(be)),Ge=!/\s/.test(be)&&(!ue.test(be)||/\s/.test(Ce)||ue.test(Ce)),Fe=null,qe=null;if(ze%2&&(!Ze.em&&De&&(kn==="*"||!Ge||ue.test(be))?Fe=!0:Ze.em==kn&&Ge&&(kn==="*"||!De||ue.test(Ce))&&(Fe=!1)),ze>1&&(!Ze.strong&&De&&(kn==="*"||!Ge||ue.test(be))?qe=!0:Ze.strong==kn&&Ge&&(kn==="*"||!De||ue.test(Ce))&&(qe=!1)),qe!=null||Fe!=null){St.highlightFormatting&&(Ze.formatting=Fe==null?"strong":qe==null?"em":"strong em"),Fe===!0&&(Ze.em=kn),qe===!0&&(Ze.strong=kn);var Gt=rt(Ze);return Fe===!1&&(Ze.em=!1),qe===!1&&(Ze.strong=!1),Gt}}else if(kn===" "&&(Ve.eat("*")||Ve.eat("_"))){if(Ve.peek()===" ")return rt(Ze);Ve.backUp(1)}if(St.strikethrough){if(kn==="~"&&Ve.eatWhile(kn)){if(Ze.strikethrough){St.highlightFormatting&&(Ze.formatting="strikethrough");var Gt=rt(Ze);return Ze.strikethrough=!1,Gt}else if(Ve.match(/^[^\s]/,!1))return Ze.strikethrough=!0,St.highlightFormatting&&(Ze.formatting="strikethrough"),rt(Ze)}else if(kn===" "&&Ve.match(/^~~/,!0)){if(Ve.peek()===" ")return rt(Ze);Ve.backUp(2)}}if(St.emoji&&kn===":"&&Ve.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ze.emoji=!0,St.highlightFormatting&&(Ze.formatting="emoji");var rn=rt(Ze);return Ze.emoji=!1,rn}return kn===" "&&(Ve.match(/^ +$/,!1)?Ze.trailingSpace++:Ze.trailingSpace&&(Ze.trailingSpaceNewLine=!0)),rt(Ze)}function lt(Ve,Ze){var Qe=Ve.next();if(Qe===">"){Ze.f=Ze.inline=bt,St.highlightFormatting&&(Ze.formatting="link");var mn=rt(Ze);return mn?mn+=" ":mn="",mn+He.linkInline}return Ve.match(/^[^>]+/,!0),He.linkInline}function Lt(Ve,Ze){if(Ve.eatSpace())return null;var Qe=Ve.next();return Qe==="("||Qe==="["?(Ze.f=Ze.inline=pt(Qe==="("?")":"]"),St.highlightFormatting&&(Ze.formatting="link-string"),Ze.linkHref=!0,rt(Ze)):"error"}var Mt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function pt(Ve){return function(Ze,Qe){var mn=Ze.next();if(mn===Ve){Qe.f=Qe.inline=bt,St.highlightFormatting&&(Qe.formatting="link-string");var kn=rt(Qe);return Qe.linkHref=!1,kn}return Ze.match(Mt[Ve]),Qe.linkHref=!0,rt(Qe)}}function dn(Ve,Ze){return Ve.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ze.f=tn,Ve.next(),St.highlightFormatting&&(Ze.formatting="link"),Ze.linkText=!0,rt(Ze)):pe(Ve,Ze,bt)}function tn(Ve,Ze){if(Ve.match(/^\]:/,!0)){Ze.f=Ze.inline=vn,St.highlightFormatting&&(Ze.formatting="link");var Qe=rt(Ze);return Ze.linkText=!1,Qe}return Ve.match(/^([^\]\\]|\\.)+/,!0),He.linkText}function vn(Ve,Ze){return Ve.eatSpace()?null:(Ve.match(/^[^\s]+/,!0),Ve.peek()===void 0?Ze.linkTitle=!0:Ve.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ze.f=Ze.inline=bt,He.linkHref+" url")}var Tn={startState:function(){return{f:Oe,prevLine:{stream:null},thisLine:{stream:null},block:Oe,htmlState:null,indentation:0,inline:bt,text:Je,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(Ve){return{f:Ve.f,prevLine:Ve.prevLine,thisLine:Ve.thisLine,block:Ve.block,htmlState:Ve.htmlState&&fe.copyState(zt,Ve.htmlState),indentation:Ve.indentation,localMode:Ve.localMode,localState:Ve.localMode?fe.copyState(Ve.localMode,Ve.localState):null,inline:Ve.inline,text:Ve.text,formatting:!1,linkText:Ve.linkText,linkTitle:Ve.linkTitle,linkHref:Ve.linkHref,code:Ve.code,em:Ve.em,strong:Ve.strong,strikethrough:Ve.strikethrough,emoji:Ve.emoji,header:Ve.header,setext:Ve.setext,hr:Ve.hr,taskList:Ve.taskList,list:Ve.list,listStack:Ve.listStack.slice(0),quote:Ve.quote,indentedCode:Ve.indentedCode,trailingSpace:Ve.trailingSpace,trailingSpaceNewLine:Ve.trailingSpaceNewLine,md_inside:Ve.md_inside,fencedEndRE:Ve.fencedEndRE}},token:function(Ve,Ze){if(Ze.formatting=!1,Ve!=Ze.thisLine.stream){if(Ze.header=0,Ze.hr=!1,Ve.match(/^\s*$/,!0))return Pe(Ze),null;if(Ze.prevLine=Ze.thisLine,Ze.thisLine={stream:Ve},Ze.taskList=!1,Ze.trailingSpace=0,Ze.trailingSpaceNewLine=!1,!Ze.localState&&(Ze.f=Ze.block,Ze.f!=Re)){var Qe=Ve.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ze.indentation=Qe,Ze.indentationDiff=null,Qe>0)return null}}return Ze.f(Ve,Ze)},innerMode:function(Ve){return Ve.block==Re?{state:Ve.htmlState,mode:zt}:Ve.localState?{state:Ve.localState,mode:Ve.localMode}:{state:Ve,mode:Tn}},indent:function(Ve,Ze,Qe){return Ve.block==Re&&zt.indent?zt.indent(Ve.htmlState,Ze,Qe):Ve.localState&&Ve.localMode.indent?Ve.localMode.indent(Ve.localState,Ze,Qe):fe.Pass},blankLine:Pe,getType:rt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Tn},"xml"),fe.defineMIME("text/markdown","markdown"),fe.defineMIME("text/x-markdown","markdown")})},52539:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){"use strict";fe.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 Ke=0;Ke<fe.modeInfo.length;Ke++){var St=fe.modeInfo[Ke];St.mimes&&(St.mime=St.mimes[0])}fe.findModeByMIME=function(zt){zt=zt.toLowerCase();for(var ft=0;ft<fe.modeInfo.length;ft++){var Be=fe.modeInfo[ft];if(Be.mime==zt)return Be;if(Be.mimes){for(var He=0;He<Be.mimes.length;He++)if(Be.mimes[He]==zt)return Be}}if(/\+xml$/.test(zt))return fe.findModeByMIME("application/xml");if(/\+json$/.test(zt))return fe.findModeByMIME("application/json")},fe.findModeByExtension=function(zt){zt=zt.toLowerCase();for(var ft=0;ft<fe.modeInfo.length;ft++){var Be=fe.modeInfo[ft];if(Be.ext){for(var He=0;He<Be.ext.length;He++)if(Be.ext[He]==zt)return Be}}},fe.findModeByFileName=function(zt){for(var ft=0;ft<fe.modeInfo.length;ft++){var Be=fe.modeInfo[ft];if(Be.file&&Be.file.test(zt))return Be}var He=zt.lastIndexOf("."),gt=He>-1&&zt.substring(He+1,zt.length);if(gt)return fe.findModeByExtension(gt)},fe.findModeByName=function(zt){zt=zt.toLowerCase();for(var ft=0;ft<fe.modeInfo.length;ft++){var Be=fe.modeInfo[ft];if(Be.name.toLowerCase()==zt)return Be;if(Be.alias){for(var He=0;He<Be.alias.length;He++)if(Be.alias[He].toLowerCase()==zt)return Be}}}})},80785:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){"use strict";fe.defineMode("stex",function(Ke,St){"use strict";function zt(Ae,ne){Ae.cmdState.push(ne)}function ft(Ae){return Ae.cmdState.length>0?Ae.cmdState[Ae.cmdState.length-1]:null}function Be(Ae){var ne=Ae.cmdState.pop();ne&&ne.closeBracket()}function He(Ae){for(var ne=Ae.cmdState,te=ne.length-1;te>=0;te--){var ue=ne[te];if(ue.name!="DEFAULT")return ue}return{styleIdentifier:function(){return null}}}function gt(Ae,ne,te){return function(){this.name=Ae,this.bracketNo=0,this.style=ne,this.styles=te,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var it={};it.importmodule=gt("importmodule","tag",["string","builtin"]),it.documentclass=gt("documentclass","tag",["","atom"]),it.usepackage=gt("usepackage","tag",["atom"]),it.begin=gt("begin","tag",["atom"]),it.end=gt("end","tag",["atom"]),it.label=gt("label","tag",["atom"]),it.ref=gt("ref","tag",["atom"]),it.eqref=gt("eqref","tag",["atom"]),it.cite=gt("cite","tag",["atom"]),it.bibitem=gt("bibitem","tag",["atom"]),it.Bibitem=gt("Bibitem","tag",["atom"]),it.RBibitem=gt("RBibitem","tag",["atom"]),it.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function st(Ae,ne){Ae.f=ne}function Ft(Ae,ne){var te;if(Ae.match(/^\\[a-zA-Z@]+/)){var ue=Ae.current().slice(1);return te=it.hasOwnProperty(ue)?it[ue]:it.DEFAULT,te=new te,zt(ne,te),st(ne,Bt),te.style}if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/\\]/))return"tag";if(Ae.match("\\["))return st(ne,function(pe,ve){return Nt(pe,ve,"\\]")}),"keyword";if(Ae.match("\\("))return st(ne,function(pe,ve){return Nt(pe,ve,"\\)")}),"keyword";if(Ae.match("$$"))return st(ne,function(pe,ve){return Nt(pe,ve,"$$")}),"keyword";if(Ae.match("$"))return st(ne,function(pe,ve){return Nt(pe,ve,"$")}),"keyword";var se=Ae.next();if(se=="%")return Ae.skipToEnd(),"comment";if(se=="}"||se=="]"){if(te=ft(ne),te)te.closeBracket(se),st(ne,Bt);else return"error";return"bracket"}else return se=="{"||se=="["?(te=it.DEFAULT,te=new te,zt(ne,te),"bracket"):/\d/.test(se)?(Ae.eatWhile(/[\w.%]/),"atom"):(Ae.eatWhile(/[\w\-_]/),te=He(ne),te.name=="begin"&&(te.argument=Ae.current()),te.styleIdentifier())}function Nt(Ae,ne,te){if(Ae.eatSpace())return null;if(te&&Ae.match(te))return st(ne,Ft),"keyword";if(Ae.match(/^\\[a-zA-Z@]+/))return"tag";if(Ae.match(/^[a-zA-Z]+/))return"variable-2";if(Ae.match(/^\\[$&%#{}_]/)||Ae.match(/^\\[,;!\/]/)||Ae.match(/^[\^_&]/))return"tag";if(Ae.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Ae.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ue=Ae.next();return ue=="{"||ue=="}"||ue=="["||ue=="]"||ue=="("||ue==")"?"bracket":ue=="%"?(Ae.skipToEnd(),"comment"):"error"}function Bt(Ae,ne){var te=Ae.peek(),ue;return te=="{"||te=="["?(ue=ft(ne),ue.openBracket(te),Ae.eat(te),st(ne,Ft),"bracket"):/[ \t\r]/.test(te)?(Ae.eat(te),null):(st(ne,Ft),Be(ne),Ft(Ae,ne))}return{startState:function(){var Ae=St.inMathMode?function(ne,te){return Nt(ne,te)}:Ft;return{cmdState:[],f:Ae}},copyState:function(Ae){return{cmdState:Ae.cmdState.slice(),f:Ae.f}},token:function(Ae,ne){return ne.f(Ae,ne)},blankLine:function(Ae){Ae.f=Ft,Ae.cmdState.length=0},lineComment:"%"}}),fe.defineMIME("text/x-stex","stex"),fe.defineMIME("text/x-latex","stex")})},29589:function(Cn,On,Me){(function(fe){fe(Me(4631))})(function(fe){"use strict";var Ke={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},St={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};fe.defineMode("xml",function(zt,ft){var Be=zt.indentUnit,He={},gt=ft.htmlMode?Ke:St;for(var it in gt)He[it]=gt[it];for(var it in ft)He[it]=ft[it];var st,Ft;function Nt(lt,Lt){function Mt(tn){return Lt.tokenize=tn,tn(lt,Lt)}var pt=lt.next();if(pt=="<")return lt.eat("!")?lt.eat("[")?lt.match("CDATA[")?Mt(ne("atom","]]>")):null:lt.match("--")?Mt(ne("comment","-->")):lt.match("DOCTYPE",!0,!0)?(lt.eatWhile(/[\w\._\-]/),Mt(te(1))):null:lt.eat("?")?(lt.eatWhile(/[\w\._\-]/),Lt.tokenize=ne("meta","?>"),"meta"):(st=lt.eat("/")?"closeTag":"openTag",Lt.tokenize=Bt,"tag bracket");if(pt=="&"){var dn;return lt.eat("#")?lt.eat("x")?dn=lt.eatWhile(/[a-fA-F\d]/)&<.eat(";"):dn=lt.eatWhile(/[\d]/)&<.eat(";"):dn=lt.eatWhile(/[\w\.\-:]/)&<.eat(";"),dn?"atom":"error"}else return lt.eatWhile(/[^&<]/),null}Nt.isInText=!0;function Bt(lt,Lt){var Mt=lt.next();if(Mt==">"||Mt=="/"&<.eat(">"))return Lt.tokenize=Nt,st=Mt==">"?"endTag":"selfcloseTag","tag bracket";if(Mt=="=")return st="equals",null;if(Mt=="<"){Lt.tokenize=Nt,Lt.state=ve,Lt.tagName=Lt.tagStart=null;var pt=Lt.tokenize(lt,Lt);return pt?pt+" tag error":"tag error"}else return/[\'\"]/.test(Mt)?(Lt.tokenize=Ae(Mt),Lt.stringStartCol=lt.column(),Lt.tokenize(lt,Lt)):(lt.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Ae(lt){var Lt=function(Mt,pt){for(;!Mt.eol();)if(Mt.next()==lt){pt.tokenize=Bt;break}return"string"};return Lt.isInAttribute=!0,Lt}function ne(lt,Lt){return function(Mt,pt){for(;!Mt.eol();){if(Mt.match(Lt)){pt.tokenize=Nt;break}Mt.next()}return lt}}function te(lt){return function(Lt,Mt){for(var pt;(pt=Lt.next())!=null;){if(pt=="<")return Mt.tokenize=te(lt+1),Mt.tokenize(Lt,Mt);if(pt==">")if(lt==1){Mt.tokenize=Nt;break}else return Mt.tokenize=te(lt-1),Mt.tokenize(Lt,Mt)}return"meta"}}function ue(lt,Lt,Mt){this.prev=lt.context,this.tagName=Lt,this.indent=lt.indented,this.startOfLine=Mt,(He.doNotIndent.hasOwnProperty(Lt)||lt.context&<.context.noIndent)&&(this.noIndent=!0)}function se(lt){lt.context&&(lt.context=lt.context.prev)}function pe(lt,Lt){for(var Mt;;){if(!lt.context||(Mt=lt.context.tagName,!He.contextGrabbers.hasOwnProperty(Mt)||!He.contextGrabbers[Mt].hasOwnProperty(Lt)))return;se(lt)}}function ve(lt,Lt,Mt){return lt=="openTag"?(Mt.tagStart=Lt.column(),Se):lt=="closeTag"?Pe:ve}function Se(lt,Lt,Mt){return lt=="word"?(Mt.tagName=Lt.current(),Ft="tag",tt):He.allowMissingTagName&<=="endTag"?(Ft="tag bracket",tt(lt,Lt,Mt)):(Ft="error",Se)}function Pe(lt,Lt,Mt){if(lt=="word"){var pt=Lt.current();return Mt.context&&Mt.context.tagName!=pt&&He.implicitlyClosed.hasOwnProperty(Mt.context.tagName)&&se(Mt),Mt.context&&Mt.context.tagName==pt||He.matchClosing===!1?(Ft="tag",Oe):(Ft="tag error",Re)}else return He.allowMissingTagName&<=="endTag"?(Ft="tag bracket",Oe(lt,Lt,Mt)):(Ft="error",Re)}function Oe(lt,Lt,Mt){return lt!="endTag"?(Ft="error",Oe):(se(Mt),ve)}function Re(lt,Lt,Mt){return Ft="error",Oe(lt,Lt,Mt)}function tt(lt,Lt,Mt){if(lt=="word")return Ft="attribute",rt;if(lt=="endTag"||lt=="selfcloseTag"){var pt=Mt.tagName,dn=Mt.tagStart;return Mt.tagName=Mt.tagStart=null,lt=="selfcloseTag"||He.autoSelfClosers.hasOwnProperty(pt)?pe(Mt,pt):(pe(Mt,pt),Mt.context=new ue(Mt,pt,dn==Mt.indented)),ve}return Ft="error",tt}function rt(lt,Lt,Mt){return lt=="equals"?Je:(He.allowMissing||(Ft="error"),tt(lt,Lt,Mt))}function Je(lt,Lt,Mt){return lt=="string"?bt:lt=="word"&&He.allowUnquoted?(Ft="string",tt):(Ft="error",tt(lt,Lt,Mt))}function bt(lt,Lt,Mt){return lt=="string"?bt:tt(lt,Lt,Mt)}return{startState:function(lt){var Lt={tokenize:Nt,state:ve,indented:lt||0,tagName:null,tagStart:null,context:null};return lt!=null&&(Lt.baseIndent=lt),Lt},token:function(lt,Lt){if(!Lt.tagName&<.sol()&&(Lt.indented=lt.indentation()),lt.eatSpace())return null;st=null;var Mt=Lt.tokenize(lt,Lt);return(Mt||st)&&Mt!="comment"&&(Ft=null,Lt.state=Lt.state(st||Mt,lt,Lt),Ft&&(Mt=Ft=="error"?Mt+" error":Ft)),Mt},indent:function(lt,Lt,Mt){var pt=lt.context;if(lt.tokenize.isInAttribute)return lt.tagStart==lt.indented?lt.stringStartCol+1:lt.indented+Be;if(pt&&pt.noIndent)return fe.Pass;if(lt.tokenize!=Bt&<.tokenize!=Nt)return Mt?Mt.match(/^(\s*)/)[0].length:0;if(lt.tagName)return He.multilineTagIndentPastTag!==!1?lt.tagStart+lt.tagName.length+2:lt.tagStart+Be*(He.multilineTagIndentFactor||1);if(He.alignCDATA&&/<!\[CDATA\[/.test(Lt))return 0;var dn=Lt&&/^<(\/)?([\w_:\.-]*)/.exec(Lt);if(dn&&dn[1])for(;pt;)if(pt.tagName==dn[2]){pt=pt.prev;break}else if(He.implicitlyClosed.hasOwnProperty(pt.tagName))pt=pt.prev;else break;else if(dn)for(;pt;){var tn=He.contextGrabbers[pt.tagName];if(tn&&tn.hasOwnProperty(dn[2]))pt=pt.prev;else break}for(;pt&&pt.prev&&!pt.startOfLine;)pt=pt.prev;return pt?pt.indent+Be:lt.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:He.htmlMode?"html":"xml",helperType:He.htmlMode?"html":"xml",skipAttribute:function(lt){lt.state==Je&&(lt.state=tt)},xmlCurrentTag:function(lt){return lt.tagName?{name:lt.tagName,close:lt.type=="closeTag"}:null},xmlCurrentContext:function(lt){for(var Lt=[],Mt=lt.context;Mt;Mt=Mt.prev)Mt.tagName&&Lt.push(Mt.tagName);return Lt.reverse()}}}),fe.defineMIME("text/xml","xml"),fe.defineMIME("application/xml","xml"),fe.mimeModes.hasOwnProperty("text/html")||fe.defineMIME("text/html",{name:"xml",htmlMode:!0})})},23495:function(Cn,On,Me){"use strict";Me.d(On,{$u:function(){return it},BD:function(){return ze},E9:function(){return gt},FF:function(){return hi},FJ:function(){return ve},Hn:function(){return pe},KX:function(){return Pe},NB:function(){return $t},S0:function(){return Et},UL:function(){return st},Vk:function(){return se},Vm:function(){return Zt},YI:function(){return on},ZA:function(){return St},Zt:function(){return Ft},al:function(){return Fe},bn:function(){return Ge},bx:function(){return be},g2:function(){return Yt},h1:function(){return Je},hD:function(){return Rn},l4:function(){return Be},rU:function(){return Nn},s_:function(){return Ce},uz:function(){return Zn},z6:function(){return Nt}}),Cn=Me.hmd(Cn),function(){var we;function Ut(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function en(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:Ut(a)}}function cn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var xn=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},In;if(typeof Object.setPrototypeOf=="function")In=Object.setPrototypeOf;else{var ni;e:{var Ui={a:!0},Ot={};try{Ot.__proto__=Ui,ni=Ot.a;break e}catch(a){}ni=!1}In=ni?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var _t=In;function Ct(a,y){if(a.prototype=xn(y.prototype),a.prototype.constructor=a,_t)_t(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 Jt=typeof Me.g!="undefined"&&Me.g!=null?Me.g:self,ci=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},Xn=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function _n(a,y){if(y){var x=Jt;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&&Xn(x,a,{writable:!0,value:y})}}_n("Object.assign",function(a){return a||ci}),_n("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 It=typeof globalThis=="object"&&globalThis||typeof Me.g=="object"&&Me.g.global===Me.g&&Me.g||typeof self=="object"&&self.self===self&&self||{};It.requestAnimationFrame===void 0&&(It.setImmediate===void 0?It.requestAnimationFrame=function(a){It.setTimeout(a,0)}:It.requestAnimationFrame=It.setImmediate);function hn(){}function Ci(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&It.clearTimeout(x),x=Ri(function(){x=-1,a.apply(E,b)},y)}}function Ri(a,y){return It.setTimeout(a,y)}function Ln(a){return It.document.createElement(a)}function Rt(a){throw Error(a)}function Si(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Rt(a)}function Zi(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),Rt(x+" is not in the range "+y+": "+a)}function Wr(a){It.console&&It.console.log(a)}function En(a){return typeof a=="object"&&a!==null}function li(a){return Array.isArray(a)||It.NodeList&&a instanceof It.NodeList||It.HTMLCollection&&a instanceof It.HTMLCollection}function bo(a){return Array.prototype.slice.call(a)}function La(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Rt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function sa(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Rt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Yi(){var a=$a.pop();return a===void 0?[]:a}function Wi(a){a.length=0,$a.push(a)}function er(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(En(a)&&a.constructor)return er(a.constructor);return typeof a}function Mo(a){var y=a;return En(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 ra(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 ai(a,y,x){Object.defineProperty(Xr.prototype,a,{get:y,set:x})}function Mr(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="",ee=0;ee<a.length;ee++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(ee)^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 ml=It.navigator!==void 0&&0<It.navigator.userAgent.indexOf("Trident/7"),xs=It.navigator!==void 0&&It.navigator.platform!==void 0&&It.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,$a=[];Object.freeze([]),hn.className="Util",hn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",hn.adym="gojs.net",hn.vfo="28e645fdb266",hn.className="Util";function Wt(a,y,x){Zo(this),this.j=a,this.xa=y,this.o=x}Wt.prototype.toString=function(){return"EnumValue."+this.xa};function $i(a,y){return y==null||y===""?null:a[y]}Jt.Object.defineProperties(Wt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Wt.className="EnumValue";function Vo(){this.ew=[]}Vo.prototype.toString=function(){return this.ew.join("")},Vo.prototype.add=function(a){a!==""&&this.ew.push(a)},Vo.className="StringBuilder";function Pr(){}Pr.className="PropertyCollection";var Ia={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){It.console&&It.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(ee,re){return function(){throw Error("Property "+ee.Zl[re.Tj]+" of "+ee.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function zo(){}zo.prototype.reset=function(){},zo.prototype.next=function(){return!1},zo.prototype.Ad=function(){return!1},zo.prototype.first=function(){return null},zo.prototype.any=function(){return!1},zo.prototype.all=function(){return!0},zo.prototype.each=function(){return this},zo.prototype.map=function(){return this},zo.prototype.filter=function(){return this},zo.prototype.de=function(){},zo.prototype.toString=function(){return"EmptyIterator"},Jt.Object.defineProperties(zo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),zo.prototype.first=zo.prototype.first,zo.prototype.hasNext=zo.prototype.Ad,zo.prototype.next=zo.prototype.next,zo.prototype.reset=zo.prototype.reset;var na=null;zo.className="EmptyIterator",na=new zo;function Fo(a){this.key=-1,this.value=a}Fo.prototype.reset=function(){this.key=-1},Fo.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},Fo.prototype.Ad=function(){return this.next()},Fo.prototype.first=function(){return this.key=0,this.value},Fo.prototype.any=function(a){return this.key=-1,a(this.value)},Fo.prototype.all=function(a){return this.key=-1,a(this.value)},Fo.prototype.each=function(a){return this.key=-1,a(this.value),this},Fo.prototype.map=function(a){return new Fo(a(this.value))},Fo.prototype.filter=function(a){return a(this.value)?new Fo(this.value):na},Fo.prototype.de=function(){this.value=null},Fo.prototype.toString=function(){return"SingletonIterator("+this.value+")"},Jt.Object.defineProperties(Fo.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),Fo.prototype.first=Fo.prototype.first,Fo.prototype.hasNext=Fo.prototype.Ad,Fo.prototype.next=Fo.prototype.next,Fo.prototype.reset=Fo.prototype.reset,Fo.className="SingletonIterator";function _o(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}_o.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},_o.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},_o.prototype.Ad=function(){return this.next()},_o.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},_o.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},_o.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},_o.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},_o.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 ee=y[z];(b===null||b(ee))&&x.push(a(ee))}return a=new bn,a.s=x,a.xb(),a.iterator},_o.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 ee=y[z];(b===null||b(ee))&&a(ee)&&x.push(ee)}return a=new bn,a.s=x,a.xb(),a.iterator},_o.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},_o.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},Jt.Object.defineProperties(_o.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}}}),_o.prototype.first=_o.prototype.first,_o.prototype.hasNext=_o.prototype.Ad,_o.prototype.next=_o.prototype.next,_o.prototype.reset=_o.prototype.reset,_o.className="ListIterator";function da(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}da.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},da.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)},da.prototype.Ad=function(){return this.next()},da.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},da.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},da.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},da.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},da.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 bn,a.s=x,a.xb(),a.iterator},da.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 bn,a.s=x,a.xb(),a.iterator},da.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},da.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},Jt.Object.defineProperties(da.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),da.prototype.first=da.prototype.first,da.prototype.hasNext=da.prototype.Ad,da.prototype.next=da.prototype.next,da.prototype.reset=da.prototype.reset,da.className="ListIteratorBackwards";function bn(a){Zo(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}we=bn.prototype,we.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return this._isFrozen=!1,this},we.toString=function(){return"List()#"+Vr(this)},we.add=function(a){return a===null?this:(this._isFrozen&&Si(this,a),this.s.push(a),this.xb(),this)},we.push=function(a){this.add(a)},we.addAll=function(a){if(a===null)return this;this._isFrozen&&Si(this);var y=this.s;if(li(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},we.clear=function(){this._isFrozen&&Si(this),this.s.length=0,this.xb()},we.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},we.has=function(a){return this.contains(a)},we.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},we.M=function(a){var y=this.s;return(0>a||a>=y.length)&&Zi(a,"0 <= i < length",bn,"elt:i"),y[a]},we.get=function(a){return this.M(a)},we.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&Zi(a,"0 <= i < length",bn,"setElt:i"),this._isFrozen&&Si(this,a),x[a]=y},we.set=function(a,y){this.cd(a,y)},we.first=function(){var a=this.s;return a.length===0?null:a[0]},we.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},we.pop=function(){this._isFrozen&&Si(this);var a=this.s;return 0<a.length?a.pop():null},bn.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},bn.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},bn.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},bn.prototype.map=function(a){for(var y=new bn,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},bn.prototype.filter=function(a){for(var y=new bn,x=[],E=this.s,b=E.length,z=0;z<b;z++){var ee=E[z];a(ee)&&x.push(ee)}return y.s=x,y.xb(),y},we=bn.prototype,we.Gb=function(a,y){0>a&&Zi(a,">= 0",bn,"insertAt:i"),this._isFrozen&&Si(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},we.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(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)},we.delete=function(a){return this.remove(a)},we.mb=function(a){var y=this.s;(0>a||a>=y.length)&&Zi(a,"0 <= i < length",bn,"removeAt:i"),this._isFrozen&&Si(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},we.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&&Si(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},bn.prototype.copy=function(){var a=new bn,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},we=bn.prototype,we.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},we.Iv=function(){for(var a=new Sn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},we.sort=function(a){return this._isFrozen&&Si(this),this.s.sort(a),this.xb(),this},we.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Si(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&Zi(y,"0 <= from < length",bn,"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},we.reverse=function(){return this._isFrozen&&Si(this),this.s.reverse(),this.xb(),this},Jt.Object.defineProperties(bn.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 na;var a=this.Sa;return a!==null?(a.reset(),a):new _o(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return na;var a=this.Hg;return a!==null?(a.reset(),a):new da(this)}}}),bn.prototype.reverse=bn.prototype.reverse,bn.prototype.sortRange=bn.prototype.zi,bn.prototype.sort=bn.prototype.sort,bn.prototype.toSet=bn.prototype.Iv,bn.prototype.toArray=bn.prototype.Fa,bn.prototype.removeRange=bn.prototype.removeRange,bn.prototype.removeAt=bn.prototype.mb,bn.prototype.delete=bn.prototype.delete,bn.prototype.remove=bn.prototype.remove,bn.prototype.insertAt=bn.prototype.Gb,bn.prototype.pop=bn.prototype.pop,bn.prototype.last=bn.prototype.jc,bn.prototype.first=bn.prototype.first,bn.prototype.set=bn.prototype.set,bn.prototype.setElt=bn.prototype.cd,bn.prototype.get=bn.prototype.get,bn.prototype.elt=bn.prototype.M,bn.prototype.indexOf=bn.prototype.indexOf,bn.prototype.has=bn.prototype.has,bn.prototype.contains=bn.prototype.contains,bn.prototype.clear=bn.prototype.clear,bn.prototype.addAll=bn.prototype.addAll,bn.prototype.push=bn.prototype.push,bn.prototype.add=bn.prototype.add,bn.prototype.thaw=bn.prototype.ka,bn.prototype.freeze=bn.prototype.freeze,bn.className="List";function Ga(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}Ga.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},Ga.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)},Ga.prototype.Ad=function(){return this.next()},Ga.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},Ga.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},Ga.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},Ga.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},Ga.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ga.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new bn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ga.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},Ga.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},Jt.Object.defineProperties(Ga.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),Ga.prototype.first=Ga.prototype.first,Ga.prototype.hasNext=Ga.prototype.Ad,Ga.prototype.next=Ga.prototype.next,Ga.prototype.reset=Ga.prototype.reset,Ga.className="SetIterator";function Sn(a){Zo(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}we=Sn.prototype,we.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return this._isFrozen=!1,this},we.toString=function(){return"Set()#"+Vr(this)},we.add=function(a){if(a===null)return this;this._isFrozen&&Si(this,a);var y=a;return En(a)&&(y=js(a)),this.Tb[y]===void 0&&(this.Sb++,a=new nl(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},we.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Si(this),li(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},we.contains=function(a){if(a===null)return!1;var y=a;return En(a)&&(y=Vr(a),y===void 0)?!1:this.Tb[y]!==void 0},we.has=function(a){return this.contains(a)},we.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},we.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},we.first=function(){var a=this.ea;return a===null?null:a.value},Sn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},Sn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},Sn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},Sn.prototype.map=function(a){for(var y=new Sn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},Sn.prototype.filter=function(a){for(var y=new Sn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},we=Sn.prototype,we.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(this,a);var y=a;if(En(a)&&(y=Vr(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},we.delete=function(a){return this.remove(a)},we.hp=function(a){if(a===null)return this;if(this._isFrozen&&Si(this),li(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},we.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Si(this);var y=new Sn;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},we.clear=function(){this._isFrozen&&Si(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},Sn.prototype.copy=function(){var a=new Sn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},Sn.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},Sn.prototype.Hv=function(){var a=new bn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function Zo(a){a.__gohashid=Ll++}function js(a){var y=a.__gohashid;return y===void 0&&(y=Ll++,a.__gohashid=y),y}function Vr(a){return a.__gohashid}Jt.Object.defineProperties(Sn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return na;var a=this.Sa;return a!==null?(a.reset(),a):new Ga(this)}}}),Sn.prototype.toList=Sn.prototype.Hv,Sn.prototype.toArray=Sn.prototype.Fa,Sn.prototype.clear=Sn.prototype.clear,Sn.prototype.retainAll=Sn.prototype.pA,Sn.prototype.removeAll=Sn.prototype.hp,Sn.prototype.delete=Sn.prototype.delete,Sn.prototype.remove=Sn.prototype.remove,Sn.prototype.first=Sn.prototype.first,Sn.prototype.containsAny=Sn.prototype.Ty,Sn.prototype.containsAll=Sn.prototype.Sy,Sn.prototype.has=Sn.prototype.has,Sn.prototype.contains=Sn.prototype.contains,Sn.prototype.addAll=Sn.prototype.addAll,Sn.prototype.add=Sn.prototype.add,Sn.prototype.thaw=Sn.prototype.ka,Sn.prototype.freeze=Sn.prototype.freeze;var Ll=1;Sn.className="Set",Sn.uniqueHash=Zo,Sn.hashIdUnique=js,Sn.hashId=Vr;function Ha(a){this.ma=a,this.qa=a.Ja,this.sa=null}Ha.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},Ha.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)},Ha.prototype.Ad=function(){return this.next()},Ha.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},Ha.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},Ha.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},Ha.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},Ha.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new bn;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},Ha.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new bn;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},Ha.prototype.de=function(){this.value=this.key=null,this.qa=-1},Ha.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},Jt.Object.defineProperties(Ha.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ha.prototype.first=Ha.prototype.first,Ha.prototype.hasNext=Ha.prototype.Ad,Ha.prototype.next=Ha.prototype.next,Ha.prototype.reset=Ha.prototype.reset,Ha.className="MapKeySetIterator";function $o(a){Sn.call(this),Zo(this),this._isFrozen=!0,this.ma=a}Ct($o,Sn),we=$o.prototype,we.freeze=function(){return this},we.ka=function(){return this},we.toString=function(){return"MapKeySet("+this.ma.toString()+")"},we.add=function(){Rt("This Set is read-only: "+this.toString())},we.contains=function(a){return this.ma.contains(a)},we.has=function(a){return this.contains(a)},we.remove=function(){Rt("This Set is read-only: "+this.toString())},we.delete=function(a){return this.remove(a)},we.clear=function(){Rt("This Set is read-only: "+this.toString())},we.first=function(){var a=this.ma.ea;return a!==null?a.key:null},$o.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},$o.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},$o.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},$o.prototype.map=function(a){for(var y=new Sn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},$o.prototype.filter=function(a){for(var y=new Sn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},$o.prototype.copy=function(){return new $o(this.ma)},$o.prototype.Iv=function(){var a=new Sn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},$o.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},$o.prototype.Hv=function(){var a=new bn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},Jt.Object.defineProperties($o.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?na:new Ha(this.ma)}}}),$o.prototype.toList=$o.prototype.Hv,$o.prototype.toArray=$o.prototype.Fa,$o.prototype.toSet=$o.prototype.Iv,$o.prototype.first=$o.prototype.first,$o.prototype.clear=$o.prototype.clear,$o.prototype.delete=$o.prototype.delete,$o.prototype.remove=$o.prototype.remove,$o.prototype.has=$o.prototype.has,$o.prototype.contains=$o.prototype.contains,$o.prototype.add=$o.prototype.add,$o.prototype.thaw=$o.prototype.ka,$o.prototype.freeze=$o.prototype.freeze,$o.className="MapKeySet";function Ba(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Ba.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Ba.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)},Ba.prototype.Ad=function(){return this.next()},Ba.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},Ba.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},Ba.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},Ba.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},Ba.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new bn;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Ba.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new bn;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Ba.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Ba.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},Jt.Object.defineProperties(Ba.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Ba.prototype.first=Ba.prototype.first,Ba.prototype.hasNext=Ba.prototype.Ad,Ba.prototype.next=Ba.prototype.next,Ba.prototype.reset=Ba.prototype.reset,Ba.className="MapValueSetIterator";function nl(a,y){this.key=a,this.value=y,this.ll=this.va=null}nl.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},nl.className="KeyValuePair";function wa(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}wa.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},wa.prototype.next=function(){var a=this.ma;if(a.Ja!==this.qa&&this.key===null)return!1;var y=this.sa;return y=y===null?a.ea:y.va,y!==null?(this.sa=y,this.key=y.key,this.value=y.value,!0):(this.de(),!1)},wa.prototype.Ad=function(){return this.next()},wa.prototype.first=function(){var a=this.ma;return this.qa=a.Ja,a=a.ea,a!==null?(this.sa=a,this.key=a.key,this.value=a.value,a):null},wa.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},wa.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},wa.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},wa.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new bn;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},wa.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new bn;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},wa.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},wa.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},Jt.Object.defineProperties(wa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),wa.prototype.first=wa.prototype.first,wa.prototype.hasNext=wa.prototype.Ad,wa.prototype.next=wa.prototype.next,wa.prototype.reset=wa.prototype.reset,wa.className="MapIterator";function ki(a){Zo(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"&&Rt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}we=ki.prototype,we.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return this._isFrozen=!1,this},we.toString=function(){return"Map()#"+Vr(this)},we.add=function(a,y){this._isFrozen&&Si(this,a);var x=a;En(a)&&(x=js(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new nl(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},we.set=function(a,y){return this.add(a,y)},we.addAll=function(a){if(a===null)return this;if(li(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 ki)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},we.first=function(){return this.ea},ki.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ki.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ki.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ki.prototype.map=function(a){for(var y=new ki,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ki.prototype.filter=function(a){for(var y=new ki,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},we=ki.prototype,we.contains=function(a){var y=a;return En(a)&&(y=Vr(a),y===void 0)?!1:this.Tb[y]!==void 0},we.has=function(a){return this.contains(a)},we.I=function(a){var y=a;return En(a)&&(y=Vr(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},we.get=function(a){return this.I(a)},we.remove=function(a){if(a===null)return!1;this._isFrozen&&Si(this,a);var y=a;if(En(a)&&(y=Vr(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},we.delete=function(a){return this.remove(a)},we.clear=function(){this._isFrozen&&Si(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()},ki.prototype.copy=function(){var a=new ki,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},ki.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 nl(b.key,b.value),x++}return y},ki.prototype.Lf=function(){return new $o(this)},Jt.Object.defineProperties(ki.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return na;var a=this.Sa;return a!==null?(a.reset(),a):new wa(this)}},iteratorKeys:{get:function(){return 0>=this.count?na:new Ha(this)}},iteratorValues:{get:function(){if(0>=this.count)return na;var a=this.jf;return a!==null?(a.reset(),a):new Ba(this)}}}),ki.prototype.toKeySet=ki.prototype.Lf,ki.prototype.toArray=ki.prototype.Fa,ki.prototype.clear=ki.prototype.clear,ki.prototype.delete=ki.prototype.delete,ki.prototype.remove=ki.prototype.remove,ki.prototype.get=ki.prototype.get,ki.prototype.getValue=ki.prototype.I,ki.prototype.has=ki.prototype.has,ki.prototype.contains=ki.prototype.contains,ki.prototype.first=ki.prototype.first,ki.prototype.addAll=ki.prototype.addAll,ki.prototype.set=ki.prototype.set,ki.prototype.add=ki.prototype.add,ki.prototype.thaw=ki.prototype.ka,ki.prototype.freeze=ki.prototype.freeze,ki.className="Map";function $e(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Rt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var rs,hu,cu,ul,kl;$e.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},$e.prototype.h=function(a,y){return this.x=a,this.y=y,this},$e.prototype.sg=function(a,y){return this.x=a,this.y=y,this},$e.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},$e.prototype.copy=function(){var a=new $e;return a.x=this.x,a.y=this.y,a},we=$e.prototype,we.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},we.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function zl(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 $e(x,b)}return new $e}function sh(a){return a.x.toString()+" "+a.y.toString()}we.toString=function(){return"Point("+this.x+","+this.y+")"},we.D=function(a){return a instanceof $e?this.x===a.x&&this.y===a.y:!1},we.hi=function(a,y){return this.x===a&&this.y===y},we.Xa=function(a){return Ie.B(this.x,a.x)&&Ie.B(this.y,a.y)},we.add=function(a){return this.x+=a.x,this.y+=a.y,this},we.re=function(a){return this.x-=a.x,this.y-=a.y,this},we.offset=function(a,y){return this.x+=a,this.y+=y,this},$e.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},we=$e.prototype,we.scale=function(a,y){return this.x*=a,this.y*=y,this},we.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},we.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},we.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},we.ab=function(a){return Su(a.x-this.x,a.y-this.y)},we.direction=function(a,y){return Su(a-this.x,y-this.y)};function Su(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}we.Ry=function(a,y){return Ie.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},we.fA=function(a,y,x,E){return Ie.qh(a,y,x,E,this.x,this.y,this),this},we.gA=function(a,y){return Ie.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},we.uA=function(a,y,x,E){return Ie.No(this.x,this.y,a,y,x,E,this),this},we.vA=function(a,y){return Ie.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},we.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},we.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},we.transform=function(a){return a.Ga(this),this};function Ra(a,y){return y.Cd(a),a}function qa(a,y,x,E,b,z){var ee=b-x,re=z-E,oe=ee*ee+re*re;x-=a,E-=y;var le=-x*ee-E*re;return 0>=le||le>=oe?(ee=b-a,re=z-y,Math.min(x*x+E*E,ee*ee+re*re)):(a=ee*E-re*x,a*a/oe)}function Nr(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function vr(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)}we.w=function(){return isFinite(this.x)&&isFinite(this.y)},$e.alloc=function(){var a=uo.pop();return a===void 0?new $e:a},$e.allocAt=function(a,y){var x=uo.pop();return x===void 0?new $e(a,y):(x.x=a,x.y=y,x)},$e.free=function(a){uo.push(a)},$e.prototype.isReal=$e.prototype.w,$e.prototype.setSpot=$e.prototype.yi,$e.prototype.setRectSpot=$e.prototype.xi,$e.prototype.snapToGridPoint=$e.prototype.vA,$e.prototype.snapToGrid=$e.prototype.uA,$e.prototype.projectOntoLineSegmentPoint=$e.prototype.gA,$e.prototype.projectOntoLineSegment=$e.prototype.fA,$e.intersectingLineSegments=function(a,y,x,E,b,z,ee,re){return Ie.Rl(a,y,x,E,b,z,ee,re)},$e.prototype.compareWithLineSegmentPoint=$e.prototype.Ry,$e.compareWithLineSegment=function(a,y,x,E,b,z){return Ie.Fl(a,y,x,E,b,z)},$e.prototype.direction=$e.prototype.direction,$e.prototype.directionPoint=$e.prototype.ab,$e.prototype.normalize=$e.prototype.normalize,$e.prototype.distanceSquared=$e.prototype.zd,$e.prototype.distanceSquaredPoint=$e.prototype.Bf,$e.prototype.scale=$e.prototype.scale,$e.prototype.rotate=$e.prototype.rotate,$e.prototype.offset=$e.prototype.offset,$e.prototype.subtract=$e.prototype.re,$e.prototype.add=$e.prototype.add,$e.prototype.equalsApprox=$e.prototype.Xa,$e.prototype.equalTo=$e.prototype.hi,$e.prototype.equals=$e.prototype.D,$e.prototype.set=$e.prototype.set,$e.prototype.setTo=$e.prototype.sg;var uo=[];$e.className="Point",$e.parse=zl,$e.stringify=sh,$e.distanceLineSegmentSquared=qa,$e.distanceSquared=Nr,$e.direction=vr,$e.Origin=rs=new $e(0,0).ja(),$e.InfiniteTopLeft=hu=new $e(-1/0,-1/0).ja(),$e.InfiniteBottomRight=cu=new $e(1/0,1/0).ja(),$e.SixPoint=ul=new $e(6,6).ja(),$e.NoPoint=kl=new $e(NaN,NaN).ja(),$e.parse=zl,$e.stringify=sh,$e.distanceLineSegmentSquared=qa,$e.distanceSquared=Nr,$e.direction=vr;function un(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):Rt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Gr,Io,Va,Ta,os,Ws,vl;un.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},un.prototype.h=function(a,y){return this.width=a,this.height=y,this},un.prototype.sg=function(a,y){return this.width=a,this.height=y,this},un.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},un.prototype.copy=function(){var a=new un;return a.width=this.width,a.height=this.height,a},we=un.prototype,we.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},we.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function yl(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 un(x,b)}return new un}function xu(a){return a.width.toString()+" "+a.height.toString()}we.toString=function(){return"Size("+this.width+","+this.height+")"},we.D=function(a){return a instanceof un?this.width===a.width&&this.height===a.height:!1},we.hi=function(a,y){return this.width===a&&this.height===y},we.Xa=function(a){return Ie.B(this.width,a.width)&&Ie.B(this.height,a.height)},we.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},we.w=function(){return isFinite(this.width)&&isFinite(this.height)},un.alloc=function(){var a=Ou.pop();return a===void 0?new un:a},un.free=function(a){Ou.push(a)},un.prototype.isReal=un.prototype.w,un.prototype.inflate=un.prototype.Bc,un.prototype.equalsApprox=un.prototype.Xa,un.prototype.equalTo=un.prototype.hi,un.prototype.equals=un.prototype.D,un.prototype.set=un.prototype.set,un.prototype.setTo=un.prototype.sg;var Ou=[];un.className="Size",un.parse=yl,un.stringify=xu,un.ZeroSize=Gr=new un(0,0).ja(),un.OneSize=Io=new un(1,1).ja(),un.SixSize=Va=new un(6,6).ja(),un.EightSize=Ta=new un(8,8).ja(),un.TenSize=os=new un(10,10).ja(),un.InfiniteSize=Ws=new un(1/0,1/0).ja(),un.NoSize=vl=new un(NaN,NaN).ja(),un.parse=yl,un.stringify=xu;function Xt(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 $e?(x=a.x,a=a.y,y instanceof $e?(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 un?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Rt("Incorrect second argument supplied to Rect constructor "+y)):Rt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}we=Xt.prototype,we.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},we.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function El(a,y,x){a.width=y,a.height=x}we.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},we.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},we.dd=function(a){return this.x=a.x,this.y=a.y,this},we.tA=function(a){return this.width=a.width,this.height=a.height,this},Xt.prototype.copy=function(){var a=new Xt;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},we=Xt.prototype,we.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},we.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Gl(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 ee=0;a[y]==="";)y++;return(E=a[y++])&&(ee=parseFloat(E)),new Xt(x,b,z,ee)}return new Xt}function wu(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}we.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},we.D=function(a){return a instanceof Xt?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},we.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},we.Xa=function(a){return Ie.B(this.x,a.x)&&Ie.B(this.y,a.y)&&Ie.B(this.width,a.width)&&Ie.B(this.height,a.height)};function vs(a,y){return Ie.$(a.x,y.x)&&Ie.$(a.y,y.y)&&Ie.$(a.width,y.width)&&Ie.$(a.height,y.height)}we.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},we.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},we.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},we.offset=function(a,y){return this.x+=a,this.y+=y,this},we.Bc=function(a,y){return Yu(this,y,a,y,a)},we.Co=function(a){return Yu(this,a.top,a.right,a.bottom,a.left)},we.Fv=function(a){return Yu(this,-a.top,-a.right,-a.bottom,-a.left)},we.Hz=function(a,y,x,E){return Yu(this,a,y,x,E)};function Yu(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}we.Ex=function(a){return Hh(this,a.x,a.y,a.width,a.height)},we.Uu=function(a,y,x,E){return Hh(this,a,y,x,E)};function Hh(a,y,x,E,b){var z=Math.max(a.x,y),ee=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=ee,a.width=Math.max(0,y-z),a.height=Math.max(0,x-ee),a}we.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},we.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 yh(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))}we.Ye=function(a){return Ka(this,a.x,a.y,0,0)},we.ed=function(a){return Ka(this,a.x,a.y,a.width,a.height)},we.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Ka(this,a,y,x,E)};function Ka(a,y,x,E,b){var z=Math.min(a.x,y),ee=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=ee,a.width=y-z,a.height=x-ee,a}we.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 Ko(a,y,x,E,b,z,ee,re){return ee===void 0&&(ee=0),re===void 0&&(re=0),a<=b&&b+ee<=a+x&&y<=z&&z+re<=y+E}function Bo(a,y,x,E,b,z,ee,re){return a>ee+b||b>x+a?!1:!(y>re+z||z>E+y)}we.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},we.Mz=function(){return this.width===0&&this.height===0},Xt.alloc=function(){var a=cs.pop();return a===void 0?new Xt:a},Xt.allocAt=function(a,y,x,E){var b=cs.pop();return b===void 0?new Xt(a,y,x,E):b.h(a,y,x,E)},Xt.free=function(a){cs.push(a)},Jt.Object.defineProperties(Xt.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 $e(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new un(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new $e(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}}}),Xt.prototype.isEmpty=Xt.prototype.Mz,Xt.prototype.isReal=Xt.prototype.w,Xt.intersectsLineSegment=function(a,y,x,E,b,z,ee,re){return Ie.Fx(a,y,x,E,b,z,ee,re)},Xt.prototype.setSpot=Xt.prototype.yi,Xt.prototype.union=Xt.prototype.Kv,Xt.prototype.unionRect=Xt.prototype.ed,Xt.prototype.unionPoint=Xt.prototype.Ye,Xt.prototype.intersects=Xt.prototype.Vu,Xt.prototype.intersectsRect=Xt.prototype.Yc,Xt.prototype.intersect=Xt.prototype.Uu,Xt.prototype.intersectRect=Xt.prototype.Ex,Xt.prototype.grow=Xt.prototype.Hz,Xt.prototype.subtractMargin=Xt.prototype.Fv,Xt.prototype.addMargin=Xt.prototype.Co,Xt.prototype.inflate=Xt.prototype.Bc,Xt.prototype.offset=Xt.prototype.offset,Xt.prototype.contains=Xt.prototype.contains,Xt.prototype.containsRect=Xt.prototype.Re,Xt.prototype.containsPoint=Xt.prototype.ca,Xt.prototype.equalsApprox=Xt.prototype.Xa,Xt.prototype.equalTo=Xt.prototype.hi,Xt.prototype.equals=Xt.prototype.D,Xt.prototype.setSize=Xt.prototype.tA,Xt.prototype.setPoint=Xt.prototype.dd,Xt.prototype.set=Xt.prototype.set,Xt.prototype.setTo=Xt.prototype.sg;var ia=null,Ua=null,cs=[];Xt.className="Rect",Xt.parse=Gl,Xt.stringify=wu,Xt.contains=Ko,Xt.intersects=Bo,Xt.ZeroRect=ia=new Xt(0,0,0,0).ja(),Xt.NoRect=Ua=new Xt(NaN,NaN,NaN,NaN).ja(),Xt.parse=Gl,Xt.stringify=wu,Xt.contains=Ko,Xt.intersects=Bo;function Sr(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):Rt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Sr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Sr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},Sr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},Sr.prototype.copy=function(){var a=new Sr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},we=Sr.prototype,we.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},we.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Zh(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 Sr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new Sr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new Sr(x,b);for(var ee=NaN;a[y]==="";)y++;return(E=a[y++])&&(ee=parseFloat(E)),isNaN(ee)?new Sr(x,b):new Sr(x,b,z,ee)}return new Sr}function _u(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}we.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},we.D=function(a){return a instanceof Sr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},we.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},we.Xa=function(a){return Ie.B(this.top,a.top)&&Ie.B(this.right,a.right)&&Ie.B(this.bottom,a.bottom)&&Ie.B(this.left,a.left)},we.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},Sr.alloc=function(){var a=lh.pop();return a===void 0?new Sr:a},Sr.free=function(a){lh.push(a)},Sr.prototype.isReal=Sr.prototype.w,Sr.prototype.equalsApprox=Sr.prototype.Xa,Sr.prototype.equalTo=Sr.prototype.hi,Sr.prototype.equals=Sr.prototype.D,Sr.prototype.set=Sr.prototype.set,Sr.prototype.setTo=Sr.prototype.sg;var Sl=null,Wh=null,lh=[];Sr.className="Margin",Sr.parse=Zh,Sr.stringify=_u,Sr.ZeroMargin=Sl=new Sr(0,0,0,0).ja(),Sr.TwoMargin=Wh=new Sr(2,2,2,2).ja(),Sr.parse=Zh,Sr.stringify=_u;function Di(a,y,x,E){a===void 0?this.offsetY=this.offsetX=this.y=this.x=0:(y===void 0&&(y=0),x===void 0&&(x=0),E===void 0&&(E=0),this.x=a,this.y=y,this.offsetX=x,this.offsetY=E),this._isFrozen=!1}var Ms,Os,Iu,sc,Vh,Oo,Fh,Pu,zs,il,kh,lc,Ml,Eu,uc,od,hc,ad,bc,Jl,Nh,Ru,Kh,Uh,Lc,Fs,Yh,Mc,cc,Sh,Fl,hl,_s,Qs,Xh,ys;Di.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Di.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Di.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Di.prototype.copy=function(){var a=new Di;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},we=Di.prototype,we.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},we.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ya(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Nl(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return Ms;if(a==="TopLeft")return Os;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Iu;if(a==="TopRight")return sc;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return Vh;if(a==="Center")return Oo;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Fh;if(a==="BottomLeft")return Pu;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return zs;if(a==="BottomRight")return il;if(a==="TopSide")return kh;if(a==="LeftSide")return lc;if(a==="RightSide")return Ml;if(a==="BottomSide")return Eu;if(a==="TopBottomSides")return uc;if(a==="LeftRightSides")return od;if(a==="TopLeftSides")return hc;if(a==="TopRightSides")return ad;if(a==="BottomLeftSides")return bc;if(a==="BottomRightSides")return Jl;if(a==="NotTopSide")return Nh;if(a==="NotLeftSide")return Ru;if(a==="NotRightSide")return Kh;if(a==="NotBottomSide")return Uh;if(a==="AllSides")return Lc;if(a==="Default")return Fs;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 ee=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(ee=parseFloat(E)),new Di(x,b,z,ee)}return new Di}function dc(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}we.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(Ms)?"None":this.D(Os)?"TopLeft":this.D(Iu)?"Top":this.D(sc)?"TopRight":this.D(Vh)?"Left":this.D(Oo)?"Center":this.D(Fh)?"Right":this.D(Pu)?"BottomLeft":this.D(zs)?"Bottom":this.D(il)?"BottomRight":this.D(kh)?"TopSide":this.D(lc)?"LeftSide":this.D(Ml)?"RightSide":this.D(Eu)?"BottomSide":this.D(uc)?"TopBottomSides":this.D(od)?"LeftRightSides":this.D(hc)?"TopLeftSides":this.D(ad)?"TopRightSides":this.D(bc)?"BottomLeftSides":this.D(Jl)?"BottomRightSides":this.D(Nh)?"NotTopSide":this.D(Ru)?"NotLeftSide":this.D(Kh)?"NotRightSide":this.D(Uh)?"NotBottomSide":this.D(Lc)?"AllSides":this.D(Fs)?"Default":"None"},we.D=function(a){return a instanceof Di?(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},we.gv=function(){return new Di(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},we.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Yh))a=lc;else if(a.D(Mc))a=Ml;else if(a.D(cc))a=kh;else if(a.D(Sh))a=Eu;else return!1;return a=a.offsetY,(this.offsetY&a)===a},we.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},we.Mc=function(){return isNaN(this.x)||isNaN(this.y)},we.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},we.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},we.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Di.alloc=function(){var a=Fc.pop();return a===void 0?new Di:a},Di.free=function(a){Fc.push(a)},Di.prototype.isDefault=Di.prototype.Xb,Di.prototype.isNone=Di.prototype.ys,Di.prototype.isSide=Di.prototype.$c,Di.prototype.isNoSpot=Di.prototype.Mc,Di.prototype.isSpot=Di.prototype.sb,Di.prototype.includesSide=Di.prototype.Hf,Di.prototype.opposite=Di.prototype.gv,Di.prototype.equals=Di.prototype.D,Di.prototype.set=Di.prototype.set,Di.prototype.setTo=Di.prototype.sg;var Fc=[];Di.className="Spot",Di.parse=Nl,Di.stringify=dc,Di.None=Ms=Ya(new Di(0,0,0,0),0).ja(),Di.Default=Fs=Ya(new Di(0,0,-1,0),-1).ja(),Di.TopLeft=Os=new Di(0,0,0,0).ja(),Di.TopCenter=Iu=new Di(.5,0,0,0).ja(),Di.TopRight=sc=new Di(1,0,0,0).ja(),Di.LeftCenter=Vh=new Di(0,.5,0,0).ja(),Di.Center=Oo=new Di(.5,.5,0,0).ja(),Di.RightCenter=Fh=new Di(1,.5,0,0).ja(),Di.BottomLeft=Pu=new Di(0,1,0,0).ja(),Di.BottomCenter=zs=new Di(.5,1,0,0).ja(),Di.BottomRight=il=new Di(1,1,0,0).ja(),Di.MiddleTop=Fl=Iu,Di.MiddleLeft=hl=Vh,Di.MiddleRight=_s=Fh,Di.MiddleBottom=Qs=zs,Di.Top=cc=Iu,Di.Left=Yh=Vh,Di.Right=Mc=Fh,Di.Bottom=Sh=zs,Di.TopSide=kh=Ya(new Di(0,0,1,1),1).ja(),Di.LeftSide=lc=Ya(new Di(0,0,1,2),1).ja(),Di.RightSide=Ml=Ya(new Di(0,0,1,4),1).ja(),Di.BottomSide=Eu=Ya(new Di(0,0,1,8),1).ja(),Di.TopBottomSides=uc=Ya(new Di(0,0,1,9),1).ja(),Di.LeftRightSides=od=Ya(new Di(0,0,1,6),1).ja(),Di.TopLeftSides=hc=Ya(new Di(0,0,1,3),1).ja(),Di.TopRightSides=ad=Ya(new Di(0,0,1,5),1).ja(),Di.BottomLeftSides=bc=Ya(new Di(0,0,1,10),1).ja(),Di.BottomRightSides=Jl=Ya(new Di(0,0,1,12),1).ja(),Di.NotTopSide=Nh=Ya(new Di(0,0,1,14),1).ja(),Di.NotLeftSide=Ru=Ya(new Di(0,0,1,13),1).ja(),Di.NotRightSide=Kh=Ya(new Di(0,0,1,11),1).ja(),Di.NotBottomSide=Uh=Ya(new Di(0,0,1,7),1).ja(),Di.AllSides=Lc=Ya(new Di(0,0,1,15),1).ja(),Xh=new Di(.156,.156).ja(),ys=new Di(.844,.844).ja(),Di.parse=Nl,Di.stringify=dc;function ct(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ct.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},ct.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},ct.prototype.copy=function(){var a=new ct;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},ct.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ct.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},ct.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ct.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ct.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},ct.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,ee=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*ee+this.m21*a+this.dx,this.dy=this.m12*ee+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},ct.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},ct.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,ee=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=ee,this.translate(-y,-x),this},we=ct.prototype,we.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},we.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},we.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)},we.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))},we.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))},we.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,ee=this.m12,re=this.m21,oe=this.m22,le=this.dx,he=this.dy,ge=y*z+x*re+le,ye=y*ee+x*oe+he,xe=E*z+x*re+le,Ee=E*ee+x*oe+he;return x=y*z+b*re+le,y=y*ee+b*oe+he,z=E*z+b*re+le,E=E*ee+b*oe+he,b=Math.min(ge,xe),ge=Math.max(ge,xe),xe=Math.min(ye,Ee),ye=Math.max(ye,Ee),b=Math.min(b,x),ge=Math.max(ge,x),xe=Math.min(xe,y),ye=Math.max(ye,y),b=Math.min(b,z),ge=Math.max(ge,z),xe=Math.min(xe,E),ye=Math.max(ye,E),a.h(b,xe,ge-b,ye-xe),a},ct.alloc=function(){var a=Vt.pop();return a===void 0?new ct:a},ct.free=function(a){Vt.push(a)},ct.prototype.transformRect=ct.prototype.pp,ct.prototype.transformPoint=ct.prototype.Ga,ct.prototype.scale=ct.prototype.scale,ct.prototype.translate=ct.prototype.translate,ct.prototype.rotate=ct.prototype.rotate,ct.prototype.invert=ct.prototype.Vj,ct.prototype.multiplyInverted=ct.prototype.bv,ct.prototype.multiply=ct.prototype.multiply,ct.prototype.reset=ct.prototype.reset,ct.prototype.isIdentity=ct.prototype.ws,ct.prototype.equals=ct.prototype.D,ct.prototype.setTransform=ct.prototype.setTransform,ct.prototype.set=ct.prototype.set;var Vt=[];ct.className="Transform",ct.xF="54a702f3e53909c447824c6706603faf4c";var Ie={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Ie.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Ie.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,ee){if(0>=b&&(b=1e-6),a<x)var re=a,oe=x;else re=x,oe=a;if(y<E)var le=y,he=E;else le=E,he=y;if(a===x)return le<=ee&&ee<=he&&a-b<=z&&z<=a+b;if(y===E)return re<=z&&z<=oe&&y-b<=ee&&ee<=y+b;if(oe+=b,re-=b,re<=z&&z<=oe&&(he+=b,le-=b,le<=ee&&ee<=he))if(oe-re>he-le)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=ee&&ee<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(ee=(x-a)/(E-y)*(ee-y)+a,ee-b<=z&&z<=ee+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,ee,re,oe,le,he,ge){if(Ie.Yb(a,y,ee,re,ge,x,E)&&Ie.Yb(a,y,ee,re,ge,b,z))return Ie.Yb(a,y,ee,re,ge,le,he);var ye=(a+x)/2,xe=(y+E)/2,Ee=(x+b)/2,Ne=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(ye+Ee)/2,x=(xe+Ne)/2,Ee=(Ee+b)/2,Ne=(Ne+z)/2;var Ye=(E+Ee)/2,je=(x+Ne)/2;return Ie.cs(a,y,ye,xe,E,x,Ye,je,oe,le,he,ge)||Ie.cs(Ye,je,Ee,Ne,b,z,ee,re,oe,le,he,ge)},ax:function(a,y,x,E,b,z,ee,re,oe){var le=(x+b)/2,he=(E+z)/2;return oe.h((((a+x)/2+le)/2+(le+(b+ee)/2)/2)/2,(((y+E)/2+he)/2+(he+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ee,re){var oe=(x+b)/2,le=(E+z)/2;return vr(((a+x)/2+oe)/2,((y+E)/2+le)/2,(oe+(b+ee)/2)/2,(le+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ee,re,oe,le){if(Ie.Yb(a,y,ee,re,oe,x,E)&&Ie.Yb(a,y,ee,re,oe,b,z))Ka(le,a,y,0,0),Ka(le,ee,re,0,0);else{var he=(a+x)/2,ge=(y+E)/2,ye=(x+b)/2,xe=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(he+ye)/2,x=(ge+xe)/2,ye=(ye+b)/2,xe=(xe+z)/2;var Ee=(E+ye)/2,Ne=(x+xe)/2;Ie.Dl(a,y,he,ge,E,x,Ee,Ne,oe,le),Ie.Dl(Ee,Ne,ye,xe,b,z,ee,re,oe,le)}return le},Qe:function(a,y,x,E,b,z,ee,re,oe,le){if(Ie.Yb(a,y,ee,re,oe,x,E)&&Ie.Yb(a,y,ee,re,oe,b,z))le.length===0&&(le.push(a),le.push(y)),le.push(ee),le.push(re);else{var he=(a+x)/2,ge=(y+E)/2,ye=(x+b)/2,xe=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(he+ye)/2,x=(ge+xe)/2,ye=(ye+b)/2,xe=(xe+z)/2;var Ee=(E+ye)/2,Ne=(x+xe)/2;Ie.Qe(a,y,he,ge,E,x,Ee,Ne,oe,le),Ie.Qe(Ee,Ne,ye,xe,b,z,ee,re,oe,le)}return le},jv:function(a,y,x,E,b,z,ee,re,oe,le){if(Ie.Yb(a,y,b,z,le,x,E))return Ie.Yb(a,y,b,z,le,re,oe);var he=(a+x)/2,ge=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ye=(he+x)/2,xe=(ge+E)/2;return Ie.jv(a,y,he,ge,ye,xe,ee,re,oe,le)||Ie.jv(ye,xe,x,E,b,z,ee,re,oe,le)},OA:function(a,y,x,E,b,z,ee){return ee.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),ee},iv:function(a,y,x,E,b,z,ee,re){if(Ie.Yb(a,y,b,z,ee,x,E))Ka(re,a,y,0,0),Ka(re,b,z,0,0);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var he=(oe+x)/2,ge=(le+E)/2;Ie.iv(a,y,oe,le,he,ge,ee,re),Ie.iv(he,ge,x,E,b,z,ee,re)}return re},ep:function(a,y,x,E,b,z,ee,re){if(Ie.Yb(a,y,b,z,ee,x,E))re.length===0&&(re.push(a),re.push(y)),re.push(b),re.push(z);else{var oe=(a+x)/2,le=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var he=(oe+x)/2,ge=(le+E)/2;Ie.ep(a,y,oe,le,he,ge,ee,re),Ie.ep(he,ge,x,E,b,z,ee,re)}return re},Eo:function(a,y,x,E,b,z,ee,re,oe,le,he,ge,ye,xe){if(Ie.Yb(a,y,ee,re,ye,x,E)&&Ie.Yb(a,y,ee,re,ye,b,z))return!Ie.Rl(a,y,ee,re,oe,le,he,ge)||(ye=(a-ee)*(le-ge)-(y-re)*(oe-he),ye===0)?!1:(xe.h(((a*re-y*ee)*(oe-he)-(a-ee)*(oe*ge-le*he))/ye,((a*re-y*ee)*(le-ge)-(y-re)*(oe*ge-le*he))/ye),!0);var Ee=(a+x)/2,Ne=(y+E)/2,Ye=(x+b)/2,je=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Ee+Ye)/2,x=(Ne+je)/2,Ye=(Ye+b)/2,je=(je+z)/2;var nt=(E+Ye)/2,ot=(x+je)/2,ut=1/0,vt=!1,Dt=0,Wn=0;return Ie.Eo(a,y,Ee,Ne,E,x,nt,ot,oe,le,he,ge,ye,xe)&&(a=(xe.x-oe)*(xe.x-oe)+(xe.y-le)*(xe.y-le),a<ut&&(ut=a,vt=!0,Dt=xe.x,Wn=xe.y)),Ie.Eo(nt,ot,Ye,je,b,z,ee,re,oe,le,he,ge,ye,xe)&&(xe.x-oe)*(xe.x-oe)+(xe.y-le)*(xe.y-le)<ut&&(vt=!0,Dt=xe.x,Wn=xe.y),vt&&(xe.x=Dt,xe.y=Wn),vt},Fo:function(a,y,x,E,b,z,ee,re,oe,le,he,ge,ye){var xe=0;if(Ie.Yb(a,y,ee,re,ye,x,E)&&Ie.Yb(a,y,ee,re,ye,b,z)){if(ye=(a-ee)*(le-ge)-(y-re)*(oe-he),ye===0)return xe;var Ee=((a*re-y*ee)*(oe-he)-(a-ee)*(oe*ge-le*he))/ye,Ne=((a*re-y*ee)*(le-ge)-(y-re)*(oe*ge-le*he))/ye;if(Ee>=he)return xe;if((oe>he?oe-he:he-oe)<(le>ge?le-ge:ge-le)){if(y<re?(oe=y,a=re):(oe=re,a=y),Ne<oe||Ne>a)return xe}else if(a<ee?(oe=a,a=ee):oe=ee,Ee<oe||Ee>a)return xe;0<ye?xe++:0>ye&&xe--}else{Ee=(a+x)/2,Ne=(y+E)/2;var Ye=(x+b)/2,je=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Ee+Ye)/2,x=(Ne+je)/2,Ye=(Ye+b)/2,je=(je+z)/2;var nt=(E+Ye)/2,ot=(x+je)/2;xe+=Ie.Fo(a,y,Ee,Ne,E,x,nt,ot,oe,le,he,ge,ye),xe+=Ie.Fo(nt,ot,Ye,je,b,z,ee,re,oe,le,he,ge,ye)}return xe},qh:function(a,y,x,E,b,z,ee){return Ie.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(ee.h(a,x),!1):z>y?(ee.h(a,y),!1):(ee.h(a,z),!0)):Ie.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(ee.h(E,y),!1):b>a?(ee.h(a,y),!1):(ee.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(ee.h(a,y),!1):1.000005<b?(ee.h(x,E),!1):(ee.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,ee,re,oe){return Ie.B(a,x)&&Ie.B(y,E)?(oe.h(a,y),!1):Ie.$(b,ee)?Ie.$(a,x)?(Ie.qh(a,y,x,E,b,z,oe),!1):Ie.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ee-b),Ie.$(a,x)?(x=re*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(oe.h(a,b),!1):x>y?(oe.h(a,y),!1):(oe.h(a,x),!0)):(ee=(E-y)/(x-a),Ie.$(re,ee)?(Ie.qh(a,y,x,E,b,z,oe),!1):(b=(ee*a-re*b+z-y)/(ee-re),Ie.$(ee,0)?(a<x?(E=a,a=x):E=x,b<E?(oe.h(E,y),!1):b>a?(oe.h(a,y),!1):(oe.h(b,y),!0)):Ie.qh(a,y,x,E,b,ee*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return Ie.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,ee,re,oe,le){function he(Ye,je){var nt=(Ye-a)*(Ye-a)+(je-y)*(je-y);nt<ge&&(ge=nt,oe.h(Ye,je))}var ge=1/0;he(oe.x,oe.y);var ye=0,xe=0,Ee=0,Ne=0;if(b<ee?(ye=b,xe=ee):(ye=ee,xe=b),z<re?(Ee=b,Ne=ee):(Ee=ee,Ne=b),ye=(xe-ye)/2+le,le=(Ne-Ee)/2+le,b=(b+ee)/2,z=(z+re)/2,ye===0||le===0)return oe;if(.5>(x>a?x-a:a-x)){if(ye=1-(x-b)*(x-b)/(ye*ye),0>ye)return oe;ye=Math.sqrt(ye),E=-le*ye+z,he(x,le*ye+z),he(x,E)}else{if(x=(E-y)/(x-a),E=1/(ye*ye)+x*x/(le*le),re=2*x*(y-x*a)/(le*le)-2*x*z/(le*le)-2*b/(ye*ye),ye=re*re-4*E*(2*x*a*z/(le*le)-2*y*z/(le*le)+z*z/(le*le)+b*b/(ye*ye)-1+(y-x*a)*(y-x*a)/(le*le)),0>ye)return oe;ye=Math.sqrt(ye),le=(-re+ye)/(2*E),he(le,x*le-x*a+y),ye=(-re-ye)/(2*E),he(ye,x*ye-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ee,re,oe){var le=1e21,he=a,ge=y;if(Ie.Ve(a,y,a,E,b,z,ee,re,oe)){var ye=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);ye<le&&(le=ye,he=oe.x,ge=oe.y)}return Ie.Ve(x,y,x,E,b,z,ee,re,oe)&&(ye=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),ye<le&&(le=ye,he=oe.x,ge=oe.y)),Ie.Ve(a,y,x,y,b,z,ee,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<le&&(le=y,he=oe.x,ge=oe.y)),Ie.Ve(a,E,x,E,b,z,ee,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<le&&(le=a,he=oe.x,ge=oe.y)),oe.h(he,ge),1e21>le},us:function(a,y,x){return Ie.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,ee,re){var oe=a+x,le=y+E;return b===ee?(z<re?(ee=z,z=re):ee=re,a<=b&&b<=oe&&ee<=le&&z>=y):z===re?(b<ee?(re=b,b=ee):re=ee,y<=z&&z<=le&&re<=oe&&b>=a):!!(Ko(a,y,x,E,b,z)||Ko(a,y,x,E,ee,re)||Ie.Rl(a,y,oe,y,b,z,ee,re)||Ie.Rl(oe,y,oe,le,b,z,ee,re)||Ie.Rl(oe,le,a,le,b,z,ee,re)||Ie.Rl(a,le,a,y,b,z,ee,re))},Rl:function(a,y,x,E,b,z,ee,re){return a===x&&y===E&&b===ee&&z===re?a===b&&y===z:0>=Ie.Fl(a,y,x,E,b,z)*Ie.Fl(a,y,x,E,ee,re)&&0>=Ie.Fl(b,z,ee,re,a,y)*Ie.Fl(b,z,ee,re,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 ee=Math.PI;z||(E*=ee/180,b*=ee/180);var re=E>b?-1:1;z=[];var oe=ee/2,le=E;if(E=Math.min(2*ee,Math.abs(b-E)),1e-5>E)return oe=le+re*Math.min(E,oe),re=a+x*Math.cos(le),le=y+x*Math.sin(le),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(le+y)/2,z.push([re,le,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=le+re*Math.min(E,oe),z.push(Ie.Vy(x,le,b,a,y)),E-=Math.abs(b-le),le=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,ee=a*Math.cos(z),re=a*Math.sin(z),oe=-re,le=ee*ee+oe*oe,he=le+ee*ee+oe*re;return le=4/3*(Math.sqrt(2*le*he)-he)/(ee*re-oe*ee),re=ee-le*oe,ee=oe+le*ee,oe=-ee,le=z+y,z=Math.cos(le),le=Math.sin(le),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ee*le,b+re*le+ee*z,E+re*z-oe*le,b+re*le+oe*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,ee){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var re=x;return x+b-a<b/2&&(re=x+b),a=E,E+z-y<z/2&&(a=E+z),ee.h(re,a),ee},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 ee=1,re=0;else ee=0,re=1;var oe=ee===0?a:y,le=ee===0?x:E;return(ee===0?b:z)&&(le=-le),ee=re,x=ee===0?x:E,(ee===0?b:z)&&(x=-x),Ie.az(oe,ee===0?a:y,le,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 ee=y*E,re=-z+ee,oe=-z+Math.sqrt(a*a+ee*ee);y=re;for(var le=0;9999999999>le&&(y=.5*(re+oe),!(y===re||y===oe));++le){var he=a/(y+b),ge=ee/(y+z);if(he=he*he+ge*ge-1,0<he)re=y;else if(0>he)oe=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 Pr,um:new Pr,Mf:new Pr,Nf:0,vm:100};Ie.za=Ie.AA;function wt(a){Zo(this),this.l=2,a===void 0&&(a=wt.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===wt.o?this.ee=new bn:(wt.V===null&&(wt.V=new bn().freeze()),this.ee=wt.V),this.aq=this.ee.Ja,this.Ip=new Xt().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Os,this.gg=il,this.Rk=this.Sk=NaN,this.Uf=yn}wt.prototype.copy=function(){var a=new wt;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===wt.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},wt.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},wt.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==wt.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},wt.prototype.ka=function(){if(Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==wt.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},wt.prototype.Xa=function(a){if(!(a instanceof wt))return!1;if(this.type!==a.type)return this.type===wt.j&&a.type===wt.o?no(this,a):a.type===wt.j&&this.type===wt.o?no(a,this):!1;if(this.type===wt.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 Ie.B(this.startX,a.startX)&&Ie.B(this.startY,a.startY)&&Ie.B(this.endX,a.endX)&&Ie.B(this.endY,a.endY)};function no(a,y){return a.type!==wt.j||y.type!==wt.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Ie.B(a.startX,y.startX)&&Ie.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Qi&&Ie.B(a.endX,y.endX)&&Ie.B(a.endY,y.endY))))}wt.ia=function(a){return a.toString()},wt.prototype.qb=function(a){a.classType===wt&&(this.type=a)},wt.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case wt.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 wt.u:var y=new Xt(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 wt.F:if(y=new Xt(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 wt.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()}},wt.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},wt.parse=function(a,y){function x(){return Ne>=ut-1?!0:le[Ne+1].match(vt)!==null}function E(){return Ne++,le[Ne]}function b(hr){var Ji=parseFloat(E()),Do=parseFloat(E());Ye===Ye.toLowerCase()&&(Ji=ot.x+Ji,Do=ot.y+Do),hr.h(Ji,Do)}function z(){return b(ot),ot}function ee(){return b(nt),nt}function re(){var hr=je.toLowerCase();return hr!=="c"&&hr!=="s"&&hr!=="q"&&hr!=="t"?ot:new $e(2*ot.x-nt.x,2*ot.y-nt.y)}y===void 0&&(y=!1);var oe=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(oe,"$1 $2"),a=a.replace(oe,"$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 le=a.split(" ");for(a=0;a<le.length;a++){var he=le[a];if(he.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Yi();for(var ge="",ye=!1,xe=0;xe<he.length;xe++){var Ee=he[xe];Ee!=="."||ye?Ee==="."?(oe.push(ge),ge="."):ge+=Ee:(ye=!0,ge+=Ee)}for(oe.push(ge),le.splice(a,1),he=0;he<oe.length;he++)le.splice(a+he,0,oe[he]);a+=oe.length-1,Wi(oe)}}var Ne=-1,Ye="",je="";oe=new $e(0,0);var nt=new $e(0,0),ot=new $e(0,0),ut=le.length;a=N1(null),ye=ge=he=!1,xe=!0,Ee=null;for(var vt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Ne>=ut-1);)if(je=Ye,Ye=E(),Ye!=="")switch(Ye.toUpperCase()){case"X":xe=!0,ge=he=!1;break;case"M":for(Ee=z(),a.mc===null||xe===!0?(Mg(a,Ee.x,Ee.y,he,!ge,ye),xe=!1):a.moveTo(Ee.x,Ee.y),oe.assign(ot);!x();)Ee=z(),a.lineTo(Ee.x,Ee.y);break;case"L":for(;!x();)Ee=z(),a.lineTo(Ee.x,Ee.y);break;case"H":for(;!x();)ot=new $e((Ye===Ye.toLowerCase()?ot.x:0)+parseFloat(E()),ot.y),a.lineTo(ot.x,ot.y);break;case"V":for(;!x();)ot=new $e(ot.x,(Ye===Ye.toLowerCase()?ot.y:0)+parseFloat(E())),a.lineTo(ot.x,ot.y);break;case"C":for(;!x();){Ee=new $e,b(Ee);var Dt=ee(),Wn=z();md(a,Ee.x,Ee.y,Dt.x,Dt.y,Wn.x,Wn.y)}break;case"S":for(;!x();)Ee=re(),Dt=ee(),Wn=z(),md(a,Ee.x,Ee.y,Dt.x,Dt.y,Wn.x,Wn.y);break;case"Q":for(;!x();)Ee=ee(),Dt=z(),Gm(a,Ee.x,Ee.y,Dt.x,Dt.y);break;case"T":for(;!x();)nt=Ee=re(),Dt=z(),Gm(a,Ee.x,Ee.y,Dt.x,Dt.y);break;case"B":for(;!x();){Ee=parseFloat(E()),Dt=parseFloat(E()),Wn=parseFloat(E());var vi=parseFloat(E()),si=parseFloat(E()),Mn=si,sn=!1;x()||(Mn=parseFloat(E()),x()||(sn=parseFloat(E())!==0)),Ye===Ye.toLowerCase()&&(Wn+=ot.x,vi+=ot.y),a.arcTo(Ee,Dt,Wn,vi,si,Mn,sn)}break;case"A":for(;!x();)Ee=Math.abs(parseFloat(E())),Dt=Math.abs(parseFloat(E())),Wn=parseFloat(E()),si=vi=!1,sn=Mn=0,Mn=E(),Mn.length===1?(vi=!!parseFloat(Mn),si=!!parseFloat(E()),Mn=parseFloat(E())):Mn.length===2?(vi=!!parseFloat(Mn[0]),si=!!parseFloat(Mn[1]),Mn=parseFloat(E())):(vi=!!parseFloat(Mn[0]),si=!!parseFloat(Mn[1]),Mn=parseFloat(Mn.slice(2))),sn=parseFloat(E()),Ye===Ye.toLowerCase()&&(Mn=ot.x+Mn,sn=ot.y+sn),ot.h(Mn,sn),Px(a,Ee,Dt,Wn,vi,si,Mn,sn);break;case"Z":wx(a),ot.assign(oe);break;case"F":for(Ee="",Dt=1;le[Ne+Dt];)if(le[Ne+Dt]==="0")ye=!0,Dt++;else if(le[Ne+Dt].match(/[Uu]/)!==null)Dt++;else if(le[Ne+Dt].match(vt)===null)Dt++;else{Ee=le[Ne+Dt];break}Ee.match(/[Mm]/)?he=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Ee="",Dt=1;le[Ne+Dt];)if(le[Ne+Dt].match(/[Ff]/)!==null)Dt++;else if(le[Ne+Dt].match(vt)===null)Dt++;else{Ee=le[Ne+Dt];break}Ee.match(/[Mm]/)?ge=!0:a.mc.isShadowed=!1}if(oe=a.os,Hm=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},wt.Ha=function(a,y){for(var x=a.length,E=$e.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}$e.free(E)},wt.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===wt.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},wt.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===wt.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 ee=E[z];ee._isInvalidBounds=!1,ee.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),Ar(this,a,!1),Ka(a,0,0,0,0),a.freeze()},wt.prototype.ix=function(){var a=new Xt;return Ar(this,a,!0),a};function Ar(a,y,x){switch(a.type){case wt.j:case wt.u:case wt.F:x?y.h(a.od,a.pd,0,0):Ka(y,a.od,a.pd,0,0),Ka(y,a.Dc,a.Ec,0,0);break;case wt.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):Ka(y,z.startX,z.startY,0,0);for(var ee=z.segments.s,re=ee.length,oe=z.startX,le=z.startY,he=0;he<re;he++){var ge=ee[he];switch(ge.type){case Qi:case ur:oe=ge.endX,le=ge.endY,Ka(y,oe,le,0,0);break;case eo:Ie.Dl(oe,le,ge.point1X,ge.point1Y,ge.point2X,ge.point2Y,ge.endX,ge.endY,.5,y),oe=ge.endX,le=ge.endY;break;case Or:Ie.iv(oe,le,ge.point1X,ge.point1Y,ge.endX,ge.endY,.5,y),oe=ge.endX,le=ge.endY;break;case Yr:case Eo:var ye=ge.type===Yr?No(ge,z):Gi(ge,z,oe,le),xe=ye.length;if(xe===0){oe=ge.type===Yr?ge.centerX:ge.endX,le=ge.type===Yr?ge.centerY:ge.endY,Ka(y,oe,le,0,0);break}ge=null;for(var Ee=0;Ee<xe;Ee++)ge=ye[Ee],Ie.Dl(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5],ge[6],ge[7],.5,y);ge!==null&&(oe=ge[6],le=ge[7]);break;default:Rt("Unknown Segment type: "+ge.type)}}}break;default:Rt("Unknown Geometry type: "+a.type)}}wt.prototype.normalize=function(){this._isFrozen&&Si(this);var a=this.ix();return this.offset(-a.x,-a.y),new $e(-a.x,-a.y)},wt.prototype.offset=function(a,y){return this._isFrozen&&Si(this),this.transform(1,0,0,1,a,y),this},wt.prototype.scale=function(a,y){return this._isFrozen&&Si(this),this.transform(a,0,0,y,0,0),this},wt.prototype.rotate=function(a,y,x){this._isFrozen&&Si(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=ct.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),ct.free(E),this},we=wt.prototype,we.transform=function(a,y,x,E,b,z){switch(this.type){case wt.j:case wt.u:case wt.F:var ee=this.od,re=this.pd;this.od=ee*a+re*x+b,this.pd=ee*y+re*E+z,ee=this.Dc,re=this.Ec,this.Dc=ee*a+re*x+b,this.Ec=ee*y+re*E+z;break;case wt.o:for(var oe=this.figures.s,le=oe.length,he=0;he<le;he++){var ge=oe[he];ee=ge.startX,re=ge.startY,ge.startX=ee*a+re*x+b,ge.startY=ee*y+re*E+z,ge=ge.segments.s;for(var ye=ge.length,xe=0;xe<ye;xe++){var Ee=ge[xe];switch(Ee.type){case Qi:case ur:ee=Ee.endX,re=Ee.endY,Ee.endX=ee*a+re*x+b,Ee.endY=ee*y+re*E+z;break;case eo:ee=Ee.point1X,re=Ee.point1Y,Ee.point1X=ee*a+re*x+b,Ee.point1Y=ee*y+re*E+z,ee=Ee.point2X,re=Ee.point2Y,Ee.point2X=ee*a+re*x+b,Ee.point2Y=ee*y+re*E+z,ee=Ee.endX,re=Ee.endY,Ee.endX=ee*a+re*x+b,Ee.endY=ee*y+re*E+z;break;case Or:ee=Ee.point1X,re=Ee.point1Y,Ee.point1X=ee*a+re*x+b,Ee.point1Y=ee*y+re*E+z,ee=Ee.endX,re=Ee.endY,Ee.endX=ee*a+re*x+b,Ee.endY=ee*y+re*E+z;break;case Yr:ee=Ee.centerX,re=Ee.centerY,Ee.centerX=ee*a+re*x+b,Ee.centerY=ee*y+re*E+z,y!==0&&(ee=180*Math.atan2(y,a)/Math.PI,0>ee&&(ee+=360),Ee.startAngle+=ee),0>a&&(Ee.startAngle=180-Ee.startAngle,Ee.sweepAngle=-Ee.sweepAngle),0>E&&(Ee.startAngle=-Ee.startAngle,Ee.sweepAngle=-Ee.sweepAngle),Ee.radiusX*=Math.sqrt(a*a+x*x),Ee.radiusY!==void 0&&(Ee.radiusY*=Math.sqrt(y*y+E*E));break;case Eo:if(ee=Ee.endX,re=Ee.endY,Ee.endX=ee*a+re*x+b,Ee.endY=ee*y+re*E+z,Ee.radiusX===0||Ee.radiusY===0)break;y!==0&&(ee=180*Math.atan2(y,a)/Math.PI,0>ee&&(ee+=360),Ee.xAxisRotation+=ee),0>a&&(Ee.xAxisRotation=180-Ee.xAxisRotation,Ee.isClockwiseArc=!Ee.isClockwiseArc),0>E&&(Ee.xAxisRotation=-Ee.xAxisRotation,Ee.isClockwiseArc=!Ee.isClockwiseArc),Ee.radiusX*=Math.sqrt(a*a+x*x),Ee.radiusY*=Math.sqrt(y*y+E*E);break;default:Rt("Unknown Segment type: "+Ee.type)}}}}return this._isInvalidBounds=!0,this},we.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 wt.j:return Ie.Yb(x,E,b,z,y,a.x,a.y);case wt.u:var ee=Xt.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=ee.ca(a),Xt.free(ee),a;case wt.F:ee=Math.min(x,b)-y;var re=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:(ee=a.x-(ee+x),re=a.y-(re+y),1>=ee*ee/(x*x)+re*re/(y*y));case wt.o:return ko(this,a,y,!0,!1);default:return!1}};function ko(a,y,x,E,b){var z=y.x;y=y.y;for(var ee=a.bounds.x-20,re=0,oe,le,he,ge,ye=a.figures.s,xe=ye.length,Ee=0;Ee<xe;Ee++){var Ne=ye[Ee],Ye=!Ne.isEvenOdd;if(Ne.isFilled){if(E&&Ne.ca(z,y,x))return!0;var je=Ne.segments;oe=Ne.startX,le=Ne.startY;for(var nt=oe,ot=le,ut=je.s,vt=0;vt<=je.length;vt++){var Dt=void 0;if(vt!==je.length){Dt=ut[vt];var Wn=Dt.type;a=Dt.endX,ge=Dt.endY}else Wn=Qi,a=nt,ge=ot;switch(Wn){case ur:if(nt=Tr(z,y,ee,y,oe,le,nt,ot),isNaN(nt))return!0;re+=nt,nt=a,ot=ge;break;case Qi:if(oe=Tr(z,y,ee,y,oe,le,a,ge),isNaN(oe))return!0;re+=oe;break;case eo:he=Ie.Fo(oe,le,Dt.point1X,Dt.point1Y,Dt.point2X,Dt.point2Y,a,ge,ee,y,z,y,.5),re+=he;break;case Or:he=Ie.Fo(oe,le,(oe+2*Dt.point1X)/3,(le+2*Dt.point1Y)/3,(2*Dt.point1X+a)/3,(2*Dt.point1Y+ge)/3,a,ge,ee,y,z,y,.5),re+=he;break;case Yr:case Eo:Wn=Dt.type===Yr?No(Dt,Ne):Gi(Dt,Ne,oe,le);var vi=Wn.length;if(vi===0){if(oe=Tr(z,y,ee,y,oe,le,Dt.type===Yr?Dt.centerX:Dt.endX,Dt.type===Yr?Dt.centerY:Dt.endY),isNaN(oe))return!0;re+=oe;break}Dt=null;for(var si=0;si<vi;si++){if(Dt=Wn[si],si===0){if(he=Tr(z,y,ee,y,oe,le,Dt[0],Dt[1]),isNaN(he))return!0;re+=he}he=Ie.Fo(Dt[0],Dt[1],Dt[2],Dt[3],Dt[4],Dt[5],Dt[6],Dt[7],ee,y,z,y,.5),re+=he}Dt!==null&&(a=Dt[6],ge=Dt[7]);break;default:Rt("Unknown Segment type: "+Dt.type)}oe=a,le=ge}if(Ye){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(Ne.ca(z,y,b?x:x+2))return!0}return!1}function Tr(a,y,x,E,b,z,ee,re){if(Ie.Yb(b,z,ee,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var le=((a*E-y*x)*(b-ee)-(a-x)*(b*re-z*ee))/oe;if(y=(a*E-y*x)*(z-re)/oe,le>=a)return 0;if((b>ee?b-ee:ee-b)<(z>re?z-re:re-z)){if(z<re){if(y<z||y>re)return 0}else if(y<re||y>z)return 0}else if(b<ee){if(le<b||le>ee)return 0}else if(le<ee||le>b)return 0;return 0<oe?1:-1}function Ir(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}we.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new $e),this.type===wt.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,ee=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var he=oe[a];if(ee+he>=z)return E=z-ee,E=he===0?0:E/he,x=x[re],re=x[2*a],b=x[2*a+1],y.h(re+(x[2*a+2]-re)*E,b+(x[2*a+3]-b)*E),y;ee+=he}}return y},we.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===wt.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,ee=0;ee<E;ee++){var re=x[ee],oe=re.length;for(a=0;a<oe;a++){var le=re[a];if(z+le>=b)return b=y[ee],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+=le}}return NaN},we.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===wt.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,ee=0,re=0;re<b;re++){var oe=E[re],le=oe.length;for(a=0;a<le;a++){var he=oe[a];if(ee+he>=z)return E=z-ee,E=he===0?0:E/he,he=x[re],x=he[2*a],re=he[2*a+1],b=he[2*a+2],a=he[2*a+3],y[0]=x+(b-x)*E,y[1]=re+(a-re)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-re)?0:1>Math.abs(b-x)?0<=a-re?90:270:1>Math.abs(a-re)?0<=b-x?0:180:180*Math.atan2(a-re,b-x)/Math.PI,y;ee+=he}}return y},we.xx=function(a){if(this.type===wt.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 ee=x;E=b}else ee=b,E=x;return a<=ee?ee===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-ee)}if(x===b)return y<E?ee=y:(ee=E,E=y),z<=ee?ee===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-ee);ee=(E-y)*(E-y)+(b-x)*(b-x);var re=$e.alloc();return Ie.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,$e.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ee)}}else if(this.type===wt.u){ee=this.startX,re=this.startY;var oe=this.endX;if(b=this.endY,ee!==oe||re!==b){y=oe-ee,x=b-re,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,ee),oe),a=Math.min(Math.max(a,re),b),ee=Math.abs(E-ee),oe=Math.abs(E-oe),re=Math.abs(a-re),b=Math.abs(a-b);var le=Math.min(ee,oe,re,b);if(le===re)return E/z;if(le===oe)return(y+a)/z;if(le===b)return(2*y+x-E)/z;if(le===ee)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=$e.alloc(),b=1/0,re=ee=0,oe=y.length;for(var he=le=0,ge=0;ge<oe;ge++)for(var ye=y[ge],xe=x[ge],Ee=ye.length,Ne=0;Ne<Ee;Ne+=2){var Ye=ye[Ne],je=ye[Ne+1];if(Ne!==0){Ie.qh(le,he,Ye,je,a.x,a.y,E);var nt=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);nt<b&&(b=nt,ee=re,ee+=Math.sqrt((E.x-le)*(E.x-le)+(E.y-he)*(E.y-he))),re+=xe[(Ne-2)/2]}le=Ye,he=je}return $e.free(E),a=ee/z,0>a?0:1<a?1:a}return 0};function la(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===wt.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===wt.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===wt.F){var z=new qr;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ee=new Ki(Yr);if(ee.startAngle=0,ee.sweepAngle=360,ee.centerX=(a.startX+a.endX)/2,ee.centerY=(a.startY+a.endY)/2,ee.radiusX=Math.abs(a.startX-a.endX)/2,ee.radiusY=Math.abs(a.startY-a.endY)/2,z.add(ee),a=No(ee,z),b=a.length,b===0)E.push(ee.centerX),E.push(ee.centerY);else{ee=z.startX,z=z.startY;for(var re=0;re<b;re++){var oe=a[re];Ie.Qe(ee,z,oe[2],oe[3],oe[4],oe[5],oe[6],oe[7],.5,E),ee=oe[6],z=oe[7]}}y.push(E),x.push(vo(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),ee=b.startX,z=b.startY,re=ee,oe=z;for(var le=b.segments.s,he=le.length,ge=0;ge<he;ge++){var ye=le[ge];switch(ye.type){case ur:4<=E.length&&(y.push(E),x.push(vo(E))),E=[],E.push(ye.endX),E.push(ye.endY),ee=ye.endX,z=ye.endY,re=ee,oe=z;break;case Qi:E.push(ye.endX),E.push(ye.endY),ee=ye.endX,z=ye.endY;break;case eo:Ie.Qe(ee,z,ye.point1X,ye.point1Y,ye.point2X,ye.point2Y,ye.endX,ye.endY,.5,E),ee=ye.endX,z=ye.endY;break;case Or:Ie.ep(ee,z,ye.point1X,ye.point1Y,ye.endX,ye.endY,.5,E),ee=ye.endX,z=ye.endY;break;case Yr:var xe=No(ye,b),Ee=xe.length;if(Ee===0){E.push(ye.centerX),E.push(ye.centerY),ee=ye.centerX,z=ye.centerY;break}for(var Ne=0;Ne<Ee;Ne++){var Ye=xe[Ne];Ie.Qe(ee,z,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ee=Ye[6],z=Ye[7]}break;case Eo:if(xe=Gi(ye,b,ee,z),Ee=xe.length,Ne=ye.endX,Ye=ye.endY,Ee===0){E.push(Ne),E.push(Ye),ee=Ne,z=Ye;break}for(Ne=0;Ne<Ee;Ne++)Ye=xe[Ne],Ie.Qe(ee,z,Ye[2],Ye[3],Ye[4],Ye[5],Ye[6],Ye[7],.5,E),ee=Ye[6],z=Ye[7];break;default:Rt("Segment not of valid type: "+ye.type)}ye.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(vo(E)))}}}function vo(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var ee=a[z],re=a[z+1];z!==0&&y.push(Math.sqrt(Nr(x,E,ee,re))),x=ee,E=re}return y}we.add=function(a){return this.ee.add(a),this},we.pm=function(a,y,x,E,b,z,ee,re){return this._isFrozen&&Si(this),this.fg=new Di(a,y,b,z).freeze(),this.gg=new Di(x,E,ee,re).freeze(),this},Jt.Object.defineProperties(wt.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 la(this),this.tk}},flattenedLengths:{get:function(){return la(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===wt.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===wt.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,ee=0;ee<z;ee++)a+=b[ee]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&Si(this,a),this.na=a,a===wt.o?this.ee=new bn:(wt.V===null&&(wt.V=new bn().freeze()),this.ee=wt.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Si(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Si(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Si(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Si(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Si(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Si(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Si(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Si(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),wt.prototype.setSpots=wt.prototype.pm,wt.prototype.add=wt.prototype.add,wt.prototype.getFractionForPoint=wt.prototype.xx,wt.prototype.getPointAndAngleAlongPath=wt.prototype.Qu,wt.prototype.getAngleAlongPath=wt.prototype.wx,wt.prototype.getPointAlongPath=wt.prototype.Pu,wt.prototype.containsPoint=wt.prototype.ca,wt.prototype.transform=wt.prototype.transform,wt.prototype.rotate=wt.prototype.rotate,wt.prototype.scale=wt.prototype.scale,wt.prototype.offset=wt.prototype.offset,wt.prototype.normalize=wt.prototype.normalize,wt.prototype.computeBoundsWithoutOrigin=wt.prototype.ix,wt.prototype.equalsApprox=wt.prototype.Xa,wt.className="Geometry",wt.j=new Wt(wt,"Line",0),wt.u=new Wt(wt,"Rectangle",1),wt.F=new Wt(wt,"Ellipse",2),wt.o=new Wt(wt,"Path",3),wt.V=null,wt.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",wt.className="Geometry",wt.stringify=wt.ia,wt.fillPath=wt.nb,wt.parse=wt.parse,wt.Line=wt.j,wt.Rectangle=wt.u,wt.Ellipse=wt.F,wt.Path=wt.o;function qr(a,y,x,E,b){Zo(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 bn,this.sr=this.pl.Ja,this.fw=null}qr.prototype.copy=function(){var a=new qr;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},we=qr.prototype,we.Xa=function(a){if(!(a instanceof qr&&Ie.B(this.startX,a.startX)&&Ie.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},we.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},we.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},we.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},we.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},we.add=function(a){return this.pl.add(a),this},we.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ee=b,re=this.segments.s,oe=re.length,le=0;le<oe;le++){var he=re[le];switch(he.type){case ur:z=he.endX,ee=he.endY,E=he.endX,b=he.endY;break;case Qi:if(Ie.Yb(E,b,he.endX,he.endY,x,a,y))return!0;E=he.endX,b=he.endY;break;case eo:if(Ie.cs(E,b,he.point1X,he.point1Y,he.point2X,he.point2Y,he.endX,he.endY,.5,a,y,x))return!0;E=he.endX,b=he.endY;break;case Or:if(Ie.jv(E,b,he.point1X,he.point1Y,he.endX,he.endY,.5,a,y,x))return!0;E=he.endX,b=he.endY;break;case Yr:case Eo:var ge=he.type===Yr?No(he,this):Gi(he,this,E,b),ye=ge.length,xe=he.type===Yr?he.centerX:he.endX,Ee=he.type===Yr?he.centerY:he.endY;if(ye===0){if(Ie.Yb(E,b,xe,Ee,x,a,y))return!0;E=xe,b=Ee;break}for(xe=null,Ee=0;Ee<ye;Ee++)if(xe=ge[Ee],Ee===0&&Ie.Yb(E,b,xe[0],xe[1],x,a,y)||Ie.cs(xe[0],xe[1],xe[2],xe[3],xe[4],xe[5],xe[6],xe[7],.5,a,y,x))return!0;xe!==null&&(E=xe[6],b=xe[7]);break;default:Rt("Unknown Segment type: "+he.type)}if(he.isClosed&&(E!==z||b!==ee)&&Ie.Yb(E,b,z,ee,x,a,y))return!0}return!1},Jt.Object.defineProperties(qr.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&&Si(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Si(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Si(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Si(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Si(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Si(this,a),this.pl=a,this._isInvalidBounds=!0}}}),qr.prototype.add=qr.prototype.add,qr.prototype.equalsApprox=qr.prototype.Xa,qr.className="PathFigure";function Ki(a,y,x,E,b,z,ee,re){Zo(this),a===void 0&&(a=Qi),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),ee===void 0&&(ee=0),a===Eo?(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 ee=="boolean"?ee&&(this.isLargeArc=!0):typeof ee=="number"&&ee&&(this.isLargeArc=!0),re&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===Yr&&(z=Math.max(z,0)),this.Wh=z,typeof ee=="number"?(a===Yr&&(ee=Math.max(ee,0)),this.Pg=ee):this.Pg=0),this.ae=null}Ki.prototype.copy=function(){var a=new Ki;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},we=Ki.prototype,we.Xa=function(a){if(!(a instanceof Ki)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case ur:case Qi:return Ie.B(this.endX,a.endX)&&Ie.B(this.endY,a.endY);case eo:return Ie.B(this.endX,a.endX)&&Ie.B(this.endY,a.endY)&&Ie.B(this.point1X,a.point1X)&&Ie.B(this.point1Y,a.point1Y)&&Ie.B(this.point2X,a.point2X)&&Ie.B(this.point2Y,a.point2Y);case Or:return Ie.B(this.endX,a.endX)&&Ie.B(this.endY,a.endY)&&Ie.B(this.point1X,a.point1X)&&Ie.B(this.point1Y,a.point1Y);case Yr:return Ie.B(this.startAngle,a.startAngle)&&Ie.B(this.sweepAngle,a.sweepAngle)&&Ie.B(this.centerX,a.centerX)&&Ie.B(this.centerY,a.centerY)&&Ie.B(this.radiusX,a.radiusX)&&Ie.B(this.radiusY,a.radiusY);case Eo:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Ie.B(this.xAxisRotation,a.xAxisRotation)&&Ie.B(this.endX,a.endX)&&Ie.B(this.endY,a.endY)&&Ie.B(this.radiusX,a.radiusX)&&Ie.B(this.radiusY,a.radiusY);default:return!1}},we.qb=function(a){a.classType===Ki&&(this.type=a)},we.toString=function(a){switch(a===void 0&&(a=-1),this.type){case ur:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Qi:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case eo: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 Or: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 Yr: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 Eo: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":"")},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return this._isFrozen=!1,this},we.close=function(){return this.isClosed=!0,this};function No(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=Ie.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ee=ct.alloc();ee.reset(),x<E?ee.scale(1,E/x):ee.scale(x/E,1),wt.Ha(z,ee),ct.free(ee)}for(x=z.length,E=0;E<x;E++)ee=z[E],ee[0]+=y,ee[1]+=b,ee[2]+=y,ee[3]+=b,ee[4]+=y,ee[5]+=b,ee[6]+=y,ee[7]+=b;return a.ae=z,a.ae}function Gi(a,y,x,E){function b(Ne,Ye,je,nt){return(Ne*nt<Ye*je?-1:1)*Math.acos((Ne*je+Ye*nt)/(Math.sqrt(Ne*Ne+Ye*Ye)*Math.sqrt(je*je+nt*nt)))}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 ee=Math.PI/180*a.Ne,re=a.isLargeArc,oe=a.isClockwiseArc,le=a.Dc,he=a.Ec,ge=Math.cos(ee),ye=Math.sin(ee),xe=ge*(x-le)/2+ye*(E-he)/2;ee=-ye*(x-le)/2+ge*(E-he)/2;var Ee=xe*xe/(y*y)+ee*ee/(z*z);return 1<Ee&&(y*=Math.sqrt(Ee),z*=Math.sqrt(Ee)),Ee=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ee*ee-z*z*xe*xe)/(y*y*ee*ee+z*z*xe*xe)),isNaN(Ee)&&(Ee=0),re=Ee*y*ee/z,Ee=Ee*-z*xe/y,isNaN(re)&&(re=0),isNaN(Ee)&&(Ee=0),x=(x+le)/2+ge*re-ye*Ee,E=(E+he)/2+ye*re+ge*Ee,he=b(1,0,(xe-re)/y,(ee-Ee)/z),ge=(xe-re)/y,le=(ee-Ee)/z,xe=(-xe-re)/y,re=(-ee-Ee)/z,ee=b(ge,le,xe,re),xe=(ge*xe+le*re)/(Math.sqrt(ge*ge+le*le)*Math.sqrt(xe*xe+re*re)),-1>=xe?ee=Math.PI:1<=xe&&(ee=0),!oe&&0<ee&&(ee-=2*Math.PI),oe&&0>ee&&(ee+=2*Math.PI),oe=y>z?1:y/z,xe=y>z?z/y:1,y=Ie.jx(0,0,y>z?y:z,he,he+ee,!0),z=ct.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,xe),wt.Ha(y,z),ct.free(z),a.ae=y,a.ae}Jt.Object.defineProperties(Ki.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&&Si(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Si(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Si(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Si(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Si(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Si(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Si(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Si(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Si(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&Zi(a,">= zero",Ki,"radiusX"),this._isFrozen&&Si(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&Zi(a,">= zero",Ki,"radiusY"),this._isFrozen&&Si(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Si(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&&Si(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&&Si(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&&Si(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&&Si(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Ki.prototype.equalsApprox=Ki.prototype.Xa;var ur=new Wt(Ki,"Move",0),Qi=new Wt(Ki,"Line",1),eo=new Wt(Ki,"Bezier",2),Or=new Wt(Ki,"QuadraticBezier",3),Yr=new Wt(Ki,"Arc",4),Eo=new Wt(Ki,"SvgArc",4);Ki.className="PathSegment",Ki.Move=ur,Ki.Line=Qi,Ki.Bezier=eo,Ki.QuadraticBezier=Or,Ki.Arc=Yr,Ki.SvgArc=Eo;function Vi(){this.H=null,this.xu=new $e(0,0).freeze(),this.mt=new $e(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}Vi.prototype.copy=function(){var a=new Vi;return this.clone(a)},Vi.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},Vi.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},Vi.prototype.So=function(a,y){var x=this.diagram;return x===null||bu(x,a,y),y},Vi.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(bu(x,a,y),y.assign(x.Ps(y))),y},Jt.Object.defineProperties(Vi.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}}}),Vi.prototype.getMultiTouchDocumentPoint=Vi.prototype.Bz,Vi.prototype.getMultiTouchViewPoint=Vi.prototype.So,Vi.className="InputEvent";function Hr(){this.H=null,this.xa="",this.ar=this.Lr=null}Hr.prototype.copy=function(){var a=new Hr;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Hr.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},Jt.Object.defineProperties(Hr.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}}}),Hr.className="DiagramEvent";function xi(){this.Fm=Er,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}xi.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},xi.prototype.copy=function(){var a=new xi;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=En(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=En(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=En(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=En(y)&&typeof y.J=="function"?y.J():y,a},xi.prototype.qb=function(a){a.classType===xi&&(this.change=a)},xi.prototype.toString=function(){var a="";return a=this.change===tr?a+"* ":this.change===Er?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===tr?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Mo(this.object)),this.oldValue!==null&&(a+=" old: "+Mo(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Mo(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},xi.prototype.I=function(a){return a?this.oldValue:this.newValue},xi.prototype.Dz=function(a){return a?this.oldParam:this.newParam},xi.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},xi.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},xi.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},xi.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},Jt.Object.defineProperties(xi.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===tr&&(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}}}),xi.prototype.redo=xi.prototype.redo,xi.prototype.canRedo=xi.prototype.canRedo,xi.prototype.undo=xi.prototype.undo,xi.prototype.canUndo=xi.prototype.canUndo,xi.prototype.getParam=xi.prototype.Dz,xi.prototype.getValue=xi.prototype.I,xi.prototype.clear=xi.prototype.clear;var tr=new Wt(xi,"Transaction",-1),Er=new Wt(xi,"Property",0),Ao=new Wt(xi,"Insert",1),Ho=new Wt(xi,"Remove",2);xi.className="ChangedEvent",xi.Transaction=tr,xi.Property=Er,xi.Insert=Ao,xi.Remove=Ho;function Pa(){this.o=new bn().freeze(),this.xa="",this.j=!1}Pa.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},Pa.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()},Pa.prototype.canUndo=function(){return this.isComplete},Pa.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()}},Pa.prototype.canRedo=function(){return this.isComplete},Pa.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()}},Pa.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ki,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Er&&E.object){var b=y.get(E.object);b||(b=new ki,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()}},Jt.Object.defineProperties(Pa.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}}}),Pa.prototype.optimize=Pa.prototype.ak,Pa.prototype.redo=Pa.prototype.redo,Pa.prototype.canRedo=Pa.prototype.canRedo,Pa.prototype.undo=Pa.prototype.undo,Pa.prototype.canUndo=Pa.prototype.canUndo,Pa.prototype.clear=Pa.prototype.clear,Pa.className="Transaction";function qi(){this.Pt=new Sn,this.Jd=!1,this.u=new bn().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new bn().freeze(),this.hl=new bn,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}qi.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},qi.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},qi.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},we=qi.prototype,we.Xw=function(a){this.Pt.add(a)},we.Rx=function(a){this.Pt.remove(a)},we.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},we.eb=function(a){return a===void 0&&(a=""),Vs(this,!0,a)},we.Kf=function(){return Vs(this,!1,"")};function Vs(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Wr("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 ee=a.Ie.count;0<ee&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(ee-1),a.Ie.freeze()),ee=a.hl.count,0<ee&&(z=a.hl.M(ee-1),a.hl.mb(ee-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}we.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()}},qi.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},qi.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){Wr("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},qi.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},qi.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){Wr("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},qi.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new xi;for(E.change=tr,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},qi.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Pa);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||Wr("Change not within a transaction: "+x.toString()))}},qi.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},Jt.Object.defineProperties(qi.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}}}),qi.prototype.handleChanged=qi.prototype.Tu,qi.prototype.redo=qi.prototype.redo,qi.prototype.undo=qi.prototype.undo,qi.prototype.canUndo=qi.prototype.canUndo,qi.prototype.discardHistoryAfterIndex=qi.prototype.lx,qi.prototype.rollbackTransaction=qi.prototype.Kf,qi.prototype.commitTransaction=qi.prototype.eb,qi.prototype.startTransaction=qi.prototype.Ea,qi.prototype.removeModel=qi.prototype.Rx,qi.prototype.addModel=qi.prototype.Xw,qi.prototype.clear=qi.prototype.clear,qi.className="UndoManager";function kr(){Zo(this),this.H=$s,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Vi,this.Zr=-1}kr.prototype.toString=function(){return this.name!==""?this.name+" Tool":er(this.constructor)},kr.prototype.updateAdornments=function(){},kr.prototype.canStart=function(){return this.isEnabled},kr.prototype.doStart=function(){},kr.prototype.doActivate=function(){this.isActive=!0},kr.prototype.doDeactivate=function(){this.isActive=!1},kr.prototype.doStop=function(){},kr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},kr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},kr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},kr.prototype.doMouseMove=function(){},kr.prototype.doMouseUp=function(){this.stopTool()},kr.prototype.doMouseWheel=function(){},kr.prototype.canStartMultiTouch=function(){return!0},kr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,$e.allocAt(NaN,NaN)),E=y.So(1,$e.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}$e.free(x),$e.free(E)},kr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,$e.allocAt(NaN,NaN)),E=y.So(1,$e.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 $e((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 ee=a.commandHandler;if(z!==a.scale&&ee.canResetZoom(z)){var re=a.zoomPoint;a.zoomPoint=b,ee.resetZoom(z),a.zoomPoint=re}y.bubbles=!1}$e.free(x),$e.free(E)},kr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},kr.prototype.doKeyUp=function(){},kr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},kr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},kr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(xs?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||(xs?y.meta:y.control)||y.shift||a.clearSelection()}},kr.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,Ro(a,E,x),E.handled};function Ro(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)}}}kr.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,ee=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var re=z.mouseLeave;if(re!==null&&(E===z||E!==null&&E.rg(z)||(re(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=ee,y.handled=!1;E!==null&&(ee=E.mouseEnter,!(ee!==null&&(z===E||z!==null&&z.rg(E)||(ee(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,ee="";z!==null&&(ee=z.cursor,ee==="");)z=z.panel;for(a.currentCursor=ee,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}},kr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},kr.prototype.doCurrentObjectChanged=function(){},kr.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===Gs&&!y.shift||b===Fa&&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===Gs&&y.shift||b===Fa&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var ee=z.deltaX;z=z.deltaY;var re="pixel";if(ee===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(re,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(re,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:re="pixel";break;case 1:re="line";break;case 2:re="page"}ee!==0&&a.allowHorizontalScroll&&(ee*=a.scrollHorizontalLineChange/16,a.scroll(re,0<ee?"right":"left",Math.abs(ee))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(re,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},kr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},kr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=Ri(function(){x.doWaitAfter(E)},a)},kr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&It.clearTimeout(this.Zr),this.Zr=-1},kr.prototype.doWaitAfter=function(){},kr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Lo);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},kr.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},Jt.Object.defineProperties(kr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof kt&&(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}}}),kr.prototype.startTransaction=kr.prototype.Ea,kr.className="Tool";function Xr(){kr.call(this),this.name="ToolManager",this.hb=new bn,this.ob=new bn,this.Hb=new bn,this.F=this.V=850,this.o=new un(2,2).ja(),this.Ha=5e3,this.ia=Fa,this.u=Ah,this.Mp=this.j=null,this.zj=-1}Ct(Xr,kr),Xr.prototype.initializeStandardTools=function(){},Xr.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Lo&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Xr.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Cu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===ju){y.bubbles=!0;return}if(this.gestureBehavior===Cu)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===Fa?this.mouseWheelBehavior=Gs:this.mouseWheelBehavior===Gs&&(this.mouseWheelBehavior=Fa)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Xr.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===ju){y.bubbles=!0;return}if(this.gestureBehavior===Cu)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}}ds(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function ds(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Xr.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Lo&&(y===a||y.rg(a))||this.hideToolTip()},Xr.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()))},Xr.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)},Xr.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 Lo)||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()},Xr.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Lo){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 gi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(It.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=Ri(function(){b.hideToolTip()},a)}},Xr.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}},Xr.prototype.hideToolTip=function(){this.zj!==-1&&(It.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Lo?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof gi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Xr.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()},Xr.prototype.doMouseWheel=function(){this.standardMouseWheel()},Xr.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Xr.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Xr.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},Xr.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},Xr.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)},Jt.Object.defineProperties(Xr.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 Lo?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}}}),Xr.prototype.replaceStandardTool=Xr.prototype.gb;var Fa=new Wt(Xr,"WheelScroll",0),Gs=new Wt(Xr,"WheelZoom",1),Xu=new Wt(Xr,"WheelNone",2),Ah=new Wt(Xr,"GestureZoom",3),Cu=new Wt(Xr,"GestureCancel",4),ju=new Wt(Xr,"GestureNone",5);Xr.className="ToolManager",Xr.WheelScroll=Fa,Xr.WheelZoom=Gs,Xr.WheelNone=Xu,Xr.GestureZoom=Ah,Xr.GestureCancel=Cu,Xr.GestureNone=ju;function gr(){kr.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 $e(NaN,NaN),this.Fr=new $e,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new Sn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var cl;Ct(gr,kr),gr.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},gr.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},gr.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,(xs?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},gr.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),Tt=null,this.isActive=!0,this.tl.set(a.position),We(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&&Wo(a),Dd(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Tt=this,Dn=this.diagram,this.doSimulatedDragOut()))};function We(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Fn?(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 io,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}gr.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},gr.prototype.Pd=function(a){return a===void 0?new Kc(rs):this.isGridSnapEnabled?new Kc(new $e(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Kc(a.copy())},gr.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),dt(this),pc(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<cl.count){for(var y=cl,x=y.length,E=0;E<x;E++){var b=y.M(E);Qt(b),Ht(b),dt(b),b.diagram.ug()}y.clear()}Qt(this),this.tl.h(NaN,NaN),Dn!==null&&(Dn.currentCursor=""),Tt=Dn=null,Ht(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ol(a,!0)},gr.prototype.stopTransaction=function(){var a=this.diagram,y=kr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function dt(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,An(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function yt(){var a=Tt;Ht(a),wn(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}gr.prototype.doCancel=function(){Ht(this),wn(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},gr.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},gr.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Pt(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")):wn(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 ki,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 Fn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,We(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function Ht(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 Fn&&(x.value.point=new $e(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function Qt(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 nn(a,y,x){var E=a.diagram,b=a.startPoint,z=$e.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),$e.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Wo(E),E.hk())}gr.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Wc(E,a,y,this.dragOptions,x)};function wn(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 Fn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Sd(E,-b.x,-b.y)}y.bd()}}function Un(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),di(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,ee=!1;try{if(x.skipsUndoManager=!0,ee=An(a,b,E),!a.isActive&&Tt===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof cr)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ee=!0)}if(!a.isActive&&Tt===null||(a.doDragOver(y,E),!a.isActive&&Tt===null))return}finally{x.skipsUndoManager=z,ee&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}gr.prototype.findDragOverObject=function(a){var y=this;return Bl(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Lo||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},gr.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 An(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 ee=0;ee<b;ee++){var re=a.Cg[ee],oe=re.mouseDragLeave;if(oe!==null&&(oe(y,re,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Tt===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Pi(b);for(b=a.Cg.length,x=0;x<b&&(ee=a.Cg[x],re=ee.mouseDragEnter,re===null||(re(y,ee,z),E=!0,!y.handled));x++);return E}function Pi(a){var y=a.panel;return y!==null?y:a instanceof Ti&&!(a instanceof cr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function zn(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(le){return E.findValidLinkablePort(le,x)});a=$e.alloc();var z=1/0,ee=null;for(b=b.iterator;b.next();){var re=b.value;if(re.part!==null){var oe=re.ga(Oo,a);oe=y.Bf(oe),oe<z&&(ee=re,z=oe)}}return $e.free(a),ee}function di(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,ee=null;x.fromNode===null&&(z=zn(a,x.i(0),!1),z!==null&&(ee=z.part));var re=null,oe=null;x.toNode===null&&(re=zn(a,x.i(x.pointsCount-1),!0),re!==null&&(oe=re.part)),b.isValidLink(ee,z,oe,re)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=ee,z!==null&&(x.fromPortId=z.portId),x.toNode=oe,re!==null&&(x.toPortId=re.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):So(b,ee,z,oe,re):So(b,null,null,null,null)}}}}gr.prototype.doDragOver=function(){};function ei(a,y){var x=a.diagram;a.dragsLink&&di(a,!0),dt(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 ee=z.mouseDrop;if(ee!==null&&(ee(b,z),b.handled))break;Bi(a,b,z),z=Pi(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Tt!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof Jn&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Tt!==null){for(a=Xt.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof Jn&&Xi(x,E,a);Xt.free(a)}}}function Bi(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof cr||(x=a.mouseDrop,x!==null&&x(y))}function Xi(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 Fn},!0,function(b){return b instanceof Fn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}gr.prototype.doDropOnto=function(){},gr.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()?(Pt(this,!1),Dd(a,this.copiedParts),nn(this,this.copiedParts,!1),pc(a,this.copiedParts)):this.mayMove()?(Ht(this),nn(this,this.draggedParts,!0)):this.mayDragOut()?(Pt(this,!1),nn(this,this.copiedParts,!1)):Ht(this),Un(this,a.lastInput.documentPoint))}},gr.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?(Ht(this),Pt(this,!0),Dd(a,this.copiedParts),nn(this,this.copiedParts,!1),pc(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,Ht(this),this.mayMove()&&(nn(this,this.draggedParts,!0),Un(this,a.lastInput.documentPoint))),this.Ym=!0,ei(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&yr(this),a.Ya(),pc(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},gr.prototype.simulatedMouseMove=function(a,y,x){if(Tt===null)return!1;var E=Tt.diagram;x instanceof kt||(x=null);var b=Dn;return x!==b&&(b!==null&&b!==E&&(b.ug(),Tt.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),Dn=x,x!==null&&x!==E&&(yt(),b=x.toolManager.findTool("Dragging"),b!==null&&(cl.contains(b)||cl.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)},gr.prototype.simulatedMouseUp=function(a,y,x){if(Tt===null)return!1;var E=Dn,b=Tt.diagram;if(x===null)return Tt.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Tt.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;Dn=x,E=x.toolManager.findTool("Dragging"),E!==null&&(yt(),cl.contains(E)||cl.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 $e),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=Tt,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function yr(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof Jn&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}gr.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(xs?!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())},gr.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())},gr.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())},gr.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},gr.prototype.Az=function(){return Tt},gr.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Tt;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},gr.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),wl(a),a.animationManager.Cc(),a=Tt,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},gr.prototype.doSimulatedDragLeave=function(){var a=Tt;a!==null&&a.doSimulatedDragOut(),this.doCancel()},gr.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Tt;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Jr(this,y.draggedParts.Lf(),!1,a.firstInput),nn(this,this.copiedParts,!1),Un(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},gr.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Tt;if(y!==null){var x=y.diagram;if(y.Ym=!0,Ht(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Jr(this,y.draggedParts.Lf(),!0,a.lastInput),nn(this,this.copiedParts,!1);var E=new Sn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),ei(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 Jr(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=Xt.alloc();b=E=1/0;for(var ee=-1/0,re=-1/0,oe=y.iterator;oe.next();){var le=oe.value;if(le.isVisible()){var he=le.location;le=he.x,he=he.y,isNaN(le)||isNaN(he)||(le<E&&(E=le),he<b&&(b=he),le>ee&&(ee=le),he>re&&(re=he))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,ee-E,re-b),E=z.x+z.width/2,b=z.y+z.height/2,Xt.free(z),z=a.Fr,ee=new ki,re=$e.alloc(),oe=y.iterator;oe.next();)le=oe.value,le instanceof Fn&&le.canCopy()&&(he=x.I(le),he!==null&&(he.points=le.points,Sd(he,z.x-E,z.y-b),he.suspendsRouting=!0,ee.add(he,a.Pd())));for(y=y.iterator;y.next();)le=y.value,le.Zc()&&le.canCopy()&&(oe=x.I(le),oe!==null&&(le=le.location,re.h(z.x-(E-le.x),z.y-(b-le.y)),oe.location=re,oe.Va(),ee.add(oe,a.Pd(re))));$e.free(re),a.copiedParts=ee,We(a,ee.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sd(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}gr.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},gr.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new $e},Jt.Object.defineProperties(gr.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}}}),gr.prototype.getDraggingSource=gr.prototype.Az;var Tt=null,Dn=null;gr.className="DraggingTool",cl=new bn,ai("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Xr.prototype.doCancel=function(){Tt!==null&&Tt.doCancel(),kr.prototype.doCancel.call(this)};function ii(){kr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Fn,y=new Lr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Lr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new Jn,y=new Lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Io,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new Jn,y=new Lr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Io,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 ki,this.Of=this.gj=this.Pf=null}Ct(ii,kr),ii.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},ii.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ee=un.alloc();ee.width=y.naturalBounds.width*z,ee.height=y.naturalBounds.height*z,E.desiredSize=ee,un.free(ee),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=Oo,z=$e.alloc(),x.location=y.ga(Oo,z),$e.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},ii.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Io,y.fromSpot=Ms,y.toSpot=Ms),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},ii.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},ii.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof Jn){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)}},ii.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof Jn))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof Jn)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},ii.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(ge){return b.findValidLinkablePort(ge,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ee=z.value,re=ee.part;if(re instanceof Jn){var oe=ee.ga(Oo,$e.alloc()),le=x.x-oe.x,he=x.y-oe.y;$e.free(oe),oe=le*le+he*he,oe<E&&(le=this.validPortsCache.I(ee),le!==null?le&&(y=ee,E=oe):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,re,ee)||!a&&this.isValidLink(re,ee,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(ee,!0),y=ee,E=oe):this.validPortsCache.add(ee,!1))}}return y!==null&&(x=y.part,x instanceof Jn&&(x.layer===null||x.layer.allowLink))?y:null},ii.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},ii.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},ii.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},ii.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof Jn))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof Jn))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},ii.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)},ii.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 Sn;return E.add(a),fi(this,x,y,E)};function fi(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),fi(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),fi(a,y.labeledLink,x,E))))}ii.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!==Of){if(E===ap){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!Bn(this,a,y,x,!0)}if(E===sp){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!Bn(this,a,y,x,!0)}if(E===ip)return a===y?a=!0:(E=new Sn,E.add(y),a=Oi(this,E,a,y,x)),!a;if(E===rp)return!Bn(this,a,y,x,!1);if(E===op)return a===y?a=!0:(E=new Sn,E.add(y),a=Cr(this,E,a,y,x)),!a}return!0};function Bn(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 ee=z.value;if(ee!==E&&(!b||ee.isTreeLink)&&ee.toNode===y&&(ee=ee.fromNode,ee!==y&&Bn(a,ee,x,E,b)))return!0}return!1}function Oi(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 ee=z.value;if(ee!==b&&ee.toNode===x&&(ee=ee.fromNode,ee!==x&&Oi(a,y,ee,E,b)))return!0}return!1}function Cr(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 ee=z.value;if(ee!==b){var re=ee.fromNode;if(ee=ee.toNode,re=re===x?ee:re,re!==x&&Cr(a,y,re,E,b))return!0}}return!1}Jt.Object.defineProperties(ii.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}}}),ii.className="LinkingBaseTool";function pr(){ii.call(this),this.name="Linking",this.V={},this.F=null,this.K=rr,this.Xd=null}Ct(pr,ii),pr.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},pr.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 Jn)))return null;var x=this.direction;if(x===rr||x===ua){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===rr||x===Qr)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},pr.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 Jn&&(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 Jn&&(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)},pr.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()},pr.prototype.doStop=function(){ii.prototype.doStop.call(this),this.startObject=null},pr.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var ee=this.targetPort=this.findTargetPort(this.isForwards);if(ee!==null){var re=ee.part;re instanceof Jn&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=re,b=ee):(y=re,x=ee,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?(ee===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)}}},pr.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Fn)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)},pr.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},pr.prototype.doNoLink=function(){},Jt.Object.defineProperties(pr.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 rr=new Wt(pr,"Either",0),ua=new Wt(pr,"ForwardsOnly",0),Qr=new Wt(pr,"BackwardsOnly",0);pr.className="LinkingTool",pr.Either=rr,pr.ForwardsOnly=ua,pr.BackwardsOnly=Qr;function io(){ii.call(this),this.name="Relinking";var a=new Lr;a.figure="Diamond",a.desiredSize=Ta,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Lr,a.figure="Diamond",a.desiredSize=Ta,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Xt}Ct(io,ii),io.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Fn){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)}},io.prototype.makeAdornment=function(a,y){var x=new Lo;return x.type=Pn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},io.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},io.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 Lo&&x.adornedPart instanceof Fn))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=Gr),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Gr),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},io.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Ng||x===xd)&&(x=iu),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}},io.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()},io.prototype.doStop=function(){ii.prototype.doStop.call(this),this.handle=null},io.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 ee=this.targetPort.part;ee instanceof Jn&&(this.isForwards?(E=ee,b=this.targetPort):(y=ee,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()}}},io.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},io.prototype.doNoRelink=function(){};function So(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)}Jt.Object.defineProperties(io.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 Lo))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),io.className="RelinkingTool",ai("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),ai("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function Hn(){kr.call(this),this.name="LinkReshaping";var a=new Lr;a.figure="Rectangle",a.desiredSize=Va,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Lr,a.figure="Diamond",a.desiredSize=Ta,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new $e,this.Yq=new bn}Ct(Hn,kr),Hn.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:ho},Hn.prototype.om=function(a,y){a.reshapingBehavior=y},Hn.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Fn){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)}},Hn.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Lo,b.type=Pn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ee=E?1:0;if(y.resegmentable&&y.computeCurve()!==rh)for(var re=x+ee;re<z-ee;re++){var oe=this.makeResegmentHandle(a,re);oe!==null&&(oe.segmentIndex=re,oe.segmentFraction=.5,oe.fromMaxLinks=999,b.add(oe))}for(ee=x+1;ee<z;ee++)if(re=this.makeHandle(a,ee),re!==null){if(re.segmentIndex=ee,ee!==x)if(ee===x+1&&E){oe=y.i(x);var le=y.i(x+1);Ie.B(oe.x,le.x)&&Ie.B(oe.y,le.y)&&(le=y.i(x-1)),Ie.B(oe.x,le.x)?(this.om(re,Te),re.cursor="n-resize"):Ie.B(oe.y,le.y)&&(this.om(re,ke),re.cursor="w-resize")}else ee===z-1&&E?(oe=y.i(z-1),le=y.i(z),Ie.B(oe.x,le.x)&&Ie.B(oe.y,le.y)&&(oe=y.i(z+1)),Ie.B(oe.x,le.x)?(this.om(re,Te),re.cursor="n-resize"):Ie.B(oe.y,le.y)&&(this.om(re,ke),re.cursor="w-resize")):ee!==z&&(this.om(re,et),re.cursor="move");b.add(re)}b.adornedObject=a}return b},Hn.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},Hn.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},Hn.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},Hn.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 Fn){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}}},Hn.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},Hn.prototype.stopTransaction=function(){var a=this.diagram,y=kr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Hn.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},Hn.prototype.getResegmentingPoint=function(){return this.handle.ga(Oo)},Hn.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},Hn.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 ee=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(br(this,ee,E,b,z,!0)||br(this,ee,E,b,z,!1))){var re=y.points.copy();br(this,ee,E,b,z,!0)?(re.cd(x-2,new $e(ee.x,(z.y+ee.y)/2)),re.cd(x+1,new $e(z.x,(z.y+ee.y)/2))):(re.cd(x-2,new $e((z.x+ee.x)/2,ee.y)),re.cd(x+1,new $e((z.x+ee.x)/2,z.y))),re.mb(x),re.mb(x-1),y.points=re,y.Wb()}else ee=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(br(this,E,b,z,ee,!0)||br(this,E,b,z,ee,!1))&&(re=y.points.copy(),br(this,E,b,z,ee,!0)?(re.cd(x-1,new $e(E.x,(E.y+ee.y)/2)),re.cd(x+2,new $e(ee.x,(E.y+ee.y)/2))):(re.cd(x-1,new $e((E.x+ee.x)/2,E.y)),re.cd(x+2,new $e((E.x+ee.x)/2,ee.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ee=$e.alloc(),Ie.qh(E.x,E.y,z.x,z.y,b.x,b.y,ee)&&ee.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),$e.free(ee)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function br(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}Hn.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===Te?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===ke&&(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===Te?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===ke&&(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),ee=y.i(E+1);Ie.B(z.x,b.x)&&Ie.B(b.y,ee.y)?(Ie.B(z.x,y.i(E-2).x)&&!Ie.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),Ie.B(ee.y,y.i(E+2).y)&&!Ie.B(ee.x,y.i(E+2).x)?y.m(E+1,ee.x,a.y):y.L(E+1,ee.x,a.y)):Ie.B(z.y,b.y)&&Ie.B(b.x,ee.x)?(Ie.B(z.y,y.i(E-2).y)&&!Ie.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),Ie.B(ee.x,y.i(E+2).x)&&!Ie.B(ee.y,y.i(E+2).y)?y.m(E+1,a.x,ee.y):y.L(E+1,a.x,ee.y)):Ie.B(z.x,b.x)&&Ie.B(b.x,ee.x)?(Ie.B(z.x,y.i(E-2).x)&&!Ie.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),Ie.B(ee.x,y.i(E+2).x)&&!Ie.B(ee.y,y.i(E+2).y)?y.m(E+1,a.x,ee.y):y.L(E+1,a.x,ee.y)):Ie.B(z.y,b.y)&&Ie.B(b.y,ee.y)&&(Ie.B(z.y,y.i(E-2).y)&&!Ie.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),Ie.B(ee.y,y.i(E+2).y)&&!Ie.B(ee.x,y.i(E+2).x)?y.m(E+1,ee.x,a.y):y.L(E+1,ee.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(Oo,$e.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,$e.alloc()),y.L(0,E.x,E.y),$e.free(z),$e.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(Oo,$e.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,$e.alloc()),y.L(y.pointsCount-1,a.x,a.y),$e.free(x),$e.free(a));y.zf()},Hn.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case et:return a;case Te:return new $e(y.i(x).x,a.y);case ke:return new $e(a.x,y.i(x).y);default:case ho:return y.i(x)}},Jt.Object.defineProperties(Hn.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 Lo))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}}}),Hn.prototype.setReshapingBehavior=Hn.prototype.om,Hn.prototype.getReshapingBehavior=Hn.prototype.Ru;var ho=new Wt(Hn,"None",0),ke=new Wt(Hn,"Horizontal",1),Te=new Wt(Hn,"Vertical",2),et=new Wt(Hn,"All",3);Hn.className="LinkReshapingTool",Hn.None=ho,Hn.Horizontal=ke,Hn.Vertical=Te,Hn.All=et,ai("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function at(){kr.call(this),this.name="Resizing",this.o=new un(1,1).freeze(),this.j=new un(9999,9999).freeze(),this.yg=new un(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Lr;a.alignmentFocus=Oo,a.figure="Rectangle",a.desiredSize=Va,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new $e,this.Dw=new un,this.Tn=new $e,this.rt=new un(0,0),this.qt=new un(1/0,1/0),this.pt=new un(1,1)}Ct(at,kr),at.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Fn)){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(),zd(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},at.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Lo,y.type=Pn.Spot,y.locationSpot=Oo;var x=new nu;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Os)),y.add(this.makeHandle(a,sc)),y.add(this.makeHandle(a,il)),y.add(this.makeHandle(a,Pu)),y.add(this.makeHandle(a,Fl)),y.add(this.makeHandle(a,_s)),y.add(this.makeHandle(a,Qs)),y.add(this.makeHandle(a,hl))}else if(Ph(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},at.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},at.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))e:{var x=a.alignment;if(x.Mc()&&(x=Oo),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 e;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 Pn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},at.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},at.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))},at.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},at.prototype.stopTransaction=function(){var a=this.diagram,y=kr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},at.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},at.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,$e.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),$e.free(b)}},at.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,$e.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),$e.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},at.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 cr){var E=new bn;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new ae;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()}},at.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=Oo);var ee=this.adornedObject.naturalBounds,re=ee.x,oe=ee.y,le=ee.x+ee.width,he=ee.y+ee.height,ge=1;if(!z){ge=ee.width;var ye=ee.height;0>=ge&&(ge=1),0>=ye&&(ye=1),ge=ye/ge}return ye=$e.alloc(),Ie.No(a.x,a.y,re,oe,b.width,b.height,ye),a=ee.copy(),0>=y.x?0>=y.y?(a.x=Math.max(ye.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.y=Math.max(ye.y,he-E.height),a.y=Math.min(a.y,he-x.height),a.height=Math.max(he-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge):(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width),a.x=le-a.width,a.y=he-a.height)):1<=y.y?(a.x=Math.max(ye.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=Math.max(le-a.x,x.width),a.height=Math.max(Math.min(ye.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge):(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width),a.x=le-a.width)):(a.x=Math.max(ye.x,le-E.width),a.x=Math.min(a.x,le-x.width),a.width=le-a.x,z||(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge,a.y=oe+.5*(he-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(ye.x-re,E.width),x.width),a.y=Math.max(ye.y,he-E.height),a.y=Math.min(a.y,he-x.height),a.height=Math.max(he-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge):(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width),a.y=he-a.height)):1<=y.y?(a.width=Math.max(Math.min(ye.x-re,E.width),x.width),a.height=Math.max(Math.min(ye.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge):(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width))):(a.width=Math.max(Math.min(ye.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(ge*a.width,E.height),x.height),a.width=a.height/ge,a.y=oe+.5*(he-oe-a.height))):0>=y.y?(a.y=Math.max(ye.y,he-E.height),a.y=Math.min(a.y,he-x.height),a.height=he-a.y,z||(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width,a.x=re+.5*(le-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(ye.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ge,E.width),x.width),a.height=ge*a.width,a.x=re+.5*(le-re-a.width))),$e.free(ye),a},at.prototype.computeReshape=function(){var a=fn;return this.adornedObject instanceof Lr&&(a=Cv(this.adornedObject)),!(a===wi||this.diagram.lastInput.shift)},at.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},at.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},at.prototype.computeCellSize=function(){var a=new un(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},Jt.Object.defineProperties(at.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 Lo))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 Lo)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}}}),at.className="ResizingTool",ai("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function jt(){kr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new $e,this.ue=null;var a=new Lr;a.figure="Ellipse",a.desiredSize=Ta,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new $e(NaN,NaN),this.u=0,this.F=50}Ct(jt,kr),jt.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)}},jt.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Lo,y.type=Pn.Position,y.locationSpot=Oo;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Ph(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},jt.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},jt.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)},jt.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(Oo)},jt.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)},jt.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new $e(NaN,NaN),this.isActive=a.isMouseCaptured=!1},jt.prototype.stopTransaction=function(){var a=this.diagram,y=kr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},jt.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},jt.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},jt.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()},jt.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()}},jt.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},Jt.Object.defineProperties(jt.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 Lo))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 Lo)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}}}),jt.className="RotatingTool",ai("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function qt(){kr.call(this),this.name="ClickSelecting"}Ct(qt,kr),qt.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},qt.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},qt.className="ClickSelectingTool";function gn(){kr.call(this),this.name="Action",this.pk=null}Ct(gn,kr),gn.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},gn.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()},gn.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))}},gn.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()},gn.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())},gn.prototype.doStop=function(){this.pk=null},gn.className="ActionTool";function Vn(){kr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new $e(0,0)}Ct(Vn,kr),Vn.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)},Vn.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},Vn.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 Ti)x.Zc()&&(Ph(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);En(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=$e.allocAt(a.x,a.y);this.isGridSnapEnabled&&cf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),$e.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},Jt.Object.defineProperties(Vn.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}}}),Vn.className="ClickCreatingTool";function Qn(){kr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Ti;a.layerName="Tool",a.selectable=!1;var y=new Lr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ct(Qn,kr),Qn.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))},Qn.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Qn.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Qn.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=un.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),un.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Qn.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()},Qn.prototype.computeBoxBounds=function(){var a=this.diagram;return new Xt(a.firstInput.documentPoint,a.lastInput.documentPoint)},Qn.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),xs?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 bn,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)}},Jt.Object.defineProperties(Qn.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}}}),Qn.className="DragSelectingTool";function Gn(){kr.call(this),this.name="Panning",this.Xt=new $e,this.xy=new $e,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(It.document,"scroll",a.Kw,!1),a.stopTool()}}Ct(Gn,kr),Gn.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())},Gn.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(It.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},Gn.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},Gn.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},Gn.prototype.doMouseMove=function(){this.move()},Gn.prototype.doMouseUp=function(){this.move(),this.stopTool()},Gn.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)}},Jt.Object.defineProperties(Gn.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),Gn.className="PanningTool",ai("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),ai("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),ai("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),ai("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),ai("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function gi(){this.F=this.u=this.j=this.o=null}Jt.Object.defineProperties(gi.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}}}),gi.className="HTMLInfo";function yi(a,y,x){this.text=a,this.hx=y,this.visible=x}yi.className="ContextMenuButtonInfo";function _i(){kr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new $e,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ct(_i,kr);function mi(a){var y=new gi;y.show=function(b,z,ee){ee.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},ao=y,a.tu=function(){a.stopTool()},y=Ln("div");var x=Ln("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=Ln("style");It.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",ui,!1),E.addEventListener(y,"selectstart",ui,!1),E.addEventListener(x,"contextmenu",ui,!1)),y.className="goCXforeground",x.className="goCXbackground",It.document.body&&(It.document.body.appendChild(y),It.document.body.appendChild(x)),To=y,jr=x,Fr=!0}function ui(a){return a.preventDefault(),!1}_i.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)},_i.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},_i.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},_i.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof kt||(a instanceof xt?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},_i.prototype.doActivate=function(){},_i.prototype.doMouseDown=function(){if(kr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&Fi(this)},_i.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Lo){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}Fi(this)};function Fi(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof gi||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(ji(a,!0),a.isActive||a.stopTool())}_i.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function ji(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=ao,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof xt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Lo&&!a.currentContextMenu.visible&&a.stopTool()}}_i.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},_i.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Lo){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 gi&&a.show(y,x,this);this.currentContextMenu=a},_i.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}},_i.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Lo?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof gi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function Rr(a){var y=new bn;return y.add(new yi("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new yi("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new yi("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new yi("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new yi("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new yi("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new yi("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new yi("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new yi("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new yi("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new yi("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new yi("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new yi("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}_i.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=Rr(this)),To.innerHTML="",jr.addEventListener("pointerdown",this.tu,!1);var y=this,x=Ln("ul");x.className="goCXul",To.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=Ln("li"),z.className="goCXli";var ee=Ln("a");ee.className="goCXa",ee.href="#",ee.ky=b.hx,ee.addEventListener("pointerdown",function(re){return this.ky(a),y.stopTool(),re.preventDefault(),!1},!1),ee.textContent=b.text,z.appendChild(ee),x.appendChild(z)}}To.style.display="block",jr.style.display="block"},_i.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===ao){To.style.display="none",jr.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(jr,"pointerdown",this.tu,!1),this.currentContextMenu=null}},Jt.Object.defineProperties(_i.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Lo?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Fr===!1&&ao===null&&is&&mi(this),ao},set:function(a){a===null&&(Fr=!0),ao=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var ao=null,Fr=!1,jr=null,To=null;_i.className="ContextMenuTool",ai("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function bi(){kr.call(this),this.name="TextEditing",this.Zh=new Sa,this.ia=null,this.V=oa,this.vj=null,this.qa=Uo,this.u=1,this.F=!0,this.o=null,this.j=new gi,this.kt=null,Kr(this,this.j)}Ct(bi,kr);function Kr(a,y){if(is){var x=Ln("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(jo)):b==="Tab"?(a.acceptText(nr),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Uo){var E=a.kt;a.qa===fa&&(a.qa=Ea),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Uo){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 Sa&&z instanceof bi)if(z.state===_r)x.style.border="3px solid red",x.focus();else{var ee=E.ga(Oo),re=b.position,oe=b.scale,le=E.Df()*oe;le<z.minimumEditorScale&&(le=z.minimumEditorScale);var he=E.naturalBounds.width*le+6,ge=E.naturalBounds.height*le+2,ye=(ee.x-re.x)*oe;ee=(ee.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*le,ge=re.y*ge-re.y*oe+re.offsetY-(.5*ge-.5*oe)-oe/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*le+"%",x.style.lineHeight="normal",x.style.width=he+"px",x.style.left=(ye-he/2|0)-1+"px",x.style.top=(ee+ge|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=le,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)}}}bi.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Ma&&Ma!==this&&(Ma.acceptText(xo),Ma&&Ma!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Sa&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===oa&&!y.isSelected||this.starting===ro&&2>a.lastInput.clickCount)):!1},bi.prototype.doStart=function(){Ma=this,this.textBlock!==null&&this.doActivate()},bi.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 Sa&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=fa;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Xt(this.textBlock.ga(Os),this.textBlock.ga(il));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},bi.prototype.doCancel=function(){this.stopTool()},bi.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},bi.prototype.doMouseDown=function(){this.isActive&&this.acceptText(xo)},bi.prototype.acceptText=function(a){switch(a){case xo:this.qa===Co?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===fa||this.qa===_r||this.qa===Ea)&&(this.qa=ga,or(this));break;case Zr:case jo:case nr:(jo!==a||this.textBlock.isMultiline!==!0)&&(this.qa===fa||this.qa===_r||this.qa===Ea)&&(this.qa=ga,or(this))}};function or(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=Co,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=_r,a.doError(b,z))}}bi.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)},bi.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},bi.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Uo,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},bi.prototype.doStop=function(){Ma=null},bi.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)))},bi.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},Jt.Object.defineProperties(bi.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)}}}),bi.prototype.measureTemporaryTextBlock=bi.prototype.Lx;var Zr=new Wt(bi,"LostFocus",0),xo=new Wt(bi,"MouseDown",1),nr=new Wt(bi,"Tab",2),jo=new Wt(bi,"Enter",3),co=new Wt(bi,"SingleClick",0),oa=new Wt(bi,"SingleClickSelected",1),ro=new Wt(bi,"DoubleClick",2),Uo=new Wt(bi,"StateNone",0),fa=new Wt(bi,"StateActive",1),Ea=new Wt(bi,"StateEditing",2),ga=new Wt(bi,"StateValidating",3),_r=new Wt(bi,"StateInvalid",4),Co=new Wt(bi,"StateValidated",5),Ma=null;bi.className="TextEditingTool",bi.LostFocus=Zr,bi.MouseDown=xo,bi.Tab=nr,bi.Enter=jo,bi.SingleClick=co,bi.SingleClickSelected=oa,bi.DoubleClick=ro,bi.StateNone=Uo,bi.StateActive=fa,bi.StateEditing=Ea,bi.StateValidating=ga,bi.StateInvalid=_r,bi.StateValidated=Co,ai("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function pa(a){ha||(so(),ha=!0),this.H=$s,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Yo,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new Sn,this.ce=new Za,this.ce.Yd=this,this.Ei=new Sn,this.pu=new Sn,this.Sr=new Sn,this.pr=new Sn,a&&Object.assign(this,a)}pa.prototype.Xe=function(a){this.H=a},pa.prototype.canStart=function(){return!0};function Da(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Ns(a.H),a.zb=!0)}function ka(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Yo?(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===ks&&y.vc.clear(),a.Qw=!!(a.Pk===ss&&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(),Ks(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Vl&&E!==null&&(delete E.start.scale,delete E.end.scale),It.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Wo(x),Zl(x),a.zb=!1,y.start(),y.bc&&(as(a),x.Ya(),rl(y,0),wl(x,!0),wo(a),x.R("AnimationStarting",a)))}))}}function Xa(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Oa(a,y,x,E){a.isTicking||Xa(a)||y instanceof Fn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}we=pa.prototype,we.fv=function(a){return this.ce.fv(a)},we.Xu=function(a){return this.ce.Xu(a)};function es(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 ee=z.value;if(ee.bc!==!1){e:if(0<ee.yl.count)var re=!0;else{for(re=ee.vc.iterator;re.next();){var oe=re.key;if(oe instanceof xt&&oe.diagram!==null||oe instanceof kt){re=!0;break e}}re=!1}re?ps(ee,!1):ee.Xk=!0}}b.pu.clear(),b.bc!==!1&&(as(b),wl(b.H),wo(b)),It.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),It.requestAnimationFrame(function(){x()}))}function Hs(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function as(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 wo(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}we.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(),Ks(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Ks(y,this.H)},we.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))},we.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),ar(this,a))},we.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),ns(this.ce,y,"position",y.position,y.position),ar(this,a))};function yo(a,y,x){!a.zb||y.D(x)||Xa(a)||(a.H.pi||(y=x.copy()),ns(a.ce,a.H,"position",y,x))}function fo(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function ar(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function mr(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],ee=a[1],re=a[2];a=a[3];var oe=y[0],le=y[1],he=y[2];return y=y[3],re===0||re===100?(z=oe,ee=le):(he===0||he===100)&&(oe=z,le=ee),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ee=b(x,ee,le-ee,E),re=b(x,re,he-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ee+"%, "+re+"%, "+x+")"}function so(){function a(x,E,b,z,ee,re){x.position=new $e(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}var y=new ki;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,ee,re){ee<re?x.mm(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re),!1):x.position=new $e(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}),y.add("location",function(x,E,b,z,ee,re){ee<re?x.mm(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re),!0):x.location=new $e(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}),y.add("position:placeholder",function(x,E,b,z,ee,re){ee<re?x.mm(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re),!1):x.position=new $e(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}),y.add("position:nodeCollapse",function(x,E,b,z,ee,re){var oe=x.actualBounds,le=b.actualBounds;b=le.x+le.width/2-oe.width/2,oe=le.y+le.height/2-oe.height/2,ee<re?x.mm(z(ee,E.x,b-E.x,re),z(ee,E.y,oe-E.y,re),!1):x.position=new $e(z(ee,E.x,b-E.x,re),z(ee,E.y,oe-E.y,re))}),y.add("desiredSize",function(x,E,b,z,ee,re){x.desiredSize=new Xt(z(ee,E.width,b.width-E.width,re),z(ee,E.height,b.height-E.height,re))}),y.add("width",function(x,E,b,z,ee,re){x.width=z(ee,E,b-E,re)}),y.add("height",function(x,E,b,z,ee,re){x.height=z(ee,E,b-E,re)}),y.add("fill",function(x,E,b,z,ee,re){x.fill=mr(E,b,ee,re,z)}),y.add("stroke",function(x,E,b,z,ee,re){x.stroke=mr(E,b,ee,re,z)}),y.add("strokeWidth",function(x,E,b,z,ee,re){x.strokeWidth=z(ee,E,b-E,re)}),y.add("strokeDashOffset",function(x,E,b,z,ee,re){x.strokeDashOffset=z(ee,E,b-E,re)}),y.add("background",function(x,E,b,z,ee,re){x.background=mr(E,b,ee,re,z)}),y.add("areaBackground",function(x,E,b,z,ee,re){x.areaBackground=mr(E,b,ee,re,z)}),y.add("opacity",function(x,E,b,z,ee,re){x.opacity=z(ee,E,b-E,re)}),y.add("scale",function(x,E,b,z,ee,re){x.scale=z(ee,E,b-E,re)}),y.add("angle",function(x,E,b,z,ee,re){x.angle=z(ee,E,b-E,re)}),Jo=y}Jt.Object.defineProperties(pa.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&&Zi(a,">= 1",pa,"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}}}),pa.prototype.stopAnimation=pa.prototype.Cc;var Jo=null,ha=!1,Yo=new Wt(pa,"Default",1),ss=new Wt(pa,"AnimateLocations",2),ks=new Wt(pa,"None",3);pa.className="AnimationManager",pa.defineAnimationEffect=function(a,y){ha||(so(),ha=!0),Jo.add(a,y)},pa.Default=Yo,pa.AnimateLocations=ss,pa.None=ks;function Za(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=ws,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=rs,this.vc=new ki,this.Tt=new ki,this.yl=new Sn,this.Ut=new Sn,this.dw=cd,a&&Object.assign(this,a)}Za.prototype.suspend=function(){this.Xk=!0},Za.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,ps(this,!0),as(this.Yd),wl(this.H),wo(this.Yd),this.H.redraw()};function Ks(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}we=Za.prototype,we.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 kt?a=x:x instanceof xt&&(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===Yo&&this===y.defaultAnimation&&(this.Lp=Ps,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=_f),as(y),this.yl.each(function(E){E.data=null,a.add(E)}),wo(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,es(y,this),this)},we.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},we.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof kt?this.H=a:a instanceof xt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Ti){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return ns(this,a,y,x,E,b),this};function ns(a,y,x,E,b,z){var ee=a.vc;if(y instanceof kt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(Yc(E),av(),E=[ih.j,ih.u,ih.o,ih.F],Yc(b),av(),b=[ih.j,ih.u,ih.o,ih.F]),ee.contains(y)){var re=ee.I(y),oe=re.start,le=re.end;oe[x]===void 0&&(oe[x]=fs(E)),le[x]=fs(b)}else oe={},le={},oe[x]=fs(E),le[x]=fs(b),re=oe.position,y instanceof xt&&re instanceof $e&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(le.position),re=new ts(oe,le,z),ee.add(y,re);ee=oe[x],ee instanceof $e&&!ee.w()&&ee.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Ti?re.Ku.location=fs(y.location):z&&(re.Ku[x]=fs(E))}function fs(a){return a instanceof $e||a instanceof un?a.copy():a}we.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},we.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function ps(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),as(x),rl(a,b),wl(a.H,!0),wo(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 rl(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof xt&&z.diagram===null)){var ee=E.value,re=b?ee.end:ee.start;ee=b?ee.start:ee.end;var oe=Jo,le;for(le in ee)le==="position"&&(ee["position:placeholder"]||ee["position:nodeCollapse"])||oe.get(le)===null||oe.get(le)(z,re[le],ee[le],a.Lp,y,x,a)}}}we.stop=function(){return this.bc?(this.Ml(!0),this):this},we.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,as(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=Jo;E.next();){var ee=E.key,re=E.value,oe=b?re.end:re.start,le=b?re.start:re.end,he=re.Ku,ge;for(ge in le)if(z.get(ge)!==null){var ye=ge;!re.Hu||ye!=="position:nodeCollapse"&&ye!=="position:placeholder"||(ye="position"),z.get(ye)(ee,oe[ge],he[ge]!==void 0?he[ge]:re.Hu?oe[ge]:le[ge],this.Lp,this.Gd,this.Gd,this)}re.Hu&&he.location!==void 0&&ee instanceof Ti&&(ee.location=he.location),re.nv&&ee instanceof Ti&&ee.Zb(!1)}if(y.As.clear(),ol(y,!1),y.Ya(),y.N(),wl(y,!0),x.defaultAnimation===this){for(ge=x.pr.iterator;ge.next();)b=ge.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}wl(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),wo(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Ks(this,null),x.Ml(this),y.$b())}},we.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof cr&&(E=y.placeholder),E!==null?(x=E.ga(Os),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new $e(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof cr)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Cj(E,y)},we.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof cr&&(x=y.placeholder),x!==null){var E=x.ga(Os);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 cr)for(a=a.memberParts;a.next();)E=a.value,E instanceof Jn&&this.Aj(E,y)}},we.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},Jt.Object.defineProperties(Za.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&Zi(a,">= 1",Za,"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:Rt("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}}}),Za.prototype.getTemporaryState=Za.prototype.Ez,Za.prototype.stop=Za.prototype.stop,Za.prototype.add=Za.prototype.add,Za.prototype.addTemporaryPart=Za.prototype.Iy;function ws(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function Ps(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Za.className="Animation",Za.EaseLinear=function(a,y,x,E){return x*a/E+y},Za.EaseInOutQuad=ws,Za.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Za.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Za.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Za.EaseOutExpo=Ps;function ts(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}ts.className="AnimationState";function ms(a,y,x){this.xd=null,this.rf=a,this.so=x||Cl,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=lo))}ms.prototype.copy=function(){var a=new ms(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 xl(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))}Jt.Object.defineProperties(ms.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 Cl=new Wt(ms,"Default",1),lo=new Wt(ms,"Immediate",2),zr=new Wt(ms,"Bundled",3);ms.className="AnimationTrigger",ms.Default=Cl,ms.Immediate=lo,ms.Bundled=zr;function to(a){Zo(this),this.H=null,this.Pa=new bn,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)}we=to.prototype,we.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Rl(x)}a.clear(),this.Zq.length=0},we.Xe=function(a){this.H=a},we.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,ee=0,re=this.Pa.iterator;re.next();){var oe=re.value;oe instanceof cr?b++:oe instanceof Jn?E++:oe instanceof Fn?z++:oe instanceof Lo?ee++:x++}if(re="",0<x&&(re+=x+" Parts "),0<E&&(re+=E+" Nodes "),0<b&&(re+=b+" Groups "),0<z&&(re+=z+" Links "),0<ee&&(re+=ee+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,re+=`
|
|
`+x.toString(),E=x.data,E!==null&&Vr(E)&&(re+=" #"+Vr(E)),x instanceof Jn?re+=" "+Mo(E):x instanceof Fn&&(re+=" "+Mo(x.fromNode)+" "+Mo(x.toNode));return y+" "+this.Pa.count+": "+re},we.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=$e.alloc(),z=this.Pa.s,ee=z.length;ee--;){var re=z[ee];if((E!==!0||zd(re)!==!1)&&re.isVisible()&&(b.assign(a),Ra(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return $e.free(b),re}return $e.free(b),null},we.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof bn||E instanceof Sn||(E=new Sn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=$e.alloc(),ee=this.Pa.s,re=ee.length;re--;){var oe=ee[re];if((b!==!0||zd(oe)!==!1)&&oe.isVisible()){z.assign(a),Ra(z,oe.oe);var le=oe;oe.ji(z,y,x,E)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||E.add(le))}}return $e.free(z),E},we.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 bn||b instanceof Sn||(b=new Sn),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var ee=this.Pa.s,re=ee.length;re--;){var oe=ee[re];if((z!==!0||zd(oe)!==!1)&&oe.isVisible()){var le=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(le=y(le)),le===null||x!==null&&!x(le)||b.add(le))}}return b},we.Nu=function(a,y,x,E,b,z,ee){if(this.Uh===!1)return b;for(var re=this.Pa.s,oe=re.length;oe--;){var le=re[oe];if((ee!==!0||zd(le)!==!1)&&z(le)&&le.isVisible()){var he=le;le.Cf(a,y,x,E,b)&&(y!==null&&(he=y(he)),he===null||x!==null&&!x(he)||b.add(he))}}return b},we.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 bn||b instanceof Sn)&&(z=b),b=!0),z instanceof bn||z instanceof Sn||(z=new Sn),this.Uh===!1)return z;var ee=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ee=!0);for(var re=$e.alloc(),oe=$e.alloc(),le=this.Pa.s,he=le.length;he--;){var ge=le[he];if((ee!==!0||zd(ge)!==!1)&&ge.isVisible()){re.assign(a),Ra(re,ge.oe),oe.h(a.x+y,a.y),Ra(oe,ge.oe);var ye=ge;ge.og(re,oe,x,E,b,z)&&(x!==null&&(ye=x(ye)),ye===null||E!==null&&!E(ye)||z.add(ye))}}return $e.free(re),$e.free(oe),z},we.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Yi();for(var b=Yi(),z=0;z<E;z++){var ee=x[z];if(ee.vw=z,ee instanceof Fn){if(ee.fd===!1)continue}else if(ee instanceof Lo&&ee.adornedPart!==null)continue;var re=ee.actualBounds;ee.isVisible()&&yh(re,y)?(ee.Fd(!0),a.push(ee)):(ee.Fd(!1),ee.adornments!==null&&0<ee.adornments.count&&b.push(ee))}for(y=0;y<a.length;y++)for(x=a[y],Ov(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++)Ov(b[y]);Wi(a),Wi(b)}}};function va(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}we.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=va(this,a);var z=this.Zq;z.length=0;for(var ee=y.scale,re=Xt.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ee,re,!0);if(Xt.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Es(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 ee=va(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,le=Xt.alloc(),he=0;he<z;he++){var ge=b[he];E.contains(ge)&&a.Oj(y,ge,x,re,oe,le,!1)}Xt.free(le),y.globalAlpha=ee}}}we.Oj=function(a,y,x,E,b,z,ee){if(ee&&!zd(y))a.Hs(y);else{if(E!==null&&y instanceof Fn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(ee=!1,E=y.containingGroup;E!==null;)ee?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(ee=!0,z.assign(E.tb)),E=E.containingGroup;var re=y.actualBounds;if(E=!1,ee&&y.isVisible()){if(!z.Yc(re)){a.Hs(y);return}E=!z.Re(re)}E&&(a.save(),a instanceof Gu?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),re.width*b>x.Oq||re.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&&(hs(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(hs(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),hs(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))}},we.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Er,a,this,y,x,E,b)},we.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Rl(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)),Zs(this,a,y),a},we.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,Rl(y),a};function Zs(a,y,x){if(y=Al(a,y,x),x instanceof cr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,ee=0;ee<z;ee++){var re=b[ee];if(re===x&&(y=ee,0<=E)||0>E&&re.containingGroup===x&&(E=ee,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Zs(a,-1,y)}x.svg!==null&&x.svg.remove()}function Al(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,ee=NaN;0<=z&&(ee=a.M(z).zOrder,!!isNaN(ee));)z--;for(var re=y+1,oe=NaN;re<b&&(oe=a.M(re).zOrder,!!isNaN(oe));)re++;if(!isNaN(ee)&&ee>E)for(;;){if(z===-1||ee<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(ee=NaN;0<=--z&&(ee=a.M(z).zOrder,isNaN(ee)););}else if(!isNaN(oe)&&oe<E)for(;;){if(re===b||oe>=E){if(re--,re===y)break;return a.mb(y),a.Gb(re,x),re}for(oe=NaN;++re<b&&(oe=a.M(re).zOrder,isNaN(oe)););}return y}Jt.Object.defineProperties(to.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===""&&Rt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Rt("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)&&Zi(a,"0 <= value <= 1",to,"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))}}}),to.prototype.findObjectsNear=to.prototype.og,to.prototype.findObjectsIn=to.prototype.Cf,to.prototype.findObjectsAt=to.prototype.ji,to.prototype.findObjectAt=to.prototype.ic,to.className="Layer";function kt(a,y){if(hm||(_l(),hm=!0),Zo(this),$s=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,is){var x=this,E=function(){x.removeEventListener(It.document,"DOMContentLoaded",E,!1),x.setRTL()};It.document.body!==null?this.setRTL():x.addEventListener(It.document,"DOMContentLoaded",E,!1)}this.ol=null,dg.add("Model",ea);var b=this;return this.Hb=function(z){var ee=b.partManager;if(z.model===ee.diagram.model&&ee.diagram.aa){ee.diagram.aa=!1;try{var re=z.change;z.modelChange===""&&re===Er&&ee.updateDataBindings(z.object,z.propertyName)}finally{ee.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ql(this),this.model=hy(),this.Wg=!0,Xo(this),this.layout=new za,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 cm,a!==void 0&&(typeof a=="string"||It.Element&&a instanceof Element?Go(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Hl,$s;function Ql(a){a.Yd=new pa,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new bn,a.pj=new ki,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new $e(NaN,NaN).freeze(),a.du=new $e(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new $e(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ct,a.zu=new $e(NaN,NaN).freeze(),a.ut=new Xt(NaN,NaN,NaN,NaN).freeze(),a.rj=new Sr(0,0,0,0).freeze(),a.sj=cd,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Vl,a.zk=Fs,a.Fg=Vl,a.pq=Fs,a.yt=Os,a.Bt=Os,a.Fc=!0,a.pn=!1,a.De=new Sn,a.Eh=new ki,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new Sr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Vi,a.bq.diagram=a,a.Qg=new Vi,a.Qg.diagram=a,a.cj=new Vi,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,tv(a),a.ai=new Sn,a.Ht=!0,a.uu=dd,a.pw=!1,a.wu=Of,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 ki,a.Xn=new bn,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 Sr(5).freeze(),a.Hw=new Sn().freeze(),a.Nt=999999999,a.nw=new Sn().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 Sn,a.ow=new Sn,a.Xh=null,a.aw=new un(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new $e,bounds:new Xt,Py:new un,bA:new un,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Xt(NaN,NaN,NaN,NaN).freeze(),a.wo=new un(NaN,NaN).freeze(),a.Sp=new Xt(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ki;var y=new Jn,x=new Sa;x.bind(new Cs("text","",Mo)),y.add(x),a.ny=y,a.Lg.add("",y),y=new Jn,x=new Sa,x.stroke="brown",x.bind(new Cs("text","",Mo)),y.add(x),a.Lg.add("Comment",y),y=new Jn,y.selectable=!1,y.avoidable=!1,x=new Lr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new un(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ki,y=new cr,y.selectionObjectName="GROUPPANEL",y.type=Pn.Vertical,x=new Sa,x.font="bold 12pt sans-serif",x.bind(new Cs("text","",Mo)),y.add(x),x=new Pn(Pn.Auto),x.name="GROUPPANEL";var E=new Lr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new nu,E.padding=new Sr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ki,y=new Fn,x=new Lr,x.isPanelMain=!0,y.add(x),x=new Lr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Fn,x=new Lr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Lo,y.type=Pn.Auto,x=new Lr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new nu,x.margin=new Sr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Lo,y.type=Pn.Link,x=new Lr,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 ea,a.toolManager=new Xr,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new ae,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Us(),a.eq=null,a.fq=kl,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 $e,a.zy=500,a.wp=new $e,a.wq=!1}kt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),df=null,_d="",Ju(this,!1),this.Xn.clear(),bg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Ju(a,y){a.animationManager.Cc(!0),a.Hw=new Sn().freeze(),a.nw=new Sn().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=[],ee=a.Wa.length;if(y){for(y=0;y<ee;y++)for(var re=a.Wa.s[y].parts;re.next();){var oe=re.value;oe!==b&&oe.data===null&&z.push(oe)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<ee;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(),bg(),a.Og.clear(),$a=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Us(){return null}kt.prototype.reset=function(){this.clear(),this.vb=!0,Ql(this),Fu(this),this.Wg=!0,Xo(this),this.layout=new za,this.Wg=!1,this.model=hy(),this.model.undoManager=new qi,this.vb=this.rn=!1,this.N()},kt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=It.document.body);var y=Ln("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},kt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=It.document.body);var y=0;if(is){var x=um;y=Hl,x===null&&(x=um=Ln("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Hl=Ln("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||xs||(y=11)}this.Db=y,this.Gw=!0},kt.prototype.qb=function(a){a.classType===kt&&(this.autoScale=a)},kt.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 Go(a,y){if(is){if(y!=null||Rt("Diagram setup requires an argument DIV."),a.Ka!==null&&Rt("Diagram has already completed setup."),typeof y=="string"?a.Ka=It.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Rt("No DIV or DIV id supplied: "+y),a.Ka===null&&Rt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Rt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&It.ResizeObserver){var x=Ci(function(){a.$b()},250);a.ol=new It.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}It.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=It.go;var b=new wh(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",It.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),lf(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new wh(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,is){b=Ln("div");var z=Ln("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=ca,b.addEventListener("pointerdown",ma),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Ci(function(){a.Yh=null,a.N()},300),a.Ov=Ci(function(){Zl(a)},250),a.preventDefault=function(ee){return ee.preventDefault(),!1},a.$j=function(ee){if(a.isEnabled){var re=Tl(a,ee,!0);re.bubbles=!0;var oe=0,le=0;re.delta=0,ee.deltaX!==void 0?(ee.deltaX!==0&&(oe=0<ee.deltaX?1:-1),ee.deltaY!==0&&(le=0<ee.deltaY?1:-1),re.delta=Math.abs(ee.deltaX)>Math.abs(ee.deltaY)?-oe:-le):ee.wheelDeltaX!==void 0?(ee.wheelDeltaX!==0&&(oe=0<ee.wheelDeltaX?-1:1),ee.wheelDeltaY!==0&&(le=0<ee.wheelDeltaY?-1:1),re.delta=Math.abs(ee.wheelDeltaX)>Math.abs(ee.wheelDeltaY)?-oe:-le):ee.wheelDelta!==void 0&&ee.wheelDelta!==0&&(re.delta=0<ee.wheelDelta?1:-1),a.doMouseWheel(),qo(re,ee)}},a.aA=function(ee){a.isEnabled&&(a.Vk=!1,Tl(a,ee,!0),ee=a.currentTool,ee.cancelWaitAfter(),ee.standardMouseOver())},a.ui=function(ee){if(a.isEnabled){a.Vk=!0;var re=a.Yt;re[ee.pointerId]===void 0&&(re[ee.pointerId]=ee),re=a.oj;var oe=!1;if(re[0]===null||re[0].pointerId!==ee.pointerId&&re[0].pointerType===ee.pointerType)if(re[1]!==null&&re[1].pointerId===ee.pointerId)re[1]=ee,oe=!0;else if(re[0]===null)re[0]=ee;else if(re[1]===null)re[1]=ee,oe=!0;else{ee.preventDefault();return}else re[0]=ee;(re=ee.pointerType==="touch"||ee.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var le=oe;oe=Na(a,ee,!0,!1,!0,le),qs(a,ee,oe),oe.targetDiagram=sd(ee,ee.target),oe.targetObject=null,le||oe.clone(a.bq),le=a.uw,re=re?25:10,ee.timeStamp-a.tw<a.zy&&!(Math.abs(le.x-ee.screenX)>re||Math.abs(le.y-ee.screenY)>re)?a.yq++:a.yq=1,oe.clickCount=a.yq,a.tw=ee.timeStamp,a.uw.sg(ee.screenX,ee.screenY),a.doMouseDown(),ee.button===1?ee.preventDefault():qo(oe,ee)}},a.dk=function(ee){if(a.isEnabled){a.Vk=!0;var re=a.oj;if(re[0]===null||re[0].pointerId!==ee.pointerId&&re[0].pointerType===ee.pointerType){if(re[1]!==null&&re[1].pointerId===ee.pointerId){re[1]=ee;return}if(re[0]===null)re[0]=ee;else return}else re[0]=ee;if(re[0].pointerId===ee.pointerId){re=Na(a,ee,!1,!1,!1,re[1]!==null);var oe=It.document.elementFromPoint(ee.clientX,ee.clientY)||null;oe!==null&&oe.shadowRoot!==void 0&&oe.shadowRoot!==null&&(oe=oe.shadowRoot.elementFromPoint(ee.clientX,ee.clientY));var le=a,he=ee;oe&&oe.H&&(he=ee,le=oe.H),re.targetDiagram=le,qs(a,he,re),re.targetObject=null,a.doMouseMove(),qo(re,ee)}}},a.fk=function(ee){if(a.isEnabled){a.Vk=!0;var re=ee.pointerType==="touch"||ee.pointerType==="pen",oe=a.Yt;if(re&&a.qu)delete oe[ee.pointerId],ee.preventDefault();else if(oe=a.oj,oe[0]===null||oe[0].pointerId!==ee.pointerId&&oe[0].pointerType===ee.pointerType)oe[1]!==null&&oe[1].pointerId===ee.pointerId&&(oe[1]=null);else{oe[0]=null,oe=Na(a,ee,!1,!0,!0,!1);var le=It.document.elementFromPoint(ee.clientX,ee.clientY)||null;le!==null&&le.shadowRoot!==void 0&&le.shadowRoot!==null&&(le=le.shadowRoot.elementFromPoint(ee.clientX,ee.clientY)),le!==null&&le.H instanceof kt&&le.H!==a&&qs(le.H,ee,oe),le===null&&(le=ee.target),qs(a,ee,oe),oe.clickCount=a.yq,oe.targetDiagram=sd(ee,le),oe.targetObject=null,a.doMouseUp(),qo(oe,ee),re&&(a.wq=!1)}}},a.ek=function(ee){if(a.isEnabled){a.Vk=!1;var re=a.Yt;re[ee.pointerId]&&delete re[ee.pointerId],re=a.oj,re[0]!==null&&re[0].pointerId===ee.pointerId&&(re[0]=null),re[1]!==null&&re[1].pointerId===ee.pointerId&&(re[1]=null),ee.pointerType!=="touch"&&ee.pointerType!=="pen"&&(ee=a.currentTool,ee.cancelWaitAfter(),ee.standardMouseOver())}},a.ck=function(ee){var re=a.oj;re[0]!==null&&re[0].pointerId===ee.pointerId?(re[0]=null,a.wq=!1):re[1]!==null&&re[1].pointerId===ee.pointerId&&(re[1]=null)},a.Vp=E.Z["d"+Rf[1]+Rf[2]+"wI"+gf.slice(1,5)]["b"+Bx.slice(1,y)](E.Z,If,y,y),E.Vc(!0),ja(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}kt.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},kt.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function ja(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(It,"resize",a.Ov,!1)}function Wo(a){30<a.Sq&&(a.Yh=1)}function ol(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Ia&&Ia.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}kt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:It.devicePixelRatio||1},kt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},kt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},kt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},kt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},kt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},kt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},kt.prototype.doFocus=function(){this.focus()},kt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=It.scrollX||It.pageXOffset,y=It.scrollY||It.pageYOffset;this.ta.focus(),It.scrollTo(a,y)}},kt.prototype.Oy=function(){this.H.R("GainedFocus")},kt.prototype.Ny=function(){this.H.R("LostFocus")};function Zl(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===Vl&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Xo(a){var y=new to;y.name="Background",a.Al(y),y=new to,y.name="",a.Al(y),y=new to,y.name="Foreground",a.Al(y),y=new to,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new to,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new to,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Ca(a){var y=new Pn(Pn.Grid);y.name="GRID";var x=new Lr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Lr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Lr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Lr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Ti,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 ca(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):ud(this.H)}function ma(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):ud(this.H)}kt.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,ee=E.x-z.left,re=E.y-z.top,oe=E.width+z.left+z.right,le=E.height+z.top+z.bottom,he=E.right+z.right;z=E.bottom+z.bottom;var ge=b.x;E=b.y;var ye=b.width,xe=b.height,Ee=b.right,Ne=b.bottom;b=this.scale;var Ye=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":Ye=Ye+a.scrollWidth-a.clientWidth;break;case"reverse":Ye=a.scrollWidth-Ye-a.clientWidth}var je=Ye;ye<oe||xe<le?(Ye=$e.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==je&&(Ye.x=je/b+ee,this.ju=je),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(Ye.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=Ye,$e.free(Ye),this.Ee=this.qr=!1):(Ye=$e.alloc(),a.uy&&this.allowHorizontalScroll&&(ee<ge&&(this.position=Ye.h(je+ee,this.position.y)),he>Ee&&(this.position=Ye.h(-(y.scrollWidth-this.Aa)+je-this.Aa/b+he,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=Ye.h(this.position.x,a.scrollTop+re)),z>Ne&&(this.position=Ye.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),$e.free(Ye),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,he=E.right,Ee=b.right,z=E.bottom,Ne=b.bottom,ee=E.x,ge=b.x,re=E.y,E=b.y,ye>=oe&&ee>=ge&&he<=Ee&&(x.style.width="1px"),xe>=le&&re>=E&&z<=Ne&&(x.style.height="1px"))}},kt.prototype.computeBounds=function(a){return a===void 0&&(a=new Xt),Ns(this),ls(this,a)};function ls(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 ee=E[z];if(ee.visible&&ee.isInDocumentBounds){ee=ee.Pa.s;for(var re=ee.length,oe=0;oe<re;oe++){var le=ee[oe];le.isInDocumentBounds&&le.isVisible()&&(le=le.actualBounds,le.w()&&(x?(x=!1,y.assign(le)):y.ed(le)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}kt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(li(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Fn||(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 Fn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Xt(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=$e.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Xt.allocAt(0,0,E.width,E.height);var b=$e.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Xt.free(E),$e.free(b),$e.free(x)}x=a.yh,y&&a.Fg!==Vl&&(x=a.Fg);var z=x!==Vl?du(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var ee=a.ya/z,re=a.zk,oe=a.pq;y&&!re.sb()&&(oe.sb()||oe.Xb())&&(re=oe.Xb()?Oo:oe),Qu(a,a.documentBounds,b,ee,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Ie.B(z.x,x)&&Ie.B(z.y,E)&&Ie.B(z.width,b)&&Ie.B(z.height,ee)||a.onViewportBoundsChanged(new Xt(x,E,b,ee),z,y,!1)}}function du(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),ee=a.ya+(a.Be?a.Db:0),re=z/b,oe=ee/E;return y===eh?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===Id?(y=oe>re?(ee-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}kt.prototype.zoomToFit=function(){var a=this.sj;this.sj=cd,this.scale=du(this,eh),a!==cd&&(Ja(this,!1),Qu(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},we=kt.prototype,we.BA=function(a,y){y===void 0&&(y=eh);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===eh||y===Id)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===Id?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 $e(a.x,a.y)}},we.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new $e(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))},we.zz=function(a){if(a instanceof xt){this.eq=a;var y=$e.alloc();this.fq=this.op(a.ga(Os,y)),$e.free(y)}else this.eq=null,this.fq=kl};function Qu(a,y,x,E,b,z){var ee=$e.allocAt(a.pa.x,a.pa.y),re=ee.x,oe=ee.y;if(a.eq!==null){var le=$e.alloc();le=a.eq.ga(Os,le),re=le.x-a.fq.x/a.scale,oe=le.y-a.fq.y/a.scale,b=Ms,$e.free(le)}(z||a.scrollMode===cd)&&(b.sb()&&(x>y.width&&(re=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(oe=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?(re=Math.min(re+x/2,y.right+Math.max(z,b.right)-x/2),re=Math.max(re,y.left-Math.max(z,b.left)+x/2),re-=x/2):re>y.left?re=y.left:re<y.right-x&&(re=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(oe=Math.min(oe+E/2,y.bottom+Math.max(x,b.bottom)-E/2),oe=Math.max(oe,y.top-Math.max(x,b.top)+E/2),oe-=E/2):oe>y.top?oe=y.top:oe<y.bottom-E&&(oe=y.bottom-E)),ee.x=isFinite(re)?re:-a.yb.left,ee.y=isFinite(oe)?oe:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,ee),ee.x=y.x,ee.y=y.y),yo(a.Yd,a.pa,ee),a.pa.h(ee.x,ee.y),Fu(a),$e.free(ee)}we.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=Bl(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof Ti)return a}else if(a=Bl(this,a,function(x){return x.part}),a instanceof Ti)return a;return null},we.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Ns(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 Bl(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Ns(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}we.lz=function(a,y,x){return y===void 0&&(y=!0),al(this,a,function(E){return E.part},y?function(E){return E instanceof Ti&&E.canSelect()}:null,x)};function al(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof bn||b instanceof Sn||(b=new Sn),Ns(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}we.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof bn||E instanceof Sn||(E=new Sn),Ns(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},we.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),$u(this,a,function(b){return b instanceof Ti&&(!x||b.canSelect())},y,E)},we.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof bn||b instanceof Sn||(b=new Sn),Ns(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ee=z.value;ee.visible&&ee.Cf(a,y,x,E,b)}return b},we.Nu=function(a,y,x,E,b,z){var ee=new Sn;Ns(this);for(var re=this.Wa.iteratorBackwards;re.next();){var oe=re.value;oe.visible&&oe.Nu(a,y,x,E,ee,b,z)}return ee};function $u(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 bn||b instanceof Sn||(b=new Sn),Ns(a),a=a.Wa.iteratorBackwards;a.next();){var ee=a.value;ee.visible&&!ee.isTemporary&&ee.Cf(y,z,x,E,b)}return b}we.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),zu(this,a,y,function(z){return z instanceof Ti&&(!E||z.canSelect())},x,b)},we.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 bn||b instanceof Sn)&&(z=b),b=!0),z instanceof bn||z instanceof Sn||(z=new Sn),Ns(this);for(var ee=this.Wa.iteratorBackwards;ee.next();){var re=ee.value;re.visible&&re.og(a,y,x,E,b,z)}return z};function zu(a,y,x,E,b,z){var ee=null;for(ee===void 0&&(ee=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof bn||b instanceof Sn)&&(z=b),b=!0),z instanceof bn||z instanceof Sn||(z=new Sn),Ns(a),a=a.Wa.iteratorBackwards;a.next();){var re=a.value;re.visible&&!re.isTemporary&&re.og(y,x,ee,E,b,z)}return z}kt.prototype.acceptEvent=function(a){return Tl(this,a,a instanceof MouseEvent)};function Tl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?qs(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),xs&&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=sd(y,y.target),E.targetObject=null,E}function sd(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 Na(a,y,x,E,b,z){var ee=a.Qg;return a.Qg=a.cj,a.cj=ee,ee.diagram=a,ee.clickCount=1,a=ee.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),ee.modifiers=a,ee.event=y,ee.timestamp=y.timeStamp,ee.button=y.button,ee.buttons=y.buttons,xs&&y.button===0&&y.ctrlKey&&(ee.button=2),ee.down=x,ee.up=E,ee.handled=!1,ee.bubbles=b,ee.isMultiTouch=z,ee}function qo(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}kt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Tl(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(),qo(x,a)},kt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Tl(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(),qo(x,a)},kt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Tl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),qo(x,a)},kt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Tl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),qo(x,a)},kt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new $e(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?Ra(new $e(y,a),this.Ab):new $e(y,a)};function qs(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,ee=0,re=0;E!==null&&(E=E.getBoundingClientRect(),ee=y.clientX-b/E.width*E.left,re=y.clientY-z/E.height*E.top),x.viewPoint.h(ee,re),a.Ab!==null?(y=$e.allocAt(ee,re),a.Ab.Cd(y),x.documentPoint.assign(y),$e.free(y)):x.documentPoint.h(ee,re)}function bu(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))}}kt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Dl(a){a.ld||Ns(a),a.Va()}kt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},we=kt.prototype,we.Pz=function(){return this.kg},we.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,wl(this),this.hf=!1,this.du=new $e(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&Ri(function(){E.ld=!1,Da(y,"Model"),a(E)},1)},we.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;It.requestAnimationFrame(function(){y.kg&&y.bd()})}},we.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),wl(this))};function Wl(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||ud(a)||(y&&Ns(a),x&&Ja(a,!1))}function wl(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,ee=0;ee<z;ee++){var re=b[ee];Bs(re,!1),re.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(oe){oe.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Zl(a),Wl(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(dl(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Ns(a),z=!1,(!a.hf||a.xh)&&(a.hf?ep(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),ep(a,!1)),z=!0),a.Jk=!1,Ns(a),a.ou||Dl(a),Wl(a,!0,!1),ee=!1,z?(x=Xt.alloc(),x.assign(a.viewportBounds),a.hf||(ee=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Bh(a)),a.R("LayoutCompleted"),Wl(a,!0,!1),Xt.free(x)):x.Ok&&x.Qw&&(a.Fg!==Vl?a.scale=du(a,a.Fg):a.yh!==Vl?a.scale=du(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),Ja(a,!0)),z&&ee&&a.eb("Initial Layout"),Ns(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Bh(a){if(a.Fg!==Vl)a.scale=du(a,a.Fg);else if(a.yh!==Vl)a.scale=du(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),dl(a)}function Ns(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 Sn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof cr&&E.U&65536&&(E.U=E.U^65536)})}}we.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof cr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof cr&&x.isVisible()&&fc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Fn&&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 Lo&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function fc(a,y){for(var x=Yi(),E=Yi(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof cr?(nh(z)||eu(z)||jd(z))&&fc(a,z):z instanceof Fn?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(Wi(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();Wi(E)}we.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},we.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Rt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){Zc(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,ee=Math.round(y.y*b)/b,re=this.Ab;for(re.reset(),b!==1&&re.scale(b),y.x===0&&y.y===0||re.translate(-z,-ee),a.ti=null,Yy(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),gc(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?pf(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ct.prototype.Cd=ct.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,Zc(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 e;z=this.Ab,z.reset(),ee=this.Mb,re=this.pa;var oe=this.Ca,le=Math.round(re.x*oe)/oe,he=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-le,-he),a.setTransform(ee,0,0,ee,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),gc(this,a),re=0;re<b;re++)a.setTransform(ee,0,0,ee,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[re].gc(a,this);if(y=!1,this.Yf?pf(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ct.prototype.Cd=ct.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Ia&&Ia.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 sf(a,y,x,E,b,z,ee,re,oe,le){if(a.Ka!==null){a.ta===null&&Rt("No canvas specified"),ee===void 0&&(ee=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),le===void 0&&(le=!1),Zc(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var he=a.Ca;a.Ca=b;var ge=a.Wa.s,ye=ge.length;try{var xe=new Xt(z.x,z.y,E.width/b,E.height/b),Ee=xe.copy();Ee.Co(x),dl(a,Ee),Ns(a),a.Fd(ge,ye,a,xe),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),re!==null&&re!==""&&(y.fillStyle=re,y.ox(0,0,E.width,E.height));var Ne=a.Mb;y.scale(Ne,Ne);var Ye=ct.alloc();Ye.reset(),Ye.translate(x.left,x.top),Ye.scale(b),z.x===0&&z.y===0||Ye.translate(-z.x,-z.y),y.setTransform(Ye.m11,Ye.m12,Ye.m21,Ye.m22,Ye.dx,Ye.dy),y.yc(),y instanceof Gu&&Yy(y,Ye.m11,Ye.m12,Ye.m21,Ye.m22,Ye.dx,Ye.dy),ct.free(Ye),gc(a,y),y.globalAlpha=a.pb;var je=a.Qj("Grid");if(ee){var nt=new Sn,ot=ee.iterator;for(ot.reset();ot.next();){var ut=ot.value;ut instanceof Ti&&(le||ut.layer!==je)&&(ut.Gj(),nt.add(ut))}for(le=0;le<ye;le++)Es(ge[le],y,a,nt,oe);nt.each(function(Dt){return Dt.Gj()})}else for(nt=0;nt<ye;nt++){var vt=ge[nt];vt===je?le&&vt.gc(y,a,!0):vt.gc(y,a,oe)}a.$i=!1,a.Yf&&pf(a.Yf,a)&&a.Vp()}finally{a.Ca=he,a.ib.Vc(!0),a.vd=!0,a.Fd(ge,ye,a,a.viewportBounds),dl(a),a.ib instanceof Gu&&(a.ib.Nj.PA(),a.redraw())}}}we.Gf=function(a){return this.Rg[a]},we.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},we.Tx=function(){this.Rg=new Pr,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(xs||ml),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function gc(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}we.Ql=function(a){return this.on[a]},we.sA=function(a,y){this.on[a]=y},we.Sx=function(){this.on=new Pr,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},we.set=function(a){return Object.assign(this,a),this},we.Du=function(a){return this.nm(a)},we.nm=function(a){return ld(this,a),this};function ld(a,y){var x=a instanceof Pn,E=a instanceof kt,b;for(b in y){b===""&&Rt("Setting properties requires non-empty property names");var z=a,ee=b;if(x||E){var re=b.indexOf(".");if(0<re){var oe=b.substring(0,re);x?z=a.fb(oe):(z=a[oe],z==null&&(z=a.toolManager[oe])),En(z)?ee=b.substr(re+1):Rt("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ee[0]!=="_"&&!ra(z,ee))if(E&&ee==="ModelChanged"){a.Yw(y[ee]);continue}else if(E&&ee==="Changed"){a.Pe(y[ee]);continue}else if(E&&ra(a.toolManager,ee))z=a.toolManager;else if(E&&am(a,ee)){a.Bj(ee,y[ee]);continue}else if(a instanceof Ei&&ee==="Changed"){a.Pe(y[ee]);continue}else Rt('Trying to set undefined property "'+ee+'" on object: '+z.toString());z[ee]=y[b],ee[0]==="_"&&z instanceof xt&&z.Vw(ee)}}we.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ki,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},we.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")},kt.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!==_f&&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=Xt.alloc(),vc(this,this.computeBounds(E)),Xt.free(E)),E=this.ta,E===null||E instanceof yc)))){var ee=this.Mb;b=this.Aa*ee;var re=this.ya*ee,oe=this.scale*ee;z=Math.round(Math.round(y.x*oe)-Math.round(a.x*oe)),y=Math.round(Math.round(y.y*oe)-Math.round(a.y*oe)),oe=this.jw,a=this.oy,oe.width!==b&&(oe.width=b),oe.height!==re&&(oe.height=re),a.clearRect(0,0,b,re),oe=190*ee;var le=70*ee,he=Math.max(z,0),ge=Math.max(y,0),ye=Math.floor(b-he),xe=Math.floor(re-ge);a.drawImage(E.Oa,he,ge,ye,xe,0,0,ye,xe),pf(this.Yf,this)&&a.clearRect(0,0,oe,le),E=Yi(),a=Yi(),xe=Math.abs(z),ye=Math.abs(y);var Ee=he===0?0:b-xe;he=$e.allocAt(Ee,0),xe=$e.allocAt(xe+Ee,re),a.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y)));var Ne=this.Ab;if(Ne.reset(),Ne.scale(ee,ee),this.Ca!==1&&Ne.scale(this.Ca),ee=this.pa,(ee.x!==0||ee.y!==0)&&isFinite(ee.x)&&isFinite(ee.y)&&Ne.translate(-ee.x,-ee.y),Ra(he,Ne),Ra(xe,Ne),E.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y))),Ee=ge===0?0:re-ye,he.h(0,Ee),xe.h(b,ye+Ee),a.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y))),Ra(he,Ne),Ra(xe,Ne),E.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y))),pf(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,he.h(b,re),xe.h(oe+b,le+re),a.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y))),Ra(he,Ne),Ra(xe,Ne),E.push(new Xt(Math.min(he.x,xe.x),Math.min(he.y,xe.y),Math.abs(he.x-xe.x),Math.abs(he.y-xe.y)))),$e.free(he),$e.free(xe),Wl(this,!1,!0),this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(Zc(this),re=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*re,this.ya*re),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,ee=this.Ca,oe=Math.round(z.x*ee)/ee,le=Math.round(z.y*ee)/ee,y=this.Ab,y.reset(),ee!==1&&y.scale(ee),z.x===0&&z.y===0||y.translate(-oe,-le),b.save(),b.beginPath(),z=a.length,ee=0;ee<z;ee++)oe=a[ee],oe.width!==0&&oe.height!==0&&b.rect(Math.floor(oe.x),Math.floor(oe.y),Math.ceil(oe.width),Math.ceil(oe.height));for(b.clip(),b.setTransform(re,0,0,re,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),gc(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ee=y[re],oe=E,ee.visible&&ee.pb!==0){le=va(ee,b),ge=ee.Zq,ge.length=0,he=this.scale,ye=Xt.alloc(),xe=ee.Pa.s,Ne=xe.length,Ee=oe.length;for(var Ye=0;Ye<Ne;Ye++){var je=xe[Ye],nt=Pf(je,je.actualBounds);e:{for(var ot=2/he,ut=4/he,vt=0;vt<Ee;vt++){var Dt=oe[vt];if(Dt.width!==0&&Dt.height!==0&&nt.Vu(Dt.x-ot,Dt.y-ot,Dt.width+ut,Dt.height+ut)){nt=!0;break e}}nt=!1}nt&&ee.Oj(b,je,this,ge,he,ye,!0)}Xt.free(ye),b.globalAlpha=le}b.restore(),b.Vc(!0),this.Yf&&pf(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}Wi(E),Wi(a),this.ld=!1}}else this.bd();x&&(Wo(this),this.bd(),ol(this,!0))}else x?(Wo(this),this.bd(),ol(this,!0)):this.bd()}};function Zc(a){a.pn!==!1&&(a.pn=!1,lf(a,a.Aa,a.ya))}function lf(a,y,x){Fu(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function ud(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,ee=a.gf?a.Db:0,re=a.Be?a.Db:0,oe=b.clientWidth||x+ee,le=b.clientHeight||E+re,he=a.viewportBounds;b=he.x;var ge=he.y,ye=he.width,xe=he.height;if((oe!==x+ee||le!==E+re)&&(a.gf=!1,a.Be=!1,re=ee=0,a.Aa=oe,a.ya=le,z=a.pn=!0,Fu(a)),!a.hf||!a.viewportBounds.w())return!0;var Ee=a.ku,Ne=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var Ye=a.documentBounds,je=0,nt=0,ot=0,ut=0,vt=he.width,Dt=he.height,Wn=a.rj;a.contentAlignment.sb()?(Ye.width>vt&&(je=Wn.left,nt=Wn.right),Ye.height>Dt&&(ot=Wn.top,ut=Wn.bottom)):(je=Wn.left,nt=Wn.right,ot=Wn.top,ut=Wn.bottom);var vi=Ye.width+je+nt,si=Ye.height+ot+ut;Wn=a.scale;var Mn=vi>oe/Wn,sn=si>le/Wn;if(!(z||a.gf||a.Be||Mn||sn))return!0;je=Ye.x-je,oe=he.x,nt=Ye.right+nt,le=he.right+ee,ot=Ye.y-ot;var hr=he.y;Ye=Ye.bottom+ut,he=he.bottom+re;var Ji="1px";if(ut="1px",a.scrollMode===cd&&(Mn||sn)&&(Mn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Mn=1,je+1<oe&&(Mn=Math.max((oe-je)*Wn+a.Aa,Mn)),nt>le+1&&(Mn=Math.max((nt-le)*Wn+a.Aa,Mn)),vt+ee+1<vi&&(Mn=Math.max((vi-vt)*Wn+a.Aa,Mn)),Ji=Mn.toString()+"px"),sn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Mn=1,ot+1<hr&&(Mn=Math.max((hr-ot)*Wn+a.ya,Mn)),Ye>he+1&&(Mn=Math.max((Ye-he)*Wn+a.ya,Mn)),Dt+re+1<si&&(Mn=Math.max((si-Dt)*Wn+a.ya,Mn)),ut=Mn.toString()+"px")),Mn=Ji!=="1px",sn=ut!=="1px",Mn&&sn||!Mn&&!sn||(sn&&(le-=a.Db),Mn&&(he-=a.Db),vi<vt+ee||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ee=1,je+1<oe&&(ee=Math.max((oe-je)*Wn+a.Aa,ee)),nt>le+1&&(ee=Math.max((nt-le)*Wn+a.Aa,ee)),vt+1<vi&&(ee=Math.max((vi-vt)*Wn+a.Aa,ee)),Ji=ee.toString()+"px"),Mn=Ji!=="1px",ee=a.ya,Mn!==a.Be&&(ee=Mn?a.ya-a.Db:a.ya+a.Db),si<Dt+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,ot+1<hr&&(re=Math.max((hr-ot)*Wn+ee,re)),Ye>he+1&&(re=Math.max((Ye-he)*Wn+ee,re)),Dt+1<si&&(re=Math.max((si-Dt)*Wn+ee,re)),ut=re.toString()+"px"),sn=ut!=="1px"),a.qr&&Mn===a.Be&&sn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Mn!==a.Be&&(Ji==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Mn,Ne.style.width=Ji,sn!==a.gf&&(ut==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=$e.alloc(),sn?(y.style.left=a.Db+"px",a.position=re.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=re.h(a.pa.x-a.Db/a.scale,a.pa.y)),$e.free(re))),z&&Fu(a),a.gf=sn,Ne.style.height=ut,a.gu=!0,z&&(a.pn=!0),y=Ee.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(vt+1<vi?y=(a.position.x-je)*Wn:je+1<oe?y=Ee.scrollWidth-Ee.clientWidth:nt>le+1&&(y=a.position.x*Wn)),a.tn)switch(a.bu){case"negative":y=-(Ee.scrollWidth-y-Ee.clientWidth);break;case"reverse":y=Ee.scrollWidth-y-Ee.clientWidth}return Ee.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Dt+1<si?Ee.scrollTop=(a.position.y-ot)*Wn:ot+1<hr?Ee.scrollTop=Ee.scrollHeight-Ee.clientHeight:Ye>he+1&&(Ee.scrollTop=a.position.y*Wn)),oe=a.Aa,le=a.ya,Ee.style.width=oe+(a.gf?a.Db:0)+"px",Ee.style.height=le+(a.Be?a.Db:0)+"px",x!==oe||E!==le||a.animationManager.zb?(x=Xt.allocAt(b,ge,ye,xe),a.onViewportBoundsChanged(x,a.viewportBounds,Wn,z),Xt.free(x),!1):!0}we=kt.prototype,we.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Rt("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&&Rt('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(Ao,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},we.oi=function(a){this.partManager.oi(a);var y=this;Sf(a,function(x){qu(y,x)}),(a instanceof Lo||a instanceof cr&&a.placeholder!==null)&&a.v(),a.data!==null&&Sf(a,function(x){sy(y.partManager,x)}),eu(a)!==!0&&jd(a)!==!0||this.De.add(a),I1(a,!0,this),j1(a)?(a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.$b()},we.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Sf(a,function(x){ly(y.partManager,x,y)}),this.De.remove(a),j1(a)?(a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(Pf(a,a.actualBounds)),this.$b()},we.remove=function(a){uf(this,a,!0)};function uf(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(Ho,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}we.Is=function(a,y){if(y===void 0&&(y=!1),li(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 Sn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},we.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},kt.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=hf(this)),this.toolManager!==null){var b=new ki;if(a!==null)if(li(a))for(var z=0;z<a.length;z++)Jh(this,b,a[z],x,E);else for(a=a.iterator;a.next();)Jh(this,b,a.value,x,E);else{for(a=this.parts;a.next();)Jh(this,b,a.value,x,E);for(a=this.nodes;a.next();)Jh(this,b,a.value,x,E);for(a=this.links;a.next();)Jh(this,b,a.value,x,E)}Wc(this,b,y,E,x)}};function Jh(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=hf(a)),x instanceof Jn){if(y.add(x,a.Pd(b,x,x.location)),x instanceof cr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)Jh(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var ee=z.value;if(!y.contains(ee)){var re=ee.fromNode,oe=ee.toNode;re!==null&&y.contains(re)&&oe!==null&&y.contains(oe)&&Jh(a,y,ee,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)Jh(a,y,x.value,E,b)}else if(x instanceof Fn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)Jh(a,y,x.value,E,b);else x instanceof Lo||y.add(x,a.Pd(b,x,x.location))}function Wc(a,y,x,E,b){if(y!==null&&y.count!==0){var z=$e.alloc(),ee=$e.alloc();ee.assign(x),isNaN(ee.x)&&(ee.x=0),isNaN(ee.y)&&(ee.y=0),(x=a.Mr)||Dd(a,y);for(var re=Yi(),oe=Yi(),le=y.iterator,he=$e.alloc();le.next();){var ge=le.key,ye=le.value;if(ge.Zc()){var xe=us(a,ge,y);xe!==null?re.push(new ie(ge,ye,xe)):(!b||ge.canMove())&&(xe=ye.point,z.assign(xe),a.computeMove(ge,z.add(ee),E,he),ge.location=he,ye.shifted===void 0&&(ye.shifted=new $e),ye.shifted.assign(he.re(xe)))}else le.key instanceof Fn&&oe.push(le.sa)}for($e.free(he),b=re.length,le=0;le<b;le++)ge=re[le],z.assign(ge.info.point),ge.Su.shifted===void 0&&(ge.Su.shifted=new $e),ge.node.location=z.add(ge.Su.shifted);for(b=$e.alloc(),le=$e.alloc(),ge=oe.length,ye=0;ye<ge;ye++){var Ee=oe[ye];if(xe=Ee.key,xe instanceof Fn)if(xe.suspendsRouting){xe.Tg=null,he=xe.fromNode;var Ne=xe.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Ne=Ee.value.point,xe.dragComputation===null)y.add(xe,a.Pd(E,xe,ee)),Sd(xe,ee.x-Ne.x,ee.y-Ne.y);else{Ee=$e.allocAt(0,0),(he=xe.i(0))&&he.w()&&Ee.assign(he);var Ye=he=$e.alloc().assign(Ee).add(ee);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(Ye=$e.alloc(),cf(a,xe,he,Ye,E)),he.assign(xe.dragComputation(xe,he,Ye)).re(Ee),y.add(xe,a.Pd(E,xe,he)),Sd(xe,he.x-Ne.x,he.y-Ne.y),$e.free(Ee),$e.free(he),Ye!==he&&$e.free(Ye)}else he!==null&&(b.assign(he.location),Ye=y.I(he),Ye!==null&&b.re(Ye.point)),Ne!==null&&(le.assign(Ne.location),Ye=y.I(Ne),Ye!==null&&le.re(Ye.point)),he!==null&&Ne!==null?b.Xa(le)?(he=Ee.value.point,Ne=z,Ne.assign(b),Ne.re(he),y.add(xe,a.Pd(E,xe,b)),Sd(xe,Ne.x,Ne.y)):(xe.suspendsRouting=!1,xe.bb()):(Ee=Ee.value.point,he=he!==null?b:Ne!==null?le:ee,y.add(xe,a.Pd(E,xe,he)),Sd(xe,he.x-Ee.x,he.y-Ee.y))}else(xe.fromNode===null||xe.toNode===null)&&(he=Ee.value.point,y.add(xe,a.Pd(E,xe,ee)),Sd(xe,ee.x-he.x,ee.y-he.y))}$e.free(z),$e.free(ee),$e.free(b),$e.free(le),Wi(re),Wi(oe),x||(Ns(a),pc(a,y))}}kt.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new $e),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=$e.alloc(),cf(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var ee=a.minLocation,re=ee.x;isNaN(re)&&(re=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ee=ee.y,isNaN(ee)&&(ee=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var oe=a.maxLocation,le=oe.x;return isNaN(le)&&(le=z?Math.round(1e3*a.location.x)/1e3:a.location.x),oe=oe.y,isNaN(oe)&&(oe=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(re,Math.min(x.x,le)),Math.max(ee,Math.min(x.y,oe))),b!==y&&$e.free(b),E};function hf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function cf(a,y,x,E,b){if(b===void 0&&(b=hf(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var ee=b.gridSnapOrigin,re=ee.x;if(ee=ee.y,b=b.gridSnapCellSpot,z!==null){var oe=z.gridCellSize;isNaN(a)&&(a=oe.width),isNaN(y)&&(y=oe.height),z=z.gridOrigin,isNaN(re)&&(re=z.x),isNaN(ee)&&(ee=z.y)}z=$e.allocAt(0,0),z.yi(0,0,a,y,b),Ie.No(x.x,x.y,re+z.x,ee+z.y,a,y,E),$e.free(z)}}function Dd(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Fn&&(y.suspendsRouting=!0)}function pc(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Fn&&(x.suspendsRouting=!1,Uv(x)&&x.bb())}a.Mr=!1}}function us(a,y,x){return y=y.containingGroup,y!==null&&(a=us(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}we=kt.prototype,we.Pd=function(a,y,x){if(x===void 0)return new Kc(rs);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Kc(new $e(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Kc(x.copy())};function Wa(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Rt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Rt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Rt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Rt("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&&Rt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}we.Al=function(a){Wa(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(Ao,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},we.Ww=function(a,y){Wa(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ho,"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(Ao,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},we.Cy=function(a,y){Wa(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(Ho,"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(Ao,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},we.kA=function(a){if(a.diagram!==this&&Rt("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(Ho,"layers",this,a,null,x,null),this.N(),this.Ya()}}},we.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},we.Yw=function(a){return this.pf===null&&(this.pf=new bn),this.pf.add(a),this.model.Pe(a),this},we.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},we.Pe=function(a){return this.zg===null&&(this.zg=new bn),this.zg.add(a),this},we.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},we.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==tr&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},we.cb=function(a,y,x,E,b,z,ee){z===void 0&&(z=null),ee===void 0&&(ee=null);var re=new xi;re.diagram=this,re.change=a,re.propertyName=y,re.object=x,re.oldValue=E,re.oldParam=z,re.newValue=b,re.newParam=ee,this.ds(re)},we.g=function(a,y,x,E,b){this.cb(Er,a,this,y,x,E,b)},kt.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===Er){var b=a.object;if(_a(b,a.propertyName,a.I(y)),b instanceof xt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===Ao){var ee=a.object,re=a.newParam,oe=a.newValue;if(ee instanceof Pn)if(typeof re=="number"&&oe instanceof xt){y?ee.pc(re):ee.Gb(re,oe);var le=ee.part;le!==null&&le.Wb()}else typeof re=="number"&&oe instanceof Ts&&(oe.isRow?h1(ee,re,y?void 0:oe):c1(ee,re,y?void 0:oe));else if(ee instanceof to){var he=a.oldParam===!0;typeof re=="number"&&oe instanceof Ti&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ee.pc(he?re:-1,oe,he)):ee.oi(re,oe,he))}else ee instanceof kt?typeof re=="number"&&oe instanceof to&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Rt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===Ho){var ge=a.object,ye=a.oldParam,xe=a.oldValue;if(ge instanceof Pn)typeof ye=="number"&&xe instanceof xt?y?ge.Gb(ye,xe):ge.pc(ye):typeof ye=="number"&&xe instanceof Ts&&(xe.isRow?h1(ge,ye,y?xe:void 0):c1(ge,ye,y?xe:void 0));else if(ge instanceof to){var Ee=a.newParam===!0;typeof ye=="number"&&xe instanceof Ti&&(y?0>ge.Pa.indexOf(xe)&&ge.oi(ye,xe,Ee):(xe.isSelected=!1,xe.isHighlighted=!1,xe.Wb(),ge.pc(Ee?ye:-1,xe,Ee)))}else ge instanceof kt?typeof ye=="number"&&xe instanceof to&&(y?(xe.Xe(this),this.Wa.Gb(ye,xe)):this.Wa.mb(ye)):Rt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==tr&&Rt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},kt.prototype.Ea=function(a){return this.undoManager.Ea(a)},kt.prototype.eb=function(a){return this.undoManager.eb(a)},kt.prototype.Kf=function(){return this.undoManager.Kf()},kt.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}},kt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},kt.prototype.rp=function(){this.partManager.rp()};function Lu(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,Fu(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,Fu(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ee=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,le=a.contentAlignment;isNaN(re)&&(le.$c()?le.Hf(lc)?re=0:le.Hf(Ml)&&(re=z-1):re=le.sb()?le.x*(z-1):z/2),isNaN(oe)&&(le.$c()?le.Hf(kh)?oe=0:le.Hf(Eu)&&(oe=ee-1):oe=le.sb()?le.y*(ee-1):ee/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=$e.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,$e.free(z),a.Ca=x,Fu(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))}}kt.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!==Vl||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Xr&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),ds(b,this)),this.vb||this.invalidateViewport(a,y),dl(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 dl(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=un.alloc(),b=1,z=1,ee=x.O.s,re=ee.length,oe=0;oe<re;oe++){var le=ee[oe],he=Math.abs(le.interval);2>he||(pv(le.figure)?z=z*he/Ie.vx(z,he):b=b*he/Ie.vx(b,he))}if(ee=x.gridCellSize,E.h(z*ee.width,b*ee.height),y!==void 0)b=y.width,z=y.height,a=y.x,ee=y.y;else{if(y=Xt.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Xt.free(y);return}b=y.width,z=y.height,a=y.x,ee=y.y,Xt.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=$e.alloc(),Ie.No(a,ee,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),un.free(E),x.part.location=y,$e.free(y)}}kt.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)}},kt.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))},kt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),li(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Ti||Rt("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 Ti||Rt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},kt.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()}},we=kt.prototype,we.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},we.Jz=function(a){a=new Sn().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 Ti||Rt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},we.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=$e.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)),$e.free(z);return}Rt("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):Rt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),$e.free(z)},we.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)},we.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},we.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)},we.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,ee=y.m11,re=y.m12,oe=y.m21,le=y.m22,he=y.dx,ge=y.dy,ye=x*ee+E*oe+he;y=x*re+E*le+ge;var xe=b*ee+E*oe+he;return a=b*re+E*le+ge,E=x*ee+z*oe+he,x=x*re+z*le+ge,ee=b*ee+z*oe+he,b=b*re+z*le+ge,z=Math.min(ye,xe),ye=Math.max(ye,xe),xe=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),ye=Math.max(ye,E),xe=Math.min(xe,x),y=Math.max(y,x),z=Math.min(z,ee),ye=Math.max(ye,ee),xe=Math.min(xe,b),y=Math.max(y,b),new Xt(z,xe,ye-z,y-xe)},we.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),Ra(a.copy(),this.Ab)};function Ol(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function $l(a){return a=dg.get(a),a!==null?new a:new ea}kt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===tr&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(oe){return oe.diagram=b}),a.mouseMoveTools.each(function(oe){return oe.diagram=b}),a.mouseUpTools.each(function(oe){return oe.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===tr){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Ns(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||ka(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 ee=a.isTransactionFinished;if(ee&&(Ol(this),this.As.clear(),Hs(this.animationManager)),!this.Rt&&ee&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;Ri(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function qu(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Mu(a,y[E])}function Mu(a,y){if(y instanceof mu){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof Sn&&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 mc(a,y){if(y instanceof mu){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 Sn&&x.Bg.remove(a),bg(E));break}}}}}kt.prototype.Wd=function(){this.partManager.Wd()},kt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},kt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},kt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},kt.prototype.Vb=function(a){return this.partManager.Vb(a)},kt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},we=kt.prototype,we.Lc=function(a){return this.partManager.Lc(a)},we.ii=function(a){return this.partManager.ii(a)},we.Kc=function(a){return this.partManager.Kc(a)},we.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:cn(en(y)))},we.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:cn(en(y)))};function Fu(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 vc(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())}we.Va=function(){if(this.Zi){var a=Xt.alloc();vc(this,this.computeBounds(a)),Xt.free(a)}},we.rz=function(){for(var a=new Sn,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},we.qz=function(){return this.ai.iterator},we.Uz=function(a){Ns(this),a&&Vc(this,!0),this.ld?ep(this,!1):(this.Jk=!0,wl(this))};function Vc(a,y){for(var x=a.ai.iterator;x.next();)Od(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Od(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Od(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function ep(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||Da(z,"Layout")),a.xh=!1;for(var ee=a.ai.iterator;ee.next();)tp(a,ee.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Ns(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||ka(z),a.aa=x}}}function tp(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)tp(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),fc(a,y),b.isValidLayout=!0):a.xh=!0)}}we.yz=function(){for(var a=new bn,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function tv(a){function y(b){var z=b.toLowerCase(),ee=new bn;x.add(b,ee),x.add(z,ee),E.add(b,b),E.add(z,b)}var x=new ki,E=new ki;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 am(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function lg(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Rt("Unknown DiagramEvent name: "+y)}we.Bj=function(a,y){return a=lg(this,a),a!==null&&a.add(y),this},we.am=function(a,y){a=lg(this,a),a!==null&&a.remove(y)},we.R=function(a,y,x){var E=lg(this,a),b=new Hr;if(b.diagram=this,a=am(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 ug(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}we.Yj=function(a,y){return hg(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},kt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?ls(this,a):a.assign(this.documentBounds)};function hg(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Np(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=sm(a,x)),x===null){y=Xt.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var ee=z.value,re=ee.layer;re!==null&&re.visible&&!re.isTemporary&&cg(a,ee,E,y)}Xt.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Xt.alloc(),z=x.memberParts;z.next();)ee=z.value,ee instanceof Jn&&cg(a,ee,E,y);Xt.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&rS(b);return b}function sm(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?sm(a,y.containingGroup):null}function cg(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(Ag(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(wd,x,y+1);else for(var ee=x;ee<=y;ee++)z[ee]=wd}else if(y instanceof cr)for(y=y.memberParts;y.next();)b=y.value,b instanceof Jn&&cg(a,b,x,E)}}function hd(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}kt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():np(this)};function np(a){a.vk===-1&&(a.vk=Ri(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=Xt.alloc(),a.computeBounds(y),y.ed(a.documentBounds),vc(a,y),Xt.free(y),a.Fc=!0,a.bd(),np(a))}},a.vp))}kt.prototype.ug=function(){this.vk!==-1&&(It.clearTimeout(this.vk),this.vk=-1)},kt.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=Xt.allocAt(0,0,E.width*b,E.height*b);var z=$e.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var ee=Math.max(this.scrollHorizontalLineChange,1);ee|=0,z.x-=ee,a.x<E.x+x.left/2&&(z.x-=ee),a.x<E.x+x.left/4&&(z.x-=4*ee)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(ee=Math.max(this.scrollHorizontalLineChange,1),ee|=0,z.x+=ee,a.x>E.x+E.width-x.right/2&&(z.x+=ee),a.x>E.x+E.width-x.right/4&&(z.x+=4*ee));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(ee=Math.max(this.scrollVerticalLineChange,1),ee|=0,z.y-=ee,a.y<E.y+x.top/2&&(z.y-=ee),a.y<E.y+x.top/4&&(z.y-=4*ee)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(ee=Math.max(this.scrollVerticalLineChange,1),ee|=0,z.y+=ee,a.y>E.y+E.height-x.bottom/2&&(z.y+=ee),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*ee)),z.Xa(rs)||(y=new $e(y.x+z.x/b,y.y+z.y/b)),Xt.free(E),$e.free(z),y},we=kt.prototype,we.Cs=function(){return null},we.av=function(){return null},we.bs=function(a,y){this.pj.add(a,y)},we.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof cr&&(y.$p=null)})};function Df(a,y,x){function E(){var he=+new Date;for(z=!0,ee.reset();ee.next();)if(!ee.value[0].al){z=!1;break}z||he-le>oe?y(x,b,re):It.requestAnimationFrame(E)}for(var b=x.callback,z=!0,ee=a.Og.iterator;ee.next();)if(!ee.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var re=a,oe=x.callbackTimeout||300,le=+new Date;return It.requestAnimationFrame(function(){E()}),null}we.Wz=function(a){return is?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},we.Jx=function(a){return a===void 0&&(a={}),Df(this,this.Xz,a)},we.Xz=function(a,y,x){var E=lm(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 gf+"data":b=E.getImageData(0,0,x.width,x.height);break;case gf:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Rt('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 lm(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Rt("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 ee=y.maxSize;y.maxSize===void 0&&(ee=x==="SVG"?new un(1/0,1/0):new un(2e3,2e3));var re=y.position||null,oe=y.parts||null,le=y.padding===void 0?1:y.padding,he=y.background||null,ge=y.omitTemporary;ge===void 0&&(ge=!0);var ye=y.document||document,xe=y.elementFinished||null,Ee=y.showTemporary;Ee===void 0&&(Ee=!ge),y=y.showGrid,y===void 0&&(y=Ee),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof le=="number"?le=new Sr(le):le instanceof Sr||Rt("MakeImage padding must be a Margin or a number."),le.left=Math.max(le.left,0),le.right=Math.max(le.right,0),le.top=Math.max(le.top,0),le.bottom=Math.max(le.bottom,0),a.ib.Vc(!0),ge=new wh(null,ye,void 0,!0);var Ne=ge.context;if(!(b||z||oe||re))return ge.width=a.Aa+Math.ceil(le.left+le.right),ge.height=a.ya+Math.ceil(le.top+le.bottom),x==="SVG"?E===null?null:(E.resize(ge.width,ge.height,ge.width,ge.height),E.ownerDocument=ye,E.hs=xe,sf(a,E.context,le,new un(ge.width,ge.height),a.Ca,a.pa,oe,he,Ee,y),E.context):(a.Xm=!1,sf(a,Ne,le,new un(ge.width,ge.height),a.Ca,a.pa,oe,he,Ee,y),a.Xm=!0,ge.context);var Ye=a.Pp,je=a.documentBounds.copy();if(je.Fv(a.yb),Ee)for(var nt=a.Wa.s,ot=nt.length,ut=0;ut<ot;ut++){var vt=nt[ut];if(vt.visible&&vt.isTemporary){vt=vt.Pa.s;for(var Dt=vt.length,Wn=0;Wn<Dt;Wn++){var vi=vt[Wn];vi.isInDocumentBounds&&vi.isVisible()&&(vi=vi.actualBounds,vi.w()&&je.ed(vi))}}}if(nt=new $e(je.x,je.y),oe!==null){for(ot=new Xt(0,0,0,0),ut=!0,vt=oe.iterator,vt.reset();vt.next();)Dt=vt.value,Dt instanceof Ti&&(Wn=Dt.layer,Wn!==null&&!Wn.visible||Wn!==null&&!Ee&&Wn.isTemporary||!Dt.isVisible()||(Dt=Dt.actualBounds,Dt.w()&&(ut?(ut=!1,ot.assign(Dt)):ot.ed(Dt))));je.width=ot.width,je.height=ot.height,nt.x=ot.x,nt.y=ot.y}return re!==null&&re.w()&&(nt=re,z||(z=Ye)),ot=re=0,le!==null&&(re=le.left+le.right,ot=le.top+le.bottom),ut=vt=0,b!==null&&(vt=b.width,ut=b.height,isFinite(vt)&&(vt=Math.max(0,vt-re)),isFinite(ut)&&(ut=Math.max(0,ut-ot))),b!==null&&z!==null?(z==="NaN"&&(z=Ye),b.w()?(b=vt,je=ut):isNaN(ut)?(b=vt,je=je.height*z):(b=je.width*z,je=ut)):b!==null?b.w()?(z=Math.min(vt/je.width,ut/je.height),b=vt,je=ut):isNaN(ut)?(z=vt/je.width,b=vt,je=je.height*z):(z=ut/je.height,b=je.width*z,je=ut):z!==null?z==="NaN"&&ee.w()?(z=Math.min((ee.width-re)/je.width,(ee.height-ot)/je.height),z>Ye?(z=Ye,b=je.width,je=je.height):(b=ee.width,je=ee.height)):(b=je.width*z,je=je.height*z):(z=Ye,b=je.width,je=je.height),le!==null?(b+=re,je+=ot):le=new Sr(0),ee!==null&&(Ye=ee.width,ee=ee.height,isNaN(Ye)&&(Ye=2e3),isNaN(ee)&&(ee=2e3),isFinite(Ye)&&(b=Math.min(b,Ye)),isFinite(ee)&&(je=Math.min(je,ee))),ge.width=Math.ceil(b),ge.height=Math.ceil(je),x==="SVG"?E===null?null:(E.resize(ge.width,ge.height,ge.width,ge.height),E.ownerDocument=ye,E.hs=xe,sf(a,E.context,le,new un(Math.ceil(b),Math.ceil(je)),z,nt,oe,he,Ee,y),E.context):(a.Xm=!1,sf(a,Ne,le,new un(Math.ceil(b),Math.ceil(je)),z,nt,oe,he,Ee,y),a.Xm=!0,ge.context)}Jt.Object.defineProperties(kt.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof me||(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 yc(this,It.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 yc(this,It.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(It,"resize",this.Ov,!1),this.removeEventListener(It,"wheel",this.$j,!0),$s===this&&($s=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Go(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)&&Zi(a,"0 <= value <= 1",kt,"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&&Zi(a,">= 0",kt,"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&&Zi(a,">= 0",kt,"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 Zi(a,">= 0",kt,"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||Ol(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&&Rt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Ju(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,Da(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=$l(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(It,"pointermove",this.dk,!0),this.addEventListener(It,"pointerdown",this.ui,!0),this.addEventListener(It,"pointerup",this.fk,!0),this.addEventListener(It,"pointerout",this.ek,!0),this.addEventListener(It,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(It,"wheel",this.$j,!0),this.addEventListener(It,"selectstart",this.preventDefault,!1)):(this.removeEventListener(It,"pointermove",this.dk,!0),this.removeEventListener(It,"pointerdown",this.ui,!0),this.removeEventListener(It,"pointerup",this.fk,!0),this.removeEventListener(It,"pointerout",this.ek,!0),this.removeEventListener(It,"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(It,"wheel",this.$j,!0),this.removeEventListener(It,"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=$e.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),yo(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?Fu(this):(this.vb=!0,a=this.scale,Qu(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)}$e.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=Ca(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Ca(this)),a.type!==Pn.Grid&&Rt("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),dl(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),Fu(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||Rt("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 Sr(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===cd&&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,Lu(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&&Lu(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!==Vl&&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()||Rt("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()||Rt("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)):Zi(a,"> 0",kt,"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)):Zi(a,"> 0",kt,"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 Sr(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&&Rt("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();)xp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==dd&&a!==As&&a!==fg&&Rt("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 un(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 Sr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),Jt.Object.defineProperties(kt,{licenseKey:{get:function(){return lp.jc()},set:function(a){lp.add(a.replace(/\s/g,""))}},version:{get:function(){return ff}}}),kt.prototype.makeImageData=kt.prototype.Jx,kt.prototype.makeImage=kt.prototype.Wz,kt.prototype.cacheGroupExternalLinks=kt.prototype.Fu,kt.prototype.addRenderer=kt.prototype.bs,kt.prototype.makeSVG=kt.prototype.av,kt.prototype.makeSvg=kt.prototype.Cs,kt.prototype.stopAutoScroll=kt.prototype.ug,kt.prototype.doAutoScroll=kt.prototype.gs,kt.prototype.isUnoccupied=kt.prototype.Yj,kt.prototype.raiseDiagramEvent=kt.prototype.R,kt.prototype.removeDiagramListener=kt.prototype.am,kt.prototype.addDiagramListener=kt.prototype.Bj,kt.prototype.findTreeRoots=kt.prototype.yz,kt.prototype.layoutDiagram=kt.prototype.Uz,kt.prototype.findTopLevelGroups=kt.prototype.qz,kt.prototype.findTopLevelNodesAndLinks=kt.prototype.rz,kt.prototype.ensureBounds=kt.prototype.Va,kt.prototype.findLinksByExample=kt.prototype.ls,kt.prototype.findNodesByExample=kt.prototype.ms,kt.prototype.findLinkForData=kt.prototype.Kc,kt.prototype.findNodeForData=kt.prototype.ii,kt.prototype.findPartForData=kt.prototype.Lc,kt.prototype.findLinkForKey=kt.prototype.findLinkForKey,kt.prototype.findNodeForKey=kt.prototype.Vb,kt.prototype.findPartForKey=kt.prototype.findPartForKey,kt.prototype.rebuildParts=kt.prototype.Wd,kt.prototype.transformViewToDoc=kt.prototype.Ps,kt.prototype.transformRectDocToView=kt.prototype.zA,kt.prototype.transformDocToView=kt.prototype.op,kt.prototype.centerRect=kt.prototype.es,kt.prototype.scrollToRect=kt.prototype.tv,kt.prototype.scroll=kt.prototype.scroll,kt.prototype.highlightCollection=kt.prototype.Jz,kt.prototype.highlight=kt.prototype.Iz,kt.prototype.selectCollection=kt.prototype.rA,kt.prototype.select=kt.prototype.select,kt.prototype.updateAllRelationshipsFromData=kt.prototype.rp,kt.prototype.updateAllTargetBindings=kt.prototype.updateAllTargetBindings,kt.prototype.commit=kt.prototype.commit,kt.prototype.rollbackTransaction=kt.prototype.Kf,kt.prototype.commitTransaction=kt.prototype.eb,kt.prototype.startTransaction=kt.prototype.Ea,kt.prototype.raiseChanged=kt.prototype.g,kt.prototype.raiseChangedEvent=kt.prototype.cb,kt.prototype.removeChangedListener=kt.prototype.ik,kt.prototype.addChangedListener=kt.prototype.Pe,kt.prototype.removeModelChangedListener=kt.prototype.mA,kt.prototype.addModelChangedListener=kt.prototype.Yw,kt.prototype.findLayer=kt.prototype.Qj,kt.prototype.removeLayer=kt.prototype.kA,kt.prototype.addLayerAfter=kt.prototype.Cy,kt.prototype.addLayerBefore=kt.prototype.Ww,kt.prototype.addLayer=kt.prototype.Al,kt.prototype.moveParts=kt.prototype.moveParts,kt.prototype.copyParts=kt.prototype.Kj,kt.prototype.removeParts=kt.prototype.Is,kt.prototype.remove=kt.prototype.remove,kt.prototype.add=kt.prototype.add,kt.prototype.clearDelayedGeometries=kt.prototype.bx,kt.prototype.setProperties=kt.prototype.nm,kt.prototype.attach=kt.prototype.Du,kt.prototype.set=kt.prototype.set,kt.prototype.resetInputOptions=kt.prototype.Sx,kt.prototype.setInputOption=kt.prototype.sA,kt.prototype.getInputOption=kt.prototype.Ql,kt.prototype.resetRenderingHints=kt.prototype.Tx,kt.prototype.setRenderingHint=kt.prototype.Xx,kt.prototype.getRenderingHint=kt.prototype.Gf,kt.prototype.maybeUpdate=kt.prototype.bd,kt.prototype.requestUpdate=kt.prototype.$b,kt.prototype.delayInitialization=kt.prototype.Xy,kt.prototype.isUpdateRequested=kt.prototype.Pz,kt.prototype.invalidateDocumentBounds=kt.prototype.Ya,kt.prototype.findObjectsNear=kt.prototype.og,kt.prototype.findPartsNear=kt.prototype.mz,kt.prototype.findObjectsIn=kt.prototype.Cf,kt.prototype.findPartsIn=kt.prototype.ux,kt.prototype.findObjectsAt=kt.prototype.ji,kt.prototype.findPartsAt=kt.prototype.lz,kt.prototype.findObjectAt=kt.prototype.ic,kt.prototype.findPartAt=kt.prototype.Ol,kt.prototype.focusObject=kt.prototype.zz,kt.prototype.alignDocument=kt.prototype.Jy,kt.prototype.zoomToRect=kt.prototype.BA,kt.prototype.zoomToFit=kt.prototype.zoomToFit,kt.prototype.diagramScroll=kt.prototype.kx,kt.prototype.focus=kt.prototype.focus;var dg=new ki,um=null,is=It.document!==void 0,df=null,_d="",Vl=new Wt(kt,"None",0),eh=new Wt(kt,"Uniform",1),Id=new Wt(kt,"UniformToFill",2),Of=new Wt(kt,"CycleAll",10),ip=new Wt(kt,"CycleNotDirected",11),rp=new Wt(kt,"CycleNotDirectedFast",12),op=new Wt(kt,"CycleNotUndirected",13),ap=new Wt(kt,"CycleDestinationTree",14),sp=new Wt(kt,"CycleSourceTree",15),cd=new Wt(kt,"DocumentScroll",1),_f=new Wt(kt,"InfiniteScroll",2),dd=new Wt(kt,"TreeParentCollapsed",21),As=new Wt(kt,"AllParentsCollapsed",22),fg=new Wt(kt,"AnyParentsCollapsed",23),lp=new bn,ff="2.3.10",gf="image",If=null,hm=!1;function _l(){if(is){var a=It.document.createElement("canvas"),y=a.getContext("2d"),x=Mr("7ca11abfd022028846");y[x]=Mr("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",hn.Dx+"4ae6247590da4bb21c324ba3a84e385776",ct.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Ie.za],b=1;5>b;b++)y[Mr("7ca11abfd7330390")](Mr(E[b-1]),10,15*b);for(y[x]=Mr("39f046ebb36e4b"),x=1;5>x;x++)y[Mr("7ca11abfd7330390")](Mr(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(ct.prototype.Cd=ct.prototype.Eu),If=a}}kt.className="Diagram",kt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=It.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof kt?y.H:null},kt.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},kt.useDOM=function(a){is=a?It.document!==void 0:!1},kt.isUsingDOM=function(){return is},kt.None=Vl,kt.Uniform=eh,kt.UniformToFill=Id,kt.CycleAll=Of,kt.CycleNotDirected=ip,kt.CycleNotDirectedFast=rp,kt.CycleNotUndirected=op,kt.CycleDestinationTree=ap,kt.CycleSourceTree=sp,kt.DocumentScroll=cd,kt.InfiniteScroll=_f,kt.TreeParentCollapsed=dd,kt.AllParentsCollapsed=As,kt.AnyParentsCollapsed=fg;function cm(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function pf(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)e:{y="f";var x=It[Mr("76a715b2f73f148a")][Mr("72ba13b5")]||"";if(a.Rc=!0,is){var E=kt[Mr("76a115b6ed251eaf4692")];if(E)for(var b=lp.iterator;b.next()&&(E=b.value,E=Mr(E).split(Mr("39e9")),!(6>E.length));){var z=Mr(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ee=Mr(hn[Mr("6cae19")]).split(".");if(z[0]>ee[0]||z[0]===ee[0]&&z[1]>=ee[1]){var re=It[Mr("74a900bae4370f8b51")][Mr("6fbb13a1c2311e8a57")].toLowerCase();if(ee=re[Mr("73a612b6fb191d")](Mr("3aad1ab6e022098b4dc4")),z=Mr(E[2]),-1<ee&&(re=re[Mr("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ee),!a.Rc))break;for(ee=x[Mr("76ad18b4f73e")],re=x[Mr("73a612b6fb191d")](Mr("35e7"))+2;re<ee;re++)y+=x[re];if(ee=y[Mr("73a612b6fb191d")](z),0>ee&&z!==Mr("7da71ca0ad381e90")&&(ee=y[Mr("73a612b6fb191d")](Mr("76a715b2ef3e149757"))),0>ee&&(ee=y[Mr("73a612b6fb191d")](Mr("76a715b2ef3e149757"))),0>ee&&(ee=y[Mr("73a612b6fb191d")](Mr("2bfa41fdb3784bca12"))),0>ee&&(ee=x[Mr("73a612b6fb191d")](Mr("7baa19a6f76c1988428554"))),a.Rc=!(0<=ee&&ee<y[Mr("73a612b6fb191d")](Mr("35"))||y[Mr("73a612b6fb191d")](Mr("35"))===-1),!a.Rc||x[Mr("73a612b6fb191d")](Mr("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Mr("73a612b6fb191d")](z)),!a.Rc)||(ee=It[Mr("76a715b2f73f148a")][Mr("69ad17a1e03e")],re=ee[Mr("73a612b6fb191d")](Mr("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ee[Mr("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ee=It.document.createElement("div");for(var oe=E[0].replace(/[A-Za-z]/g,"");4>oe.length;)oe+="9";if(re=oe,oe=oe.substr(oe.length-4),E="",E+=["gsh","gsf"][parseInt(oe.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(oe.substr(0,1),10)%4],ee[Mr("79a417a0f0181a8946")]=E,It.document[Mr("78a712aa")]){It.document[Mr("78a712aa")][Mr("7bb806b6ed32388c4a875b")](ee),oe=It.getComputedStyle(ee).getPropertyValue(Mr("78a704b7e62456904c9b12701b6532a8"));var le=It.getComputedStyle(ee).getPropertyValue(Mr("75b817b0ea2202"));if(It.document[Mr("78a712aa")][Mr("68ad1bbcf533388c4a875b")](ee),oe){if(ee=It[Mr("77a902b0eb1b1e804a8a")],le==="0."+parseInt(re,10)%100||oe.indexOf(parseInt(z[1]+z[2],16))!==-1&&oe.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(ee&&ee(Mr("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ee=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var he in ee)if(E===ee[he].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(he=x[Mr("76ad18b4f73e")],b=x[Mr("73a612b6fb191d")](Mr("35e7"))+2;b<he;b++)y+=x[b];x=y[Mr("73a612b6fb191d")](Mr("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Mr("73a612b6fb191d")](Mr("35")))}}}return 0<a.Rc&&a!==a.wy}cm.className="DiagramHelper";function Kc(a){this.j=a===void 0?new $e:a,this.o=new $e}Jt.Object.defineProperties(Kc.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 Rf="DraggingInfo";Kc.className="DraggingInfo";function ie(a,y,x){this.node=a,this.info=y,this.Su=x}ie.className="DraggingNodeInfoPair";function ae(){this.reset()}ae.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new un(NaN,NaN).freeze(),this.gridSnapCellSpot=Os,this.gridSnapOrigin=new $e(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function de(a,y){if(typeof a=="string"||It.Element&&a instanceof Element)var x=kt.call(this,a)||this;else x=kt.call(this)||this,y=a;return ce(x),y&&x.nm(y),x}Ct(de,kt);function ce(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Iu,a.layout=new gl}de.prototype.reset=function(){kt.prototype.reset.call(this),ce(this)},de.className="Palette";function me(a,y){if(typeof a=="string"||It.Element&&a instanceof Element)var x=kt.call(this,a)||this;else x=kt.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 Ti;var b=new Lr;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 Sr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new Xe,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ee=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new $e(re.x-ee.width/2,re.y-ee.height/2)}},x.Pf=function(){E.Ya(),_e(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&&_e(E)},x.autoScale=eh,x.vb=!1,y&&Object.assign(x,y),x}Ct(me,kt),me.prototype.computePixelRatio=function(){return 1},me.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(Zc(this),this.ql===null){var x=new wh(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),Le(this)}finally{this.ta=a,this.ib=y}}}kt.prototype.redraw.call(this)},me.prototype.gc=function(){if(this.Ka===null&&Rt("No div specified"),this.ta===null&&Rt("No canvas specified"),!(this.ta instanceof yc)&&(Ov(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){Zc(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?Le(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 Le(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=Xt.alloc().assign(a.viewportBounds).ed(y.viewportBounds),dl(y,b),Xt.free(b),Ns(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 ee=0;ee<z;ee++){var re=y[ee],oe=a;if(re.visible&&re.opacity!==0){var le=re.diagram.grid.part;if(!x&&re.isTemporary)E&&le.layer===re&&(re=va(re,b),le.gc(b,oe),b.globalAlpha=re);else{for(var he=va(re,b),ge=oe.scale,ye=Xt.alloc(),xe=re.Pa.s,Ee=xe.length,Ne=0;Ne<Ee;Ne++){var Ye=xe[Ne];(E||Ye!==le)&&re.Oj(b,Ye,oe,null,ge,ye,!1)}Xt.free(ye),b.globalAlpha=he}}}}}function _e(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=un.alloc();b.h(x.width,x.height),E.desiredSize=b,un.free(b),a=2/a.scale,E instanceof Lr&&(E.strokeWidth=a),y.location=new $e(x.x-a/2,x.y-a/2),y.isSelected=!0}}}me.prototype.computeBounds=function(){var a=this.observed;if(a===null)return ia;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},me.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},me.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),_e(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))},Jt.Object.defineProperties(me.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof me&&Rt("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),_e(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),_e(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)}}}),me.className="Overview";function Xe(){gr.call(this),this.j=null}Ct(Xe,gr),Xe.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 $e(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new $e(a.x-this.j.x,a.y-this.j.y)),!0)},Xe.prototype.doActivate=function(){this.j=null,gr.prototype.doActivate.call(this)},Xe.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},Xe.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 $e(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new $e(a.x-this.j.x,a.y-this.j.y)}}},Xe.className="OverviewDraggingTool";function Ue(){Zo(this),this.H=$s,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=ia,this.hb=!0,this.cg=null,this.ob=200}Ue.prototype.toString=function(){return"CommandHandler"},Ue.prototype.Xe=function(a){this.H=a},Ue.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=xs?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()},Ue.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Ue.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Xr&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Ue.prototype.canStopCommand=function(){return!0},Ue.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=""}},Ue.prototype.canSelectAll=function(){return this.diagram.allowSelect},Ue.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 Sn,x=a.selection.iterator;x.next();)Gd(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=""}},Ue.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Ue.prototype.copySelection=function(){var a=this.diagram,y=new Sn;for(a=a.selection.iterator;a.next();)Gd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Ue.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Ue.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Ue.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Ue.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)df=null,_d="";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 bn,x.addAll(z),df=x,_d=y.model.dataFormat}}y.R("ClipboardChanged",x)},Ue.prototype.pasteFromClipboard=function(){var a=new Sn,y=df;if(y===null)return a;var x=this.diagram;if(_d!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,ee=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),ee=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=ee.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},Ue.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);Wc(y,z,new $e(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=""}},Ue.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||df===null||df.count===0||_d!==a.model.dataFormat)},Ue.prototype.undo=function(){this.diagram.undoManager.undo()},Ue.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Ue.prototype.redo=function(){this.diagram.undoManager.redo()},Ue.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Ue.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Vl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ue.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Vl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ue.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Vl&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Ue.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Vl?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Ue.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Ue.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Ue.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;Da(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=ia):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),ka(y)},Ue.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Ue.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(oe){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;Da(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=ht(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 oe=b.pop();0<b.length&&oe instanceof Jn&&oe.isTreeExpanded&&(!(oe instanceof cr)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof Ti&&y.tv(oe.actualBounds),oe instanceof Jn&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof cr&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof Ti&&y.es(oe.actualBounds),y.am("LayoutCompleted",ee)),y.eb("Scroll To Part")},ee=function(){Ri(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",ee),z()}}else{var re=y.position.copy();y.es(a.actualBounds),re.Xa(y.position)&&x.Cc()}}};function ht(a,y,x){if(y.isVisible())return x;if(y instanceof Lo)ht(a,y.adornedPart,x);else if(y instanceof Fn){var E=y.fromNode;E!==null&&ht(a,E,x),y=y.toNode,y!==null&&ht(a,y,x)}else y instanceof Jn&&(E=y.labeledLink,E!==null&&ht(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),ht(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),ht(a,y,x));return x}Ue.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Ti)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Ue.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),Da(y.animationManager,"Collapse Tree");var x=new bn;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 Jn&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Ue.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Jn&&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 Jn&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ue.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),Da(y.animationManager,"Expand Tree");var x=new bn;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 Jn&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Ue.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof Jn)||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 Jn&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Ue.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 bn,z=a.selection.iterator;z.next();){var ee=z.value;ee.Zc()&&ee.canGroup()&&b.add(ee)}for(var re=new bn,oe=b.iterator;oe.next();){var le=oe.value;z=!1;for(var he=b.iterator;he.next();)if(le.Td(he.value)){z=!0;break}z||re.add(le)}if(0<re.count){var ge=re.first().containingGroup;if(ge!==null)for(;ge!==null;){b=!1;for(var ye=re.iterator;ye.next();)if(!ye.value.Td(ge)){b=!0;break}if(b)ge=ge.containingGroup;else break}if(x instanceof cr)Ph(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var xe=y.copyNodeData(x);En(xe)&&(y.xf(xe),E=a.ii(xe))}if(E!==null){ge!==null&&this.isValidMember(ge,E)&&(E.containingGroup=ge);for(var Ee=re.iterator;Ee.next();){var Ne=Ee.value;this.isValidMember(E,Ne)&&(Ne.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Ue.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 Kt(a){var y=Yi();for(a=a.iterator;a.next();){var x=a.value;x instanceof Fn||y.push(x)}a=new Sn,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,ee=0;ee<x;ee++)if(b.Td(y[ee])){z=!1;break}z&&a.add(b)}return Wi(y),a}Ue.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Fn)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},Ue.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 bn;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof cr&&z.canUngroup()&&E.add(z)}var ee=new bn;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var le=oe.containingGroup,he=le!==null&&le.data!==null?x.wa(le.data):void 0;ee.addAll(oe.memberParts);for(var ge=ee.iterator;ge.next();){var ye=ge.value;if(ye.isSelected=!0,!(ye instanceof Fn)){var xe=ye.data;xe!==null?x.mp(xe,he):ye.containingGroup=le}}y.remove(oe)}}y.R("SelectionUngrouped",E,ee)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Ue.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 cr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&y.canUngroup())return!0;return!1},Ue.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=Kt(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Ue.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),Da(y.animationManager,"Collapse SubGraph");var x=new bn;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 cr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Ue.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof cr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&y.isSubGraphExpanded)return!0;return!1},Ue.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),Da(y.animationManager,"Expand SubGraph");var x=new bn;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 cr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Ue.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof cr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof cr&&!y.isSubGraphExpanded)return!0;return!1},Ue.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 Sa&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Ue.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 Sa))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 Sa&&x.editable}),a!==null))return!0;return!1},Ue.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 xt?b=a.ga(Oo):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new $e(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,ji(x,!1,a)}},Ue.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)},Ue.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 ki,a===null)return E;for(var z=a.iterator;z.next();)Jh(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 Fn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},Jt.Object.defineProperties(Ue.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||Rt("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}}}),Ue.className="CommandHandler",Us=function(){return new Ue};function xt(){Zo(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new $e(NaN,NaN).freeze(),this.jd=vl,this.Ab=new ct,this.wh=new ct,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=Sl,this.uc=new Xt(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Xt(NaN,NaN,NaN,NaN).freeze(),this.dc=new Xt(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Fs,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 yn,fn,wi,Mi,Hi,dr,oo,Dr,Po,aa;xt.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=bo(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},xt.prototype.Vw=function(a){var y=this.Dh;if(li(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},xt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},xt.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},xt.prototype.copy=function(){return this.clone()},we=xt.prototype,we.qb=function(a){a.classType===Fn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Rt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===xt&&(this.stretch=a)},we.toString=function(){return er(this.constructor)+"#"+Vr(this)},we.th=function(){this.A!==null&&(this.A.nc=!0)};function Br(a){a.A===null?a.A=new zf:a.A.nc&&(a.A=a.A.copy())}we.Xc=function(){if(this.ba===null){var a=new up;a.Xi=Ms,a.yj=Ms,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},we.cb=function(a,y,x,E,b,z,ee){var re=this.part;if(re!==null&&(re.gk(a,y,x,E,b,z,ee),x===this&&a===Er&&Pl(this)&&Aa(this,re,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 ki),ee=z.undoManager.transactionLevel===0,a.startCondition===lo?ee=!0:a.startCondition===zr&&(ee=!1),ee?(z=new Za,xl(a,z),ee=this.jo.get(a),ee!==null&&ee.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(Da(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Pn&&x===re&&(re.l&16777216)!==0&&re.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)re=x[b],re instanceof Pn&&Sf(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function Aa(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,ee=null;if(z.sourceName!==null){if(ee=LS(z,E,a),ee===null)continue;z.sp(a,ee,x,null)}else if(z.isToModel){var re=y.diagram;re===null||re.skipsModelSourceBindings||z.sp(a,re.model.modelData,x,E)}else{if(re=E.data,re===null)continue;var oe=y.diagram;oe===null||oe.skipsModelSourceBindings||z.sp(a,re,x,E)}ee===a&&(re=E.ks(z.Ai),re!==null&&z.Mv(re,ee,x))}}we.ks=function(a){return this.bindingId===a?this:null},we.g=function(a,y,x){this.cb(Er,a,this,y,x)},we.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 ct);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Ys(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}we.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?qa(a.x,a.y,0,0,0,E.height)<=y||qa(a.x,a.y,0,E.height,E.width,E.height)<=y||qa(a.x,a.y,E.width,E.height,E.width,0)<=y||qa(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},we.se=function(){return!0},we.ca=function(a){var y=$e.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return $e.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),ee=z/2,re=this.naturalBounds;E=this.Df()*E.scale;var oe=1/E;if(re.width*E<b&&re.height*E<b)return a=Ko(x.x-ee*oe,x.y-ee*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),$e.free(y),a}return b=!1,(this instanceof Lo||this instanceof Lr?Ko(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)),$e.free(y),b},we.gh=function(a){var y=this.naturalBounds;return Ko(0,0,y.width,y.height,a.x,a.y)},we.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Xt.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=$e.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)))),$e.free(b),Xt.free(y),E},we.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=$e.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)))),$e.free(b),E},we.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=$e.allocAt(0,0),b=$e.allocAt(0,x.height),z=$e.allocAt(x.width,x.height),ee=$e.allocAt(x.width,0),re=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(ee)))re=!0;else{x=Xt.allocAt(0,0,x.width,x.height);var oe=$e.allocAt(a.x,a.y);x.ca(y.Cd(oe))?re=!0:(oe.h(a.x,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.bottom),x.ca(y.Cd(oe))?re=!0:(oe.h(a.right,a.y),x.ca(y.Cd(oe))&&(re=!0)))),$e.free(oe),Xt.free(x),!re&&(Ie.us(a,E,b)||Ie.us(a,b,z)||Ie.us(a,z,ee)||Ie.us(a,ee,E))&&(re=!0)}return $e.free(E),$e.free(b),$e.free(z),$e.free(ee),re},we.ga=function(a,y){if(y===void 0&&(y=new $e),a instanceof Di){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},we.mi=function(a){a===void 0&&(a=new Xt);var y=this.naturalBounds,x=this.oe,E=$e.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Ka(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Ka(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Ka(a,E.x,E.y,0,0),$e.free(E),a},we.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},we.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},we.qs=function(a,y){return y===void 0&&(y=new $e),y.assign(a),this.oe.Cd(y),y},we.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},we.Sj=function(a,y,x,E,b){var z=this.transform,ee=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ee,oe=-z.m12*ee,le=-z.m21*ee,he=z.m11*ee,ge=ee*(z.m21*z.dy-z.m22*z.dx),ye=ee*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Ie.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ee=a*re+y*le+ge,a=a*oe+y*he+ye,y=x*re+E*le+ge,x=x*oe+E*he+ye,b.h(0,0),E=this.naturalBounds,x=Ie.Ff(0,0,E.width,E.height,ee,a,y,x,b),b.transform(z),x)},xt.prototype.measure=function(a,y,x,E){if(nh(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 ee=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+ee:a,y=isFinite(b.width)?b.width+ee:y):(a=isFinite(b.width)?b.width+ee:a,y=isFinite(b.height)?b.height+ee:y),b=x||0,ee=E||0;var re=this instanceof Pn;switch(gu(this,!0)){case fn:ee=b=0,re&&(y=a=1/0);break;case yn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ee=y);break;case Mi:isFinite(a)&&a>x&&(b=a),ee=0,re&&(y=1/0);break;case Hi:isFinite(y)&&y>E&&(ee=y),b=0,re&&(a=1/0)}re=this.maxSize;var oe=this.minSize;b>re.width&&oe.width<re.width&&(b=re.width),ee>re.height&&oe.height<re.height&&(ee=re.height),x=Math.max(b,oe.width),E=Math.max(ee,oe.height),re.width<x&&(x=Math.min(oe.width,x)),re.height<E&&(E=Math.min(oe.height,E)),a=Math.min(re.width,a),y=Math.min(re.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()||Rt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Bs(this,!1)}},xt.prototype.Wl=function(){},xt.prototype.Dd=function(){return!1},xt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Xt.alloc();z.assign(this.Ib),this.Ib.ka(),eu(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&&pd(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 Sa&&(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()||Rt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),kc(this,!1),Xt.free(z)},we=xt.prototype,we.eh=function(){};function Kl(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 ee=x.top+x.bottom;switch(x=z.width+y,z=z.height+ee,E+=y,b+=ee,y=gu(a,!0),x===E&&z===b&&(y=fn),y){case fn:(x>E||z>b)&&(Bs(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case yn:Bs(a,!0),a.measure(E,b,0,0);break;case Mi:Bs(a,!0),a.measure(E,z,0,0);break;case Hi:Bs(a,!0),a.measure(x,b,0,0)}}}we.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Rv(x,!0),this.N(),vs(a,y)||(x.oh(),this.Pn(x)))},we.Pn=function(a){this.portId!==null&&(Rv(a,!0),a instanceof Jn&&Z1(a,this))},we.gc=function(a,y){if(!uh(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 Pn&&pd(this),ee=this.Ib;if(z){var re=this.Ib,oe=this.dc,le=this.areaBackground,he=this.Ma;le===null&&he===null||a.yc(),le!==null&&(hs(this,a,le,!0,!0,oe,re),le instanceof Qo&&le.type===dh?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(le)):a.fillRect(re.x,re.y,re.width,re.height)),he!==null&&(hs(this,a,he,!0,!1,oe,re),he instanceof Qo&&he.type===dh?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(he)):a.fillRect(re.x,re.y,re.width,re.height)),this.hh(a,y)}if(!z&&(z||ee.width!==0&&ee.height!==0&&!isNaN(ee.x)&&!isNaN(ee.y))){z=this.transform,re=this.panel,this.l&4096&&fl(this),le=this.part,oe=!1;var ge=0;le&&y.Gf("drawShadows")&&(oe=le.isShadowed)&&(he=le.shadowOffset,ge=Math.max(he.y,he.x)*y.scale*y.Mb),he=this.Dd();var ye;if(!(ye=y.$i||!he)){var xe=this.naturalBounds;ye=this.wh;var Ee=ye.m11,Ne=ye.m21,Ye=ye.dx,je=ye.m12,nt=ye.m22,ot=ye.dy,ut,vt=ut=0;ye=ut*Ee+vt*Ne+Ye;var Dt=ut*je+vt*nt+ot;ut=xe.width+ge,vt=0;var Wn=ut*Ee+vt*Ne+Ye;ut=ut*je+vt*nt+ot,vt=Math.min(ye,Wn);var vi=Math.min(Dt,ut),si=Math.max(ye+0,Wn)-vt,Mn=Math.max(Dt+0,ut)-vi;ye=vt,Dt=vi,ut=xe.width+ge,vt=xe.height+ge,Wn=ut*Ee+vt*Ne+Ye,ut=ut*je+vt*nt+ot,vt=Math.min(ye,Wn),vi=Math.min(Dt,ut),si=Math.max(ye+si,Wn)-vt,Mn=Math.max(Dt+Mn,ut)-vi,ye=vt,Dt=vi,ut=0,vt=xe.height+ge,Wn=ut*Ee+vt*Ne+Ye,ut=ut*je+vt*nt+ot,vt=Math.min(ye,Wn),vi=Math.min(Dt,ut),si=Math.max(ye+si,Wn)-vt,Mn=Math.max(Dt+Mn,ut)-vi,ye=vt,Dt=vi,ge=y.viewportBounds,xe=ge.x,Ee=ge.y,ye=!(ye>ge.width+xe||xe>si+ye||Dt>ge.height+Ee||Ee>Mn+Dt)}if(ye){if(ye=(this.l&256)!==0,a.clipInsteadOfFill&&(ye=!1),this instanceof Sa&&(a.font=this.font),ye){if(Dt=re.se()?re.naturalBounds:re.actualBounds,si=Math.max(ee.x,Dt.x),Mn=Math.max(ee.y,Dt.y),ge=Math.min(ee.right,Dt.right)-si,xe=Math.min(ee.bottom,Dt.bottom)-Mn,Ee=this.tb,Ee!==null&&(si=Ee.x,Mn=Ee.y,ge=Ee.width,xe=Ee.height),si>ee.width+ee.x||ee.x>Dt.width+Dt.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(si,Mn,ge,xe),a.clip()}if(he){if(!le.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(Dt=le.shadowOffset,a.Ev(Dt.x*y.scale*this.scale*y.Mb,Dt.y*y.scale*this.scale*y.Mb,le.shadowBlur),Uc(a),a.shadowColor=le.shadowColor)}oe&&this.shadowVisible===!0?Uc(a):oe&&this.shadowVisible===!1&&Nc(a),le=this.naturalBounds,this.areaBackground!==null&&(a.yc(),th(this,a,le,ee)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&sl(this,re)&&this.shadowVisible===null&&Nc(a),this.Ma!==null&&(a.yc(),ku(this,a,le,ee)),oe&&(this.Ma!==null||this.areaBackground!==null||sl(this,re))?(Th(this,!0),this.shadowVisible===null&&Nc(a)):Th(this,!1),this.hh(a,y),oe&&this.l&512&&Uc(a),he&&oe&&Nc(a),ye&&(a.restore(),a.Vc(this instanceof Pn)),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 sl(a,y){return y===null?!1:(pd(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Pn.Auto||y.type===Pn.Spot)&&y.Pb()!==a)}we.Dv=function(){};function th(a,y,x,E){hs(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Qo&&a.areaBackground.type===dh?(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 ku(a,y,x,E){var b=a.kq(),z=x.x,ee=x.y,re=x.width+b,oe=x.height+b;hs(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Qo&&a.Ma.type===dh?(y.beginPath(),y.rect(z-b/2,ee-b/2,re,oe),y.ng(a.Ma)):y.fillRect(z-b/2,ee-b/2,re,oe)}function Il(a,y,x){for(var E=y.O.s,b=E.length,z=-1,ee=0;ee<b;ee++)if(E[ee]===a){z=ee;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===Pn.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 uh(a,y,x){if(!(y instanceof Gu))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&&Il(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),Uc(y),y.shadowColor=a.shadowColor}a instanceof Sa&&(y.font=a.font),y.yd=null;var ee=a.transform;z=a instanceof Pn;var re=a instanceof Pn?pd(a):!1;a.l&4096&&fl(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(hp(y,1,0,0,1,0,0),a.svg=y.ad):z?(hp(y,ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),a.svg=y.ad):hp(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var le=ee.copy().Vj();y.rb.ha=[le.m11,le.m12,le.m21,le.m22,le.dx,le.dy],th(a,y,b,oe),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy]),a.background!==null&&(z?(re&&(y.rb.ha=[ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy]),ku(a,y,b,oe),re&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy],ku(a,y,b,oe)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),ee=y.yd,b=a.part,re=!1,b&&x.Gf("drawShadows")&&(re=b.isShadowed),y.clipInsteadOfFill&&(re=!1),a.Dd()&&re&&Uc(y),re&&a.shadowVisible===!0?Uc(y):re&&a.shadowVisible===!1&&Nc(y),b=a.panel,re&&sl(a,b)&&a.shadowVisible===null&&Nc(y),y.Il&&(le=x.computePixelRatio(),le="drop-shadow("+y.shadowOffsetX/le+"px "+y.shadowOffsetY/le+"px "+y.shadowBlur/le/2+"px "+y.shadowColor+")",a.background!==null&&ee.Ma.setAttributeNS(null,"filter",le),a.areaBackground!==null&&ee.gd.setAttributeNS(null,"filter",le)),re&&(a.Ma!==null||a.areaBackground!==null||sl(a,b))?(Th(a,!0),a.shadowVisible===null&&Nc(y)):Th(a,!1),b=re,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),ee=y.Gv.hs,re=z?a.svg:y.yd,le=a.svg,!z&&le!==null&&re!==le&&le.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),fu(y,le),!0):(a.svg=re,ee!==null&&re===null&&(fm(y),y.nh.pop()),re===null||(a.$o(y,E,oe,re),y.Il&&(x=x.computePixelRatio(),a.Dv(re,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&Uc(y),a.Dd()&&Nc(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&re.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&re.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(re):y.Nj.prepend(re),y.ti=re):E!==null&&Il(a,E,re),ee!==null&&ee(a,re)),!0)}we.$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 ee=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,ee=z.width,x=z.height),z=E.getAttribute("clip-path");var re=null;z!==null&&(re=a.svg.getElementById(z.split("#")[1].slice(0,-1))),re===null?(z="CLIP"+Ll++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ee,height:x}),this instanceof Pn&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),re.appendChild(y),a.svg.appendChild(re),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=re.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",ee.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),fu(a,E)};function fu(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Rl(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=en(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()}}we.hh=function(){},we.lv=function(){this.Uc=!0},we.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 Pn?pd(this):!1;if(!(this instanceof Pn&&b))if(this instanceof mu){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&Xy(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",Jy(a)):y.setAttributeNS(null,"transform",Jy(a))}else if(!x||this instanceof Pn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Lr){z=y.getElementsByTagName("path");for(var ee=0;ee<z.length;ee++)z[ee].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):(ee=E.copy().Vj(),a.rb.ha=[ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy],th(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(ee=y.gd.getAttribute("filter"),ee!==null&&a.ad.setAttribute("filter",ee),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&gm(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(gm(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Pn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),ku(this,a,this.naturalBounds,this.actualBounds),y.Ma?(gm(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&&gm(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},we.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 hs(a,y,x,E,b,z,ee){if(x!==null){var re=1,oe=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===gd)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var le=a.kq();if(re=z.width,oe=z.height,b?(re=ee.width,oe=ee.height):E||(re+=le,oe+=le),(z=y instanceof yf)&&x.xe&&(x.type===xg||x.yk===re&&x.ft===oe))var he=x.xe;else{var ge=0,ye=0,xe=0,Ee=0,Ne=0,Ye=0;if(Ye=Ne=0,b?(Ne=ee.x,Ye=ee.y):E||(Ne-=le/2,Ye-=le/2),ge=x.start.x*re+x.start.offsetX,ye=x.start.y*oe+x.start.offsetY,xe=x.end.x*re+x.end.offsetX,Ee=x.end.y*oe+x.end.offsetY,ge+=Ne,xe+=Ne,ye+=Ye,Ee+=Ye,x.type===Xc)he=y.createLinearGradient(ge,ye,xe,Ee);else if(x.type===dh)Ye=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(Ne=0,Ye=Math.max(re,oe)/2):Ne=x.startRadius,he=y.createRadialGradient(ge,ye,Ne,xe,Ee,Ye);else if(x.type===xg)try{he=y.createPattern(x.pattern,"repeat")}catch(nt){he=null}if(x.type!==xg&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)he.addColorStop(b.key,b.value);if(z&&(x.xe=he,he!==null&&(x.yk=re,x.ft=oe),he===null&&x.type===xg&&x.yk!==-1)){x.yk=-1;var je=a.diagram;je!==null&&x.yk===-1&&Ri(function(){je.redraw()},600)}}E?y.fillStyle=he:y.strokeStyle=he}}}we.rg=function(a){if(a instanceof Pn)e:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break e}y=y.panel}a=!1}else a=!1;return a},we.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},we.If=function(){for(var a=this instanceof Pn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function fl(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){xh(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)}xh(a,!1),hh(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,hh(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,hh(a,!1)))}we.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=$e.alloc();z.yi(y,x,E,b,Oo),a.rotate(this.Kb,z.x,z.y),$e.free(z)}},we.v=function(a){if(!nh(this)){a===void 0&&(a=!1),Bs(this,!0),kc(this,!0);var y=this.panel;y===null||a||y.v()}},we.Uj=function(){nh(this)||(Bs(this,!0),kc(this,!0))};function ql(a){if(!eu(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof Jn&&a.Bd(),y.$b())),kc(a,!0)}}we.Uk=function(){!(this.l&2048)&&(xh(this,!0),hh(this,!0))},we.Wu=function(){hh(this,!0)},we.N=function(){var a=this.part;a!==null&&a.N()};function gu(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Pn.Table?Qh(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Pn.Auto&&E.Pb()===a?ll(a,yn,y):x===dr?E!==null?E.type===Pn.Spot&&E.Pb()===a?ll(a,yn,y):(x=E.defaultStretch,x===dr?ll(a,fn,y):ll(a,x,y)):ll(a,fn,y):ll(a,x,y)}function Qh(a,y,x,E){var b=a.stretch;if(b!==dr)return ll(a,b,E);var z=b=null;switch(y.stretch){case Hi:z=!0;break;case yn:z=!0}switch(x.stretch){case Mi:b=!0;break;case yn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Mi||y===yn),z===null&&(z=y===Hi||y===yn),b===!0&&z===!0?ll(a,yn,E):b===!0?ll(a,Mi,E):z===!0?ll(a,Hi,E):ll(a,fn,E)}function ll(a,y,x){if(x)return y;if(y===fn||(x=a.desiredSize,x.w()))return fn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Mi)return fn;if(y===yn)return Hi}else{if(y===Hi)return fn;if(y===yn)return Mi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Hi)return fn;if(y===yn)return Mi}else{if(y===Mi)return fn;if(y===yn)return Hi}return y}function Th(a,y){a.l=y?a.l|512:a.l&-513}function Pl(a){return(a.l&1024)!==0}function jf(a,y){a.l=y?a.l|1024:a.l&-1025}function xh(a,y){a.l=y?a.l|2048:a.l&-2049}function hh(a,y){a.l=y?a.l|4096:a.l&-4097}function nh(a){return(a.l&8192)!==0}function Bs(a,y){a.l=y?a.l|8192:a.l&-8193}function eu(a){return(a.l&16384)!==0}function kc(a,y){a.l=y?a.l|16384:a.l&-16385}we.Gj=function(){this.svg=null},we.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},we.Av=function(){},we.zv=function(a){return this.pa=a,ql(this),!0},we.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},we.kq=function(){return 0};function mf(a){var y=a.part;if(y instanceof Jn&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Z1(y,a)}}function Uy(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Pn?a instanceof Jn?a.Bd():a.qm(a,function(x){mf(x)}):mf(a))}we.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Cs(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&d1(a)&&Rt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new bn),this.localBindings.add(b),this},we.set=function(a){return Object.assign(this,a),this},we.Du=function(a){return nv(this,a),this},we.apply=function(a){return a(this),this},we.nm=function(a){return ld(this,a),this},we.pz=function(){return this.ih()},we.ih=function(){for(var a=this instanceof Pn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},we.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ki),this.animationTriggers.add(a.propertyName,a),this};function ch(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=gg.I(a);typeof z=="function"?(x=bo(arguments),E=z(x),En(E)||Rt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=It.go[a]}if(E===null&&(b!=null&&b.constructor||Rt("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 kt&&1<x.length){z=E;var ee=x[1];(typeof ee=="string"||ee instanceof HTMLDivElement)&&(Go(z,ee),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Rt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):nv(E,z);return E}function nv(a,y){if(typeof y=="string")if(a instanceof Sa)a.text=y;else if(a instanceof Lr)a.figure=y;else if(a instanceof mu)a.source=y;else if(a instanceof Pn)y=Dh.I(y),y!==null&&(a.type=y);else if(a instanceof Qo){var x=$i(Qo,y);x!==null?a.type=x:Rt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof wt?(y=$i(wt,y),y!==null&&(a.type=y)):a instanceof Ki&&(y=$i(Ki,y),y!==null&&(a.type=y));else if(y instanceof xt)a instanceof Pn||Rt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Ts){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 Ts?Nm(E,y):Rt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Wt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Is)a.type=y;else if(y instanceof Cs)a instanceof xt||a instanceof Ts?a.bind(y):Rt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ms)a instanceof xt?a.Jv(y):Rt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof qr)a instanceof wt&&a.type===wt.o?a.figures.add(y):Rt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Ki)a instanceof qr?a.segments.add(y):Rt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof za)a instanceof kt||a instanceof cr?a.layout=y:Rt("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++)nv(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Qo){x=new Pr;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);ld(a,x)}else if(a instanceof Ts){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Rt("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)&&Rt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Pr;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);ld(a,b)}else ld(a,y);else Rt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function fd(a,y){gg.add(a,y)}function dm(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}Jt.Object.defineProperties(xt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new zf),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 zf),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 zf),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Br(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&&(Br(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:iu},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Rd),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===iu&&(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 Rd),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 Rd),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:rs},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Rd),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:dr},set:function(a){var y=this.stretch;y!==a&&(Br(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&&(Br(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)&&Zi(a,"0 <= value <= 1",xt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(Pf(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(Pf(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(),Uy(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&&Hf(a,"GraphObject.areaBackground"),a instanceof Qo&&a.freeze(),Br(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&&Hf(a,"GraphObject.background"),a instanceof Qo&&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 Ti)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 $e(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&&Rt("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,Uy(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 Lr&&this.qc(),this.g("desiredSize",E,a),Pl(this)&&(a=this.part,a!==null&&(Aa(this,a,"width"),Aa(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 un(a,this.jd.height).freeze(),this.v(),this instanceof Lr&&this.qc(),this.g("desiredSize",y,a),Pl(this)&&(a=this.part,a!==null&&Aa(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 un(this.jd.width,a).freeze(),this.v(),this instanceof Lr&&this.qc(),this.g("desiredSize",y,a),Pl(this)&&(a=this.part,a!==null&&Aa(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Gr},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(),Br(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Ws},set:function(a){var y=this.maxSize;y.D(a)||(a=a.copy(),isNaN(a.width)&&(a.width=1/0),isNaN(a.height)&&(a.height=1/0),a.freeze(),Br(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 Sr(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&&fl(this),this.Ab}},oe:{get:function(){return this.l&4096&&fl(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Br(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:fn},set:function(a){this.reshapingBehavior!==a&&(Br(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()&&Rt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ql(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&&Zi(a,">= 0",xt,"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&&Zi(a,">= 1",xt,"columnSpan"),Br(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&&Zi(a,">= 0",xt,"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&&Zi(a,">= 1",xt,"rowSpan"),Br(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&&(Br(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 Jn||Rt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&Hv(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,K1(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Ms},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),mf(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&Zi(a,">= 0",xt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),mf(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),mf(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&&Zi(a,">= 0",xt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:Ms},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),mf(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&Zi(a,">= 0",xt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),mf(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),mf(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&&Zi(a,">= 0",xt,"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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(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&&(Br(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),xt.prototype.trigger=xt.prototype.Jv,xt.prototype.findBindingPanel=xt.prototype.ih,xt.prototype.findTemplateBinder=xt.prototype.pz,xt.prototype.setProperties=xt.prototype.nm,xt.prototype.apply=xt.prototype.apply,xt.prototype.attach=xt.prototype.Du,xt.prototype.set=xt.prototype.set,xt.prototype.isEnabledObject=xt.prototype.If,xt.prototype.isVisibleObject=xt.prototype.Ed,xt.prototype.isContainedBy=xt.prototype.rg,xt.prototype.getNearestIntersectionPoint=xt.prototype.rs,xt.prototype.getLocalPoint=xt.prototype.qs,xt.prototype.getDocumentScale=xt.prototype.Df,xt.prototype.getDocumentAngle=xt.prototype.li,xt.prototype.getDocumentBounds=xt.prototype.mi,xt.prototype.getDocumentPoint=xt.prototype.ga,xt.prototype.intersectsRect=xt.prototype.Yc,xt.prototype.containedInRect=xt.prototype.fh,xt.prototype.containsRect=xt.prototype.Re,xt.prototype.containsPoint=xt.prototype.ca,xt.prototype.raiseChanged=xt.prototype.g,xt.prototype.raiseChangedEvent=xt.prototype.cb,xt.prototype.addCopyProperty=xt.prototype.Vw;var gg=null;xt.className="GraphObject",gg=new ki,fd("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=ch(Pn,Pn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Pn){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"},ch(Lr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Di(0,0,2.76142374915397,2.761423749153969),spot2:new Di(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 Pn&&(x=E.fb("ButtonBorder"),x instanceof Lr)){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 Pn&&(x=E.fb("ButtonBorder"),x instanceof Lr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Pn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Lr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var ee=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=ee,ee=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=ee,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof Pn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Lr){var z=x.diagram,ee=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=ee}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof Pn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Lr){var z=x.diagram,ee=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=ee}}},y.actionMove=function(x,E){if(E.If()&&E instanceof Pn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Lr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var ee=E._buttonFillPressed;x.fill!==ee&&(x.fill=ee),ee=E._buttonStrokePressed,x.stroke!==ee&&(x.stroke=ee),b.skipsUndoManager=z}}},y}),fd("TreeExpanderButton",function(){var a=ch("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},ch(Lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ta},new Cs("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Cs("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Lo&&(x=x.adornedPart),x instanceof Jn){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}),fd("SubGraphExpanderButton",function(){var a=ch("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},ch(Lr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ta},new Cs("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 Lo&&(x=x.adornedPart),x instanceof cr){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}),fd("ToolTip",function(){return ch(Lo,Pn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new $e(0,3),shadowBlur:5},ch(Lr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Di(0,0,4,6),spot2:new Di(1,1,-4,-4)}))}),fd("ContextMenu",function(){return ch(Lo,Pn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new $e(0,3),shadowBlur:5},new Cs("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),fd("ContextMenuButton",function(){var a=ch("Button");a.stretch=Mi;var y=a.fb("ButtonBorder");return y instanceof Lr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Di(0,0,2,3),y.spot2=new Di(1,1,-2,-2)),a}),fd("PanelExpanderButton",function(a){var y=dm(a,"COLLAPSIBLE"),x=ch("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},ch(Lr,{name:"ButtonIcon",strokeWidth:2},new Cs("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Lr&&(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 ee=b.ih();ee===null&&(ee=b.part),ee!==null&&(b=ee.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),fd("CheckBoxButton",function(a){var y=dm(a);return a=ch("Button",{desiredSize:new un(14,14)},ch(Lr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:yn,geometryStretch:wi,visible:!1},y!==""?new Cs("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Pn){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}),fd("CheckBox",function(a){a=dm(a),a=ch("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new Sr(0,1,0,0)});var y=ch(Pn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new Sr(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}),xt.None=fn=new Wt(xt,"None",0),xt.Default=dr=new Wt(xt,"Default",0),xt.Vertical=Hi=new Wt(xt,"Vertical",4),xt.Horizontal=Mi=new Wt(xt,"Horizontal",5),xt.Fill=yn=new Wt(xt,"Fill",3),xt.Uniform=wi=new Wt(xt,"Uniform",1),xt.UniformToFill=oo=new Wt(xt,"UniformToFill",2),xt.FlipVertical=Dr=new Wt(xt,"FlipVertical",1),xt.FlipHorizontal=Po=new Wt(xt,"FlipHorizontal",2),xt.FlipBoth=aa=new Wt(xt,"FlipBoth",3),xt.make=ch,xt.getBuilders=function(){var a=new ki,y;for(y in gg)if(y!==y.toLowerCase()){var x=gg.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},xt.defineBuilder=fd,xt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=gg.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof xt))return y&&E.set(y),E;Rt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},xt.takeBuilderArgument=dm;function zf(){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=Gr,this.o=Ws,this.hg=dr,this.ob=this.Bi=1,this.Pf=fn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}zf.prototype.copy=function(){var a=new zf;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 Rd(){this.u=-1/0,this.o=0,this.F=rs,this.rr=iu,this.j=this.V="None"}Rd.prototype.copy=function(){var a=new Rd;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},Rd.className="LinkElementSettings";function up(){this.yj=this.Xi=Fs,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}up.prototype.copy=function(){var a=new up;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},up.className="LinkSettings";function vf(){this.ha=[1,0,0,1,0,0]}vf.prototype.copy=function(){var a=new vf;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},vf.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},vf.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},vf.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,ee=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]=ee,this.translate(-y,-x)}},vf.className="STransform";function Gf(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}Gf.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},Gf.className="SGradient";function yc(a,y,x){this.ownerDocument=a=y===void 0?It.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 Gu(this,x)}yc.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},yc.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),En(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},yc.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},yc.prototype.focus=function(){this.Oa.focus()},yc.prototype.mx=function(){this.ownerDocument=null},Jt.Object.defineProperties(yc.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}}}),yc.className="SVGSurface";function Gu(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 vf,this.j=fm(this),this.Nj=fm(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Ll++,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 Yy(a,y,x,E,b,z,ee){a.Nj===void 0?hp(a,y,x,E,b,z,ee):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ee+")")}we=Gu.prototype,we.arc=function(a,y,x,E,b,z,ee,re){var oe=2*Math.PI,le=oe-1e-6,he=x*Math.cos(E),ge=x*Math.sin(E),ye=a+he,xe=y+ge,Ee=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ee-ye)||1e-6<Math.abs(re-xe))&&this.path.push(["L",ye,+xe]),0>E&&(E=E%oe+oe),E>le?(this.path.push(["A",x,x,0,1,Ee,a-he,y-ge]),this.path.push(["A",x,x,0,1,Ee,ye,xe])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Ee,a+x*Math.cos(b),y+x*Math.sin(b)])},we.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},we.Se=function(a){this.addPath(this.path,this.rb,a||0)},we.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},we.clearRect=function(){},we.clip=function(){this.Yl.clipPath=!0},we.closePath=function(){this.path.push(["z"])},we.createLinearGradient=function(a,y,x,E){var b=new Gf("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},we.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"+Ll++,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(gf,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},we.createRadialGradient=function(a,y,x,E,b,z){var ee=new Gf("radial");return ee.x1=a,ee.y1=y,ee.r1=x,ee.x2=E,ee.y2=b,ee.r2=z,ee};function Xy(a,y,x,E,b,z,ee,re,oe){E=re/E,b=oe/b,z===0&&ee===0||a.rb.translate(z,ee),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}we.drawImage=function(a,y,x,E,b,z,ee,re,oe){var le="";a instanceof HTMLCanvasElement&&(le=a.toDataURL()),a instanceof HTMLImageElement&&(le=a.getAttribute("src"));var he=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ee=x,re=E=he,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,Xy(this,y,x,E,b,z||0,ee||0,re,oe),z={x:0,y:0,width:he||E,height:a||b,href:le},Ie.$(E,re)&&Ie.$(b,oe)?le.toLowerCase().indexOf(".svg")===-1&&le.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==he||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),pg(this,gf,z,this.rb),this.addElement(gf,z)},we.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),iv(this,this.Yl)},we.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},we.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},pg(this,"fill",a,this.rb),this.addElement("rect",a)},we.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},pg(this,"fill",a,this.rb),iv(this,a),this.svg.prepend(this.Ud("rect",a))},we.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},pg(this,"fill",y,this.rb),this.addElement("text",y,a[0])},we.lineTo=function(a,y){this.path.push(["L",a,y])},we.moveTo=function(a,y){this.path.push(["M",a,y])},we.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},we.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"])},we.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},we.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())},we.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||hp(this,a,y,x,E,b,z)};function Jy(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}we.scale=function(a,y){this.rb.scale(a,y)},we.translate=function(a,y){this.rb.translate(a,y)},we.transform=function(){},we.yc=function(){},we.stroke=function(){$y(this,this.Yl)},we.jk=function(){this.clipInsteadOfFill||this.stroke()},we.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},we.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 pg(a,y,x,E){y==="fill"?iv(a,x):y==="stroke"&&$y(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function iv(a,y){a.fillStyle instanceof Gf?y.fill=rv(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 Qy(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof Gf?y.setAttributeNS(null,"fill",rv(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 $y(a,y){if(a.strokeStyle instanceof Gf)y.stroke=rv(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 rv(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"+Ll++,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=[],ee=0;ee<y;ee++){var re=b[ee],oe=re.color;re={offset:re.offset,"stop-color":oe},/^rgba\(/.test(oe)&&(oe=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(oe),re["stop-color"]="rgb("+oe[1]+","+oe[2]+","+oe[3]+")",re["stop-opacity"]=oe[4]),z.push(re)}for(z.sort(function(le,he){return le.offset>he.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}we.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=bo(a[b]),ee=[z.shift()];if(ee[0]==="A")ee.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)ee.push(z.shift()+","+z.shift());E.push(ee.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,pg(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var re in a)re!=="transform"&&y.setAttributeNS(null,re,a[re]);else{re=y.getElementsByTagName("path");for(var oe in a)oe!=="transform"&&re[x].setAttributeNS(null,oe,a[oe])}else this.addElement("path",a)};function hp(a,y,x,E,b,z,ee){var re=new vf;re.ha=[y,x,E,b,z,ee],y={},pg(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function fm(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}we.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Nc(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Uc(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}we.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},we.fs=function(){this.Ct=!1},we.Vc=function(){},we.Wx=function(){},Gu.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Gu.prototype.getImageData=function(){return null},Gu.prototype.measureText=function(){return null};function gm(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()))}Gu.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Gu.className="SVGContext",kt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new yc(this,It.document));var y=new yc(this,It.document,!0);a===void 0&&(a=new Pr);var x=this;return Df(this,function(E,b){return E=lm(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},kt.prototype.makeSvg=kt.prototype.Cs,kt.prototype.av=function(a){return this.Cs(a)},kt.prototype.makeSVG=kt.prototype.av;function wh(a,y,x,E){this.ownerDocument=y=y===void 0?It.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new yf(y,x,E),y.H=a}wh.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},wh.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},wh.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},wh.prototype.focus=function(){this.Oa.focus()},wh.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},Jt.Object.defineProperties(wh.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}}}),wh.className="CanvasSurface";function yf(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Rt("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 ct,this.isTemporary=!!x}we=yf.prototype,we.Wx=function(a){this.Z.imageSmoothingEnabled=a},we.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},we.beginPath=function(){this.Z.beginPath()},we.Se=function(){},we.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},we.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},we.clip=function(){this.Z.clip()},we.closePath=function(){this.Z.closePath()},we.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},we.createPattern=function(a,y){return this.Z.createPattern(a,y)},we.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},we.drawImage=function(a,y,x,E,b,z,ee,re,oe){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,ee,re,oe)},we.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},we.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},we.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},we.fillText=function(a,y,x){this.Z.fillText(a,y,x)},we.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},we.lineTo=function(a,y){this.Z.lineTo(a,y)},we.measureText=function(a){return this.Z.measureText(a)},we.moveTo=function(a,y){this.Z.moveTo(a,y)},we.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},we.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},we.restore=function(){this.Z.restore()},we.save=function(){this.yc(),this.Z.save()},yf.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},we=yf.prototype,we.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},we.scale=function(a,y){this.El.scale(a,y)},we.translate=function(a,y){this.El.translate(a,y)},we.stroke=function(){this.Z.stroke()},we.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var ee=this.El,re=ee.m11*a+ee.m21*y;a=ee.m12*a+ee.m22*y,y=ee.m11*x+ee.m21*E,x=ee.m12*x+ee.m22*E,ee.dx=ee.m11*b+ee.m21*z+ee.dx,ee.dy=ee.m12*b+ee.m22*z+ee.dy,ee.m11=re,ee.m12=a,ee.m21=y,ee.m22=x}},we.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},we.ng=function(a,y){if(a instanceof Qo&&a.type===dh){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)},we.jk=function(){this.Hm||this.stroke()},we.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},we.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},we.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(mx),a.lineDashOffset=0)},we.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},we.Hs=function(){},Jt.Object.defineProperties(yf.prototype,{fillStyle:{get:function(){return this.Z.fillStyle},set:function(a){this.ct!==a&&(this.ct=this.Z.fillStyle=a)}},font:{get:function(){return this.Z.font},set:function(a){this.dt!==a&&(this.dt=this.Z.font=a)}},globalAlpha:{get:function(){return this.Z.globalAlpha},set:function(a){this.Z.globalAlpha=a}},lineCap:{get:function(){return this.Z.lineCap},set:function(a){this.Z.lineCap=a}},lineDashOffset:{get:function(){return this.Z.lineDashOffset},set:function(a){this.Z.lineDashOffset=a}},lineJoin:{get:function(){return this.Z.lineJoin},set:function(a){this.Z.lineJoin=a}},lineWidth:{get:function(){return this.Z.lineWidth},set:function(a){this.Z.lineWidth=a}},miterLimit:{get:function(){return this.Z.miterLimit},set:function(a){this.Z.miterLimit=a}},shadowBlur:{get:function(){return this.Z.shadowBlur},set:function(a){this.Z.shadowBlur=a}},shadowColor:{get:function(){return this.Z.shadowColor},set:function(a){this.Z.shadowColor=a}},shadowOffsetX:{get:function(){return this.Z.shadowOffsetX},set:function(a){this.Z.shadowOffsetX=a}},shadowOffsetY:{get:function(){return this.Z.shadowOffsetY},set:function(a){this.Z.shadowOffsetY=a}},strokeStyle:{get:function(){return this.Z.strokeStyle},set:function(a){this.et!==a&&(this.et=this.Z.strokeStyle=a)}},textAlign:{get:function(){return this.Z.textAlign},set:function(a){this.Z.textAlign=a}},imageSmoothingEnabled:{get:function(){return this.Z.imageSmoothingEnabled},set:function(a){this.Z.imageSmoothingEnabled=a}},filter:{get:function(){return this.Z.filter},set:function(a){this.Z.filter=a===""?"none":a}},clipInsteadOfFill:{get:function(){return this.Hm},set:function(a){this.Hm=a}}});var mx=Object.freeze([]);yf.className="CanvasSurfaceContext";function cp(){this.F=this.o=this.u=this.j=0}cp.className="ColorNumbers";function Qo(a,y){Sg||(hv(),Sg=!0),Zo(this),this._isFrozen=!1,a===void 0?(this.na=gd,this.xk="black"):typeof a=="string"?(this.na=gd,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Xc?(this.Qd=Iu,this.Lk=zs):this.Lk=a===dh?this.Qd=Oo:this.Qd=Ms,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Qo.prototype.copy=function(){var a=new Qo;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},we=Qo.prototype,we.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},we.ka=function(){return Object.isFrozen(this)&&Rt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},we.qb=function(a){a.classType===Qo&&(this.type=a)},we.toString=function(){var a="Brush(";if(this.type===gd)a+=this.color;else if(a=this.type===Xc?a+"Linear ":this.type===dh?a+"Radial ":this.type===xg?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+")"},we.addColorStop=function(a,y){return this._isFrozen&&Si(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&Zi(a,"0 <= loc <= 1",Qo,"addColorStop:loc"),this.we===null&&(this.we=new ki),this.we.add(a,y),this.na===gd&&(this.type=Xc),this.xe=null,this},we.Vz=function(a,y){if(this._isFrozen&&Si(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?wg:y,this.type===gd)Yc(this.color),this.color=vg(a,y);else if((this.type===Xc||this.type===dh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Yc(x.value),this.addColorStop(x.key,vg(a,y));return this};function qy(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?wg:x,Yc(a),vg(y,x)}we.Wy=function(a,y){if(this._isFrozen&&Si(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?wg:y,this.type===gd)Yc(this.color),this.color=vg(-a,y);else if((this.type===Xc||this.type===dh)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)Yc(x.value),this.addColorStop(x.key,vg(-a,y));return this};function e1(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?wg:x,Yc(a),vg(-y,x)}function ov(a,y,x){Yc(a),a=ba.j;var E=ba.u,b=ba.o,z=ba.F;return Yc(y),x===void 0&&(x=.5),"rgba("+Math.round((ba.j-a)*x+a)+", "+Math.round((ba.u-E)*x+E)+", "+Math.round((ba.o-b)*x+b)+", "+Math.round((ba.F-z)*x+z)+")"}we.Gx=function(){if(this.type===gd)return mg(this.color);if((this.type===Xc||this.type===dh)&&this.colorStops!==null){var a=this.colorStops;if(this.type===dh)return mg(a.first().value);if(a.get(.5)!==null)return mg(a.get(.5));if(a.count===2)return a=a.Fa(),mg(ov(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var ee=y.key,re=Math.abs(.5-y.key);b>z&&re<b?(x=ee,b=re):z>=b&&re<z&&(E=ee,z=re)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,mg(ov(a.get(x),a.get(E),1-z/b))}return!1};function mg(a){return a?a instanceof Qo?a.Gx():(Yc(a),128>(299*ba.j+587*ba.u+114*ba.o)/1e3):!1}function vg(a,y){switch(y){case wg:y=100*sv(ba.j);var x=100*sv(ba.u),E=100*sv(ba.o);return tu.j=.4124564*y+.3575761*x+.1804375*E,tu.u=.2126729*y+.7151522*x+.072175*E,tu.o=.0193339*y+.119192*x+.9503041*E,tu.F=ba.F,y=uv(tu.j/yg[0]),x=uv(tu.u/yg[1]),E=uv(tu.o/yg[2]),Ac.j=116*x-16,Ac.u=500*(y-x),Ac.o=200*(x-E),Ac.F=tu.F,Ac.j=Math.min(100,Math.max(0,Ac.j+100*a)),a=(Ac.j+16)/116,y=a-Ac.o/200,tu.j=yg[0]*t1(Ac.u/500+a),tu.u=yg[1]*(Ac.j>pm*cv?Math.pow(a,3):Ac.j/pm),tu.o=yg[2]*t1(y),tu.F=Ac.F,a=-.969266*tu.j+1.8760108*tu.u+.041556*tu.o,y=.0556434*tu.j+-.2040259*tu.u+1.0572252*tu.o,ba.j=255*lv((3.2404542*tu.j+-1.5371385*tu.u+-.4985314*tu.o)/100),ba.u=255*lv(a/100),ba.o=255*lv(y/100),ba.F=tu.F,ba.j=Math.round(ba.j),255<ba.j?ba.j=255:0>ba.j&&(ba.j=0),ba.u=Math.round(ba.u),255<ba.u?ba.u=255:0>ba.u&&(ba.u=0),ba.o=Math.round(ba.o),255<ba.o?ba.o=255:0>ba.o&&(ba.o=0),"rgba("+ba.j+", "+ba.u+", "+ba.o+", "+ba.F+")";case n1:return av(),ih.o=Math.min(100,Math.max(0,ih.o+100*a)),"hsla("+ih.j+", "+ih.u+"%, "+ih.o+"%, "+ih.F+")";default:Rt("Unknown color space: "+y)}}function Yc(a){Sg||(hv(),Sg=!0);var y=dv;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,ba.j=a[0],ba.u=a[1],ba.o=a[2],ba.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,ba.j=0,ba.u=0,ba.o=0,ba.F=1)}}function av(){var a=ba.j/255,y=ba.u/255,x=ba.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 ee=a=0;else{switch(E){case a:ee=(y-x)/z%6;break;case y:ee=(x-a)/z+2;break;case x:ee=(a-y)/z+4}ee*=60,0>ee&&(ee+=360),a=z/(1-Math.abs(2*b-1))}ih.j=Math.round(ee),ih.u=Math.round(100*a),ih.o=Math.round(100*b),ih.F=ba.F}function sv(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function lv(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function uv(a){return a>cv?Math.pow(a,1/3):(pm*a+16)/116}function t1(a){var y=a*a*a;return y>cv?y:(116*a-16)/pm}function Hf(a,y){typeof a!="string"&&(a instanceof Qo||Rt("Value for "+y+" must be a color string or a Brush, not "+a))}function hv(){dv=is?new wh(null,void 0,{willReadFrequently:!0}).context:null}Jt.Object.defineProperties(Qo.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Si(this,a),this.na=a,this.start.Mc()&&(a===Xc?this.start=Iu:a===dh&&(this.start=Oo)),this.end.Mc()&&(a===Xc?this.end=zs:a===dh&&(this.end=Oo)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Si(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Si(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Si(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Si(this,a),0>a&&Zi(a,">= zero",Qo,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Si(this,a),0>a&&Zi(a,">= zero",Qo,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Si(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Si(this,a),this.cr=a,this.xe=null}}}),Qo.prototype.isDark=Qo.prototype.Gx,Qo.prototype.darkenBy=Qo.prototype.Wy,Qo.prototype.lightenBy=Qo.prototype.Vz,Qo.prototype.addColorStop=Qo.prototype.addColorStop;var cv=216/24389,pm=24389/27,yg=[95.047,100,108.883],dv=null,ba=new cp,ih=new cp,tu=new cp,Ac=new cp,Sg=!1;Qo.className="Brush";var gd;Qo.Solid=gd=new Wt(Qo,"Solid",0);var Xc;Qo.Linear=Xc=new Wt(Qo,"Linear",1);var dh;Qo.Radial=dh=new Wt(Qo,"Radial",2);var xg;Qo.Pattern=xg=new Wt(Qo,"Pattern",4);var wg;Qo.Lab=wg=new Wt(Qo,"Lab",5);var n1;Qo.HSL=n1=new Wt(Qo,"HSL",6),Qo.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},Qo.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Sg||(hv(),Sg=!0);var y=dv;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)},Qo.lighten=function(a){return qy(a)},Qo.lightenBy=qy,Qo.darken=function(a){return e1(a)},Qo.darkenBy=e1,Qo.mix=ov,Qo.isDark=mg;function Is(){this.xa="Base"}Is.prototype.measure=function(){},Is.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Is.prototype.arrange=function(){},Is.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Is.prototype.iA=function(a){a.Uj()},Is.prototype.gc=function(){},Jt.Object.defineProperties(Is.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Pn}}}),Is.prototype.remeasureObject=Is.prototype.iA,Is.prototype.arrangeElement=Is.prototype.Ly,Is.prototype.measureElement=Is.prototype.Yz,Is.className="PanelLayout";function mm(){this.xa="Base"}Ct(mm,Is),mm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length;a=Jc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===a){var he=le.margin,ge=he.right+he.left;he=he.top+he.bottom,le.measure(y,x,z,ee);var ye=le.measuredBounds;ge=Math.max(ye.width+ge,0),he=Math.max(ye.height+he,0),ye=le.position.x;var xe=le.position.y;isFinite(ye)||(ye=0),isFinite(xe)||(xe=0),le instanceof Lr&&le.isGeometryPositioned&&(le=le.strokeWidth/2,ye-=le,xe-=le),Ka(b,ye,xe,ge,he)}}},mm.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],ee=z.measuredBounds,re=z.margin,oe=z.position.x,le=z.position.y;if(oe=isNaN(oe)?-a:oe-a,le=isNaN(le)?-x:le-x,z instanceof Lr&&z.isGeometryPositioned){var he=z.strokeWidth/2;oe-=he,le-=he}z.visible&&z.arrange(oe+re.left,le+re.top,ee.width,ee.height)}};function vm(){this.xa="Base"}Ct(vm,Is),vm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length;y=Yi(),z=Jc(a);for(var oe=0;oe<re;oe++){var le=E[oe];if(le.visible||le===z){var he=gu(le,!1);if(he!==fn&&he!==Mi)y.push(le);else{le.measure(1/0,x,0,ee),he=le.margin,le=le.measuredBounds;var ge=Math.max(le.height+he.top+he.bottom,0);b.width+=Math.max(le.width+he.right+he.left,0),b.height=Math.max(b.height,ge)}}}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++)oe=y[a],(oe.visible||oe===z)&&(he=oe.margin,re=he.right+he.left,he=he.top+he.bottom,oe.measure(1/0,x,0,ee),oe=oe.measuredBounds,he=Math.max(oe.height+he,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,he));Wi(y)},vm.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,ee=a.isOpposite,re=ee?x.width:b.left,oe=0;oe<E;oe++){var le=z,he=y[oe];if(he.visible){var ge=he.measuredBounds,ye=he.margin,xe=ye.top+ye.bottom,Ee=z+b.bottom,Ne=ge.height,Ye=gu(he,!1);(isNaN(he.desiredSize.height)&&Ye===yn||Ye===Hi)&&(Ne=Math.max(x.height-xe-Ee,0)),xe=Ne+xe+Ee,Ee=he.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=Oo),ee&&(re-=ge.width+ye.left+ye.right),he.arrange(re+Ee.offsetX+ye.left,le+Ee.offsetY+ye.top+(x.height*Ee.y-xe*Ee.y),ge.width,Ne),ee||(re+=ge.width+ye.left+ye.right)}}};function ym(){this.xa="Base"}Ct(ym,Is),ym.prototype.measure=function(a,y,x,E,b,z){var ee=E.length;x=Yi();for(var re=Jc(a),oe=0;oe<ee;oe++){var le=E[oe];if(le.visible||le===re){var he=gu(le,!1);if(he!==fn&&he!==Hi)x.push(le);else{var ge=le.margin;he=ge.right+ge.left,ge=ge.top+ge.bottom,le.measure(y,1/0,z,0),le=le.measuredBounds,El(b,Math.max(b.width,Math.max(le.width+he,0)),b.height+Math.max(le.height+ge,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++)oe=x[a],(oe.visible||oe===re)&&(le=oe.margin,ee=le.right+le.left,le=le.top+le.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,le=Math.max(oe.height+le,0),b.width=Math.max(b.width,Math.max(oe.width+ee,0)),b.height+=le);Wi(x)}},ym.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,ee=a.isOpposite,re=ee?x.height:b.top,oe=0;oe<E;oe++){var le=z,he=y[oe];if(he.visible){var ge=he.measuredBounds,ye=he.margin,xe=ye.left+ye.right,Ee=z+b.right,Ne=ge.width,Ye=gu(he,!1);(isNaN(he.desiredSize.width)&&Ye===yn||Ye===Mi)&&(Ne=Math.max(x.width-xe-Ee,0)),xe=Ne+xe+Ee,Ee=he.alignment,Ee.Xb()&&(Ee=a.defaultAlignment),Ee.sb()||(Ee=Oo),ee&&(re-=ge.height+ye.bottom+ye.top),he.arrange(le+Ee.offsetX+ye.left+(x.width*Ee.x-xe*Ee.x),re+Ee.offsetY+ye.top,Ne,ge.height),ee||(re+=ge.height+ye.bottom+ye.top)}}};function Sm(){this.xa="Base"}Ct(Sm,Is),Sm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length,oe=a.Pb(),le=oe.margin,he=le.right+le.left,ge=le.top+le.bottom;oe.measure(y,x,z,ee);var ye=oe.measuredBounds;z=ye.width,ee=ye.height;var xe=Math.max(z+he,0),Ee=Math.max(ee+ge,0),Ne=a.isClipping,Ye=Xt.allocAt(-le.left,-le.top,xe,Ee),je=Xt.allocAt(0,0,z,ee);fv(oe,je,!0),z=je.width,ee=je.height;for(var nt=!0,ot=Jc(a),ut=0;ut<re;ut++){var vt=E[ut];ye=y;var Dt=x;if(vt!==oe&&(vt.visible||vt===ot)){le=vt.margin;var Wn=le.left,vi=le.top;switch(xe=le.right+le.left,Ee=le.top+le.bottom,le=gu(vt,!1),le){case yn:ye=z,Dt=ee,vi=Wn=Ee=xe=0;break;case Mi:ye=z,Wn=xe=0;break;case Hi:Dt=ee,vi=Ee=0}vt.measure(ye,Dt,0,0),ye=vt.measuredBounds,xe=Math.max(ye.width+xe,0),Ee=Math.max(ye.height+Ee,0),le=vt.alignment,le.Xb()&&(le=a.defaultAlignment),le.sb()||(le=Oo);var si=vt.alignmentFocus;if(si.Xb()&&(si=Oo),Dt=null,vt instanceof Pn&&vt.$e!==""&&(Dt=vt.fb(vt.$e),Dt===vt&&(Dt=null)),Wn=je.x-Wn,vi=je.y-vi,Dt!==null){for(vt.arrange(0,0,ye.width,ye.height),ye=Dt.actualBounds,ye=$e.allocAt(ye.x+(si.x*ye.width-si.offsetX),ye.y+(si.y*ye.height-si.offsetY)),Dt=Dt.panel;Dt!==vt;)Dt.transform.Ga(ye),Dt=Dt.panel;Wn+=le.x*z+le.offsetX-ye.x,vi+=le.y*ee+le.offsetY-ye.y,$e.free(ye)}else Wn+=le.x*z+le.offsetX-(si.x*ye.width+si.offsetX),vi+=le.y*ee+le.offsetY-(si.y*ye.height+si.offsetY);nt?(nt=!1,b.h(Wn,vi,xe,Ee)):Ka(b,Wn,vi,xe,Ee)}}switch(nt?b.assign(Ye):Ne?b.Uu(je.x,je.y,je.width,je.height):Ka(b,Ye.x,Ye.y,Ye.width,Ye.height),Xt.free(Ye),Xt.free(je),le=oe.stretch,le===dr&&(le=gu(oe,!1)),le){case fn:return;case yn:if(!isFinite(y)&&!isFinite(x))return;break;case Mi:if(!isFinite(y))return;break;case Hi:if(!isFinite(x))return}for(ye=oe.measuredBounds,z=ye.width,ee=ye.height,xe=Math.max(z+he,0),Ee=Math.max(ee+ge,0),le=oe.margin,je=Xt.allocAt(-le.left,-le.top,xe,Ee),fv(oe,je,!0),z=je.width,ee=je.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==ot||(le=x.margin,xe=le.right+le.left,Ee=le.top+le.bottom,ye=x.measuredBounds,xe=Math.max(ye.width+xe,0),Ee=Math.max(ye.height+Ee,0),he=x.alignment,he.Xb()&&(he=a.defaultAlignment),he.sb()||(he=Oo),x=x.alignmentFocus,x.Xb()&&(x=Oo),nt?(nt=!1,b.h(he.x*z+he.offsetX-(x.x*ye.width+x.offsetX)-le.left,he.y*ee+he.offsetY-(x.y*ye.height+x.offsetY)-le.top,xe,Ee)):Ka(b,he.x*z+he.offsetX-(x.x*ye.width+x.offsetX)-le.left,he.y*ee+he.offsetY-(x.y*ye.height+x.offsetY)-le.top,xe,Ee));nt?b.assign(Ye):Ne?b.Uu(je.x,je.y,je.width,je.height):Ka(b,Ye.x,Ye.y,Ye.width,Ye.height),Xt.free(je)},Sm.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,ee=z.width,re=z.height,oe=a.padding;z=oe.left,oe=oe.top;var le=z-x.x,he=oe-x.y;for(b.arrange(le,he,ee,re),ee=Xt.allocAt(0,0,ee,re),fv(b,ee,!1),re=0;re<E;re++){var ge=y[re];if(ge!==b){le=ge.measuredBounds;var ye=le.width,xe=le.height;he=ge.alignment,he.Xb()&&(he=a.defaultAlignment),he.sb()||(he=Oo);var Ee=ge.alignmentFocus;if(Ee.Xb()&&(Ee=Oo),le=null,ge instanceof Pn&&ge.$e!==""&&(le=ge.fb(ge.$e),le===ge&&(le=null)),le!==null){var Ne=le.actualBounds;for(Ee=$e.allocAt(Ne.x+(Ee.x*Ne.width-Ee.offsetX),Ne.y+(Ee.y*Ne.height-Ee.offsetY)),le=le.panel;le!==ge;)le.transform.Ga(Ee),le=le.panel;le=he.x*ee.width+he.offsetX-Ee.x,he=he.y*ee.height+he.offsetY-Ee.y,$e.free(Ee)}else le=he.x*ee.width+he.offsetX-(Ee.x*ye+Ee.offsetX),he=he.y*ee.height+he.offsetY-(Ee.y*xe+Ee.offsetY);le+=ee.x-x.x,he+=ee.y-x.y,ge.visible&&ge.arrange(z+le,oe+he,ye,xe)}}Xt.free(ee)};function fv(a,y,x){var E=null;if(a instanceof Pn&&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 xm(){this.xa="Base"}Ct(xm,Is),xm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length,oe=a.Pb(),le=oe.margin,he=y,ge=x,ye=le.right+le.left,xe=le.top+le.bottom;oe.measure(y,x,z,ee),le=oe.measuredBounds;var Ee=0,Ne=null;oe instanceof Lr&&(Ne=oe,Ee=Ne.strokeWidth*Ne.scale);var Ye=Math.max(le.width+ye,0);le=Math.max(le.height+xe,0);var je=vv(oe),nt=je.x*Ye+je.offsetX;je=je.y*le+je.offsetY;var ot=yv(oe),ut=ot.x*Ye+ot.offsetX;for(ot=ot.y*le+ot.offsetY,isFinite(y)&&(he=Math.max(Math.abs(nt-ut)-Ee,0)),isFinite(x)&&(ge=Math.max(Math.abs(je-ot)-Ee,0)),Ee=un.alloc(),Ee.h(0,0),a=Jc(a),ot=0;ot<re;ot++)je=E[ot],je===oe||!je.visible&&je!==a||(le=je.margin,Ye=le.right+le.left,nt=le.top+le.bottom,je.measure(he,ge,0,0),le=je.measuredBounds,Ye=Math.max(le.width+Ye,0),le=Math.max(le.height+nt,0),Ee.h(Math.max(Ye,Ee.width),Math.max(le,Ee.height)));if(re===1)b.width=Ye,b.height=le,un.free(Ee);else{switch(je=vv(oe),ot=yv(oe),re=E=0,ot.x!==je.x&&ot.y!==je.y&&(E=Ee.width/Math.abs(ot.x-je.x),re=Ee.height/Math.abs(ot.y-je.y)),un.free(Ee),Ee=0,Ne!==null&&(Ee=Ne.strokeWidth*Ne.scale,Cv(Ne)===wi&&(E=re=Math.max(E,re))),E+=Math.abs(je.offsetX)+Math.abs(ot.offsetX)+Ee,re+=Math.abs(je.offsetY)+Math.abs(ot.offsetY)+Ee,Ne=oe.stretch,Ne===dr&&(Ne=gu(oe,!1)),Ne){case fn:ee=z=0;break;case yn:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case Mi:isFinite(y)&&(E=y),ee=0;break;case Hi:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ee),b.width=oe.measuredBounds.width+ye,b.height=oe.measuredBounds.height+xe}},xm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Xt.alloc();z.h(0,0,1,1);var ee=E.margin,re=ee.left;ee=ee.top;var oe=a.padding,le=oe.left;oe=oe.top,E.arrange(le+re,oe+ee,b.width,b.height);var he=vv(E),ge=yv(E),ye=he.y*b.height+he.offsetY,xe=ge.x*b.width+ge.offsetX;for(ge=ge.y*b.height+ge.offsetY,z.x=he.x*b.width+he.offsetX,z.y=ye,Ka(z,xe,ge,0,0),z.x+=re+le,z.y+=ee+oe,b=0;b<x;b++)re=y[b],re!==E&&(le=re.measuredBounds,ee=re.margin,oe=Math.max(le.width+ee.right+ee.left,0),he=Math.max(le.height+ee.top+ee.bottom,0),ye=re.alignment,ye.Xb()&&(ye=a.defaultAlignment),ye.sb()||(ye=Oo),oe=z.width*ye.x+ye.offsetX-oe*ye.x+ee.left+z.x,ee=z.height*ye.y+ye.offsetY-he*ye.y+ee.top+z.y,re.visible&&(Ko(z.x,z.y,z.width,z.height,oe,ee,le.width,le.height)?re.arrange(oe,ee,le.width,le.height):re.arrange(oe,ee,le.width,le.height,new Xt(z.x,z.y,z.width,z.height))));Xt.free(z)};function wm(){this.xa="Base",this.name="Table"}Ct(wm,Is),wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ee=Yi(),re=Yi(),oe=0;oe<z;oe++){var le=E[oe],he=le instanceof Pn?le:null;if(he!==null&&pd(he)&&le.visible){re.push(he);for(var ge=he.O.s,ye=ge.length,xe=0;xe<ye;xe++){var Ee=ge[xe];he.type===Pn.TableRow?Ee.row=le.row:he.type===Pn.TableColumn&&(Ee.column=le.column),ee.push(Ee)}}else ee.push(le)}z=ee.length,z===0&&(a.Fb(0),a.Eb(0));for(var Ne=[],Ye=0;Ye<z;Ye++){var je=ee[Ye];je.visible&&(Bs(je,!0),kc(je,!0),Ne[je.row]||(Ne[je.row]=[]),Ne[je.row][je.column]||(Ne[je.row][je.column]=[]),Ne[je.row][je.column].push(je))}Wi(ee);var nt=Yi(),ot=Yi(),ut=Yi(),vt={count:0},Dt={count:0},Wn=y,vi=x,si=a.rowDefs,Mn=a.colDefs,sn=null;z=si.length;for(var hr=0;hr<z;hr++)sn=si[hr],sn!==void 0&&(sn.actual=0);z=Mn.length;for(var Ji=0;Ji<z;Ji++)sn=Mn[Ji],sn!==void 0&&(sn.actual=0);for(var Do=Ne.length,ya=0,Xs=0;Xs<Do;Xs++)Ne[Xs]&&(ya=Math.max(ya,Ne[Xs].length));var tl=Math.min(a.topIndex,Do-1),Ul=Math.min(a.leftIndex,ya-1),Js=0;Do=Ne.length;for(var bd=Jc(a),bs=0;bs<Do;bs++)if(Ne[bs]){ya=Ne[bs].length;var nc=a.Fb(bs);nc.actual=0;for(var Yl=nc.oc=0;Yl<ya;Yl++)if(Ne[bs][Yl]){var Ld=a.Eb(Yl);nt[Yl]===void 0&&(Ld.actual=0,Ld.oc=0,nt[Yl]=!0);for(var ah=Ne[bs][Yl],bh=ah.length,Wu=0;Wu<bh;Wu++){var Au=ah[Wu];if(Au.visible||Au===bd){var $d=1<Au.rowSpan||1<Au.columnSpan;$d&&(bs<tl||Yl<Ul||ot.push(Au));var ic=Au.margin,Wg=ic.right+ic.left,Vu=ic.top+ic.bottom,Xl=Qh(Au,nc,Ld,!1),$p=Au.desiredSize,eg=!isNaN($p.height),wc=!isNaN($p.width)&⪚if($d||Xl===fn||wc||bs<tl||Yl<Ul||(vt[Yl]!==void 0||Xl!==yn&&Xl!==Mi||(vt[Yl]=-1,vt.count++),Dt[bs]!==void 0||Xl!==yn&&Xl!==Hi||(Dt[bs]=-1,Dt.count++),ut.push(Au)),Au.measure(1/0,1/0,0,0),!(bs<tl||Yl<Ul)){var Bu=Au.measuredBounds,Mf=Math.max(Bu.width+Wg,0),Ku=Math.max(Bu.height+Vu,0);if(Au.rowSpan===1&&(Xl===fn||Xl===Mi)){sn=a.Fb(bs);var qd=sn.Wc();Js=Math.max(Ku-sn.actual,0),Js+qd>vi&&(Js=Math.max(vi-qd,0));var W0=sn.oa===0;sn.oc=sn.oc+Js,sn.actual=sn.oa+Js,vi=Math.max(vi-(Js+(W0?qd:0)),0)}if(Au.columnSpan===1&&(Xl===fn||Xl===Hi)){sn=a.Eb(Yl);var qp=sn.Wc();Js=Math.max(Mf-sn.actual,0),Js+qp>Wn&&(Js=Math.max(Wn-qp,0));var zy=sn.oa===0;sn.oc=sn.oc+Js,sn.actual=sn.oa+Js,Wn=Math.max(Wn-(Js+(zy?qp:0)),0)}$d&&Au.Uj()}}}}}Wi(nt);var zc=0,qc=0;z=a.columnCount;for(var tg=0;tg<z;tg++){var ef=Mn[tg];ef!==void 0&&(zc+=isNaN(ef.Hc)?ef.oc:ef.Hc,ef.oc!==0&&(zc+=ef.Wc()))}z=a.rowCount;for(var Vg=0;Vg<z;Vg++){var tf=si[Vg];tf!==void 0&&(qc+=isNaN(tf.Hc)?tf.oc:tf.Hc,tf.oc!==0&&(qc+=tf.Wc()))}Wn=Math.max(y-zc,0);var Gc=vi=Math.max(x-qc,0),Md=Wn;z=ut.length;for(var Tu=0;Tu<z;Tu++){var Pc=ut[Tu],V0=a.Fb(Pc.row),ed=a.Eb(Pc.column),Kg=Pc.measuredBounds,rc=Pc.margin,Ff=rc.right+rc.left,Ec=rc.top+rc.bottom;vt[Pc.column]=ed.oc===0&&vt[Pc.column]!==void 0?Math.max(Kg.width+Ff,vt[Pc.column]):null,Dt[Pc.row]=V0.oc===0&&Dt[Pc.row]!==void 0?Math.max(Kg.height+Ec,Dt[Pc.row]):null}var ng=0,Ug=0,zh;for(zh in Dt)zh!=="count"&&(ng+=Dt[zh]);for(zh in vt)zh!=="count"&&(Ug+=vt[zh]);for(var pl=un.alloc(),em=0;em<z;em++){var lu=ut[em];if(lu.visible||lu===bd){var Ls=a.Fb(lu.row),uu=a.Eb(lu.column),td=0;isFinite(uu.width)?td=uu.width:(isFinite(Wn)&&vt[lu.column]!==null?Ug===0?td=uu.actual+Wn:td=vt[lu.column]/Ug*Md:vt[lu.column]!==null?td=Wn:td=uu.actual||Wn,td=Math.max(0,td-uu.Wc()));var Fd=0;switch(isFinite(Ls.height)?Fd=Ls.height:(isFinite(vi)&&Dt[lu.row]!==null?ng===0?Fd=Ls.actual+vi:Fd=Dt[lu.row]/ng*Gc:Dt[lu.row]!==null?Fd=vi:Fd=Ls.actual||vi,Fd=Math.max(0,Fd-Ls.Wc())),pl.h(Math.max(uu.minimum,Math.min(td,uu.maximum)),Math.max(Ls.minimum,Math.min(Fd,Ls.maximum))),Xl=Qh(lu,Ls,uu,!1),Xl){case Mi:pl.height=Math.max(pl.height,Ls.actual+vi);break;case Hi:pl.width=Math.max(pl.width,uu.actual+Wn)}var kf=lu.margin,Gy=kf.right+kf.left,K0=kf.top+kf.bottom;lu.Uj(),lu.measure(pl.width,pl.height,uu.minimum,Ls.minimum);var Yg=lu.measuredBounds,Nf=Math.max(Yg.width+Gy,0),ig=Math.max(Yg.height+K0,0);isFinite(Wn)&&(Nf=Math.min(Nf,pl.width)),isFinite(vi)&&(ig=Math.min(ig,pl.height));var Du=0;Du=Ls.actual,Ls.actual=Math.max(Ls.actual,ig),Ls.oc=Math.max(Ls.oc,ig),Js=Ls.actual-Du,vi=Math.max(vi-Js,0),Dt[lu.row]===null&&(Gc=Math.max(Gc-Js,0)),Du=uu.actual,uu.actual=Math.max(uu.actual,Nf),uu.oc=Math.max(uu.oc,Nf),Js=uu.actual-Du,Wn=Math.max(Wn-Js,0),vt[lu.column]===null&&(Md=Math.max(Md-Js,0))}}Wi(ut);var nd=un.alloc(),oc=Yi(),vh=Yi();if(z=ot.length,z!==0){for(var nf=0;nf<Do;nf++)if(Ne[nf]){ya=Ne[nf].length;var Xg=a.Fb(nf);oc[nf]=Xg.actual;for(var rf=0;rf<ya;rf++)if(Ne[nf][rf]){var U0=a.Eb(rf);vh[rf]=U0.actual}}}for(var Jg=0;Jg<z;Jg++){var gs=ot[Jg];if(gs.visible||gs===bd){var Gh=a.Fb(gs.row),Lh=a.Eb(gs.column);switch(pl.h(Math.max(Lh.minimum,Math.min(y,Lh.maximum)),Math.max(Gh.minimum,Math.min(x,Gh.maximum))),Xl=Qh(gs,Gh,Lh,!1),Xl){case yn:vh[Lh.index]!==0&&(pl.width=Math.min(pl.width,vh[Lh.index])),oc[Gh.index]!==0&&(pl.height=Math.min(pl.height,oc[Gh.index]));break;case Mi:vh[Lh.index]!==0&&(pl.width=Math.min(pl.width,vh[Lh.index]));break;case Hi:oc[Gh.index]!==0&&(pl.height=Math.min(pl.height,oc[Gh.index]))}isFinite(Lh.width)&&(pl.width=Lh.width),isFinite(Gh.height)&&(pl.height=Gh.height),nd.h(0,0);for(var Y0=Lh.minimum,Uu=Gh.minimum,kd=1;kd<gs.rowSpan&&!(gs.row+kd>=a.rowCount);kd++)sn=a.Fb(gs.row+kd),Js=0,Js=Xl===yn||Xl===Hi?Math.max(sn.minimum,oc[gs.row+kd]===0?sn.maximum:Math.min(oc[gs.row+kd],sn.maximum)):Math.max(sn.minimum,isNaN(sn.Hc)?sn.maximum:Math.min(sn.Hc,sn.maximum)),nd.height+=Js,Uu+=sn.minimum;for(var Mh=1;Mh<gs.columnSpan&&!(gs.column+Mh>=a.columnCount);Mh++)sn=a.Eb(gs.column+Mh),Js=0,Js=Xl===yn||Xl===Mi?Math.max(sn.minimum,vh[gs.column+Mh]===0?sn.maximum:Math.min(vh[gs.column+Mh],sn.maximum)):Math.max(sn.minimum,isNaN(sn.Hc)?sn.maximum:Math.min(sn.Hc,sn.maximum)),nd.width+=Js,Y0+=sn.minimum;pl.width+=nd.width,pl.height+=nd.height;var Qg=gs.margin,of=Qg.right+Qg.left,tm=Qg.top+Qg.bottom;gs.measure(pl.width,pl.height,Y0,Uu);for(var $g=gs.measuredBounds,Cc=Math.max($g.width+of,0),Af=Math.max($g.height+tm,0),af=0,qg=0;qg<gs.rowSpan&&!(gs.row+qg>=a.rowCount);qg++)sn=a.Fb(gs.row+qg),af+=sn.total||0;if(af<Af){var Nd=Af-af,Hc=Af-af;if(gs.spanAllocation!==null)for(var Ad=gs.spanAllocation,id=0;id<gs.rowSpan&&!(0>=Nd)&&!(gs.row+id>=a.rowCount);id++){sn=a.Fb(gs.row+id);var Bd=sn.oa||0,Bf=Ad(gs,sn,Hc);sn.actual=Math.min(sn.maximum,Bd+Bf),sn.oa!==Bd&&(Nd-=sn.oa-Bd)}for(;0<Nd;){var ac=sn.oa||0;if(isNaN(sn.height)&&sn.maximum>ac&&(sn.actual=Math.min(sn.maximum,ac+Nd),sn.oa!==ac&&(Nd-=sn.oa-ac)),sn.index===0)break;sn=a.Fb(sn.index-1)}}for(var rg=0,Td=0;Td<gs.columnSpan&&!(gs.column+Td>=a.columnCount);Td++)sn=a.Eb(gs.column+Td),rg+=sn.total||0;if(rg<Cc){var og=Cc-rg,Hy=Cc-rg;if(gs.spanAllocation!==null)for(var rd=gs.spanAllocation,Tf=0;Tf<gs.columnSpan&&!(0>=og)&&!(gs.column+Tf>=a.columnCount);Tf++){sn=a.Eb(gs.column+Tf);var nm=sn.oa||0,Zy=rd(gs,sn,Hy);sn.actual=Math.min(sn.maximum,nm+Zy),sn.oa!==nm&&(og-=sn.oa-nm)}for(;0<og;){var X0=sn.oa||0;if(isNaN(sn.width)&&sn.maximum>X0&&(sn.actual=Math.min(sn.maximum,X0+og),sn.oa!==X0&&(og-=sn.oa-X0)),sn.index===0)break;sn=a.Eb(sn.index-1)}}}}Wi(ot),un.free(nd),un.free(pl),oc!==void 0&&Wi(oc),vh!==void 0&&Wi(vh);var ag=0,sg=0,J0=a.desiredSize,gx=a.maxSize;Xl=gu(a,!0);var im=qc=zc=0,rm=0;z=a.columnCount;for(var Q0=0;Q0<z;Q0++)Mn[Q0]!==void 0&&(sn=a.Eb(Q0),isFinite(sn.width)?(im+=sn.width,im+=sn.Wc()):Am(sn)===pp?(im+=sn.oa,im+=sn.Wc()):sn.oa!==0&&(zc+=sn.oa,zc+=sn.Wc()));isFinite(J0.width)?ag=Math.min(J0.width,gx.width):ag=Xl!==fn&&isFinite(y)?y:zc,ag=Math.max(ag,a.minSize.width),ag=Math.max(ag-im,0);for(var Qx=zc===0?1:Math.max(ag/zc,1),$0=0;$0<z;$0++)Mn[$0]!==void 0&&(sn=a.Eb($0),isFinite(sn.width)||Am(sn)===pp||(sn.actual=sn.oa*Qx),sn.position=b.width,sn.oa!==0&&(b.width+=sn.oa,b.width+=sn.Wc()));z=a.rowCount;for(var q0=0;q0<z;q0++)si[q0]!==void 0&&(sn=a.Fb(q0),isFinite(sn.height)?(rm+=sn.height,rm+=sn.Wc()):Am(sn)===pp?(rm+=sn.oa,rm+=sn.Wc()):sn.oa!==0&&(qc+=sn.oa,qc+=sn.Wc()));isFinite(J0.height)?sg=Math.min(J0.height,gx.height):sg=Xl!==fn&&isFinite(x)?x:qc,sg=Math.max(sg,a.minSize.height),sg=Math.max(sg-rm,0);for(var $x=qc===0?1:Math.max(sg/qc,1),ev=0;ev<z;ev++)si[ev]!==void 0&&(sn=a.Fb(ev),isFinite(sn.height)||Am(sn)===pp||(sn.actual=sn.oa*$x),sn.position=b.height,sn.oa!==0&&(b.height+=sn.oa,b.height+=sn.Wc()));z=re.length;for(var Wy=0;Wy<z;Wy++){var om=re[Wy],Vy=0,Ky=0;om.type===Pn.TableRow?(Vy=b.width,sn=a.Fb(om.row),Ky=sn.actual):(sn=a.Eb(om.column),Vy=sn.actual,Ky=b.height),om.measuredBounds.h(0,0,Vy,Ky),Bs(om,!1)}Wi(re),a.inRowsCols=Ne},wm.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var ee=a.inRowsCols;if(ee!==null){for(var re,oe,le=ee.length,he=0,ge=0;ge<le;ge++)ee[ge]&&(he=Math.max(he,ee[ge].length));oe=a.rowDefs,re=a.colDefs;var ye=ge=0,xe=Math.min(a.topIndex,le-1);if(0<oe.length){for(;xe!==le&&(oe[xe]===void 0||oe[xe].oa===0);)xe++;xe=Math.max(Math.min(xe,le-1),0),ge=-oe[xe].position}var Ee=Math.min(a.leftIndex,he-1);if(0<re.length){for(;Ee!==he&&(re[Ee]===void 0||re[Ee].oa===0);)Ee++;Ee=Math.max(Math.min(Ee,he-1),0),ye=-re[Ee].position}for(var Ne=0,Ye=0;Ne!==le&&oe[Ne]===void 0;)Ne++;for(;Ye!==le&&re[Ye]===void 0;)Ye++;he=a.part,a.Fb(Ne),a.Eb(Ye);for(var je=0;je<y.length;je++){var nt=y[je];if(nt instanceof Pn&&nt.visible&&pd(nt)){if(nt.type===Pn.TableRow){re=a.Fb(nt.row);var ot=a.Eb(Ye)}else re=a.Fb(Ne),ot=a.Eb(nt.column);oe=re.position+ge+b,re.oa!==0&&(oe+=re.Io(Math.max(Ne,xe))),re=ot.position+ye+z,ot.oa!==0&&(re+=ot.Io(Math.max(Ye,Ee))),ot=nt.measuredBounds,nt.Uk(),nt.actualBounds.ka();var ut=nt.actualBounds,vt=Xt.allocAt(ut.x,ut.y,ut.width,ut.height);ut.x=nt.type===Pn.TableRow?z:re,ut.y=nt.type===Pn.TableColumn?b:oe,ut.width=ot.width,ut.height=ot.height,nt.actualBounds.freeze(),kc(nt,!1),vs(vt,ut)||he===null||(he.oh(),nt.Pn(he)),Xt.free(vt)}}for(je=un.alloc(),nt=0;nt<le;nt++)if(ee[nt]){for(he=ee[nt].length,ot=a.Fb(nt),oe=ot.position+ge+b,ot.oa!==0&&(oe+=ot.Io(Math.max(Ne,xe))),ut=0;ut<he;ut++)if(ee[nt][ut]){vt=a.Eb(ut),re=vt.position+ye+z,vt.oa!==0&&(re+=vt.Io(Math.max(Ye,Ee)));for(var Dt=ee[nt][ut],Wn=Dt.length,vi=0;vi<Wn;vi++){var si=Dt[vi],Mn=si.measuredBounds;je.h(0,0);for(var sn=1;sn<si.rowSpan&&!(nt+sn>=a.rowCount);sn++){var hr=a.Fb(nt+sn);hr.oa!==0&&(je.height+=hr.total)}for(sn=1;sn<si.columnSpan&&!(ut+sn>=a.columnCount);sn++)hr=a.Eb(ut+sn),hr.oa!==0&&(je.width+=hr.total);var Ji=vt.oa+je.width,Do=ot.oa+je.height;sn=re,hr=oe;var ya=Ji,Xs=Do,tl=re,Ul=oe,Js=Ji,bd=Do;re+Ji>x.width&&(Js=Math.max(x.width-re,0)),oe+Do>x.height&&(bd=Math.max(x.height-oe,0));var bs=si.alignment;if(bs.Xb()){bs=a.defaultAlignment,bs.sb()||(bs=Oo);var nc=bs.x,Yl=bs.y,Ld=bs.offsetX;bs=bs.offsetY;var ah=vt.alignment,bh=ot.alignment;ah.sb()&&(nc=ah.x,Ld=ah.offsetX),bh.sb()&&(Yl=bh.y,bs=bh.offsetY)}else nc=bs.x,Yl=bs.y,Ld=bs.offsetX,bs=bs.offsetY;(isNaN(nc)||isNaN(Yl))&&(Yl=nc=.5,bs=Ld=0),ah=Mn.width,bh=Mn.height;var Wu=si.margin,Au=Wu.left+Wu.right,$d=Wu.top+Wu.bottom,ic=Qh(si,ot,vt,!1);!isNaN(si.desiredSize.width)||ic!==yn&&ic!==Mi||(ah=Math.max(Ji-Au,0)),!isNaN(si.desiredSize.height)||ic!==yn&&ic!==Hi||(bh=Math.max(Do-$d,0)),Ji=si.maxSize,Do=si.minSize,ah=Math.min(Ji.width,ah),bh=Math.min(Ji.height,bh),ah=Math.max(Do.width,ah),bh=Math.max(Do.height,bh),Ji=bh+$d,sn+=ya*nc-(ah+Au)*nc+Ld+Wu.left,hr+=Xs*Yl-Ji*Yl+bs+Wu.top,si.visible&&(Ko(tl,Ul,Js,bd,sn,hr,Mn.width,Mn.height)?si.arrange(sn,hr,ah,bh):si.arrange(sn,hr,ah,bh,new Xt(tl,Ul,Js,bd)))}}}for(un.free(je),a=0;a<E;a++)x=y[a],z=x instanceof Pn?x:null,z!==null&&pd(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Pm(){this.xa="Base"}Ct(Pm,Is),Pm.prototype.measure=function(){},Pm.prototype.arrange=function(){};function Em(){this.xa="Base"}Ct(Em,Is),Em.prototype.measure=function(){},Em.prototype.arrange=function(){};function Cm(){this.xa="Base"}Ct(Cm,Is),Cm.prototype.measure=function(a,y,x,E,b,z,ee){1<E.length&&Rt("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,ee);var re=E.measuredBounds,oe=E.margin,le=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var he=E.scale,ge=re.width;re=re.height;var ye=Math.max(y-le,0),xe=Math.max(x-oe,0),Ee=1;a.viewboxStretch===wi?ge!==0&&re!==0&&(Ee=Math.min(ye/ge,xe/re)):ge!==0&&re!==0&&(Ee=Math.max(ye/ge,xe/re)),Ee===0&&(Ee=1e-4),E.Ca*=Ee,he!==E.scale&&(Bs(E,!0),E.measure(1/0,1/0,z,ee))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+le,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Cm.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 ee=y.alignment;ee.Xb()&&(ee=a.defaultAlignment),ee.sb()||(ee=Oo),y.arrange(x.width*ee.x-z*ee.x+ee.offsetX,x.height*ee.y-b*ee.y+ee.offsetY,E.width,E.height)};function dp(){this.xa="Base"}Ct(dp,Is),dp.prototype.measure=function(){},dp.prototype.arrange=function(){},dp.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,ee=a.actualBounds,re=z.width,oe=z.height,le=Math.ceil(re/b),he=Math.ceil(oe/E),ge=a.gridOrigin,ye=ge.x;ge=ge.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var xe=[],Ee=a.O.s,Ne=Ee.length,Ye=0;Ye<Ne;Ye++){var je=Ee[Ye],nt=[];if(xe.push(nt),je.visible){var ot=je.interval;if(!(0>ot)){je=pv(je.figure);for(var ut=0;ut<Ne;ut++)if(ut!==Ye){var vt=Ee[ut];vt.visible&&pv(vt.figure)===je&&(vt=vt.interval,vt>ot&&nt.push(vt))}}}}for(Ee=a.O.s,Ne=Ee.length,Ye=0;Ye<Ne;Ye++){var Dt=Ee[Ye];if(Dt.visible&&(nt=Dt.interval||1,je=Math.abs(nt),!(2>b*je*x))){if(ot=Dt.segmentIndex,(!isFinite(ot)||isNaN(ot))&&(ot=0),0>ot&&(ot=je-Math.min(-ot,je)),ot=Math.round(ot%je),je=Dt.opacity,ut=1,je!==1){if(je===0)continue;ut=y.globalAlpha,y.globalAlpha=ut*je}vt=xe[Ye];var Wn=!1,vi=Dt.strokeDashArray;if(vi!==null&&(Wn=!0,y.js(vi,Dt.strokeDashOffset)),Dt.figure==="LineV"&&Dt.stroke!==null&&0<Dt.strokeWidth){for(y.lineWidth=Dt.strokeWidth,hs(a,y,Dt.stroke,!1,!1,z,ee),y.beginPath(),vi=Dt=Math.floor((ye-b)/b);vi<=Dt+le;vi++){var si=vi*b+ye;0<=si&&si<=re&&bm(vi,nt,ot,vt)&&(y.moveTo(si,0),y.lineTo(si,oe))}y.stroke(),y.Se()}else if(Dt.figure==="LineH"&&Dt.stroke!==null&&0<Dt.strokeWidth){for(y.lineWidth=Dt.strokeWidth,hs(a,y,Dt.stroke,!1,!1,z,ee),y.beginPath(),vi=Dt=Math.floor((ge-E)/E);vi<=Dt+he;vi++)si=vi*E+ge,0<=si&&si<=oe&&bm(vi,nt,ot,vt)&&(y.moveTo(0,si),y.lineTo(re,si));y.stroke(),y.Se()}else if(Dt.figure==="BarV"&&Dt.fill!==null)for(hs(a,y,Dt.fill,!0,!1,z,ee),Dt=Dt.width,isNaN(Dt)&&(Dt=b),si=vi=Math.floor((ye-b)/b);si<=vi+le;si++){var Mn=si*b+ye;0<=Mn+Dt&&Mn<=re&&bm(si,nt,ot,vt)&&y.fillRect(Mn,0,Dt,oe)}else if(Dt.figure==="BarH"&&Dt.fill!==null)for(hs(a,y,Dt.fill,!0,!1,z,ee),Dt=Dt.height,isNaN(Dt)&&(Dt=E),si=vi=Math.floor((ge-E)/E);si<=vi+he;si++)Mn=si*E+ge,0<=Mn+Dt&&Mn<=oe&&bm(si,nt,ot,vt)&&y.fillRect(0,Mn,re,Dt);Wn&&y.fs(),je!==1&&(y.globalAlpha=ut)}}y.restore(),y.Vc(!1)};function bm(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 Lm(){this.xa="Base"}Ct(Lm,Is),Lm.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Lo||a instanceof Fn){var ee=null,re=null;if(a instanceof Fn&&(ee=a),a instanceof Lo&&(re=a,ee=re.adornedPart,a.j===null&&(a.j=[])),ee instanceof Fn){var oe=ee;if(z===0)El(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var le=a instanceof Lo?null:ee.path;y=ee.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var he=oe.points,ge=ee.pointsCount;re!==null?re.Ul(!1):ee!==null&&ee.Ul(!1),re=y.width;var ye=y.height,xe=a.j;if(xe.length=0,le!==null){i1(a,re,ye,le);var Ee=le.measuredBounds;x.ed(Ee),xe.push(Ee)}Ee=ct.alloc();for(var Ne=$e.alloc(),Ye=$e.alloc(),je=0;je<z;je++){var nt=E[je];if(nt!==le)if(nt.isPanelMain&&nt instanceof Lr){i1(a,re,ye,nt);var ot=nt.measuredBounds;x.ed(ot),xe.push(ot)}else if(2>ge)nt.measure(1/0,1/0,0,0),ot=nt.measuredBounds,x.ed(ot),xe.push(ot);else{var ut=nt.segmentIndex,vt=nt.segmentFraction,Dt=nt.alignmentFocus;Dt.Mc()&&(Dt=Oo);var Wn=nt.segmentOrientation,vi=nt.segmentOffset;if(isNaN(ut)){var si=oe.ua;ot=Yi(),si.Qu(vt,ot);var Mn=$e.allocAt(ot[0],ot[1]);if(Mn.add(oe.i(0)),si.type===wt.j?Mn.offset(-si.startX,-si.startY):(si=si.figures.first(),si!==null&&Mn.offset(-si.startX,-si.startY)),si=ot[2],Wn!==iu){var sn=oe.computeAngle(nt,Wn,si);nt.Kb=sn}sn=Mn.x-y.x;var hr=Mn.y-y.y;$e.free(Mn),Wi(ot)}else if(ut<-ge||ut>=ge)ot=$e.alloc(),oe.vg(),oe.computeMidPoint(ot),si=oe.midAngle,Wn!==iu&&(sn=oe.computeAngle(nt,Wn,si),nt.Kb=sn),sn=ot.x-y.x,hr=ot.y-y.y,$e.free(ot);else{if(sn=0,0<=ut?(hr=he.M(ut),ot=ut<ge-1?he.M(ut+1):hr):(sn=ge+ut,hr=he.M(sn),ot=0<sn?he.M(sn-1):hr),hr.Xa(ot)){0<=ut?(si=0<ut?he.M(ut-1):hr,sn=ut<ge-2?he.M(ut+2):ot):(si=sn<ge-1?he.M(sn+1):hr,sn=1<sn?he.M(sn-2):ot),Mn=si.Bf(hr);var Ji=ot.Bf(sn);si=Mn>Ji+10?0<=ut?si.ab(hr):hr.ab(si):Ji>Mn+10?0<=ut?ot.ab(sn):sn.ab(ot):0<=ut?si.ab(sn):sn.ab(si)}else si=0<=ut?hr.ab(ot):ot.ab(hr);Wn!==iu&&(sn=oe.computeAngle(nt,Wn,si),nt.Kb=sn),sn=hr.x+(ot.x-hr.x)*vt-y.x,hr=hr.y+(ot.y-hr.y)*vt-y.y}nt.measure(1/0,1/0,0,0),ot=nt.measuredBounds,Mn=nt.naturalBounds;var Do=0;nt instanceof Lr&&(Do=nt.strokeWidth),Ji=Mn.width+Do;var ya=Mn.height+Do;Ee.reset(),Ee.translate(-ot.x,-ot.y),Ee.scale(nt.scale,nt.scale),Ee.rotate(Wn===iu?nt.angle:si,Ji/2,ya/2),Wn!==bp&&Wn!==Mp||Ee.rotate(90,Ji/2,ya/2),Wn!==Lp&&Wn!==Fp||Ee.rotate(-90,Ji/2,ya/2),Wn===n0&&(45<si&&135>si||225<si&&315>si)&&Ee.rotate(-si,Ji/2,ya/2),Mn=new Xt(0,0,Ji,ya),Ne.xi(Mn,Dt),Ee.Ga(Ne),Dt=-Ne.x+Do/2*nt.scale,nt=-Ne.y+Do/2*nt.scale,Ye.assign(vi),Do=isNaN(vi.x);var Xs=isNaN(vi.y);if(Do||Xs){Ji=Ji/2+3,ya=ya/2+3;var tl=45<=si&&135>=si,Ul=225<=si&&315>=si;Wn===iu&&(tl||Ul)?(Ye.x=Xs?Ji:vi.y,Ye.y=Do?ya:vi.x,tl?0<=ut||isNaN(ut)&&.5>vt||!Do||(Ye.y=-ya):Ul&&((0<=ut||isNaN(ut)&&.5>vt)&&Do&&(Ye.y=-ya),Xs&&(Ye.x=-Ji))):(Do&&(Ye.x=0<=ut||isNaN(ut)&&.5>vt?Ji:-Ji),Xs&&(Ye.y=-ya),Ye.rotate(si))}else Ye.rotate(si);sn+=Ye.x,hr+=Ye.y,Mn.set(ot),Mn.h(sn+Dt,hr+nt,ot.width,ot.height),xe.push(Mn),x.ed(Mn)}}if(ee!==null)for(E=ee.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),El(b,x.width||0,x.height||0),ct.free(Ee),$e.free(Ne),$e.free(Ye)}}}},Lm.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Lo||a instanceof Fn){var E=a,b=null;a instanceof Lo&&(b=a,E=b.adornedPart);var z=a instanceof Lo?null:E.path,ee=a.j;if(ee.length!==0){var re=0;if(z!==null&&re<ee.length){var oe=ee[re];re++,z.arrange(oe.x-a.jg.x,oe.y-a.jg.y,oe.width,oe.height)}for(oe=0;oe<x;oe++){var le=y[oe];if(le!==z&&re<ee.length){var he=ee[re];re++,le.arrange(he.x-a.jg.x,he.y-a.jg.y,he.width,he.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Fn)for(z=a.labelNodes;z.next();){var ge=a;ee=z.value,re=ee.segmentIndex,oe=ee.segmentFraction;var ye=ee.alignmentFocus;if(le=ee.segmentOrientation,he=ee.segmentOffset,isNaN(re)){var xe=ge.ua,Ee=Yi();xe.Qu(oe,Ee);var Ne=$e.allocAt(Ee[0],Ee[1]);Ne.add(ge.i(0)),xe.type===wt.j||(xe=xe.figures.first()),Ne.offset(-xe.startX,-xe.startY),xe=Ee[2],le!==iu&&(ge=ge.computeAngle(ee,le,xe),ee.angle=ge),ge=Ne.x;var Ye=Ne.y;$e.free(Ne),Wi(Ee)}else if(re<-x||re>=x)Ee=$e.alloc(),xe=ge,Ye=Ee,xe.vg(),xe.computeMidPoint(Ye),xe=ge.midAngle,le!==iu&&(ge=ge.computeAngle(ee,le,xe),ee.angle=ge),ge=Ee.x,Ye=Ee.y,$e.free(Ee);else{if(Ne=0,0<=re?(Ee=y.s[re],Ye=re<x-1?y.s[re+1]:Ee):(Ne=x+re,Ee=y.s[Ne],Ye=0<Ne?y.s[Ne-1]:Ee),Ee.Xa(Ye)){0<=re?(xe=0<re?y.s[re-1]:Ee,Ne=re<x-2?y.s[re+2]:Ye):(xe=Ne<x-1?y.s[Ne+1]:Ee,Ne=1<Ne?y.s[Ne-2]:Ye);var je=xe.Bf(Ee),nt=Ye.Bf(Ne);xe=je>nt+10?0<=re?xe.ab(Ee):Ee.ab(xe):nt>je+10?0<=re?Ye.ab(Ne):Ne.ab(Ye):0<=re?xe.ab(Ne):Ne.ab(xe)}else xe=0<=re?Ee.ab(Ye):Ye.ab(Ee);le!==iu&&(ge=ge.computeAngle(ee,le,xe),ee.angle=ge),ge=Ee.x+(Ye.x-Ee.x)*oe,Ye=Ee.y+(Ye.y-Ee.y)*oe}if(ye.ys())ee.location=new $e(ge,Ye);else{ye.Mc()&&(ye=Oo),Ee=ct.alloc(),Ee.reset(),Ee.scale(ee.scale,ee.scale),Ee.rotate(ee.angle,0,0);var ot=ee.naturalBounds;Ne=Xt.allocAt(0,0,ot.width,ot.height),je=$e.alloc(),je.xi(Ne,ye),Ee.Ga(je),ye=-je.x,nt=-je.y;var ut=ot.width,vt=ot.height;ot=$e.alloc(),ot.assign(he);var Dt=isNaN(he.x),Wn=isNaN(he.y);if(Dt||Wn){ut=ut/2+3,vt=vt/2+3;var vi=45<=xe&&135>=xe,si=225<=xe&&315>=xe;le===iu&&(vi||si)?(ot.x=Wn?ut:he.y,ot.y=Dt?vt:he.x,vi?0<=re||isNaN(re)&&.5>oe||!Dt||(ot.y=-vt):si&&((0<=re||isNaN(re)&&.5>oe)&&Dt&&(ot.y=-vt),Wn&&(ot.x=-ut))):(Dt&&(ot.x=0<=re||isNaN(re)&&.5>oe?ut:-ut),Wn&&(ot.y=-vt),ot.rotate(xe))}else ot.rotate(xe);ge+=ot.x,Ye+=ot.y,Ee.pp(Ne),ye+=Ne.x,nt+=Ne.y,re=$e.allocAt(ge+ye,Ye+nt),ee.move(re),$e.free(re),$e.free(ot),$e.free(je),Xt.free(Ne),ct.free(Ee)}}b!==null?b.Ul(!1):E.Ul(!1),E=B1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),$e.free(E)}};function i1(a,y,x,E){if(nh(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Lo&&a.type===Pn.Link&&a.adornedObject instanceof Lr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Fn&&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 Lo&&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),Bs(E,!1)}}function fp(){this.xa="Base"}Ct(fp,Is),fp.prototype.measure=function(a,y,x,E,b,z,ee){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,le=oe.right+oe.left,he=oe.top+oe.bottom;re.measure(y,x,z,ee);var ge=re.measuredBounds,ye=new Xt(-oe.left,-oe.top,Math.max(ge.width+le,0),Math.max(ge.height+he,0));a.graduatedBounds.push(ye),b.assign(ye);for(var xe=re.geometry,Ee=re.strokeWidth,Ne=xe.flattenedSegments,Ye=xe.flattenedLengths,je=xe.flattenedTotalLength,nt=Ne.length,ot=0,ut=0,vt=Yi(),Dt=0;Dt<nt;Dt++){var Wn=Ne[Dt],vi=[];ut=ot=0;for(var si=Wn.length,Mn=0;Mn<si;Mn+=2){var sn=Wn[Mn],hr=Wn[Mn+1];if(Mn!==0){var Ji=180*Math.atan2(hr-ut,sn-ot)/Math.PI;0>Ji&&(Ji+=360),vi.push(Ji)}ot=sn,ut=hr}vt.push(vi)}if(a.graduatedIntervals===null){for(var Do=[],ya=a.O.s,Xs=ya.length,tl=0;tl<Xs;tl++){var Ul=ya[tl],Js=[];if(Do.push(Js),Ul.visible){var bd=Ul.interval;if(!(0>bd)){for(var bs=0;bs<Xs;bs++)if(bs!==tl){var nc=ya[bs];if(nc.visible&&Ul.constructor===nc.constructor){var Yl=nc.interval;Yl>bd&&Js.push(Yl)}}}}}a.graduatedIntervals=Do}var Ld=a.graduatedIntervals,ah=a.O.s,bh=ah.length,Wu=0,Au=0,$d=je;a.graduatedMarks=[];for(var ic,Wg=0;Wg<bh;Wg++){var Vu=ah[Wg];if(ic=[],Vu.visible&&Vu!==re){var Xl=Math.abs(Vu.interval),$p=a.graduatedTickUnit;if(!(2>$p*Xl*je/a.graduatedRange&&Vu.graduatedSkip===null)){var eg=Ye[0][0],wc=0,Bu=0;Au=je*Vu.graduatedStart-1e-4,$d=je*Vu.graduatedEnd+1e-4;var Mf=$p*Xl,Ku=a.graduatedTickBase;if(Ku<a.graduatedMin){var qd=(a.graduatedMin-Ku)/Mf;qd=qd%1===0?qd:Math.floor(qd+1),Ku+=qd*Mf}else Ku>a.graduatedMin+Mf&&(Ku-=Math.floor((Ku-a.graduatedMin)/Mf)*Mf);for(var W0=Ld[Wg],qp=Ku,zy=1e-6*a.graduatedMax,zc=1;Ku<=a.graduatedMax+zy;zc++){e:{for(var qc=W0.length,tg=0;tg<qc;tg++){var ef=(Ku-a.graduatedTickBase)%(W0[tg]*a.graduatedTickUnit),Vg=1e-6*a.graduatedTickUnit;if(ef<Vg&&ef>-Vg){var tf=!1;break e}}tf=!0}if(tf&&(Ku>a.graduatedMax&&(Ku=a.graduatedMax),Vu.graduatedSkip===null||Vu instanceof Sa&&!Vu.graduatedSkip(Ku,Vu)||Vu instanceof Lr&&!Vu.graduatedSkip(Ku,Vu))&&(Wu=(Ku-a.graduatedMin)*je/a.graduatedRange,Wu>je&&(Wu=je),Au<=Wu&&Wu<=$d)){for(var Gc=vt[wc][Bu],Md=Ye[wc][Bu];wc<Ye.length;){for(;Wu>eg&&Bu<Ye[wc].length-1;)Bu++,Gc=vt[wc][Bu],Md=Ye[wc][Bu],eg+=Md;if(Wu<=eg)break;wc++,Bu=0,Gc=vt[wc][Bu],Md=Ye[wc][Bu],eg+=Md}var Tu=Ne[wc],Pc=Tu[2*Bu],V0=Tu[2*Bu+1],ed=(Wu-(eg-Md))/Md,Kg=new $e(Pc+(Tu[2*Bu+2]-Pc)*ed+Ee/2-xe.bounds.x,V0+(Tu[2*Bu+3]-V0)*ed+Ee/2-xe.bounds.y);Kg.scale(re.scale,re.scale);e:{var rc=Gc,Ff=vt[wc];if(!(.5005>ed&&.4995<ed)){var Ec=rc;if(.5>ed?0<Bu?Ec=Ff[Bu-1]:Ie.$(Tu[0],Tu[Tu.length-2])&&Ie.$(Tu[1],Tu[Tu.length-1])&&(Ec=Ff[Ff.length-1]):.5<ed&&(Bu+1<Ff.length?Ec=Ff[Bu+1]:Ie.$(Tu[0],Tu[Tu.length-2])&&Ie.$(Tu[1],Tu[Tu.length-1])&&(Ec=Ff[0])),rc!==Ec){var ng=Math.abs(rc-Ec);if(180<ng&&(rc<Ec?rc+=360:Ec+=360,ng=Math.abs(rc-Ec)),5e-4>ed||.9995<ed){Gc=(rc+Ec)/2%360;break e}if(10>ng){var Ug=1-Math.abs(.5-ed);Gc=(rc*Ug+Ec*(1-Ug))%360;break e}}}Gc=rc}if(Vu instanceof Sa){var zh="";Vu.graduatedFunction!==null?(zh=Vu.graduatedFunction(Ku,Vu),zh=zh!=null?zh.toString():""):zh=(+Ku.toFixed(2)).toString(),zh!==""&&ic.push({$l:Kg,angle:Gc,text:zh})}else ic.push({$l:Kg,angle:Gc})}Ku=qp+zc*Mf}}}a.graduatedMarks.push(ic)}Wi(vt);var pl=a.graduatedMarks;if(pl!==null)for(var em=E.length,lu=0;lu<em;lu++){var Ls=E[lu],uu=pl[lu];if(Ls.visible&&Ls!==re&&uu.length!==0){if(Ls instanceof Lr){var td=a,Fd=b,kf=Ls.alignmentFocus;kf.Mc()&&(kf=Iu);var Gy=Ls.angle;Ls.Kb=0,Ls.measure(1/0,1/0,0,0),Ls.Kb=Gy;var K0=Ls.measuredBounds,Yg=K0.width,Nf=K0.height,ig=Xt.allocAt(0,0,Yg,Nf),Du=$e.alloc();Du.xi(ig,kf),Xt.free(ig);for(var nd=-Du.x,oc=-Du.y,vh=new Xt,nf=uu.length,Xg=0;Xg<nf;Xg++)for(var rf=uu[Xg],U0=rf.$l.x,Jg=rf.$l.y,gs=rf.angle,Gh=0;4>Gh;Gh++){switch(Gh){case 0:Du.h(nd,oc);break;case 1:Du.h(nd+Yg,oc);break;case 2:Du.h(nd,oc+Nf);break;case 3:Du.h(nd+Yg,oc+Nf)}Du.rotate(gs+Ls.angle),Du.offset(U0,Jg),Xg===0&&Gh===0?vh.h(Du.x,Du.y,0,0):vh.Ye(Du),Du.offset(-U0,-Jg),Du.rotate(-gs-Ls.angle)}$e.free(Du),td.graduatedBounds!==null&&td.graduatedBounds.push(vh),Ka(Fd,vh.x,vh.y,vh.width,vh.height)}else if(Ls instanceof Sa){var Lh=a,Y0=b;Lh.temporaryTextBlock===null&&(Lh.temporaryTextBlock=new Sa);var Uu=Lh.temporaryTextBlock;y1(Uu,Ls);var kd=Ls.alignmentFocus;kd.Mc()&&(kd=Iu);for(var Mh=Ls.segmentOrientation,Qg=Ls.segmentOffset,of=new Xt,tm=0,$g=0,Cc=0,Af=0,af=0,qg=uu.length,Nd=0;Nd<qg;Nd++){var Hc=uu[Nd];tm=Hc.$l.x,$g=Hc.$l.y,Cc=Hc.angle,af=Af=Ls.angle,Mh!==iu&&(af=Mh===Cp||Mh===t0?Cc+Ls.angle:Cc,Af=Fn.computeAngle(Mh,af)),Uu.Kb=Af,Uu.text=Hc.text||"",Uu.measure(1/0,1/0,0,0);var Ad=Uu.measuredBounds,id=Uu.naturalBounds,Bd=id.width,Bf=id.height,ac=ct.alloc();ac.reset(),ac.translate(-Ad.x,-Ad.y),ac.scale(Uu.scale,Uu.scale),ac.rotate(af,Bd/2,Bf/2),Mh!==bp&&Mh!==Mp||ac.rotate(90,Bd/2,Bf/2),Mh!==Lp&&Mh!==Fp||ac.rotate(-90,Bd/2,Bf/2),Mh===n0&&(45<Cc&&135>Cc||225<Cc&&315>Cc)&&ac.rotate(-Cc,Bd/2,Bf/2);var rg=Xt.allocAt(0,0,Bd,Bf),Td=$e.alloc();Td.xi(rg,kd),ac.Ga(Td);var og=-Td.x,Hy=-Td.y,rd=$e.alloc();rd.assign(Qg),isNaN(rd.x)&&(rd.x=Bd/2+3),isNaN(rd.y)&&(rd.y=-(Bf/2+3)),rd.rotate(Cc),tm+=rd.x+og,$g+=rd.y+Hy;var Tf=new Xt(tm,$g,Ad.width,Ad.height),nm=new Xt(Ad.x,Ad.y,Ad.width,Ad.height),Zy=new Xt(id.x,id.y,id.width,id.height);Hc.Sz=Af,Hc.lineCount=Uu.lineCount,Hc.lines=[Uu.Cb,Uu.Ih,Uu.df,Uu.Le,Uu.Qc,Uu.Qb,Uu.ze],Hc.actualBounds=Tf,Hc.measuredBounds=nm,Hc.naturalBounds=Zy,Nd===0?of.assign(Tf):of.ed(Tf),$e.free(rd),$e.free(Td),Xt.free(rg),ct.free(ac)}Lh.graduatedBounds!==null&&Lh.graduatedBounds.push(of),Ka(Y0,of.x,of.y,of.width,of.height)}Bs(Ls,!1)}}},fp.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,ee=0,re=z[ee];ee++,E!==null&&E.arrange(re.x-x.x,re.y-x.y,re.width,re.height);for(var oe=y.length,le=0;le<oe;le++){var he=y[le];re=b[le],he.visible&&he!==E&&re.length!==0&&(re=z[ee],ee++,he.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},fp.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,ee=b.height;b=y instanceof Gu,y.save(),y.beginPath(),y.rect(-1,-1,z+1,ee+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),ee=a.Df()*x.scale,0>=ee&&(ee=1);for(var re=z.actualBounds,oe=a.O.s,le=a.graduatedMarks,he=oe.length,ge=0;ge<he;ge++){var ye=oe[ge],xe=le[ge],Ee=xe.length;if(ye.visible&&ye!==z&&xe.length!==0){if(ye instanceof Lr){if(!(2>a.graduatedTickUnit*ye.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ee&&ye.graduatedSkip===null)){var Ne=ye.measuredBounds,Ye=ye.strokeWidth*ye.scale,je=ye.alignmentFocus;je.Mc()&&(je=Iu);for(var nt=0;nt<Ee;nt++){var ot=xe[nt].$l,ut=xe[nt].angle,vt=je,Dt=ye.Ab;Dt.reset(),Dt.translate(ot.x+re.x,ot.y+re.y),Dt.rotate(ut+ye.angle,0,0),Dt.translate(-Ne.width*vt.x+vt.offsetX+Ye/2,-Ne.height*vt.y+vt.offsetY+Ye/2),Dt.scale(ye.scale,ye.scale),xh(ye,!1),ye.wh.set(ye.Ab),ye.Kk=ye.scale,hh(ye,!1),ye.gc(y,x),b&&(a.svg.appendChild(ye.svg),ye.svg=null),ye.Ab.reset()}}}else if(ye instanceof Sa)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Sa),Ne=a.temporaryTextBlock,y1(Ne,ye),Ye=0;Ye<Ee;Ye++)je=xe[Ye],je.actualBounds&&je.measuredBounds&&je.naturalBounds&&(Ne.ec=je.text||"",Ne.Kb=je.Sz||0,Ne.Gc=je.lineCount||0,nt=je.lines,nt!==void 0&&(Ne.Cb=nt[0],Ne.Ih=nt[1],Ne.df=nt[2],Ne.Le=nt[3],Ne.Qc=nt[4],Ne.Qb=nt[5],Ne.ze=nt[6]),je.naturalBounds&&(Ne.dc=je.naturalBounds),je.actualBounds&&(nt=je.actualBounds,Ne.arrange(nt.x,nt.y,nt.width,nt.height)),nt=je.actualBounds,Ne.arrange(nt.x,nt.y,nt.width,nt.height),ot=je.measuredBounds,je=je.naturalBounds,ut=Ne.Ab,ut.reset(),ut.translate(nt.x+re.x,nt.y+re.y),ut.translate(-ot.x,-ot.y),Ne.no(ut,je.x,je.y,je.width,je.height),xh(Ne,!1),Ne.wh.set(Ne.Ab),Ne.Kk=Ne.scale,hh(Ne,!1),Ne.Ng=ye.part,Ne.Me=ye.panel,Ne.gc(y,x),Ne.Me=null,Ne.Ng=null,b&&(a.svg.appendChild(Ne.svg),Ne.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Pn(a,y){if(xt.call(this),this.na=null,a===void 0)this.na=Pn.Position;else if(typeof a=="string"){var x=Dh.I(a);x!==null&&(this.na=x)}else a instanceof Is?this.na=a:a&&(this.na=Pn.Position,y=a);this.na===null&&Rt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Pn.Grid?1048576:0),this.O=new bn,this.yb=Sl,this.Tm=Fs,this.Uf=dr,this.$g=null,this.$e="",this.jg=new Xt(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=wi,this.jn=os,this.kn=rs,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ct(Pn,xt),Pn.prototype.cloneProtected=function(a){xt.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},Pn.prototype.Af=function(a){xt.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},Pn.prototype.copy=function(){var a=xt.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,ee=z.count;if(z.Gb(ee,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof Jn&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(Ao,"elements",a,null,b,null,ee)}}return a}return null},we=Pn.prototype,we.toString=function(){return"Panel("+this.type.name+")#"+Vr(this)},we.Pn=function(a){xt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},we.hh=function(a,y){if(this.na===Pn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Pn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Pn.Table)if(a.yc(),a instanceof Gu){var x=a.yd;a.yd=fm(a,"gojs-ts"),gv(this,a),a.nh.pop(),a.yd=x}else gv(this,a);(x=this.isClipping&&this.na===Pn.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,ee=0;ee<z;ee++){var re=b[ee];x&&re===E&&(a.clipInsteadOfFill=!0),re.gc(a,y),x&&re===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function gv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Mm(a,y,!0,x,!0),E!==null&&Mm(a,y,!1,E,!0),x!==null&&r1(a,y,!0,x),E!==null&&r1(a,y,!1,E),x!==null&&Mm(a,y,!0,x,!1),E!==null&&Mm(a,y,!1,E,!1)}function r1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ee=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var le=E[oe];if(le!==void 0&&le.actual!==0)if(re)re=!1;else{if(x){if(le.position>ee.height)continue}else if(le.position>ee.width)continue;var he=le.separatorStrokeWidth;isNaN(he)&&(he=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ge=le.separatorStroke;if(ge===null&&(ge=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),he!==0&&ge!==null){hs(a,y,ge,!1,!1,ee,z),ge=!1;var ye=le.separatorDashArray;ye===null&&(ye=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),ye!==null&&(ge=!0,y.js(ye,0)),y.beginPath(),ye=le.position+he,x?ye>ee.height&&(he-=ye-ee.height):ye>ee.width&&(he-=ye-ee.width),le=le.position+he/2,y.lineWidth=he,he=a.yb,x?(le+=he.top,ye=ee.width-he.right,y.moveTo(he.left,le),y.lineTo(ye,le)):(le+=he.left,ye=ee.height-he.bottom,y.moveTo(le,he.top),y.lineTo(le,ye)),y.stroke(),y.Se(),ge&&y.fs()}}}}function Mm(a,y,x,E,b){for(var z=E.length,ee=a.actualBounds,re=a.naturalBounds,oe=o1(a,!0),le=o1(a,!1),he=0;he<z;he++){var ge=E[he];if(ge!==void 0&&ge.background!==null&&ge.coversSeparators!==b&&ge.actual!==0){var ye=x?ee.height:ee.width;if(!(ge.position>ye)){var xe=ge.Wc(),Ee=ge.separatorStrokeWidth;isNaN(Ee)&&(Ee=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Ne=ge.separatorStroke;Ne===null&&(Ne=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Ne===null||ge.index===(x?oe:le))&&(Ee=0),xe-=Ee,Ee=ge.position+Ee,xe+=ge.actual,Ee+xe>ye&&(xe=ye-Ee),0>=xe||(ye=a.yb,hs(a,y,ge.background,!0,!1,re,ee),x?y.fillRect(ye.left,Ee+ye.top,ee.width-(ye.left+ye.right),xe):y.fillRect(Ee+ye.left,ye.top,xe,ee.height-(ye.top+ye.bottom)))}}}}function o1(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 pv(a){return a==="LineV"||a==="BarV"}we.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},we.kk=function(a,y,x){if(!xt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Pn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,gv(this,a),a.yd=null;else if(this.na===Pn.Grid||this.na===Pn.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},we.nk=function(){return!0},we.$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,ee=0;ee<y.length;ee++)if(y[ee].Ed()){var re=y[ee].actualBounds;b=ee===0?re.x:Math.min(re.x,b),z=ee===0?re.y:Math.min(re.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 xt.prototype.$o.call(this,a,y,x,E)},we.Sj=function(a,y,x,E,b){var z=this.se(),ee=this.transform,re=1/(ee.m11*ee.m22-ee.m12*ee.m21),oe=ee.m22*re,le=-ee.m12*re,he=-ee.m21*re,ge=ee.m11*re,ye=re*(ee.m21*ee.dy-ee.m22*ee.dx),xe=re*(ee.m12*ee.dx-ee.m11*ee.dy);if(this.areaBackground!==null)return ee=this.actualBounds,Ie.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*he+ye,re=a*le+y*ge+xe,a=x*oe+E*he+ye,oe=x*le+E*ge+xe,b.h(0,0),x=this.naturalBounds,z=Ie.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ee),z;z||(oe=1,he=le=0,ge=1,xe=ye=0),re=a*oe+y*he+ye,a=a*le+y*ge+xe,oe=x*oe+E*he+ye,x=x*le+E*ge+xe,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),le=!1,ge=this.O.s,xe=ge.length,he=$e.alloc(),ye=null,y=1/0;var Ee=null,Ne=this.isClipping&&this.na===Pn.Spot;Ne&&(Ee=$e.alloc(),ye=this.Pb(),(le=ye.Sj(re,a,oe,x,Ee))&&(y=(re-Ee.x)*(re-Ee.x)+(a-Ee.y)*(a-Ee.y)));for(var Ye=0;Ye<xe;Ye++){var je=ge[Ye];je.visible&&je!==ye&&je.Sj(re,a,oe,x,he)&&(le=!0,je=(re-he.x)*(re-he.x)+(a-he.y)*(a-he.y),je<E&&(E=je,b.set(he)))}return Ne&&(y>E&&b.set(Ee),$e.free(Ee)),$e.free(he),z&&b.transform(ee),le},we.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();xt.prototype.Gj.call(this)},we.v=function(a){if(!nh(this)){xt.prototype.v.call(this,a),a=null,(this.na===Pn.Auto||this.na===Pn.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=gu(b,!1);(b instanceof nu||b instanceof Pn||b instanceof Sa||z!==fn)&&b.v(!0)}}}},we.Uj=function(){if(!nh(this)){Bs(this,!0),kc(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},we.Uk=function(){if(!(this.l&2048)){xh(this,!0),hh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},we.Wu=function(){hh(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},we.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,ee=this.minSize;x===void 0&&(x=ee.width,E=ee.height),x=Math.max(x,ee.width),E=Math.max(E,ee.height);var re=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,re.width)),isNaN(z.height)||(y=Math.min(z.height,re.height)),a=Math.max(x,a),y=Math.max(E,y);var oe=this.yb;a=Math.max(a-oe.left-oe.right,0),y=Math.max(y-oe.top-oe.bottom,0);var le=this.O.s;le.length!==0&&this.na.measure(this,a,y,le,b,x,E),a=b.width+oe.left+oe.right,oe=b.height+oe.top+oe.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(oe=z.height),a=Math.min(re.width,a),oe=Math.min(re.height,oe),a=Math.max(ee.width,a),oe=Math.max(ee.height,oe),a=Math.max(x,a),oe=Math.max(E,oe),El(b,a,oe),El(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},we.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 Jc(a){return a.part!==null?a.part.locationObject:null}we.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=gu(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var ee=this.Kg,re=ee.left+ee.right;switch(ee=ee.top+ee.bottom,y===x&&z===E&&(a=fn),a){case fn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case yn:this.v(!0),this.measure(x+re,E+ee,0,0);break;case Mi:this.v(!0),this.measure(x+re,z+ee,0,0);break;case Hi:this.v(!0),this.measure(y+re,E+ee,0,0)}}this.na.arrange(this,b,this.jg)}},we.gh=function(a){var y=this.naturalBounds,x=Jc(this);if(Ko(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=$e.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(Ra(b.set(a),z.transform),z.ca(b)))return $e.free(b),!0}return $e.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},we.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},we.qm=function(a,y){if(y(this,a),a instanceof Pn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Sf(a,y){a1(a,a,y)}function a1(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 Pn&&a1(a,z,x)}}function vx(a,y){s1(a,a,y)}function s1(a,y,x){if(x(y),y instanceof Pn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)s1(a,y[b],x)}}we.Nl=function(a){return l1(this,this,a)};function l1(a,y,x){if(x(y))return y;if(y instanceof Pn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=l1(a,y[b],x);if(z!==null)return z}}return null}we.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=gp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Pn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function u1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Pn?x=Math.max(x,u1(b)):b instanceof Lr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}we.se=function(){return!(this.type===Pn.TableRow||this.type===Pn.TableColumn)};function pd(a){return a.type===Pn.TableRow||a.type===Pn.TableColumn}we.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),eu(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ee=z?a:Ra($e.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,le=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),le=oe/2),Ko(-(le*b),-(le*b),E.width+oe*b,E.height+oe*b,ee.x,ee.y)){if(!this.isAtomic){b=this.O.s;var he=b.length;if(re=$e.alloc(),le=(oe=this.isClipping&&this.na===Pn.Spot)?this.Pb():null,oe&&(le.se()?Ra(re.set(a),le.transform):re.set(a),!le.ca(re)))return $e.free(re),z||$e.free(ee),null;for(var ge=Jc(this);he--;){var ye=b[he];if((ye.visible||ye===ge)&&(ye.se()?Ra(re.set(a),ye.transform):re.set(a),!oe||ye!==le)){var xe=null;if(ye instanceof Pn?xe=ye.ic(re,y,x):ye.pickable===!0&&ye.ca(re)&&(xe=ye),xe!==null&&(y!==null&&(xe=y(xe)),xe!==null&&(x===null||x(xe))))return $e.free(re),z||$e.free(ee),xe}}$e.free(re)}return this.background===null&&this.areaBackground===null?(z||$e.free(ee),null):(a=Ko(0,0,E.width,E.height,ee.x,ee.y)?this:null,z||$e.free(ee),a)}return z||$e.free(ee),null},we.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(),ee=z?a:Ra($e.allocAt(a.x,a.y),this.transform);if(b=Ko(0,0,b.width,b.height,ee.x,ee.y),pd(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,le=$e.alloc(),he=Jc(this);oe--;){var ge=re[oe];if(ge.visible||ge===he){ge.se()?Ra(le.set(a),ge.transform):le.set(a);var ye=ge;ge=ge instanceof Pn?ge:null,(ge!==null?ge.ji(le,y,x,E):ye.ca(le))&&ye.pickable!==!1&&(y!==null&&(ye=y(ye)),ye===null||x!==null&&!x(ye)||E.add(ye))}}$e.free(le)}return z||$e.free(ee),b&&(this.background!==null||this.areaBackground!==null)}return z||$e.free(ee),!1},we.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 ee=z;if(z===void 0&&(ee=ct.alloc(),ee.reset()),ee.multiply(this.transform),this.fh(a,ee))return mv(this,y,x,b),z===void 0&&ct.free(ee),!0;if(this.Yc(a,ee)){if(!this.isAtomic)for(var re=Jc(this),oe=this.O.s,le=oe.length;le--;){var he=oe[le];if(he.visible||he===re){var ge=he.actualBounds,ye=this.naturalBounds;ge.x>ye.width||ge.y>ye.height||0>ge.x+ge.width||0>ge.y+ge.height||(ge=he,he=he instanceof Pn?he:null,ye=ct.alloc(),ye.set(ee),(he!==null?he.Cf(a,y,x,E,b,ye):Ys(ge,a,E,ye))&&(y!==null&&(ge=y(ge)),ge===null||x!==null&&!x(ge)||b.add(ge)),ct.free(ye))}}return z===void 0&&ct.free(ee),E}return z===void 0&&ct.free(ee),!1};function mv(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var ee=b[z];if(ee.visible){var re=ee.actualBounds,oe=a.naturalBounds;re.x>oe.width||re.y>oe.height||0>re.x+re.width||0>re.y+re.height||(ee instanceof Pn&&mv(ee,y,x,E),y!==null&&(ee=y(ee)),ee===null||x!==null&&!x(ee)||E.add(ee))}}}we.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 ee=this.naturalBounds,re=this.se(),oe=re?a:Ra($e.allocAt(a.x,a.y),this.transform),le=re?y:Ra($e.allocAt(y.x,y.y),this.transform),he=oe.Bf(le),ge=0<oe.x&&oe.x<ee.width&&0<oe.y&&oe.y<ee.height||qa(oe.x,oe.y,0,0,0,ee.height)<=he||qa(oe.x,oe.y,0,ee.height,ee.width,ee.height)<=he||qa(oe.x,oe.y,ee.width,ee.height,ee.width,0)<=he||qa(oe.x,oe.y,ee.width,0,0,0)<=he;if(ee=oe.zd(0,0)<=he&&oe.zd(0,ee.height)<=he&&oe.zd(ee.width,0)<=he&&oe.zd(ee.width,ee.height)<=he,re||($e.free(oe),$e.free(le)),ge){if(!this.isAtomic){oe=$e.alloc(),le=$e.alloc(),he=Jc(this);for(var ye=this.O.s,xe=ye.length;xe--;){var Ee=ye[xe];if(Ee.visible||Ee===he){var Ne=Ee.actualBounds,Ye=this.naturalBounds;(!re||!(Ne.x>Ye.width||Ne.y>Ye.height||0>Ne.x+Ne.width||0>Ne.y+Ne.height))&&(Ee.se()?(Ne=Ee.transform,Ra(oe.set(a),Ne),Ra(le.set(y),Ne)):(oe.set(a),le.set(y)),Ne=Ee,Ee=Ee instanceof Pn?Ee:null,(Ee!==null?Ee.og(oe,le,x,E,b,z):Ne.tx(oe,le,b))&&(x!==null&&(Ne=x(Ne)),Ne===null||E!==null&&!E(Ne)||z.add(Ne)))}}$e.free(oe),$e.free(le)}return b?ge:ee}return!1};function vv(a){var y=null;return a instanceof Lr&&(y=a.spot1,y===Fs&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Os),y}function yv(a){var y=null;return a instanceof Lr&&(y=a.spot2,y===Fs&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=il),y}we.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},we.M=function(a){return this.O.M(a)},we.Gb=function(a,y){y instanceof Ti&&Rt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Rt("Cannot make a Panel contain itself: "+this.toString()),Rt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Rt("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!==Pn.Grid||y instanceof Lr||Rt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Pn.Graduated||y instanceof Lr||y instanceof Sa||Rt("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 ki),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,ee=this.O.s,re=ee.length,oe=0;oe<re;oe++)if(ee[oe]===y){z=oe;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else Rt("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),nh(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Pn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||km(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof Jn&&(x.Te=!0),x.Te&&x instanceof Jn&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(Ho,"elements",this,y,null,E,null),x.cb(Ao,"elements",this,null,y,null,a)))};function Sv(a,y){a.l=y?a.l|16777216:a.l&-16777217}we.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)},we.mb=function(a){0<=a&&this.pc(a,!0)},we.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),Bs(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 Jn&&(E instanceof Pn?E.qm(E,function(ee,re){Hv(z,re,y)}):Hv(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(Ho,"elements",this,E,null,a,null))},we.Fb=function(a){0>a&&Zi(a,">= 0",Pn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Ts;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(Ao,"rowdefs",this,null,x,null,a)}return y[a]},we.oA=function(a){if(0>a&&Zi(a,">= 0",Pn,"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(Ho,"rowdefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Ts?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}we.Eb=function(a){0>a&&Zi(a,">= 0",Pn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Ts;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(Ao,"coldefs",this,null,x,null,a)}return y[a]},we.jA=function(a){if(0>a&&Zi(a,">= 0",Pn,"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(Ho,"coldefs",this,x,null,a,null),this.v()}}};function c1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Ts?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}we.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&Nm(y,a),this},we.Hy=function(a,y){return(a=this.Fb(a))&&Nm(a,new Ts(y)),this},we.By=function(a,y){return(a=this.Eb(a))&&Nm(a,new Ts(y)),this},we.nz=function(a){if(0>a||this.type!==Pn.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},we.fz=function(a){if(0>a||this.type!==Pn.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},we.Fz=function(a,y){if(y===void 0&&(y=new $e(NaN,NaN)),this.type!==Pn.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)},we.Gz=function(a){if(this.type!==Pn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function d1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Ph(a){var y=a.allBindings;if(y===null)a.data!==null&&Rt("Template cannot have .data be non-null: "+a),a.allBindings=y=new bn;else if(y._isFrozen)return;var x=new bn;Sv(a,!1),a.qm(a,function(le,he){he.th();var ge=he.localBindings;if(ge!==null)for(jf(he,!1),ge=ge.iterator;ge.next();){var ye=ge.value;ye.mode===_p&&jf(he,!0);var xe=ye.sourceName;xe!==null&&(xe==="/"&&Sv(le,!0),xe=LS(ye,le,he),xe!==null&&(x.add(xe),xe.srcBindings===null&&(xe.srcBindings=new bn),xe.srcBindings.add(ye))),y.add(ye)}if(he instanceof Pn&&he.type===Pn.Table){if(0<he.rowCount){for(le=he.rowDefs,ge=le.length,ye=0;ye<ge;ye++)if(xe=le[ye],xe!==void 0&&xe.be!==null)for(var Ee=xe.be.iterator;Ee.next();){var Ne=Ee.value;Ne.xd=xe,Ne.to=2,Ne.wl=xe.index,y.add(Ne)}}if(0<he.columnCount){for(he=he.colDefs,le=he.length,ge=0;ge<le;ge++)if(ye=he[ge],ye!==void 0&&ye.be!==null)for(xe=ye.be.iterator;xe.next();)Ee=xe.value,Ee.xd=ye,Ee.to=1,Ee.wl=ye.index,y.add(Ee)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){jf(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ee=z.value;b.localBindings===null&&(b.localBindings=new bn),b.localBindings.add(ee)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var re=b.targetProperty,oe=re.indexOf(".");0<oe&&z instanceof Pn&&(ee=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ee),oe!==null?(z=oe,b.targetProperty=re):Wr('Warning: unable to find GraphObject named "'+ee+'" for Binding: '+b.toString())),z instanceof Ts?(ee=Vr(z.panel),b.Ai=ee===void 0?-1:ee,z.panel.bindingId=b.Ai):z instanceof xt?(ee=Vr(z),b.Ai=ee===void 0?-1:ee,z.bindingId=b.Ai):Rt("Unknown type of binding target: "+z)}y.freeze(),a instanceof Ti&&a.Zc()&&a.Va()}we.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Pn&&(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&&Ph(y),y},we.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,ee=x.Ai;if(ee!==-1){if(z=this.ks(ee),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 Pn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},we.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function yx(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 Pn&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var ee=0;b<x&&ee<E;){if(z=a[b],!(z instanceof Pn)||z.data!==y[ee])return!0;b++,ee++}return!1}function gp(a){if(a.type===Pn.Spot||a.type===Pn.Auto)return Math.min(a.O.length,1);if(a.type===Pn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Lr&&E.isPanelMain))break}return x}return a.type===Pn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Pn&&pd(a))?1:0}we.mv=function(){for(var a=gp(this);this.O.length>a;)this.pc(this.O.length-1,!1);f1(this,this.itemArray)};function f1(a,y){var x=gp(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++)Fm(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],ee=E<a.O.length?a.O.M(E):null;if(ee instanceof Pn){if(ee.data!==z){var re=wv(a,ee.data),oe=wv(a,z),le=oe!==re;le||(re=Pv(a,re),le=Pv(a,oe)!==re),le?(a.pc(E,!1),Fm(a,z,b,!1)):ee.data=z}}else Fm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,xv(a,x,0),nh(a)||a.v(),a.graduatedIntervals=null,a.If()||km(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof Jn&&(y.Te=!0),y.Te&&y instanceof Jn&&(y.wc=null))}}function Fm(a,y,x,E){if(!(y==null||0>x)){var b=wv(a,y);if(b=Pv(a,b),b!==null){if(Ph(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Sv(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ki),a.ge.add(y,b)),z=x+gp(a),a.Gb(z,b),E&&(b.ub=y,xv(a,z,x),b.ub=null),b.data=y}}}function xv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Pn){var b=y,z=x;E.type===Pn.TableRow?E.row=b:E.type===Pn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function wv(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=Ss(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Rt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Pv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(g1||(g1=!0,Wr('No item template Panel found for category "'+y+'" on '+a),Wr(" Using default item template."),a=new Pn,y=new Sa,y.bind(new Cs("text","",Mo)),a.add(y),p1=a),E=p1)),E}function km(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Pn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Pn&&!z.isEnabled||km(a,z,x)}}}function Sc(a,y){y.name=a,Dh.add(a,y)}Jt.Object.defineProperties(Pn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Pn.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&&Zi(a,">= 0",Pn,"padding"),a=new Sr(a)):(0>a.left&&Zi(a.left,">= 0",Pn,"padding:value.left"),0>a.right&&Zi(a.right,">= 0",Pn,"padding:value.right"),0>a.top&&Zi(a.top,">= 0",Pn,"padding:value.top"),0>a.bottom&&Zi(a.bottom,">= 0",Pn,"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:Sl},set:function(a){typeof a=="number"&&(a=new Sr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new fh),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 Qo)&&(a instanceof Qo&&a.freeze(),this.T===null&&(this.T=new fh),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 fh),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)||Rt("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 fh),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 Qo)&&(a instanceof Qo&&a.freeze(),this.T===null&&(this.T=new fh),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 fh),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)||Rt("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 fh),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 fh),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||Rt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&dl(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()||Rt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&dl(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 Qc),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),Pl(this)&&(a=this.part,a!==null&&Aa(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 Qc),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),Pl(this)&&(a=this.part,a!==null&&Aa(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 Qc),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 Qc),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 Qc,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 Qc,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 Qc,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 Qc,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 fh),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new fh),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:Bm},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new fh),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:Bm},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new fh),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)&&Rt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fh),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)&&Rt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new fh),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 Ti&&!(this instanceof Lo);Ph(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Fn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Ti&&(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 zf),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&yx(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&ly(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&sy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||f1(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 ki}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Ti||a.isPanelMain)&&Rt("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(););Br(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&&(Br(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 cr&&(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&&km(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))}}}),Jt.Object.defineProperties(Pn,{Position:{get:function(){return Dh.I("Position")}},Horizontal:{get:function(){return Dh.I("Horizontal")}},Vertical:{get:function(){return Dh.I("Vertical")}},Spot:{get:function(){return Dh.I("Spot")}},Auto:{get:function(){return Dh.I("Auto")}},Table:{get:function(){return Dh.I("Table")}},Viewbox:{get:function(){return Dh.I("Viewbox")}},TableRow:{get:function(){return Dh.I("TableRow")}},TableColumn:{get:function(){return Dh.I("TableColumn")}},Link:{get:function(){return Dh.I("Link")}},Grid:{get:function(){return Dh.I("Grid")}},Graduated:{get:function(){return Dh.I("Graduated")}}}),Pn.prototype.rebuildItemElements=Pn.prototype.mv,Pn.prototype.findItemPanelForData=Pn.prototype.sx,Pn.prototype.updateTargetBindings=Pn.prototype.La,Pn.prototype.copyTemplate=Pn.prototype.Uy,Pn.prototype.graduatedValueForPoint=Pn.prototype.Gz,Pn.prototype.graduatedPointForValue=Pn.prototype.Fz,Pn.prototype.findColumnForLocalX=Pn.prototype.fz,Pn.prototype.findRowForLocalY=Pn.prototype.nz,Pn.prototype.addColumnDefinition=Pn.prototype.By,Pn.prototype.addRowDefinition=Pn.prototype.Hy,Pn.prototype.addRowColumnDefinition=Pn.prototype.Gy,Pn.prototype.removeColumnDefinition=Pn.prototype.jA,Pn.prototype.getColumnDefinition=Pn.prototype.Eb,Pn.prototype.removeRowDefinition=Pn.prototype.oA,Pn.prototype.getRowDefinition=Pn.prototype.Fb,Pn.prototype.removeAt=Pn.prototype.mb,Pn.prototype.remove=Pn.prototype.remove,Pn.prototype.insertAt=Pn.prototype.Gb,Pn.prototype.elt=Pn.prototype.M,Pn.prototype.add=Pn.prototype.add,Pn.prototype.findObject=Pn.prototype.fb,Pn.prototype.findInVisualTree=Pn.prototype.Nl,Pn.prototype.walkVisualTreeFrom=Pn.prototype.qm,Pn.prototype.findMainElement=Pn.prototype.Pb;var g1=!1,p1=null,Dh=new ki;Pn.className="Panel",Pn.definePanelLayout=Sc,Sc("Position",new mm),Sc("Vertical",new ym),Sc("Auto",new xm),Sc("Link",new Lm);function Qc(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Qc.prototype.copy=function(){var a=new Qc;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},Qc.className="GradPanelSettings";function fh(){this.Pc=[],this.Oc=[],this.j=this.ob=Bm,this.hb=this.Hb=0,this.Qp=Sl,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}fh.prototype.copy=function(a){for(var y=new fh,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var ee=x[z].copy();ee.wi(a),b[z]=ee}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(ee=x[z].copy(),ee.wi(a),b[z]=ee);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},fh.className="TablePanelSettings";function Ts(a){Zo(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Fs,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Ev,this.hg=dr,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))}Ts.prototype.copy=function(){var a=new Ts;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=bo(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function Nm(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=bo(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}we=Ts.prototype,we.qb=function(a){a.classType===Ts&&(this.sizing=a)},we.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+Vr(this)},we.wi=function(a){this.Me=a},we.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)},we.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Pn.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var ee=E?y.rowDefs[z]:y.colDefs[z];if(ee!==void 0&&ee.oa!==0){x=ee.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)},we.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Er,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 Am(a){if(a.sizing===Ev){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}we.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Cs(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&d1(y)&&Rt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new bn),this.be.add(b),this},Jt.Object.defineProperties(Ts.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&&Zi(a,">= 0",Ts,"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&&Zi(a,">= 0",Ts,"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))&&Zi(a,">= 0",Ts,"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&&Zi(a,">= 0",Ts,"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 Sr(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&&Hf(a,"RowColumnDefinition.separatorStroke"),a instanceof Qo&&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)||Rt("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&&Hf(a,"RowColumnDefinition.background"),a instanceof Qo&&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}}}),Ts.prototype.computeEffectiveSpacing=Ts.prototype.Wc,Ts.prototype.computeEffectiveSpacingTop=Ts.prototype.Io;var Ev=new Wt(Ts,"Default",0),pp=new Wt(Ts,"None",1),Bm=new Wt(Ts,"ProportionalExtra",2);Ts.className="RowColumnDefinition",Ts.Default=Ev,Ts.None=pp,Ts.ProportionalExtra=Bm;function Lr(a,y){xt.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)}Ct(Lr,xt),Lr.prototype.cloneProtected=function(a){xt.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=bo(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 xf(a){a.Na===null?a.Na=new Lv:a.Na.nc&&(a.Na=a.Na.copy())}we=Lr.prototype,we.th=function(){xt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},we.qb=function(a){a===fn||a===wi||a===oo||a===dr?this.geometryStretch=a:xt.prototype.qb.call(this,a)},we.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+Vr(this)};function Pg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,ee=Math.max(1,z.width);z=z.height;for(var re=x[0],oe=x[1],le,he,ge,ye,xe,Ee,Ne=0,Ye=Yi(),je=2;je<b;je+=2)le=x[je],he=x[je+1],ge=le-re,re=he-oe,ge===0&&(ge=.001),ye=re/ge,xe=Math.atan2(re,ge),Ee=Math.sqrt(ge*ge+re*re),Ye.push([ge,xe,ye,Ee]),Ne+=Ee,re=le,oe=he;re=x[0],oe=x[1],ge=E.measuredBounds.width,E instanceof Lr&&(ge-=E.strokeWidth),1>ge&&(ge=1),b=x=ge,le=ee/2,he=le!==0,je=0,Ee=Ye[je],ge=Ee[0],xe=Ee[1],ye=Ee[2],Ee=Ee[3];for(var nt=0;.1<=Ne;){if(nt===0&&(he?(b=x,b-=le,Ne-=le,he=!1):b=x,b===0&&(b=1)),b>Ne){Wi(Ye);return}b>Ee?(nt=b-Ee,b=Ee):nt=0;var ot=Math.sqrt(b*b/(1+ye*ye));if(0>ge&&(ot=-ot),re+=ot,oe+=ye*ot,a.translate(re,oe),a.rotate(xe),a.translate(-(ee/2),-(z/2)),nt===0&&E.hh(a,y),a.translate(ee/2,z/2),a.rotate(-xe),a.translate(-re,-oe),Ne-=b,Ee-=b,nt!==0){if(je++,je===Ye.length){Wi(Ye);return}Ee=Ye[je],ge=Ee[0],xe=Ee[1],ye=Ee[2],Ee=Ee[3],b=nt}}Wi(Ye)}}we.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,ee=this.naturalBounds;E!==null&&hs(this,a,E,!0,!1,ee,z);var re=this.part,oe=this.ig;if(x===null||oe!==0||re===null||!this.isPanelMain&&re.Pb()!==this||(oe=re.type===Pn.Link&&re instanceof Lo&&re.category==="Selection"&&re.adornedObject instanceof Lr&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(hs(this,a,x,!1,!1,ee,z),a.lineWidth=oe,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,re&&y.Gf("drawShadows")&&(z=re.isShadowed),a.Il===!1&&(z=!1),re=!0,x===null||E!==null&&E!=="transparent"||(re=!1),ee=!1,oe=this.strokeDashArray,oe!==null&&(ee=!0,a.js(oe,this.strokeDashOffset)),b.type===wt.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===wt.u){var le=b.startX;oe=b.startY;var he=b.endX,ge=b.endY;b=Math.min(le,he);var ye=Math.min(oe,ge);le=Math.abs(he-le),oe=Math.abs(ge-oe),a.beginPath(),a.rect(b,ye,le,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&Nc(a),a.jk(),re&&z&&Uc(a)),a.Se()}else if(b.type===wt.F)le=b.startX,oe=b.startY,he=b.endX,ge=b.endY,b=Math.abs(he-le)/2,ye=Math.abs(ge-oe)/2,le=Math.min(le,he)+b,oe=Math.min(oe,ge)+ye,a.beginPath(),a.moveTo(le,oe-ye),a.bezierCurveTo(le+Ie.wg*b,oe-ye,le+b,oe-Ie.wg*ye,le+b,oe),a.bezierCurveTo(le+b,oe+Ie.wg*ye,le+Ie.wg*b,oe+ye,le,oe+ye),a.bezierCurveTo(le-Ie.wg*b,oe+ye,le-b,oe+Ie.wg*ye,le-b,oe),a.bezierCurveTo(le-b,oe-Ie.wg*ye,le-Ie.wg*b,oe-ye,le,oe-ye),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&Nc(a),a.jk(),re&&z&&Uc(a)),a.Se();else if(b.type===wt.o)for(b=b.figures,oe=b.length,ye=0;ye<oe;ye++){le=b.s[ye],a.beginPath(),a.moveTo(le.startX,le.startY),he=le.segments.s,ge=he.length;for(var xe=null,Ee=0;Ee<ge;Ee++){var Ne=he[Ee];switch(Ne.type){case ur:a.moveTo(Ne.endX,Ne.endY);break;case Qi:a.lineTo(Ne.endX,Ne.endY);break;case eo:a.bezierCurveTo(Ne.point1X,Ne.point1Y,Ne.point2X,Ne.point2Y,Ne.endX,Ne.endY);break;case Or:a.quadraticCurveTo(Ne.point1X,Ne.point1Y,Ne.endX,Ne.endY);break;case Yr:if(Ne.radiusX===Ne.radiusY){var Ye=Math.PI/180;a.arc(Ne.point1X,Ne.point1Y,Ne.radiusX,Ne.startAngle*Ye,(Ne.startAngle+Ne.sweepAngle)*Ye,0>Ne.sweepAngle,xe!==null?xe.endX:le.startX,xe!==null?xe.endY:le.startY)}else if(xe=No(Ne,le),Ye=xe.length,Ye===0)a.lineTo(Ne.centerX,Ne.centerY);else for(var je=0;je<Ye;je++){var nt=xe[je];je===0&&a.lineTo(nt[0],nt[1]),a.bezierCurveTo(nt[2],nt[3],nt[4],nt[5],nt[6],nt[7])}break;case Eo:if(je=Ye=0,xe!==null&&xe.type===Yr){if(xe=No(xe,le),nt=xe.length,nt===0){a.lineTo(Ne.endX,Ne.endY);break}xe=xe[nt-1]||null,xe!==null&&(Ye=xe[6],je=xe[7])}else Ye=xe!==null?xe.endX:le.startX,je=xe!==null?xe.endY:le.startY;if(xe=Gi(Ne,le,Ye,je),Ye=xe.length,Ye===0){a.lineTo(Ne.endX,Ne.endY);break}for(je=0;je<Ye;je++)nt=xe[je],a.bezierCurveTo(nt[2],nt[3],nt[4],nt[5],nt[6],nt[7]);break;default:Rt("Segment not of valid type: "+Ne.type)}Ne.isClosed&&a.closePath(),xe=Ne}he=le.isFilled,z?le.isShadowed?(he===!0&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&(he&&re&&Nc(a),a.jk(),he&&re&&Uc(a))):(Nc(a),he&&E!=="transparent"&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk(),Uc(a)):(he&&E!==null&&a.ng(E,le.isEvenOdd),x!==null&&a.jk()),a.Se(ye)}if(ee&&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=Yi(),z.type===wt.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),Pg(a,y,E,x);else if(z.type===wt.o)for(z=z.figures.iterator;z.next();){for(re=z.value,E.length=0,E.push(re.startX),E.push(re.startY),ee=re.startX,b=re.startY,oe=ee,ye=b,le=re.segments.s,he=le.length,ge=0;ge<he;ge++){switch(Ee=le[ge],Ee.type){case ur:Pg(a,y,E,x),E.length=0,E.push(Ee.endX),E.push(Ee.endY),ee=Ee.endX,b=Ee.endY,oe=ee,ye=b;break;case Qi:E.push(Ee.endX),E.push(Ee.endY),ee=Ee.endX,b=Ee.endY;break;case eo:Ie.Qe(ee,b,Ee.point1X,Ee.point1Y,Ee.point2X,Ee.point2Y,Ee.endX,Ee.endY,.5,E),ee=Ee.endX,b=Ee.endY;break;case Or:Ie.ep(ee,b,Ee.point1X,Ee.point1Y,Ee.endX,Ee.endY,.5,E),ee=Ee.endX,b=Ee.endY;break;case Yr:if(Ne=No(Ee,re),xe=Ne.length,xe===0){E.push(Ee.centerX),E.push(Ee.centerY),ee=Ee.centerX,b=Ee.centerY;break}for(Ye=0;Ye<xe;Ye++)je=Ne[Ye],Ie.Qe(ee,b,je[2],je[3],je[4],je[5],je[6],je[7],.5,E),ee=je[6],b=je[7];break;case Eo:if(Ne=Gi(Ee,re,ee,b),xe=Ne.length,xe===0){E.push(Ee.endX),E.push(Ee.endY),ee=Ee.endX,b=Ee.endY;break}for(Ye=0;Ye<xe;Ye++)je=Ne[Ye],Ie.Qe(ee,b,je[2],je[3],je[4],je[5],je[6],je[7],.5,E),ee=je[6],b=je[7];break;default:Rt("Segment not of valid type: "+Ee.type)}Ee.isClosed&&(E.push(oe),E.push(ye),Pg(a,y,E,x))}Pg(a,y,E,x)}else if(z.type===wt.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),Pg(a,y,E,x);else if(z.type===wt.F){if(b=new qr,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ee=new Ki(Yr),ee.startAngle=0,ee.sweepAngle=360,ee.centerX=(z.startX+z.endX)/2,ee.centerY=(z.startY+z.endY)/2,ee.radiusX=Math.abs(z.startX-z.endX)/2,ee.radiusY=Math.abs(z.startY-z.endY)/2,b.add(ee),z=No(ee,b),re=z.length,re===0)E.push(ee.centerX),E.push(ee.centerY);else for(ee=b.startX,b=b.startY,oe=0;oe<re;oe++)ye=z[oe],Ie.Qe(ee,b,ye[2],ye[3],ye[4],ye[5],ye[6],ye[7],.5,E),ee=ye[6],b=ye[7];Pg(a,y,E,x)}Wi(E),a.restore(),a.Vc(!1)}}}},we.kk=function(a,y,x){return!xt.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)},we.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:xt.prototype.nk.call(this,a)},we.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)}},we.ga=function(a,y){if(y===void 0&&(y=new $e),a instanceof Di){a.Mc()&&Rt("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},we.mi=function(a){a===void 0&&(a=new Xt);var y=this.naturalBounds,x=this.oe;y=Xt.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=$e.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Ka(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Ka(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Ka(a,E.x,E.y,0,0),Xt.free(y),$e.free(E),a},we.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!==wt.j||y||(b+=2);var z=Xt.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Xt.free(z),!1;if(E=b+1e-4,x.type===wt.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:(Xt.free(z),Ie.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===wt.u){y=x.startX;var ee=x.startY,re=x.endX;if(x=x.endY,z.x=Math.min(y,re),z.y=Math.min(ee,x),z.width=Math.abs(re-y),z.height=Math.abs(x-ee),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Xt.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Xt.free(z),a}if(x.type===wt.F){ee=x.startX,b=x.startY,re=x.endX;var oe=x.endY;if(x=Math.min(ee,re),y=Math.min(b,oe),ee=Math.abs(re-ee)/2,b=Math.abs(oe-b)/2,x=a.x-(x+ee),y=a.y-(y+b),this.fill===null){if(ee-=E,b-=E,0>=ee||0>=b||1>=x*x/(ee*ee)+y*y/(b*b))return Xt.free(z),!1;ee+=E,b+=E}return this.stroke!==null&&(ee+=E,b+=E),Xt.free(z),0>=ee||0>=b?!1:1>=x*x/(ee*ee)+y*y/(b*b)}if(x.type===wt.o)return Xt.free(z),this.fill===null?Ir(x,a.x,a.y,b):ko(x,a,b,1<this.strokeWidth,y);Rt("Unknown Geometry type: "+x.type)},we.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 ee=this.geometry.bounds;else{var re=this.figure,oe=bv[re];if(oe===void 0){var le=Ie.Ze[re];typeof le=="string"&&(le=Ie.Ze[le]),typeof le=="function"?(oe=le(null,100,100),bv[re]=oe):Rt("Unsupported Figure: "+re)}ee=oe.bounds}re=ee.width,oe=ee.height,le=ee.width;var he=ee.height;switch(gu(this,!0)){case fn:E=x=0;break;case yn:le=Math.max(a-z,0),he=Math.max(y-z,0);break;case Mi:le=Math.max(a-z,0),E=0;break;case Hi:x=0,he=Math.max(y-z,0)}isFinite(b.width)&&(le=b.width),isFinite(b.height)&&(he=b.height);var ge=this.maxSize,ye=this.minSize;switch(x=Math.max(x-z,ye.width),E=Math.max(E-z,ye.height),le=Math.min(ge.width,le),he=Math.min(ge.height,he),le=isFinite(le)?Math.max(x,le):Math.max(re,x),he=isFinite(he)?Math.max(E,he):Math.max(oe,E),x=Cv(this),x){case fn:break;case yn:re=le,oe=he;break;case wi:x=Math.min(le/re,he/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Rt(x+" is not a valid geometryStretch.")}this.Rd!==null?(re===0&&(re=.001),oe===0&&(oe=.001),x=this.Rd!==null?this.Rd:this.ua,ee=x.bounds,E=re/ee.width,ee=oe/ee.height,isFinite(E)||(E=1),isFinite(ee)||(ee=1),this.ua=E===1&&ee===1?x:x.copy().scale(E,ee)):this.ua!==null&&Ie.$(this.ua.Sk,a-z)&&Ie.$(this.ua.Rk,y-z)||(this.ua=Lr.makeGeometry(this,re,oe)),ee=this.ua.bounds,a===1/0||y===1/0?this.Ge(ee.x-z/2,ee.y-z/2,a===0&&re===0?0:ee.width+z,y===0&&oe===0?0:ee.height+z):this.Ge(-(z/2),-(z/2),le+z,he+z),b.w()?(le=b.width,he=b.height,le=Math.min(ge.width,le),he=Math.min(ge.height,he),le=Math.max(ye.width,le),he=Math.max(ye.height,he),this.dc.h(0,0,le,he)):this.dc.assign(ee)};function Cv(a){var y=a.geometryStretch;return a.Rd!==null?y===dr?yn:y:y===dr?bv[a.figure].defaultStretch:y}we.eh=function(a,y,x,E){Kl(this,a,y,x,E)},we.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},we.Sj=function(a,y,x,E,b){var z=this.transform,ee=1/(z.m11*z.m22-z.m12*z.m21),re=z.m22*ee,oe=-z.m12*ee,le=-z.m21*ee,he=z.m11*ee,ge=ee*(z.m21*z.dy-z.m22*z.dx),ye=ee*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*le+ge,ee=a*oe+y*he+ye,re=x*re+E*le+ge,oe=x*oe+E*he+ye,ge=this.ig/2,le=this.ua,le===null&&(this.measure(1/0,1/0),le=this.ua);var xe=le.bounds;if(he=!1,le.type===wt.j)if(1.5>=this.strokeWidth)he=Ie.Ve(le.startX,le.startY,le.endX,le.endY,z,ee,re,oe,b);else{if(le.startX===le.endX?(E=ge,he=0):(y=(le.endY-le.startY)/(le.endX-le.startX),he=ge/Math.sqrt(1+y*y),E=he*y),y=Yi(),a=new $e,Ie.Ve(le.startX+E,le.startY+he,le.endX+E,le.endY+he,z,ee,re,oe,a)&&y.push(a),a=new $e,Ie.Ve(le.startX-E,le.startY-he,le.endX-E,le.endY-he,z,ee,re,oe,a)&&y.push(a),a=new $e,Ie.Ve(le.startX+E,le.startY+he,le.startX-E,le.startY-he,z,ee,re,oe,a)&&y.push(a),a=new $e,Ie.Ve(le.endX+E,le.endY+he,le.endX-E,le.endY-he,z,ee,re,oe,a)&&y.push(a),re=y.length,re===0)return Wi(y),!1;for(he=!0,oe=1/0,E=0;E<re;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-ee)*(a.y-ee),x<oe&&(oe=x,b.x=a.x,b.y=a.y);Wi(y)}else if(le.type===wt.u)he=Ie.Ff(xe.x-ge,xe.y-ge,xe.x+xe.width+ge,xe.y+xe.height+ge,z,ee,re,oe,b);else if(le.type===wt.F){y=Xt.allocAt(xe.x,xe.y,xe.width,xe.height).Bc(ge,ge);e:if(y.width===0)he=Ie.Ve(y.x,y.y,y.x,y.y+y.height,z,ee,re,oe,b);else if(y.height===0)he=Ie.Ve(y.x,y.y,y.x+y.width,y.y,z,ee,re,oe,b);else{if(a=y.width/2,le=y.height/2,E=y.x+a,he=y.y+le,x=9999,z!==re&&(x=(ee-oe)/(z-re)),9999>Math.abs(x)){if(oe=ee-he-x*(z-E),0>a*a*x*x+le*le-oe*oe){b.x=NaN,b.y=NaN,he=!1;break e}ge=Math.sqrt(a*a*x*x+le*le-oe*oe),re=(-(a*a*x*oe)+a*le*ge)/(le*le+a*a*x*x)+E,a=(-(a*a*x*oe)-a*le*ge)/(le*le+a*a*x*x)+E,le=x*(re-E)+oe+he,oe=x*(a-E)+oe+he,Math.abs((z-re)*(z-re))+Math.abs((ee-le)*(ee-le))<Math.abs((z-a)*(z-a))+Math.abs((ee-oe)*(ee-oe))?(b.x=re,b.y=le):(b.x=a,b.y=oe)}else{if(re=le*le,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,he=!1;break e}oe=Math.sqrt(re),re=he+oe,oe=he-oe,Math.abs(re-ee)<Math.abs(oe-ee)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}he=!0}Xt.free(y)}else if(le.type===wt.o){ye=$e.alloc();var Ee=re-z,Ne=oe-ee,Ye=Ee*Ee+Ne*Ne,je=z,nt=ee;if(0<Ye&&xe.contains(je,nt)&&(ye.x=je,ye.y=nt,this.ca(ye)))for(Ee!==0&&.5>Math.abs(Ee)?(Ne*=.5/Ee,Ee=.5):Ne!==0&&.5>Math.abs(Ne)&&(Ee*=.5/Ne,Ne=.5),je-=Ee,nt-=Ne;xe.contains(je,nt);)je-=Ee,nt-=Ne;for(b.x=re,b.y=oe,Ne=0;Ne<le.figures.count;Ne++){var ot=le.figures.s[Ne],ut=ot.isFilled?je:z,vt=ot.isFilled?nt:ee,Dt=ot.segments;xe=ot.startX,Ee=ot.startY;for(var Wn=xe,vi=Ee,si=0;si<Dt.count;si++){var Mn=Dt.s[si],sn=Mn.type,hr=Mn.endX,Ji=Mn.endY,Do=!1;switch(sn){case ur:Wn=hr,vi=Ji;break;case Qi:Do=Dm(xe,Ee,hr,Ji,ut,vt,re,oe,ye);break;case eo:Do=Ie.Eo(xe,Ee,Mn.point1X,Mn.point1Y,Mn.point2X,Mn.point2Y,hr,Ji,ut,vt,re,oe,.6,ye);break;case Or:Do=Ie.Eo(xe,Ee,xe+2/3*(Mn.point1X-xe),Ee+2/3*(Mn.point1Y-Ee),hr+2/3*(Mn.point1X-hr),Ji+2/3*(Mn.point1Y-Ji),hr,Ji,ut,vt,re,oe,.6,ye);break;case Yr:case Eo:sn=Mn.type===Yr?No(Mn,ot):Gi(Mn,ot,xe,Ee);var ya=sn.length;if(ya===0){Do=Dm(xe,Ee,Mn.type===Yr?Mn.centerX:Mn.endX,Mn.type===Yr?Mn.centerY:Mn.endY,ut,vt,re,oe,ye);break}for(Ji=null,hr=0;hr<ya;hr++){if(Ji=sn[hr],hr===0&&Dm(xe,Ee,Ji[0],Ji[1],ut,vt,re,oe,ye)){var Xs=Tm(ut,vt,ye,Ye,b);Xs<Ye&&(Ye=Xs,he=!0)}Ie.Eo(Ji[0],Ji[1],Ji[2],Ji[3],Ji[4],Ji[5],Ji[6],Ji[7],ut,vt,re,oe,.6,ye)&&(Xs=Tm(ut,vt,ye,Ye,b),Xs<Ye&&(Ye=Xs,he=!0))}hr=Ji[6],Ji=Ji[7];break;default:Rt("Unknown Segment type: "+sn)}xe=hr,Ee=Ji,Do&&(Do=Tm(ut,vt,ye,Ye,b),Do<Ye&&(Ye=Do,he=!0)),Mn.isClosed&&(hr=Wn,Ji=vi,Dm(xe,Ee,hr,Ji,ut,vt,re,oe,ye)&&(Mn=Tm(ut,vt,ye,Ye,b),Mn<Ye&&(Ye=Mn,he=!0)))}}z=x-a,ee=E-y,re=Math.sqrt(z*z+ee*ee),re!==0&&(z/=re,ee/=re),b.x-=z*ge,b.y-=ee*ge,$e.free(ye)}else Rt("Unknown Geometry type: "+le.type);return he?(this.transform.Ga(b),!0):!1};function Tm(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 Dm(a,y,x,E,b,z,ee,re,oe){if(Ie.$(a,x)&&Ie.$(y,E)||Ie.$(b,ee)&&Ie.$(z,re))return!1;var le=!1,he=(b-ee)*(y-E)-(z-re)*(a-x);return he===0?!1:(oe.x=((b*re-z*ee)*(a-x)-(b-ee)*(a*E-y*x))/he,oe.y=((b*re-z*ee)*(y-E)-(z-re)*(a*E-y*x))/he,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(oe.y>a||Ie.$(oe.y,a))&&(oe.y<y||Ie.$(oe.y,y))&&(le=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||Ie.$(oe.x,y))&&(oe.x<a||Ie.$(oe.x,a))&&(le=!0)),le)}we.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=$e.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)))),$e.free(z),b},we.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=ct.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ee=$e.alloc();if(ee.h(E,z),x.Ga(ee),this.gh(ee,!0)||(ee.h(b,z),x.Ga(ee),this.gh(ee,!0))||(ee.h(E,a),x.Ga(ee),this.gh(ee,!0))||(ee.h(b,a),x.Ga(ee),this.gh(ee,!0)))return $e.free(ee),!0;var re=$e.alloc(),oe=$e.alloc();return x.set(y),x.bv(this.transform),x.Vj(),re.x=b,re.y=z,re.transform(x),ee.x=E,ee.y=z,ee.transform(x),y=!1,wf(this,ee,re,oe)?y=!0:(ee.x=b,ee.y=a,ee.transform(x),wf(this,ee,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),wf(this,ee,re,oe)?y=!0:(ee.x=E,ee.y=z,ee.transform(x),wf(this,ee,re,oe)&&(y=!0)))),$e.free(ee),ct.free(x),$e.free(re),$e.free(oe),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)}we.tx=function(a,y,x){function E(Ye,je){for(var nt=Ye.length,ot=0;ot<nt;ot+=2)if(je.zd(Ye[ot],Ye[ot+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 ee=y.bounds,re=ee.x,oe=ee.y,le=ee.x+ee.width;if(ee=ee.y+ee.height,Nr(a.x,a.y,re,oe)<=b&&Nr(a.x,a.y,le,oe)<=b&&Nr(a.x,a.y,re,ee)<=b&&Nr(a.x,a.y,le,ee)<=b)return!0}if(re=y.startX,oe=y.startY,le=y.endX,ee=y.endY,y.type===wt.j){if(x=(re-le)*(a.x-le)+(oe-ee)*(a.y-ee),qa(a.x,a.y,re,oe,le,ee)<=(0<=(le-re)*(a.x-re)+(ee-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===wt.u)return y=!1,x&&(y=qa(a.x,a.y,re,oe,re,ee)<=b||qa(a.x,a.y,re,oe,le,oe)<=b||qa(a.x,a.y,le,oe,le,ee)<=b||qa(a.x,a.y,re,ee,le,ee)<=b),y;if(y.type===wt.F){y=a.x-(re+le)/2,z=a.y-(oe+ee)/2;var he=Math.abs(le-re)/2,ge=Math.abs(ee-oe)/2;if(he===0||ge===0)return qa(a.x,a.y,re,oe,le,ee)<=b;if(x){if(a=Ie.$y(he,ge,y,z),a*a<=b)return!0}else return!(Nr(y,z,-he,0)>=b||Nr(y,z,0,-ge)>=b||Nr(y,z,0,ge)>=b||Nr(y,z,he,0)>=b)}else if(y.type===wt.o){if(le=y.bounds,z=le.x,re=le.y,oe=le.x+le.width,le=le.y+le.height,a.x>oe&&a.x<z&&a.y>le&&a.y<re&&qa(a.x,a.y,z,re,z,le)>b&&qa(a.x,a.y,z,re,oe,re)>b&&qa(a.x,a.y,oe,le,z,le)>b&&qa(a.x,a.y,oe,le,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Ir(y,a.x,a.y,z):ko(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],ee=z.startX,he=z.startY,a.zd(ee,he)>b)return!1;for(re=z.segments.s,oe=re.length,le=0;le<oe;le++)switch(ge=re[le],ge.type){case ur:case Qi:if(ee=ge.endX,he=ge.endY,a.zd(ee,he)>b)return!1;break;case eo:var ye=Yi();if(Ie.Qe(ee,he,ge.point1X,ge.point1Y,ge.point2X,ge.point2Y,ge.endX,ge.endY,.8,ye),ee=E(ye,a),Wi(ye),ee||(ee=ge.endX,he=ge.endY,a.zd(ee,he)>b))return!1;break;case Or:if(ye=Yi(),Ie.ep(ee,he,ge.point1X,ge.point1Y,ge.endX,ge.endY,.8,ye),ee=E(ye,a),Wi(ye),ee||(ee=ge.endX,he=ge.endY,a.zd(ee,he)>b))return!1;break;case Yr:case Eo:ye=ge.type===Yr?No(ge,z):Gi(ge,z,ee,he);var xe=ye.length;if(xe===0){if(ee=ge.type===Yr?ge.centerX:ge.endX,he=ge.type===Yr?ge.centerY:ge.endY,a.zd(ee,he)>b)return!1;break}ge=null;for(var Ee=Yi(),Ne=0;Ne<xe;Ne++)if(ge=ye[Ne],Ee.length=0,Ie.Qe(ge[0],ge[1],ge[2],ge[3],ge[4],ge[5],ge[6],ge[7],.8,Ee),E(Ee,a))return Wi(Ee),!1;Wi(Ee),ge!==null&&(ee=ge[6],he=ge[7]);break;default:Rt("Unknown Segment type: "+ge.type)}}return!0}}}return!1},we.qc=function(){this.ua=null},we.kq=function(){return this.ig};function m1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=Cp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=_s):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Di(1-_s.x,_s.y)))}Lr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Bc[a.toArrow];else a.fromArrow!=="None"?E=Bc[a.fromArrow]:(E=Ie.Ze[a.figure],typeof E=="string"&&(E=Ie.Ze[E]),E===void 0&&Rt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=Ie.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function v1(a){var y=Bc[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Bc[x],y===void 0){var E=null,b;for(b in Ie.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=wt.parse(Ie.um[E],!1),Bc[E]=a,x!==E&&(Bc[x]=E),E}}return typeof y=="string"?y:y instanceof wt?a:null}Jt.Object.defineProperties(Lr.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),Pl(this)&&(a=this.part,a!==null&&Aa(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=wt.parse(a);var y=a.normalize();this.geometry=a,this.position=a=$e.allocAt(-y.x,-y.y),$e.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&&Hf(a,"Shape.fill"),a instanceof Qo&&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&&Hf(a,"Shape.stroke"),a instanceof Qo&&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 Zi(a,"value >= 0",Lr,"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"?Zi(a,'"butt", "round", or "square"',Lr,"strokeCap"):(xf(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"?Zi(a,'"miter", "bevel", or "round"',Lr,"strokeJoin"):(xf(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){xf(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)||Rt("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&&(xf(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=Ie.Ze[a];typeof x=="function"?x=a:(x=Ie.Ze[a.toLowerCase()])||Rt("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=v1(a);x===null?Rt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Rd),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),m1(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=v1(a);x===null?Rt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Rd),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),m1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Fs},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),xf(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Fs},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),xf(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&&(xf(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:dr},set:function(a){var y=this.geometryStretch;y!==a&&(xf(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 Tc),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&dl(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 Tc),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 Tc),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 Tc),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Lr.prototype.intersectsRect=Lr.prototype.Yc,Lr.prototype.containedInRect=Lr.prototype.fh,Lr.prototype.getNearestIntersectionPoint=Lr.prototype.rs,Lr.prototype.getDocumentBounds=Lr.prototype.mi,Lr.prototype.getDocumentPoint=Lr.prototype.ga;var Bc=new Pr,bv=new Pr;Lr.className="Shape",Lr.getFigureGenerators=function(){var a=new ki,y;for(y in Ie.Ze)y!==y.toLowerCase()&&a.add(y,Ie.Ze[y]);return a.freeze(),a},Lr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=Ie.Ze;E[a]=y,E[x]=a},Lr.getArrowheadGeometries=function(){var a=new ki;for(E in Ie.um)if(Bc[E]===void 0){var y=wt.parse(Ie.um[E],!1);Bc[E]=y,y=E.toLowerCase(),y!==E&&(Bc[y]=E)}for(var x in Bc)if(x!==x.toLowerCase()){var E=Bc[x];E instanceof wt&&a.add(x,E)}return a.freeze(),a},Lr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=wt.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Rt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Bc;E[a]=x,E[y]=a};function Lv(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=dr,this.gg=this.fg=Fs}Lv.prototype.copy=function(){var a=new Lv;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 Sa(a,y){return xt.call(this),jm||(pu=is?new wh(null).context:null,jm=!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}Ct(Sa,xt),Sa.prototype.cloneProtected=function(a){xt.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 xc(a){a.da===null?a.da=new Tv:a.da.nc&&(a.da=a.da.copy())}we=Sa.prototype,we.th=function(){xt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function y1(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}we.qb=function(a){a.classType===Sa?this.wrap=a:xt.prototype.qb.call(this,a)},we.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},we.v=function(){xt.prototype.v.call(this)},we.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,ee=vp(this),re=a.textAlign=this.textAlign,oe=y.tn;re==="start"?re=oe?"right":"left":re==="end"&&(re=oe?"left":"right"),oe=this.isUnderline;var le=this.isStrikethrough;hs(this,a,this.xc,!0,!1,x,E),(oe||le)&&hs(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var he=this.oe,ge=he.dx-(ee*he.m21+he.dx);he=he.dy-(ee*he.m22+he.dy);var ye=y.scale;switch(8>(ge*ge+he*he)*ye*ye&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Gu&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ge=this.spacingBelow,this.flip){case Po:a.translate(b,0),a.scale(-1,1);break;case Dr:a.translate(0,z),a.scale(1,-1);break;case aa:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),he=this.Gc,ye=(y+ee+ge)*he,z>ye&&(E=this.verticalAlignment,E=E.y*z-E.y*ye+E.offsetY),he===1&&this.ze!==null)ge=this.Cb,ge>b&&(ge=b),this.Oj(this.ze,a,0,E+y,b,ee,ge,x,re,oe,le);else if(this.Qc!==null&&this.Qb!==null)for(ye=0;ye<he;ye++){var xe=this.Qc[ye];xe>b&&(xe=b),E+=y,this.Oj(this.Qb[ye],a,0,E,b,ee,xe,x,re,oe,le),E+=ee+ge}switch(this.flip){case Po:a.scale(-1,1),a.translate(-b,0);break;case Dr:a.scale(1,-1),a.translate(0,-z);break;case aa:a.scale(-1,-1),a.translate(-b,-z)}}},we.Oj=function(a,y,x,E,b,z,ee,re,oe,le,he){var ge=0;if(re)oe==="left"?ge=0:oe==="right"?ge=b-ee:oe==="center"&&(ge=(b-ee)/2),y.fillRect(x+ge,E+.25*z,ee,1);else{if(oe==="left"?ge=0:oe==="right"?ge=b:oe==="center"&&(ge=b/2),b=Om!==null?Om(this,z):.75*z,y.fillText(a,x+ge,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?ge-=ee:oe==="center"&&(ge-=ee/2),le){re=_m!==null?_m(this,z):.8*z,oe=x+ge,le=E+re,b=x+ge+ee,re=E+re;var ye=a;y.beginPath(),y.lineWidth=ye,y.moveTo(oe,le),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Gu&&y.ad.classList.add("gojs-td")}he&&(he=E+z-z/2.2|0,a%2!==0&&(he+=.5),E=x+ge,z=he,x=x+ge+ee,ee=he,ge=a,y.beginPath(),y.lineWidth=ge,y.moveTo(E,z),y.lineTo(x,ee),y.stroke(),y.Se(),y instanceof Gu&&y.ad.classList.add("gojs-td"))}},we.kk=function(a,y,x){if(!xt.prototype.kk.call(this,a,y,x))return!1;if(hs(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++)Qy(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qy(a,y,!0);return!0},we.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:xt.prototype.nk.call(this,a)},we.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)}},we.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;pu!==null&&b1!==z&&(b1=pu.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var ee;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 re=ee=0,oe=!1;!oe;){var le=z.indexOf(`
|
|
`,re);le===-1&&(le=z.length,oe=!0),re=z.substr(re,le-re),this.formatting===yp&&(re=re.trim()),ee=Math.max(ee,Oh(re)),re=le+1}z=ee}else ee=z.indexOf(`
|
|
`,0),0<=ee&&(z=z.substr(0,ee)),z=Oh(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)),ee=x1(this,z),isNaN(this.desiredSize.height)?ee=Math.min(ee,y/this.scale):ee=this.desiredSize.height,oe=ee,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===Im&&(y=this.Ae,y=this.overflow===Im?S1(y):0,le=this.spacingAbove+this.spacingBelow,le=Math.max(0,vp(this)+le),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/le+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,le=this.Qb[oe],y=Math.max(1,a-y);Oh(le)>y&&1<le.length;)le=le.substr(0,le.length-1);le+=Sp,y=Oh(le),this.Qb[oe]=le,this.Qb=this.Qb.slice(0,oe+1),this.Qc[oe]=y,this.Qc=this.Qc.slice(0,oe+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===w1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ee=Math.max(E,ee),El(this.dc,z,ee),this.Ge(0,0,z,ee),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},we.eh=function(a,y,x,E){Kl(this,a,y,x,E)};function mp(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 Mv(a,y,x,E){var b=a.formatting===yp;b&&(y=y.trim());var z=0,ee=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,vp(a)+re);var oe=a.overflow===Im?S1(ee):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ee=y,a.wrap===Fv){a.Le=1;var le=Oh(y);if(oe===0||le<=x)a.Cb=Math.max(a.Cb,le),mp(a,y,a.Cb),E!==null&&E.h(le,re);else{for(z=Eg(a,ee),ee=ee.substr(z.length),y=Eg(a,ee),le=Oh(z+y);0<y.length&&le<=x;)z+=y,ee=ee.substr(y.length),y=Eg(a,ee),le=z+y,b&&(le=le.trim()),le=Oh(le);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);Oh(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Sp;var he=Oh(z);a.Cb=he,mp(a,z,he),E!==null&&E.h(he,re)}}else{for(oe=0,ee.length===0&&(oe=1,mp(a,ee,0));0<ee.length;){for(y=Eg(a,ee),ee=ee.substr(y.length);Oh(y)>x;){var ge=1;for(le=Oh(y.substr(0,ge)),he=0;le<=x;)ge++,he=le,le=Oh(y.substr(0,ge));if(ge===1){var ye=le;z=Math.max(z,le)}else ye=he,z=Math.max(z,he);if(ge--,1>ge&&(ge=1),mp(a,y.substr(0,ge),ye),oe++,y=y.substr(ge),a.Gc+oe>a.maxLines)break}for(he=Eg(a,ee),le=Oh(y+he);0<he.length&&le<=x;)y+=he,ee=ee.substr(he.length),he=Eg(a,ee),le=y+he,b&&(le=le.trim()),le=Oh(le);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),he.length===0?(ge=le,z=Math.max(z,le)):(ge=he=Oh(y),z=Math.max(z,he)),mp(a,y,ge),oe++,a.Gc+oe>a.maxLines))break}a.Le=Math.min(a.maxLines,oe),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,re*a.Le)}}function Eg(a,y){if(a.wrap===P1)return y.substr(0,1);for(var x=y.length,E=0,b=Sx;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===E1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Oh(a){return pu===null?8*a.length:pu.measureText(a).width}function vp(a){if(a.df!==null)return a.df;var y=a.Ae;if(pu===null){var x=16;return a.df=x}return Av[y]!==void 0&&5e3>C1?x=Av[y]:(x=1.3*pu.measureText("M").width,Av[y]=x,C1++),a.df=x}function S1(a){if(pu===null)return 6;if(Rm[a]!==void 0&&5e3>Bv)var y=Rm[a];else y=pu.measureText(Sp).width,Rm[a]=y,Bv++;return y}function x1(a,y){var x=a.ec.replace(/\r\n/g,`
|
|
`).replace(/\r/g,`
|
|
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,vp(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,ee,re=!1;!re;){if(ee=x.indexOf(`
|
|
`,z),ee===-1&&(ee=x.length,re=!0),z<=ee){if(z=x.substr(z,ee-z),a.wrap!==Fv){a.Le=0;var oe=un.alloc();Mv(a,z,y,oe),b+=oe.height,un.free(oe),a.Gc+=a.Le}else Mv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ee+1}return a.Lq=b}Jt.Object.defineProperties(Sa.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"||(xc(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:fn},set:function(a){var y=this.flip;y!==a&&(xc(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:cc},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),xc(this),this.da.Yr=a,ql(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=un.alloc();Mv(this,this.ec,999999,a);var y=a.width;un.free(a),a=x1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),El(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:kv},set:function(a){var y=this.wrap;y!==a&&(xc(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Nv},set:function(a){var y=this.overflow;y!==a&&(xc(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&&Hf(a,"TextBlock.stroke"),a instanceof Qo&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return vp(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&&(xc(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&&(xc(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 Tc),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 Tc),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 Tc),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 Tc),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 Tc),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&&(xc(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&&(xc(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&&(xc(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&&(xc(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:yp},set:function(a){var y=this.formatting;y!==a&&(xc(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&&Zi(a,"> 0",Sa,"maxLines"),xc(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 Om=null,_m=null,Fv=new Wt(Sa,"None",0),w1=new Wt(Sa,"WrapFit",1),kv=new Wt(Sa,"WrapDesiredSize",2),P1=new Wt(Sa,"WrapBreakAll",3),Nv=new Wt(Sa,"OverflowClip",0),Im=new Wt(Sa,"OverflowEllipsis",1),yp=new Wt(Sa,"FormatTrim",0),E1=new Wt(Sa,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Av=new Pr,C1=0,Rm=new Pr,Bv=0,Sp="...",b1="",pu=null,jm=!1;Sa.className="TextBlock";function Tv(){this.nc=!1,this.Hd=null,this.Xf=fn,this.gq=yp,this.Jq=1/0,this.$q=Nv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=cc,this.$r=kv}Tv.prototype.copy=function(){var a=new Tv;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},Sa.getEllipsis=function(){return Sp},Sa.setEllipsis=function(a){Sp=a,Rm=new Pr,Bv=0},Sa.getBaseline=function(){return Om},Sa.setBaseline=function(a){Om=a},Sa.getUnderline=function(){return _m},Sa.setUnderline=function(a){_m=a},Sa.isValidFont=function(a){if(jm||(pu=is?new wh(null).context:null,jm=!0),pu===null)return!0;var y=pu.font;if(a===y||a==="10px sans-serif")return!0;pu.font="10px sans-serif",pu.font=a;var x=pu.font;if(x!=="10px sans-serif")return pu.font=y,!0;pu.font="19px serif";var E=pu.font;return pu.font=a,x=pu.font,pu.font=y,x!==E},Sa.FormatNone=E1,Sa.FormatTrim=yp,Sa.None=Fv,Sa.OverflowClip=Nv,Sa.OverflowEllipsis=Im,Sa.WrapBreakAll=P1,Sa.WrapDesiredSize=kv,Sa.WrapFit=w1;function Tc(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}Tc.prototype.copy=function(){var a=new Tc;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},Tc.className="GradElementSettings";function mu(a,y){xt.call(this),this.Eg=null,this.qo="",this.Xg=Ua,this.Nk=yn,this.Zg=this.Hd=null,this.Mk=Oo,this.Xf=fn,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 Cg;Ct(mu,xt),mu.prototype.cloneProtected=function(a){xt.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},mu.prototype.qb=function(a){a===fn||a===wi||a===oo?this.imageStretch=a:xt.prototype.qb.call(this,a)},mu.prototype.toString=function(){return"Picture("+this.source+")#"+Vr(this)};function bg(a){a===void 0&&(a=""),a!==""?Cg[a]&&(delete Cg[a],zm--):(Cg=new Pr,zm=0)}function L1(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")||"",ee=b.Og.I(z);if(ee!==null)for(var re=ee.length,oe=0;oe<re;oe++)z=ee[oe],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()||(Bs(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")||"",ee=b.Og.I(z);if(ee!==null){b=ee.length,z=Yi();for(var re=0;re<b;re++)z.push(ee[re]);if(y.hn)for(re=0;re<b;re++)ee=z[re],ee.Hd!==null&&ee.Hd(ee,x);Wi(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}mu.prototype.hA=function(){if(this.source!==""){bg(this.source);var a=this.source;this.source="",this.source=a}},mu.prototype.redraw=function(){this.N(),this.Uc=!0},mu.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 yf)){var b=a instanceof Gu;E=this.naturalBounds;var z=0,ee=0,re=this.qn,oe=re?+x.width:x.naturalWidth;if(re=re?+x.height:x.naturalHeight,oe===void 0&&x.videoWidth&&(oe=x.videoWidth),re===void 0&&x.videoHeight&&(re=x.videoHeight),oe=oe||E.width,re=re||E.height,oe!==0&&re!==0){var le=oe,he=re;this.sourceRect.w()&&(z=this.Xg.x,ee=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var ge=oe,ye=re,xe=this.Nk,Ee=this.Mk;switch(xe){case fn:if(this.sourceRect.w())break;ge>=E.width&&(z=z+Ee.offsetX+(ge*Ee.x-E.width*Ee.x)),ye>=E.height&&(ee=ee+Ee.offsetY+(ye*Ee.y-E.height*Ee.y)),oe=Math.min(E.width,ge),re=Math.min(E.height,ye);break;case yn:ge=E.width,ye=E.height;break;case wi:case oo:xe===wi?(xe=Math.min(E.height/ye,E.width/ge),ge*=xe,ye*=xe):xe===oo&&(xe=Math.max(E.height/ye,E.width/ge),ge*=xe,ye*=xe,ge>=E.width&&(z=(z+Ee.offsetX+(ge*Ee.x-E.width*Ee.x)/ge)*oe),ye>=E.height&&(ee=(ee+Ee.offsetY+(ye*Ee.y-E.height*Ee.y)/ye)*re),oe*=1/(ge/E.width),re*=1/(ye/E.height),ge=E.width,ye=E.height)}xe=this.Df()*y.scale;var Ne=ge*xe*ye*xe,Ye=oe*re/Ne,je=x.__goCache;xe=null;var nt=xx;if(!b){if(x.sq&&je!==void 0&&4<Ne&&Ye>nt*nt)for(je.gi===null&&(F1(je,4,le,he,x),F1(je,16,le,he,x)),b=je.gi,le=b.length,he=0;he<le&&b[he].ratio*b[he].ratio<Ye;he++)xe=b[he];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new wh(null).context;try{b.drawImage(this.Eg,0,0)}catch(ot){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ot){this.vl=!0}}if(this.vl)return}}switch(b=ge<E.width?Ee.offsetX+(E.width*Ee.x-ge*Ee.x):0,Ee=ye<E.height?Ee.offsetY+(E.height*Ee.y-ye*Ee.y):0,this.flip){case Po:a.translate(Math.min(E.width,ge),0),a.scale(-1,1);break;case Dr:a.translate(0,Math.min(E.height,ye)),a.scale(1,-1);break;case aa:a.translate(Math.min(E.width,ge),Math.min(E.height,ye)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&je!==void 0&&xe!==null&&xe.ratio!==1){a.save(),y=xe.ratio;try{a.drawImage(xe.source,z/y,ee/y,Math.min(xe.source.width,oe/y),Math.min(xe.source.height,re/y),b,Ee,Math.min(E.width,ge),Math.min(E.height,ye)),a instanceof Gu&&(this.bt=[z/y,ee/y,Math.min(xe.source.width,oe/y),Math.min(xe.source.height,re/y),b,Ee,Math.min(E.width,ge),Math.min(E.height,ye)])}catch(ot){this.en=!1}a.restore()}else try{a.drawImage(x,z,ee,oe,re,b,Ee,Math.min(E.width,ge),Math.min(E.height,ye)),a instanceof Gu&&(this.bt=[z,ee,oe,re,b,Ee,Math.min(E.width,ge),Math.min(E.height,ye)])}catch(ot){this.en=!1}switch(this.flip){case Po:a.scale(-1,1),a.translate(-Math.min(E.width,ge),0);break;case Dr:a.scale(1,-1),a.translate(0,-Math.min(E.height,ye));break;case aa:a.scale(-1,-1),a.translate(-Math.min(E.width,ge),-Math.min(E.height,ye))}}}}},mu.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=gu(this,!0),ee=this.Eg,re=this.qn,oe=0,le=0;(re||!this.al&&ee&&ee.complete)&&(this.al=!0),ee===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(oe=re?+ee.width:ee.naturalWidth,le=re?+ee.height:ee.naturalHeight),isFinite(b.width)||z===yn||z===Mi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:ee!==null&&(a=oe)),x=0):ee!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:oe),isFinite(b.height)||z===yn||z===Hi?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ee!==null&&(y=le)),E=0):ee!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:le),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),ee===null||ee.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),El(this.dc,a,y),this.Ge(0,0,a,y)},mu.prototype.eh=function(a,y,x,E){Kl(this,a,y,x,E)},Jt.Object.defineProperties(mu.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||Rt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&mc(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new Sn),E!==null&&x&&Mu(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()||(Bs(this,!1),this.v())):x&&L1(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=Cg;if(is){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<zm&&(bg(),x=Cg),E=Ln("img"),E.hn=!0,L1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,zm++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new M1),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}}}),mu.prototype.redraw=mu.prototype.redraw,mu.prototype.reloadSource=mu.prototype.hA;var zm=0,xx=4;mu.className="Picture",Cg=new Pr,mu.clearCache=bg;function M1(){this.gi=null}function F1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new wh(null),ee=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new k1(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),ee.setTransform(re*x,0,0,re*x,0,0),ee.yc(),ee.drawImage(b,0,0),a.gi.push(y))}M1.className="PictureCacheArray";function k1(a,y){this.source=a,this.ratio=y}k1.className="PictureCacheInstance";function Lg(){this.os=new wt,this.mc=null}Lg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new wt,this.mc=null};function Mg(a,y,x,E,b,z){a.mc=new qr,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 wx(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Lg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Ki(ur);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Lg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Ki(Qi);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function md(a,y,x,E,b,z,ee){var re;re===void 0&&(re=!1);var oe=new Ki(eo);oe.point1X=y,oe.point1Y=x,oe.point2X=E,oe.point2Y=b,oe.endX=z,oe.endY=ee,re&&oe.close(),a.mc.segments.add(oe)}function Gm(a,y,x,E,b){var z;z===void 0&&(z=!1);var ee=new Ki(Or);ee.point1X=y,ee.point1Y=x,ee.endX=E,ee.endY=b,z&&ee.close(),a.mc.segments.add(ee)}Lg.prototype.arcTo=function(a,y,x,E,b,z,ee){z===void 0&&(z=0),ee===void 0&&(ee=!1);var re=new Ki(Yr);re.startAngle=a,re.sweepAngle=y,re.centerX=x,re.centerY=E,re.radiusX=b,re.radiusY=z!==0?z:b,ee&&re.close(),this.mc.segments.add(re)};function Px(a,y,x,E,b,z,ee,re){var oe;oe===void 0&&(oe=!1),y=new Ki(Eo,ee,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function N1(a){var y=Hm;return y!==null?(Hm=null,y.reset(a),y):(y=new Lg,y.reset(a),y)}var Hm=null;Lg.className="StreamGeometryContext";function jl(a,y){var x=a.toLowerCase(),E=Ie.Ze;E[a]=y,E[x]=a}jl("Rectangle",function(a,y,x){a="r"+y+","+x;var E=Ie.Mf[a];return E!==void 0||(E=new wt(wt.u),E.endX=y,E.endY=x,Ie.Nf<Ie.vm&&(Ie.Mf[a]=E,Ie.Nf++)),E}),jl("Square",function(a,y,x){a="s"+y+","+x;var E=Ie.Mf[a];return E!==void 0||(E=new wt(wt.u),E.endX=y,E.endY=x,E.defaultStretch=wi,Ie.Nf<Ie.vm&&(Ie.Mf[a]=E,Ie.Nf++)),E}),jl("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=Ie.Mf[E];if(b!==void 0)return b;var z=a*Ie.wg;return b=new wt().add(new qr(a,0,!0).add(new Ki(Qi,y-a,0)).add(new Ki(eo,y,a,y-z,0,y,z)).add(new Ki(Qi,y,x-a)).add(new Ki(eo,y-a,x,y,x-z,y-z,x)).add(new Ki(Qi,a,x)).add(new Ki(eo,0,x-a,z,x,0,x-z)).add(new Ki(Qi,0,a)).add(new Ki(eo,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Di(0,0,z,z),b.spot2=new Di(1,1,-z,-z)),Ie.Nf<Ie.vm&&(Ie.Mf[E]=b,Ie.Nf++),b}),jl("Border","RoundedRectangle"),jl("Ellipse",function(a,y,x){a="e"+y+","+x;var E=Ie.Mf[a];return E!==void 0||(E=new wt(wt.F),E.endX=y,E.endY=x,E.spot1=Xh,E.spot2=ys,Ie.Nf<Ie.vm&&(Ie.Mf[a]=E,Ie.Nf++)),E}),jl("Circle",function(a,y,x){a="c"+y+","+x;var E=Ie.Mf[a];return E!==void 0||(E=new wt(wt.F),E.endX=y,E.endY=x,E.spot1=Xh,E.spot2=ys,E.defaultStretch=wi,Ie.Nf<Ie.vm&&(Ie.Mf[a]=E,Ie.Nf++)),E}),jl("TriangleRight",function(a,y,x){return new wt().add(new qr(0,0).add(new Ki(Qi,y,.5*x)).add(new Ki(Qi,0,x).close())).pm(0,.25,.5,.75)}),jl("TriangleDown",function(a,y,x){return new wt().add(new qr(0,0).add(new Ki(Qi,y,0)).add(new Ki(Qi,.5*y,x).close())).pm(.25,0,.75,.5)}),jl("TriangleLeft",function(a,y,x){return new wt().add(new qr(y,x).add(new Ki(Qi,0,.5*x)).add(new Ki(Qi,y,0).close())).pm(.5,.25,1,.75)}),jl("TriangleUp",function(a,y,x){return new wt().add(new qr(y,x).add(new Ki(Qi,0,x)).add(new Ki(Qi,.5*y,0).close())).pm(.25,.5,.75,1)}),jl("Triangle","TriangleUp"),jl("Diamond",function(a,y,x){return new wt().add(new qr(.5*y,0).add(new Ki(Qi,0,.5*x)).add(new Ki(Qi,.5*y,x)).add(new Ki(Qi,y,.5*x).close())).pm(.25,.25,.75,.75)}),jl("LineH",function(a,y,x){return a=new wt(wt.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),jl("LineV",function(a,y,x){return a=new wt(wt.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),jl("None","Rectangle"),jl("BarH","Rectangle"),jl("BarV","Rectangle"),jl("MinusLine","LineH"),jl("PlusLine",function(a,y,x){return new wt().add(new qr(0,x/2,!1).add(new Ki(Qi,y,x/2)).add(new Ki(ur,y/2,0)).add(new Ki(Qi,y/2,x)))}),jl("XLine",function(a,y,x){return new wt().add(new qr(0,x,!1).add(new Ki(Qi,y,0)).add(new Ki(ur,0,0)).add(new Ki(Qi,y,x)))}),jl("LineRight",function(a,y,x){return new wt().add(new qr(.25*y,0,!1).add(new Ki(Qi,.75*y,.5*x)).add(new Ki(Qi,.25*y,x)))}),jl("LineDown",function(a,y,x){return new wt().add(new qr(0,.25*x,!1).add(new Ki(Qi,.5*y,.75*x)).add(new Ki(Qi,y,.25*x)))}),jl("LineLeft",function(a,y,x){return new wt().add(new qr(.75*y,0,!1).add(new Ki(Qi,.25*y,.5*x)).add(new Ki(Qi,.75*y,x)))}),jl("LineUp",function(a,y,x){return new wt().add(new qr(0,.75*x,!1).add(new Ki(Qi,.5*y,.25*x)).add(new Ki(Qi,y,.75*x)))}),Ie.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 Dv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=vl,this.ir=null,this.jr="",this.lr=Fs,this.Gq="",this.Hq=Os,this.Pq=hu,this.Kq=cu,this.Up=null,this.Cq=127,this.zr=ul,this.yr="gray",this.Vg=4}Dv.prototype.copy=function(){var a=new Dv;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 Ti(a,y){a===void 0||a instanceof Is||typeof a=="string"?Pn.call(this,a):(Pn.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 $e(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Xt,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ct(Ti,Pn),Ti.prototype.cloneProtected=function(a){Pn.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},we=Ti.prototype,we.Af=function(a){Pn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},we.toString=function(){var a=er(this.constructor)+"#"+Vr(this);return this.data!==null&&(a+="("+Mo(this.data)+")"),a};function vu(a){a.P===null?a.P=new Dv:a.P.nc&&(a.P=a.P.copy())}we.th=function(){Pn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},we.gk=function(a,y,x,E,b,z,ee){var re=this.diagram;re!==null&&(a===Ao&&y==="elements"?b instanceof Pn?Sf(b,function(oe){sy(re.partManager,oe),qu(re,oe)}):Mu(re,b):a===Ho&&y==="elements"&&(b instanceof Pn?Sf(b,function(oe){ly(re.partManager,oe,re)}):mc(re,b)),re.cb(a,y,x,E,b,z,ee))},we.La=function(a){if(Pn.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 Pn&&Sf(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Ti.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Ti.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Ti.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 ki),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)))}}},Ti.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)}},Ti.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Yi();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);Wi(y)}},Ti.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()}e:{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 cr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Lo))break e;Ph(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Pn.Link),x.adornedObject=y)}if(x!==null){x.type===Pn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Ex(this,a),y=this.adornments;y.next();)y.value.La()}},Ti.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Ov(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function Ex(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function Zm(a){if(jd(a)===!1){Iv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function A1(a){if(a.G|=2097152,jd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||D1(a,y,x),x=a.Ib;var E=Xt.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Xt.free(E),Iv(a,!1)}}Ti.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new ct);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Ti.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Oo;this.locationSpot.sb()&&(z=this.locationSpot);var ee=$e.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,ee.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(ee),ee.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(ee),ee.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else ee.yi(y,x,E,b,z);a.rotate(this.Kb,ee.x,ee.y),$e.free(ee)}},Ti.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Ti.prototype.moveTo=function(a,y,x){a=$e.allocAt(a,y),this.move(a,x),$e.free(a)},Ti.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())},Ti.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())},Ti.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ki),y.I(a)!==null)return y.I(a);var x=Pn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function vd(a,y,x,E){E===void 0&&(E=new $e),x=x.Mc()?Oo: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}Ti.prototype.mi=function(a){return a===void 0&&(a=new Xt),a.assign(this.actualBounds)},Ti.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function B1(a){var y=$e.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Lr?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 Pf(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=u1(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 ee=a.shadowBlur;return a=a.shadowOffset,z+=ee,y+=ee,E-=ee/2,b-=ee/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}Ti.prototype.arrange=function(){if(eu(this)===!1)A1(this);else{kc(this,!1);var a=this.Ib,y=Xt.alloc();y.assign(a);var x=zd(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;D1(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()||Ie.B(y.width,a.width)&&Ie.B(y.height,a.height)||0<=this.vw&&this.C(16),Xt.free(y),Iv(this,!1)}},we=Ti.prototype,we.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Xt.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),Xt.free(b)}!(this.G&65536)&&a.D(y)||I1(this,E,x),x.N(),!a.w()&&!y.w()||vs(a,y)||(this instanceof Jn&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},we.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&T1(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 $e(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),jd(this)===!1&&eu(this)===!1&&(Zm(this),A1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof Lo||(y=y.animationManager,y.zb&&Oa(y,a,new $e(E,b),x))}we.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;jd(this)||eu(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)}Zm(this)},we.Av=function(){this.G&=-2097153,Zm(this)};function D1(a,y,x){var E=B1(a),b=a.diagram,z=x.w(),ee=y.w();z&&ee?a.G&2097152?O1(a,y,x,b,E):_1(a,y,x,b,E):z?O1(a,y,x,b,E):ee&&_1(a,y,x,b,E),a.G|=2097152,$e.free(E),a.Uk()}function O1(a,y,x,E,b){var z=y.x,ee=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 Lo||Oa(x,a,new $e(z,ee),y),E||y.x===z&&y.y===ee||a.g("position",new $e(z,ee),y.copy()))}function _1(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 I1(a,y,x){Rv(a,!1),a instanceof Jn&&hd(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?zd(a)?(yh(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}we.si=function(){return!0},we.Zc=function(){return!0},we.ph=function(){return!1},we.Dd=function(){return!0};function _v(a,y,x,E){y.constructor===a.constructor||z1||(z1=!0,Wr('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Wr(" Old class: "+er(a.constructor)+", new class: "+er(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,ee=a.isHighlighted,re=!0,oe=!0,le=!1;a instanceof Jn&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,le=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=ee?a.G|524288:a.G&-524289,a instanceof Jn&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=le?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)}Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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},Ti.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 jd(a){return(a.G&32768)!==0}function Iv(a,y){a.G=y?a.G|32768:a.G&-32769}function Rv(a,y){a.G=y?a.G|65536:a.G&-65537}function zd(a){return(a.G&131072)!==0}we=Ti.prototype,we.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function Wm(a,y){a.G=y?a.G|1048576:a.G&-1048577}we.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},we.N=function(){var a=this.diagram;a!==null&&!eu(this)&&!jd(this)&&this.isVisible()&&this.Ib.w()&&a.N(Pf(this,this.Ib))},we.v=function(){Pn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof Jn&&this.labeledLink!==null&&ql(this.labeledLink),a.$b(!0))},we.Vo=function(a){a||(a=this.Ah,a!==null&&Wv(a,this))},we.Wo=function(a){a||(a=this.Ah,a!==null&&Vv(a,this))},we.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},we.oz=function(){return jv(this,this)};function jv(a,y){var x=y.containingGroup;return x!==null?1+jv(a,x):y instanceof Jn&&(y=y.labeledLink,y!==null)?jv(a,y):0}we.sz=function(){return R1(this,this)};function R1(a,y){var x=y.containingGroup;return x!==null||y instanceof Jn&&(x=y.labeledLink,x!==null)?R1(a,x):y}we.Td=function(a){return a instanceof cr?zv(this,this,a):!1};function zv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!zv(a,E,x)?y instanceof Jn&&(y=y.labeledLink,y!==null)?zv(a,y,x):!1:!0}we.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof cr&&Wm(y,!0),y instanceof Jn){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 Jn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof cr&&Wm(y,!1),y instanceof Jn&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Ti.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof Jn&&this.isLinkLabel)},Ti.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 Jn&&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 j1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Gd(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Lo)){if(a.add(y),y instanceof Jn){if(x&&y instanceof cr)for(var ee=y.memberParts;ee.next();)Gd(a,ee.value,x,E,b,z);if(b!==!1)for(ee=y.linksConnected;ee.next();){var re=ee.value;if(!a.contains(re)){var oe=re.fromNode,le=re.toNode;oe=oe===null||a.contains(oe),le=le===null||a.contains(le),(b?oe&&le:oe||le)&&Gd(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)Gd(a,y.value,x,E-1,b,z)}else if(y instanceof Fn)for(y=y.labelNodes;y.next();)Gd(a,y.value,x,E,b,z)}}Jt.Object.defineProperties(Ti.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?na: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(Ho,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(Ao,"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&&(vu(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&&Zs(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 Lo?this.type!==Pn.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:hu},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),vu(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:cu},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),vu(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&&(vu(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:Os},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),vu(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,eu(this)===!1&&(Zm(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)),T1(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 Lo)){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 Lo?this instanceof Lo&&(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&&(Ph(x),x=x.copy(),x!==null&&_v(this,x,y,a))):(z!==null&&z.jm(E,a),x=cS(x.partManager,E,a),x!==null&&(Ph(x),x=x.copy(),x===null||x instanceof Fn||(E=this.location.copy(),_v(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){_v(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&&(vu(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&&(vu(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&&(vu(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 Fn?(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&&(vu(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&&(vu(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&&(vu(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:vl},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),vu(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&&(vu(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&&(vu(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:Fs},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),vu(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&&Rt("Cannot make a Group a member of itself: "+this.toString()),Rt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?Vv(y,this):this instanceof cr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?Wv(a,this):this instanceof cr&&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 cr){for(x=new Sn,Gd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof Jn)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof Jn){for(x=this.linksConnected;x.next();)Fg(x.value);x=this.labeledLink,x!==null&&Fg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Zs(y,-1,a))}}else Rt("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&&(vu(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof Jn&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(vu(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&&(vu(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:ul},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),vu(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&&(vu(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&&(vu(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Ti.prototype.invalidateLayout=Ti.prototype.C,Ti.prototype.findCommonContainingGroup=Ti.prototype.px,Ti.prototype.isMemberOf=Ti.prototype.Td,Ti.prototype.findTopLevelPart=Ti.prototype.sz,Ti.prototype.findSubGraphLevel=Ti.prototype.oz,Ti.prototype.ensureBounds=Ti.prototype.Va,Ti.prototype.getDocumentBounds=Ti.prototype.mi,Ti.prototype.findObject=Ti.prototype.fb,Ti.prototype.moveTo=Ti.prototype.moveTo,Ti.prototype.invalidateAdornments=Ti.prototype.Wb,Ti.prototype.clearAdornments=Ti.prototype.Ej,Ti.prototype.removeAdornment=Ti.prototype.Jf,Ti.prototype.addAdornment=Ti.prototype.bh,Ti.prototype.findAdornment=Ti.prototype.Pj,Ti.prototype.updateTargetBindings=Ti.prototype.La;var z1=!1;Ti.className="Part",Ti.LayoutNone=0,Ti.LayoutAdded=1,Ti.LayoutRemoved=2,Ti.LayoutShown=4,Ti.LayoutHidden=8,Ti.LayoutNodeSized=16,Ti.LayoutGroupLayout=32,Ti.LayoutNodeReplaced=64,Ti.LayoutStandard=127,Ti.LayoutAll=16777215;function Lo(a,y){a===void 0||a instanceof Is||typeof a=="string"?Ti.call(this,a):(Ti.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)}Ct(Lo,Ti),Lo.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Lo.prototype.updateRelationshipsFromData=function(){},Lo.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Fn&&y instanceof Lr){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 Lr&&(b.ua=a)}}},Lo.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!eu(a))},Lo.prototype.Zc=function(){return!1},Lo.prototype.gk=function(a,y,x,E,b,z,ee){if(a===Ao&&y==="elements"){if(b instanceof nu)this.$a===null&&(this.$a=b);else if(b instanceof Pn){var re=b.Nl(function(oe){return oe instanceof nu});re instanceof nu&&this.$a===null&&(this.$a=re)}}else a===Ho&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Pn&&this.$a.rg(E)&&(this.$a=null));Ti.prototype.gk.call(this,a,y,x,E,b,z,ee)},Lo.prototype.updateAdornments=function(){},Lo.prototype.Lj=function(){},Jt.Object.defineProperties(Lo.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}}}),Lo.className="Adornment";function Gv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Wh,this.er=Um,this.Kr=this.ij=this.Nq=this.Mq=null}Gv.prototype.copy=function(){var a=new Gv;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 Jn(a,y){a===void 0||a instanceof Is||typeof a=="string"?Ti.call(this,a):(Ti.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new bn,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ct(Jn,Ti),Jn.prototype.cloneProtected=function(a){Ti.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},we=Jn.prototype,we.Af=function(a){Ti.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function yd(a){a.Ba===null?a.Ba=new Gv:a.Ba.nc&&(a.Ba=a.Ba.copy())}we.th=function(){Ti.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function G1(a,y){y!==null&&(a.af===null&&(a.af=new Sn),a.af.add(y))}function H1(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}we.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=H1(this,a,y,x),a!==null&&a.Sl()},we.gk=function(a,y,x,E,b,z,ee){a===Ao&&y==="elements"?this.wc=null:a===Ho&&y==="elements"&&(this.wc=null),Ti.prototype.gk.call(this,a,y,x,E,b,z,ee)},we.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Hu(x.fromPort),Hu(x.toPort),x.bb())}};function Z1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Hu(x.fromPort),Hu(x.toPort),x.bb())}}function Hu(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Hu(y.port)}}we.si=function(){return!0},Jn.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},Jn.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},Jn.prototype.isVisible=function(){if(!Ti.prototype.isVisible.call(this))return!1;var a=!0,y=dd,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===dd){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===As){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===fg&&(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},Jn.prototype.Zb=function(a){Ti.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)}},Jn.prototype.qx=function(){var a=new Sn,y=new Sn;return W1(this,this,a,y),y.iterator};function W1(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(ee){ee.isTreeLink?(b?ee.fromNode===y:ee.toNode===y)&&W1(a,b?ee.toNode:ee.fromNode,x,E):E.add(ee)})}}Jn.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new _o(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},we=Jn.prototype,we.Mo=function(a){a===void 0&&(a=null);var y=new _o(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},we.Sd=function(a){a===void 0&&(a=null);var y=new _o(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},we.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 Sn,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 Sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Fo(x):na},we.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 Sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Fo(x):na},we.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 Sn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new Fo(x):na},we.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new _o(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},we.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new _o(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 Vm(a,y,x){Hu(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,ee=a.diagram;ee!==null&&(z=ee.aa,ee.aa=!0),b(a,y,x),ee!==null&&(ee.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 Km(a,y,x){Hu(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 ee=!0;b!==null&&(ee=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=ee)}}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)):xp(y)))}function xp(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}}}Jn.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},we=Jn.prototype,we.Vo=function(a){Ti.prototype.Vo.call(this,a),a||(xp(this),a=this.Yk,a!==null&&q1(a,this))},we.Wo=function(a){Ti.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},we.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,Ti.prototype.Lj.call(this)},we.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;V1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function V1(a){a.wc===null?a.wc=new ki:a.wc.clear(),a.qm(a,function(y,x){K1(y,x)}),a.wc.count===0&&a.wc.add("",a)}function K1(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function Hv(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=Yi()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);Wi(x)}}}we.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},we.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}},we.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)Wm(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;)Wm(y,!1),y=y.pg();return x},we.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},we.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof Jn)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},we.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 Sn;return a(this,y),y},we.uz=function(){return U1(this,this)};function U1(a,y){return y=y.pg(),y===null?0:1+U1(a,y)}we.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new _o(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},we.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 bn,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 bn,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new Fo(x):na},we.wz=function(a){a===void 0&&(a=1/0);var y=new Sn;return Gd(y,this,!1,a,!0),y},Jn.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 Sn;x.add(this),Y1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===dd),y.Ue=!1}};function Y1(a,y,x,E,b,z,ee){if(1<E)for(var re=x?a.Mo():a.Sd();re.next();){var oe=re.value;oe.isTreeLink&&(oe=oe.To(a),oe===null||oe===a||y.contains(oe)||(y.add(oe),Y1(oe,y,x,E-1,b,z,ee)))}else X1(a,y,x,b,z,ee)}function X1(a,y,x,E,b,z){for(var ee=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var le=re.value;if(le.isTreeLink&&(le=le.To(a),le!==null&&le!==a)){var he=y.contains(le);if(he||y.add(le),ee){var ge=x?le.Oo():le.Po();oe.uv=a,ge.all(function(ye){return function(xe){return xe===ye.uv||!xe.isTreeExpanded}}(oe))&&E.Aj(le,b),le.oh(),le.Zb(!1)}le.isTreeExpanded&&(le.wasTreeExpanded=le.isTreeExpanded,he||X1(le,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}Jn.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 Sn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===dd),y.Ue=!1}};function J1(a,y,x,E,b,z,ee){for(var re=z===a?!1:a.isTreeExpanded,oe=x?a.Mo():a.Sd(),le={};oe.next();){var he=oe.value;if(he.isTreeLink&&(re||he.fd||he.bb(),he=he.To(a),he!==null&&he!==a&&!y.contains(he))){if(y.add(he),!re){he.Zb(!0),he.oh();var ge=x?he.Oo():he.Po();le.vv=a,ge.all(function(ye){return function(xe){return xe===ye.vv||!xe.isTreeExpanded}}(le))&&b.Cj(he,z)}(2<E||he.wasTreeExpanded)&&(he.wasTreeExpanded=!1,J1(he,y,x,E-1,b,z,ee))}le={vv:le.vv}}a.isTreeExpanded=!0}Jt.Object.defineProperties(Jn.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:Um},set:function(a){var y=this.portSpreading;y!==a&&(yd(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&&hd(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Wh},set:function(a){typeof a=="number"&&(a=new Sr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),yd(this),this.Ba.yp=a;var x=this.diagram;x!==null&&hd(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&&(yd(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&&(yd(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&&(yd(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 ee=z.wa(E);ee!==void 0&&z.Qx(b,ee)}}this.containingGroup=null}this.Yk=a,a!==null&&(q1(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),ql(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&V1(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&&(yd(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))}}}),Jn.prototype.expandTree=Jn.prototype.expandTree,Jn.prototype.collapseTree=Jn.prototype.collapseTree,Jn.prototype.findTreeParts=Jn.prototype.wz,Jn.prototype.findTreeChildrenNodes=Jn.prototype.Ou,Jn.prototype.findTreeChildrenLinks=Jn.prototype.Qo,Jn.prototype.findTreeLevel=Jn.prototype.uz,Jn.prototype.findTreeParentChain=Jn.prototype.vz,Jn.prototype.findTreeParentNode=Jn.prototype.pg,Jn.prototype.findTreeParentLink=Jn.prototype.kh,Jn.prototype.findCommonTreeParent=Jn.prototype.gz,Jn.prototype.findTreeRoot=Jn.prototype.xz,Jn.prototype.isInTreeOf=Jn.prototype.Nz,Jn.prototype.findPort=Jn.prototype.ns,Jn.prototype.findLinksTo=Jn.prototype.kz,Jn.prototype.findLinksBetween=Jn.prototype.jz,Jn.prototype.findNodesInto=Jn.prototype.Oo,Jn.prototype.findNodesOutOf=Jn.prototype.Po,Jn.prototype.findNodesConnected=Jn.prototype.Mu,Jn.prototype.findLinksInto=Jn.prototype.Sd,Jn.prototype.findLinksOutOf=Jn.prototype.Mo,Jn.prototype.findExternalTreeLinksConnected=Jn.prototype.qx,Jn.prototype.invalidateConnectedLinks=Jn.prototype.Bd,Jn.prototype.invalidateLinkBundle=Jn.prototype.Lz;var Cx=new Wt(Jn,"SpreadingNone",10),Um=new Wt(Jn,"SpreadingEvenly",11),Zv=new Wt(Jn,"SpreadingPacked",12);Jn.className="Node",Jn.SpreadingNone=Cx,Jn.SpreadingEvenly=Um,Jn.SpreadingPacked=Zv;function cr(a,y){a===void 0||a instanceof Is||typeof a=="string"?Jn.call(this,a):(Jn.call(this),a&&(y=a)),this.U|=4608,this.Gn=new Sn,this.$a=null,this.Sc=new za,this.Sc.group=this,this.gl=new Sn,this.tb=this.$p=null,y&&Object.assign(this,y)}Ct(cr,Jn),cr.prototype.cloneProtected=function(a){Jn.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof nu});y instanceof nu?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())},we=cr.prototype,we.Af=function(a){Jn.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 Jn)x.Bd(y);else if(x instanceof Fn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},we.gk=function(a,y,x,E,b,z,ee){if(a===Ao&&y==="elements"){if(b instanceof nu)this.$a===null?this.$a=b:this.$a!==b&&Rt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Pn){var re=b.Nl(function(oe){return oe instanceof nu});re instanceof nu&&(this.$a===null?this.$a=re:this.$a!==re&&Rt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===Ho&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Pn&&this.$a.rg(E)&&(this.$a=null));Jn.prototype.gk.call(this,a,y,x,E,b,z,ee)},we.Xl=function(a,y){Jn.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Pn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Pn&&(a=a.Pb()),this.tb===null&&(this.tb=new Xt),a.mi(this.tb),a instanceof Lr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},we.eh=function(a,y,x,E){this.nf=this.$a,Jn.prototype.eh.call(this,a,y,x,E)},we.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Fn||y.Va()}),Jn.prototype.Va.call(this)},we.si=function(){if(!Jn.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof Jn){if(y.isVisible()&&eu(y))return!1}else if(y instanceof Fn&&y.isVisible()&&eu(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function Wv(a,y){if(a.Gn.add(y)){y instanceof cr&&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 Fn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function Vv(a,y){if(a.Gn.remove(y)){y instanceof cr&&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 Fn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}we.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)}Jn.prototype.Lj.call(this)},cr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=Kt(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},cr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=Kt(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},cr.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))},we=cr.prototype,we.Bd=function(a){var y=(this.U&65536)!==0;if(Jn.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()?(Hu(x.fromPort),Hu(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Hu(x.fromPort),Hu(x.toPort),x.bb()))}}},we.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 Sn,E=y.iterator;E.next();){var b=E.value;if(b instanceof Jn)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},we.iz=function(){var a=this.Rj();a.add(this);for(var y=new Sn,x=a.iterator;x.next();){var E=x.value;if(E instanceof Jn)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},we.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new Sn;return a(this,y),y},we.Rj=function(){var a=new Sn;return Gd(a,this,!0,0,!0),a.remove(this),a},we.Zb=function(a){Jn.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},cr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();Q1(this,y,a,this),a.Ue=!1}};function Q1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof cr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,Q1(z,y,x,E)),z instanceof Jn)z.Bd(y),x.Aj(z,E);else if(z instanceof Fn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}cr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();$1(this,y,a,this),a.Ue=!1}};function $1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof cr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,$1(z,y,x,E)),z instanceof Jn)z.Bd(y),x.Cj(z,E);else if(z instanceof Fn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}cr.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=$e.alloc(),Jn.prototype.move.call(this,a,y),a=new Sn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Fn&&(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 Jn&&b.isLinkLabel)){var ee=b.position,re=b.location;ee.w()?(z.x=ee.x+E,z.y=ee.y+x,b.position=z):re.w()&&(z.x=re.x+E,z.y=re.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Fn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(ee=b.position,z.x=ee.x+E,z.y=ee.y+x,z.w()?b.move(z):b.bb(),Uv(b)&&b.bb());$e.free(z)}},Jt.Object.defineProperties(cr.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&&Rt("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&&(yd(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&&(yd(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&&(yd(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&&(yd(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)}}}),cr.prototype.expandSubGraph=cr.prototype.expandSubGraph,cr.prototype.collapseSubGraph=cr.prototype.collapseSubGraph,cr.prototype.findSubGraphParts=cr.prototype.Rj,cr.prototype.findContainingGroupChain=cr.prototype.hz,cr.prototype.findExternalNodesConnected=cr.prototype.iz,cr.prototype.findExternalLinksConnected=cr.prototype.Lu,cr.prototype.ensureBounds=cr.prototype.Va,cr.className="Group";function nu(a){xt.call(this),this.yb=Sl,this.ko=new Xt(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ct(nu,xt),nu.prototype.cloneProtected=function(a){xt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},nu.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Ko(0,0,y.width,y.height,a.x,a.y)},nu.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof cr||a instanceof Lo)||Rt("Placeholder is not inside a Group or Adornment."),a instanceof cr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(El(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=$e.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),$e.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 ee=0;z instanceof Lr&&(ee=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,le=(oe.width+ee)*re;ee=(oe.height+ee)*re,a.type!==Pn.Link&&(re=z.ga(a.category==="Selection"?Os:a.locationSpot,$e.alloc()),a.location=re,$e.free(re)),isNaN(le)||isNaN(ee)?(a=z.ga(Os,$e.alloc()),le=Xt.allocAt(a.x,a.y,0,0),le.Ye(z.ga(il,a)),le.Ye(z.ga(sc,a)),le.Ye(z.ga(Pu,a)),El(y,le.width+E||0,le.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),$e.free(a),Xt.free(le)):(El(y,le+E||0,ee+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},nu.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},nu.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof cr&&!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=Xt.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof cr&&!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)),Xt.free(x),E&&y instanceof cr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},nu.prototype.computeMemberBounds=function(a){if(!(this.part instanceof cr))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,ee=y.memberParts;ee.next();){var re=ee.value;if(re.isVisible()){if(re instanceof Fn&&(!y.computesBoundsIncludingLinks||nh(re)||re.fromNode===y||re.toNode===y))continue;re=re.actualBounds,re.left<x&&(x=re.left),re.top<E&&(E=re.top),re.right>b&&(b=re.right),re.bottom>z&&(z=re.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},Jt.Object.defineProperties(nu.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new Sr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),nu.className="Placeholder";function Fn(a){Ti.call(this,Pn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=iu,this.Om=0,this.Qm=iu,this.Rm=NaN,this.qj=Jv,this.po=.5,this.wd=null,this.Nb=new bn().freeze(),this.Tg=this.Mg=null,this.ml=new Xt,this.ua=new wt,this.u=this.o=this.Sf=this.Wf=null,this.su=new $e,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ct(Fn,Ti),Fn.prototype.cloneProtected=function(a){Ti.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())},we=Fn.prototype,we.Af=function(a){Ti.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&&Hu(y),a=a.toPort,a!==null&&Hu(a)},we.qb=function(a){a.classType===Fn?(a.value&2)===2?this.routing=a:a===rh||a===xd||a===Ng?this.curve=a:a===Ep||a===qm||a===e0?this.adjusting=a:a!==Jv&&a!==iu&&Rt("Unknown Link enum value for a Link property: "+a):Ti.prototype.qb.call(this,a)},we.Xc=function(){this.ba===null&&(this.ba=new up)},we.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),eu(a)||jd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),eu(a)||jd(a)))},we.zv=function(){return!1},we.Av=function(){},we.Zc=function(){return!1},Fn.prototype.computeAngle=function(a,y,x){return Fn.computeAngle(y,x)},Fn.computeAngle=function(a,y){switch(a){default:case iu:a=0;break;case Cp:a=y;break;case bp:a=y+90;break;case Lp:a=y-90;break;case Qv:a=y+180;break;case t0:a=Ie.bp(y),90<a&&270>a&&(a-=180);break;case Mp:a=Ie.bp(y+90),90<a&&270>a&&(a-=180);break;case Fp:a=Ie.bp(y-90),90<a&&270>a&&(a-=180);break;case n0:if(a=Ie.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Ie.bp(a)};function Fg(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&&Vv(x,a),a.Ah=y,y!==null&&Wv(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,ee=a.diagram;ee!==null&&(z=ee.aa,ee.aa=!0),b(a,x,y),ee!==null&&(ee.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}we=Fn.prototype,we.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Ti.prototype.oh.call(this)},we.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},we.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function q1(a,y){a.wd===null&&(a.wd=new Sn),a.wd.add(y),a.v()}we.Vo=function(a){if(Ti.prototype.Vo.call(this,a),Ef(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Vm(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Vm(x,this,E)}wp(this)}},we.Wo=function(a){if(Ti.prototype.Wo.call(this,a),Ef(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,Km(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||Km(x,this,E)}Pp(this)}},we.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))},Fn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Fn.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?Ti.prototype.move.call(this,a,!1):(a=$e.allocAt(x.x+E,x.y+b),Ti.prototype.move.call(this,a,!1),$e.free(a)),Sd(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Fn.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},Fn.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},Fn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(kl),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()===rh))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()===rh){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Ie.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),Ie.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 ee=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=ee[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},Fn.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()===rh))return this.ua.wx(.5);if(this.computeCurve()===rh&&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),Ie.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)},we=Fn.prototype,we.i=function(a){return this.Nb.s[a]},we.dd=function(a,y){this.Nb.cd(a,y)},we.L=function(a,y,x){this.Nb.cd(a,new $e(y,x))},we.Kz=function(a,y){this.Nb.Gb(a,y)},we.m=function(a,y,x){this.Nb.Gb(a,new $e(y,x))},we.ne=function(a){this.Nb.add(a)},we.yf=function(a,y){this.Nb.add(new $e(a,y))},we.pv=function(a){this.Nb.mb(a)},we.Fj=function(){this.Nb.clear()};function Sd(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 bn,z=a.Nb.iterator;z.next();){var ee=z.value;b.add(new $e(ee.x+y,ee.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,ee=a.diagram,isNaN(y)||isNaN(x)||ee!==null&&ee.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),ql(a)),E?Ym(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ee!==null&&ee.animationManager.zb&&fo(ee.animationManager,a,b),a.g("points",z,b)}}we.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},we.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,ee=0;ee<z;ee++){var re=b[ee];x=Math.min(re.x,x),E=Math.min(re.y,E)}re=ee=1/0;for(var oe=y.s,le=oe.length,he=0;he<le;he++){var ge=oe[he];ee=Math.min(ge.x,ee),re=Math.min(ge.y,re),ge.freeze()}if(y.freeze(),le===z){for(z=0;z<le;z++)if(he=b[z],ge=oe[z],he.x-x!==ge.x-ee||he.y-E!==ge.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&fo(x.animationManager,this,y),Ym(this),this.g("points",a,y)}},we.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function Ym(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),$m(a,!1))}we.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())}},we.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()}}},Fn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Vf||(Vf=new Jn,Vf.desiredSize=Gr,Vf.Va()),this.defaultFromPoint&&(Vf.location=this.defaultFromPoint,Vf.Va(),y=a=Vf)):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?(Kf||(Kf=new Jn,Kf.desiredSize=Gr,Kf.Va()),this.defaultToPoint&&(Kf.location=this.defaultToPoint,Kf.Va(),b=E=Kf)):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,ee=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var re=kg(ee),oe=kg(x),le=y===b&&y!==null,he=this.isOrthogonal,ge=this.curve===rh;this.Wf=le&&!he?ge=!0:!1;var ye=this.computeAdjusting()===iu||le;if(!he&&!le&&re&&oe){if(re=!1,!ye&&3<=z&&(ye=this.getLinkPoint(a,y,ee,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,ye,z-1,oe))&&(ye=this.getLinkPoint(a,y,ee,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,ye,z-1,oe)),!re)if(this.Fj(),ge){z=this.getLinkPoint(a,y,ee,!0,!1,E,b),ye=this.getLinkPoint(E,b,x,!1,!1,a,y),re=ye.x-z.x,oe=ye.y-z.y,le=this.computeCurviness(),ge=he=0;var xe=z.x+re/3,Ee=z.y+oe/3,Ne=xe,Ye=Ee;Ie.B(oe,0)?Ye=0<re?Ye-le:Ye+le:(he=-re/oe,ge=Math.sqrt(le*le/(he*he+1)),0>le&&(ge=-ge),Ne=(0>oe?-1:1)*ge+xe,Ye=he*(Ne-xe)+Ee),xe=z.x+2*re/3,Ee=z.y+2*oe/3;var je=xe,nt=Ee;Ie.B(oe,0)?nt=0<re?nt-le:nt+le:(je=(0>oe?-1:1)*ge+xe,nt=he*(je-xe)+Ee),this.Fj(),this.ne(z),this.yf(Ne,Ye),this.yf(je,nt),this.ne(ye),this.dd(0,this.getLinkPoint(a,y,ee,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,ye=b,E=this.getLinkPoint(a,y,ee,!0,!1,z,ye),b=this.getLinkPoint(z,ye,x,!1,!1,a,y),this.hasCurviness()?(ye=b.x-E.x,x=b.y-E.y,ee=this.computeCurviness(),a=E.x+ye/2,y=E.y+x/2,z=a,re=y,Ie.B(x,0)?re=0<ye?re-ee:re+ee:(ye=-ye/x,z=Math.sqrt(ee*ee/(ye*ye+1)),0>ee&&(z=-z),z=(0>x?-1:1)*z+a,re=ye*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=Xt.alloc(),y.mi(re),oe=re.ca(b),ye.mi(re),le=re.ca(E),(oe||le)&&(ee=y.ga(Jm(ee),new $e),this.dd(0,this.getLinkPointFromPoint(a,y,ee,b,!0,ee)),x=ye.ga(Jm(x),new $e),this.dd(1,this.getLinkPointFromPoint(z,ye,x,E,!1,x))),Xt.free(re))}else{ge=this.isAvoiding,ye&&(he&&ge||le)&&this.Fj();var ot=le?this.computeCurviness():0;ge=this.getLinkPoint(a,y,ee,!0,he,E,b),xe=Ne=Ee=0,(he||!re||le)&&(Ye=this.computeEndSegmentLength(a,y,ee,!0),xe=this.getLinkDirection(a,y,ge,ee,!0,he,E,b),le&&(re||ee.D(x)||!he&&ee.x+x.x===1&&ee.y+x.y===1)&&(xe-=he?90:30,0>ot&&(xe-=180)),0>xe?xe+=360:360<=xe&&(xe-=360),le&&(Ye+=Math.abs(ot)*(he?1:2)),xe===0?Ee=Ye:xe===90?Ne=Ye:xe===180?Ee=-Ye:xe===270?Ne=-Ye:(Ee=Ye*Math.cos(xe*Math.PI/180),Ne=Ye*Math.sin(xe*Math.PI/180)),ee.Mc()&&le&&(Ye=y.ga(Oo,$e.alloc()),je=$e.allocAt(Ye.x+1e3*Ee,Ye.y+1e3*Ne),this.getLinkPointFromPoint(a,y,Ye,je,!0,ge),$e.free(Ye),$e.free(je))),Ye=this.getLinkPoint(E,b,x,!1,he,a,y);var ut=nt=je=0;if(he||!oe||le){var vt=this.computeEndSegmentLength(E,b,x,!1);ut=this.getLinkDirection(E,b,Ye,x,!1,he,a,y),le&&(oe||ee.D(x)||!he&&ee.x+x.x===1&&ee.y+x.y===1)&&(ut+=he?0:30,0>ot&&(ut+=180)),0>ut?ut+=360:360<=ut&&(ut-=360),le&&(vt+=Math.abs(ot)*(he?1:2)),ut===0?je=vt:ut===90?nt=vt:ut===180?je=-vt:ut===270?nt=-vt:(je=vt*Math.cos(ut*Math.PI/180),nt=vt*Math.sin(ut*Math.PI/180)),x.Mc()&&le&&(x=b.ga(Oo,$e.alloc()),ee=$e.allocAt(x.x+1e3*je,x.y+1e3*nt),this.getLinkPointFromPoint(E,b,x,ee,!1,Ye),$e.free(x),$e.free(ee))}x=ge,(he||!re||le)&&(x=new $e(ge.x+Ee,ge.y+Ne)),ee=Ye,(he||!oe||le)&&(ee=new $e(Ye.x+je,Ye.y+nt)),!ye&&!he&&re&&3<z&&this.adjustPoints(0,ge,z-2,ee)?this.dd(z-1,Ye):!ye&&!he&&oe&&3<z&&this.adjustPoints(1,x,z-1,Ye)?this.dd(0,ge):!ye&&(he?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ee)?(this.dd(0,ge),this.dd(z-1,Ye)):(this.Fj(),this.ne(ge),(he||!re||le)&&this.ne(x),he&&this.addOrthoPoints(x,xe,ee,ut,a,E),(he||!oe||le)&&this.ne(ee),this.ne(Ye))}return!0};function Kv(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}Fn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new $e),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 ee=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),ee=a.m22*b;var re=-a.m12*b,oe=-a.m21*b,le=a.m11*b,he=b*(a.m21*a.dy-a.m22*a.dx),ge=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ee+E.y*oe+he,E=E.x*re+E.y*le+ge,ee=x.x*ee+x.y*oe+he,x=x.x*re+x.y*le+ge}return y.Sj(b,E,ee,x,z),a!==null&&z.transform(a),z};function Xm(a,y){var x=y.Zn;return x===null&&(x=new Uf,x.port=y,x.node=y.part,y.Zn=x),sS(x,a)}Fn.prototype.getLinkPoint=function(a,y,x,E,b,z,ee,re){if(re===void 0&&(re=new $e),x.sb()&&!kg(x))return y.ga(x,re),re;if(x.$c()){var oe=Xm(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===tS){var le=Xm(this,ee);if(le!==null&&oe.Gl<le.Gl){oe=$e.alloc(),le=$e.alloc();var he=new Xt(y.ga(Os,oe),y.ga(il,le)),ge=this.computeSpot(!E,ee);a=this.getLinkPoint(z,ee,ge,!E,b,a,y,le),(x.Hf(lc)||x.Hf(Ml))&&a.y>=he.y&&a.y<=he.y+he.height?re.y=a.y:(x.Hf(kh)||x.Hf(Eu))&&a.x>=he.x&&a.x<=he.x+he.width&&(re.x=a.x),$e.free(oe),$e.free(le)}}return re}}return x=y.ga(Jm(x),$e.alloc()),this.pointsCount>(b?6:2)?(ee=E?this.i(1):this.i(this.pointsCount-2),b&&(ee=Kv(x,ee.copy()))):(oe=this.computeSpot(!E,ee),z=$e.alloc(),ee=ee.ga(Jm(oe),z),b&&(ee=Kv(x,ee)),$e.free(z)),this.getLinkPointFromPoint(a,y,x,ee,E,re),$e.free(x),re},Fn.prototype.getLinkDirection=function(a,y,x,E,b,z,ee,re){e:if(E.sb())var oe=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()&&(oe=Xm(this,y),oe!==null))switch(oe.Nc){case 1:oe=270;break e;case 2:oe=180;break e;default:case 4:oe=0;break e;case 8:oe=90;break e}oe=y.ga(Oo,$e.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?Kv(oe,re.copy()):x):(x=$e.alloc(),re=re.ga(Oo,x),$e.free(x)),x=Math.abs(re.x-oe.x)>Math.abs(re.y-oe.y)?re.x>=oe.x?0:180:re.y>=oe.y?90:270,$e.free(oe),oe=x}return E.Mc()&&ee.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),kg(E)||(a=y.li(),a===0)||(45<=a&&135>a?oe+=90:135<=a&&225>a?oe+=180:225<=a&&315>a&&(oe+=270),360<=oe&&(oe-=360)),oe},Fn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=Xm(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)},Fn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=Oo:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Fs?Ms:y)):(a=y||this.toPort,a===null?a=Oo:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Fs?Ms:y)),a};function kg(a){return a===Ms||a.x===.5&&a.y===.5}function Jm(a){return a.x===.5&&a.y===.5?a:Oo}Fn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==iu&&4<this.pointsCount?this.computeMidPoint(new $e):(a=y.Zn,a=a!==null?sS(a,this):null,a!==null?a.Zo:y.ga(Oo))},Fn.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},Fn.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 ee=z;if(z===void 0&&(ee=ct.alloc(),ee.reset()),ee.multiply(this.transform),this.fh(a,ee))return mv(this,y,x,b),z===void 0&&ct.free(ee),!0;if(this.Yc(a,ee)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,le=oe.length;le--;){var he=oe[le];if(he.visible||he===this.locationObject){var ge=he.actualBounds,ye=this.naturalBounds;if(!(ge.x>ye.width||ge.y>ye.height||0>ge.x+ge.width||0>ge.y+ge.height)){if(ge=ct.alloc(),ge.set(ee),he instanceof Pn)re=he.Cf(a,y,x,E,b,ge);else if(this.path===he){if(he instanceof Lr)if(re=a,ye=E,he.pickable===!1)re=!1;else if(ge.multiply(he.transform),ye)e:{var xe=re,Ee=ge;if(he.fh(xe,Ee))re=!0;else{if(Ee===void 0&&(Ee=he.transform,xe.Re(he.actualBounds))){re=!0;break e}re=xe.left,ye=xe.right;var Ne=xe.top;xe=xe.bottom;var Ye=$e.alloc(),je=$e.alloc(),nt=$e.alloc(),ot=ct.alloc();ot.set(Ee),ot.bv(he.transform),ot.Vj(),je.x=ye,je.y=Ne,je.transform(ot),Ye.x=re,Ye.y=Ne,Ye.transform(ot),Ee=!1,wf(he,Ye,je,nt)?Ee=!0:(Ye.x=ye,Ye.y=xe,Ye.transform(ot),wf(he,Ye,je,nt)?Ee=!0:(je.x=re,je.y=xe,je.transform(ot),wf(he,Ye,je,nt)?Ee=!0:(Ye.x=re,Ye.y=Ne,Ye.transform(ot),wf(he,Ye,je,nt)&&(Ee=!0)))),ct.free(ot),$e.free(Ye),$e.free(je),$e.free(nt),re=Ee}}else re=he.fh(re,ge)}else re=Ys(he,a,E,ge);re&&(ye=he,y!==null&&(ye=y(he)),ye&&(x===null||x(ye))&&b.add(ye)),ct.free(ge)}}}return z===void 0&&ct.free(ee),re||this.background!==null||this.areaBackground!==null}return z===void 0&&ct.free(ee),!1},Fn.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?rh:this.curve},Fn.prototype.computeCorner=function(){if(this.curve===rh)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Fn.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},Fn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=iS;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,ee=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===Cp||E===t0||E===Qv?a=Math.max(a,b):E===Lp||E===Fp||E===bp||E===Mp?a=Math.max(a,ee):(y=y.ga(Oo).ab(x.ga(Oo))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ee)+Math.abs(Math.cos(y)*b)+1)),this.curve===rh&&(a*=1.333)}}return a},Fn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===iu&&x.bb()}},Fn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=nS;var y=this.Sf;if(y!==null){for(var x=Yi(),E=0,b=y.links,z=0;z<b.length;z++){var ee=b[z].computeSpacing();x.push(ee),E+=ee}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),Wi(x)}}return a},Fn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Fn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Fn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===qm)return!1;b===e0&&(b=Ep)}switch(b){case qm:var z=this.i(a),ee=this.i(x);if(!z.Xa(y)||!ee.Xa(E)){b=z.x,z=z.y;var re=ee.x-b,oe=ee.y-z,le=Math.sqrt(re*re+oe*oe);if(!Ie.$(le,0)){if(Ie.$(re,0))var he=0>oe?-Math.PI/2:Math.PI/2;else he=Math.atan(oe/Math.abs(re)),0>re&&(he=Math.PI-he);ee=y.x;var ge=y.y;re=E.x-ee;var ye=E.y-ge;for(oe=Math.sqrt(re*re+ye*ye),Ie.$(re,0)?ye=0>ye?-Math.PI/2:Math.PI/2:(ye=Math.atan(ye/Math.abs(re)),0>re&&(ye=Math.PI-ye)),le=oe/le,he=ye-he,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),re=y.x-b,oe=y.y-z,y=Math.sqrt(re*re+oe*oe),Ie.$(y,0)||(Ie.$(re,0)?oe=0>oe?-Math.PI/2:Math.PI/2:(oe=Math.atan(oe/Math.abs(re)),0>re&&(oe=Math.PI-oe)),re=oe+he,y*=le,this.L(a,ee+y*Math.cos(re),ge+y*Math.sin(re)));this.dd(x,E)}}return!0;case e0:if(z=this.i(a),ge=this.i(x),!z.Xa(y)||!ge.Xa(E)){b=z.x,z=z.y,ee=ge.x,ge=ge.y,le=(ee-b)*(ee-b)+(ge-z)*(ge-z),re=y.x,he=y.y,oe=E.x,ye=E.y;var xe=1;if(oe-re!==0){var Ee=(ye-he)/(oe-re);xe=Math.sqrt(1+1/(Ee*Ee))}else Ee=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Ne=y.x,Ye=y.y,je=.5;le!==0&&(je=((b-Ne)*(b-ee)+(z-Ye)*(z-ge))/le);var nt=b+je*(ee-b),ot=z+je*(ge-z);y=Math.sqrt((Ne-nt)*(Ne-nt)+(Ye-ot)*(Ye-ot)),Ye<Ee*(Ne-nt)+ot&&(y=-y),0<Ee&&(y=-y),Ne=re+je*(oe-re),je=he+je*(ye-he),Ee!==0?(y=Ne+y/xe,this.L(a,y,je-(y-Ne)/Ee)):this.L(a,Ne,je+y)}this.dd(x,E)}return!0;case Ep:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ee=this.i(a+2),re=z.x,he=z.y,ge=re,le=he,Ie.B(b.y,z.y)?Ie.B(z.x,ee.x)?he=y.y:Ie.B(z.y,ee.y)&&(re=y.x):Ie.B(b.x,z.x)&&(Ie.B(z.y,ee.y)?re=y.x:Ie.B(z.x,ee.x)&&(he=y.y)),this.L(a+1,re,he),b=this.i(x),z=this.i(x-1),ee=this.i(x-2),re=z.x,he=z.y,oe=re,ye=he,Ie.B(b.y,z.y)?Ie.B(z.x,ee.x)?he=E.y:Ie.B(z.y,ee.y)&&(re=E.x):Ie.B(b.x,z.x)&&(Ie.B(z.y,ee.y)?re=E.x:Ie.B(z.x,ee.x)&&(he=E.y)),this.L(x-1,re,he),Uv(this))){this.L(a+1,ge,le),this.L(x-1,oe,ye),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Fn.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 ee=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 re=b.actualBounds.copy(),oe=z.actualBounds.copy();if(re.w()&&oe.w()){re.Bc(kp,kp),oe.Bc(kp,kp),re.Ye(a),oe.Ye(x);var le=$e.alloc(),he=$e.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&oe.right>a.x||E===90&&x.y>a.y&&oe.right>a.x?(le.h(x.x,a.y),he.h(x.x,(a.y+x.y)/2),E===180?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),he.x=le.x,he.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x<oe.left?this.computeMidOrthoPosition(a.x,a.y,oe.left,x.y,!1):a.x<oe.right&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.right,he.x=le.x,he.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),he.y=le.y)):(le.h(a.x,x.y),he.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===180&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),he.x=x.x,he.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(le.h(Math.max((a.x+x.x)/2,a.x),a.y),he.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===0?re.bottom:Math.max(re.bottom,oe.bottom)),he.x=x.x,he.y=le.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&oe.left<a.x||E===90&&x.y>a.y&&oe.left<a.x?(le.h(x.x,a.y),he.h(x.x,(a.y+x.y)/2),E===0?(le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),he.x=le.x,he.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(le.x=a.x>oe.right?this.computeMidOrthoPosition(a.x,a.y,oe.right,x.y,!1):a.x>oe.left&&(E===270&&a.y<oe.top||E===90&&a.y>oe.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):oe.left,he.x=le.x,he.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(le.x=a.x,le.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),he.y=le.y)):(le.h(a.x,x.y),he.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<re.top||E===270&&x.y>re.bottom)&&(E===0&&(oe.ca(a)||re.ca(x))?le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?le.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(le.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),he.x=x.x,he.y=le.y),le.y>re.top&&le.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(le.h(Math.min((a.x+x.x)/2,a.x),a.y),he.h(le.x,x.y)):(le.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?re.top:Math.min(re.top,oe.top)):Math.max(x.y,E===180?re.bottom:Math.max(re.bottom,oe.bottom)),he.x=x.x,he.y=le.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&oe.bottom>a.y||E===0&&x.x>a.x&&oe.bottom>a.y?(le.h(a.x,x.y),he.h((a.x+x.x)/2,x.y),E===270?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),he.x=x.x,he.y=le.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(le.y=a.y<oe.top?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.top,!0):a.y<oe.bottom&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.bottom,he.x=x.x,he.y=le.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,he.x=le.x)):(le.h(x.x,a.y),he.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===270&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),he.x=le.x,he.y=x.y),le.x>re.left&&le.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(le.h(a.x,Math.max((a.y+x.y)/2,a.y)),he.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===90?re.right:Math.max(re.right,oe.right)),he.x=le.x,he.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&oe.top<a.y||E===0&&x.x>a.x&&oe.top<a.y?(le.h(a.x,x.y),he.h((a.x+x.x)/2,x.y),E===90?(le.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),he.x=x.x,he.y=le.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(le.y=a.y>oe.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,oe.bottom,!0):a.y>oe.top&&(E===180&&a.x<oe.left||E===0&&a.x>oe.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):oe.top,he.x=x.x,he.y=le.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(le.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),le.y=a.y,he.x=le.x)):(le.h(x.x,a.y),he.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<re.left||E===180&&x.x>re.right)&&(E===90&&(oe.ca(a)||re.ca(x))?le.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?le.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(le.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),he.x=le.x,he.y=x.y),le.x>re.left&&le.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(le.h(a.x,Math.min((a.y+x.y)/2,a.y)),he.h(x.x,le.y)):(le.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?re.left:Math.min(re.left,oe.left)):Math.max(x.x,E===270?re.right:Math.max(re.right,oe.right)),he.x=le.x,he.y=x.y)));var ge=x;if(this.isAvoiding){var ye=this.diagram;if(ye===null||b===z||this.layer.isTemporary||!ug(ye)||re.ca(ge)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var xe=hg(ye,!0,this.containingGroup,null);if(this.segmentIndex!==17&&xe.Yj(Math.min(a.x,le.x),Math.min(a.y,le.y),Math.abs(a.x-le.x),Math.abs(a.y-le.y))&&xe.Yj(Math.min(le.x,he.x),Math.min(le.y,he.y),Math.abs(le.x-he.x),Math.abs(le.y-he.y))&&xe.Yj(Math.min(he.x,ge.x),Math.min(he.y,ge.y),Math.abs(he.x-ge.x),Math.abs(he.y-ge.y)))y=!1;else{b=a,z=ge;var Ee=x=null;if(ye.isVirtualized){ye=xe.bounds.copy(),ye.Bc(-xe.Ho,-xe.Go);var Ne=$e.alloc();Ag(xe,a.x,a.y)||(Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,a.x,a.y,le.x,le.y,Ne)?(x=a=Ne.copy(),y=Ne.ab(le)):Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,le.x,le.y,he.x,he.y,Ne)?(x=a=Ne.copy(),y=Ne.ab(he)):Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,he.x,he.y,ge.x,ge.y,Ne)&&(x=a=Ne.copy(),y=Ne.ab(ge))),Ag(xe,ge.x,ge.y)||(Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,ge.x,ge.y,he.x,he.y,Ne)?(Ee=ge=Ne.copy(),E=he.ab(Ne)):Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,he.x,he.y,le.x,le.y,Ne)?(Ee=ge=Ne.copy(),E=le.ab(Ne)):Ie.Ff(ye.x,ye.y,ye.x+ye.width,ye.y+ye.height,le.x,le.y,a.x,a.y,Ne)&&(Ee=ge=Ne.copy(),E=a.ab(Ne))),$e.free(Ne)}re=re.copy().ed(oe),re.Bc(xe.Ho*xe.Os,xe.Go*xe.Os),oS(xe,a,y,ge,E,re,!0),oe=Dc(xe,ge.x,ge.y),!xe.abort&&oe>=Bg&&(rS(xe),re.Bc(xe.Ho*xe.Hx,xe.Go*xe.Ix),oS(xe,a,y,ge,E,re,!1),oe=Dc(xe,ge.x,ge.y)),!xe.abort&&oe<Bg&&Dc(xe,ge.x,ge.y)!==wd?(Yv(this,xe,ge.x,ge.y,E,!0,ee),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=ge.y):(re.x=ge.x,re.y=a.y),this.L(2,re.x,re.y),this.m(3,re.x,re.y)):(ee=this.i(3),y===0||y===180?Ie.B(re.x,ee.x)?(re=y===0?Math.max(re.x,a.x):Math.min(re.x,a.x),this.L(2,re,a.y),this.L(3,re,ee.y)):Ie.B(re.y,ee.y)?(Math.abs(a.y-re.y)<=xe.Go/2&&(this.L(2,re.x,a.y),this.L(3,ee.x,a.y)),this.m(2,re.x,a.y)):this.L(2,a.x,re.y):(y===90||y===270)&&(Ie.B(re.y,ee.y)?(re=y===90?Math.max(re.y,a.y):Math.min(re.y,a.y),this.L(2,a.x,re),this.L(3,ee.x,re)):Ie.B(re.x,ee.x)?(Math.abs(a.x-re.x)<=xe.Ho/2&&(this.L(2,a.x,re.y),this.L(3,a.x,ee.y)),this.m(2,a.x,re.y)):this.L(2,re.x,a.y))),x!==null&&(a=this.i(1),ee=this.i(2),a.x!==ee.x&&a.y!==ee.y?y===0||y===180?this.m(2,a.x,ee.y):this.m(2,ee.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Ee!==null&&(E===0||E===180?this.yf(z.x,Ee.y):this.yf(Ee.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(le.copy()),this.ne(he.copy())),$e.free(le),$e.free(he)}},Fn.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 Uv(a){if(a.diagram===null||!a.isAvoiding||!ug(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=hg(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 Yv(a,y,x,E,b,z,ee){var re=y.Ho,oe=y.Go,le=Dc(y,x,E),he=x,ge=E;for(b===0?he+=re:b===90?ge+=oe:b===180?he-=re:ge-=oe,b!==ee&&le>Cf&&Dc(y,he,ge)!==le-1&&(Dc(y,x-re,E)===le-1?(b=180,he=x-re,ge=E):Dc(y,x+re,E)===le-1?(b=0,he=x+re,ge=E):Dc(y,x,E-oe)===le-1?(b=270,he=x,ge=E-oe):Dc(y,x,E+oe)===le-1&&(b=90,he=x,ge=E+oe));le>Cf&&Dc(y,he,ge)===le-1;)x=he,E=ge,b===0?he+=re:b===90?ge+=oe:b===180?he-=re:ge-=oe,--le;z?le>Cf&&(b===180||b===0?x=Math.floor(x/re)*re+re/2:(b===90||b===270)&&(E=Math.floor(E/oe)*oe+oe/2)):(x=Math.floor(x/re)*re+re/2,E=Math.floor(E/oe)*oe+oe/2),le>Cf&&(z=b,ee=x,he=E,b===0?(z=90,he+=oe):b===90?(z=180,ee-=re):b===180?(z=270,he-=oe):b===270&&(z=0,ee+=re),Dc(y,ee,he)===le-1?Yv(a,y,ee,he,z,!1,z):(ee=x,he=E,b===0?(z=270,he-=oe):b===90?(z=0,ee+=re):b===180?(z=90,he+=oe):b===270&&(z=180,ee-=re),Dc(y,ee,he)===le-1&&Yv(a,y,ee,he,z,!1,z))),a.yf(x,E)}Fn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=qa(y,a,x.x,x.y,E.x,E.y),z=0,ee=1;ee<this.pointsCount-1;ee++){x=this.i(ee+1);var re=qa(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ee,b=re)}return z},Fn.prototype.qc=function(){this.lk=!1,this.v()},Fn.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 Lr&&(b.ua=this.ua)}}},Fn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&Ef(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 ee=this.computeCurve();if(ee===rh&&3<=y&&!Ie.$(this.smoothness,0))if(y===3){var re=this.i(1);E=Math.min(b.x,re.x);var oe=Math.min(b.y,re.y);re=this.i(2),E=Math.min(E,re.x),oe=Math.min(oe,re.y)}else{if(this.isOrthogonal)for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),oe=this.i(E),z.x=Math.min(oe.x,z.x),z.y=Math.min(oe.y,z.y);E=z.x,oe=z.y}else{for(oe=0;oe<y;oe++)re=E[oe],z.x=Math.min(re.x,z.x),z.y=Math.min(re.y,z.y);E=z.x,oe=z.y}if(E-=this.su.x,oe-=this.su.y,b.x-=E,b.y-=oe,y!==2||Ef(this)){if(a.type=wt.o,re=N1(a),this.computeShortLength(!0)!==0&&(b=Zf(this,b,!0,z)),Mg(re,b.x,b.y,!1),ee===rh&&3<=y&&!Ie.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-oe,b=this.i(2).copy(),b.x-=E,b.y-=oe,this.computeShortLength(!1)!==0&&(b=Zf(this,b,!1,z)),md(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=$e.allocAt(E,oe),x=$e.alloc(),x.assign(this.i(1)),z=$e.allocAt(E,oe),b=$e.allocAt(E,oe),ee=this.i(0);for(var le,he=this.smoothness/3,ge=1;ge<this.pointsCount-1;ge++){le=this.i(ge);var ye=ee,xe=le,Ee=this.i(Xv(this,le,ge,!1));if((!Ie.$(ye.x,xe.x)||!Ie.$(xe.x,Ee.x))&&(!Ie.$(ye.y,xe.y)||!Ie.$(xe.y,Ee.y))){var Ne=he;isNaN(Ne)&&(Ne=this.smoothness/3);var Ye=ye.x;ye=ye.y;var je=xe.x;xe=xe.y;var nt=Ee.x;Ee=Ee.y;var ot=Ne*Qm(Ye,ye,je,xe);Ne*=Qm(je,xe,nt,Ee),Ie.$(ye,xe)&&Ie.$(je,nt)&&(je>Ye?Ee>xe?(z.x=je-ot,z.y=xe-ot,b.x=je+Ne,b.y=xe+Ne):(z.x=je-ot,z.y=xe+ot,b.x=je+Ne,b.y=xe-Ne):Ee>xe?(z.x=je+ot,z.y=xe-ot,b.x=je-Ne,b.y=xe+Ne):(z.x=je+ot,z.y=xe+ot,b.x=je-Ne,b.y=xe-Ne)),Ie.$(Ye,je)&&Ie.$(xe,Ee)&&(xe>ye?(nt>je?(z.x=je-ot,z.y=xe-ot,b.x=je+Ne):(z.x=je+ot,z.y=xe-ot,b.x=je-Ne),b.y=xe+Ne):(nt>je?(z.x=je-ot,z.y=xe+ot,b.x=je+Ne):(z.x=je+ot,z.y=xe+ot,b.x=je-Ne),b.y=xe-Ne)),(Ie.$(Ye,je)&&Ie.$(je,nt)||Ie.$(ye,xe)&&Ie.$(xe,Ee))&&(Ye=.5*(Ye+nt),ye=.5*(ye+Ee),z.x=Ye,z.y=ye,b.x=Ye,b.y=ye),(ge===1||ge===2&&Ie.$(ee.x,this.i(0).x)&&Ie.$(ee.y,this.i(0).y))&&(x.x=.5*(ee.x+le.x),x.y=.5*(ee.y+le.y)),md(re,x.x-E,x.y-oe,z.x-E,z.y-oe,le.x-E,le.y-oe),y.set(z),x.set(b),ee=le}}le=ee.x,ee=ee.y,he=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(he=Zf(this,he.copy(),!1,rs)),le=.5*(le+he.x),ee=.5*(ee+he.y),md(re,b.x-E,b.y-oe,le-E,ee-oe,he.x-E,he.y-oe),$e.free(y),$e.free(x),$e.free(z),$e.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),ee=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(ee=Zf(this,ee.copy(),!1,rs)),md(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ee.x-E,ee.y-oe);else{for(z=$e.alloc(),z.assign(this.i(0)),b=$e.alloc(),b.assign(z),ee=this.computeCorner(),ge=1,le=0;ge<y;){if(ge=Xv(this,z,ge,1<ge),he=this.i(ge),ge>=y-1){if(!z.D(he))this.computeShortLength(!1)!==0&&(he=Zf(this,he.copy(),!1,rs)),Wf(this,re,-E,-oe,z,he,x);else if(le===0)for(ge=1;ge<y;)b.assign(z),he=this.i(ge++),Wf(this,re,-E,-oe,z,he,x),z.assign(he);break}if(le=Xv(this,he,ge+1,ge<y-3),ge=-E,Ye=-oe,ye=he,je=this.i(le),Ne=x,Ie.B(z.y,ye.y)&&Ie.B(ye.x,je.x))if(Ee=Math.min(ee,Math.abs(ye.x-b.x)/2),Ee=ot=Math.min(Ee,Math.abs(je.y-ye.y)/2),Ie.B(Ee,0))Wf(this,re,ge,Ye,z,ye,Ne),z.assign(ye);else{var ut=ye.x,vt=ye.y;xe=ut,nt=vt,ye.x>z.x?ut=ye.x-Ee:ut=ye.x+Ee,je.y>ye.y?nt=ye.y+ot:nt=ye.y-ot,je=$e.allocAt(ut,vt),Wf(this,re,ge,Ye,z,je,Ne),$e.free(je),Gm(re,ye.x+ge,ye.y+Ye,xe+ge,nt+Ye),z.h(xe,nt)}else Ie.B(z.x,ye.x)&&Ie.B(ye.y,je.y)?(Ee=Math.min(ee,Math.abs(ye.y-b.y)/2),Ee=ot=Math.min(Ee,Math.abs(je.x-ye.x)/2),Ie.B(ot,0)?(Wf(this,re,ge,Ye,z,ye,Ne),z.assign(ye)):(ut=ye.x,vt=ye.y,xe=ut,nt=vt,ye.y>z.y?vt=ye.y-Ee:vt=ye.y+Ee,je.x>ye.x?xe=ye.x+ot:xe=ye.x-ot,je=$e.allocAt(ut,vt),Wf(this,re,ge,Ye,z,je,Ne),$e.free(je),Gm(re,ye.x+ge,ye.y+Ye,xe+ge,nt+Ye),z.h(xe,nt))):(Wf(this,re,ge,Ye,z,ye,Ne),z.assign(ye));b.assign(he),ge=le}$e.free(z)}Hm=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Zf(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Zf(this,re,!1,z)),a.type=wt.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function Qm(a,y,x,E){return a=x-a,isNaN(a)||a===1/0||a===-1/0?NaN:(0>a&&(a=-a),y=E-y,isNaN(y)||y===1/0||y===-1/0?NaN:(0>y&&(y=-y),Ie.$(a,0)?y:Ie.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Zf(a,y,x,E){var b=a.pointsCount;if(2>b)return y;if(x){var z=a.i(1);if(x=z.x-E.x,z=z.y-E.y,E=Qm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!0),a>b&&(a=b),b=a*(z-y.y)/E,y.x+=a*(x-y.x)/E,y.y+=b}else{if(z=a.i(b-2),x=z.x-E.x,z=z.y-E.y,E=Qm(y.x,y.y,x,z),E===0)return y;b=b===2?.5*E:E,a=a.computeShortLength(!1),a>b&&(a=b),b=a*(y.y-z)/E,y.x-=a*(y.x-x)/E,y.y-=b}return y}function Xv(a,y,x,E){for(var b=a.pointsCount,z=y;Ie.$(y.x,z.x)&&Ie.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Ie.$(y.x,z.x)&&!Ie.$(y.y,z.y))return x-1;for(var ee=z;Ie.$(y.x,z.x)&&Ie.$(z.x,ee.x)&&(!E||(y.y>=z.y?z.y>=ee.y:z.y<=ee.y))||Ie.$(y.y,z.y)&&Ie.$(z.y,ee.y)&&(!E||(y.x>=z.x?z.x>=ee.x:z.x<=ee.x));){if(x>=b)return b-1;ee=a.i(x++)}return x-2}Fn.prototype.computeJumpLength=function(){return 10};function Wf(a,y,x,E,b,z,ee){if(!ee&&Ef(a)){ee=a.computeJumpLength();var re=ee/2,oe=[],le=0;if(a.isVisible()&&(le=bx(a,b,z,oe)),0<le){if(Ie.B(b.y,z.y))if(b.x<z.x)for(var he=0;he<le;){var ge=Math.max(b.x,Math.min(oe[he++]-re,z.x-ee));y.lineTo(ge+x,z.y+E);for(var ye=ge+x,xe=Math.min(ge+ee,z.x);he<le&&(ge=oe[he],ge<xe+ee);)he++,xe=Math.min(ge+re,z.x);ge=z.y-ee+E,xe+=x;var Ee=z.y+E;a.curve===xd?Mg(y,xe,Ee,!1):md(y,ye,ge,xe,ge,xe,Ee)}else for(--le;0<=le;){for(he=Math.min(b.x,Math.max(oe[le--]+re,z.x+ee)),y.lineTo(he+x,z.y+E),ye=he+x,ge=Math.max(he-ee,z.x);0<=le&&(he=oe[le],he>ge-ee);)le--,ge=Math.max(he-re,z.x);he=z.y-ee+E,ge+=x,xe=z.y+E,a.curve===xd?Mg(y,ge,xe,!1):md(y,ye,he,ge,he,ge,xe)}else if(Ie.B(b.x,z.x))if(b.y<z.y)for(he=0;he<le;){for(ge=Math.max(b.y,Math.min(oe[he++]-re,z.y-ee)),y.lineTo(z.x+x,ge+E),ye=ge+E,ge=Math.min(ge+ee,z.y);he<le&&(xe=oe[he],xe<ge+ee);)he++,ge=Math.min(xe+re,z.y);xe=z.x-ee+x,Ee=z.x+x,ge+=E,a.curve===xd?Mg(y,Ee,ge,!1):md(y,xe,ye,xe,ge,Ee,ge)}else for(--le;0<=le;){for(he=Math.min(b.y,Math.max(oe[le--]+re,z.y+ee)),y.lineTo(z.x+x,he+E),ye=he+E,he=Math.max(he-ee,z.y);0<=le&&(ge=oe[le],ge>he-ee);)le--,he=Math.max(ge-re,z.y);ge=z.x-ee+x,xe=z.x+x,he+=E,a.curve===xd?Mg(y,xe,he,!1):md(y,ge,ye,ge,he,xe,he)}}}y.lineTo(z.x+x,z.y+E)}function bx(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 ee=z.length,re=0;re<ee;re++){var oe=z[re];if(oe instanceof Fn){if(oe===a)return 0<E.length&&E.sort(function(he,ge){return he-ge}),E.length;if(oe.isVisible()&&Ef(oe)){var le=oe.routeBounds;le.w()&&a.routeBounds.Yc(le)&&!a.usesSamePort(oe)&&(le=oe.path,le!==null&&le.Ed()&&Lx(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(he,ge){return he-ge}),E.length}function Lx(a,y,x,E){for(var b=Ie.B(a.y,y.y),z=E.pointsCount,ee=E.i(0),re=$e.alloc(),oe=1;oe<z;oe++){var le=E.i(oe);if(oe<z-1){var he=E.i(oe+1);if(ee.y===le.y&&le.y===he.y){if(le.x>ee.x&&he.x>=le.x||le.x<ee.x&&he.x<=le.x)continue}else if(ee.x===le.x&&le.x===he.x&&(le.y>ee.y&&he.y>=le.y||le.y<ee.y&&he.y<=le.y))continue}e:{he=a.x;var ge=a.y,ye=y.x,xe=y.y,Ee=ee.x;ee=ee.y;var Ne=le.x,Ye=le.y;if(Ie.B(he,ye)){if(!Ie.B(ge,xe)&&Ie.B(ee,Ye)&&Math.min(ge,xe)<ee&&Math.max(ge,xe)>ee&&Math.min(Ee,Ne)<he&&Math.max(Ee,Ne)>he&&!Ie.B(Ee,Ne)){re.x=he,re.y=ee,he=!0;break e}}else if(Ie.B(ge,xe)&&Ie.B(Ee,Ne)&&Math.min(he,ye)<Ee&&Math.max(he,ye)>Ee&&Math.min(ee,Ye)<ge&&Math.max(ee,Ye)>ge&&!Ie.B(ee,Ye)){re.x=Ee,re.y=ge,he=!0;break e}re.x=0,re.y=0,he=!1}he&&(b?x.push(re.x):x.push(re.y)),ee=le}$e.free(re)}function Ef(a){return a=a.curve,a===Ng||a===xd}function $m(a,y){(y||Ef(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()))}Fn.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 ee=b.length,re=0;re<ee;re++){var oe=b[re];oe instanceof Fn&&(oe===this?z=!0:z&&eS(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ee=0;ee<b;ee++)re=z[ee],re instanceof Fn&&eS(this,re,a)}}}}};function eS(a,y,x){if(y!==null&&y.lk&&y.fd&&Ef(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Fn.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},Fn.prototype.isVisible=function(){if(!Ti.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},Fn.prototype.Zb=function(a){if(Ti.prototype.Zb.call(this,a),a&&$m(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Fn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?Ep:this.qk};function wp(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,ee=y.jb.s,re=ee.length,oe=0;oe<re;oe++){var le=ee[oe];(le.ef===y&&le.ff===E&&le.uf===x&&le.vf===b||le.ef===x&&le.ff===b&&le.uf===y&&le.vf===E)&&(z===null?z=le:(a===null&&(a=[],a.push(z)),a.push(le)))}if(a!==null){for(z=H1(y,x,E,b),z===null&&(z=new i0(y,E,x,b),G1(y,z),G1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function Pp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(sa(y.links,a),y.Sl()))}Fn.prototype.ph=function(){return!0},Jt.Object.defineProperties(Fn.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&&Km(y,this,x),Pp(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 ee=!0;E!==null&&(ee=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ee)}a!==null&&(this.uf!==a&&Vm(a,this,b),wp(this),this.C(1)),this.g("fromNode",y,a),Fg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Hu(x),Pp(this),this.ff=a;var E=this.fromPort;E!==null&&Hu(E);var b=this.diagram;if(b!==null){var z=this.data,ee=b.model;z!==null&&ee.ri()&&ee.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(ee=!0,b!==null&&(ee=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ee))),wp(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&&Km(y,this,x),Pp(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 ee=!0;E!==null&&(ee=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=ee)}a!==null&&(this.ef!==a&&Vm(a,this,b),wp(this),this.C(1)),this.g("toNode",y,a),Fg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Hu(x),Pp(this),this.vf=a;var E=this.toPort;E!==null&&Hu(E);var b=this.diagram;if(b!==null){var z=this.data,ee=b.model;z!==null&&ee.ri()&&ee.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(ee=!0,b!==null&&(ee=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=ee))),wp(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:Fs},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&&Hu(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&&Zi(a,">= 0",Fn,"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:Fs},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&&Hu(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&&Zi(a,">= 0",Fn,"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?na: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&&xp(this.fromNode),this.toNode!==null&&xp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Lr?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()===rh&&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),Ie.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 ee=this.i(z-2);z+3>=E&&(z=E-1);var re=this.i(z-1),oe=this.i(z);Ie.Dl(b.x,b.y,ee.x,ee.y,re.x,re.y,oe.x,oe.y,.5,a),y=Math.min(oe.x,y),x=Math.min(oe.y,x),b=oe}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 $e)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||Ym(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);Ie.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):Ie.$(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 bn,E=0;E<a.length/2;E++)b=new $e(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(!En(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new bn,E=0;E<a.length;E++)b=a[E],x.add(new $e(b.x,b.y).freeze())}}else if(a instanceof bn)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Rt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),Ym(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&fo(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||!kg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!kg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),$m(this,y===xd||y===Ng||a===xd||a===Ng),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),$m(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Fn.prototype.invalidateOtherJumpOvers=Fn.prototype.Xo,Fn.prototype.findClosestSegment=Fn.prototype.ez,Fn.prototype.updateRoute=Fn.prototype.vg,Fn.prototype.invalidateRoute=Fn.prototype.bb,Fn.prototype.rollbackRoute=Fn.prototype.rv,Fn.prototype.commitRoute=Fn.prototype.zf,Fn.prototype.startRoute=Fn.prototype.uh,Fn.prototype.clearPoints=Fn.prototype.Fj,Fn.prototype.removePoint=Fn.prototype.pv,Fn.prototype.addPointAt=Fn.prototype.yf,Fn.prototype.addPoint=Fn.prototype.ne,Fn.prototype.insertPointAt=Fn.prototype.m,Fn.prototype.insertPoint=Fn.prototype.Kz,Fn.prototype.setPointAt=Fn.prototype.L,Fn.prototype.setPoint=Fn.prototype.dd,Fn.prototype.getPoint=Fn.prototype.i,Fn.prototype.getOtherPort=Fn.prototype.Cz,Fn.prototype.getOtherNode=Fn.prototype.To;var Vf=null,Kf=null,Jv=new Wt(Fn,"Normal",1),Mx=new Wt(Fn,"Orthogonal",2),Fx=new Wt(Fn,"AvoidsNodes",6),tS=new Wt(Fn,"AvoidsNodesStraight",7),iu=new Wt(Fn,"None",0),rh=new Wt(Fn,"Bezier",9),xd=new Wt(Fn,"JumpGap",10),Ng=new Wt(Fn,"JumpOver",11),Ep=new Wt(Fn,"End",17),qm=new Wt(Fn,"Scale",18),e0=new Wt(Fn,"Stretch",19),Cp=new Wt(Fn,"OrientAlong",21),bp=new Wt(Fn,"OrientPlus90",22),Lp=new Wt(Fn,"OrientMinus90",23),Qv=new Wt(Fn,"OrientOpposite",24),t0=new Wt(Fn,"OrientUpright",25),Mp=new Wt(Fn,"OrientPlus90Upright",26),Fp=new Wt(Fn,"OrientMinus90Upright",27),n0=new Wt(Fn,"OrientUpright45",28),nS=16,iS=14,kp=8;Fn.className="Link",Fn.Normal=Jv,Fn.Orthogonal=Mx,Fn.AvoidsNodes=Fx,Fn.AvoidsNodesStraight=tS,Fn.None=iu,Fn.Bezier=rh,Fn.JumpGap=xd,Fn.JumpOver=Ng,Fn.End=Ep,Fn.Scale=qm,Fn.Stretch=e0,Fn.OrientAlong=Cp,Fn.OrientPlus90=bp,Fn.OrientMinus90=Lp,Fn.OrientOpposite=Qv,Fn.OrientUpright=t0,Fn.OrientPlus90Upright=Mp,Fn.OrientMinus90Upright=Fp,Fn.OrientUpright45=n0,Fn.EndSegmentStep=8,Fn.CurvinessStart=nS,Fn.SpacingMin=iS,Fn.OrthoShortCut=kp;function i0(a,y,x,E){Zo(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}i0.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},i0.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))}},i0.className="LinkBundle";function Np(a){Zo(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}Np.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=$v,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 Ag(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Dc(a,y,x){return Ag(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):$v}function rS(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]>=Cf&&(x[E]=$v)}Np.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]===wd)return!1}return!0};function Oc(a,y,x,E,b,z,ee,re,oe){if(!(y<z||y>ee||x<re||x>oe)){var le=y|0,he=x|0,ge=a.ac[le][he];if(ge>=Cf&&ge<Bg)for(b?he+=E:le+=E,ge+=1;z<=le&&le<=ee&&re<=he&&he<=oe&&!(ge>=a.ac[le][he]);)a.ac[le][he]=ge,ge+=1,b?he+=E:le+=E;if(le=b?he:le,b)if(0<E)for(x+=E;x<le;x+=E)Oc(a,y,x,1,!b,z,ee,re,oe),Oc(a,y,x,-1,!b,z,ee,re,oe);else for(x+=E;x>le;x+=E)Oc(a,y,x,1,!b,z,ee,re,oe),Oc(a,y,x,-1,!b,z,ee,re,oe);else if(0<E)for(y+=E;y<le;y+=E)Oc(a,y,x,1,!b,z,ee,re,oe),Oc(a,y,x,-1,!b,z,ee,re,oe);else for(y+=E;y>le;y+=E)Oc(a,y,x,1,!b,z,ee,re,oe),Oc(a,y,x,-1,!b,z,ee,re,oe)}}function r0(a,y,x,E,b,z,ee,re,oe){y|=0,x|=0;var le=wd,he=Cf;for(a.ac[y][x]=he;le===wd&&y>z&&y<ee&&x>re&&x<oe;)he+=1,a.ac[y][x]=he,b?x+=E:y+=E,le=a.ac[y][x]}function o0(a,y,x,E,b,z,ee,re,oe){y|=0,x|=0;var le=wd,he=Bg;for(a.ac[y][x]=he;le===wd&&y>z&&y<ee&&x>re&&x<oe;)a.ac[y][x]=he,b?x+=E:y+=E,le=a.ac[y][x]}function oS(a,y,x,E,b,z,ee){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(Ag(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var le=E.x,he=E.y;if(Ag(a,le,he))if(le-=a.Nd,le/=a.rc,he-=a.Od,he/=a.sc,1>=Math.abs(re-le)&&1>=Math.abs(oe-he))a.abort=!0;else{var ge=z.x;E=z.y,y=z.x+z.width;var ye=z.y+z.height;ge-=a.Nd,ge/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,ye-=a.Od,ye/=a.sc,z=Math.max(0,Math.min(a.di,ge|0)),y=Math.min(a.di,Math.max(0,y|0)),ge=Math.max(0,Math.min(a.ei,E|0)),ye=Math.min(a.ei,Math.max(0,ye|0)),E=a.ac,re|=0,oe|=0,le|=0,he|=0;var xe=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===wd?(r0(a,re,oe,xe,x,z,y,ge,ye),r0(a,re,oe,1,!x,z,y,ge,ye),r0(a,re,oe,-1,!x,z,y,ge,ye)):r0(a,re,oe,xe,x,re,oe,re,oe),E[le][he]===wd?(o0(a,le,he,b===0||b===90?1:-1,b===90||b===270,z,y,ge,ye),o0(a,le,he,1,!(b===90||b===270),z,y,ge,ye),o0(a,le,he,-1,!(b===90||b===270),z,y,ge,ye)):o0(a,le,he,xe,x,le,he,le,he),x=Yi(),ee&&aS(a,le,he,b,re,oe,x))for((x[0]!==le||x[1]!==he)&&(x.unshift(he),x.unshift(le)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=Cf,b=x[x.length-2],ee=x[x.length-1],E[b][ee]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],ee=x[z+3],y=x[z],le=x[z+1];y>b?b++:y<b?b--:le>ee?ee++:le<ee&&ee--,E[b][ee]=a++,b!==y||ee!==le;);else Oc(a,re,oe,1,!1,z,y,ge,ye),Oc(a,re,oe,-1,!1,z,y,ge,ye),Oc(a,re,oe,1,!0,z,y,ge,ye),Oc(a,re,oe,-1,!0,z,y,ge,ye);Wi(x)}}}}function aS(a,y,x,E,b,z,ee){for(var re=a.ac,oe=y,le=x;;){if(oe===b&&le===z)return!0;var he=oe,ge=le;if(E===0)if(he<b)he++;else break;else if(E===90)if(ge<z)ge++;else break;else if(E===180)if(he>b)he--;else break;else if(ge>z)ge--;else break;var ye=re[he][ge];if(ye===0||ye===qv)break;oe=he,le=ge}for(;;){if(he=E,ge=oe,ye=le,E===0?ye<z?(he=90,ye++):ye>z&&(he=270,ye--):E===90?ge<b?(he=0,ge++):ge>b&&(he=180,ge--):E===180?ye<z?(he=90,ye++):ye>z&&(he=270,ye--):ge<b?(he=0,ge++):ge>b&&(he=180,ge--),ge=re[ge][ye],he!==E&&ge!==0&&ge!==qv){if(ee.push(oe),ee.push(le),aS(a,oe,le,he,b,z,ee))return!0;ee.pop(),ee.pop()}if(re[oe][le]=qv,E===0){if(oe===y)return!1;oe--}else if(E===90){if(le===x)return!1;le--}else if(E===180){if(oe===y)return!1;oe++}else{if(le===x)return!1;le++}}}Jt.Object.defineProperties(Np.prototype,{bounds:{get:function(){return new Xt(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 wd=0,Cf=1,Bg=999999,$v=Bg+1,qv=Bg+2;Np.className="PositionArray";function Uf(){Zo(this),this.port=this.node=null,this.pe=[],this.ap=!1}Uf.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 kx(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}Uf.prototype.Sl=function(){this.pe.length=0};function sS(a,y){var x=a.pe;if(x.length===0){e:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof cr?b:null;if(z===null||z.isSubGraphExpanded)var ee=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break e}E=z,ee=E.Lu()}z=a.pe.length=0;var re=a.port.ga(Os,$e.alloc()),oe=a.port.ga(il,$e.alloc());for(b=Xt.allocAt(re.x,re.y,0,0),b.Ye(oe),$e.free(re),$e.free(oe),re=$e.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ee=ee.iterator;ee.next();){var le=ee.value;if(le.isVisible()&&le.fromPort!==le.toPort){var he=le.fromPort===a.port||le.fromNode!==null&&le.fromNode.Td(E),ge=le.computeSpot(he,a.port);if(ge.$c()&&(he=he?le.toPort:le.fromPort,he!==null)){var ye=he.part;if(ye!==null){var xe=ye.findVisibleNode();xe!==null&&xe!==ye&&(ye=xe,he=ye.port),he=le.computeOtherPoint(ye,he),ye=re.ab(he),ye-=oe,0>ye?ye+=360:360<=ye&&(ye-=360),ge=kx(b,ge,ye,le.isOrthogonal),ge===0?(ge=4,180<ye&&(ye-=360)):ge===90?(ge=8,270<ye&&(ye-=360)):ge===180?ge=2:(ge=1,90>ye&&(ye+=360)),xe=a.pe[z],xe===void 0?(xe=new ey(le,ye,ge),a.pe[z]=xe):(xe.link=le,xe.angle=ye,xe.Nc=ge),xe.hv.set(he),z++}}}}for($e.free(re),a.pe.sort(Uf.prototype.j),oe=a.pe.length,E=-1,z=re=0;z<oe;z++)ee=a.pe[z],ee!==void 0&&(ee.Nc!==E&&(E=ee.Nc,re=0),ee.Uo=re,re++);for(E=-1,re=0,z=oe-1;0<=z;z--)oe=a.pe[z],oe!==void 0&&(oe.Nc!==E&&(E=oe.Nc,re=oe.Uo+1),oe.Gl=re);if(z=a.pe,ge=a.port,E=a.node.portSpreading,re=$e.alloc(),oe=$e.alloc(),ee=$e.alloc(),le=$e.alloc(),ge.ga(Os,re),ge.ga(sc,oe),ge.ga(il,ee),ge.ga(Pu,le),xe=ye=he=ge=0,E===Zv)for(var Ee=0;Ee<z.length;Ee++){var Ne=z[Ee];if(Ne!==null){var Ye=Ne.link.computeThickness();switch(Ne.Nc){case 8:ye+=Ye;break;case 2:xe+=Ye;break;case 1:ge+=Ye;break;default:case 4:he+=Ye}}}var je=Ee=0,nt=1,ot=Ne=0;for(Ye=0;Ye<z.length;Ye++){var ut=z[Ye];if(ut!==null){if(Ee!==ut.Nc){switch(Ee=ut.Nc,Ee){case 8:var vt=ee;je=le;break;case 2:vt=le,je=re;break;case 1:vt=re,je=oe;break;default:case 4:vt=oe,je=ee}switch(Ne=je.x-vt.x,ot=je.y-vt.y,Ee){case 8:ye>Math.abs(Ne)?(nt=Math.abs(Ne)/ye,ye=Math.abs(Ne)):nt=1;break;case 2:xe>Math.abs(ot)?(nt=Math.abs(ot)/xe,xe=Math.abs(ot)):nt=1;break;case 1:ge>Math.abs(Ne)?(nt=Math.abs(Ne)/ge,ge=Math.abs(Ne)):nt=1;break;default:case 4:he>Math.abs(ot)?(nt=Math.abs(ot)/he,he=Math.abs(ot)):nt=1}je=0}var Dt=ut.Zo;if(E===Zv){switch(ut=ut.link.computeThickness(),ut*=nt,Dt.set(vt),Ee){case 8:Dt.x=vt.x+Ne/2+ye/2-je-ut/2;break;case 2:Dt.y=vt.y+ot/2+xe/2-je-ut/2;break;case 1:Dt.x=vt.x+Ne/2-ge/2+je+ut/2;break;default:case 4:Dt.y=vt.y+ot/2-he/2+je+ut/2}je+=ut}else{var Wn=.5;E===Um&&(Wn=(ut.Uo+1)/(ut.Gl+1)),Dt.x=vt.x+Ne*Wn,Dt.y=vt.y+ot*Wn}}}for($e.free(re),$e.free(oe),$e.free(ee),$e.free(le),vt=a.pe,z=0;z<vt.length;z++)E=vt[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Xt.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}Uf.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},Uf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,Ms,y.fromPort===this.port),E=a.Uo;if(0>E)return x;var b=a.Gl;if(1>=b||!y.isOrthogonal)return x;y=a.hv;var z=a.Zo;return(a.Nc===2||a.Nc===8)&&(E=b-1-E),((a=a.Nc===2||a.Nc===4)?y.y<z.y:y.x<z.x)?x+8*E:(a?y.y===z.y:y.x===z.x)?x:x+8*(b-1-E)},Uf.className="Knot";function ey(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new $e,this.Gl=this.Uo=0,this.Zo=new $e,this.Ju=0}ey.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()},ey.className="LinkInfo";function za(a){Zo(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new $e(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}za.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},za.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},za.prototype.qb=function(){},za.prototype.toString=function(){var a=er(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},za.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())}}},za.prototype.createNetwork=function(){return new xa(this)},za.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof kt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof cr?y.lg(a.memberParts):y.lg(a.iterator),y},za.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")}},za.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()}},za.prototype.doLayout=function(a){var y=new Sn;a instanceof kt?(Hd(this,y,a.nodes,!0,this.rh,!0,!1,!0),Hd(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof cr?Hd(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},za.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,ee=0;for(a=a.iterator;a.next();){var re=a.value;Ap(re);var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof cr&&(re.rh=!1),E+=Math.max(le,50)+20,ee=Math.max(ee,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ee+20,ee=0):z++}},za.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,ee=this.network.vertexes.iterator;ee.next();){var re=ee.value.node;if(!(re===null||re instanceof Fn)&&(Ap(re),this.rh(re))){var oe=re.measuredBounds,le=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof cr&&(re.rh=!1),x+=Math.max(le,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},za.prototype.rh=function(a){return!!(!a.location.w()||a instanceof cr&&a.rh)};function Hd(a,y,x,E,b,z,ee,re){for(x=x.iterator;x.next();){var oe=x.value;E&&!oe.isTopLevel||b!==null&&!b(oe)||!oe.canLayout()||(z&&oe instanceof Jn?oe.isLinkLabel||(oe instanceof cr&&oe.layout===null?Hd(a,y,oe.memberParts,!1,b,z,ee,re):(Ap(oe),y.add(oe))):ee&&oe instanceof Fn?y.add(oe):!re||!oe.Zc()||oe instanceof Jn||(Ap(oe),y.add(oe)))}}function Ap(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}za.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Xt),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},za.prototype.ex=function(a){var y=new Sn;return a instanceof kt?(Hd(this,y,a.nodes,!0,null,!0,!0,!0),Hd(this,y,a.links,!0,null,!0,!0,!0),Hd(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof cr?Hd(this,y,a.memberParts,!1,null,!0,!0,!0):Hd(this,y,a.iterator,!1,null,!0,!0,!0),y},za.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(Os),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},Jt.Object.defineProperties(za.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())}}}),za.prototype.collectParts=za.prototype.ex,za.prototype.getLayoutBounds=za.prototype.ni,za.prototype.invalidateLayout=za.prototype.C,za.className="Layout";function xa(a){Zo(this),this.Sc=a,this.wf=new Sn,this.ye=new Sn,this.Es=new ki,this.zs=new ki}xa.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 Sn,this.ye=new Sn,this.Es=new ki,this.zs=new ki},xa.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},xa.prototype.createVertex=function(){return new Rs(this)},xa.prototype.createEdge=function(){return new Zu(this)},xa.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(ee){if(ee instanceof Jn)return!ee.isLinkLabel;if(ee instanceof Fn){var re=ee.fromNode;return re===null||re.isLinkLabel?!1:(ee=ee.toNode,!(ee===null||ee.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof Jn&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof cr&&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 Fn&&(!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))}}},xa.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},we=xa.prototype,we.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},we.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},we.Iu=function(a){if(a!==null&&lS(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 lS(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}we.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},we.ki=function(a){return a===null?null:this.Es.I(a)},we.Bo=function(a){if(a!==null){ty(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function ty(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}}we.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},we.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),ny(this,a)}};function ny(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}we.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},we.Lo=function(a){return a===null?null:this.zs.I(a)},we.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},we.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))}},we.Ko=function(){for(var a=Yi(),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]);Wi(a)},xa.prototype.deleteArtificialVertexes=function(){for(var a=Yi(),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=Yi(),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]);Wi(a),Wi(y)};function Nx(a){for(var y=Yi(),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]);Wi(y)}xa.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new bn;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),iy(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 iy(a,y,x){if(x!==null&&x.network!==y){lS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(ny(a,b),ty(y,b),iy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(ny(a,x),ty(y,x),iy(a,y,x.toVertex))}}xa.prototype.dz=function(){for(var a=new Sn,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},Jt.Object.defineProperties(xa.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}}}),xa.prototype.findAllParts=xa.prototype.dz,xa.prototype.splitIntoSubNetworks=xa.prototype.Zx,xa.prototype.deleteSelfEdges=xa.prototype.Ko,xa.prototype.reverseEdge=xa.prototype.gm,xa.prototype.linkVertexes=xa.prototype.Zj,xa.prototype.findEdge=xa.prototype.Lo,xa.prototype.deleteLink=xa.prototype.Yy,xa.prototype.deleteEdge=xa.prototype.Mj,xa.prototype.addLink=xa.prototype.Dy,xa.prototype.addEdge=xa.prototype.Bo,xa.prototype.findVertex=xa.prototype.ki,xa.prototype.deleteNode=xa.prototype.Zy,xa.prototype.deleteVertex=xa.prototype.Iu,xa.prototype.addNode=xa.prototype.Bl,xa.prototype.addVertex=xa.prototype.dh,xa.prototype.addParts=xa.prototype.lg,xa.className="LayoutNetwork";function Rs(a){Zo(this),this.ob=a,this.j=new Xt(0,0,10,10).freeze(),this.o=new $e(5,5).freeze(),this.Sh=this.ub=null,this.tg=new bn,this.mg=new bn}Rs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new bn,this.mg=new bn},Rs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+Vr(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},Rs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;En(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 cr)){x=Xt.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(Oo);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Xt.free(x);return}Xt.free(x)}a.moveTo(y.x,y.y)}},Rs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Rs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Rs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Rs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function ry(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}Jt.Object.defineProperties(Rs.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=Xt.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),Xt.free(x),!(a instanceof cr)&&(a=a.locationObject.ga(Oo),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 Sn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new Sn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new Sn,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 bn,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}}}),Rs.prototype.deleteDestinationEdge=Rs.prototype.Jl,Rs.prototype.addDestinationEdge=Rs.prototype.zl,Rs.prototype.deleteSourceEdge=Rs.prototype.Kl,Rs.prototype.addSourceEdge=Rs.prototype.Cl,Rs.className="LayoutVertex",Rs.standardComparer=ry,Rs.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 Zu(a){Zo(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Zu.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Zu.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+Vr(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},Zu.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Zu.prototype.commit=function(){},Zu.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},Jt.Object.defineProperties(Zu.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)}}}),Zu.prototype.getOtherVertex=Zu.prototype.Ax,Zu.className="LayoutEdge";function gl(a){za.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new un(NaN,NaN).freeze(),this.tf=new un(10,10).freeze(),this.Jb=Bp,this.Rb=s0,this.nd=Tp,this.hd=uS,a&&Object.assign(this,a)}Ct(gl,za),gl.prototype.cloneProtected=function(a){za.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},gl.prototype.qb=function(a){a.classType===gl?a===Tp||a===u0||a===oy||a===l0?this.sorting=a:a===s0||a===$h?this.arrangement=a:a===Bp||a===a0?this.alignment=a:Rt("Unknown enum value: "+a):za.prototype.qb.call(this,a)},gl.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 cr)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 l0:b.reverse();break;case Tp:b.sort(this.comparer);break;case u0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var ee=this.wrappingWidth;switch(isNaN(ee)&&a!==null?(y=a.padding,ee=Math.max(a.viewportBounds.width-y.left-y.right,0)):ee=Math.max(this.wrappingWidth,0),0>=z&&0>=ee&&(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 a0:var re=y,oe=x,le=Xt.alloc(),he=Math.max(this.cellSize.width,1);if(!isFinite(he))for(var ge=he=0;ge<b.length;ge++){var ye=this.ni(b[ge],le);he=Math.max(he,ye.width)}if(he=Math.max(he+re,1),ge=Math.max(this.cellSize.height,1),!isFinite(ge))for(ye=ge=0;ye<b.length;ye++){var xe=this.ni(b[ye],le);ge=Math.max(ge,xe.height)}ge=Math.max(ge+oe,1),ye=this.arrangement;for(var Ee=xe=this.arrangementOrigin.x,Ne=this.arrangementOrigin.y,Ye=0,je=0,nt=0;nt<b.length;nt++){var ot=b[nt],ut=this.ni(ot,le),vt=Math.ceil((ut.width+re)/he)*he,Dt=Math.ceil((ut.height+oe)/ge)*ge;switch(ye){case $h:var Wn=Math.abs(Ee-ut.width);break;default:Wn=Ee+ut.width}switch((0<z&&Ye>z-1||0<ee&&0<Ye&&Wn-xe>ee)&&(E.push(new Xt(0,Ne,ee+re,je)),Ye=0,Ee=xe,Ne+=je,je=0),je=Math.max(je,Dt),ye){case $h:ut=-ut.width;break;default:ut=0}switch(ot.moveTo(Ee+ut,Ne),ye){case $h:Ee-=vt;break;default:Ee+=vt}Ye++}E.push(new Xt(0,Ne,ee+re,je)),Xt.free(le);break;case Bp:for(oe=ee,he=z,ge=y,ye=x,ee=Xt.alloc(),xe=Math.max(this.cellSize.width,1),z=Ne=le=0,re=$e.alloc(),Ee=0;Ee<b.length;Ee++)je=b[Ee],Ye=this.ni(je,ee),je=vd(je,je.locationObject,je.locationSpot,re),le=Math.max(le,je.x),Ne=Math.max(Ne,Ye.width-je.x),z=Math.max(z,je.y);switch(Ee=this.arrangement,Ee){case $h:le+=ge;break;default:Ne+=ge}xe=isFinite(xe)?Math.max(xe+ge,1):Math.max(le+Ne,1);var vi=je=this.arrangementOrigin.x;for(nt=this.arrangementOrigin.y,Ne=0,oe>=le&&(oe-=le),le=ot=0,vt=Math.max(this.cellSize.height,1),ut=z=0,Dt=!0,Ye=$e.alloc(),Wn=0;Wn<b.length;Wn++){var si=b[Wn],Mn=this.ni(si,ee),sn=vd(si,si.locationObject,si.locationSpot,re);if(0<Ne)switch(Ee){case $h:vi=(vi-je-(Mn.width-sn.x))/xe,vi=Ie.$(Math.round(vi),vi)?Math.round(vi):Math.floor(vi),vi=vi*xe+je;break;default:vi=(vi-je+sn.x)/xe,vi=Ie.$(Math.round(vi),vi)?Math.round(vi):Math.ceil(vi),vi=vi*xe+je}else switch(Ee){case $h:ot=vi+sn.x+Mn.width;break;default:ot=vi-sn.x}switch(Ee){case $h:var hr=-(vi+sn.x)+ot;break;default:hr=vi+Mn.width-sn.x-ot}if(0<he&&Ne>he-1||0<oe&&0<Ne&&hr>oe){for(E.push(new Xt(0,Dt?nt-z:nt,oe+ge,ut+z+ye)),vi=0;vi<Ne&&Wn!==Ne;vi++){hr=b[Wn-Ne+vi];var Ji=vd(hr,hr.locationObject,hr.locationSpot,Ye);hr.moveTo(hr.position.x,hr.position.y+z-Ji.y)}ut+=ye,nt=Dt?nt+ut:nt+(ut+z),Ne=ut=z=0,vi=je,Dt=!1}switch(vi===je&&(le=Ee===$h?Math.max(le,Mn.width-sn.x):Math.min(le,-sn.x)),z=Math.max(z,sn.y),ut=Math.max(ut,Mn.height-sn.y),isFinite(vt)&&(ut=Math.max(ut,Math.max(Mn.height,vt)-sn.y)),Dt?si.moveTo(vi-sn.x,nt-sn.y):si.moveTo(vi-sn.x,nt),Ee){case $h:vi-=sn.x+ge;break;default:vi+=Mn.width-sn.x+ge}Ne++}if(E.push(new Xt(0,nt,oe+ge,(Dt?ut:ut+z)+ye)),b.length!==Ne)for(oe=0;oe<Ne;oe++)he=b[b.length-Ne+oe],ge=vd(he,he.locationObject,he.locationSpot,re),he.moveTo(he.position.x,he.position.y+z-ge.y);if($e.free(re),$e.free(Ye),Ee===$h)for(b=0;b<E.length;b++)z=E[b],z.width+=le,z.x-=le;else for(b=0;b<E.length;b++)z=E[b],z.x>le&&(z.width+=z.x-le,z.x=le);Xt.free(ee)}for(re=z=ee=b=0;re<E.length;re++)oe=E[re],b=Math.min(b,oe.x),ee=Math.min(ee,oe.y),z=Math.max(z,oe.x+oe.width);this.arrangement===$h?this.commitLayers(E,new $e(b+y/2-(z+b),ee-x/2)):this.commitLayers(E,new $e(b-y/2,ee-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},gl.prototype.commitLayers=function(){};function uS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}Jt.Object.defineProperties(gl.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!==a0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==s0&&a!==$h||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==oy&&a!==l0&&a!==Tp&&a!==u0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var a0=new Wt(gl,"Position",0),Bp=new Wt(gl,"Location",1),s0=new Wt(gl,"LeftToRight",2),$h=new Wt(gl,"RightToLeft",3),oy=new Wt(gl,"Forward",4),l0=new Wt(gl,"Reverse",5),Tp=new Wt(gl,"Ascending",6),u0=new Wt(gl,"Descending",7);gl.className="GridLayout",gl.standardComparer=uS,gl.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},gl.Position=a0,gl.Location=Bp,gl.LeftToRight=s0,gl.RightToLeft=$h,gl.Forward=oy,gl.Reverse=l0,gl.Ascending=Tp,gl.Descending=u0;function ea(){this.On=new Sn,this.Dn=new Sn,this.Pa=new Sn,this.cf=new ki,this.bf=new ki,this.aj=new ki,this.H=null,this.tp=!1}we=ea.prototype,we.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},we.Xe=function(a){this.H=a},we.oi=function(a){if(a instanceof Jn){if(this.On.add(a),a instanceof cr){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 Fn?this.Dn.add(a):a instanceof Lo||this.Pa.add(a);y=a.data,y===null||a instanceof Lo||(a instanceof Fn?this.bf.add(y,a):this.cf.add(y,a))},we.pc=function(a){if(a.Ej(),a instanceof Jn){if(this.On.remove(a),a instanceof cr){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 Fn?this.Dn.remove(a):a instanceof Lo||this.Pa.remove(a);y=a.data,y===null||a instanceof Lo||(a instanceof Fn?this.bf.remove(y):this.cf.remove(y))},we.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 cr)&&Rt('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 cr||Rt('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 Fn||Rt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Yi(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Yi(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Yi(),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]);Wi(y),Wi(x),Wi(a)}},ea.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},ea.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&hS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Vc(this.diagram,!1)};function hS(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);e:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=cS(a,y,E);if(b!==null&&(Ph(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 e}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}ea.prototype.insertLink=function(){return null},ea.prototype.resolveReferencesForData=function(){},ea.prototype.Ro=function(a){return this.H.model.Ro(a)};function cS(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&&(gS||(gS=!0,Wr('No Group template found for category "'+x+'"'),Wr(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(fS||(fS=!0,Wr('No Node template found for category "'+x+'"'),Wr(" Using default node template")),y=a.ny))),y}ea.prototype.getLinkCategoryForData=function(){return""},ea.prototype.setLinkCategoryForData=function(){},ea.prototype.setFromNodeForLink=function(){},ea.prototype.setToNodeForLink=function(){},ea.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(pS||(pS=!0,Wr('No Link template found for category "'+a+'"'),Wr(" Using default link template")),x=y.my)),x},ea.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},ea.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},ea.prototype.ip=function(a){a=this.Lc(a),a!==null&&(uf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},ea.prototype.unresolveReferencesForPart=function(){},ea.prototype.removeDataForLink=function(){},ea.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},ea.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof Jn?a:null)},ea.prototype.findLinkForKey=function(){return null},we=ea.prototype,we.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},we.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof Jn?a:null)},we.Kc=function(a){return a===null?null:this.bf.I(a)},we.ms=function(a){for(var y=0;y<arguments.length;++y);y=new Sn;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 ee=arguments[z];if(En(ee)&&ay(this,b,ee)){y.add(E);break}}}return y.iterator},we.ls=function(a){for(var y=0;y<arguments.length;++y);y=new Sn;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 ee=arguments[z];if(En(ee)&&ay(this,b,ee)){y.add(E);break}}}return y.iterator};function ay(a,y,x){for(var E in x){var b=y[E],z=x[E];if(li(z)){if(!li(b)||b.length<z.length)return!1;for(var ee=0;ee<b.length;ee++){var re=z[ee];if(re!==void 0&&!dS(a,b[ee],re))return!1}}else if(!dS(a,b,z))return!1}return!0}function dS(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(En(y)&&En(x)){if(!ay(a,y,x))return!1}else if(y!==x)return!1;return!0}ea.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===Er){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===Ao){var ee=a.newValue;E==="nodeDataArray"&&En(ee)&&hS(this,ee),y.isModified=!0}else if(x===Ho){var re=a.oldValue;E==="nodeDataArray"&&En(re)&&this.ip(re),y.isModified=!0}else x===tr&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Er){var oe=a.propertyName,le=a.object;le===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(le,oe),y.isModified=!0}else if(x===Ao||x===Ho){var he=a.change===Ao,ge=he?a.newParam:a.oldParam,ye=he?a.newValue:a.oldValue,xe=this.aj.I(a.object);if(Array.isArray(xe))for(a=0;a<xe.length;a++){var Ee=xe[a];if(he)Fm(Ee,ye,ge,!0);else if(!(0>ge)){var Ne=ge+gp(Ee);Ee.pc(Ne,!0),xv(Ee,Ne,ge)}}y.isModified=!0}}finally{y.aa=!0}}}}},ea.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)},ea.prototype.rp=function(){for(var a=this.H.model,y=new Sn,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(ee){ee.data===null||y.contains(ee.data)||b.push(ee.data)}),this.parts.each(function(ee){ee.data===null||y.contains(ee.data)||b.push(ee.data)}),b.forEach(function(ee){CS(a,ee,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&ES(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()},ea.prototype.refreshDataBoundLinks=function(){},ea.prototype.updateRelationshipsFromData=function(){},ea.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 ee=b[z].sx(a);ee!==null&&(x===null&&(x=Yi()),x.push(ee))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);Wi(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function sy(a,y){var x=y.Hh;if(li(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 ly(a,y,x){Sf(y,function(ee){ee=ee.O.s;for(var re=ee.length,oe=0;oe<re;oe++)mc(x,ee[oe])});var E=y.Hh;if(li(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}}}}ea.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new ki;if(li(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 Sn;for(var z=new ki,ee=E.iterator;ee.next();){var re=ee.value;if(re instanceof Fn)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof Jn&&re.data!==null&&x.Tl()){var oe=re;re=ee.key;var le=re.pg();le!==null&&(le=E.I(le),le!==null?(x.qe(oe.data,x.wa(le.data)),oe=y.Kc(oe.data),re=re.kh(),re!==null&&oe!==null&&z.add(re,oe)):x.qe(oe.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 he=new ki;E.each(function(ge){ge.key.data!==null&&he.add(ge.key.data,ge.value.data)}),x(he,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 Ti))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof Jn){for(var ee=y.linksConnected;ee.next();){var re=ee.value;if(re.fromNode===y){var oe=E.I(re);oe!==null&&(oe.fromNode=z)}re.toNode===y&&(re=E.I(re),re!==null&&(re.toNode=z))}if(y instanceof cr&&z instanceof cr)for(y=y.memberParts;y.next();)ee=h0(a,y.value,x,E,b),ee instanceof Fn||ee===null||(ee.containingGroup=z)}else if(y instanceof Fn&&z instanceof Fn)for(ee=y.fromNode,ee!==null&&(ee=E.I(ee),ee!==null&&(z.fromNode=ee)),ee=y.toNode,ee!==null&&(ee=E.I(ee),ee!==null&&(z.toNode=ee)),y=y.labelNodes;y.next();)ee=h0(a,y.value,x,E,b),ee!==null&&ee instanceof Jn&&(ee.labeledLink=z);return z}ea.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Fn||(E=b.copyNodeData(E),En(E)&&(b.xf(E),x=y.Lc(E)))}else Ph(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 Fn||(b=y.copyNodeData(E)),En(b)&&(x.data=b)));return x},Jt.Object.defineProperties(ea.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}}}),ea.prototype.updateAllRelationshipsFromData=ea.prototype.rp,ea.prototype.findLinksByExample=ea.prototype.ls,ea.prototype.findNodesByExample=ea.prototype.ms,ea.prototype.findLinkForData=ea.prototype.Kc,ea.prototype.findNodeForData=ea.prototype.ii,ea.prototype.findPartForData=ea.prototype.Lc,ea.prototype.findNodeForKey=ea.prototype.Vb,ea.prototype.removeModeledPart=ea.prototype.ip,ea.prototype.removeModeledParts=ea.prototype.Gs,ea.prototype.rebuildParts=ea.prototype.Wd;var fS=!1,gS=!1,pS=!1;ea.className="PartManager";function el(a){ea.apply(this,arguments)}Ct(el,ea),el.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),mS(this,a.linkDataArray)},el.prototype.addModeledParts=function(a){for(ea.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Fg(a.value);Vc(this.diagram,!1)};function mS(a,y){y.forEach(function(x){vS(a,x)}),Vc(a.diagram,!1)}function vS(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){Ph(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=g0(x,y,!0);z!==""&&(b.fromPortId=z),z=oh(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof Jn&&(b.fromNode=z)),z=g0(x,y,!1),z!==""&&(b.toPortId=z),z=oh(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof Jn&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(ee){ee=a.Vb(ee),ee!==null&&(ee.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}el.prototype.removeAllModeledParts=function(){var a=this.diagram.model;yS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function yS(a,y){y.forEach(function(x){a.ip(x)})}el.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},el.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},el.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},el.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},el.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},el.prototype.findPartForKey=function(a){var y=ea.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},el.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},el.prototype.doModelChanged=function(a){var y=this;if(ea.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===Er){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var ee=this.Vb(a.newValue);z.fromNode=ee}}else if(b==="linkToKey"){var re=this.Kc(a.object);if(re!==null){var oe=this.Vb(a.newValue);re.toNode=oe}}else if(b==="linkFromPortId"){var le=this.Kc(a.object);if(le!==null){var he=a.newValue;typeof he=="string"&&(le.fromPortId=he)}}else if(b==="linkToPortId"){var ge=this.Kc(a.object);if(ge!==null){var ye=a.newValue;typeof ye=="string"&&(ge.toPortId=ye)}}else if(b==="nodeGroupKey"){var xe=this.Lc(a.object);if(xe!==null){var Ee=a.newValue;if(Ee!==void 0){var Ne=this.Vb(Ee);Ne instanceof cr?xe.containingGroup=Ne:xe.containingGroup=null}else xe.containingGroup=null}}else if(b==="linkLabelKeys"){var Ye=this.Kc(a.object);if(Ye!==null){var je=a.oldValue,nt=a.newValue;Array.isArray(je)&&je.forEach(function(sn){0<=nt.indexOf(sn)||(sn=y.Vb(sn),sn!==null&&(sn.labeledLink=null))}),Array.isArray(nt)&&nt.forEach(function(sn){sn=y.Vb(sn),sn!==null&&(sn.labeledLink=Ye)})}}else if(b==="linkCategory"){var ot=this.Kc(a.object),ut=a.newValue;ot!==null&&typeof ut=="string"&&(ot.category=ut)}else b==="linkDataArray"&&(yS(this,a.oldValue),mS(this,a.newValue));x.isModified=!0}else if(E===Ao){var vt=a.newValue;if(b==="linkDataArray"&&typeof vt=="object"&&vt!==null)vS(this,vt);else if(b==="linkLabelKeys"&&Wd(vt)){var Dt=this.Kc(a.object),Wn=this.Vb(vt);Dt!==null&&Wn!==null&&(Wn.labeledLink=Dt)}x.isModified=!0}else if(E===Ho){var vi=a.oldValue;if(b==="linkDataArray"&&typeof vi=="object"&&vi!==null)this.ip(vi);else if(b==="linkLabelKeys"&&Wd(vi)){var si=this.Vb(vi);si!==null&&(si.labeledLink=null)}x.isModified=!0}}else if(E===Er){var Mn=a.propertyName;a.object!==x.model||Mn!=="linkFromKeyProperty"&&Mn!=="linkToKeyProperty"&&Mn!=="linkFromPortIdProperty"&&Mn!=="linkToPortIdProperty"&&Mn!=="linkLabelKeysProperty"&&Mn!=="nodeIsGroupProperty"&&Mn!=="nodeGroupKeyProperty"&&Mn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},el.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new Sn,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){NS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&kS(y,z,!1)})},el.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 Fn){var b=oh(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=oh(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 Sn().addAll(y);var ee=new Sn;a.labelNodes.each(function(re){re.data!==null&&(re=E.wa(re.data),re!==void 0&&ee.add(re))}),y=ee.copy(),y.hp(b),b=b.copy(),b.hp(ee),(0<y.count||0<b.count)&&(y.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink===a&&(re.labeledLink=null)}),b.each(function(re){re=x.Vb(re),re!==null&&re.labeledLink!==a&&(re.labeledLink=a)}))}}else!(a instanceof Lo)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof cr)&&(a.containingGroup=y)}}},el.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Dp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var ee=E.value;y.lb(ee)?b instanceof cr&&y.lh(ee)===x&&(ee=this.Lc(ee),ee!==null&&(ee.containingGroup=b)):(z.link=this.Kc(ee),z.link!==null&&b instanceof Jn&&(oh(y,ee,!0)===x&&(z.link.fromNode=b),oh(y,ee,!1)===x&&(z.link.toNode=b),ee=y.Ef(ee),Array.isArray(ee)&&ee.some(function(re){return function(oe){return oe===x?(b.labeledLink=re.link,!0):!1}}(z)))),z={link:z.link}}ec(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof cr&&(b.containingGroup=a))}},el.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Jn){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)qh(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&qh(y,x,E.data)),a instanceof cr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&qh(y,x,E)}}},el.prototype.copyPartData=function(a,y){var x=ea.prototype.copyPartData.call(this,a,y);if(a instanceof Fn)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},el.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,ee=b.toolManager.findTool("Linking"),re="";if(a!==null&&(y===null&&(y=a),re=y.portId,re===null&&(re="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=ee.archetypeLinkData,E instanceof Fn){if(Ph(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=re,z.toNode=x,z.toPortId=y,b.add(z),a=ee.archetypeLabelNodeData,a instanceof Jn&&(Ph(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&&Dg(z,E,z.wa(a.data),!0),Og(z,E,re,!0),x!==null&&Dg(z,E,z.wa(x.data),!1),Og(z,E,y,!1),z.fi(E),a=ee.archetypeLabelNodeData,a===null||a instanceof Jn||(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},el.prototype.findLinkForKey=el.prototype.findLinkForKey,el.prototype.findPartForKey=el.prototype.findPartForKey,el.prototype.removeAllModeledParts=el.prototype.removeAllModeledParts,el.prototype.addModeledParts=el.prototype.addModeledParts,el.prototype.addAllModeledParts=el.prototype.addAllModeledParts,el.className="GraphLinksPartManager";function gh(){ea.apply(this,arguments),this.Sg=null}Ct(gh,ea);function c0(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||!Bn(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Ph(E),E=E.copy(),E!==null))){var ee=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=ee}}}gh.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},gh.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},gh.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}},gh.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))},gh.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},gh.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},gh.prototype.doModelChanged=function(a){if(ea.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===Er){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),ee=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(ee!==null){var re=ee.kh();re!==null?z===null?y.remove(re):y.isTreePathToChildren?re.fromNode=z:re.toNode=z:c0(this,z,ee)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),le=a.newValue;if(oe!==null&&typeof le=="string"){var he=oe.kh();he!==null&&(he.category=le)}}y.isModified=!0}}else if(x===Er){var ge=a.propertyName;a.object===y.model&&ge==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},gh.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof Jn&&(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:c0(this,y,a):E!==null&&uf(x,E,!1)))}}},gh.prototype.updateDataBindings=function(a,y){ea.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},gh.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Dp(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 Jn&&y.mh(z)===x&&c0(this,b,this.ii(z))}ec(y,x)}a=y.mh(a),a!==void 0&&b instanceof Jn&&(a=this.Vb(a),c0(this,a,b))}},gh.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof Jn){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(Ho,"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)&&qh(y,x,b)}},gh.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},gh.prototype.findLinkForKey=gh.prototype.findLinkForKey,gh.className="TreePartManager";function Ei(a,y){this.kl=new Sn,this.il=new Sn,this.Wv=`,
|
|
"insertedNodeKeys": `,this.jy=`,
|
|
"modifiedNodeData": `,this.Yv=`,
|
|
"removedNodeKeys": `,this.vh=null,Zo(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ki,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 ki,this.Lt=new bn,this.Wg=!1,this.o=null,this.undoManager=new qi,a!==void 0&&(li(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ei.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},Ei.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Ei.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Ei.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)+":"+Mo(b)}}return y},Ei.prototype.xA=function(a){a.change!==tr&&Rt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Pa?(xS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Ei.prototype.Qv=function(a,y){var x=this,E=!1,b=new Sn,z=new Sn,ee=new Sn,re=this.vh;a.changes.each(function(ge){ge.model===x&&(ge.modelChange==="nodeDataArray"?ge.change===Ao?b.add(ge.newValue):ge.change===Ho&&ee.add(ge.oldValue):x.lb(ge.object)?z.add(ge.object):ge.change!==Er||x.modelData!==ge.object&&ge.propertyName!=="modelData"?ge.object!==null&&(re&&re.contains(ge.object)?re.get(ge.object).each(function(ye){x.lb(ye)&&z.add(ye)}):ge.object instanceof Ei||x.ri()&&x.Jc(ge.object)||wS(x,ge.object).each(function(ye){z.add(ye)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(ge){oe.add(x.wa(ge)),y||z.add(ge)});var le=this.kl;le.clear(),ee.each(function(ge){le.add(x.wa(ge)),y&&z.add(ge)}),a=x.cloneDeep(z.Fa());var he=null;return E&&(he===null&&(he={}),he.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(he===null&&(he={}),y?he.removedNodeKeys=oe.Fa():he.insertedNodeKeys=oe.Fa()),0<a.length&&(he===null&&(he={}),he.modifiedNodeData=a),0<le.count&&(he===null&&(he={}),y?he.insertedNodeKeys=le.Fa():he.removedNodeKeys=le.Fa()),le.clear(),oe.clear(),he},Ei.prototype.cloneDeep=function(a){return Tg(this,a,!0)};function Tg(a,y,x,E,b,z){function ee(ge,ye){re?(ge.__gohashid===void 0&&z.push(ge),E.set(ge,ye)):(ge=Ll++,E.set(ge,ye),b.set(ge,y))}if(!En(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new ki),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new ki),oe=b.iterator;oe.next();){var le=oe.key;if(oe.value===y&&(le=E.get(le)))return le}if(Array.isArray(y)){oe=[],ee(y,oe);for(var he=0;he<y.length;he++)oe.push(Tg(a,y[he],!1,E,b,z))}else if(y instanceof $e||y instanceof un||y instanceof Xt||y instanceof Sr||y instanceof Di)oe=y.copy(),ee(y,oe);else{if(y instanceof Qo||y instanceof wt||y instanceof Wt)return y;if(y instanceof bn)oe=new bn().addAll(Tg(a,y.Fa(),!1,E,b,z)),ee(y,oe);else if(y instanceof Sn)oe=new Sn().addAll(Tg(a,y.Fa(),!1,E,b,z)),ee(y,oe);else if(y instanceof ki)oe=new ki().addAll(Tg(a,y.Fa(),!1,E,b,z)),ee(y,oe);else if(y instanceof Date)oe=new Date(y.getTime()),ee(y,oe);else if(y instanceof RegExp)oe=new RegExp(y),ee(y,oe),oe.lastIndex=y.lastIndex;else if(typeof y.copy=="function")oe=y.copy(),ee(y,oe);else for(he in oe={},ee(y,oe),y)he!=="__gohashid"&&(oe[he]=Tg(a,y[he],!1,E,b,z))}return x&&z.forEach(function(ge){delete ge.__gohashid}),oe}we=Ei.prototype,we.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},we.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},we.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 SS(a,y){y=y.modelData,En(y)&&(a.dm(y),a.modelData=y)}we.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!PS(x,a[x])){y=!0;break}return a="",y&&(a=`,
|
|
"modelData": `+uy(this,this.modelData)),a+`,
|
|
"nodeDataArray": `+Zd(this,this.nodeDataArray,!0)},we.kv=function(a){SS(this,a),a=a.nodeDataArray,li(a)&&(this.dm(a),this.nodeDataArray=a)};function xS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ee=E.get(b);ee===null?(ee=new Sn,ee.add(z),E.add(b,ee)):ee.add(z)}}var E=a.vh;E===null&&(E=new ki,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Er?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===Ao||z===Ho)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function wS(a,y){for(var x=new Sn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];d0(a,y,b,b,x)}return x}function d0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var ee=x[z];if(ee===y)return b.add(E),!0;if(d0(a,y,ee,E,b))return!0}else if(En(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ee=x[z],ee===y)return b.add(E),!0;if(d0(a,y,ee,E,b))return!0}return!1}we.Pv=function(a,y){var x=this,E=!1,b=new Sn,z=new Sn,ee=new Sn,re=this.vh;a.changes.each(function(he){he.model===x&&(he.modelChange==="nodeDataArray"?he.change===Ao?b.add(he.newValue):he.change===Ho&&ee.add(he.oldValue):x.lb(he.object)?z.add(he.object):he.change!==Er||x.modelData!==he.object&&he.propertyName!=="modelData"?he.object!==null&&(re&&re.contains(he.object)?re.get(he.object).each(function(ge){x.lb(ge)&&z.add(ge)}):he.object instanceof Ei||x.ri()&&x.Jc(he.object)||wS(x,he.object).each(function(ge){z.add(ge)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(he){oe.add(x.wa(he)),y||z.add(he)});var le=this.kl;return le.clear(),ee.each(function(he){le.add(x.wa(he)),y&&z.add(he)}),a="",E&&(a+=`,
|
|
"modelData": `+uy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+Zd(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+Zd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Wv:this.Yv)+Zd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},we.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)&&Rt("applyIncrementalJson cannot change Model properties"),SS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new ki;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],ee=this.wa(z);ee!=null&&E.set(ee,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){ee=y[z];var re=this.hc(ee);re===null&&(re=(re=E.get(ee))?re:this.copyNodeData({}),this.km(re,ee),this.xf(re))}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 oe in b)oe==="__gohashid"||oe===this.nodeKeyProperty||this.Wj()&&oe===this.nodeIsGroupProperty||this.setDataProperty(z,oe,b[oe]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,oe=0;oe<x;oe++)y=this.hc(a[oe]),y!==null&&this.cm(y)},we.$x=function(a,y){a.change!==tr&&Rt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Pa?(y===void 0&&(y=Op(this,this)),xS(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 }'},we.yA=function(a,y){return this.$x(a,y)},we.np=function(a){return a===void 0&&(a=Op(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},we.toJSON=function(a){return this.np(a)},we.Zw=function(a){var y=null;if(typeof a=="string")try{y=It.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Rt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Rt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},we.Ky=function(a){return this.Zw(a)},Ei.constructGraphLinksModel=function(){return new Ei},we=Ei.prototype,we.dm=function(a){if(li(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(En(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Rt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(En(a)){for(y in a)if(x=a[y],En(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 bn,E=0;E<x.length/2;E++)b.add(new $e(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ax(a)}return a},we.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()):li(a)?Zd(this,a):En(a)?uy(this,a):typeof a=="function"?"null":a.toString()};function Zd(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new Vo;b.add("["),x&&1<E&&b.add(`
|
|
`);for(var z=0;z<E;z++){var ee=y[z];ee!==void 0&&(0<z&&(b.add(","),x&&b.add(`
|
|
`)),b.add(a.sm(ee)))}return x&&1<E&&b.add(`
|
|
`),b.add("]"),b.toString()}function PS(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function ru(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function uy(a,y){var x=y;if(x instanceof $e)y={class:"go.Point",x:ru(x.x),y:ru(x.y)};else if(x instanceof un)y={class:"go.Size",width:ru(x.width),height:ru(x.height)};else if(x instanceof Xt)y={class:"go.Rect",x:ru(x.x),y:ru(x.y),width:ru(x.width),height:ru(x.height)};else if(x instanceof Sr)y={class:"go.Margin",top:ru(x.top),right:ru(x.right),bottom:ru(x.bottom),left:ru(x.left)};else if(x instanceof Di)x.sb()?y={class:"go.Spot",x:ru(x.x),y:ru(x.y),offsetX:ru(x.offsetX),offsetY:ru(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Qo){if(y={class:"go.Brush",type:x.type.name},x.type===gd?y.color=x.color:(x.type===Xc||x.type===dh)&&(y.start=x.start,y.end=x.end,x.type===dh&&(x.startRadius!==0&&(y.startRadius=ru(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=ru(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 wt?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=ru(x.startX)),x.startY!==0&&(y.startY=ru(x.startY)),x.endX!==0&&(y.endX=ru(x.endX)),x.endY!==0&&(y.endY=ru(x.endY)),x.spot1.D(Os)||(y.spot1=x.spot1),x.spot2.D(il)||(y.spot2=x.spot2),x.type===wt.o&&(y.path=wt.ia(x))):x instanceof Wt&&(y={class:"go.EnumValue",classType:Op(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Ss(y,b);if(!PS(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof bn){var ee="[";for(z=z.iterator;z.next();){var re=z.value;1<ee.length&&(ee+=","),ee+=a.sm(re.x),ee+=",",ee+=a.sm(re.y)}ee+="]",E+=ee}else E+=a.sm(z)}return E+"}"}function ou(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ax(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 $e(ou(a.x),ou(a.y));else if(y==="Size")x=new un(ou(a.width),ou(a.height));else if(y==="Rect")x=new Xt(ou(a.x),ou(a.y),ou(a.width),ou(a.height));else if(y==="Margin")x=new Sr(ou(a.top),ou(a.right),ou(a.bottom),ou(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Nl(a.enum):x=new Di(ou(a.x),ou(a.y),ou(a.offsetX),ou(a.offsetY));else if(y==="Brush"){if(x=new Qo,x.type=$i(Qo,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Di&&(x.start=a.start),a.end instanceof Di&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=ou(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=ou(a.endRadius)),a=a.colorStops,En(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=wt.parse(a.path):x=new wt,x.type=$i(wt,a.type),typeof a.startX=="number"&&(x.startX=ou(a.startX)),typeof a.startY=="number"&&(x.startY=ou(a.startY)),typeof a.endX=="number"&&(x.endX=ou(a.endX)),typeof a.endY=="number"&&(x.endY=ou(a.endY)),a.spot1 instanceof Di&&(x.spot1=a.spot1),a.spot2 instanceof Di&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=cy(E),typeof E=="function"&&(x=$i(E,a.name)));return x}we.Pe=function(a){return this.Lt.add(a),this},we.ik=function(a){this.Lt.remove(a)},we.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)},we.cb=function(a,y,x,E,b,z,ee){Ds(this,"",a,y,x,E,b,z,ee)},we.g=function(a,y,x,E,b){Ds(this,"",Er,a,this,y,x,E,b)},we.Fs=function(a,y,x,E,b,z){Ds(this,"",Er,y,a,x,E,b,z)};function Ds(a,y,x,E,b,z,ee,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var le=new xi;le.model=a,le.change=x,le.modelChange=y,le.propertyName=E,le.object=b,le.oldValue=z,le.oldParam=re,le.newValue=ee,le.newParam=oe,a.ds(le)}Ei.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Er){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)),_a(x,E,b)}else a.change===Ao?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,En(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&sa(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&La(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!li(E)&&a.propertyName&&(E=Ss(a.object,a.propertyName)),li(E)&&typeof x=="number"&&(a=a.newValue,y?sa(E,x):La(E,x,a))):Rt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===Ho?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,En(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&La(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&sa(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!li(E)&&a.propertyName&&(E=Ss(a.object,a.propertyName)),li(E)&&typeof x=="number"&&(a=a.oldValue,y?La(E,x,a):sa(E,x))):Rt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==tr&&Rt("unknown ChangedEvent: "+a.toString())},Ei.prototype.Ea=function(a){return this.undoManager.Ea(a)},Ei.prototype.eb=function(a){return this.undoManager.eb(a)},Ei.prototype.Kf=function(){return this.undoManager.Kf()},Ei.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}},we=Ei.prototype,we.La=function(a,y){y===void 0&&(y=""),Ds(this,"SourceChanged",tr,y,a,null,null)},we.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Ss(a,y),y!==void 0)){if(Wd(y))return y;Rt("Key value for node data "+a+" is not a number or a string: "+y)}}},we.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Ss(a,x);E!==y&&this.hc(y)===null&&(_a(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Ds(this,"nodeKey",Er,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else _a(a,x,y)}};function Wd(a){return typeof a=="number"||typeof a=="string"}we.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},we.hc=function(a){return a===null&&Rt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&Wd(a)?this.kb.I(a):null},we.$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))){_a(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;_a(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;_a(a,y,x)}}}}},we.xf=function(a){a!==null&&(js(a),this.lb(a)||ES(this,a,!0))};function ES(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&&Rt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,La(a.Tc,E,y)),Ds(a,"nodeDataArray",Ao,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}we.Fy=function(a){if(li(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)},we.cm=function(a){a!==null&&CS(this,a,!0)};function CS(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){e: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 e}E=-1}if(0>E)return;sa(a.Tc,E)}Ds(a,"nodeDataArray",Ho,"nodeDataArray",a,y,null,E,null),a.qp(y)}we.nA=function(a){if(li(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)},we.$z=function(a){if(a!==this.nodeDataArray&&li(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],ee=this.wa(z);if(ee!==void 0){x.add(ee);var re=this.hc(ee);re!==z&&(re!==null?(this.Do(re,z),this.lm(z,re)):(z=this.cloneDeep(z),this.km(z,ee),this.xf(z)))}else ee=this.cloneDeep(z),this.xf(ee),x.add(this.wa(ee))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},we.jp=function(a,y){y!==void 0&&(a=Dp(this,a),a instanceof Sn&&this.Vf.add(y,a))},we.Lv=function(){},we.fm=function(){},we.em=function(){},we.qp=function(){};function qh(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new Sn,a.Vf.add(y,E)),E.add(x)}}function ec(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof Sn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Dp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof Sn?a:null)}we.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Ei.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):f0(this,a,!0),En(a)&&Zo(a),a};function f0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=f0(a,y[x],a.copiesArrayObjects);E.push(b)}return Zo(E),E}if(x&&En(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=Ss(y,E),ee=Op(a,z);ee==="GraphObject"||ee==="Diagram"||ee==="Layer"||ee==="RowColumnDefinition"||ee==="AnimationManager"||ee==="Tool"||ee==="CommandHandler"||ee==="Layout"||ee==="InputEvent"||ee==="DiagramEvent"||z instanceof Ei||z instanceof qi||z instanceof Pa||z instanceof xi||(z=f0(a,z,!1)),_a(x,E,z)}return Zo(x),x}return y instanceof $e||y instanceof un||y instanceof Xt||y instanceof Di||y instanceof Sr?y.copy():y}Ei.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!bS&&a instanceof xt&&(bS=!0,Wr('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Wr(" Is that really your intent?"));var E=Ss(a,y);E!==x&&(_a(a,y,x),this.Fs(a,y,E,x))},we=Ei.prototype,we.set=function(a,y,x){this.setDataProperty(a,y,x)},we.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])}},we.Ay=function(a,y){this.ts(a,-1,y)},we.ts=function(a,y,x){0>y&&(y=a.length),La(a,y,x),Ds(this,"",Ao,"",a,null,x,null,y)},we.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Rt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];sa(a,y),Ds(this,"",Ho,"",a,x,null,y,null)},we.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Ss(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForNodeData found a non-string category for "+a+": "+y)},we.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Ss(a,x);E===void 0&&(E=""),E!==y&&(_a(a,x,y),Ds(this,"nodeCategory",Er,x,a,E,y))}else _a(a,x,y)}},we.lm=function(a,y){this.jm(y,this.Ro(a))},we.Tl=function(){return!1},we.Wj=function(){return!1},we.ri=function(){return!1},we.xs=function(){return!1},we.Xj=function(){return!1};function hy(){return new Ei}function Op(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 Op(a,y.constructor);return typeof y}function cy(a){return _h[a]?_h[a]:It.go!==void 0&&It.go[a]?It.go[a]:null}function Ss(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 _a(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){}}Jt.Object.defineProperties(Ei.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===""&&Rt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Rt("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];En(b)||Rt("Model.nodeDataArray must only contain Objects, not: "+b),js(b)}for(this.Tc=a,E=new bn,b=0;b<x;b++){var z=a[b],ee=this.wa(z);ee===void 0||this.kb.I(ee)!==null?E.add(z):this.kb.add(ee,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(Ds(this,"nodeDataArray",Er,"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"}}}),Ei.prototype.setCategoryForNodeData=Ei.prototype.jm,Ei.prototype.getCategoryForNodeData=Ei.prototype.Ro,Ei.prototype.removeArrayItem=Ei.prototype.ov,Ei.prototype.insertArrayItem=Ei.prototype.ts,Ei.prototype.addArrayItem=Ei.prototype.Ay,Ei.prototype.assignAllDataProperties=Ei.prototype.Do,Ei.prototype.set=Ei.prototype.set,Ei.prototype.clearUnresolvedReferences=Ei.prototype.Qy,Ei.prototype.mergeNodeDataArray=Ei.prototype.$z,Ei.prototype.removeNodeDataCollection=Ei.prototype.nA,Ei.prototype.removeNodeData=Ei.prototype.cm,Ei.prototype.addNodeDataCollection=Ei.prototype.Fy,Ei.prototype.addNodeData=Ei.prototype.xf,Ei.prototype.makeNodeDataKeyUnique=Ei.prototype.$u,Ei.prototype.findNodeDataForKey=Ei.prototype.hc,Ei.prototype.containsNodeData=Ei.prototype.lb,Ei.prototype.setKeyForNodeData=Ei.prototype.km,Ei.prototype.getKeyForNodeData=Ei.prototype.wa,Ei.prototype.updateTargetBindings=Ei.prototype.La,Ei.prototype.commit=Ei.prototype.commit,Ei.prototype.rollbackTransaction=Ei.prototype.Kf,Ei.prototype.commitTransaction=Ei.prototype.eb,Ei.prototype.startTransaction=Ei.prototype.Ea,Ei.prototype.raiseDataChanged=Ei.prototype.Fs,Ei.prototype.raiseChanged=Ei.prototype.g,Ei.prototype.raiseChangedEvent=Ei.prototype.cb,Ei.prototype.removeChangedListener=Ei.prototype.ik,Ei.prototype.addChangedListener=Ei.prototype.Pe,Ei.prototype.writeJsonValue=Ei.prototype.sm,Ei.prototype.replaceJsonObjects=Ei.prototype.dm,Ei.prototype.applyIncrementalJSON=Ei.prototype.Ky,Ei.prototype.applyIncrementalJson=Ei.prototype.Zw,Ei.prototype.toJSON=Ei.prototype.toJSON,Ei.prototype.toJson=Ei.prototype.np,Ei.prototype.toIncrementalJSON=Ei.prototype.yA,Ei.prototype.toIncrementalJson=Ei.prototype.$x,Ei.prototype.toIncrementalData=Ei.prototype.xA,Ei.prototype.clear=Ei.prototype.clear;var bS=!1,_h={};Ei.className="Model",Ei.fromJSON=Ei.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=It.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Rt("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=cy(E)):(b=cy(E),b===null&&(b=It[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Ei?y=a:Rt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Ei.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Ei.safePropertyValue=Ss,Ei.safePropertySet=_a,_h.Brush=Qo,_h.ChangedEvent=xi,_h.Geometry=wt,_h.Margin=Sr,_h.Panel=Pn,_h.Point=$e,_h.Rect=Xt,_h.Size=un,_h.Spot=Di,_h.Transaction=Pa,_h.UndoManager=qi;function Cs(a,y,x,E){Zo(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=MS,this.wk=null):(this.el=_p,this.wk=E),this.st=new Sn}Cs.prototype.copy=function(){var a=new Cs;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},we=Cs.prototype,we.qb=function(a){a.classType===Cs&&(this.mode=a)},we.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},we.freeze=function(){return this._isFrozen=!0,this},we.ka=function(){return this._isFrozen=!1,this},we.Kx=function(a){return a===void 0&&(a=null),this.mode=_p,this.backConverter=a,this},we.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},we.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function LS(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}we.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==="")Wr("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Ss(y,E)),z!==void 0)if(b===null)x!==""&&_a(a,x,z);else try{if(x!==""){var ee=b(z,a);_a(a,x,ee)}else b(z,a)}catch(re){}}}},we.sp=function(a,y,x,E){if(this.el===_p){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ee=a;if(b!==""&&(ee=Ss(a,b)),ee!==void 0&&!this.st.contains(a))try{this.st.add(a);var re=E!==null?E.diagram:null,oe=re!==null?re.model:null;if(z===null){if(x!=="")oe!==null?oe.setDataProperty(y,x,ee):_a(y,x,ee);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var le=E.itemIndex,he=E.panel.itemArray;oe.ov(he,le),oe.ts(he,le,ee)}}else try{if(x!==""){var ge=z(ee,y,oe);oe!==null?oe.setDataProperty(y,x,ge):_a(y,x,ge)}else{var ye=z(ee,y,oe);if(ye!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var xe=E.itemIndex,Ee=E.panel.itemArray;oe.ov(Ee,xe),oe.ts(Ee,xe,ye)}}}catch(Ne){}}finally{this.st.remove(a)}}}},Jt.Object.defineProperties(Cs.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Si(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Si(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Si(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Si(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Si(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Si(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Si(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Si(this),this.el=a}}}),Cs.prototype.updateSource=Cs.prototype.sp,Cs.prototype.updateTarget=Cs.prototype.Mv,Cs.prototype.ofModel=Cs.prototype.dA,Cs.prototype.ofObject=Cs.prototype.cp,Cs.prototype.makeTwoWay=Cs.prototype.Kx;var Bx="Binding",MS=new Wt(Cs,"OneWay",1),_p=new Wt(Cs,"TwoWay",2);Cs.className="Binding",Cs.parseEnum=function(a,y){return function(x){return x=$i(a,x),x===null?y:x}},Cs.toString=Mo,Cs.OneWay=MS,Cs.TwoWay=_p;function po(a,y,x){Ei.call(this),this.Vv=`,
|
|
"insertedLinkKeys": `,this.iy=`,
|
|
"modifiedLinkData": `,this.Xv=`,
|
|
"removedLinkKeys": `,this.md=[],this.$f=new Sn,this.wb=new ki,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&&(li(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ct(po,Ei),po.constructGraphLinksModel=Ei.constructGraphLinksModel,po.prototype.cloneProtected=function(a){Ei.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},we=po.prototype,we.clear=function(){Ei.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},we.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)+":"+Mo(b)}for(y+=`
|
|
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+oh(this,b,!0)+"-->"+oh(this,b,!1)}return y},we.Qv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Ei.prototype.Qv.call(this,a,y),E=this,b=new Sn,z=new Sn,ee=new Sn,re=this.vh;a.changes.each(function(he){he.model===E&&(he.modelChange==="linkDataArray"?he.change===Ao?b.add(he.newValue):he.change===Ho&&ee.add(he.oldValue):E.Jc(he.object)?z.add(he.object):he.object!==null&&(he.object!==null&&re&&re.contains(he.object)?re.get(he.object).each(function(ge){E.Jc(ge)&&z.add(ge)}):he.object instanceof Ei||E.lb(he.object)||FS(E,he.object).each(function(ge){z.add(ge)})))});var oe=this.il;oe.clear(),b.each(function(he){oe.add(E.Ac(he)),y||z.add(he)});var le=this.kl;return le.clear(),ee.each(function(he){le.add(E.Ac(he)),y&&z.add(he)}),a=E.cloneDeep(z.Fa()),0<oe.count&&(x===null&&(x={}),y?x.removedLinkKeys=oe.Fa():x.insertedLinkKeys=oe.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<le.count&&(x===null&&(x={}),y?x.insertedLinkKeys=le.Fa():x.removedLinkKeys=le.Fa()),le.clear(),oe.clear(),x},we.rm=function(){var a=Ei.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},we.gp=function(a){Ei.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)},we.Rv=function(){var a=Ei.prototype.Rv.call(this),y=`,
|
|
"linkDataArray": `+Zd(this,this.linkDataArray,!0);return a+y},we.kv=function(a){Ei.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function FS(a,y){for(var x=new Sn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];d0(a,y,b,b,x)}return x}we.Pv=function(a,y){this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Ei.prototype.Pv.call(this,a,y),E=this,b=new Sn,z=new Sn,ee=new Sn,re=this.vh;a.changes.each(function(he){he.model===E&&(he.modelChange==="linkDataArray"?he.change===Ao?b.add(he.newValue):he.change===Ho&&ee.add(he.oldValue):E.Jc(he.object)?z.add(he.object):he.object!==null&&(he.object!==null&&re&&re.contains(he.object)?re.get(he.object).each(function(ge){E.Jc(ge)&&z.add(ge)}):he.object instanceof Ei||E.lb(he.object)||FS(E,he.object).each(function(ge){z.add(ge)})))});var oe=this.il;oe.clear(),b.each(function(he){oe.add(E.Ac(he)),y||z.add(he)});var le=this.kl;return le.clear(),ee.each(function(he){le.add(E.Ac(he)),y&&z.add(he)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+Zd(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+Zd(this,z.Fa(),!0)),0<le.count&&(a+=(y?this.Vv:this.Xv)+Zd(this,le.Fa(),!0)),le.clear(),oe.clear(),a},we.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)&&Rt("applyIncrementalJson cannot change Model properties"),Ei.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 ee in b)ee!=="__gohashid"&&ee!==this.linkKeyProperty&&this.setDataProperty(z,ee,b[ee]);AS(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(ee=a.length,y=0;y<ee;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},po.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Er){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),_a(x,E,b);return}}else if(a.change===Ao){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,En(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===Ho){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,En(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}}Ei.prototype.changeState.call(this,a,y)}},we=po.prototype,we.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),_a(x,this.nodeKeyProperty,a),this.xf(x))}return a}},we.yx=function(a){return oh(this,a,!0)},we.wv=function(a,y){Dg(this,a,y,!0)},we.Bx=function(a){return oh(this,a,!1)},we.Bv=function(a,y){Dg(this,a,y,!1)};function oh(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Ss(y,a),a!==void 0))){if(Wd(a))return a;Rt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Dg(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=Ss(y,b);z!==x&&(ec(a,z,y),_a(y,b,x),a.hc(x)===null&&qh(a,x,y),Ds(a,E?"linkFromKey":"linkToKey",Er,b,y,z,x),typeof b=="string"&&a.La(y,b))}else _a(y,b,x)}}we.zx=function(a){return g0(this,a,!0)},we.xv=function(a,y){Og(this,a,y,!0)},we.Cx=function(a){return g0(this,a,!1)},we.Cv=function(a,y){Og(this,a,y,!1)};function g0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Ss(y,a),y===void 0?"":y)}function Og(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Ss(y,b);z===void 0&&(z=""),z!==x&&(_a(y,b,x),Ds(a,E?"linkFromPortId":"linkToPortId",Er,b,y,z,x),typeof b=="string"&&a.La(y,b))}else _a(y,b,x)}}we.Ef=function(a){if(a===null)return p0;var y=this.je;return y===""?p0:(a=Ss(a,y),a===void 0?p0:a)},we.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Ss(a,x);if(E===void 0&&(E=p0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)ec(this,E[z],a);for(_a(a,x,y),b=y.length,z=0;z<b;z++){var ee=y[z];this.hc(ee)===null&&qh(this,ee,a)}Ds(this,"linkLabelKeys",Er,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else _a(a,x,y)}},we.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ss(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&&qh(this,y,a),Ds(this,"linkLabelKeys",Ao,x,a,null,y,null,b)))}else Rt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},we.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Ss(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(ec(this,y,a),Ds(this,"linkLabelKeys",Ho,x,a,y,null,b,null)))}else E!==void 0&&Rt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},we.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Ss(a,y),y!==void 0)){if(Wd(y))return y;Rt("Key value for link data "+a+" is not a number or a string: "+y)}}},we.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Ss(a,x);E!==y&&this.jh(y)===null&&(_a(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Ds(this,"linkKey",Er,x,a,E,y),typeof x=="string"&&this.La(a,x))}else _a(a,x,y)}},we.jh=function(a){return a===null&&Rt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&Wd(a)?this.wb.I(a):null},we.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))){_a(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;_a(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;_a(a,y,x)}}}}},we.Jc=function(a){return a===null?!1:this.$f.contains(a)},we.fi=function(a){a!==null&&(js(a),this.Jc(a)||kS(this,a,!0))};function kS(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&&Rt("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)),Ds(a,"linkDataArray",Ao,"linkDataArray",a,null,y,null,E),dy(a,y)}we.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)},we.bm=function(a){a!==null&&NS(this,a,!0)};function NS(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(Ds(a,"linkDataArray",Ho,"linkDataArray",a,y,null,E,null),x=oh(a,y,!0),ec(a,x,y),x=oh(a,y,!1),ec(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],ec(a,x,y)}we.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)},we.Zz=function(a){if(this.linkKeyProperty===""&&Rt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&li(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],ee=this.Ac(z);if(ee!==void 0){x.add(ee);var re=this.jh(ee);re!==z&&(re!==null?(this.Do(re,z),AS(this,z,re)):(z=this.cloneDeep(z),this.Ks(z,ee),this.fi(z)))}else ee=this.cloneDeep(z),this.fi(ee),x.add(this.Ac(ee))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function dy(a,y){var x=oh(a,y,!0);x=a.Vl(x),a.hc(x)===null&&qh(a,x,y),x=oh(a,y,!1),x=a.Vl(x),a.hc(x)===null&&qh(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&&qh(a,x,y)}we.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):f0(this,a,!0),En(a)&&(Zo(a),this.lf!==""&&_a(a,this.lf,void 0),this.mf!==""&&_a(a,this.mf,void 0),this.je!==""&&_a(a,this.je,[])),a},we.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Ss(a,y)},we.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Ss(a,y),y!==void 0)){if(Wd(y))return y;Rt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},we.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Ss(a,x);E!==y&&(ec(this,E,a),_a(a,x,y),this.hc(y)===null&&qh(this,y,a),Ds(this,"nodeGroupKey",Er,x,a,E,y),typeof x=="string"&&this.La(a,x))}else _a(a,x,y)}},po.prototype.copyNodeData=function(a){return a===null?null:(a=Ei.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Ss(a,this.Je)===void 0||_a(a,this.Je,void 0),a)},po.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){Dg(this,a,x,!0);return}if(y===this.linkToKeyProperty){Dg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Og(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Og(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=Ss(a,y);E!==x&&(_a(a,y,x),this.Fs(a,y,E,x))},we=po.prototype,we.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&&Ss(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},we.jp=function(a,y){Ei.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(oh(this,E,!0)===b){var ee=this.lf;_a(E,ee,z),Ds(this,"linkFromKey",Er,ee,E,b,z),typeof ee=="string"&&this.La(E,ee)}if(oh(this,E,!1)===b&&(ee=this.mf,_a(E,ee,z),Ds(this,"linkToKey",Er,ee,E,b,z),typeof ee=="string"&&this.La(E,ee)),ee=this.Ef(E),Array.isArray(ee))for(var re=ee.length,oe=this.je,le=0;le<re;le++)ee[le]===b&&(ee[le]=z,Ds(this,"linkLabelKeys",Ao,oe,E,b,z,le,le))}},we.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;_a(a,E,x),Ds(this,"nodeGroupKey",Er,E,a,y,x),typeof E=="string"&&this.La(a,E)}},we.Lv=function(){Ei.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)dy(this,a[x])},we.fm=function(a){Ei.prototype.fm.call(this,a),a=this.wa(a);var y=Dp(this,a);if(y!==null){var x=Yi();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Ds(this,"nodeGroupKey",Er,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(oh(this,E,!0)===a&&(b=this.lf,Ds(this,"linkFromKey",Er,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),oh(this,E,!1)===a&&(b=this.mf,Ds(this,"linkToKey",Er,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,ee=this.je,re=0;re<z;re++)b[re]===a&&(Ds(this,"linkLabelKeys",Ao,ee,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)ec(this,a,x[y]);Wi(x)}},we.em=function(a){Ei.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&qh(this,y,a)},we.qp=function(a){Ei.prototype.qp.call(this,a);var y=this.lh(a);ec(this,y,a)},we.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Ss(a,y),y===void 0))return"";if(typeof y=="string")return y;Rt("getCategoryForLinkData found a non-string category for "+a+": "+y)},po.prototype.getLinkCategoryForData=function(a){return this.ps(a)},po.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Ss(a,x);E===void 0&&(E=""),E!==y&&(_a(a,x,y),Ds(this,"linkCategory",Er,x,a,E,y),typeof x=="string"&&this.La(a,x))}else _a(a,x,y)}},po.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},we=po.prototype,we.lm=function(a,y){Ei.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function AS(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))}we.Wj=function(){return!0},we.ri=function(){return!0},we.xs=function(){return!0},we.Xj=function(){return!0},Jt.Object.defineProperties(po.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];En(b)||Rt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),js(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new bn,b=0;b<x;b++){var z=a[b],ee=this.Ac(z);ee===void 0||this.wb.I(ee)!==null?E.add(z):this.wb.add(ee,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 Sn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Ds(this,"linkDataArray",Er,"linkDataArray",this,y,a),y=0;y<x;y++)dy(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"}}}),po.prototype.setCategoryForLinkData=po.prototype.lp,po.prototype.getCategoryForLinkData=po.prototype.ps,po.prototype.assignAllDataProperties=po.prototype.Do,po.prototype.setGroupKeyForNodeData=po.prototype.mp,po.prototype.getGroupKeyForNodeData=po.prototype.lh,po.prototype.isGroupForNodeData=po.prototype.Yu,po.prototype.copyLinkData=po.prototype.Jo,po.prototype.mergeLinkDataArray=po.prototype.Zz,po.prototype.removeLinkDataCollection=po.prototype.lA,po.prototype.removeLinkData=po.prototype.bm,po.prototype.addLinkDataCollection=po.prototype.Ey,po.prototype.addLinkData=po.prototype.fi,po.prototype.containsLinkData=po.prototype.Jc,po.prototype.makeLinkDataKeyUnique=po.prototype.Bs,po.prototype.findLinkDataForKey=po.prototype.jh,po.prototype.setKeyForLinkData=po.prototype.Ks,po.prototype.getKeyForLinkData=po.prototype.Ac,po.prototype.removeLabelKeyForLinkData=po.prototype.Qx,po.prototype.addLabelKeyForLinkData=po.prototype.Bu,po.prototype.setLabelKeysForLinkData=po.prototype.Ls,po.prototype.getLabelKeysForLinkData=po.prototype.Ef,po.prototype.setToPortIdForLinkData=po.prototype.Cv,po.prototype.getToPortIdForLinkData=po.prototype.Cx,po.prototype.setFromPortIdForLinkData=po.prototype.xv,po.prototype.getFromPortIdForLinkData=po.prototype.zx,po.prototype.setToKeyForLinkData=po.prototype.Bv,po.prototype.getToKeyForLinkData=po.prototype.Bx,po.prototype.setFromKeyForLinkData=po.prototype.wv,po.prototype.getFromKeyForLinkData=po.prototype.yx,po.prototype.clear=po.prototype.clear;var p0=Object.freeze([]);po.className="GraphLinksModel",_h.GraphLinksModel=po,Ei.constructGraphLinksModel=Ei.constructGraphLinksModel=function(){return new po},Ei.initDiagramModel=hy=function(){return new po};function au(a,y){Ei.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(li(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ct(au,Ei),au.constructGraphLinksModel=Ei.constructGraphLinksModel,au.prototype.cloneProtected=function(a){Ei.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},we=au.prototype,we.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)+":"+Mo(b)}}return y},we.rm=function(){var a=Ei.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
|
|
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},we.gp=function(a){Ei.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},we.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Rt("applyIncrementalJson cannot change Model properties"),Ei.prototype.fp.call(this,a)},we.Vl=function(a){return a},we.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Ss(a,y),y!==void 0)){if(Wd(y))return y;Rt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},we.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=Ss(a,x);E!==y&&(ec(this,E,a),_a(a,x,y),this.hc(y)===null&&qh(this,y,a),Ds(this,"nodeParentKey",Er,x,a,E,y),typeof x=="string"&&this.La(a,x))}else _a(a,x,y)}},we.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Ss(a,y),y===void 0)?"":typeof y=="string"?y:(Rt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},au.prototype.getLinkCategoryForData=function(a){return this.ss(a)},au.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Ss(a,x);E===void 0&&(E=""),E!==y&&(_a(a,x,y),Ds(this,"parentLinkCategory",Er,x,a,E,y),typeof x=="string"&&this.La(a,x))}else _a(a,x,y)}},au.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},au.prototype.copyNodeData=function(a){return a===null?null:(a=Ei.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Ss(a,this.Ke)===void 0||_a(a,this.Ke,void 0),a)},au.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=Ss(a,y);E!==x&&(_a(a,y,x),this.Fs(a,y,E,x))},we=au.prototype,we.jp=function(a,y){Ei.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},we.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;_a(a,E,x),Ds(this,"nodeParentKey",Er,E,a,y,x),typeof E=="string"&&this.La(a,E)}},we.fm=function(a){Ei.prototype.fm.call(this,a),a=this.wa(a);var y=Dp(this,a);if(y!==null){var x=Yi();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Ds(this,"nodeParentKey",Er,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)ec(this,a,x[y]);Wi(x)}},we.em=function(a){Ei.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&qh(this,y,a)},we.qp=function(a){Ei.prototype.qp.call(this,a);var y=this.mh(a);ec(this,y,a)},we.lm=function(a,y){Ei.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},we.Tl=function(){return!0},we.xs=function(){return!0},Jt.Object.defineProperties(au.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"}}}),au.prototype.setParentLinkCategoryForNodeData=au.prototype.Ms,au.prototype.getParentLinkCategoryForNodeData=au.prototype.ss,au.prototype.setParentKeyForNodeData=au.prototype.qe,au.prototype.getParentKeyForNodeData=au.prototype.mh,au.className="TreeModel",_h.TreeModel=au;function Qa(a){za.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=Ih,this.Ti=0,this.Zv=new $e,this.Jp=this.me=0,this.Xr=new zp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=Ih,this.K=su,this.nd=Ig,this.hd=ry,this.tf=6,this.Nn=P0,a&&Object.assign(this,a)}Ct(Qa,za),Qa.prototype.cloneProtected=function(a){za.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},Qa.prototype.qb=function(a){a.classType===Qa?a===x0||a===w0||a===y0||a===S0||a===Ig?this.sorting=a:a===bf||a===_g||a===su||a===Kd?this.direction=a:a===Pd||a===Vd||a===Ih||a===Rh?this.arrangement=a:(a===Yf||a===P0)&&(this.nodeDiameterFormula=a):za.prototype.qb.call(this,a)},Qa.prototype.createNetwork=function(){return new Rg(this)},Qa.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 bn;y.addAll(a.iterator),a=new bn;var x=new bn,E=this.sort(y),b,z,ee=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,le=this.radius;(!isFinite(le)||0>=le)&&(le=NaN);var he=this.aspectRatio;(!isFinite(he)||0>=he)&&(he=1);var ge=this.startAngle;isFinite(ge)||(ge=0);var ye=this.sweepAngle;if((!isFinite(ye)||360<ye||1>ye)&&(ye=360),y=this.spacing,isFinite(y)||(y=NaN),re===Rh&&oe===Yf?re=Ih:re===Rh&&oe!==Yf&&(re=this.arrangement),(this.direction===bf||this.direction===_g)&&this.sorting!==Ig){for(oe=0;!(oe>=E.length)&&(a.add(E.M(oe)),!(oe+1>=E.length));oe+=2)x.add(E.M(oe+1));this.direction===bf?(this.arrangement===Rh&&a.reverse(),E=new bn,E.addAll(a),E.addAll(x)):(this.arrangement===Rh&&x.reverse(),E=new bn,E.addAll(x),E.addAll(a))}oe=E.length;for(var xe=z=b=0;xe<E.length;xe++){var Ee=ge+ye*z*(this.direction===su?1:-1)/oe,Ne=E.M(xe).diameter;isNaN(Ne)&&(Ne=Ud(E.M(xe),Ee)),360>ye&&(xe===0||xe===E.length-1)&&(Ne/=2),b+=Ne,z++}if(isNaN(le)||re===Rh){if(isNaN(y)&&(y=6),re!==Ih&&re!==Rh){for(z=-1/0,ee=0;ee<oe;ee++)xe=E.M(ee),b=E.M(ee===oe-1?0:ee+1),isNaN(xe.diameter)&&Ud(xe,0),isNaN(b.diameter)&&Ud(b,0),z=Math.max(z,(xe.diameter+b.diameter)/2);ee=z+y,re===Pd?le=(z+y)/(2*Math.PI/oe):le=m0(this,ee*(360<=ye?oe:oe-1),he,ge*Math.PI/180,ye*Math.PI/180)}else le=m0(this,b+(360<=ye?oe:oe-1)*(re!==Rh?y:1.6*y),he,ge*Math.PI/180,ye*Math.PI/180);z=le*he}else if(z=le*he,xe=fy(this,le,z,ge*Math.PI/180,ye*Math.PI/180),isNaN(y))(re===Ih||re===Rh)&&(y=(xe-b)/(360<=ye?oe:oe-1));else if(re===Ih||re===Rh)xe=(xe-b)/(360<=ye?oe:oe-1),xe<y?(le=m0(this,b+y*(360<=ye?oe:oe-1),he,ge*Math.PI/180,ye*Math.PI/180),z=le*he):y=xe;else{for(ee=-1/0,b=0;b<oe;b++)Ee=E.M(b),Ne=E.M(b===oe-1?0:b+1),isNaN(Ee.diameter)&&Ud(Ee,0),isNaN(Ne.diameter)&&Ud(Ne,0),ee=Math.max(ee,(Ee.diameter+Ne.diameter)/2);ee+=y,b=m0(this,ee*(360<=ye?oe:oe-1),he,ge*Math.PI/180,ye*Math.PI/180),b>le?(le=b,z=le*he):ee=xe/(360<=ye?oe:oe-1)}if(this.kw=re,this.lc=le,this.Zm=he,this.lw=ge,this.Wp=ye,this.Ti=y,this.me=z,this.Jp=ee,y=E,E=this.kw,re=this.lc,le=this.lw,he=this.Wp,ge=this.Ti,ye=this.me,oe=this.Jp,this.direction!==bf&&this.direction!==_g||E!==Rh)if(this.direction===bf||this.direction===_g){switch(ee=0,E){case Vd:ee=180*v0(this,re,ye,le,oe)/Math.PI;break;case Ih:oe=y=0,ee=a.first(),ee!==null&&(y=Ud(ee,Math.PI/2)),ee=x.first(),ee!==null&&(oe=Ud(ee,Math.PI/2)),ee=180*v0(this,re,ye,le,ge+(y+oe)/2)/Math.PI;break;case Pd:ee=he/y.length}if(this.direction===bf){switch(E){case Vd:jp(this,a,le,Kd);break;case Ih:Rp(this,a,le,Kd);break;case Pd:Ip(this,a,he/2,le,Kd)}switch(E){case Vd:jp(this,x,le+ee,su);break;case Ih:Rp(this,x,le+ee,su);break;case Pd:Ip(this,x,he/2,le+ee,su)}}else{switch(E){case Vd:jp(this,x,le,Kd);break;case Ih:Rp(this,x,le,Kd);break;case Pd:Ip(this,x,he/2,le,Kd)}switch(E){case Vd:jp(this,a,le+ee,su);break;case Ih:Rp(this,a,le+ee,su);break;case Pd:Ip(this,a,he/2,le+ee,su)}}}else switch(E){case Vd:jp(this,y,le,this.direction);break;case Ih:Rp(this,y,le,this.direction);break;case Pd:Ip(this,y,he,le,this.direction);break;case Rh:BS(this,y,he,le,this.direction)}else BS(this,y,he,le-he/2,su)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Ip(a,y,x,E,b){var z=a.Wp,ee=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=E+(b===su?oe*x/(360<=z?re:re-1):-(oe*x)/re),he=y.M(oe),ge=ee*Math.tan(le)/a;ge=Math.sqrt((ee*ee+a*a*ge*ge)/(1+ge*ge)),he.centerX=ge*Math.cos(le),he.centerY=ge*Math.sin(le),he.actualAngle=180*le/Math.PI}}function Rp(a,y,x,E){var b=a.lc,z=a.me,ee=a.Ti;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe),he=y.M(oe===re-1?0:oe+1),ge=z*Math.sin(x);le.centerX=b*Math.cos(x),le.centerY=ge,le.actualAngle=180*x/Math.PI,isNaN(le.diameter)&&Ud(le,0),isNaN(he.diameter)&&Ud(he,0),le=v0(a,b,z,E===su?x:-x,(le.diameter+he.diameter)/2+ee),x+=E===su?le:-le}}function jp(a,y,x,E){var b=a.lc,z=a.me,ee=a.Jp;x=x*Math.PI/180;for(var re=y.length,oe=0;oe<re;oe++){var le=y.M(oe);le.centerX=b*Math.cos(x),le.centerY=z*Math.sin(x),le.actualAngle=180*x/Math.PI,le=v0(a,b,z,E===su?x:-x,ee),x+=E===su?le:-le}}function BS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new zp,360>x){for(z=E+(b===su?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,DS(a,y,x,E,b)}else TS(a,y,x,E,b);a.Xr.commit(y)}function TS(a,y,x,E,b){var z=a.lc,ee=a.Ti,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=a.me*Math.sin(E*Math.PI/180),he=y.Fa();if(he.length===3)he[0].centerX=z,he[0].centerY=0,he[1].centerX=he[0].centerX-he[0].width/2-he[1].width/2-ee,he[1].y=he[0].y,he[2].centerX=(he[0].centerX+he[1].centerX)/2,he[2].y=he[0].y-he[2].height-ee;else if(he.length===4)he[0].centerX=z,he[0].centerY=0,he[2].centerX=-he[0].centerX,he[2].centerY=he[0].centerY,he[1].centerX=0,he[1].y=Math.min(he[0].y,he[2].y)-he[1].height-ee,he[3].centerX=0,he[3].y=Math.max(he[0].y+he[0].height+ee,he[2].y+he[2].height+ee);else{z=$e.alloc();for(var ge=0;ge<he.length&&(he[ge].centerX=oe,he[ge].centerY=le,!(ge>=he.length-1));ge++)OS(a,oe,le,he,ge,b,z)||_S(a,oe,le,he,ge,b,z),oe=z.x,le=z.y;if($e.free(z),a.mj++,!(23<a.mj)){oe=he[0].centerX,le=he[0].centerY,z=he[he.length-1].centerX,ge=he[he.length-1].centerY;var ye=Math.abs(oe-z)-((he[0].width+he[he.length-1].width)/2+ee),xe=Math.abs(le-ge)-((he[0].height+he[he.length-1].height)/2+ee);ee=0,1>Math.abs(xe)?Math.abs(oe-z)<(he[0].width+he[he.length-1].width)/2&&(ee=0):ee=0<xe?xe:1>Math.abs(ye)?0:ye,oe=Math.abs(z)>Math.abs(ge)?0<z!=le>ge:0<ge!=oe<z,(oe=b===su?oe:!oe)&&(ee=-Math.abs(ee),ee=Math.min(ee,-he[he.length-1].width),ee=Math.min(ee,-he[he.length-1].height)),a.Xr.compare(ee,he),1<Math.abs(ee)&&(a.lc=8>a.mj?a.lc-ee/(2*Math.PI):5>he.length&&10<ee?a.lc/2:a.lc-(0<ee?1.7:-2.3),a.me=a.lc*re,TS(a,y,x,E,b))}}}function DS(a,y,x,E,b){for(var z=a.lc,ee=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),le=ee*Math.sin(E*Math.PI/180),he=$e.alloc(),ge=y.Fa(),ye=0;ye<ge.length&&(ge[ye].centerX=oe,ge[ye].centerY=le,!(ye>=ge.length-1));ye++)OS(a,oe,le,ge,ye,b,he)||_S(a,oe,le,ge,ye,b,he),oe=he.x,le=he.y;if($e.free(he),a.mj++,!(23<a.mj)){if(oe=Math.atan2(le,oe),oe=b===su?a.gt-oe:oe-a.gt,oe=Math.abs(oe)<Math.abs(oe-2*Math.PI)?oe:oe-2*Math.PI,z=oe*(z+ee)/2,ee=a.Xr,Math.abs(z)<Math.abs(ee.Pl))for(ee.Pl=z,ee.mk=[],ee.tm=[],oe=0;oe<ge.length;oe++)ee.mk[oe]=ge[oe].bounds.x,ee.tm[oe]=ge[oe].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*re,DS(a,y,x,E,b))}}function OS(a,y,x,E,b,z,ee){var re=a.lc,oe=a.me,le=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var he=!1;if(0<=x!=(z===su)){if(z=y+a,z>re){if(z=y-a,z<-re)return ee.x=z,ee.y=le,!1;he=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ee.x=z,ee.y=le,!1;he=!0}return le=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==he&&(le=-le),Math.abs(x-le)>(E[b].height+E[b+1].height)/2?(ee.x=z,ee.y=le,!1):(ee.x=z,ee.y=le,!0)}function _S(a,y,x,E,b,z,ee){var re=a.lc,oe=a.me,le=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===su)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ee.x=le,ee.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ee.x=le,ee.y=z;return}E=!0}le=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(le=-le),ee.x=le,ee.y=z}Qa.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},Qa.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 $e(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))},Qa.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function fy(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var ee=0,re=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),oe=0,le=0;le<=z;le++){E!==void 0&&b!==void 0?oe=E+le*b/z:oe=le*Math.PI/(2*z);var he=Math.sin(oe);ee+=Math.sqrt(1-a*a*he*he)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ee:4*(y>x?y:x)*ee}function m0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?fy(a,1,x,E,b):fy(a,1,x))}function v0(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,ee=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var re=0;;re++){var oe=Math.sin(E+re*a);if(ee+=(y>x?y:x)*Math.sqrt(1-z*z*oe*oe)*a,ee>=b)return re*a}}Qa.prototype.sort=function(a){switch(this.sorting){case y0:break;case S0:a.reverse();break;case x0:a.sort(this.comparer);break;case w0:a.sort(this.comparer),a.reverse();break;case Ig:return this.ak(Tx(a));default:Rt("Invalid sorting type.")}return a};function Tx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new bn;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var ee=0;ee<a.length;ee++){var re=a.M(ee).edgesCount;re>b&&(b=re,z=ee)}else for(ee=0;ee<a.length;ee++)re=y[ee],re>b&&(b=re,z=ee);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),ee=z.sourceEdges;ee.next();)b=a.indexOf(ee.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}Qa.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 ee=[],re=[];E=[],b=new bn;for(var oe=0,le=0;le<y.length;le++){var he=y[le].length;if(he===1)E.push(le);else if(he===0)b.add(a.M(le));else{if(oe===0)x.push(le);else{for(var ge=he=1/0,ye=-1,xe=[],Ee=0;Ee<x.length;Ee++)0>y[x[Ee]].indexOf(x[Ee===x.length-1?0:Ee+1])&&xe.push(Ee===x.length-1?0:Ee+1);if(xe.length===0)for(Ee=0;Ee<x.length;Ee++)xe.push(Ee);for(Ee=0;Ee<xe.length;Ee++){for(var Ne=xe[Ee],Ye=y[le],je=0,nt=0;nt<ee.length;nt++){var ot=z[ee[nt]],ut=z[re[nt]];if(ot<ut){var vt=ot;ot=ut}else vt=ut;if(vt<Ne&&Ne<=ot)for(ut=0;ut<Ye.length;ut++){var Dt=Ye[ut];0>x.indexOf(Dt)||vt<z[Dt]&&z[Dt]<ot||vt===z[Dt]||ot===z[Dt]||je++}else for(ut=0;ut<Ye.length;ut++)Dt=Ye[ut],0>x.indexOf(Dt)||vt<z[Dt]&&z[Dt]<ot&&vt!==z[Dt]&&ot!==z[Dt]&&je++}for(Ye=je,nt=je=0;nt<y[le].length;nt++)vt=x.indexOf(y[le][nt]),0<=vt&&(vt=Math.abs(Ne-(vt>=Ne?vt+1:vt)),je+=vt<x.length+1-vt?vt:x.length+1-vt);for(nt=0;nt<ee.length;nt++)vt=z[ee[nt]],ot=z[re[nt]],vt>=Ne&&vt++,ot>=Ne&&ot++,vt>ot&&(ut=ot,ot=vt,vt=ut),ot-vt<(x.length+2)/2==(vt<Ne&&Ne<=ot)&&je++;(Ye<he||Ye===he&&je<ge)&&(he=Ye,ge=je,ye=Ne)}for(x.splice(ye,0,le),he=0;he<x.length;he++)z[x[he]]=he;for(he=0;he<y[le].length;he++)ge=y[le][he],0<=x.indexOf(ge)&&(ee.push(le),re.push(ge))}oe++}}for(ee=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],le=y[oe][0],he=x.indexOf(le),0<=he){for(ye=ge=0;ye<y[le].length;ye++)xe=x.indexOf(y[le][ye]),0>xe||xe===he||(Ee=xe>he?xe-he:he-xe,ge+=xe<he!=Ee>ee-Ee?1:-1);x.splice(0>ge?he:he+1,0,oe),E.splice(re,1),re--}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},Jt.Object.defineProperties(Qa.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!==Rh&&a!==Ih&&a!==Vd&&a!==Pd||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==su&&a!==Kd&&a!==bf&&a!==_g||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==y0&&a!==S0&&a!==x0&&!w0&&a!==Ig||(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!==P0&&a!==Yf||(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 Ih=new Wt(Qa,"ConstantSpacing",0),Vd=new Wt(Qa,"ConstantDistance",1),Pd=new Wt(Qa,"ConstantAngle",2),Rh=new Wt(Qa,"Packed",3),su=new Wt(Qa,"Clockwise",4),Kd=new Wt(Qa,"Counterclockwise",5),bf=new Wt(Qa,"BidirectionalLeft",6),_g=new Wt(Qa,"BidirectionalRight",7),y0=new Wt(Qa,"Forwards",8),S0=new Wt(Qa,"Reverse",9),x0=new Wt(Qa,"Ascending",10),w0=new Wt(Qa,"Descending",11),Ig=new Wt(Qa,"Optimized",12),P0=new Wt(Qa,"Pythagorean",13),Yf=new Wt(Qa,"Circular",14);Qa.className="CircularLayout",Qa.ConstantSpacing=Ih,Qa.ConstantDistance=Vd,Qa.ConstantAngle=Pd,Qa.Packed=Rh,Qa.Clockwise=su,Qa.Counterclockwise=Kd,Qa.BidirectionalLeft=bf,Qa.BidirectionalRight=_g,Qa.Forwards=y0,Qa.Reverse=S0,Qa.Ascending=x0,Qa.Descending=w0,Qa.Optimized=Ig,Qa.Pythagorean=P0,Qa.Circular=Yf;function zp(){this.Pl=-1/0,this.tm=this.mk=null}zp.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},zp.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]}},zp.className="VertexArrangement";function Rg(a){xa.call(this,a)}Ct(Rg,xa),Rg.prototype.createVertex=function(){return new Gp(this)},Rg.prototype.createEdge=function(){return new E0(this)},Rg.className="CircularNetwork";function Gp(a){Rs.call(this,a),this.u=this.Si=NaN}Ct(Gp,Rs);function Ud(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Rh)if(x.nodeDiameterFormula===Yf)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===Yf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}Jt.Object.defineProperties(Gp.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)}}}),Gp.className="CircularVertex";function E0(a){Zu.call(this,a)}Ct(E0,Zu),E0.className="CircularEdge";function bl(a){za.call(this),this.ah=null,this.An=0,this.$d=new un(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)}Ct(bl,za),bl.prototype.cloneProtected=function(a){za.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},bl.prototype.createNetwork=function(){return new Xf(this)},bl.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}IS(this,0,a)}this.network=y;var ee=E=x.iterator;E=this.arrangementSpacing;var re=ee.count,oe=!0;z=b=0;for(var le=Yi(),he=0;he<re+y.vertexes.count+2;he++)le[he]=null;re=0,ee.reset();for(var ge=Xt.alloc();ee.next();)if(he=ee.value,this.computeBounds(he,ge),oe)oe=!1,b=ge.x+ge.width/2,z=ge.y+ge.height/2,le[0]=new $e(ge.x+ge.width+E.width,ge.y),le[1]=new $e(ge.x,ge.y+ge.height+E.height),re=2;else{var ye=RS(le,re,b,z,ge.width,ge.height,E),xe=le[ye],Ee=new $e(xe.x+ge.width+E.width,xe.y),Ne=new $e(xe.x,xe.y+ge.height+E.height);for(ye+1<re&&le.splice(ye+1,0,null),le[ye]=Ee,le[ye+1]=Ne,re++,ye=xe.x-ge.x,xe=xe.y-ge.y,he=he.vertexes.iterator;he.next();)Ee=he.value,Ee.centerX+=ye,Ee.centerY+=xe}for(Xt.free(ge),he=y.vertexes.iterator;he.next();)ee=he.value,ye=ee.bounds,2>re?(b=ye.x+ye.width/2,z=ye.y+ye.height/2,le[0]=new $e(ye.x+ye.width+E.width,ye.y),le[1]=new $e(ye.x,ye.y+ye.height+E.height),re=2):(oe=RS(le,re,b,z,ye.width,ye.height,E),ge=le[oe],xe=new $e(ge.x+ye.width+E.width,ge.y),ye=new $e(ge.x,ge.y+ye.height+E.height),oe+1<re&&le.splice(oe+1,0,null),le[oe]=xe,le[oe+1]=ye,re++,ee.centerX=ge.x+ee.width/2,ee.centerY=ge.y+ee.height/2);for(Wi(le),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)}}zS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},bl.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},bl.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 IS(a,y,x){if(Dx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Ox(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,IS(a,y+1,x),zS(a,z),_x(a,b),y=b.vertexes.Fa(),y.sort(function(ee,re){return ee===null||re===null||ee===re?0:re.Vd-ee.Vd}),x=0;x<y.length;x++)Ix(a,y[x]);a.Zf=E}}function Dx(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 Ox(a,y){for(var x=a.network,E=new Xf(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ee=new GS;ee.Rs=z.Vd,ee.Ss=z.width,ee.Qs=z.height,ee.Sv=z.focus.x,ee.Tv=z.focus.y,z.We===null&&(z.We=new bn),z.We.add(ee),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var re=z.value;b=re.fromVertex,ee=re.toVertex,b.network===E&&ee.network===E?E.Bo(re):b.network===E?(re=b.Hj,re===null&&(re=new bn,b.Hj=re),re.add(ee),b.Vd--,b.sh+=ee.sh):ee.network===E&&(re=ee.Hj,re===null&&(re=new bn,ee.Hj=re),re.add(b),ee.Vd--,ee.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,Ie.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var oe=b.Hj;if(oe!==null&&0<oe.count&&(ee=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=ee))){for(var le=re=0,he=oe.count-ee;he<oe.count;he++){var ge=oe.M(he),ye=null;for(z=ge.edges.iterator;z.next();){var xe=z.value;if(xe.Ax(ge)===b){ye=xe;break}}ye!==null&&(le+=ye.length,re+=ge.width*ge.height)}z=b.centerX,oe=b.centerY,he=b.width,ge=b.height,ye=b.focus,xe=he*ge,1>xe&&(xe=1),re=Ie.sqrt((re+xe+le*le*4/(ee*ee))/xe),ee=(re-1)*he/2,re=(re-1)*ge/2,b.bounds=new Xt(z-ye.x-ee,oe-ye.y-re,he+2*ee,ge+2*re),b.focus=new $e(ye.x+ee,ye.y+re)}}return a.network=E,x}function _x(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,ee=b.Tv;E.bounds=new Xt(E.centerX-z,E.centerY-ee,b.Ss,b.Qs),E.focus=new $e(z,ee),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Ix(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,ee=y.height;y.We!==null&&0<y.We.count&&(ee=y.We.M(0),z=ee.Ss,ee=ee.Qs),z=Ie.sqrt(z*z+ee*ee)/2;for(var re=!1,oe=ee=0,le=0,he=y.vertexes.iterator;he.next();){var ge=he.value;1>=ge.Vd?oe++:(re=!0,le++,ee+=Math.atan2(y.centerY-ge.centerY,y.centerX-ge.centerX))}if(oe!==0){for(0<le&&(ee/=le),le=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(le=y/2),1<x.count&&x.sort(function(xe,Ee){return xe===null||Ee===null||xe===Ee?0:Ee.width*Ee.height-xe.width*xe.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(he=null,ge=oe.edges.iterator;ge.next();){he=ge.value;break}ge=oe.width;var ye=oe.height;ge=Ie.sqrt(ge*ge+ye*ye)/2,he=z+he.length+ge,ge=ee+(y*(re/2>>1)+le)*(re%2===0?1:-1),oe.centerX=E+he*Math.cos(ge),oe.centerY=b+he*Math.sin(ge),re++}}}}function RS(a,y,x,E,b,z,ee){var re=9e19,oe=-1,le=0;e:for(;le<y;le++){var he=a[le],ge=he.x-x,ye=he.y-E;if(ge=ge*ge+ye*ye,ge<re){for(ye=le-1;0<=ye;ye--)if(a[ye].y>he.y&&a[ye].x-he.x<b+ee.width)continue e;for(ye=le+1;ye<y;ye++)if(a[ye].x>he.x&&a[ye].y-he.y<z+ee.height)continue e;oe=le,re=ge}}return oe}bl.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},bl.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 jS(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,ee=z.x;y=z.y;var re=z.width;return z=z.height,E+b<ee?a>y+z?(x=E+b-ee,a=a-y-z,Ie.sqrt(x*x+a*a)):a+x<y?(E=E+b-ee,a=a+x-y,Ie.sqrt(E*E+a*a)):ee-(E+b):E>ee+re?a>y+z?(x=E-ee-re,a=a-y-z,Ie.sqrt(x*x+a*a)):a+x<y?(E=E-ee-re,a=a+x-y,Ie.sqrt(E*E+a*a)):E-(ee+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function zS(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,Rx(a)););a.ah=null}function Rx(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,ee=1;ee<y.length;ee++){var re=y[ee];re.forceX=0,re.forceY=0;var oe=re.centerX;re=re.centerY,E=Math.min(E,oe),b=Math.max(b,oe),x=Math.min(x,re),z=Math.max(z,re)}(b=b-E>z-x)?y.sort(function(Ne,Ye){return Ne===null||Ye===null||Ne===Ye?0:Ne.centerX-Ye.centerX}):y.sort(function(Ne,Ye){return Ne===null||Ye===null||Ne===Ye?0:Ne.centerY-Ye.centerY}),x=a.Zf;var le=E=re=0;for(z=0;z<y.length;z++){ee=y[z],E=ee.bounds,re=ee.focus,oe=E.x+re.x;var he=E.y+re.y;E=ee.charge*a.electricalFieldX(oe,he),le=ee.charge*a.electricalFieldY(oe,he),E+=ee.mass*a.gravitationalFieldX(oe,he),le+=ee.mass*a.gravitationalFieldY(oe,he),ee.forceX+=E,ee.forceY+=le;for(var ge=z+1;ge<y.length;ge++){var ye=y[ge];if(ye!==ee){E=ye.bounds,re=ye.focus,le=E.x+re.x;var xe=E.y+re.y;if(oe-le>x||le-oe>x){if(b)break}else if(he-xe>x||xe-he>x){if(!b)break}else{var Ee=jS(ee,ye);1>Ee?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new C0),Ee=E.random(),re=E.random(),oe>le?(E=Math.abs(ye.bounds.right-ee.bounds.x),E=(1+E)*Ee):oe<le?(E=Math.abs(ye.bounds.x-ee.bounds.right),E=-(1+E)*Ee):(E=Math.max(ye.width,ee.width),E=(1+E)*Ee-E/2),he>xe?(le=Math.abs(ye.bounds.bottom-ee.bounds.y),le=(1+le)*re):oe<le?(le=Math.abs(ye.bounds.y-ee.bounds.bottom),le=-(1+le)*re):(le=Math.max(ye.height,ee.height),le=(1+le)*re-le/2)):(re=-(ee.charge*ye.charge)/(Ee*Ee),E=(le-oe)/Ee*re,le=(xe-he)/Ee*re),ee.forceX+=E,ee.forceY+=le,ye.forceX-=E,ye.forceY-=le}}}}for(b=a.network.edges.iterator;b.next();)re=b.value,x=re.fromVertex,z=re.toVertex,ee=x.bounds,oe=x.focus,E=ee.x+oe.x,ee=ee.y+oe.y,he=z.bounds,ge=z.focus,oe=he.x+ge.x,he=he.y+ge.y,ge=jS(x,z),1>ge?(ge=a.randomNumberGenerator,ge===null&&(a.randomNumberGenerator=ge=new C0),re=ge.random(),ge=ge.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,le=(ee>he?1:-1)*(1+(z.height>x.height?z.height:x.height))*ge):(re=re.stiffness*(ge-re.length),E=(oe-E)/ge*re,le=(he-ee)/ge*re),x.forceX+=E,x.forceY+=le,z.forceX-=E,z.forceY-=le;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}bl.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},bl.prototype.moveFixedVertex=function(){},bl.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},bl.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Fs,y.toSpot=Fs)}},bl.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Xt.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Xt.free(x)}x=Xt.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()}Xt.free(x)},bl.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},bl.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},bl.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},bl.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},bl.prototype.electricalFieldX=function(){return 0},bl.prototype.electricalFieldY=function(){return 0},bl.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},bl.prototype.gravitationalFieldX=function(){return 0},bl.prototype.gravitationalFieldY=function(){return 0},bl.prototype.isFixed=function(a){return a.isFixed},Jt.Object.defineProperties(bl.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"&&Rt('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())}}}),bl.className="ForceDirectedLayout";function GS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}GS.className="ForceDirectedSubnet";function Xf(a){xa.call(this,a)}Ct(Xf,xa),Xf.prototype.createVertex=function(){return new Hp(this)},Xf.prototype.createEdge=function(){return new Zp(this)},Xf.className="ForceDirectedNetwork";function Hp(a){Rs.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}Ct(Hp,Rs),Jt.Object.defineProperties(Hp.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)}}}),Hp.className="ForceDirectedVertex";function Zp(a){Zu.call(this,a),this.j=this.o=NaN}Ct(Zp,Zu),Jt.Object.defineProperties(Zp.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)}}}),Zp.className="ForceDirectedEdge";function C0(){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()}C0.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},C0.className="RandomNumberGenerator";function ta(a){za.call(this),this.kc=this.ie=25,this.K=0,this.Dk=k0,this.Zk=N0,this.Qk=A0,this.bj=4,this.rk=B0,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 $e,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ct(ta,za),ta.prototype.cloneProtected=function(a){za.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},ta.prototype.qb=function(a){a.classType===ta?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:Rt("Unknown enum value: "+a):za.prototype.qb.call(this,a)},ta.prototype.createNetwork=function(){return new zg(this)},ta.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!==Vp&&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===Vp&&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 ee=0,re=0,oe=0,le=0;if(E.link!==null){if(re=E.link,re===null)continue;var he=b.node;if(ee=z.node,he===null||ee===null)continue;var ge=re.fromNode;oe=re.toNode;for(var ye=re.fromPort;ye!==null&&!ye.Ed();)ye=ye.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){le=ge;var xe=ye;ge=oe,ye=re,oe=le,re=xe}var Ee=b.focus;le=z.focus;var Ne=E.rev?z.bounds:b.bounds;xe=$e.alloc(),he!==ge?Ne.w()&&ge.isVisible()?ge.actualBounds.w()?(vd(ge,ye,Oo,xe),xe.x+=ge.actualBounds.x-Ne.x,xe.y+=ge.actualBounds.y-Ne.y):(vd(ge,ye,Oo,xe),xe.w()||xe.assign(Ee)):xe.assign(Ee):Ne.w()?(vd(ge,ye,Oo,xe),xe.w()||xe.assign(Ee)):xe.assign(Ee),ge=E.rev?b.bounds:z.bounds,he=$e.alloc(),ee!==oe?ge.w()&&oe.isVisible()?oe.actualBounds.w()?(vd(oe,re,Oo,he),he.x+=oe.actualBounds.x-ge.x,he.y+=oe.actualBounds.y-ge.y):(vd(oe,re,Oo,he),he.w()||he.assign(le)):he.assign(le):ge.w()?(vd(oe,re,Oo,he),he.w()||he.assign(le)):he.assign(le),this.K===90||this.K===270?(ee=Math.round((xe.x-Ee.x)/this.kc),oe=xe.x,re=Math.round((he.x-le.x)/this.kc),le=he.x):(ee=Math.round((xe.y-Ee.y)/this.kc),oe=xe.y,re=Math.round((he.y-le.y)/this.kc),le=he.y),$e.free(xe),$e.free(he),E.portFromColOffset=ee,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=le}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(xe=b.layer,he=z.layer,ge=0,Ne=E.link,Ne!==null){var Ye=Ne.fromPort,je=Ne.toPort;if(Ye!==null&&je!==null){var nt=Ne.fromNode;if(ye=Ne.toNode,nt!==null&&ye!==null){var ot=F0(this,!0),ut=F0(this,!1),vt=this.setsPortSpots?ot:Ne.computeSpot(!0,Ye);Ee=this.setsPortSpots?ut:Ne.computeSpot(!1,je);var Dt=Ne.isOrthogonal;vt.$c()&&vt.Hf(ut)&&Ee.$c()&&Ee.Hf(ot)?ge=0:(ot=Ne.getLinkPoint(nt,Ye,vt,!0,Dt,ye,je,$e.alloc()),ut=Ne.getLinkDirection(nt,Ye,ot,vt,!0,Dt,ye,je),$e.free(ot),vt.ys()||ut!==JS(this,E,!0)?this.setsPortSpots&&nt!==null&&nt.ports.count===1&&E.rev&&(ge+=1):ge+=1,vt=Ne.getLinkPoint(ye,je,Ee,!1,Dt,nt,Ye,$e.alloc()),Ne=Ne.getLinkDirection(ye,je,vt,Ee,!1,Dt,nt,Ye),$e.free(vt),Ee.ys()||Ne!==JS(this,E,!1)?this.setsPortSpots&&ye!==null&&ye.ports.count===1&&E.rev&&(ge+=2):ge+=2)}}}if(ye=ge,ge=ye===1||ye===3,(ye=ye===2||ye===3)&&(Ee=a.createVertex(),Ee.node=null,Ee.Dj=1,Ee.layer=xe,Ee.near=b,a.dh(Ee),b=a.Zj(b,Ee,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ee,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Ee),Ne=1,ge&&Ne--,xe-he>Ne&&0<xe){for(E.valid=!1,Ee=a.createVertex(),Ee.node=null,Ee.Dj=2,Ee.layer=xe-1,a.dh(Ee),b=a.Zj(b,Ee,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=ye?0:ee,b.portToColOffset=0,b.portFromPos=ye?0:oe,b.portToPos=0,b=Ee,xe--;xe-he>Ne&&0<xe;)Ee=a.createVertex(),Ee.node=null,Ee.Dj=3,Ee.layer=xe-1,a.dh(Ee),b=a.Zj(b,Ee,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Ee,xe--;b=a.Zj(Ee,z,E.link),b.valid=!ge,ge&&(Ee.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=le}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=Yd(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),Xd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},ta.prototype.linkMinLength=function(){return 1};function gy(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}ta.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},ta.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 yu(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 ph(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 HS(a,y,x){var E=Yd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,ee=0;ee<b;ee++){var re=0,oe=E[ee],le=oe.near;if(le!==null&&le.layer===oe.layer)if(oe=le.index,oe>ee)for(var he=ee+1;he<oe;he++){var ge=E[he];ge.near===le&&ge.Dj===le.Dj||re++}else for(he=ee-1;he>oe;he--)ge=E[he],ge.near===le&&ge.Dj===le.Dj||re++;var ye;if(0<=x)for(oe=E[ee].sourceEdgesArrayAccess,le=0;le<oe.length;le++){var xe=oe[le];if(xe.valid&&xe.fromVertex.layer!==y)for(ge=xe.fromVertex.index,he=xe.portToPos,xe=xe.portFromPos,ye=le+1;ye<oe.length;ye++){var Ee=oe[ye];if(Ee.valid&&Ee.fromVertex.layer!==y){var Ne=Ee.fromVertex.index,Ye=Ee.portToPos;Ee=Ee.portFromPos,he<Ye&&(ge>Ne||ge===Ne&&xe>Ee)&&re++,Ye<he&&(Ne>ge||Ne===ge&&Ee>xe)&&re++}}}if(0>=x){for(oe=E[ee].destinationEdgesArrayAccess,le=0;le<oe.length;le++)if(xe=oe[le],xe.valid&&xe.toVertex.layer!==y)for(ge=xe.toVertex.index,he=xe.portToPos,xe=xe.portFromPos,ye=le+1;ye<oe.length;ye++)Ee=oe[ye],Ee.valid&&Ee.toVertex.layer!==y&&(Ne=Ee.toVertex.index,Ye=Ee.portToPos,Ee=Ee.portFromPos,xe<Ee&&(ge>Ne||ge===Ne&&he>Ye)&&re++,Ee<xe&&(Ne>ge||Ne===ge&&Ye>he)&&re++)}for(z[ee*b+ee]=re,oe=ee+1;oe<b;oe++){var je=0,nt=0;if(0<=x){re=E[ee].sourceEdgesArrayAccess;var ot=E[oe].sourceEdgesArrayAccess;for(le=0;le<re.length;le++)if(xe=re[le],xe.valid&&xe.fromVertex.layer!==y)for(ge=xe.fromVertex.index,xe=xe.portFromPos,ye=0;ye<ot.length;ye++)Ee=ot[ye],Ee.valid&&Ee.fromVertex.layer!==y&&(Ne=Ee.fromVertex.index,Ee=Ee.portFromPos,(ge<Ne||ge===Ne&&xe<Ee)&&nt++,(Ne<ge||Ne===ge&&Ee<xe)&&je++)}if(0>=x){for(re=E[ee].destinationEdgesArrayAccess,ot=E[oe].destinationEdgesArrayAccess,le=0;le<re.length;le++)if(xe=re[le],xe.valid&&xe.toVertex.layer!==y)for(ge=xe.toVertex.index,he=xe.portToPos,ye=0;ye<ot.length;ye++)Ee=ot[ye],Ee.valid&&Ee.toVertex.layer!==y&&(Ne=Ee.toVertex.index,Ye=Ee.portToPos,(ge<Ne||ge===Ne&&he<Ye)&&nt++,(Ne<ge||Ne===ge&&Ye<he)&&je++)}z[ee*b+oe]=je,z[oe*b+ee]=nt}}return Xd(a,y,E),z}ta.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=HS(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 b0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Yd(E,b),ee=E.tc[b],re=0,oe=0;oe<ee;oe++){var le=z[oe].destinationEdgesArrayAccess;if(le!==null)for(var he=0;he<le.length;he++){var ge=le[he];if(ge.valid&&ge.toVertex.layer!==b){var ye=ge.fromVertex.column+ge.portFromColOffset,xe=ge.toVertex.column+ge.portToColOffset;re+=(Math.abs(ye-xe)+1)*gy(ge)}}}Xd(E,b,z),y+=re}return y}ta.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 py(a,y,x){for(var E=Yd(a,y),b=a.tc[y],z=[],ee=0;ee<b;ee++){var re=E[ee],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var he=0,ge=0,ye=re.near;if(ye!==null&&ye.layer===re.layer&&(he+=ye.column-1,ge++),oe!==null)for(ye=0;ye<oe.length;ye++){re=oe[ye];var xe=re.fromVertex;re.valid&&!re.rev&&xe.layer!==y&&(he+=xe.column,ge++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],ye=re.toVertex,re.valid&&!re.rev&&ye.layer!==y&&(he+=ye.column,ge++);z[ee]=ge===0?-1:he/ge}return Xd(a,y,E),z}function ZS(a,y,x){for(var E=Yd(a,y),b=a.tc[y],z=[],ee=0;ee<b;ee++){var re=E[ee],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var le=null;0<=x&&(le=re.destinationEdgesArrayAccess);var he=0,ge=[],ye=re.near;if(ye!==null&&ye.layer===re.layer&&(ge[he]=ye.column-1,he++),re=void 0,oe!==null)for(ye=0;ye<oe.length;ye++){re=oe[ye];var xe=re.fromVertex;re.valid&&!re.rev&&xe.layer!==y&&(ge[he]=xe.column+re.portFromColOffset,he++)}if(le!==null)for(oe=0;oe<le.length;oe++)re=le[oe],ye=re.toVertex,re.valid&&!re.rev&&ye.layer!==y&&(ge[he]=ye.column+re.portToColOffset,he++);he===0?z[ee]=-1:(ge.sort(function(Ee,Ne){return Ee-Ne}),le=he>>1,z[ee]=he&1?ge[le]:ge[le-1]+ge[le]>>1)}return Xd(a,y,E),z}function Wp(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ee=y.destinationEdges;ee.next();){var re=ee.value,oe=re.toVertex,le=y.layer-oe.layer;re=a.linkMinLength(re),le===re&&Wp(a,oe,x,E,b,z)}if(z)for(ee=y.sourceEdges;ee.next();)re=ee.value,oe=re.fromVertex,le=oe.layer-y.layer,re=a.linkMinLength(re),le===re&&Wp(a,oe,x,E,b,z)}}function my(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ee=y.destinationEdges;ee.next();)my(a,ee.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)my(a,y.value.fromVertex,x,E,b,z)}}ta.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Sy:a=this.network;var y=0,x=a.vertexes.count-1,E=[];E.length=x+1;for(var b=a.vertexes.iterator;b.next();)b.value.valid=!0;for(;jx(a)!==null;){for(b=WS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=WS(a);for(b=VS(a);b!==null;)E[y]=b,y++,b.valid=!1,b=VS(a);b=null;for(var z=0,ee=this.network.vertexes.iterator;ee.next();){var re=ee.value;if(re.valid){for(var oe=0,le=re.destinationEdges;le.next();)le.value.toVertex.valid&&oe++;le=0;for(var he=re.sourceEdges;he.next();)he.value.fromVertex.valid&&le++;(b===null||z<oe-le)&&(b=re,z=oe-le)}}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 k0:for(E=this.network.vertexes.iterator;E.next();)a=E.value,a.Ll=-1,a.finish=-1;for(a=this.network.edges.iterator;a.next();)a.value.forest=!1;for(this.Kn=0,E.reset();E.next();)y=E.value,y.sourceEdges.count===0&&vy(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&vy(this,y);for(a.reset();a.next();)E=a.value,E.forest||(y=E.fromVertex,x=y.finish,b=E.toVertex,z=b.finish,b.Ll<y.Ll&&x<z&&(this.network.gm(E),E.rev=!0));break;case Vp: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 jx(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function WS(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 VS(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 vy(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,vy(a,b))}y.finish=a.Kn,a.Kn++}ta.prototype.assignLayers=function(){switch(this.Zk){case xy:KS(this);break;case wy:for(var a,y=this.network.vertexes.iterator;y.next();)a=YS(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 N0:for(KS(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&XS(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 KS(a){for(var y=a.network.vertexes.iterator;y.next();){var x=US(a,y.value);a.Ia=Math.max(x,a.Ia)}}function US(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,US(a,z)+b)}y.layer=x}else x=y.layer;return x}function YS(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,YS(a,z)+b)}y.layer=x}else x=y.layer;return x}function XS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)XS(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 ee=E[z],re=ee.fromVertex,oe=ee.toVertex;ee=a.linkMinLength(ee),re.layer-oe.layer>ee&&Wp(a,re,0,-1,!0,!1)}for(Wp(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,re=0,oe=null,ee=a.network.vertexes.iterator;ee.next();){var le=ee.value;if(le.component===1){var he=0,ge=!1,ye=le.sourceEdgesArrayAccess;b=ye.length;for(var xe=0;xe<b;xe++){var Ee=ye[xe],Ne=Ee.fromVertex;he+=1,Ne.component!==1&&(z+=1,Ne=Ne.layer-le.layer,Ee=a.linkMinLength(Ee),E=Math.min(E,Ne-Ee))}for(ye=le.destinationEdgesArrayAccess,b=ye.length,xe=0;xe<b;xe++)Ee=ye[xe].toVertex,--he,Ee.component!==1?--z:ge=!0;(oe===null||he<re)&&!ge&&(oe=le,re=he)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else oe.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Wp(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,re=null,oe=a.network.vertexes.iterator;oe.next();)if(ee=oe.value,ee.component===1){for(le=0,he=!1,ye=ee.sourceEdgesArrayAccess,ge=ye.length,xe=0;xe<ge;xe++)Ee=ye[xe].fromVertex,le+=1,Ee.component!==1?E+=1:he=!0;for(ye=ee.destinationEdgesArrayAccess,ge=ye.length,xe=0;xe<ge;xe++)Ee=ye[xe],Ne=Ee.toVertex,--le,Ne.component!==1&&(--E,Ne=ee.layer-Ne.layer,Ee=a.linkMinLength(Ee),b=Math.min(b,Ne-Ee));(re===null||le>z)&&!he&&(re=ee,z=le)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else re.component=0}}}function JS(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}ta.prototype.initializeIndices=function(){switch(this.Qk){default:case Ey: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 A0: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&&QS(this,x);break;case Py:for(a=this.network.vertexes.iterator,y=0;y<=this.Ia;y++)for(a.reset();a.next();)x=a.value,x.layer===y&&x.index===-1&&$S(this,x)}};function QS(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&&QS(a,E))}function $S(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&&$S(a,E))}ta.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=yu(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,1),Eh(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=yu(this)),E=this.Ia;0<=E;E--)L0(this,E,-1),Eh(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=yu(this))}for(ph(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)L0(this,E,0),Eh(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=yu(this)),E=this.Ia;0<=E;E--)L0(this,E,0),Eh(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=yu(this))}ph(this,y);var z,ee,re;switch(this.rk){case Cy:break;case by:for(re=a+1;(E=this.countCrossings())<re;)for(re=E,x=this.Ia;0<=x;x--)for(ee=0;ee<=x;ee++){for(z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,1)||z;for(b=this.countCrossings(),b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,1)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,-1)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,0)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,0)||z;b>=a?ph(this,y):(a=b,y=yu(this))}break;default:case B0:for(x=this.Ia,ee=0,re=a+1;(E=this.countCrossings())<re;){for(re=E,z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,-1)||z;for(b=this.countCrossings(),b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,1)||z;for(b=this.countCrossings(),b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,1)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,-1)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Eh(this,E,0)||z;for(b>=a?ph(this,y):(a=b,y=yu(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Eh(this,E,0)||z;b>=a?ph(this,y):(a=b,y=yu(this))}}ph(this,y)};function L0(a,y,x){var E=Yd(a,y),b=a.tc[y],z=ZS(a,y,x),ee=py(a,y,x);for(x=0;x<b;x++)ee[x]===-1&&(ee[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var re=!0,oe;re;)for(re=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&ee[x+1]<ee[x])&&(re=!0,oe=z[x],z[x]=z[x+1],z[x+1]=oe,oe=ee[x],ee[x]=ee[x+1],ee[x+1]=oe,oe=E[x],E[x]=E[x+1],E[x+1]=oe);for(x=z=0;x<b;x++)oe=E[x],oe.index=x,z+=a.nodeMinColumnSpace(oe,!0),oe.column=z,z+=1,z+=a.nodeMinColumnSpace(oe,!1);Xd(a,y,E)}function Eh(a,y,x){var E=Yd(a,y),b=a.tc[y];x=HS(a,y,x);var z,ee=[];for(z=0;z<b;z++)ee[z]=-1;var re=[];for(z=0;z<b;z++)re[z]=-1;for(var oe=!1,le=!0;le;)for(le=!1,z=0;z<b-1;z++){var he=x[E[z].index*b+E[z+1].index],ge=x[E[z+1].index*b+E[z].index],ye=0,xe=0,Ee=E[z].column,Ne=E[z+1].column,Ye=a.nodeMinColumnSpace(E[z],!0),je=a.nodeMinColumnSpace(E[z],!1),nt=a.nodeMinColumnSpace(E[z+1],!0),ot=a.nodeMinColumnSpace(E[z+1],!1);Ye=Ee-Ye+nt,je=Ne-je+ot;var ut=E[z].sourceEdges.iterator;for(ut.reset();ut.next();)if(nt=ut.value,ot=nt.fromVertex,nt.valid&&ot.layer===y){for(nt=0;E[nt]!==ot;)nt++;nt<z&&(ye+=2*(z-nt),xe+=2*(z+1-nt)),nt===z+1&&(ye+=1),nt>z+1&&(ye+=4*(nt-z),xe+=4*(nt-(z+1)))}for(ut=E[z].destinationEdges.iterator,ut.reset();ut.next();)if(nt=ut.value,ot=nt.toVertex,nt.valid&&ot.layer===y){for(nt=0;E[nt]!==ot;)nt++;nt===z+1&&(xe+=1)}for(ut=E[z+1].sourceEdges.iterator,ut.reset();ut.next();)if(nt=ut.value,ot=nt.fromVertex,nt.valid&&ot.layer===y){for(nt=0;E[nt]!==ot;)nt++;nt<z&&(ye+=2*(z+1-nt),xe+=2*(z-nt)),nt===z&&(xe+=1),nt>z+1&&(ye+=4*(nt-(z+1)),xe+=4*(nt-z))}for(ut=E[z+1].destinationEdges.iterator,ut.reset();ut.next();)if(nt=ut.value,ot=nt.toVertex,nt.valid&&ot.layer===y){for(nt=0;E[nt]!==ot;)nt++;nt===z&&(ye+=1)}nt=ot=0,ut=ee[E[z].index];var vt=re[E[z].index],Dt=ee[E[z+1].index],Wn=re[E[z+1].index];ut!==-1&&(ot+=Math.abs(ut-Ee),nt+=Math.abs(ut-je)),vt!==-1&&(ot+=Math.abs(vt-Ee),nt+=Math.abs(vt-je)),Dt!==-1&&(ot+=Math.abs(Dt-Ne),nt+=Math.abs(Dt-Ye)),Wn!==-1&&(ot+=Math.abs(Wn-Ne),nt+=Math.abs(Wn-Ye)),(xe<ye-.5||xe===ye&&ge<he-.5||xe===ye&&ge===he&&nt<ot-.5)&&(le=oe=!0,E[z].column=je,E[z+1].column=Ye,he=E[z],E[z]=E[z+1],E[z+1]=he)}for(z=0;z<b;z++)E[z].index=z;return Xd(a,y,E),oe}ta.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Ux)!==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=jg(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=jg(this,y,-1)||x;x=jg(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)yy(this,y,1);for(y=this.Md-1;0<=y;y--)yy(this,y,-1);yy(this,this.Md,0)}if(a&&(qS(this,-1),qS(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=jg(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=jg(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=jg(this,y,0)||x}}else Zx(this)};function jg(a,y,x){for(var E=!1;zx(a,y,x);)E=!0;return E}function zx(a,y,x){var E,b=Yd(a,y),z=a.tc[y],ee=py(a,y,-1);if(0<x)for(E=0;E<z;E++)ee[E]=-1;var re=py(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,le=!0;le;)for(le=!1,E=0;E<z;E++){var he=b[E].column,ge=a.nodeMinColumnSpace(b[E],!0),ye=a.nodeMinColumnSpace(b[E],!1),xe=0;0>E-1||he-b[E-1].column-1>ge+a.nodeMinColumnSpace(b[E-1],!1)?xe=he-1:xe=he,ge=E+1>=z||b[E+1].column-he-1>ye+a.nodeMinColumnSpace(b[E+1],!0)?he+1:he;var Ee=ye=0,Ne=0;if(0>=x)for(var Ye=b[E].sourceEdges.iterator;Ye.next();){var je=Ye.value,nt=je.fromVertex;if(je.valid&&nt.layer!==y){var ot=gy(je),ut=je.portFromColOffset;je=je.portToColOffset,nt=nt.column,ye+=(Math.abs(he+je-(nt+ut))+1)*ot,Ee+=(Math.abs(xe+je-(nt+ut))+1)*ot,Ne+=(Math.abs(ge+je-(nt+ut))+1)*ot}}if(0<=x)for(Ye=b[E].destinationEdges.iterator;Ye.next();)je=Ye.value,nt=je.toVertex,je.valid&&nt.layer!==y&&(ot=gy(je),ut=je.portFromColOffset,je=je.portToColOffset,nt=nt.column,ye+=(Math.abs(he+ut-(nt+je))+1)*ot,Ee+=(Math.abs(xe+ut-(nt+je))+1)*ot,Ne+=(Math.abs(ge+ut-(nt+je))+1)*ot);je=ut=ot=0,Ye=ee[b[E].index],nt=re[b[E].index],Ye!==-1&&(ot+=Math.abs(Ye-he),ut+=Math.abs(Ye-xe),je+=Math.abs(Ye-ge)),nt!==-1&&(ot+=Math.abs(nt-he),ut+=Math.abs(nt-xe),je+=Math.abs(nt-ge)),Ee<ye||Ee===ye&&ut<ot?(le=oe=!0,b[E].column=xe):(Ne<ye||Ne===ye&&je<ot)&&(le=oe=!0,b[E].column=ge)}return Xd(a,y,b),a.normalize(),oe}function yy(a,y,x){var E=Yd(a,y),b=a.tc[y],z=ZS(a,y,x),ee=[];for(x=0;x<b;x++)ee[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var re=E[x].column,oe=a.nodeMinColumnSpace(E[x],!0),le=a.nodeMinColumnSpace(E[x],!1),he=0;if(ee[x]===-1)if(x===0&&x===b-1)he=re;else if(x===0){var ge=E[x+1].column;ge-re===le+a.nodeMinColumnSpace(E[x+1],!0)?he=re-1:he=re}else x===b-1?(ge=E[x-1].column,he=re-ge===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(ge=E[x-1].column,oe=ge+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ge=E[x+1].column,le=ge-a.nodeMinColumnSpace(E[x+1],!0)-le-1,he=(oe+le)/2|0);else x===0&&x===b-1?he=ee[x]:x===0?(ge=E[x+1].column,le=ge-a.nodeMinColumnSpace(E[x+1],!0)-le-1,he=Math.min(ee[x],le)):x===b-1?(ge=E[x-1].column,oe=ge+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,he=Math.max(ee[x],oe)):(ge=E[x-1].column,oe=ge+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,ge=E[x+1].column,le=ge-a.nodeMinColumnSpace(E[x+1],!0)-le-1,oe<ee[x]&&ee[x]<le?he=ee[x]:oe>=ee[x]?he=oe:le<=ee[x]&&(he=le));he!==re&&(z=!0,E[x].column=he)}Xd(a,y,E),a.normalize()}function Gx(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),ee=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+ee>=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 Hx(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var ee=a.network.vertexes.iterator;ee.next();){E=ee.value;var re=E.column-a.nodeMinColumnSpace(E,!0),oe=E.column+a.nodeMinColumnSpace(E,!1);re<=y&&oe>=y&&(b[E.layer]=!0),re<=x&&oe>=x&&(z[E.layer]=!0)}for(re=!0,x=!1,E=0;E<=a.Ia;E++)re=re&&!(b[E]&&z[E]);if(re)for(ee.reset();ee.next();)a=ee.value,a.column>y&&(--a.column,x=!0);return x}function qS(a,y){for(var x=0;x<=a.Ra;x++)for(;Gx(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Hx(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=yu(a),z=b0(a);for(E=z+1;z<E;){E=z,ex(a,x,1);var ee=b0(a);ee>z?ph(a,b):ee<z&&(z=ee,b=yu(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=yu(a),z=b0(a),E=z+1;z<E;)E=z,ex(a,x,-1),ee=b0(a),ee>z?ph(a,b):ee<z&&(z=ee,b=yu(a));a.normalize()}function ex(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&&(my(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 ee=z.layer,re=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),oe=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));re<=oe;re++)b[ee*(a.Ra+1)+re]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(ee=0;ee<a.Ra;ee++)b[z*(a.Ra+1)+ee]!==-1&&b[z*(a.Ra+1)+ee+1]!==-1&&b[z*(a.Ra+1)+ee]!==b[z*(a.Ra+1)+ee+1]&&(y[b[z*(a.Ra+1)+ee]*a.le+b[z*(a.Ra+1)+ee+1]]=!0);if(0>x)for(ee=a.Ra;0<ee;ee--)b[z*(a.Ra+1)+ee]!==-1&&b[z*(a.Ra+1)+ee-1]!==-1&&b[z*(a.Ra+1)+ee]!==b[z*(a.Ra+1)+ee-1]&&(y[b[z*(a.Ra+1)+ee]*a.le+b[z*(a.Ra+1)+ee-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(ee=[],ee.push(0);ee.length!==0;)if(oe=ee[ee.length-1],ee.pop(),b[oe])for(b[oe]=!1,z=0;z<a.le;z++)y[oe*a.le+z]&&ee.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 Zx(a){for(var y=Yi(),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 Sn,Wx(y,x);var z=null,ee=null,re=null,oe=null,le=(a.ve&1)!==0,he=(a.ve&2)!==0,ge=(a.ve&4)!==0,ye=(a.ve&8)!==0;for(le&&(a.verticalAlignment(y,x,!0),z=M0(a,y,!0,!1)),y.reverse(),ge&&(a.verticalAlignment(y,x,!1),re=M0(a,y,!1,!1)),E=en(y),b=E.next();!b.done;b=E.next())b.value.reverse();ye&&(a.verticalAlignment(y,x,!1),oe=M0(a,y,!1,!0)),y.reverse(),he&&(a.verticalAlignment(y,x,!0),ee=M0(a,y,!0,!0)),Wi(y),a.u(z,ee,re,oe),a.network.vertexes.each(function(xe){var Ee=Yi();le&&Ee.push(z.get(xe)),he&&Ee.push(ee.get(xe)),ge&&Ee.push(re.get(xe)),ye&&Ee.push(oe.get(xe)),Ee.sort(function(Ye,je){return Ye-je});var Ne=Ee.length;Ne=(Ee[Math.floor((Ne-1)/2)]+Ee[Math.ceil((Ne-1)/2)])/2,Wi(Ee),xe.zc=Ne})}function Wx(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,ee=a[E],re=a[E+1],oe=0;z<re.length;oe++){var le=re[oe];e:{if(le.node===null){var he=Ly(le);if(0<he.length){he=he[0].node===null;break e}}he=!1}var ge=he;if(oe===re.length-1||ge){for(he=ee.length-1,ge&&(he=Ly(le)[0].index);z<=oe;){if(le=re[z],!le.bo){ge=[];for(var ye=en(le.sourceEdgesArrayAccess),xe=ye.next();!xe.done;xe=ye.next())xe=xe.value,xe.valid&&ge.push(xe);le.bo=ge}for(le=en(le.bo),ge=le.next();!ge.done;ge=le.next())ge=ge.value,ye=ge.fromVertex.index,(ye<b||ye>he)&&y.add(ge);z++}b=he}}}ta.prototype.verticalAlignment=function(a,y,x){Vx(a),a=en(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=en(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ee=x?Ly(z):Yx(z),re=ee.length;if(0<re){ee.sort(function(ge,ye){return ge.vi-ye.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var le=ee[re],he=void 0;he=x?T0(le,z):T0(z,le),!y.contains(he)&&b<le.vi&&(le.align=z,z.root=le.root,z.align=le.root,b=le.vi)}}}}};function Vx(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 M0(a,y,x,E){for(var b=a.K===90||a.K===270,z=en(y),ee=z.next();!ee.done;ee=z.next()){var re=en(ee.value);for(ee=re.next();!ee.done;ee=re.next())ee=ee.value,ee.sd=ee,ee.shift=1/0,ee.zc=NaN,ee.qg=0}for(ee=a.K===90||a.K===270,z=en(y),re=z.next();!re.done;re=z.next()){re=en(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var le=0,he=oe;he.align!==oe;){var ge=he.align,ye=ee?he.width:he.height,xe=ee?ge.width:ge.height;if(x){var Ee=T0(he,ge),Ne=Ee.portFromPos,Ye=Ee.portToPos;Ee.link!==null&&(he.node&&he.node!==Ee.link.fromNode&&(Ne=ee?he.focusX:he.focusY),ge.node&&ge.node!==Ee.link.toNode&&(Ye=ee?ge.focusX:ge.focusY))}else Ee=T0(ge,he),Ne=Ee.portToPos,Ye=Ee.portFromPos,Ee.link!==null&&(he.node&&he.node!==Ee.link.toNode&&(Ne=ee?he.focusX:he.focusY),ge.node&&ge.node!==Ee.link.fromNode&&(Ye=ee?ge.focusX:ge.focusY));ye=E?he.qg+(ye-Ne)-(xe-Ye):he.qg+Ne-Ye,ge.qg=ye,le=Math.min(le,ye),he=he.align}he=oe;do he.qg=he.qg-le,he=he.align;while(he!==oe)}}for(x=en(y),ee=x.next();!ee.done;ee=x.next())for(z=en(ee.value),ee=z.next();!ee.done;ee=z.next())ee=ee.value,ee.root===ee&&tx(a,ee,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(ee=y[x][0],ee.sd===ee)){ee.sd.shift===1/0&&(ee.sd.shift=0),ee=x,re=0;do{for(z=y[ee][re];z.align!==z.root;)z=z.align,ee++,0<z.vi&&(re=nx(z,y),re.sd.shift=Math.min(re.sd.shift,z.sd.shift+z.zc+z.qg-(re.zc+re.qg+(b?re.width:re.height)+a.columnSpacing)));re=z.vi+1}while(ee<y.length&&re<y[ee].length&&z.sd===y[ee][re].sd)}for(a=new ki,y=en(y),ee=y.next();!ee.done;ee=y.next())for(x=en(ee.value),ee=x.next();!ee.done;ee=x.next())ee=ee.value,ee.zc=ee.zc+ee.sd.shift+ee.qg,z=b?ee.width:ee.height,a.add(ee,E?-ee.zc-z:ee.zc);return a}function tx(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=nx(E,x),z=b.root;tx(a,z,x),y.sd===y&&(y.sd=z.sd);var ee=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+ee-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 nx(a,y){var x=a.Tz;return a=a.vi,1>a&&Rt("Could not determine previous vertex in layer"),y[x][a-1]}ta.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Yi(),b=Yi(),z=1/0,ee=0;4>ee;ee++)if(y[ee]){var re=Kx(this,y[ee],E,b,ee);re<z&&(x=ee,z=re)}for(z={},ee=0;4>ee;z={delta:z.delta},ee++)y[ee]&&(z.delta=ee===0||ee===2?E[x]-E[ee]:b[x]-b[ee],z.delta!==0&&y[ee].each(function(oe){return function(le){le.value+=oe.delta}}(z)));Wi(E),Wi(b)};function Kx(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,ee=-1/0;return y.each(function(re){var oe=re.key;re=re.value,oe=a.K===90||a.K===270?oe.width:oe.height,re<z&&(z=re),re+oe>ee&&(ee=re+oe)}),x[b]=z,E[b]=ee,ee-z}ta.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=F0(this,!0),y=F0(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 F0(a,y){return a.K===270?y?Fl:Qs:a.K===90?y?Qs:Fl:a.K===180?y?hl:_s:y?_s:hl}ta.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,ee=b=1/0,re=-1/0;a.next();){var oe=a.value,le=oe.layer,he=oe.column|0;E?(ee=y.x+this.kc*he,le=this.Kd[le]):(ee=this.Kd[le],le=y.y+this.kc*he),oe.centerX=ee,oe.centerY=le,x&&isFinite(oe.zc)&&(E?oe.node?oe.x=y.x+oe.zc:oe.centerX=y.x+oe.zc:oe.node?oe.y=y.y+oe.zc:oe.centerY=y.y+oe.zc),z=Math.min(oe.x,z),b=Math.min(oe.y,b),E?(ee=z,re=Math.max(re,oe.bounds.right)):(ee=b,re=Math.max(re,oe.bounds.bottom))}for(this.xw=re-ee,z=y.x-z,y=y.y-b,this.Rf=new $e(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},ta.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 Xt(0,0,x,Math.abs(this.Ta[0]))):y.push(new Xt(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Xt(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Xt(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Xt(0,0,Math.abs(this.Ta[0]),x)):y.push(new Xt(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Xt(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Xt(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},ta.prototype.commitLayers=function(){},ta.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,ee=E.fromPort,re=E.toPort;if(b!==null){var oe=b.findVisibleNode();oe!==null&&oe!==b&&(b=oe,ee=oe.port)}z!==null&&(oe=z.findVisibleNode(),oe!==null&&oe!==z&&(z=oe,re=oe.port));var le=y.computeSpot(!0,ee);oe=y.computeSpot(!1,re);var he=x.fromVertex,ge=x.toVertex;if(x.valid)y.curve===rh&&y.pointsCount===4&&(he.column===ge.column&&this.alignOption===0?(x=y.getLinkPoint(b,ee,le,!0,!1,z,re),re=y.getLinkPoint(z,re,oe,!1,!1,b,ee),x.w()||x.set(b.actualBounds.center),re.w()||re.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+re.x)/3,(2*x.y+re.y)/3),y.yf((x.x+2*re.x)/3,(x.y+2*re.y)/3),y.yf(re.x,re.y)):(x=E=!1,ee!==null&&le===Ms&&(E=!0),re!==null&&oe===Ms&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ee,ee.ga(Oo),y.i(3),!0),oe.w()||oe.set(b.actualBounds.center),y.L(0,oe.x,oe.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),oe&&(z=y.i(2),y.L(1,(2*oe.x+z.x)/3,(2*oe.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(he.layer===ge.layer)y.zf();else{var ye=!1,xe=!1,Ee=this.ie,Ne=y.firstPickIndex+1;if(y.isOrthogonal){xe=!0;var Ye=y.pointsCount;4<Ye&&y.points.removeRange(2,Ye-3)}else if(y.curve===rh)ye=!0,Ye=y.pointsCount,4<Ye&&y.points.removeRange(2,Ye-3),Ye===4&&(Ne=2);else{Ye=y.pointsCount;var je=le===Ms,nt=oe===Ms;2<Ye&&je&&nt?y.points.removeRange(1,Ye-2):3<Ye&&je&&!nt?y.points.removeRange(1,Ye-3):3<Ye&&!je&&nt?y.points.removeRange(2,Ye-2):4<Ye&&!je&&!nt&&y.points.removeRange(2,Ye-3)}if(x.rev){for(;ge!==null&&he!==ge;){var ot=Ye=null;for(je=ge.sourceEdges.iterator;je.next()&&(nt=je.value,nt.link!==x.link||(Ye=nt.fromVertex,ot=nt.toVertex,Ye.node!==null)););if(Ye===null)break;if(Ye!==he){je=y.i(Ne-1).x,nt=y.i(Ne-1).y;var ut=Ye.centerX,vt=Ye.centerY;if(xe)this.K===180||this.K===0?Ne===y.firstPickIndex+1?(y.m(Ne++,je,nt),y.m(Ne++,je,vt)):(ot!==null?ot.centerY:nt)!==vt&&(ot=this.Ta[Ye.layer-1]+this.Rf.x,y.m(Ne++,ot,nt),y.m(Ne++,ot,vt)):Ne===y.firstPickIndex+1?(y.m(Ne++,je,nt),y.m(Ne++,ut,nt)):(ot!==null?ot.centerX:je)!==ut&&(ot=this.Ta[Ye.layer-1]+this.Rf.y,y.m(Ne++,je,ot),y.m(Ne++,ut,ot));else if(Ne===y.firstPickIndex+1){ot=Math.max(10,this.he[ge.layer]);var Dt=Math.max(10,this.Ld[ge.layer]);if(ye)this.K===180?ut<=ge.bounds.x?(ge=ge.bounds.x,y.m(Ne++,ge-ot,vt),y.m(Ne++,ge,vt),y.m(Ne++,ge+Dt,vt)):(y.m(Ne++,ut-ot,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut+Dt,vt)):this.K===90?vt>=ge.bounds.bottom?(ge=ge.bounds.y+ge.bounds.height,y.m(Ne++,ut,ge+Dt),y.m(Ne++,ut,ge),y.m(Ne++,ut,ge-ot)):(y.m(Ne++,ut,vt+Dt),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt-ot)):this.K===270?vt<=ge.bounds.y?(ge=ge.bounds.y,y.m(Ne++,ut,ge-ot),y.m(Ne++,ut,ge),y.m(Ne++,ut,ge+Dt)):(y.m(Ne++,ut,vt-ot),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt+Dt)):this.K===0&&(ut>=ge.bounds.right?(ge=ge.bounds.x+ge.bounds.width,y.m(Ne++,ge+Dt,vt),y.m(Ne++,ge,vt),y.m(Ne++,ge-ot,vt)):(y.m(Ne++,ut+Dt,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut-ot,vt)));else{y.m(Ne++,je,nt);var Wn=0;this.K===180||this.K===0?((this.K===180?ut>=ge.bounds.right:ut<=ge.bounds.x)&&(Wn=(this.K===0?-ot:Dt)/2),y.m(Ne++,je+Wn,vt)):((this.K===270?vt>=ge.bounds.bottom:vt<=ge.bounds.y)&&(Wn=(this.K===90?-ot:Dt)/2),y.m(Ne++,ut,nt+Wn)),y.m(Ne++,ut,vt)}}else ot=Math.max(10,this.he[Ye.layer]),Dt=Math.max(10,this.Ld[Ye.layer]),ye?this.K===180?(y.m(Ne++,ut-ot-Ee,vt),y.m(Ne++,Math.min(ut-ot+Ee/2,ut),vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,Math.max(ut+Dt-Ee/2,ut),vt),y.m(Ne++,ut+Dt+Ee,vt)):this.K===90?(y.m(Ne++,ut,vt+Dt+Ee),y.m(Ne++,ut,Math.max(vt+Dt-Ee/2,vt)),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,Math.min(vt-ot+Ee/2,vt)),y.m(Ne++,ut,vt-ot-Ee)):this.K===270?(y.m(Ne++,ut,vt-ot-Ee),y.m(Ne++,ut,Math.min(vt-ot+Ee/2,vt)),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,Math.max(vt+Dt-Ee/2,vt)),y.m(Ne++,ut,vt+Dt+Ee)):(y.m(Ne++,ut+Dt+Ee,vt),y.m(Ne++,Math.max(ut+Dt-Ee/2,ut),vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,Math.min(ut-ot+Ee/2,ut),vt),y.m(Ne++,ut-ot-Ee,vt)):y.m(Ne++,ut,vt)}ge=Ye}(re===null||le!==Ms||xe)&&(je=y.i(Ne-1).x,nt=y.i(Ne-1).y,ut=y.i(Ne).x,vt=y.i(Ne).y,xe?(Ee=this.Ld[he.layer],this.K===180||this.K===0?(xe=nt,xe>=he.bounds.y&&xe<=he.bounds.bottom&&(this.K===180?ut>=he.bounds.x:ut<=he.bounds.right)&&(ge=he.centerX+(this.K===180?-Ee:Ee),xe<he.bounds.y+he.bounds.height/2?xe=he.bounds.y-this.kc/2:xe=he.bounds.bottom+this.kc/2,y.m(Ne++,ge,nt),y.m(Ne++,ge,xe)),y.m(Ne++,ut,xe)):(xe=je,xe>=he.bounds.x&&xe<=he.bounds.right&&(this.K===270?vt>=he.bounds.y:vt<=he.bounds.bottom)&&(ge=he.centerY+(this.K===270?-Ee:Ee),xe<he.bounds.x+he.bounds.width/2?xe=he.bounds.x-this.kc/2:xe=he.bounds.right+this.kc/2,y.m(Ne++,je,ge),y.m(Ne++,xe,ge)),y.m(Ne++,xe,vt)),y.m(Ne++,ut,vt)):ye?(ot=Math.max(10,this.he[he.layer]),Dt=Math.max(10,this.Ld[he.layer]),this.K===180&&ut>=he.bounds.x?(ge=he.bounds.x+he.bounds.width,y.L(Ne-2,ge,nt),y.L(Ne-1,ge+Dt,nt)):this.K===90&&vt<=he.bounds.bottom?(ge=he.bounds.y,y.L(Ne-2,je,ge),y.L(Ne-1,je,ge-ot)):this.K===270&&vt>=he.bounds.y?(ge=he.bounds.y+he.bounds.height,y.L(Ne-2,je,ge),y.L(Ne-1,je,ge+Dt)):this.K===0&&ut<=he.bounds.right&&(ge=he.bounds.x,y.L(Ne-2,ge,nt),y.L(Ne-1,ge-ot,nt))):(ot=Math.max(10,this.he[he.layer]),Dt=Math.max(10,this.Ld[he.layer]),xe=0,this.K===180||this.K===0?((this.K===180?ut<=he.bounds.x:ut>=he.bounds.right)&&(xe=(this.K===0?Dt:-ot)/2),y.m(Ne++,ut+xe,nt)):((this.K===270?vt<=he.bounds.y:vt>=he.bounds.bottom)&&(xe=(this.K===90?Dt:-ot)/2),y.m(Ne++,je,vt+xe)),y.m(Ne++,ut,vt)))}else{for(;he!==null&&he!==ge;){for(ot=Ye=null,he=he.destinationEdges.iterator;he.next()&&(je=he.value,je.link!==x.link||(Ye=je.toVertex,ot=je.fromVertex,ot.node!==null&&(ot=null),Ye.node!==null)););if(Ye===null)break;Ye!==ge&&(je=y.i(Ne-1).x,nt=y.i(Ne-1).y,ut=Ye.centerX,vt=Ye.centerY,xe?this.K===180||this.K===0?(ot!==null?ot.centerY:nt)!==vt&&(ot=this.Ta[Ye.layer]+this.Rf.x,Ne===y.firstPickIndex+1&&(ot=this.K===0?Math.max(ot,je):Math.min(ot,je)),y.m(Ne++,ot,nt),y.m(Ne++,ot,vt)):(ot!==null?ot.centerX:je)!==ut&&(ot=this.Ta[Ye.layer]+this.Rf.y,Ne===y.firstPickIndex+1&&(ot=this.K===90?Math.max(ot,nt):Math.min(ot,nt)),y.m(Ne++,je,ot),y.m(Ne++,ut,ot)):(ot=Math.max(10,this.he[Ye.layer]),Dt=Math.max(10,this.Ld[Ye.layer]),ye?this.K===180?(y.m(Ne++,ut+Dt+Ee,vt),y.m(Ne++,Math.max(ut+Dt-Ee/2,ut),vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,Math.min(ut-ot+Ee/2,ut),vt),y.m(Ne++,ut-ot-Ee,vt)):this.K===90?(y.m(Ne++,ut,vt-ot-Ee),y.m(Ne++,ut,Math.min(vt-ot+Ee/2,vt)),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,Math.max(vt+Dt-Ee/2,vt)),y.m(Ne++,ut,vt+Dt+Ee)):this.K===270?(y.m(Ne++,ut,vt+Dt+Ee),y.m(Ne++,ut,Math.max(vt+Dt-Ee/2,vt)),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,Math.min(vt-ot+Ee/2,vt)),y.m(Ne++,ut,vt-ot-Ee)):(y.m(Ne++,ut-ot-Ee,vt),y.m(Ne++,Math.min(ut-ot+Ee/2,ut),vt),y.m(Ne++,ut,vt),y.m(Ne++,ut,vt),y.m(Ne++,Math.max(ut+Dt-Ee/2,ut),vt),y.m(Ne++,ut+Dt+Ee,vt)):this.K===180?(y.m(Ne++,ut+Dt,vt),y.m(Ne++,ut-ot,vt)):this.K===90?(y.m(Ne++,ut,vt-ot),y.m(Ne++,ut,vt+Dt)):this.K===270?(y.m(Ne++,ut,vt+Dt),y.m(Ne++,ut,vt-ot)):(y.m(Ne++,ut-ot,vt),y.m(Ne++,ut+Dt,vt)))),he=Ye}xe&&(je=y.i(Ne-1).x,nt=y.i(Ne-1).y,ut=y.i(Ne).x,vt=y.i(Ne).y,this.K===180||this.K===0?nt!==vt&&(ot=this.K===0?Math.min(Math.max((ut+je)/2,this.Ta[ge.layer]+this.Rf.x),ut):Math.max(Math.min((ut+je)/2,this.Ta[ge.layer]+this.Rf.x),ut),y.m(Ne++,ot,nt),y.m(Ne++,ot,vt)):je!==ut&&(ot=this.K===90?Math.min(Math.max((vt+nt)/2,this.Ta[ge.layer]+this.Rf.y),vt):Math.max(Math.min((vt+nt)/2,this.Ta[ge.layer]+this.Rf.y),vt),y.m(Ne++,je,ot),y.m(Ne++,ut,ot)))}E!==null&&ye&&4<=y.pointsCount&&(ee!==null&&(ee=le===Ms?y.getLinkPointFromPoint(b,ee,ee.ga(Oo),y.i(3),!0):y.i(0),le===Ms&&(le=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ee.x+le.x)/2,le.y),y.L(2,E.x,(le.y+E.y)/2)):(y.L(1,le.x,(ee.y+le.y)/2),y.L(2,(le.x+E.x)/2,E.y))),ee.w()||ee.set(b.actualBounds.center),y.L(0,ee.x,ee.y)),re!==null&&(b=oe===Ms?y.getLinkPointFromPoint(z,re,re.ga(Oo),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===Ms&&(re=y.i(y.pointsCount-3),oe=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+re.x)/2,re.y),y.L(y.pointsCount-2,oe.x,(re.y+oe.y)/2)):(y.L(y.pointsCount-2,re.x,(b.y+re.y)/2),y.L(y.pointsCount-3,(re.x+oe.x)/2,oe.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},ta.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new bn,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),ee=E.i(b+1);if(this.B(z.y,ee.y)&&!this.B(z.x,ee.x)){var re=new Jd;re.layer=Math.floor(z.y/2);var oe=E.i(0),le=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=le.x*le.x+le.y,re.rd=Math.min(z.x,ee.x),re.Ic=Math.max(z.x,ee.x),re.index=b,re.link=E,b+2<E.pointsCount){oe=E.i(b-1),le=E.i(b+2);var he=0;oe.y<z.y?he=le.y<z.y?3:z.x<ee.x?2:1:oe.y>z.y&&(he=le.y>z.y?0:ee.x<z.x?2:1),re.j=he}x.push(re)}}}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(ee=x[z].Ic,b=a+1;b<E&&x[b].rd<ee;)ee=Math.max(ee,x[b].Ic),b++;if(ee=b-z,1<ee){for(this.zi(x,this.Js,z,z+ee),he=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(he++,re=le.jc);this.zi(x,this.Ux,z,z+ee);var ge=1;for(re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(ge++,re=le.first);for(oe=!0,le=ge,he<ge?(oe=!1,le=he,re=x[z].jc,this.zi(x,this.Js,z,z+ee)):re=x[z].first,he=0,ge=z;ge<b;ge++){var ye=x[ge];(oe?ye.first:ye.jc)!==re&&(he++,re=oe?ye.first:ye.jc);var xe=ye.link;z=xe.i(ye.index),ee=xe.i(ye.index+1);var Ee=this.linkSpacing*(he-(le-1)/2);y++,xe.uh(),xe.L(ye.index,z.x,z.y+Ee),xe.L(ye.index+1,ee.x,ee.y+Ee),xe.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),ee=E.i(b+1),this.B(z.x,ee.x)&&!this.B(z.y,ee.y)&&(re=new Jd,re.layer=Math.floor(z.x/2),oe=E.i(0),le=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=le.x+le.y*le.y,re.rd=Math.min(z.y,ee.y),re.Ic=Math.max(z.y,ee.y),re.index=b,re.link=E,b+2<E.pointsCount&&(oe=E.i(b-1),le=E.i(b+2),he=0,oe.x<z.x?he=le.x<z.x?3:z.y<ee.y?2:1:oe.x>z.x&&(he=le.x>z.x?0:ee.y<z.y?2:1),re.j=he),x.push(re));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(ee=x[z].Ic,b=a+1;b<E&&x[b].rd<ee;)ee=Math.max(ee,x[b].Ic),b++;if(ee=b-z,1<ee){for(this.zi(x,this.Js,z,z+ee),he=1,re=x[z].jc,oe=z;oe<b;oe++)le=x[oe],le.jc!==re&&(he++,re=le.jc);for(this.zi(x,this.Ux,z,z+ee),ge=1,re=x[z].first,oe=z;oe<b;oe++)le=x[oe],le.first!==re&&(ge++,re=le.first);for(oe=!0,le=ge,he<ge?(oe=!1,le=he,re=x[z].jc,this.zi(x,this.Js,z,z+ee)):re=x[z].first,he=0,ge=z;ge<b;ge++)ye=x[ge],(oe?ye.first:ye.jc)!==re&&(he++,re=oe?ye.first:ye.jc),xe=ye.link,z=xe.i(ye.index),ee=xe.i(ye.index+1),Ee=this.linkSpacing*(he-(le-1)/2),y++,xe.uh(),xe.L(ye.index,z.x+Ee,z.y),xe.L(ye.index+1,ee.x+Ee,ee.y),xe.zf()}z=b}a=E}}}},we=ta.prototype,we.Vx=function(a,y){return a instanceof Jd&&y instanceof Jd&&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},we.Ux=function(a,y){return a instanceof Jd&&y instanceof Jd&&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},we.Js=function(a,y){return a instanceof Jd&&y instanceof Jd&&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},we.B=function(a,y){return a-=y,-1<a&&1>a},we.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Rt("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 Yd(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 Xd(a,y,x){a.He[a.tc[y]]=x}Jt.Object.defineProperties(ta.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()):Rt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Sy&&a!==k0&&a!==Vp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==N0&&a!==xy&&a!==wy||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==A0&&a!==Py&&a!==Ey||(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!==Cy&&a!==B0&&a!==by||(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 k0=new Wt(ta,"CycleDepthFirst",0),Sy=new Wt(ta,"CycleGreedy",1),Vp=new Wt(ta,"CycleFromLayers",2),N0=new Wt(ta,"LayerOptimalLinkLength",0),xy=new Wt(ta,"LayerLongestPathSink",1),wy=new Wt(ta,"LayerLongestPathSource",2),A0=new Wt(ta,"InitDepthFirstOut",0),Py=new Wt(ta,"InitDepthFirstIn",1),Ey=new Wt(ta,"InitNaive",2),Cy=new Wt(ta,"AggressiveNone",0),B0=new Wt(ta,"AggressiveLess",1),by=new Wt(ta,"AggressiveMore",2),Ux=8;ta.className="LayeredDigraphLayout",ta.CycleDepthFirst=k0,ta.CycleGreedy=Sy,ta.CycleFromLayers=Vp,ta.LayerOptimalLinkLength=N0,ta.LayerLongestPathSink=xy,ta.LayerLongestPathSource=wy,ta.InitDepthFirstOut=A0,ta.InitDepthFirstIn=Py,ta.InitNaive=Ey,ta.AggressiveNone=Cy,ta.AggressiveLess=B0,ta.AggressiveMore=by,ta.PackNone=0,ta.PackExpand=1,ta.PackStraighten=2,ta.PackMedian=4,ta.PackAll=15,ta.AlignNone=0,ta.AlignUpperLeft=1,ta.AlignUpperRight=2,ta.AlignLowerLeft=4,ta.AlignLowerRight=8,ta.AlignAll=15;function Jd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Jd.className="SegInfo";function zg(a){xa.call(this,a)}Ct(zg,xa),zg.prototype.createVertex=function(){return new mh(this)},zg.prototype.createEdge=function(){return new Kp(this)},zg.className="LayeredDigraphNetwork";function mh(a){Rs.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}Ct(mh,Rs);function ix(a,y){return a.index-y.index}function T0(a,y){if(!a.$n){for(var x=[],E=en(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=en(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Rt("Unable to find destination edge to given vertex")}function Ly(a){if(!a.co){for(var y=[],x=en(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(ix),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=en(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(ix),a.ao=y}return a.ao}mh.prototype.Cl=function(a){Rs.prototype.Cl.call(this,a),this.bo=this.co=null},mh.prototype.Kl=function(a){Rs.prototype.Kl.call(this,a),this.bo=this.co=null},mh.prototype.zl=function(a){Rs.prototype.zl.call(this,a),this.$n=this.ao=null},mh.prototype.Jl=function(a){Rs.prototype.Jl.call(this,a),this.$n=this.ao=null},Jt.Object.defineProperties(mh.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)}}}),mh.prototype.deleteDestinationEdge=mh.prototype.Jl,mh.prototype.addDestinationEdge=mh.prototype.zl,mh.prototype.deleteSourceEdge=mh.prototype.Kl,mh.prototype.addSourceEdge=mh.prototype.Cl,mh.className="LayeredDigraphVertex";function Kp(a){Zu.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ct(Kp,Zu),Jt.Object.defineProperties(Kp.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)}}}),Kp.className="LayeredDigraphEdge";function $r(a){za.call(this),this.Ub=new Sn,this.Wn=I0,this.ud=_c,this.vo=j0,this.Bq=Iy,this.$v=[],this.td=!0,this.Rb=z0,this.$d=new un(10,10).freeze();var y=new qf(this);this.W=new Ch(y),this.Y=new Ch(y),this.ru=[],a&&Object.assign(this,a)}Ct($r,za),$r.prototype.cloneProtected=function(a){za.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)},$r.prototype.qb=function(a){a.classType===$r?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:Rt("Unknown enum value: "+a):za.prototype.qb.call(this,a)},$r.prototype.createNetwork=function(){return new qf(this)},$r.prototype.makeNetwork=function(a){function y(E){if(E instanceof Jn)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Fn){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 kt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof cr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},$r.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==G0&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof kt&&(y=a),this.path===I0&&y!==null?this.ud=y.isTreePathToChildren?_c:Qf:this.ud=this.path===I0?_c: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 Sn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof Jn?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Ch&&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,My(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=rx(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,My(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ch&&ax(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ch&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Ch&&lx(this,y);if(this.Cu(),this.layerStyle===H0){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===Ry)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 Ch&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new Sn,this.isValidLayout=!0};function Xx(a){var y=new Sn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}$r.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case _c:x.sourceEdges.count===0&&this.Ub.add(x);break;case Qf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Rt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=rx(this,a),a!==null&&this.Ub.add(a))};function rx(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case _c:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Qf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Rt("Unhandled path value "+a.ud.toString())}}return E}function My(a,y){if(y!==null){switch(a.ud){case _c:if(0<y.destinationEdges.count){for(var x=new bn,E=y.destinationVertexes;E.next();){var b=E.value;ox(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Qf:if(0<y.sourceEdges.count){for(x=new bn,E=y.sourceVertexes;E.next();)b=E.value,ox(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Rt("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++)My(a,x[y])}}function ox(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}$r.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 ax(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===jc&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,ee=z.length,re=0;re<ee;re++){var oe=z[re];ax(a,oe),x+=oe.descendantCount+1,E=Math.max(E,oe.maxChildrenCount),b=Math.max(b,oe.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function Jx(a,y){switch(a.vo){default:case j0:return y.parent!==null?y.parent:a.W;case Oy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Dy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Ty: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}}$r.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Jx(this,a)),a.parent!==null&&a.parent.alignment===jc){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 sx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)sx(a,y[E])}}$r.prototype.assignTreeVertexValues=function(){};function lx(a,y){if(y!==null){y.alignment!==jc&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}$r.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Gg:break;case Yp:a.children.reverse();break;case Xp:a.children.sort(a.comparer);break;case Jp:a.children.sort(a.comparer),a.children.reverse();break;default:Rt("Unhandled sorting value "+a.sorting.toString())}},$r.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},$r.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Qd(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,ee=0,re=0,oe=a.commentSpacing;if(a.node!==null)for(var le=a.node.Mu();le.next();){var he=le.value;he.category==="Comment"&&he.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(he),he.Va(),he=he.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,he.width),ee+=he.height+Math.abs(re)):(z+=he.width+Math.abs(re),ee=Math.max(ee,he.height)),re=oe)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),ee=Math.max(0,ee-a.height)):(ee+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Xt.allocAt(0,0,a.bounds.width+z,a.bounds.height+ee),a.bounds=b,Xt.free(b))};function Qd(a){return a===Ed||a===jc||a===Cd||a===$c}function Up(a){return a===Ed||a===jc}function Fy(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Qd(x)){if(Up(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Cd)return!0}}return!1}$r.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=Qd(z)),E=E===90||E===270,x=b===90||b===270;for(var ee=a.childrenCount===0,re=Fy(a),oe=0,le=a.comments,he=le.length,ge=$e.alloc(),ye=0;ye<he;ye++){var xe=le[ye],Ee=xe.measuredBounds;if(E&&!ee||!z&&!x&&ee||z&&x&&ee){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(ge.h(a.bounds.x-a.commentMargin-Ee.width,a.bounds.y+oe),xe.move(ge),xe=xe.Sd();xe.next();){var Ne=xe.value;Ne.fromSpot=hl,Ne.toSpot=_s}else for(ge.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=_s,Ne.toSpot=hl;else if(0<=a.commentMargin)for(ge.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=_s,Ne.toSpot=hl;else for(ge.h(a.bounds.x+a.commentMargin-Ee.width,a.bounds.y+oe),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=hl,Ne.toSpot=_s;oe=0<=a.commentSpacing?oe+(Ee.height+a.commentSpacing):oe+(a.commentSpacing-Ee.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(ge.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Ee.height),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=Fl,Ne.toSpot=Qs;else for(ge.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=Qs,Ne.toSpot=Fl;else if(0<=a.commentMargin)for(ge.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=Qs,Ne.toSpot=Fl;else for(ge.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Ee.height),xe.move(ge),xe=xe.Sd();xe.next();)Ne=xe.value,Ne.fromSpot=Fl,Ne.toSpot=Qs;oe=0<=a.commentSpacing?oe+(Ee.width+a.commentSpacing):oe+(a.commentSpacing-Ee.width)}}if($e.free(ge),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===_c)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)}},$r.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 R0:ux(this,a);break;case Qp:if(a.alignment===jc)ux(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Qd(x)),E=Fy(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=jh(a);y=b===90||b===270;var z=0,ee=a.children,re=ee.length;for(x=0;x<re;x++)E=ee[x],z=Math.max(z,y?E.Da.width:E.Da.height);var oe=a.alignment;E=oe===Ic;var le=oe===Rc,he=Qd(oe),ge=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var ye=a.nodeSpacing,xe=this.computeNodeIndent(a),Ee=a.rowSpacing,Ne=0;(E||le||a.hm||a.im&&a.maxGenerationCount===1)&&(Ne=Math.max(0,a.rowIndent)),E=a.width;var Ye=a.height,je=0,nt=0,ot=0,ut=null,vt=null,Dt=0,Wn=0,vi=0,si=0,Mn=0,sn=0,hr=0,Ji=0;if(he&&!Up(oe)&&135<b&&ee.reverse(),Up(oe))if(1<re)for(var Do=0;Do<re;Do++)Do%2===0&&Do!==re-1&&(Ji=Math.max(Ji,y?ee[Do].Da.width:ee[Do].Da.height));else re===1&&(Ji=y?ee[0].Da.width:ee[0].Da.height);if(he){switch(oe){case Ed:nt=135>b?hx(this,a,ee,Ji,je,nt):cx(this,a,ee,Ji,je,nt),Ji=nt.x,je=nt.width,nt=nt.height;break;case Cd:for(ut=0;ut<re;ut++)vt=ee[ut],ge=vt.Da,ot=sn===0?0:Ee,y?(vt.S.h(z-ge.width,si+ot),je=Math.max(je,ge.width),nt=Math.max(nt,si+ot+ge.height),si+=ot+ge.height):(vt.S.h(vi+ot,z-ge.height),je=Math.max(je,vi+ot+ge.width),nt=Math.max(nt,ge.height),vi+=ot+ge.width),sn++;break;case $c:for(ut=0;ut<re;ut++)vt=ee[ut],z=vt.Da,ge=sn===0?0:Ee,y?(vt.S.h(ye/2+a.focus.x,si+ge),je=Math.max(je,z.width),nt=Math.max(nt,si+ge+z.height),si+=ge+z.height):(vt.S.h(vi+ge,ye/2+a.focus.y),je=Math.max(je,vi+ge+z.width),nt=Math.max(nt,z.height),vi+=ge+z.width),sn++}ut=Nu(this,2),vt=Nu(this,2),y?(ut[0].h(0,0),ut[1].h(0,nt),vt[0].h(je,0)):(ut[0].h(0,0),ut[1].h(je,0),vt[0].h(0,nt)),vt[1].h(je,nt)}else for(Do=0;Do<re;Do++){var ya=ee[Do],Xs=ya.Da;if(y){0<ge&&0<sn&&vi+ye+Xs.width>ge&&(vi<z&&Lf(a,oe,z-vi,0,hr,Do-1),Mn++,sn=0,hr=Do,ot=nt,vi=0,si=135<b?-nt-Ee:nt+Ee),O0(this,ya,0,si);var tl=0;if(sn===0)ut=ya.Yo,vt=ya.kp,Dt=Xs.width,Wn=Xs.height,(ut===null||vt===null||b!==jh(ya))&&(ut=Nu(this,2),vt=Nu(this,2),ut[0].h(0,0),ut[1].h(0,Wn),vt[0].h(Dt,0),vt[1].h(Dt,Wn));else{var Ul=Yi();Wn=dx(this,a,ya,ut,vt,Dt,Wn,Ul),tl=Wn.x,ut=Ul[0],vt=Ul[1],Dt=Wn.width,Wn=Wn.height,Wi(Ul),vi<Xs.width&&0>tl&&(Jf(a,-tl,0,hr,Do-1),_0(ut,-tl,0),_0(vt,-tl,0),tl=0)}ya.S.h(tl,si),je=Math.max(je,Dt),nt=Math.max(nt,ot+(Mn===0?0:Ee)+Xs.height),vi=Dt}else 0<ge&&0<sn&&si+ye+Xs.height>ge&&(si<z&&Lf(a,oe,0,z-si,hr,Do-1),Mn++,sn=0,hr=Do,ot=je,si=0,vi=135<b?-je-Ee:je+Ee),O0(this,ya,vi,0),tl=0,sn===0?(ut=ya.Yo,vt=ya.kp,Dt=Xs.width,Wn=Xs.height,(ut===null||vt===null||b!==jh(ya))&&(ut=Nu(this,2),vt=Nu(this,2),ut[0].h(0,0),ut[1].h(Dt,0),vt[0].h(0,Wn),vt[1].h(Dt,Wn))):(Ul=Yi(),Wn=dx(this,a,ya,ut,vt,Dt,Wn,Ul),tl=Wn.x,ut=Ul[0],vt=Ul[1],Dt=Wn.width,Wn=Wn.height,Wi(Ul),si<Xs.height&&0>tl&&(Jf(a,0,-tl,hr,Do-1),_0(ut,0,-tl),_0(vt,0,-tl),tl=0)),ya.S.h(vi,tl),nt=Math.max(nt,Wn),je=Math.max(je,ot+(Mn===0?0:Ee)+Xs.width),si=Wn;sn++}switch(0<Mn&&(y?(nt+=Math.max(0,x),vi<je&&Lf(a,oe,je-vi,0,hr,re-1),0<Ne&&(le||Jf(a,Ne,0,0,re-1),je+=Ne)):(je+=Math.max(0,x),si<nt&&Lf(a,oe,0,nt-si,hr,re-1),0<Ne&&(le||Jf(a,0,Ne,0,re-1),nt+=Ne))),Ne=le=0,oe){case Hg:y?le+=je/2-a.focus.x-xe/2:Ne+=nt/2-a.focus.y-xe/2;break;case $f:0<Mn?y?le+=je/2-a.focus.x-xe/2:Ne+=nt/2-a.focus.y-xe/2:y?(Ji=ee[0].S.x+ee[0].la.x,le+=Ji+(ee[re-1].S.x+ee[re-1].la.x+2*ee[re-1].focus.x-Ji)/2-a.focus.x-xe/2):(Ji=ee[0].S.y+ee[0].la.y,Ne+=Ji+(ee[re-1].S.y+ee[re-1].la.y+2*ee[re-1].focus.y-Ji)/2-a.focus.y-xe/2);break;case Ic:y?(le-=xe,je+=xe):(Ne-=xe,nt+=xe);break;case Rc:y?(le+=je-a.width+xe,je+=xe):(Ne+=nt-a.height+xe,nt+=xe);break;case Ed:y?1<re?le+=Ji+ye/2-a.focus.x:le+=ee[0].focus.x-a.focus.x+ee[0].la.x:1<re?Ne+=Ji+ye/2-a.focus.y:Ne+=ee[0].focus.y-a.focus.y+ee[0].la.y;break;case Cd:y?le+=je+ye/2-a.focus.x:Ne+=nt+ye/2-a.focus.y;break;case $c:break;default:nt=this.customAlignment(a,le,Ne,je,nt),le=nt[0],Ne=nt[1],je=nt[2],nt=nt[3]}for(xe=0;xe<re;xe++)Ji=ee[xe],y?Ji.S.h(Ji.S.x+Ji.la.x-le,Ji.S.y+(135<b?(he?-nt:-Ji.Da.height)+Ji.la.y-x:Ye+x+Ji.la.y)):Ji.S.h(Ji.S.x+(135<b?(he?-je:-Ji.Da.width)+Ji.la.x-x:E+x+Ji.la.x),Ji.S.y+Ji.la.y-Ne);if(re=ee=0,he?y?(je=ky(a,je,le),0>le&&(le=0),135<b&&(Ne+=nt+x),nt+=Ye+x,oe===$c&&(ee+=ye/2+a.focus.x),re+=Ye+x):(135<b&&(le+=je+x),je+=E+x,nt=Ny(a,nt,Ne),0>Ne&&(Ne=0),oe===$c&&(re+=ye/2+a.focus.y),ee+=E+x):y?(a.comments===null?E>je&&(je=Ay(oe,E-je,0),ee=je.x,re=je.y,je=E,le=0):je=ky(a,je,le),0>le&&(ee-=le,le=0),135<b&&(Ne+=nt+x),nt=Math.max(Math.max(nt,Ye),nt+Ye+x),re+=Ye+x):(135<b&&(le+=je+x),je=Math.max(Math.max(je,E),je+E+x),a.comments===null?Ye>nt&&(nt=Ay(oe,0,Ye-nt),ee=nt.x,re=nt.y,nt=Ye,Ne=0):nt=Ny(a,nt,Ne),0>Ne&&(re-=Ne,Ne=0),ee+=E+x),0<Mn)b=Nu(this,4),Mn=Nu(this,4),y?(b[2].h(0,Ye+x),b[3].h(b[2].x,nt),Mn[2].h(je,b[2].y),Mn[3].h(Mn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(je,b[2].y),Mn[2].h(b[2].x,nt),Mn[3].h(b[3].x,Mn[2].y));else{for(b=Nu(this,ut.length+2),Mn=Nu(this,vt.length+2),oe=0;oe<ut.length;oe++)he=ut[oe],b[oe+2].h(he.x+ee,he.y+re);for(oe=0;oe<vt.length;oe++)he=vt[oe],Mn[oe+2].h(he.x+ee,he.y+re)}y?(b[0].h(le,0),b[1].h(b[0].x,Ye),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])),Mn[0].h(le+E,0),Mn[1].h(Mn[0].x,Ye),Mn[2].y<Mn[1].y&&(Mn[2].x<Mn[0].x?Mn[2].assign(Mn[1]):Mn[1].assign(Mn[2])),Mn[3].y<Mn[2].y&&(Mn[3].x<Mn[0].x?Mn[3].assign(Mn[2]):Mn[2].assign(Mn[3])),b[2].y-=x/2,Mn[2].y-=x/2):(b[0].h(0,Ne),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])),Mn[0].h(0,Ne+Ye),Mn[1].h(E,Mn[0].y),Mn[2].x<Mn[1].x&&(Mn[2].y<Mn[0].y?Mn[2].assign(Mn[1]):Mn[1].assign(Mn[2])),Mn[3].x<Mn[2].x&&(Mn[3].y<Mn[0].y?Mn[3].assign(Mn[2]):Mn[2].assign(Mn[3])),b[2].x-=x/2,Mn[2].x-=x/2),tc(this,ut),tc(this,vt),a.Yo=b,a.kp=Mn,a.la.h(le,Ne),a.Da.h(je,nt)}break;default:Rt("Unhandled compaction value "+a.compaction.toString())}}};function ux(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Qd(x));var b=Fy(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=jh(y),x=E===90||E===270;var z=0;b=y.children;for(var ee=b.length,re=0;re<ee;re++){var oe=b[re];z=Math.max(z,x?oe.Da.width:oe.Da.height)}var le=y.alignment,he=le===Ic,ge=le===Rc;re=Qd(le);var ye=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var xe=y.nodeSpacing,Ee=a.computeNodeIndent(y),Ne=he||ge?0:Ee/2,Ye=y.rowSpacing,je=0;(he||ge||y.hm||y.im&&y.maxGenerationCount===1)&&(je=Math.max(0,y.rowIndent)),he=y.width;var nt=y.height,ot=0,ut=0,vt=0,Dt=0,Wn=0,vi=0,si=0,Mn=0,sn=0,hr=0;if(re&&!Up(le)&&135<E&&b.reverse(),Up(le))if(1<ee)for(var Ji=0;Ji<ee;Ji++){var Do=b[Ji],ya=Do.Da;Ji%2===0&&Ji!==ee-1?sn=Math.max(sn,(x?ya.width:ya.height)+a.computeBusNodeSpacing(Do)-xe):Ji%2!==0&&(hr=Math.max(hr,(x?ya.width:ya.height)+a.computeBusNodeSpacing(Do)-xe))}else ee===1&&(sn=x?b[0].Da.width:b[0].Da.height);if(re)switch(le){case Ed:case jc:ut=135>E?hx(a,y,b,sn,ot,ut):cx(a,y,b,sn,ot,ut),sn=ut.x,ot=ut.width,ut=ut.height;break;case Cd:for(ye=0;ye<ee;ye++)Ne=b[ye],vt=Ne.Da,hr=si===0?0:Ye,x?(Ne.S.h(z-vt.width,Wn+hr),ot=Math.max(ot,vt.width),ut=Math.max(ut,Wn+hr+vt.height),Wn+=hr+vt.height):(Ne.S.h(Dt+hr,z-vt.height),ot=Math.max(ot,Dt+hr+vt.width),ut=Math.max(ut,vt.height),Dt+=hr+vt.width),si++;break;case $c:for(z=0;z<ee;z++)ye=b[z],Ne=ye.Da,vt=si===0?0:Ye,x?(ye.S.h(xe/2+y.focus.x,Wn+vt),ot=Math.max(ot,Ne.width),ut=Math.max(ut,Wn+vt+Ne.height),Wn+=vt+Ne.height):(ye.S.h(Dt+vt,xe/2+y.focus.y),ot=Math.max(ot,Dt+vt+Ne.width),ut=Math.max(ut,Ne.height),Dt+=vt+Ne.width),si++}else for(hr=0;hr<ee;hr++)Ji=b[hr],Do=Ji.Da,x?(0<ye&&0<si&&Dt+xe+Do.width>ye&&(Dt<z&&Lf(y,le,z-Dt,0,Mn,hr-1),vi++,si=0,Mn=hr,vt=ut,Dt=0,Wn=135<E?-ut-Ye:ut+Ye),ya=si===0?Ne:xe,O0(a,Ji,0,Wn),Ji.S.h(Dt+ya,Wn),ot=Math.max(ot,Dt+ya+Do.width),ut=Math.max(ut,vt+(vi===0?0:Ye)+Do.height),Dt+=ya+Do.width):(0<ye&&0<si&&Wn+xe+Do.height>ye&&(Wn<z&&Lf(y,le,0,z-Wn,Mn,hr-1),vi++,si=0,Mn=hr,vt=ot,Wn=0,Dt=135<E?-ot-Ye:ot+Ye),ya=si===0?Ne:xe,O0(a,Ji,Dt,0),Ji.S.h(Dt,Wn+ya),ut=Math.max(ut,Wn+ya+Do.height),ot=Math.max(ot,vt+(vi===0?0:Ye)+Do.width),Wn+=ya+Do.height),si++;switch(0<vi&&(x?(ut+=Math.max(0,oe),Dt<ot&&Lf(y,le,ot-Dt,0,Mn,ee-1),0<je&&(ge||Jf(y,je,0,0,ee-1),ot+=je)):(ot+=Math.max(0,oe),Wn<ut&&Lf(y,le,0,ut-Wn,Mn,ee-1),0<je&&(ge||Jf(y,0,je,0,ee-1),ut+=je))),je=ge=0,le){case Hg:x?ge+=ot/2-y.focus.x-Ee/2:je+=ut/2-y.focus.y-Ee/2;break;case $f:0<vi?x?ge+=ot/2-y.focus.x-Ee/2:je+=ut/2-y.focus.y-Ee/2:x?(a=b[0].S.x+b[0].la.x,ge+=a+(b[ee-1].S.x+b[ee-1].la.x+2*b[ee-1].focus.x-a)/2-y.focus.x-Ee/2):(a=b[0].S.y+b[0].la.y,je+=a+(b[ee-1].S.y+b[ee-1].la.y+2*b[ee-1].focus.y-a)/2-y.focus.y-Ee/2);break;case Ic:x?(ge-=Ee,ot+=Ee):(je-=Ee,ut+=Ee);break;case Rc:x?(ge+=ot-y.width+Ee,ot+=Ee):(je+=ut-y.height+Ee,ut+=Ee);break;case Ed:case jc:x?1<ee?ge+=sn+xe/2-y.focus.x:ge+=b[0].focus.x-y.focus.x+b[0].la.x:1<ee?je+=sn+xe/2-y.focus.y:je+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Cd:x?ge+=ot+xe/2-y.focus.x:je+=ut+xe/2-y.focus.y;break;case $c:break;default:a=a.customAlignment(y,ge,je,ot,ut),ge=a[0],je=a[1],ot=a[2],ut=a[3]}for(a=0;a<ee;a++)Ee=b[a],x?Ee.S.h(Ee.S.x+Ee.la.x-ge,Ee.S.y+(135<E?(re?-ut:-Ee.Da.height)+Ee.la.y-oe:nt+oe+Ee.la.y)):Ee.S.h(Ee.S.x+(135<E?(re?-ot:-Ee.Da.width)+Ee.la.x-oe:he+oe+Ee.la.x),Ee.S.y+Ee.la.y-je);x?(ot=ky(y,ot,ge),0>ge&&(ge=0),135<E&&(je+=ut+oe),ut=Math.max(Math.max(ut,nt),ut+nt+oe)):(135<E&&(ge+=ot+oe),ot=Math.max(Math.max(ot,he),ot+he+oe),ut=Ny(y,ut,je),0>je&&(je=0)),y.la.h(ge,je),y.Da.h(ot,ut)}}$r.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function hx(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new Xt(E,0,b,z);if(ee===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Xt(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=jh(y)===90,he=0,ge=0,ye=0,xe=0;xe<ee;xe++)if(!(xe%2!==0||1<ee&&xe===ee-1)){var Ee=x[xe],Ne=Ee.Da,Ye=he===0?0:oe;if(le){var je=a.computeBusNodeSpacing(Ee)-re;Ee.S.h(E-(Ne.width+je),ye+Ye),b=Math.max(b,Ne.width+je),z=Math.max(z,ye+Ye+Ne.height),ye+=Ye+Ne.height}else je=a.computeBusNodeSpacing(Ee)-re,Ee.S.h(ge+Ye,E-(Ne.height+je)),z=Math.max(z,Ne.height+je),b=Math.max(b,ge+Ye+Ne.width),ge+=Ye+Ne.width;he++}for(he=0,Ee=ge,xe=ye,le?(ge=E+re,ye=0):(ge=0,ye=E+re),Ne=0;Ne<ee;Ne++)if(Ne%2!==0){Ye=x[Ne],je=Ye.Da;var nt=he===0?0:oe;if(le){var ot=a.computeBusNodeSpacing(Ye)-re;Ye.S.h(ge+ot,ye+nt),b=Math.max(b,ge+je.width+ot),z=Math.max(z,ye+nt+je.height),ye+=nt+je.height}else ot=a.computeBusNodeSpacing(Ye)-re,Ye.S.h(ge+nt,ye+ot),b=Math.max(b,ge+nt+je.width),z=Math.max(z,ye+je.height+ot),ge+=nt+je.width;he++}return 1<ee&&ee%2===1&&(x=x[ee-1],ee=x.Da,a=a.computeBusLastRowSpacing(x,le?Math.max(Math.abs(xe),Math.abs(ye)):Math.max(Math.abs(Ee),Math.abs(ge))),le?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),le=E+re/2-x.focus.x-x.la.x,b=Math.max(b,le+ee.width),0>le&&(b-=le),z=Math.max(z,Math.max(xe,ye)+a+ee.height),0>x.S.x&&(E=D0(y,x.S.x,!1,E,re))):(x.S.h(b+a,E+re/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Ee,ge)+a+ee.width),ye=E+re/2-x.focus.y-x.la.y,z=Math.max(z,ye+ee.height),0>ye&&(z-=ye),0>x.S.y&&(E=D0(y,x.S.y,!0,E,re)))),new Xt(E,0,b,z)}function cx(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new Xt(E,0,b,z);if(ee===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Xt(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,le=jh(y)===270,he=0,ge=0,ye=0,xe=0;xe<ee;xe++)if(!(xe%2!==0||1<ee&&xe===ee-1)){var Ee=x[xe],Ne=Ee.Da,Ye=he===0?0:oe;if(le){var je=a.computeBusNodeSpacing(Ee)-re;ye-=Ye+Ne.height,Ee.S.h(E-(Ne.width+je),ye),b=Math.max(b,Ne.width+je),z=Math.max(z,Math.abs(ye))}else je=a.computeBusNodeSpacing(Ee)-re,ge-=Ye+Ne.width,Ee.S.h(ge,E-(Ne.height+je)),z=Math.max(z,Ne.height+je),b=Math.max(b,Math.abs(ge));he++}for(he=0,Ee=ge,xe=ye,le?(ge=E+re,ye=0):(ge=0,ye=E+re),Ne=0;Ne<ee;Ne++)if(Ne%2!==0){Ye=x[Ne],je=Ye.Da;var nt=he===0?0:oe;if(le){var ot=a.computeBusNodeSpacing(Ye)-re;ye-=nt+je.height,Ye.S.h(ge+ot,ye),b=Math.max(b,ge+je.width+ot),z=Math.max(z,Math.abs(ye))}else ot=a.computeBusNodeSpacing(Ye)-re,ge-=nt+je.width,Ye.S.h(ge,ye+ot),z=Math.max(z,ye+je.height+ot),b=Math.max(b,Math.abs(ge));he++}for(1<ee&&ee%2===1&&(oe=x[ee-1],he=oe.Da,a=a.computeBusLastRowSpacing(oe,le?Math.max(Math.abs(xe),Math.abs(ye)):Math.max(Math.abs(Ee),Math.abs(ge))),le?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-he.height-a),ge=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,ge+he.width),0>ge&&(b-=ge),z=Math.max(z,Math.abs(Math.min(xe,ye))+a+he.height),0>oe.S.x&&(E=D0(y,oe.S.x,!1,E,re))):(oe.S.h(-b-he.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Ee,ge))+a+he.width),ye=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,ye+he.height),0>ye&&(z-=ye),0>oe.S.y&&(E=D0(y,oe.S.y,!0,E,re)))),y=0;y<ee;y++)re=x[y],le?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new Xt(E,0,b,z)}$r.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},$r.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function D0(a,y,x,E,b){a=a.children;for(var z=a.length,ee=0;ee<z;ee++)x?a[ee].S.h(a[ee].S.x,a[ee].S.y-y):a[ee].S.h(a[ee].S.x-y,a[ee].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 ky(a,y,x){switch(a.alignment){case $f:case Hg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Ic:return a.width>y?a.width:y;case Rc:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Ed:case jc:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Cd:return a.width-a.focus.x+a.nodeSpacing/2+y;case $c:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Ny(a,y,x){switch(a.alignment){case $f:case Hg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Ic:return a.height>y?a.height:y;case Rc:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Ed:case jc:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Cd:return a.height-a.focus.y+a.nodeSpacing/2+y;case $c:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Ay(a,y,x){switch(a){case Hg:y/=2,x/=2;break;case $f:y/=2,x/=2;break;case Ic:x=y=0;break;case Rc:break;default:Rt("Unhandled alignment value "+a.toString())}return new $e(y,x)}function Lf(a,y,x,E,b,z){y=Ay(y,x,E),Jf(a,y.x,y.y,b,z)}function Jf(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 O0(a,y,x,E){var b=y.parent;switch(a.ud){case _c:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Qf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Rt("Unhandled path value "+a.ud.toString())}}function _0(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function dx(a,y,x,E,b,z,ee,re){var oe=jh(y),le=oe===90||oe===270,he=y.nodeSpacing;y=E;var ge=b;E=z;var ye=ee,xe=x.Yo,Ee=x.kp;ee=x.Da;var Ne=le?Math.max(ye,ee.height):Math.max(E,ee.width);if((xe===null||oe!==jh(x))&&(xe=Nu(a,2),Ee=Nu(a,2),le?(xe[0].h(0,0),xe[1].h(0,ee.height),Ee[0].h(ee.width,0),Ee[1].h(Ee[0].x,xe[1].y)):(xe[0].h(0,0),xe[1].h(ee.width,0),Ee[0].h(0,ee.height),Ee[1].h(xe[1].x,Ee[0].y))),le){if(ye=9999999,!(ge===null||2>ge.length||xe===null||2>xe.length))for(b=x=0;x<ge.length&&b<xe.length;){z=ge[x];var Ye=xe[b];oe=Ye.x,le=Ye.y,oe+=E;var je=z;x+1<ge.length&&(je=ge[x+1]);var nt=Ye;Ye=nt.x,nt=nt.y,b+1<xe.length&&(nt=xe[b+1],Ye=nt.x,nt=nt.y,Ye+=E);var ot=ye;z.y===le?ot=oe-z.x:z.y>le&&z.y<nt?ot=oe+(z.y-le)/(nt-le)*(Ye-oe)-z.x:le>z.y&&le<je.y&&(ot=oe-(z.x+(le-z.y)/(je.y-z.y)*(je.x-z.x))),ot<ye&&(ye=ot),je.y<=z.y?x++:nt<=le?b++:(je.y<=nt&&x++,nt<=je.y&&b++)}if(ye=E-ye,ye+=he,x=xe,b=ye,y===null||2>y.length||x===null||2>x.length)E=null;else{for(he=Nu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)le=x[z++],he[E++].h(le.x+b,le.y);for(;oe<y.length;)le=y[oe++],he[E++].h(le.x,le.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)le=x[z++],he[E++].h(le.x+b,le.y);for(x=Nu(a,E),oe=0;oe<E;oe++)x[oe].assign(he[oe]);tc(a,he),E=x}if(z=Ee,oe=ye,ge===null||2>ge.length||z===null||2>z.length)b=null;else{for(he=Nu(a,ge.length+z.length),b=le=x=0;x<ge.length&&ge[x].y<z[0].y;)je=ge[x++],he[b++].h(je.x,je.y);for(;le<z.length;)je=z[le++],he[b++].h(je.x+oe,je.y);for(z=z[z.length-1].y;x<ge.length&&ge[x].y<=z;)x++;for(;x<ge.length&&ge[x].y>z;)oe=ge[x++],he[b++].h(oe.x,oe.y);for(z=Nu(a,b),x=0;x<b;x++)z[x].assign(he[x]);tc(a,he),b=z}return z=Math.max(0,ye)+ee.width,ee=Ne,tc(a,y),tc(a,xe),tc(a,ge),tc(a,Ee),re[0]=E,re[1]=b,new Xt(ye,0,z,ee)}if(E=9999999,!(ge===null||2>ge.length||xe===null||2>xe.length))for(b=x=0;x<ge.length&&b<xe.length;)z=ge[x],Ye=xe[b],oe=Ye.x,le=Ye.y,le+=ye,je=z,x+1<ge.length&&(je=ge[x+1]),nt=Ye,Ye=nt.x,nt=nt.y,b+1<xe.length&&(nt=xe[b+1],Ye=nt.x,nt=nt.y,nt+=ye),ot=E,z.x===oe?ot=le-z.y:z.x>oe&&z.x<Ye?ot=le+(z.x-oe)/(Ye-oe)*(nt-le)-z.y:oe>z.x&&oe<je.x&&(ot=le-(z.y+(oe-z.x)/(je.x-z.x)*(je.y-z.y))),ot<E&&(E=ot),je.x<=z.x?x++:Ye<=oe?b++:(je.x<=Ye&&x++,Ye<=je.x&&b++);if(ye-=E,ye+=he,x=xe,b=ye,y===null||2>y.length||x===null||2>x.length)E=null;else{for(he=Nu(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)le=x[z++],he[E++].h(le.x,le.y+b);for(;oe<y.length;)le=y[oe++],he[E++].h(le.x,le.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)le=x[z++],he[E++].h(le.x,le.y+b);for(x=Nu(a,E),oe=0;oe<E;oe++)x[oe].assign(he[oe]);tc(a,he),E=x}if(z=Ee,oe=ye,ge===null||2>ge.length||z===null||2>z.length)b=null;else{for(he=Nu(a,ge.length+z.length),b=le=x=0;x<ge.length&&ge[x].x<z[0].x;)je=ge[x++],he[b++].h(je.x,je.y);for(;le<z.length;)je=z[le++],he[b++].h(je.x,je.y+oe);for(z=z[z.length-1].x;x<ge.length&&ge[x].x<=z;)x++;for(;x<ge.length&&ge[x].x>z;)oe=ge[x++],he[b++].h(oe.x,oe.y);for(z=Nu(a,b),x=0;x<b;x++)z[x].assign(he[x]);tc(a,he),b=z}return z=Ne,ee=Math.max(0,ye)+ee.height,tc(a,y),tc(a,xe),tc(a,ge),tc(a,Ee),re[0]=E,re[1]=b,new Xt(ye,0,z,ee)}function Nu(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 $e;return a}function tc(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}$r.prototype.arrangeTrees=function(){if(this.Rb===G0)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Ch){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),By(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Ch&&a.push(x);switch(this.sorting){case Gg:break;case Yp:a.reverse();break;case Xp:a.sort(this.comparer);break;case Jp:a.sort(this.comparer),a.reverse();break;default:Rt("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(By(this,b,y+b.la.x,x+b.la.y),this.Rb){case z0:x+=b.Da.height+this.$d.height;break;case _y:y+=b.Da.width+this.$d.width;break;default:Rt("Unhandled arrangement value "+this.Rb.toString())}}}};function By(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 ee=y[z];By(a,ee,x+ee.S.x,E+ee.S.y)}}}$r.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},$r.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},$r.prototype.Gu=function(){if(this.layerStyle===H0){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 $e(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new $e(-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 ee=0;ee<a.length;ee++)z+=a[ee]+y[ee];for(ee=0;ee<a.length;ee++){var re=a[ee]+y[ee];this.angle===270?(z-=re,b.push(new Xt(0,z,x,re))):this.angle===90?(b.push(new Xt(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new Xt(z,0,re,x))):(b.push(new Xt(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},$r.prototype.commitLayers=function(){},$r.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},$r.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Ch&&fx(this,y)}};function fx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)fx(a,y[E])}}$r.prototype.setPortSpots=function(a){var y=a.alignment;if(Qd(y)){var x=this.ud===_c,E=jh(a);switch(E){case 0:var b=_s;break;case 90:b=Qs;break;case 180:b=hl;break;default:b=Fl}var z=a.children,ee=z.length;switch(y){case Ed:case jc:for(y=0;y<ee;y++){var re=z[y];if(re=(x?re.sourceEdges:re.destinationEdges).first(),re!==null&&(re=re.link,re!==null)){var oe=E===90||E===270?hl:Fl;if(ee===1||y===ee-1&&ee%2===1)switch(E){case 0:oe=hl;break;case 90:oe=Fl;break;case 180:oe=_s;break;default:oe=Qs}else y%2===0&&(oe=E===90||E===270?_s:Qs);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case Cd:for(E=E===90||E===270?_s:Qs,z=x?a.destinationEdges:a.sourceEdges;z.next();)ee=z.value.link,ee!==null&&(x?(a.setsPortSpot&&(ee.fromSpot=b),a.setsChildPortSpot&&(ee.toSpot=E)):(a.setsPortSpot&&(ee.fromSpot=E),a.setsChildPortSpot&&(ee.toSpot=b)));break;case $c:for(E=E===90||E===270?hl:Fl,z=x?a.destinationEdges:a.sourceEdges;z.next();)ee=z.value.link,ee!==null&&(x?(a.setsPortSpot&&(ee.fromSpot=b),a.setsChildPortSpot&&(ee.toSpot=E)):(a.setsPortSpot&&(ee.fromSpot=E),a.setsChildPortSpot&&(ee.toSpot=b)))}}else if(x=jh(a),this.ud===_c){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=_s;break;case 90:E.fromSpot=Qs;break;case 180:E.fromSpot=hl;break;default:E.fromSpot=Fl}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=hl;break;case 90:E.toSpot=Fl;break;case 180:E.toSpot=_s;break;default:E.toSpot=Qs}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=_s;break;case 90:E.toSpot=Qs;break;case 180:E.toSpot=hl;break;default:E.toSpot=Fl}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=hl;break;case 90:E.fromSpot=Fl;break;case 180:E.fromSpot=_s;break;default:E.fromSpot=Qs}else E.fromSpot=a.childPortSpot}};function jh(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}$r.prototype.computeLayerSpacing=function(a){var y=jh(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},$r.prototype.computeNodeIndent=function(a){var y=jh(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)},Jt.Object.defineProperties($r.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!==j0&&a!==Dy&&a!==Ty&&a!==Oy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Iy&&a!==Ry&&a!==H0||(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!==z0&&a!==_y&&a!==G0||(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!==Gg&&a!==Yp&&a!==Xp&&!Jp||(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()):Rt("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!==R0&&a!==Qp||(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!==Gg&&a!==Yp&&a!==Xp&&!Jp||(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!==R0&&a!==Qp||(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 I0=new Wt($r,"PathDefault",-1),_c=new Wt($r,"PathDestination",0),Qf=new Wt($r,"PathSource",1),Gg=new Wt($r,"SortingForwards",10),Yp=new Wt($r,"SortingReverse",11),Xp=new Wt($r,"SortingAscending",12),Jp=new Wt($r,"SortingDescending",13),Hg=new Wt($r,"AlignmentCenterSubtrees",20),$f=new Wt($r,"AlignmentCenterChildren",21),Ic=new Wt($r,"AlignmentStart",22),Rc=new Wt($r,"AlignmentEnd",23),Ed=new Wt($r,"AlignmentBus",24),jc=new Wt($r,"AlignmentBusBranching",25),Cd=new Wt($r,"AlignmentTopLeftBus",26),$c=new Wt($r,"AlignmentBottomRightBus",27),R0=new Wt($r,"CompactionNone",30),Qp=new Wt($r,"CompactionBlock",31),j0=new Wt($r,"StyleLayered",40),Ty=new Wt($r,"StyleLastParents",41),Dy=new Wt($r,"StyleAlternating",42),Oy=new Wt($r,"StyleRootOnly",43),z0=new Wt($r,"ArrangementVertical",50),_y=new Wt($r,"ArrangementHorizontal",51),G0=new Wt($r,"ArrangementFixedRoots",52),Iy=new Wt($r,"LayerIndividual",60),Ry=new Wt($r,"LayerSiblings",61),H0=new Wt($r,"LayerUniform",62);$r.className="TreeLayout",$r.PathDefault=I0,$r.PathDestination=_c,$r.PathSource=Qf,$r.SortingForwards=Gg,$r.SortingReverse=Yp,$r.SortingAscending=Xp,$r.SortingDescending=Jp,$r.AlignmentCenterSubtrees=Hg,$r.AlignmentCenterChildren=$f,$r.AlignmentStart=Ic,$r.AlignmentEnd=Rc,$r.AlignmentBus=Ed,$r.AlignmentBusBranching=jc,$r.AlignmentTopLeftBus=Cd,$r.AlignmentBottomRightBus=$c,$r.CompactionNone=R0,$r.CompactionBlock=Qp,$r.StyleLayered=j0,$r.StyleLastParents=Ty,$r.StyleAlternating=Dy,$r.StyleRootOnly=Oy,$r.ArrangementVertical=z0,$r.ArrangementHorizontal=_y,$r.ArrangementFixedRoots=G0,$r.LayerIndividual=Iy,$r.LayerSiblings=Ry,$r.LayerUniform=H0;function qf(a){xa.call(this,a)}Ct(qf,xa),qf.prototype.createVertex=function(){return new Ch(this)},qf.prototype.createEdge=function(){return new Zg(this)},qf.className="TreeNetwork";function Ch(a){Rs.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 $e(0,0),this.Da=new un(0,0),this.la=new $e(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Gg,this.hd=ry,this.Kb=0,this.Jb=$f,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Qp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Fs,this.wr=!0,this.Dp=Fs}Ct(Ch,Rs),Ch.prototype.copyInheritedPropertiesFrom=function(a){a!==null&&(this.nd=a.sorting,this.hd=a.comparer,this.Kb=a.angle,this.Jb=a.alignment,this.Uq=a.nodeIndent,this.Vq=a.nodeIndentPastParent,this.Wq=a.nodeSpacing,this.ie=a.layerSpacing,this.Aq=a.layerSpacingParentOverlap,this.Hp=a.compaction,this.Ap=a.breadthLimit,this.nr=a.rowSpacing,this.mr=a.rowIndent,this.Gp=a.commentSpacing,this.Fp=a.commentMargin,this.xr=a.setsPortSpot,this.dr=a.portSpot,this.wr=a.setsChildPortSpot,this.Dp=a.childPortSpot)},Jt.Object.defineProperties(Ch.prototype,{initialized:{get:function(){return this.V},set:function(a){this.V!==a&&(this.V=a)}},parent:{get:function(){return this.hb},set:function(a){this.hb!==a&&(this.hb=a)}},children:{get:function(){return this.u},set:function(a){if(this.u!==a){if(a!==null)for(var y=a.length,x=0;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)}}}),Ch.className="TreeVertex";function Zg(a){Zu.call(this,a),this.$t=new $e(0,0)}Ct(Zg,Zu),Zg.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 _c:x=this.fromVertex,E=this.toVertex;break;case Qf:x=this.toVertex,E=this.fromVertex;break;default:Rt("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=jh(x),ee=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===rh,le=a.isOrthogonal,he;if(a.uh(),le||oe){for(he=2;4<a.pointsCount;)a.pv(2);var ge=a.i(1),ye=a.i(2)}else{for(he=1;3<a.pointsCount;)a.pv(1);ge=a.i(0),ye=a.i(a.pointsCount-1)}var xe=a.i(a.pointsCount-1);z===0?(x.alignment===Rc?(z=E.bottom+b.y,b.y===0&&ge.y>xe.y+x.rowIndent&&(z=Math.min(z,Math.max(ge.y,z-y.computeNodeIndent(x))))):x.alignment===Ic?(z=E.top+b.y,b.y===0&&ge.y<xe.y-x.rowIndent&&(z=Math.max(z,Math.min(ge.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,oe?(a.m(he,ge.x,z),he++,a.m(he,E.right+ee,z),he++,a.m(he,E.right+ee+(b.x-re)/3,z),he++,a.m(he,E.right+ee+2*(b.x-re)/3,z),he++,a.m(he,E.right+ee+(b.x-re),z),he++,a.m(he,ye.x,z)):(le&&(a.m(he,E.right+ee/2,ge.y),he++),a.m(he,E.right+ee/2,z),he++,a.m(he,E.right+ee+b.x-(le?re/2:re),z),he++,le&&a.m(he,a.i(he-1).x,ye.y))):z===90?(x.alignment===Rc?(z=E.right+b.x,b.x===0&&ge.x>xe.x+x.rowIndent&&(z=Math.min(z,Math.max(ge.x,z-y.computeNodeIndent(x))))):x.alignment===Ic?(z=E.left+b.x,b.x===0&&ge.x<xe.x-x.rowIndent&&(z=Math.max(z,Math.min(ge.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,oe?(a.m(he,z,ge.y),he++,a.m(he,z,E.bottom+ee),he++,a.m(he,z,E.bottom+ee+(b.y-re)/3),he++,a.m(he,z,E.bottom+ee+2*(b.y-re)/3),he++,a.m(he,z,E.bottom+ee+(b.y-re)),he++,a.m(he,z,ye.y)):(le&&(a.m(he,ge.x,E.bottom+ee/2),he++),a.m(he,z,E.bottom+ee/2),he++,a.m(he,z,E.bottom+ee+b.y-(le?re/2:re)),he++,le&&a.m(he,ye.x,a.i(he-1).y))):z===180?(x.alignment===Rc?(z=E.bottom+b.y,b.y===0&&ge.y>xe.y+x.rowIndent&&(z=Math.min(z,Math.max(ge.y,z-y.computeNodeIndent(x))))):x.alignment===Ic?(z=E.top+b.y,b.y===0&&ge.y<xe.y-x.rowIndent&&(z=Math.max(z,Math.min(ge.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,oe?(a.m(he,ge.x,z),he++,a.m(he,E.left-ee,z),he++,a.m(he,E.left-ee+(b.x+re)/3,z),he++,a.m(he,E.left-ee+2*(b.x+re)/3,z),he++,a.m(he,E.left-ee+(b.x+re),z),he++,a.m(he,ye.x,z)):(le&&(a.m(he,E.left-ee/2,ge.y),he++),a.m(he,E.left-ee/2,z),he++,a.m(he,E.left-ee+b.x+(le?re/2:re),z),he++,le&&a.m(he,a.i(he-1).x,ye.y))):z===270?(x.alignment===Rc?(z=E.right+b.x,b.x===0&&ge.x>xe.x+x.rowIndent&&(z=Math.min(z,Math.max(ge.x,z-y.computeNodeIndent(x))))):x.alignment===Ic?(z=E.left+b.x,b.x===0&&ge.x<xe.x-x.rowIndent&&(z=Math.max(z,Math.min(ge.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,oe?(a.m(he,z,ge.y),he++,a.m(he,z,E.top-ee),he++,a.m(he,z,E.top-ee+(b.y+re)/3),he++,a.m(he,z,E.top-ee+2*(b.y+re)/3),he++,a.m(he,z,E.top-ee+(b.y+re)),he++,a.m(he,z,ye.y)):(le&&(a.m(he,ge.x,E.top-ee/2),he++),a.m(he,z,E.top-ee/2),he++,a.m(he,z,E.top-ee+b.y+(le?re/2:re)),he++,le&&a.m(he,ye.x,a.i(he-1).y))):Rt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=jh(x),y!==jh(b)&&(ee=E.computeLayerSpacing(x),re=x.bounds,x=b.bounds,y===0&&x.left-re.right<ee+1||y===90&&x.top-re.bottom<ee+1||y===180&&re.left-x.right<ee+1||y===270&&re.top-x.bottom<ee+1||(a.vg(),x=a.curve===rh,b=a.isOrthogonal,E=Qd(this.fromVertex.alignment),a.uh(),y===0?(y=re.right+ee/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=re.bottom+ee/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=re.left-ee/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=re.top-ee/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()))}}},Jt.Object.defineProperties(Zg.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)}}}),Zg.className="TreeEdge",Xr.prototype.initializeStandardTools=function(){this.gb("Action",new gn,this.mouseDownTools),this.gb("Relinking",new io,this.mouseDownTools),this.gb("LinkReshaping",new Hn,this.mouseDownTools),this.gb("Rotating",new jt,this.mouseDownTools),this.gb("Resizing",new at,this.mouseDownTools),this.gb("Linking",new pr,this.mouseMoveTools),this.gb("Dragging",new gr,this.mouseMoveTools),this.gb("DragSelecting",new Qn,this.mouseMoveTools),this.gb("Panning",new Gn,this.mouseMoveTools),this.gb("ContextMenu",new _i,this.mouseUpTools),this.gb("TextEditing",new bi,this.mouseUpTools),this.gb("ClickCreating",new Vn,this.mouseUpTools),this.gb("ClickSelecting",new qt,this.mouseUpTools)},Sc("Horizontal",new vm),Sc("Spot",new Sm),Sc("Table",new wm),Sc("Viewbox",new Cm),Sc("TableRow",new Pm),Sc("TableColumn",new Em),Sc("Graduated",new fp),Sc("Grid",new dp),dg.add("GraphLinksModel",el),dg.add("TreeModel",gh);var Z0=It.go,jy={get licenseKey(){return kt.licenseKey},set licenseKey(a){kt.licenseKey=a},get version(){return kt.version},Group:cr,EnumValue:Wt,List:bn,Set:Sn,Map:ki,Point:$e,Size:un,Rect:Xt,Margin:Sr,Spot:Di,Geometry:wt,PathFigure:qr,PathSegment:Ki,InputEvent:Vi,DiagramEvent:Hr,ChangedEvent:xi,Model:Ei,GraphLinksModel:po,TreeModel:au,Binding:Cs,Transaction:Pa,UndoManager:qi,CommandHandler:Ue,Tool:kr,DraggingTool:gr,DraggingInfo:Kc,DraggingOptions:ae,LinkingBaseTool:ii,LinkingTool:pr,RelinkingTool:io,LinkReshapingTool:Hn,ResizingTool:at,RotatingTool:jt,ClickSelectingTool:qt,ActionTool:gn,ClickCreatingTool:Vn,HTMLInfo:gi,ContextMenuTool:_i,DragSelectingTool:Qn,PanningTool:Gn,TextEditingTool:bi,ToolManager:Xr,Animation:Za,AnimationManager:pa,AnimationTrigger:ms,Layer:to,Diagram:kt,Palette:de,Overview:me,Brush:Qo,GraphObject:xt,Panel:Pn,RowColumnDefinition:Ts,Shape:Lr,TextBlock:Sa,Picture:mu,Part:Ti,Adornment:Lo,Node:Jn,Link:Fn,Placeholder:nu,Layout:za,LayoutNetwork:xa,LayoutVertex:Rs,LayoutEdge:Zu,GridLayout:gl,PanelLayout:Is,CircularLayout:Qa,CircularNetwork:Rg,CircularVertex:Gp,CircularEdge:E0,ForceDirectedLayout:bl,ForceDirectedNetwork:Xf,ForceDirectedVertex:Hp,ForceDirectedEdge:Zp,LayeredDigraphLayout:ta,LayeredDigraphNetwork:zg,LayeredDigraphVertex:mh,LayeredDigraphEdge:Kp,TreeLayout:$r,TreeNetwork:qf,TreeVertex:Ch,TreeEdge:Zg};typeof Z0=="object"&&Z0.version&&Wr("WARNING: a `go` object on the root object is already defined. "+("Debug"in Z0?"debug ":"")+"version: "+Z0.version+", replaced with version: "+jy.version),kt.prototype.go=jy,It.go=jy,typeof Cn.exports=="object"&&(Cn.exports=typeof Me.g!="undefined"?Me.g.go:self.go)}();var fe=typeof Me.g!="undefined"?Me.g.go:self.go;const Ke=typeof Me.g!="undefined"?Me.g.go:self.go,St=Ke.Group,zt=Ke.EnumValue,ft=Ke.List,Be=Ke.Set,He=Ke.Map,gt=Ke.Point,it=Ke.Size,st=Ke.Rect,Ft=Ke.Margin,Nt=Ke.Spot,Bt=Ke.Geometry,Ae=Ke.PathFigure,ne=Ke.PathSegment,te=Ke.InputEvent,ue=Ke.DiagramEvent,se=Ke.ChangedEvent,pe=Ke.Model,ve=Ke.GraphLinksModel,Se=Ke.TreeModel,Pe=Ke.Binding,Oe=Ke.Transaction,Re=Ke.UndoManager,tt=Ke.CommandHandler,rt=Ke.Tool,Je=Ke.DraggingTool,bt=Ke.DraggingInfo,lt=Ke.LinkingBaseTool,Lt=Ke.LinkingTool,Mt=Ke.RelinkingTool,pt=Ke.LinkReshapingTool,dn=Ke.ResizingTool,tn=Ke.RotatingTool,vn=Ke.ClickSelectingTool,Tn=Ke.ActionTool,Ve=Ke.ClickCreatingTool,Ze=Ke.HTMLInfo,Qe=Ke.ContextMenuTool,mn=Ke.DragSelectingTool,kn=Ke.PanningTool,At=Ke.TextEditingTool,pn=Ke.ToolManager,ln=Ke.Animation,jn=Ke.AnimationManager,Gt=Ke.AnimationTrigger,mt=Ke.Layer,Et=Ke.Diagram,on=Ke.Palette,Yt=Ke.Overview,ze=Ke.Brush,be=Ke.GraphObject,Ce=Ke.Panel,De=Ke.RowColumnDefinition,Ge=Ke.Shape,Fe=Ke.TextBlock,qe=Ke.TextBlockMetrics,rn=Ke.Picture,Kn=Ke.Part,Zn=Ke.Adornment,$t=Ke.Node,Nn=Ke.Link,Zt=Ke.Placeholder,qn=Ke.Layout,$n=Ke.LayoutNetwork,oi=Ke.LayoutVertex,ri=Ke.LayoutEdge,fr=Ke.GridLayout,wr=Ke.PanelLayout,Li=Ke.CircularLayout,Ai=Ke.CircularNetwork,Ur=Ke.CircularVertex,Yn=Ke.CircularEdge,Rn=Ke.ForceDirectedLayout,sr=Ke.ForceDirectedNetwork,xr=Ke.ForceDirectedVertex,Ni=Ke.ForceDirectedEdge,lr=Ke.LayeredDigraphLayout,mo=Ke.LayeredDigraphNetwork,pi=Ke.LayeredDigraphVertex,ti=Ke.LayeredDigraphEdge,hi=Ke.TreeLayout,Ii=Ke.TreeNetwork,ir=Ke.TreeVertex,zi=Ke.TreeEdge,an=Ke.version},19575:function(Cn,On,Me){var fe,Ke;(function(St,zt){Cn.exports=zt(St)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Me.g!="undefined"?Me.g:this,function(St){"use strict";St=St||{};var zt=St.Base64,ft="2.6.4",Be="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",He=function(Mt){for(var pt={},dn=0,tn=Mt.length;dn<tn;dn++)pt[Mt.charAt(dn)]=dn;return pt}(Be),gt=String.fromCharCode,it=function(Mt){if(Mt.length<2){var pt=Mt.charCodeAt(0);return pt<128?Mt:pt<2048?gt(192|pt>>>6)+gt(128|pt&63):gt(224|pt>>>12&15)+gt(128|pt>>>6&63)+gt(128|pt&63)}else{var pt=65536+(Mt.charCodeAt(0)-55296)*1024+(Mt.charCodeAt(1)-56320);return gt(240|pt>>>18&7)+gt(128|pt>>>12&63)+gt(128|pt>>>6&63)+gt(128|pt&63)}},st=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Ft=function(Mt){return Mt.replace(st,it)},Nt=function(Mt){var pt=[0,2,1][Mt.length%3],dn=Mt.charCodeAt(0)<<16|(Mt.length>1?Mt.charCodeAt(1):0)<<8|(Mt.length>2?Mt.charCodeAt(2):0),tn=[Be.charAt(dn>>>18),Be.charAt(dn>>>12&63),pt>=2?"=":Be.charAt(dn>>>6&63),pt>=1?"=":Be.charAt(dn&63)];return tn.join("")},Bt=St.btoa&&typeof St.btoa=="function"?function(Mt){return St.btoa(Mt)}:function(Mt){if(Mt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Mt.replace(/[\s\S]{1,3}/g,Nt)},Ae=function(Mt){return Bt(Ft(String(Mt)))},ne=function(Mt){return Mt.replace(/[+\/]/g,function(pt){return pt=="+"?"-":"_"}).replace(/=/g,"")},te=function(Mt,pt){return pt?ne(Ae(Mt)):Ae(Mt)},ue=function(Mt){return te(Mt,!0)},se;St.Uint8Array&&(se=function(Mt,pt){for(var dn="",tn=0,vn=Mt.length;tn<vn;tn+=3){var Tn=Mt[tn],Ve=Mt[tn+1],Ze=Mt[tn+2],Qe=Tn<<16|Ve<<8|Ze;dn+=Be.charAt(Qe>>>18)+Be.charAt(Qe>>>12&63)+(typeof Ve!="undefined"?Be.charAt(Qe>>>6&63):"=")+(typeof Ze!="undefined"?Be.charAt(Qe&63):"=")}return pt?ne(dn):dn});var pe=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ve=function(Mt){switch(Mt.length){case 4:var pt=(7&Mt.charCodeAt(0))<<18|(63&Mt.charCodeAt(1))<<12|(63&Mt.charCodeAt(2))<<6|63&Mt.charCodeAt(3),dn=pt-65536;return gt((dn>>>10)+55296)+gt((dn&1023)+56320);case 3:return gt((15&Mt.charCodeAt(0))<<12|(63&Mt.charCodeAt(1))<<6|63&Mt.charCodeAt(2));default:return gt((31&Mt.charCodeAt(0))<<6|63&Mt.charCodeAt(1))}},Se=function(Mt){return Mt.replace(pe,ve)},Pe=function(Mt){var pt=Mt.length,dn=pt%4,tn=(pt>0?He[Mt.charAt(0)]<<18:0)|(pt>1?He[Mt.charAt(1)]<<12:0)|(pt>2?He[Mt.charAt(2)]<<6:0)|(pt>3?He[Mt.charAt(3)]:0),vn=[gt(tn>>>16),gt(tn>>>8&255),gt(tn&255)];return vn.length-=[0,0,2,1][dn],vn.join("")},Oe=St.atob&&typeof St.atob=="function"?function(Mt){return St.atob(Mt)}:function(Mt){return Mt.replace(/\S{1,4}/g,Pe)},Re=function(Mt){return Oe(String(Mt).replace(/[^A-Za-z0-9\+\/]/g,""))},tt=function(Mt){return Se(Oe(Mt))},rt=function(Mt){return String(Mt).replace(/[-_]/g,function(pt){return pt=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Je=function(Mt){return tt(rt(Mt))},bt;St.Uint8Array&&(bt=function(Mt){return Uint8Array.from(Re(rt(Mt)),function(pt){return pt.charCodeAt(0)})});var lt=function(){var Mt=St.Base64;return St.Base64=zt,Mt};if(St.Base64={VERSION:ft,atob:Re,btoa:Bt,fromBase64:Je,toBase64:te,utob:Ft,encode:te,encodeURI:ue,btou:Se,decode:Je,noConflict:lt,fromUint8Array:se,toUint8Array:bt},typeof Object.defineProperty=="function"){var Lt=function(Mt){return{value:Mt,enumerable:!1,writable:!0,configurable:!0}};St.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Lt(function(){return Je(this)})),Object.defineProperty(String.prototype,"toBase64",Lt(function(Mt){return te(this,Mt)})),Object.defineProperty(String.prototype,"toBase64URI",Lt(function(){return te(this,!0)}))}}return St.Meteor&&(Base64=St.Base64),Cn.exports?Cn.exports.Base64=St.Base64:(fe=[],Ke=function(){return St.Base64}.apply(On,fe),Ke!==void 0&&(Cn.exports=Ke)),{Base64:St.Base64}})},15979:function(Cn,On,Me){"use strict";Me.d(On,{hP:function(){return Yt}});var fe=function(ze,be){return(fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ce,De){Ce.__proto__=De}||function(Ce,De){for(var Ge in De)Object.prototype.hasOwnProperty.call(De,Ge)&&(Ce[Ge]=De[Ge])})(ze,be)};function Ke(ze,be){function Ce(){this.constructor=ze}fe(ze,be),ze.prototype=be===null?Object.create(be):(Ce.prototype=be.prototype,new Ce)}function St(ze,be,Ce,De){return new(Ce||(Ce=Promise))(function(Ge,Fe){function qe(Zn){try{Kn(De.next(Zn))}catch($t){Fe($t)}}function rn(Zn){try{Kn(De.throw(Zn))}catch($t){Fe($t)}}function Kn(Zn){var $t;Zn.done?Ge(Zn.value):($t=Zn.value,$t instanceof Ce?$t:new Ce(function(Nn){Nn($t)})).then(qe,rn)}Kn((De=De.apply(ze,be||[])).next())})}function zt(ze,be){var Ce,De,Ge,Fe,qe={label:0,sent:function(){if(1&Ge[0])throw Ge[1];return Ge[1]},trys:[],ops:[]};return Fe={next:rn(0),throw:rn(1),return:rn(2)},typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function rn(Kn){return function(Zn){return function($t){if(Ce)throw new TypeError("Generator is already executing.");for(;qe;)try{if(Ce=1,De&&(Ge=2&$t[0]?De.return:$t[0]?De.throw||((Ge=De.return)&&Ge.call(De),0):De.next)&&!(Ge=Ge.call(De,$t[1])).done)return Ge;switch(De=0,Ge&&($t=[2&$t[0],Ge.value]),$t[0]){case 0:case 1:Ge=$t;break;case 4:return qe.label++,{value:$t[1],done:!1};case 5:qe.label++,De=$t[1],$t=[0];continue;case 7:$t=qe.ops.pop(),qe.trys.pop();continue;default:if(Ge=qe.trys,!((Ge=Ge.length>0&&Ge[Ge.length-1])||$t[0]!==6&&$t[0]!==2)){qe=0;continue}if($t[0]===3&&(!Ge||$t[1]>Ge[0]&&$t[1]<Ge[3])){qe.label=$t[1];break}if($t[0]===6&&qe.label<Ge[1]){qe.label=Ge[1],Ge=$t;break}if(Ge&&qe.label<Ge[2]){qe.label=Ge[2],qe.ops.push($t);break}Ge[2]&&qe.ops.pop(),qe.trys.pop();continue}$t=be.call(ze,qe)}catch(Nn){$t=[6,Nn],De=0}finally{Ce=Ge=0}if(5&$t[0])throw $t[1];return{value:$t[0]?$t[1]:void 0,done:!0}}([Kn,Zn])}}}function ft(){for(var ze=0,be=0,Ce=arguments.length;be<Ce;be++)ze+=arguments[be].length;var De=Array(ze),Ge=0;for(be=0;be<Ce;be++)for(var Fe=arguments[be],qe=0,rn=Fe.length;qe<rn;qe++,Ge++)De[Ge]=Fe[qe];return De}var Be=function(){function ze(){}return ze.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},ze.setAttributes=function(be,Ce){for(var De=0,Ge=Ce;De<Ge.length;De++){var Fe=Ge[De],qe=Fe[0],rn=Fe[1];be.setAttribute(qe,rn)}},ze.createRect=function(be,Ce,De){var Ge=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ge.setAttribute("width",be.toString()),Ge.setAttribute("height",Ce.toString()),De&&ze.setAttributes(Ge,De),Ge},ze.createLine=function(be,Ce,De,Ge,Fe){var qe=document.createElementNS("http://www.w3.org/2000/svg","line");return qe.setAttribute("x1",be.toString()),qe.setAttribute("y1",Ce.toString()),qe.setAttribute("x2",De.toString()),qe.setAttribute("y2",Ge.toString()),Fe&&ze.setAttributes(qe,Fe),qe},ze.createPolygon=function(be,Ce){var De=document.createElementNS("http://www.w3.org/2000/svg","polygon");return De.setAttribute("points",be),Ce&&ze.setAttributes(De,Ce),De},ze.createCircle=function(be,Ce){var De=document.createElementNS("http://www.w3.org/2000/svg","circle");return De.setAttribute("cx",(be/2).toString()),De.setAttribute("cy",(be/2).toString()),De.setAttribute("r",be.toString()),Ce&&ze.setAttributes(De,Ce),De},ze.createEllipse=function(be,Ce,De){var Ge=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ge.setAttribute("cx",(be/2).toString()),Ge.setAttribute("cy",(Ce/2).toString()),Ge.setAttribute("rx",(be/2).toString()),Ge.setAttribute("ry",(Ce/2).toString()),De&&ze.setAttributes(Ge,De),Ge},ze.createGroup=function(be){var Ce=document.createElementNS("http://www.w3.org/2000/svg","g");return be&&ze.setAttributes(Ce,be),Ce},ze.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},ze.createMarker=function(be,Ce,De,Ge,Fe,qe,rn){var Kn=document.createElementNS("http://www.w3.org/2000/svg","marker");return ze.setAttributes(Kn,[["id",be],["orient",Ce],["markerWidth",De.toString()],["markerHeight",Ge.toString()],["refX",Fe.toString()],["refY",qe.toString()]]),Kn.appendChild(rn),Kn},ze.createText=function(be){var Ce=document.createElementNS("http://www.w3.org/2000/svg","text");return Ce.setAttribute("x","0"),Ce.setAttribute("y","0"),be&&ze.setAttributes(Ce,be),Ce},ze.createTSpan=function(be,Ce){var De=document.createElementNS("http://www.w3.org/2000/svg","tspan");return De.textContent=be,Ce&&ze.setAttributes(De,Ce),De},ze.createImage=function(be){var Ce=document.createElementNS("http://www.w3.org/2000/svg","image");return be&&ze.setAttributes(Ce,be),Ce},ze.createPoint=function(be,Ce){var De=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return De.x=be,De.y=Ce,De},ze.createPath=function(be,Ce){var De=document.createElementNS("http://www.w3.org/2000/svg","path");return De.setAttribute("d",be),Ce&&ze.setAttributes(De,Ce),De},ze}(),He=function(){function ze(){}return ze.addKey=function(be){ze.key=be},Object.defineProperty(ze,"isLicensed",{get:function(){return!!ze.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(ze.key)},enumerable:!1,configurable:!0}),ze}(),gt=function(){function ze(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return ze.prototype.rasterize=function(be,Ce,De){var Ge=this;return new Promise(function(Fe){var qe=De!==void 0?De:document.createElement("canvas");be===null&&(Ge.markersOnly=!0,Ge.naturalSize=!1);var rn=document.createElementNS("http://www.w3.org/2000/svg","svg");rn.setAttribute("xmlns","http://www.w3.org/2000/svg"),rn.setAttribute("width",Ce.width.baseVal.valueAsString),rn.setAttribute("height",Ce.height.baseVal.valueAsString),rn.setAttribute("viewBox","0 0 "+Ce.viewBox.baseVal.width.toString()+" "+Ce.viewBox.baseVal.height.toString()),rn.innerHTML=Ce.innerHTML,Ge.naturalSize===!0?(rn.width.baseVal.value=be.naturalWidth,rn.height.baseVal.value=be.naturalHeight):Ge.width!==void 0&&Ge.height!==void 0&&(rn.width.baseVal.value=Ge.width,rn.height.baseVal.value=Ge.height),qe.width=rn.width.baseVal.value,qe.height=rn.height.baseVal.value;var Kn=rn.outerHTML,Zn=qe.getContext("2d");Ge.markersOnly!==!0&&Zn.drawImage(be,0,0,qe.width,qe.height);var $t=window.URL,Nn=new Image(qe.width,qe.height);Nn.setAttribute("crossOrigin","anonymous");var Zt=new Blob([Kn],{type:"image/svg+xml"}),qn=$t.createObjectURL(Zt);Nn.onload=function(){Zn.drawImage(Nn,0,0),$t.revokeObjectURL(qn);var $n=qe.toDataURL(Ge.imageType,Ge.imageQuality);Fe($n)},Nn.src=qn})},ze}(),it=function(){},st=function(){function ze(be){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+be+"_"}return Object.defineProperty(ze.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(ze.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(ze.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),ze.prototype.addClass=function(be){return this.styleSheet===void 0&&this.addStyleSheet(),be.name=""+this.classNamePrefix+be.localName,this.classes.push(be),this.styleSheet.sheet.insertRule("."+be.name+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length),be},ze.prototype.addRule=function(be){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(be),this.styleSheet.sheet.insertRule(be.selector+" {"+be.style+"}",this.styleSheet.sheet.cssRules.length)},ze.prototype.addStyleSheet=function(){var be;this.styleSheet=document.createElement("style"),((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).appendChild(this.styleSheet),this.addRule(new Ft("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
`)),this.addRule(new Ft("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
from {
|
|
opacity: 1;
|
|
}
|
|
to {
|
|
opacity: 0;
|
|
}
|
|
`)),this.addClass(new Nt("fade_in",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
`)),this.addClass(new Nt("fade_out",`
|
|
animation-duration: 0.3s;
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
`))},ze.prototype.removeStyleSheet=function(){var be;this.styleSheet&&(((be=this.styleSheetRoot)!==null&&be!==void 0?be:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},ze}(),Ft=function(ze,be){this.selector=ze,this.style=be},Nt=function(ze,be){this.localName=ze,this.style=be},Bt=function(){function ze(be,Ce,De,Ge,Fe){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=be,this.displayMode=Ce,this.markerItems=De,this.uiStyleSettings=Ge,this.styles=Fe,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return ze.prototype.show=function(be){var Ce=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var De=document.createElement("div");De.className=this.toolbarBlockStyleClass.name,De.style.whiteSpace="nowrap",this.uiContainer.appendChild(De),this.addActionButton(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(De,'<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(Fe){var qe=document.createElement("div");qe.className=""+Ce.toolbarButtonStyleClass.name,qe.setAttribute("data-type-name",Fe.typeName),qe.innerHTML=Fe.icon,qe.addEventListener("click",function(){Ce.markerToolbarButtonClicked(qe,Fe)}),Ce.buttons.push(qe),Ce.markerButtons.push(qe)}),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 Ge=document.createElement("div");Ge.className=this.toolbarBlockStyleClass.name,Ge.style.whiteSpace="nowrap",Ge.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ge),this.addActionButton(Ge,'<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(Ge,'<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()},ze.prototype.addButtonClickListener=function(be){this.buttonClickListeners.push(be)},ze.prototype.removeButtonClickListener=function(be){this.buttonClickListeners.indexOf(be)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(be),1)},ze.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},ze.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var be=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Ce=0;Ce<this.markerButtons.length;Ce++)Ce<be||Ce===be&&this.markerButtons.length-1===be?this.markerButtonBlock.appendChild(this.markerButtons[Ce]):(Ce===be&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Ce]))}},ze.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")},ze.prototype.resetButtonStyles=function(){var be=this;this.buttons.forEach(function(Ce){Ce.className=Ce.className.replace(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name,"").trim(),Ce.className=Ce.className.replace(be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?be.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:be.toolbarActiveButtonStyleColorsClass.name,"").trim(),Ce.className+=" "+(be.uiStyleSettings.toolbarButtonStyleColorsClassName?be.uiStyleSettings.toolbarButtonStyleColorsClassName:be.toolbarButtonStyleColorsClass.name)})},ze.prototype.addActionButton=function(be,Ce,De){var Ge=this,Fe=document.createElement("div");switch(Fe.className=""+this.toolbarButtonStyleClass.name,Fe.innerHTML=Ce,Fe.setAttribute("data-action",De),Fe.addEventListener("click",function(){Ge.actionToolbarButtonClicked(Fe,De)}),De){case"select":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Fe.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Fe.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Fe.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Fe.style.fill=this.uiStyleSettings.closeButtonColor}be.appendChild(Fe),this.buttons.push(Fe)},ze.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Nt("toolbar-block",`
|
|
display: inline-block;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Nt("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 Nt("toolbar-overflow-block_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`));var be=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Nt("toolbar_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*be)+`px;
|
|
padding: `+be+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Nt("toolbar_button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Nt("toolbar_active_button",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`)),this.styles.addRule(new Ft("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`))},ze.prototype.markerToolbarButtonClicked=function(be,Ce){this.setActiveButton(be),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(De){return De("marker",Ce)}),this.markerButtonOverflowBlock.style.display="none"},ze.prototype.actionToolbarButtonClicked=function(be,Ce){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(De){return De("action",Ce)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},ze.prototype.setActiveButton=function(be){this.resetButtonStyles(),be.className=be.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),be.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},ze.prototype.setActiveMarkerButton=function(be){var Ce=this.markerButtons.find(function(De){return De.getAttribute("data-type-name")===be});Ce&&this.setActiveButton(Ce)},ze.prototype.setCurrentMarker=function(be){var Ce=this;this.currentMarker=be,this.buttons.filter(function(De){return/delete|notes/.test(De.getAttribute("data-action"))}).forEach(function(De){Ce.currentMarker===void 0?(De.style.fillOpacity="0.4",De.style.pointerEvents="none"):(De.style.fillOpacity="1",De.style.pointerEvents="all")})},ze}(),Ae=function(){function ze(be,Ce,De,Ge){this.panels=[],this.panelButtons=[],this.markerjsContainer=be,this.displayMode=Ce,this.uiStyleSettings=De,this.styles=Ge,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return ze.prototype.addStyles=function(){var be;this.toolboxStyleClass=this.styles.addClass(new Nt("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 Nt("toolbox_colors",`
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
`));var Ce=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Nt("toolbox-button-row",`
|
|
display: flex;
|
|
cursor: default;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Nt("toolbox-button-row_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Nt("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 Nt("toolbox-panel-row_colors",`
|
|
background-color: `+((be=this.uiStyleSettings.toolboxBackgroundColor)!==null&&be!==void 0?be:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Nt("toolbox_button",`
|
|
display: inline-block;
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ce)+`px;
|
|
padding: `+Ce+`px;
|
|
box-sizing: content-box;
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Nt("toolbox-button_colors",`
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Nt("toolbox-active-button_colors",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
`)),this.styles.addRule(new Ft("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
`))},ze.prototype.show=function(be){var Ce;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=be,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Ce=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Ce!==void 0?Ce:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},ze.prototype.setPanelButtons=function(be){var Ce,De,Ge=this;this.panels=be,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Ce=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Ce!==void 0?Ce:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((De=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&De!==void 0?De:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Fe){var qe;Fe.uiStyleSettings=Ge.uiStyleSettings;var rn=document.createElement("div");rn.className=Ge.toolboxButtonStyleClass.name+" "+((qe=Ge.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&qe!==void 0?qe:Ge.toolboxButtonStyleColorsClass.name),rn.innerHTML=Fe.icon,rn.title=Fe.title,rn.addEventListener("click",function(){Ge.panelButtonClick(Fe)}),Ge.panelButtons.push(rn),Ge.buttonRow.appendChild(rn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},ze.prototype.panelButtonClick=function(be){var Ce=this,De=-1;if(be!==this.activePanel){De=this.panels.indexOf(be),this.panelRow.innerHTML="";var Ge=be.getUi();Ge.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ge),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=be}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Ce.displayMode==="inline"?Ce.panelRow.style.display="none":Ce.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Fe,qe){var rn,Kn;Fe.className=Ce.toolboxButtonStyleClass.name+" "+(qe===De?""+((rn=Ce.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&rn!==void 0?rn:Ce.toolboxActiveButtonStyleColorsClass.name):""+((Kn=Ce.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Kn!==void 0?Kn:Ce.toolboxButtonStyleColorsClass.name))})},ze}(),ne=function(ze,be){this.title=ze,this.icon=be},te=function(ze){function be(Ce,De,Ge,Fe){var qe=ze.call(this,Ce,Fe||'<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 qe.colors=[],qe.addTransparent=!1,qe.colorBoxes=[],qe.colors=De,qe.currentColor=Ge,qe.setCurrentColor=qe.setCurrentColor.bind(qe),qe.getColorBox=qe.getColorBox.bind(qe),qe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");return De.style.overflow="hidden",De.style.whiteSpace="nowrap",this.colors.forEach(function(Ge){var Fe=Ce.getColorBox(Ge);De.appendChild(Fe),Ce.colorBoxes.push(Fe)}),De},be.prototype.getColorBox=function(Ce){var De=this,Ge=this.uiStyleSettings.toolbarHeight/4,Fe=this.uiStyleSettings.toolbarHeight-Ge,qe=document.createElement("div");qe.style.display="inline-block",qe.style.boxSizing="content-box",qe.style.width=Fe-2+"px",qe.style.height=Fe-2+"px",qe.style.padding="1px",qe.style.marginRight="2px",qe.style.marginBottom="2px",qe.style.borderWidth="2px",qe.style.borderStyle="solid",qe.style.borderRadius=(Fe+2)/2+"px",qe.style.borderColor=Ce===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",qe.addEventListener("click",function(){De.setCurrentColor(Ce,qe)});var rn=document.createElement("div");return rn.style.display="inline-block",rn.style.width=Fe-2+"px",rn.style.height=Fe-2+"px",rn.style.backgroundColor=Ce,rn.style.borderRadius=Fe/2+"px",Ce==="transparent"&&(rn.style.fill=this.uiStyleSettings.toolboxAccentColor,rn.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>`),qe.appendChild(rn),qe},be.prototype.setCurrentColor=function(Ce,De){var Ge=this;this.currentColor=Ce,this.colorBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Ce)},be}(ne),ue=function(){function ze(be,Ce,De){this._state="new",this._isSelected=!1,this._container=be,this._overlayContainer=Ce,this.globalSettings=De,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(ze.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),ze.prototype.ownsTarget=function(be){return!1},Object.defineProperty(ze.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),ze.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},ze.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},ze.prototype.pointerDown=function(be,Ce){},ze.prototype.dblClick=function(be,Ce){},ze.prototype.manipulate=function(be){},ze.prototype.pointerUp=function(be){this.stateChanged()},ze.prototype.dispose=function(){},ze.prototype.addMarkerVisualToContainer=function(be){this.container.childNodes.length>0?this.container.insertBefore(be,this.container.childNodes[0]):this.container.appendChild(be)},ze.prototype.getState=function(){return{typeName:ze.typeName,state:this.state,notes:this.notes}},ze.prototype.restoreState=function(be){this._state=be.state,this.notes=be.notes},ze.prototype.scale=function(be,Ce){},ze.prototype.colorChanged=function(be){this.onColorChanged&&this.onColorChanged(be),this.stateChanged()},ze.prototype.fillColorChanged=function(be){this.onFillColorChanged&&this.onFillColorChanged(be),this.stateChanged()},ze.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var be=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),be.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(be)&&this.onStateChanged(this)}},ze.typeName="MarkerBase",ze}(),se=function(){function ze(){this.findGripByVisual=this.findGripByVisual.bind(this)}return ze.prototype.findGripByVisual=function(be){return this.topLeft.ownsTarget(be)?this.topLeft:this.topCenter.ownsTarget(be)?this.topCenter:this.topRight.ownsTarget(be)?this.topRight:this.centerLeft.ownsTarget(be)?this.centerLeft:this.centerRight.ownsTarget(be)?this.centerRight:this.bottomLeft.ownsTarget(be)?this.bottomLeft:this.bottomCenter.ownsTarget(be)?this.bottomCenter:this.bottomRight.ownsTarget(be)?this.bottomRight:void 0},ze}(),pe=function(){function ze(){this.GRIP_SIZE=10,this.visual=Be.createGroup(),this.visual.appendChild(Be.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Be.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return ze.prototype.ownsTarget=function(be){return be===this.visual||be===this.visual.childNodes[0]||be===this.visual.childNodes[1]},ze}(),ve=function(){function ze(){}return ze.toITransformMatrix=function(be){return{a:be.a,b:be.b,c:be.c,d:be.d,e:be.e,f:be.f}},ze.toSVGMatrix=function(be,Ce){return be.a=Ce.a,be.b=Ce.b,be.c=Ce.c,be.d=Ce.d,be.e=Ce.e,be.f=Ce.f,be},ze}(),Se=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.left=0,Fe.top=0,Fe.width=0,Fe.height=0,Fe.defaultSize={x:50,y:20},Fe.offsetX=0,Fe.offsetY=0,Fe.rotationAngle=0,Fe.CB_DISTANCE=10,Fe._suppressMarkerCreateEvent=!1,Fe.container.transform.baseVal.appendItem(Be.createTransform()),Fe.setupControlBox(),Fe}return Ke(be,ze),Object.defineProperty(be.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(be.prototype,"visual",{get:function(){return this._visual},set:function(Ce){this._visual=Ce;var De=Be.createTransform();this._visual.transform.baseVal.appendItem(De)},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ce){return!!ze.prototype.ownsTarget.call(this,Ce)||!!(this.controlGrips.findGripByVisual(Ce)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Ce))},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="new"&&(this.left=Ce.x,this.top=Ce.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ge=this.unrotatePoint(Ce);if(this.manipulationStartX=Ge.x,this.manipulationStartY=Ge.y,this.offsetX=Ge.x-this.left,this.offsetY=Ge.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(De),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(De)){this.activeGrip=this.rotatorGrip;var Fe=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Fe.x-this.width/2,this.top=Fe.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var qe=this.container.transform.baseVal.getItem(0);qe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(qe,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},be.prototype.pointerUp=function(Ce){var De=this.state;ze.prototype.pointerUp.call(this,Ce),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Ce),this._state="select",De==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},be.prototype.moveVisual=function(Ce){this.visual.style.transform="translate("+Ce.x+"px, "+Ce.y+"px)"},be.prototype.manipulate=function(Ce){var De=this.unrotatePoint(Ce);this.state==="creating"?this.resize(Ce):this.state==="move"?(this.left=this.manipulationStartLeft+(De.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(De.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(De):this.state==="rotate"&&this.rotate(Ce)},be.prototype.resize=function(Ce){var De=this.manipulationStartLeft,Ge=this.manipulationStartWidth,Fe=this.manipulationStartTop,qe=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:De=this.manipulationStartLeft+Ce.x-this.manipulationStartX,Ge=this.manipulationStartWidth+this.manipulationStartLeft-De;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ge=this.manipulationStartWidth+Ce.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Fe=this.manipulationStartTop+Ce.y-this.manipulationStartY,qe=this.manipulationStartHeight+this.manipulationStartTop-Fe;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:qe=this.manipulationStartHeight+Ce.y-this.manipulationStartY}Ge>=0?(this.left=De,this.width=Ge):(this.left=De+Ge,this.width=-Ge),qe>=0?(this.top=Fe,this.height=qe):(this.top=Fe+qe,this.height=-qe),this.setSize()},be.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},be.prototype.rotate=function(Ce){if(Math.abs(Ce.x-this.centerX)>.1){var De=Math.sign(Ce.x-this.centerX);this.rotationAngle=180*Math.atan((Ce.y-this.centerY)/(Ce.x-this.centerX))/Math.PI+90*De,this.applyRotation()}},be.prototype.applyRotation=function(){var Ce=this.container.transform.baseVal.getItem(0);Ce.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Ce,0)},be.prototype.rotatePoint=function(Ce){if(this.rotationAngle===0)return Ce;var De=this.container.getCTM(),Ge=Be.createPoint(Ce.x,Ce.y);return{x:(Ge=Ge.matrixTransform(De)).x,y:Ge.y}},be.prototype.unrotatePoint=function(Ce){if(this.rotationAngle===0)return Ce;var De=this.container.getCTM();De=De.inverse();var Ge=Be.createPoint(Ce.x,Ce.y);return{x:(Ge=Ge.matrixTransform(De)).x,y:Ge.y}},be.prototype.select=function(){ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){ze.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Be.createGroup();var Ce=Be.createTransform();Ce.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Ce),this.container.appendChild(this.controlBox),this.controlRect=Be.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=Be.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 se,this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){var Ce=this.controlBox.transform.baseVal.getItem(0);Ce.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Ce,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()},be.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()},be.prototype.createGrip=function(){var Ce=new pe;return Ce.visual.transform.baseVal.appendItem(Be.createTransform()),this.controlBox.appendChild(Ce.visual),Ce},be.prototype.positionGrips=function(){var Ce=this.controlGrips.topLeft.GRIP_SIZE,De=-Ce/2,Ge=De,Fe=(this.width+this.CB_DISTANCE)/2-Ce/2,qe=(this.height+this.CB_DISTANCE)/2-Ce/2,rn=this.height+this.CB_DISTANCE-Ce/2,Kn=this.width+this.CB_DISTANCE-Ce/2;this.positionGrip(this.controlGrips.topLeft.visual,De,Ge),this.positionGrip(this.controlGrips.topCenter.visual,Fe,Ge),this.positionGrip(this.controlGrips.topRight.visual,Kn,Ge),this.positionGrip(this.controlGrips.centerLeft.visual,De,qe),this.positionGrip(this.controlGrips.centerRight.visual,Kn,qe),this.positionGrip(this.controlGrips.bottomLeft.visual,De,rn),this.positionGrip(this.controlGrips.bottomCenter.visual,Fe,rn),this.positionGrip(this.controlGrips.bottomRight.visual,Kn,rn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Fe,Ge-3*this.CB_DISTANCE)},be.prototype.positionGrip=function(Ce,De,Ge){var Fe=Ce.transform.baseVal.getItem(0);Fe.setTranslate(De,Ge),Ce.transform.baseVal.replaceItem(Fe,0)},be.prototype.hideControlBox=function(){this.controlBox.style.display="none"},be.prototype.showControlBox=function(){this.controlBox.style.display=""},be.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ve.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ve.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},ze.prototype.getState.call(this))},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce);var De=Ce;this.left=De.left,this.top=De.top,this.width=De.width,this.height=De.height,this.rotationAngle=De.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,De.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ve.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,De.containerTransformMatrix))},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De);var Ge=this.rotatePoint({x:this.left,y:this.top}),Fe=this.unrotatePoint({x:Ge.x*Ce,y:Ge.y*De});this.left=Fe.x,this.top=Fe.y,this.width=this.width*Ce,this.height=this.height*De,this.adjustControlBox()},be}(ue),Pe=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.opacity=1,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual)},be.prototype.createVisual=function(){this.visual=Be.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)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="new"&&(this.createVisual(),this.moveVisual(Ce),this._state="creating")},be.prototype.manipulate=function(Ce){ze.prototype.manipulate.call(this,Ce)},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),this.setSize()},be.prototype.setSize=function(){ze.prototype.setSize.call(this),Be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ce){ze.prototype.pointerUp.call(this,Ce),this.setSize()},be.prototype.setStrokeColor=function(Ce){this.strokeColor=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ce),this.stateChanged()},be.prototype.setFillColor=function(Ce){this.fillColor=Ce,this.visual&&Be.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},be.prototype.setStrokeWidth=function(Ce){this.strokeWidth=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ce){this.strokeDasharray=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ze.prototype.getState.call(this))},be.prototype.restoreState=function(Ce){var De=Ce;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.opacity=De.opacity,this.createVisual(),ze.prototype.restoreState.call(this,Ce),this.setSize()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.setSize()},be.title="Rectangle marker",be}(Se),Oe=function(ze){function be(Ce,De,Ge,Fe){var qe=ze.call(this,Ce,Fe||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return qe.widths=[],qe.widthBoxes=[],qe.widths=De,qe.currentWidth=Ge,qe.setCurrentWidth=qe.setCurrentWidth.bind(qe),qe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",this.widths.forEach(function(Ge){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.flexGrow="2",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.borderColor=Ge===Ce.currentWidth?Ce.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){Ce.setCurrentWidth(Ge,Fe)}),De.appendChild(Fe);var qe=document.createElement("div");qe.innerText=Ge.toString(),qe.style.marginRight="5px",Fe.appendChild(qe);var rn=document.createElement("div");rn.style.minHeight="20px",rn.style.flexGrow="2",rn.style.display="flex",rn.style.alignItems="center";var Kn=document.createElement("hr");Kn.style.minWidth="20px",Kn.style.border="0px",Kn.style.borderTop=Ge+"px solid "+Ce.uiStyleSettings.toolboxColor,Kn.style.flexGrow="2",rn.appendChild(Kn),Fe.appendChild(rn),Ce.widthBoxes.push(Fe)}),De},be.prototype.setCurrentWidth=function(Ce,De){var Ge=this;this.currentWidth=Ce,this.widthBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},be}(ne),Re=function(ze){function be(Ce,De,Ge,Fe){var qe=ze.call(this,Ce,Fe||'<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 qe.styles=[],qe.styleBoxes=[],qe.styles=De,qe.currentStyle=Ge,qe.setCurrentStyle=qe.setCurrentStyle.bind(qe),qe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",this.styles.forEach(function(Ge){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.overflow="hidden",Fe.style.maxWidth=100/Ce.styles.length-5+"%",Fe.style.borderColor=Ge===Ce.currentStyle?Ce.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){Ce.setCurrentStyle(Ge,Fe)}),De.appendChild(Fe);var qe=document.createElement("div");qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.overflow="hidden";var rn=`<svg width="100" height="20">
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Ce.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ge!==""?'stroke-dasharray="'+Ge+'"':"")+` />
|
|
</svg>`;qe.innerHTML=rn,Fe.appendChild(qe),Ce.styleBoxes.push(Fe)}),De},be.prototype.setCurrentStyle=function(Ce,De){var Ge=this;this.currentStyle=Ce,this.styleBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},be}(ne),tt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.strokeColor=Ge.defaultColor,Fe.strokeWidth=Ge.defaultStrokeWidth,Fe.strokeDasharray=Ge.defaultStrokeDasharray,Fe.strokePanel=new te("Line color",Ge.defaultColorSet,Ge.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Re("Line style",Ge.defaultStrokeDasharrays,Ge.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Ke(be,ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=ze.prototype.getState.call(this);return Ce.typeName=be.typeName,Ce},be.typeName="FrameMarker",be.title="Frame marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',be}(Pe),rt=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"},Je=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.x1=0,Fe.y1=0,Fe.x2=0,Fe.y2=0,Fe.defaultLength=50,Fe.manipulationStartX=0,Fe.manipulationStartY=0,Fe.manipulationStartX1=0,Fe.manipulationStartY1=0,Fe.manipulationStartX2=0,Fe.manipulationStartY2=0,Fe.setupControlBox(),Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!!ze.prototype.ownsTarget.call(this,Ce)||!(!this.grip1.ownsTarget(Ce)&&!this.grip2.ownsTarget(Ce))},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.manipulationStartX=Ce.x,this.manipulationStartY=Ce.y,this.state==="new"&&(this.x1=Ce.x,this.y1=Ce.y,this.x2=Ce.x,this.y2=Ce.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(De)?this.activeGrip=this.grip1:this.grip2.ownsTarget(De)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},be.prototype.pointerUp=function(Ce){var De=this.state;ze.prototype.pointerUp.call(this,Ce),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(Ce),this._state="select",De==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},be.prototype.adjustVisual=function(){},be.prototype.manipulate=function(Ce){this.state==="creating"?this.resize(Ce):this.state==="move"?(this.x1=this.manipulationStartX1+Ce.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Ce.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Ce.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Ce.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Ce)},be.prototype.resize=function(Ce){switch(this.activeGrip){case this.grip1:this.x1=Ce.x,this.y1=Ce.y;break;case this.grip2:case void 0:this.x2=Ce.x,this.y2=Ce.y}this.adjustVisual(),this.adjustControlBox()},be.prototype.select=function(){ze.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},be.prototype.deselect=function(){ze.prototype.deselect.call(this),this.controlBox.style.display="none"},be.prototype.setupControlBox=function(){this.controlBox=Be.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},be.prototype.adjustControlBox=function(){this.positionGrips()},be.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},be.prototype.createGrip=function(){var Ce=new pe;return Ce.visual.transform.baseVal.appendItem(Be.createTransform()),this.controlBox.appendChild(Ce.visual),Ce},be.prototype.positionGrips=function(){var Ce=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Ce/2,this.y1-Ce/2),this.positionGrip(this.grip2.visual,this.x2-Ce/2,this.y2-Ce/2)},be.prototype.positionGrip=function(Ce,De,Ge){var Fe=Ce.transform.baseVal.getItem(0);Fe.setTranslate(De,Ge),Ce.transform.baseVal.replaceItem(Fe,0)},be.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},ze.prototype.getState.call(this))},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce);var De=Ce;this.x1=De.x1,this.y1=De.y1,this.x2=De.x2,this.y2=De.y2},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.x1=this.x1*Ce,this.y1=this.y1*De,this.x2=this.x2*Ce,this.y2=this.y2*De,this.adjustVisual(),this.adjustControlBox()},be}(ue),bt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.strokeColor=Ge.defaultColor,Fe.strokeWidth=Ge.defaultStrokeWidth,Fe.strokeDasharray=Ge.defaultStrokeDasharray,Fe.strokePanel=new te("Line color",Ge.defaultColorSet,Ge.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Re("Line style",Ge.defaultStrokeDasharrays,Ge.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual&&Ce!==this.selectorLine&&Ce!==this.visibleLine)},be.prototype.createVisual=function(){this.visual=Be.createGroup(),this.selectorLine=Be.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Be.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)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},be.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()),Be.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Be.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Be.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setStrokeColor=function(Ce){this.strokeColor=Ce,this.adjustVisual(),this.colorChanged(Ce)},be.prototype.setStrokeWidth=function(Ce){this.strokeWidth=Ce,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ce){this.strokeDasharray=Ce,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce);var De=Ce;this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.createVisual(),this.adjustVisual()},be.typeName="LineMarker",be.title="Line marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',be}(Je),lt=function(ze){function be(Ce,De,Ge,Fe){var qe=ze.call(this,Ce,Fe||'<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 qe.fonts=[],qe.fontBoxes=[],qe.fonts=De,qe.currentFont=Ge,qe.setCurrentFont=qe.setCurrentFont.bind(qe),qe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");return De.style.overflow="hidden",De.style.flexGrow="2",this.fonts.forEach(function(Ge){var Fe=document.createElement("div");Fe.style.display="inline-block",Fe.style.alignItems="center",Fe.style.justifyContent="space-between",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.overflow="hidden",Fe.style.maxWidth=100/Ce.fonts.length-5+"%",Fe.style.borderColor=Ge===Ce.currentFont?Ce.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){Ce.setCurrentFont(Ge,Fe)}),De.appendChild(Fe);var qe=document.createElement("div");qe.style.display="flex",qe.style.minHeight="20px",qe.style.flexGrow="2",qe.style.fontFamily=Ge,qe.style.overflow="hidden";var rn=document.createElement("div");rn.style.whiteSpace="nowrap",rn.style.overflow="hidden",rn.style.textOverflow="ellipsis",rn.innerHTML="The quick brown fox jumps over the lazy dog",qe.appendChild(rn),Fe.appendChild(qe),Ce.fontBoxes.push(Fe)}),De},be.prototype.setCurrentFont=function(Ce,De){var Ge=this;this.currentFont=Ce,this.fontBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},be}(ne),Lt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.color="transparent",Fe.padding=5,Fe.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Fe.text=Fe.DEFAULT_TEXT,Fe.isMoved=!1,Fe.color=Ge.defaultColor,Fe.fontFamily=Ge.defaultFontFamily,Fe.defaultSize={x:100,y:30},Fe.setColor=Fe.setColor.bind(Fe),Fe.setFont=Fe.setFont.bind(Fe),Fe.renderText=Fe.renderText.bind(Fe),Fe.sizeText=Fe.sizeText.bind(Fe),Fe.textEditDivClicked=Fe.textEditDivClicked.bind(Fe),Fe.showTextEditor=Fe.showTextEditor.bind(Fe),Fe.setSize=Fe.setSize.bind(Fe),Fe.positionTextEditor=Fe.positionTextEditor.bind(Fe),Fe.colorPanel=new te("Color",Ge.defaultColorSet,Ge.defaultColor),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.fontFamilyPanel=new lt("Font",Ge.defaultFontFamilies,Ge.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){if(ze.prototype.ownsTarget.call(this,Ce)||Ce===this.visual||Ce===this.textElement||Ce===this.bgRectangle)return!0;var De=!1;return this.textElement.childNodes.forEach(function(Ge){Ge===Ce&&(De=!0)}),De},be.prototype.createVisual=function(){this.visual=Be.createGroup(),this.bgRectangle=Be.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Be.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Be.createTransform()),this.textElement.transform.baseVal.appendItem(Be.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.isMoved=!1,this.pointerDownPoint=Ce,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ce),this._state="creating")},be.prototype.renderText=function(){var Ce=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(De){Ce.textElement.appendChild(Be.createTSpan(De.trim()===""?" ":De.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},be.prototype.getTextScale=function(){var Ce=this.textElement.getBBox(),De=1;if(Ce.width>0&&Ce.height>0){var Ge=(1*this.width-this.width*this.padding*2/100)/Ce.width,Fe=(1*this.height-this.height*this.padding*2/100)/Ce.height;De=Math.min(Ge,Fe)}return De},be.prototype.getTextPosition=function(Ce){var De=this.textElement.getBBox(),Ge=0,Fe=0;return De.width>0&&De.height>0&&(Ge=(this.width-De.width*Ce)/2,Fe=this.height/2-De.height*Ce/2),{x:Ge,y:Fe}},be.prototype.sizeText=function(){var Ce=this.textElement.getBBox(),De=this.getTextScale(),Ge=this.getTextPosition(De);Ge.y-=Ce.y*De,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ge.x+"px, "+Ge.y+"px) scale("+De+", "+De+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ge.x,Ge.y),this.textElement.transform.baseVal.getItem(1).setScale(De,De))},be.prototype.manipulate=function(Ce){ze.prototype.manipulate.call(this,Ce),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ce.x-this.pointerDownPoint.x)>5||Math.abs(Ce.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),this.isMoved=!0,this.setSize(),this.sizeText()},be.prototype.setSize=function(){ze.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Be.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},be.prototype.pointerUp=function(Ce){var De=this.state;De==="creating"&&(this._suppressMarkerCreateEvent=!0),ze.prototype.pointerUp.call(this,Ce),this.setSize(),(De==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.showTextEditor=function(){var Ce=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(De){De.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var De=Number.parseFloat(Ce.textEditor.style.fontSize);Ce.textEditor.clientWidth>=Number.parseInt(Ce.textEditor.style.maxWidth)&&De>.9;)De-=.1,Ce.textEditor.style.fontSize=Math.max(De,.9)+"em"}),this.textEditor.addEventListener("keyup",function(De){De.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(De){if(De.clipboardData){var Ge=De.clipboardData.getData("text"),Fe=window.getSelection();if(!Fe.rangeCount)return!1;Fe.deleteFromDocument(),Fe.getRangeAt(0).insertNode(document.createTextNode(Ge)),De.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Ce.textEditDivClicked(Ce.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},be.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Ce=this.getTextScale(),De=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ge=this.textElement.getBBox(),Fe={x:Ge.width*Ce,y:Ge.height*Ce};De.x-=Fe.x/2,De.y-=Fe.y/2,this.textEditor.style.top=De.y+"px",this.textEditor.style.left=De.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-De.x+"px",this.textEditor.style.fontSize=Math.max(16*Ce,12)+"px",this.textElement.style.display="none"}},be.prototype.textEditDivClicked=function(Ce){this.text=Ce.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},be.prototype.select=function(){ze.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},be.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),ze.prototype.deselect.call(this)},be.prototype.dblClick=function(Ce,De){ze.prototype.dblClick.call(this,Ce,De),this.showTextEditor()},be.prototype.setColor=function(Ce){this.textElement&&Be.setAttributes(this.textElement,[["fill",Ce]]),this.color=Ce,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Ce)},be.prototype.setFont=function(Ce){this.textElement&&Be.setAttributes(this.textElement,[["font-family",Ce]]),this.fontFamily=Ce,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},be.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},be.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){var De=Ce;this.color=De.color,this.fontFamily=De.fontFamily,this.padding=De.padding,this.text=De.text,this.createVisual(),ze.prototype.restoreState.call(this,Ce),this.setSize()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.setSize(),this.sizeText(),this.positionTextEditor()},be.typeName="TextMarker",be.title="Text marker",be.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>',be}(Se),Mt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.color="transparent",Fe.lineWidth=3,Fe.drawing=!1,Fe.pixelRatio=1,Fe.color=Ge.defaultColor,Fe.lineWidth=Ge.defaultStrokeWidth,Fe.pixelRatio=Ge.freehandPixelRatio,Fe.setColor=Fe.setColor.bind(Fe),Fe.addCanvas=Fe.addCanvas.bind(Fe),Fe.finishCreation=Fe.finishCreation.bind(Fe),Fe.setLineWidth=Fe.setLineWidth.bind(Fe),Fe.colorPanel=new te("Color",Ge.defaultColorSet,Ge.defaultColor),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.lineWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.lineWidthPanel.onWidthChanged=Fe.setLineWidth,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual&&Ce!==this.drawingImage)},be.prototype.createVisual=function(){this.visual=Be.createGroup(),this.drawingImage=Be.createImage(),this.visual.appendChild(this.drawingImage);var Ce=Be.createTransform();this.visual.transform.baseVal.appendItem(Ce),this.addMarkerVisualToContainer(this.visual)},be.prototype.pointerDown=function(Ce,De){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(Ce.x,Ce.y),this.drawing=!0):ze.prototype.pointerDown.call(this,Ce,De)},be.prototype.manipulate=function(Ce){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Ce.x,Ce.y),this.canvasContext.stroke()):ze.prototype.manipulate.call(this,Ce)},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),Be.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},be.prototype.pointerUp=function(Ce){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):ze.prototype.pointerUp.call(this,Ce)},be.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)},be.prototype.select=function(){this.state==="creating"&&this.finishCreation(),ze.prototype.select.call(this)},be.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),ze.prototype.deselect.call(this)},be.prototype.finishCreation=function(){for(var Ce=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),De=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ge=De[0],Fe=De[1],qe=De[2],rn=De[3],Kn=!1,Zn=0;Zn<this.canvasElement.height;Zn++)for(var $t=0;$t<this.canvasElement.width;$t++)Ce.data[Zn*this.canvasElement.width*4+4*$t+3]>0&&(Kn=!0,Zn<Fe&&(Fe=Zn),$t<Ge&&(Ge=$t),Zn>rn&&(rn=Zn),$t>qe&&(qe=$t));if(Kn){this.left=Ge/this.pixelRatio,this.top=Fe/this.pixelRatio,this.width=(qe-Ge)/this.pixelRatio,this.height=(rn-Fe)/this.pixelRatio;var Nn=document.createElement("canvas");Nn.width=qe-Ge,Nn.height=rn-Fe,Nn.getContext("2d").putImageData(this.canvasContext.getImageData(Ge,Fe,qe-Ge,rn-Fe),0,0),this.drawingImgUrl=Nn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},be.prototype.setDrawingImage=function(){Be.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Be.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},be.prototype.setColor=function(Ce){this.color=Ce,this.colorChanged(Ce)},be.prototype.setLineWidth=function(Ce){this.lineWidth=Ce},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({drawingImgUrl:this.drawingImgUrl},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){this.createVisual(),ze.prototype.restoreState.call(this,Ce),this.drawingImgUrl=Ce.drawingImgUrl,this.setDrawingImage()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.setDrawingImage()},be.typeName="FreehandMarker",be.title="Freehand marker",be.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>',be}(Se),pt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,Ge||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Fe.typeBoxes=[],Fe.currentType=De,Fe.setCurrentType=Fe.setCurrentType.bind(Fe),Fe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2";for(var Ge=function(rn){var Kn="both";switch(rn){case 0:Kn="both";break;case 1:Kn="start";break;case 2:Kn="end";break;case 3:Kn="none"}var Zn=document.createElement("div");if(Zn.style.display="flex",Zn.style.flexGrow="2",Zn.style.alignItems="center",Zn.style.justifyContent="space-between",Zn.style.padding="5px",Zn.style.borderWidth="2px",Zn.style.borderStyle="solid",Zn.style.borderColor=Kn===Fe.currentType?Fe.uiStyleSettings.toolboxAccentColor:"transparent",Zn.addEventListener("click",function(){Ce.setCurrentType(Kn,Zn)}),De.appendChild(Zn),Kn==="both"||Kn==="start"){var $t=document.createElement("div");$t.style.display="flex",$t.style.alignItems="center",$t.style.minHeight="20px",$t.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="`+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,$t.style.marginLeft="5px",Zn.appendChild($t)}var Nn=document.createElement("div");Nn.style.display="flex",Nn.style.alignItems="center",Nn.style.minHeight="20px",Nn.style.flexGrow="2";var Zt=document.createElement("hr");if(Zt.style.minWidth="20px",Zt.style.border="0px",Zt.style.borderTop="3px solid "+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee"),Zt.style.flexGrow="2",Nn.appendChild(Zt),Zn.appendChild(Nn),Kn==="both"||Kn==="end"){var qn=document.createElement("div");qn.style.display="flex",qn.style.alignItems="center",qn.style.minHeight="20px",qn.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="`+(Fe.uiStyleSettings!==void 0?Fe.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
</svg>`,qn.style.marginRight="5px",Zn.appendChild(qn)}Fe.typeBoxes.push(Zn)},Fe=this,qe=0;qe<4;qe++)Ge(qe);return De},be.prototype.setCurrentType=function(Ce,De){var Ge=this;this.currentType=Ce,this.typeBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings!==void 0?Ge.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},be}(ne),dn=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.arrowType="end",Fe.arrowBaseHeight=10,Fe.arrowBaseWidth=10,Fe.getArrowPoints=Fe.getArrowPoints.bind(Fe),Fe.setArrowType=Fe.setArrowType.bind(Fe),Fe.arrowTypePanel=new pt("Arrow type","end"),Fe.arrowTypePanel.onArrowTypeChanged=Fe.setArrowType,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.arrow1&&Ce!==this.arrow2)},be.prototype.getArrowPoints=function(Ce,De){var Ge=this.arrowBaseWidth+2*this.strokeWidth,Fe=this.arrowBaseHeight+2*this.strokeWidth;return Ce-Ge/2+","+(De+Fe/2)+" "+Ce+","+(De-Fe/2)+" "+(Ce+Ge/2)+","+(De+Fe/2)},be.prototype.createTips=function(){this.arrow1=Be.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Be.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Be.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Be.createTransform()),this.visual.appendChild(this.arrow2)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(ze.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",Be.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Be.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Ce=0;Math.abs(this.x1-this.x2)>.1&&(Ce=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var De=this.arrow1.transform.baseVal.getItem(0);De.setRotate(Ce,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(De,0);var Ge=this.arrow2.transform.baseVal.getItem(0);Ge.setRotate(Ce+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ge,0)}},be.prototype.setArrowType=function(Ce){this.arrowType=Ce,this.adjustVisual(),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({arrowType:this.arrowType},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce);var De=Ce;this.arrowType=De.arrowType,this.createTips(),this.adjustVisual()},be.typeName="ArrowMarker",be.title="Arrow marker",be.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',be}(bt),tn=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.fillColor=Ge.defaultFillColor,Fe.strokeWidth=0,Fe.fillPanel=new te("Color",Ge.defaultColorSet,Ge.defaultFillColor),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe}return Ke(be,ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=ze.prototype.getState.call(this);return Ce.typeName=be.typeName,Ce},be.typeName="CoverMarker",be.title="Cover marker",be.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',be}(Pe),vn=function(ze){function be(Ce,De,Ge,Fe){var qe=ze.call(this,Ce,Fe||'<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 qe.opacities=[],qe.opacityBoxes=[],qe.opacities=De,qe.currentOpacity=Ge,qe.setCurrentOpacity=qe.setCurrentOpacity.bind(qe),qe}return Ke(be,ze),be.prototype.getUi=function(){var Ce=this,De=document.createElement("div");return De.style.display="flex",De.style.overflow="hidden",De.style.flexGrow="2",De.style.justifyContent="space-between",this.opacities.forEach(function(Ge){var Fe=document.createElement("div");Fe.style.display="flex",Fe.style.alignItems="center",Fe.style.justifyContent="center",Fe.style.padding="5px",Fe.style.borderWidth="2px",Fe.style.borderStyle="solid",Fe.style.borderColor=Ge===Ce.currentOpacity?Ce.uiStyleSettings.toolboxAccentColor:"transparent",Fe.addEventListener("click",function(){Ce.setCurrentOpacity(Ge,Fe)}),De.appendChild(Fe);var qe=document.createElement("div");qe.innerText=100*Ge+"%",Fe.appendChild(qe),Ce.opacityBoxes.push(Fe)}),De},be.prototype.setCurrentOpacity=function(Ce,De){var Ge=this;this.currentOpacity=Ce,this.opacityBoxes.forEach(function(Fe){Fe.style.borderColor=Fe===De?Ge.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},be}(ne),Tn=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.setOpacity=Fe.setOpacity.bind(Fe),Fe.fillColor=Ge.defaultHighlightColor,Fe.strokeWidth=0,Fe.opacity=Ge.defaultHighlightOpacity,Fe.fillPanel=new te("Color",Ge.defaultColorSet,Fe.fillColor),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.opacityPanel=new vn("Opacity",Ge.defaultOpacitySteps,Fe.opacity),Fe.opacityPanel.onOpacityChanged=Fe.setOpacity,Fe}return Ke(be,ze),be.prototype.setOpacity=function(Ce){this.opacity=Ce,this.visual&&Be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=ze.prototype.getState.call(this);return Ce.typeName=be.typeName,Ce},be.typeName="HighlightMarker",be.title="Highlight marker",be.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>',be}(tn),Ve='<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>',Ze='<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>',Qe=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.bgColor="transparent",Fe.tipPosition={x:0,y:0},Fe.tipBase1Position={x:0,y:0},Fe.tipBase2Position={x:0,y:0},Fe.tipMoving=!1,Fe.color=Ge.defaultStrokeColor,Fe.bgColor=Ge.defaultFillColor,Fe.fontFamily=Ge.defaultFontFamily,Fe.defaultSize={x:100,y:30},Fe.setBgColor=Fe.setBgColor.bind(Fe),Fe.getTipPoints=Fe.getTipPoints.bind(Fe),Fe.positionTip=Fe.positionTip.bind(Fe),Fe.setTipPoints=Fe.setTipPoints.bind(Fe),Fe.colorPanel=new te("Text color",Ge.defaultColorSet,Fe.color,Ve),Fe.colorPanel.onColorChanged=Fe.setColor,Fe.bgColorPanel=new te("Fill color",Ge.defaultColorSet,Fe.bgColor,Ze),Fe.bgColorPanel.onColorChanged=Fe.setBgColor,Fe.fontFamilyPanel=new lt("Font",Ge.defaultFontFamilies,Ge.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe.tipGrip=new pe,Fe.tipGrip.visual.transform.baseVal.appendItem(Be.createTransform()),Fe.controlBox.appendChild(Fe.tipGrip.visual),Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return ze.prototype.ownsTarget.call(this,Ce)||this.tipGrip.ownsTarget(Ce)||this.tip===Ce},be.prototype.createTip=function(){Be.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Be.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},be.prototype.pointerDown=function(Ce,De){this.state==="new"&&ze.prototype.pointerDown.call(this,Ce,De),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(De)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):ze.prototype.pointerDown.call(this,Ce,De)},be.prototype.pointerUp=function(Ce){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,ze.prototype.pointerUp.call(this,Ce);else{var De=this.state==="creating";ze.prototype.pointerUp.call(this,Ce),this.setTipPoints(De),this.positionTip()}},be.prototype.manipulate=function(Ce){if(this.tipMoving){var De=this.unrotatePoint(Ce);this.tipPosition={x:De.x-this.manipulationStartLeft,y:De.y-this.manipulationStartTop},this.positionTip()}else ze.prototype.manipulate.call(this,Ce)},be.prototype.setBgColor=function(Ce){this.bgRectangle&&this.tip&&(Be.setAttributes(this.bgRectangle,[["fill",Ce]]),Be.setAttributes(this.tip,[["fill",Ce]])),this.bgColor=Ce,this.fillColorChanged(Ce)},be.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},be.prototype.setTipPoints=function(Ce){Ce===void 0&&(Ce=!1);var De=Math.min(this.height/2,15),Ge=this.height/5;Ce&&(this.tipPosition={x:De+Ge/2,y:this.height+20});var Fe=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Fe<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ge=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:De,y:0},this.tipBase2Position={x:De+Ge,y:0}):(this.tipBase1Position={x:0,y:De},this.tipBase2Position={x:0,y:De+Ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Fe<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ge=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-De-Ge,y:0},this.tipBase2Position={x:this.width-De,y:0}):(this.tipBase1Position={x:this.width,y:De},this.tipBase2Position={x:this.width,y:De+Ge}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Fe<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ge=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-De-Ge,y:this.height},this.tipBase2Position={x:this.width-De,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-De-Ge},this.tipBase2Position={x:this.width,y:this.height-De}):Fe<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ge=this.width/5,De=Math.min(this.width/2,15),this.tipBase1Position={x:De,y:this.height},this.tipBase2Position={x:De+Ge,y:this.height}):(this.tipBase1Position={x:0,y:this.height-De},this.tipBase2Position={x:0,y:this.height-De-Ge})},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),this.positionTip()},be.prototype.positionTip=function(){Be.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Ce=this.tipGrip.visual.transform.baseVal.getItem(0);Ce.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Ce,0)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),be.prototype.select=function(){this.positionTip(),ze.prototype.select.call(this)},be.prototype.getState=function(){var Ce=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){var De=Ce;this.bgColor=De.bgColor,this.tipPosition=De.tipPosition,ze.prototype.restoreState.call(this,Ce),this.createTip(),this.setTipPoints()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.tipPosition={x:this.tipPosition.x*Ce,y:this.tipPosition.y*De},this.positionTip()},be.typeName="CalloutMarker",be.title="Callout marker",be.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>',be}(Lt),mn=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.opacity=1,Fe.strokeColor=Ge.defaultColor,Fe.strokeWidth=Ge.defaultStrokeWidth,Fe.strokeDasharray=Ge.defaultStrokeDasharray,Fe.fillColor=Ge.defaultFillColor,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.setOpacity=Fe.setOpacity.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe.strokePanel=new te("Line color",ft(Ge.defaultColorSet,["transparent"]),Ge.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.fillPanel=new te("Fill color",ft(Ge.defaultColorSet,["transparent"]),Fe.fillColor,Ze),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.strokeWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Re("Line style",Ge.defaultStrokeDasharrays,Ge.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe.opacityPanel=new vn("Opacity",Ge.defaultOpacitySteps,Fe.opacity),Fe.opacityPanel.onOpacityChanged=Fe.setOpacity,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual)},be.prototype.createVisual=function(){this.visual=Be.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)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="new"&&(this.createVisual(),this.moveVisual(Ce),this._state="creating")},be.prototype.manipulate=function(Ce){ze.prototype.manipulate.call(this,Ce)},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),this.setSize()},be.prototype.setSize=function(){ze.prototype.setSize.call(this),Be.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},be.prototype.pointerUp=function(Ce){ze.prototype.pointerUp.call(this,Ce),this.setSize()},be.prototype.setStrokeColor=function(Ce){this.strokeColor=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Ce),this.stateChanged()},be.prototype.setFillColor=function(Ce){this.fillColor=Ce,this.visual&&Be.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Ce),this.stateChanged()},be.prototype.setStrokeWidth=function(Ce){this.strokeWidth=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ce){this.strokeDasharray=Ce,this.visual&&Be.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},be.prototype.setOpacity=function(Ce){this.opacity=Ce,this.visual&&Be.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){var De=Ce;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.opacity=De.opacity,this.createVisual(),ze.prototype.restoreState.call(this,Ce),this.setSize()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.setSize()},be.typeName="EllipseMarker",be.title="Ellipse marker",be.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>',be}(Se),kn=function(ze){function be(Ce,De,Ge){return ze.call(this,Ce,De,Ge)||this}return Ke(be,ze),Object.defineProperty(be.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.tip1&&Ce!==this.tip2)},be.prototype.createTips=function(){this.tip1=Be.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(Be.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Be.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(Be.createTransform()),this.visual.appendChild(this.tip2)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.state==="creating"&&this.createTips()},be.prototype.adjustVisual=function(){if(ze.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Be.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()]]),Be.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 Ce=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),De=this.tip1.transform.baseVal.getItem(0);De.setRotate(Ce,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(De,0);var Ge=this.tip2.transform.baseVal.getItem(0);Ge.setRotate(Ce+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ge,0)}},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=ze.prototype.getState.call(this);return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce),this.createTips(),this.adjustVisual()},be.typeName="MeasurementMarker",be.title="Measurement marker",be.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>',be}(bt),At=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.strokePanel.colors=Ge.defaultColorSet,Fe.fillColor="transparent",Fe}return Ke(be,ze),Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=ze.prototype.getState.call(this);return Ce.typeName=be.typeName,Ce},be.typeName="EllipseFrameMarker",be.title="Ellipse frame marker",be.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>',be}(mn),pn=function(){function ze(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(ze.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),ze.prototype.addUndoStep=function(be){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(be)||(this.undoStack.push(be),JSON.stringify(this.lastRedoStep)!==JSON.stringify(be)&&this.redoStack.splice(0,this.redoStack.length))},ze.prototype.replaceLastUndoStep=function(be){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=be)},ze.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},ze.prototype.undo=function(){if(this.undoStack.length>1){var be=this.undoStack.pop();return be!==void 0&&this.redoStack.push(be),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},ze.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},ze}(),ln=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.curveX=0,Fe.curveY=0,Fe.manipulationStartCurveX=0,Fe.manipulationStartCurveY=0,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.positionGrips=Fe.positionGrips.bind(Fe),Fe.addControlGrips=Fe.addControlGrips.bind(Fe),Fe.adjustVisual=Fe.adjustVisual.bind(Fe),Fe.setupControlBox=Fe.setupControlBox.bind(Fe),Fe.resize=Fe.resize.bind(Fe),Fe.strokeColor=Ge.defaultColor,Fe.strokeWidth=Ge.defaultStrokeWidth,Fe.strokeDasharray=Ge.defaultStrokeDasharray,Fe.strokePanel=new te("Line color",Ge.defaultColorSet,Ge.defaultColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.strokeWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Re("Line style",Ge.defaultStrokeDasharrays,Ge.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual&&Ce!==this.selectorCurve&&Ce!==this.visibleCurve&&!this.curveGrip.ownsTarget(Ce))},be.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},be.prototype.createVisual=function(){this.visual=Be.createGroup(),this.selectorCurve=Be.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Be.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)},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Ce.x,this.curveY=Ce.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(De)&&(this.activeGrip=this.curveGrip,this._state="resize")},be.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Be.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Be.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Be.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},be.prototype.setupControlBox=function(){ze.prototype.setupControlBox.call(this),this.curveControlLine1=Be.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Be.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)},be.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,ze.prototype.addControlGrips.call(this)},be.prototype.positionGrips=function(){ze.prototype.positionGrips.call(this);var Ce=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Ce/2,this.curveY-Ce/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()))},be.prototype.manipulate=function(Ce){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Ce.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Ce.y-this.manipulationStartY),ze.prototype.manipulate.call(this,Ce)},be.prototype.resize=function(Ce){this.activeGrip===this.curveGrip&&(this.curveX=Ce.x,this.curveY=Ce.y),ze.prototype.resize.call(this,Ce),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},be.prototype.setStrokeColor=function(Ce){this.strokeColor=Ce,this.adjustVisual(),this.colorChanged(Ce)},be.prototype.setStrokeWidth=function(Ce){this.strokeWidth=Ce,this.adjustVisual()},be.prototype.setStrokeDasharray=function(Ce){this.strokeDasharray=Ce,this.adjustVisual()},be.prototype.scale=function(Ce,De){this.curveX=this.curveX*Ce,this.curveY=this.curveY*De,ze.prototype.scale.call(this,Ce,De)},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},ze.prototype.getState.call(this));return Ce.typeName=be.typeName,Ce},be.prototype.restoreState=function(Ce){ze.prototype.restoreState.call(this,Ce);var De=Ce;this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.curveX=De.curveX,this.curveY=De.curveY,this.createVisual(),this.adjustVisual()},be.typeName="CurveMarker",be.title="Curve marker",be.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>',be}(Je),jn=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,De,Ge)||this;return Fe.fillColor="transparent",Fe.strokeColor="transparent",Fe.strokeWidth=0,Fe.strokeDasharray="",Fe.textColor="transparent",Fe.fontSize="1rem",Fe.isMoved=!1,Fe.captionText="Caption",Fe.PADDING=5,Fe.captionBoxWidth=0,Fe.captionBoxHeight=0,Fe.strokeColor=Ge.defaultColor,Fe.strokeWidth=Ge.defaultStrokeWidth,Fe.strokeDasharray=Ge.defaultStrokeDasharray,Fe.fillColor=Ge.defaultFillColor,Fe.textColor=Ge.defaultStrokeColor,Fe.fontFamily=Ge.defaultFontFamily,Fe.fontSize=Ge.defaultCaptionFontSize,Fe.captionText=Ge.defaultCaptionText,Fe.setStrokeColor=Fe.setStrokeColor.bind(Fe),Fe.setFillColor=Fe.setFillColor.bind(Fe),Fe.setStrokeWidth=Fe.setStrokeWidth.bind(Fe),Fe.setStrokeDasharray=Fe.setStrokeDasharray.bind(Fe),Fe.createVisual=Fe.createVisual.bind(Fe),Fe.sizeCaption=Fe.sizeCaption.bind(Fe),Fe.setCaptionText=Fe.setCaptionText.bind(Fe),Fe.showTextEditor=Fe.showTextEditor.bind(Fe),Fe.positionTextEditor=Fe.positionTextEditor.bind(Fe),Fe.finishTextEditing=Fe.finishTextEditing.bind(Fe),Fe.setFont=Fe.setFont.bind(Fe),Fe.setTextColor=Fe.setTextColor.bind(Fe),Fe.strokePanel=new te("Line color",ft(Ge.defaultColorSet,["transparent"]),Fe.strokeColor),Fe.strokePanel.onColorChanged=Fe.setStrokeColor,Fe.fillPanel=new te("Fill color",ft(Ge.defaultColorSet,["transparent"]),Fe.fillColor,Ze),Fe.fillPanel.onColorChanged=Fe.setFillColor,Fe.strokeWidthPanel=new Oe("Line width",Ge.defaultStrokeWidths,Ge.defaultStrokeWidth),Fe.strokeWidthPanel.onWidthChanged=Fe.setStrokeWidth,Fe.strokeStylePanel=new Re("Line style",Ge.defaultStrokeDasharrays,Ge.defaultStrokeDasharray),Fe.strokeStylePanel.onStyleChanged=Fe.setStrokeDasharray,Fe.fontFamilyPanel=new lt("Font",Ge.defaultFontFamilies,Ge.defaultFontFamily),Fe.fontFamilyPanel.onFontChanged=Fe.setFont,Fe.textColorPanel=new te("Text color",Ge.defaultColorSet,Fe.textColor,Ve),Fe.textColorPanel.onColorChanged=Fe.setTextColor,Fe}return Ke(be,ze),be.prototype.ownsTarget=function(Ce){return!(!ze.prototype.ownsTarget.call(this,Ce)&&Ce!==this.visual&&Ce!==this.frame&&Ce!==this.captionBg&&Ce!==this.captionElement)},be.prototype.createVisual=function(){this.visual=Be.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Be.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Be.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=Be.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()},be.prototype.setCaptionText=function(Ce){this.captionText=Ce,this.captionElement.textContent=this.captionText,this.sizeCaption()},be.prototype.pointerDown=function(Ce,De){ze.prototype.pointerDown.call(this,Ce,De),this.isMoved=!1,this.pointerDownPoint=Ce,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Ce),this._state="creating")},be.prototype.manipulate=function(Ce){ze.prototype.manipulate.call(this,Ce),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Ce.x-this.pointerDownPoint.x)>5||Math.abs(Ce.y-this.pointerDownPoint.y)>5)},be.prototype.resize=function(Ce){ze.prototype.resize.call(this,Ce),this.setSize()},be.prototype.sizeCaption=function(){var Ce=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Ce.width+2*this.PADDING,this.captionBoxHeight=Ce.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Be.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')"]]),Be.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')"]])},be.prototype.showTextEditor=function(){var Ce=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(De){De.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(De){De.key==="Enter"&&Ce.finishTextEditing(Ce.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(De){De.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Ce.finishTextEditing(Ce.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Ce.finishTextEditing(Ce.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},be.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"))},be.prototype.finishTextEditing=function(Ce){this.setCaptionText(Ce.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},be.prototype.setFont=function(Ce){this.captionElement&&Be.setAttributes(this.captionElement,[["font-family",Ce]]),this.fontFamily=Ce,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},be.prototype.setTextColor=function(Ce){this.captionElement&&Be.setAttributes(this.captionElement,[["fill",Ce]]),this.textColor=Ce,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},be.prototype.setSize=function(){ze.prototype.setSize.call(this),Be.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},be.prototype.pointerUp=function(Ce){ze.prototype.pointerUp.call(this,Ce),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},be.prototype.dblClick=function(Ce,De){ze.prototype.dblClick.call(this,Ce,De),this.showTextEditor()},be.prototype.setStrokeColor=function(Ce){this.strokeColor=Ce,this.frame&&Be.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Ce),this.stateChanged()},be.prototype.setFillColor=function(Ce){this.fillColor=Ce,this.captionBg&&Be.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Ce),this.stateChanged()},be.prototype.setStrokeWidth=function(Ce){this.strokeWidth=Ce,this.frame&&Be.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},be.prototype.setStrokeDasharray=function(Ce){this.strokeDasharray=Ce,this.frame&&Be.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(be.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),be.prototype.getState=function(){var Ce=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},ze.prototype.getState.call(this));return Ce.typeName=this.typeName,Ce},be.prototype.restoreState=function(Ce){var De=Ce;this.fillColor=De.fillColor,this.strokeColor=De.strokeColor,this.strokeWidth=De.strokeWidth,this.strokeDasharray=De.strokeDasharray,this.textColor=De.textColor,this.fontFamily=De.fontFamily,this.captionText=De.captionText,this.fontSize=De.fontSize,this.createVisual(),ze.prototype.restoreState.call(this,Ce),this.setSize()},be.prototype.scale=function(Ce,De){ze.prototype.scale.call(this,Ce,De),this.setSize()},be.typeName="CaptionFrameMarker",be.title="Caption frame marker",be.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>',be}(Se),Gt=function(){function ze(be,Ce){Ce===void 0&&(Ce=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=be,this.cancelable=Ce}return Object.defineProperty(ze.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),ze.prototype.preventDefault=function(){this._defaultPrevented=!0},ze}(),mt=function(ze){function be(Ce,De,Ge){var Fe=ze.call(this,Ce,!1)||this;return Fe.dataUrl=De,Fe.state=Ge,Fe}return Ke(be,ze),be}(Gt),Et=function(ze){function be(Ce,De,Ge){Ge===void 0&&(Ge=!1);var Fe=ze.call(this,Ce,Ge)||this;return Fe.marker=De,Fe}return Ke(be,ze),be}(Gt),on=function(){function ze(){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 ze.prototype.addEventListener=function(be,Ce){this[be].push(Ce)},ze.prototype.removeEventListener=function(be,Ce){var De=this[be].indexOf(Ce);De>-1&&this[be].splice(De,1)},ze}(),Yt=function(){function ze(be){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new rt,this._isOpen=!1,this.undoRedoManager=new pn,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new on,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=ze.instanceCounter++,this.styles=new st(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=be,this.targetRoot=document.body,this.width=be.clientWidth,this.height=be.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(ze.prototype,"ALL_MARKER_TYPES",{get:function(){return[tt,Mt,dn,Lt,At,mn,Tn,Qe,kn,tn,bt,ln,jn]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[tt,Mt,dn,Lt,mn,Tn,Qe]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"BASIC_MARKER_TYPES",{get:function(){return[tt,Mt,dn,Lt,Tn]},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(be){var Ce=this;this._availableMarkerTypes.splice(0),be.forEach(function(De){if(typeof De=="string"){var Ge=Ce.ALL_MARKER_TYPES.find(function(Fe){return Fe.typeName===De});Ge!==void 0&&Ce._availableMarkerTypes.push(Ge)}else Ce._availableMarkerTypes.push(De)})},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(ze.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(be){this._zoomLevel=be,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(ze.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),ze.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),He.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},ze.prototype.show=function(){var be=this;this.styles.styleSheetRoot===void 0&&it.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=it.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Ce){return Ce(new Gt(be))})},ze.prototype.render=function(){return St(this,void 0,void 0,function(){var be;return zt(this,function(Ce){switch(Ce.label){case 0:return this.setCurrentMarker(),(be=new gt).naturalSize=this.renderAtNaturalSize,be.imageType=this.renderImageType,be.imageQuality=this.renderImageQuality,be.markersOnly=this.renderMarkersOnly,be.width=this.renderWidth,be.height=this.renderHeight,[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Ce.sent(),[4,be.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Ce.sent()]}})})},ze.prototype.close=function(be){var Ce=this;if(be===void 0&&(be=!1),this.isOpen){var De=!1;be||this.eventListeners.beforeclose.forEach(function(Ge){var Fe=new Gt(Ce,!0);Ge(Fe),Fe.defaultPrevented&&(De=!0)}),De||(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(Ge){return Ge(new Gt(Ce))}),this.detachEvents(),this._isOpen=!1)}},ze.prototype.addMarkersToToolbar=function(){for(var be,Ce=[],De=0;De<arguments.length;De++)Ce[De]=arguments[De];(be=this._availableMarkerTypes).push.apply(be,Ce)},ze.prototype.addRenderEventListener=function(be){this.addEventListener("render",function(Ce){be(Ce.dataUrl,Ce.state)})},ze.prototype.removeRenderEventListener=function(be){},ze.prototype.addCloseEventListener=function(be){this.addEventListener("close",function(){be()})},ze.prototype.removeCloseEventListener=function(be){},ze.prototype.setupResizeObserver=function(){var be=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){be.resize(be.target.clientWidth,be.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return be.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},ze.prototype.onPopupTargetResize=function(){var be=1*this.target.clientWidth/this.target.clientHeight,Ce=this.editorCanvas.clientWidth/be>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*be:this.editorCanvas.clientWidth,De=Ce<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/be;this.resize(Ce,De)},ze.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},ze.prototype.resize=function(be,Ce){this._isResizing=!0;var De=be/this.imageWidth,Ge=Ce/this.imageHeight;this.imageWidth=Math.round(be),this.imageHeight=Math.round(Ce),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(De,Ge),this._isResizing=!1},ze.prototype.scaleMarkers=function(be,Ce){var De,Ge=this;this._currentMarker&&this._currentMarker instanceof Lt?this._currentMarker.scale(be,Ce):(De=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Fe){Fe!==Ge._currentMarker&&Fe.scale(be,Ce)}),De!==void 0&&this.setCurrentMarker(De)},ze.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"},ze.prototype.setTopLeft=function(){var be=this.editingTarget.getBoundingClientRect(),Ce=this.editorCanvas.getBoundingClientRect();this.left=be.left-Ce.left,this.top=be.top-Ce.top},ze.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)},ze.prototype.addDefs=function(){for(var be,Ce=[],De=0;De<arguments.length;De++)Ce[De]=arguments[De];this.defs=Be.createDefs(),this.addDefsToImage(),(be=this.defs).append.apply(be,Ce)},ze.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},ze.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)},ze.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},ze.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},ze.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)},ze.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},ze.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)},ze.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 be=document.createElement("a");be.href="https://markerjs.com/",be.target="_blank",be.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>',be.title="Powered by marker.js",be.style.display="grid",be.style.alignItems="center",be.style.justifyItems="center",be.style.padding="3px",be.style.width="20px",be.style.height="20px",this.logoUI.appendChild(be),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},ze.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")},ze.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"},ze.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},ze.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 be=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=be+"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 Bt(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 Ae(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},ze.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},ze.prototype.removeMarker=function(be){this.markerImage.removeChild(be.container),this.markers.indexOf(be)>-1&&this.markers.splice(this.markers.indexOf(be),1),be.dispose()},ze.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())},ze.prototype.toolbarButtonClicked=function(be,Ce){if(be==="marker"&&Ce!==void 0)this.createNewMarker(Ce);else if(be==="action")switch(Ce){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()}},ze.prototype.deleteSelectedMarker=function(){var be=this;if(this._currentMarker!==void 0){var Ce=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ge){var Fe=new Et(be,be._currentMarker,!0);Ge(Fe),Fe.defaultPrevented&&(Ce=!0)}),!Ce){var De=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(Ge){return Ge(new Et(be,De))})}}},ze.prototype.clear=function(){var be=this,Ce=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(qe){var rn=new Et(be,void 0,!0);qe(rn),rn.defaultPrevented&&(Ce=!0)}),!Ce)){this.setCurrentMarker();for(var De=function(qe){var rn=Ge.markers[qe];Ge.setCurrentMarker(Ge.markers[qe]),Ge._currentMarker.dispose(),Ge.markerImage.removeChild(Ge._currentMarker.container),Ge.markers.splice(Ge.markers.indexOf(Ge._currentMarker),1),Ge.eventListeners.markerdelete.forEach(function(Kn){return Kn(new Et(be,rn))})},Ge=this,Fe=this.markers.length-1;Fe>=0;Fe--)De(Fe);this.addUndoStep()}},Object.defineProperty(ze.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),ze.prototype.showNotesEditor=function(){var be;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=(be=this._currentMarker.notes)!==null&&be!==void 0?be:"",this.overlayContainer.appendChild(this.notesArea))},ze.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)},ze.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},ze.prototype.addUndoStep=function(){var be=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Ce=this.getState(),De=this.undoRedoManager.getLastUndoStep();if(!De||De.width===Ce.width&&De.height===Ce.height){var Ge=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Ce),Ge<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Fe){return Fe(new Gt(be))})}else this.undoRedoManager.replaceLastUndoStep(Ce),this.eventListeners.statechange.forEach(function(Fe){return Fe(new Gt(be))})}},ze.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},ze.prototype.undoStep=function(){var be=this,Ce=this.undoRedoManager.undo();Ce!==void 0&&(this.restoreState(Ce),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(De){return De(new Gt(be))}))},ze.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},ze.prototype.redoStep=function(){var be=this,Ce=this.undoRedoManager.redo();Ce!==void 0&&(this.restoreState(Ce),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(De){return De(new Gt(be))}))},ze.prototype.stepZoom=function(){var be=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=be<this.zoomSteps.length-1?this.zoomSteps[be+1]:this.zoomSteps[0]},ze.prototype.panTo=function(be){this.contentDiv.scrollBy({left:this.prevPanPoint.x-be.x,top:this.prevPanPoint.y-be.y}),this.prevPanPoint=be},ze.prototype.startRenderAndClose=function(){return St(this,void 0,void 0,function(){var be,Ce,De=this;return zt(this,function(Ge){switch(Ge.label){case 0:return[4,this.render()];case 1:return be=Ge.sent(),Ce=this.getState(),this.eventListeners.render.forEach(function(Fe){return Fe(new mt(De,be,Ce))}),this.close(!0),[2]}})})},ze.prototype.getState=function(be){be===!0&&this.setCurrentMarker();var Ce={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(De){return Ce.markers.push(De.getState())}),Ce},ze.prototype.restoreState=function(be){var Ce=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);be.markers.forEach(function(De){var Ge=Ce._availableMarkerTypes.find(function(qe){return qe.typeName===De.typeName});if(Ge!==void 0){var Fe=Ce.addNewMarker(Ge);Fe.restoreState(De),Ce.markers.push(Fe)}}),be.width&&be.height&&(be.width!==this.imageWidth||be.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/be.width,this.imageHeight/be.height),this.eventListeners.restorestate.forEach(function(De){return De(new Gt(Ce))})},ze.prototype.addNewMarker=function(be){var Ce=Be.createGroup();return this.markerImage.appendChild(Ce),new be(Ce,this.overlayContainer,this.settings)},ze.prototype.createNewMarker=function(be){var Ce,De=this;(Ce=typeof be=="string"?this._availableMarkerTypes.find(function(Ge){return Ge.typeName===be}):be)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Ce),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(Ce.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ge){return Ge(new Et(De,De._currentMarker))}))},ze.prototype.markerCreated=function(be){var Ce=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(be),this.setCurrentMarker(be),be instanceof Mt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Mt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(De){return De(new Et(Ce,Ce._currentMarker))})},ze.prototype.colorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=be,this.settings.defaultStrokeColor=be)},ze.prototype.fillColorChanged=function(be){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=be)},ze.prototype.markerStateChanged=function(be){var Ce=this;this.eventListeners.markerchange.forEach(function(De){return De(new Et(Ce,be))})},ze.prototype.setCurrentMarker=function(be){var Ce=this;this._currentMarker!==be&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(De){return De(new Et(Ce,Ce._currentMarker))})),this._currentMarker=be,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(De){return De(new Et(Ce,Ce._currentMarker))}))},ze.prototype.onPointerDown=function(be){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||be.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Ce=this.markers.find(function(De){return De.ownsTarget(be.target)});Ce!==void 0?(this.setCurrentMarker(Ce),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:be.clientX,y:be.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(be.clientX,be.clientY))},ze.prototype.onDblClick=function(be){if(this._isFocused||this.focus(),this.mode==="select"){var Ce=this.markers.find(function(De){return De.ownsTarget(be.target)});Ce!==void 0&&Ce!==this._currentMarker&&this.setCurrentMarker(Ce),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(be.clientX,be.clientY),be.target):this.setCurrentMarker()}},ze.prototype.onPointerMove=function(be){this.touchPoints!==1&&be.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||be.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(be.clientX,be.clientY)):this.zoomLevel>1&&this.panTo({x:be.clientX,y:be.clientY}))},ze.prototype.onPointerUp=function(be){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(be.clientX,be.clientY)),this.isDragging=!1,this.addUndoStep()},ze.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},ze.prototype.onKeyUp=function(be){this._currentMarker===void 0||this.notesArea!==void 0||be.key!=="Delete"&&be.key!=="Backspace"||this.deleteSelectedMarker()},ze.prototype.clientToLocalCoordinates=function(be,Ce){var De=this.markerImage.getBoundingClientRect();return{x:(be-De.left)/this.zoomLevel,y:(Ce-De.top)/this.zoomLevel}},ze.prototype.onWindowResize=function(){this.positionUI()},ze.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var be=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=be+"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()},ze.prototype.addLicenseKey=function(be){He.addKey(be)},ze.prototype.addEventListener=function(be,Ce){this.eventListeners.addEventListener(be,Ce)},ze.prototype.removeEventListener=function(be,Ce){this.eventListeners.removeEventListener(be,Ce)},ze.prototype.renderState=function(be){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(be),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(ze.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),ze.prototype.focus=function(){var be=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Ce){return Ce(new Gt(be))}))},ze.prototype.blur=function(){var be=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Ce){return Ce(new Gt(be))}))},ze.instanceCounter=0,ze}()},13272:function(Cn,On,Me){"use strict";Me.d(On,{s:function(){return rr},default:function(){return ho}});function fe(){return fe=Object.assign?Object.assign.bind():function(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te];for(var at in et)({}).hasOwnProperty.call(et,at)&&(ke[at]=et[at])}return ke},fe.apply(null,arguments)}function Ke(ke){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},Ke(ke)}function St(ke,Te){if(Ke(ke)!="object"||!ke)return ke;var et=ke[Symbol.toPrimitive];if(et!==void 0){var at=et.call(ke,Te||"default");if(Ke(at)!="object")return at;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Te==="string"?String:Number)(ke)}function zt(ke){var Te=St(ke,"string");return Ke(Te)=="symbol"?Te:Te+""}function ft(ke,Te,et){return(Te=zt(Te))in ke?Object.defineProperty(ke,Te,{value:et,enumerable:!0,configurable:!0,writable:!0}):ke[Te]=et,ke}function Be(ke,Te){var et=Object.keys(ke);if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(ke);Te&&(at=at.filter(function(jt){return Object.getOwnPropertyDescriptor(ke,jt).enumerable})),et.push.apply(et,at)}return et}function He(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te]!=null?arguments[Te]:{};Te%2?Be(Object(et),!0).forEach(function(at){ft(ke,at,et[at])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(et)):Be(Object(et)).forEach(function(at){Object.defineProperty(ke,at,Object.getOwnPropertyDescriptor(et,at))})}return ke}function gt(ke,Te){(Te==null||Te>ke.length)&&(Te=ke.length);for(var et=0,at=Array(Te);et<Te;et++)at[et]=ke[et];return at}function it(ke){if(Array.isArray(ke))return gt(ke)}function st(ke){if(typeof Symbol!="undefined"&&ke[Symbol.iterator]!=null||ke["@@iterator"]!=null)return Array.from(ke)}function Ft(ke,Te){if(ke){if(typeof ke=="string")return gt(ke,Te);var et={}.toString.call(ke).slice(8,-1);return et==="Object"&&ke.constructor&&(et=ke.constructor.name),et==="Map"||et==="Set"?Array.from(ke):et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et)?gt(ke,Te):void 0}}function Nt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bt(ke){return it(ke)||st(ke)||Ft(ke)||Nt()}function Ae(ke){if(Array.isArray(ke))return ke}function ne(ke,Te){var et=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(et!=null){var at,jt,qt,gn,Vn=[],Qn=!0,Gn=!1;try{if(qt=(et=et.call(ke)).next,Te===0){if(Object(et)!==et)return;Qn=!1}else for(;!(Qn=(at=qt.call(et)).done)&&(Vn.push(at.value),Vn.length!==Te);Qn=!0);}catch(gi){Gn=!0,jt=gi}finally{try{if(!Qn&&et.return!=null&&(gn=et.return(),Object(gn)!==gn))return}finally{if(Gn)throw jt}}return Vn}}function te(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ue(ke,Te){return Ae(ke)||ne(ke,Te)||Ft(ke,Te)||te()}function se(ke,Te){if(ke==null)return{};var et={};for(var at in ke)if({}.hasOwnProperty.call(ke,at)){if(Te.indexOf(at)!==-1)continue;et[at]=ke[at]}return et}function pe(ke,Te){if(ke==null)return{};var et,at,jt=se(ke,Te);if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(ke);for(at=0;at<qt.length;at++)et=qt[at],Te.indexOf(et)===-1&&{}.propertyIsEnumerable.call(ke,et)&&(jt[et]=ke[et])}return jt}function ve(){return ve=Object.assign?Object.assign.bind():function(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te];for(var at in et)Object.prototype.hasOwnProperty.call(et,at)&&(ke[at]=et[at])}return ke},ve.apply(this,arguments)}function Se(ke,Te){(Te==null||Te>ke.length)&&(Te=ke.length);for(var et=0,at=new Array(Te);et<Te;et++)at[et]=ke[et];return at}function Pe(ke){if(Array.isArray(ke))return Se(ke)}function Oe(ke){if(typeof Symbol!="undefined"&&ke[Symbol.iterator]!=null||ke["@@iterator"]!=null)return Array.from(ke)}function Re(ke,Te){if(ke){if(typeof ke=="string")return Se(ke,Te);var et=Object.prototype.toString.call(ke).slice(8,-1);if(et==="Object"&&ke.constructor&&(et=ke.constructor.name),et==="Map"||et==="Set")return Array.from(ke);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return Se(ke,Te)}}function tt(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rt(ke){return Pe(ke)||Oe(ke)||Re(ke)||tt()}function Je(ke){"@babel/helpers - typeof";return Je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},Je(ke)}function bt(ke,Te){if(Je(ke)!=="object"||ke===null)return ke;var et=ke[Symbol.toPrimitive];if(et!==void 0){var at=et.call(ke,Te||"default");if(Je(at)!=="object")return at;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Te==="string"?String:Number)(ke)}function lt(ke){var Te=bt(ke,"string");return Je(Te)==="symbol"?Te:String(Te)}function Lt(ke,Te,et){return Te=lt(Te),Te in ke?Object.defineProperty(ke,Te,{value:et,enumerable:!0,configurable:!0,writable:!0}):ke[Te]=et,ke}function Mt(ke,Te){var et=Object.keys(ke);if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(ke);Te&&(at=at.filter(function(jt){return Object.getOwnPropertyDescriptor(ke,jt).enumerable})),et.push.apply(et,at)}return et}function pt(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te]!=null?arguments[Te]:{};Te%2?Mt(Object(et),!0).forEach(function(at){Lt(ke,at,et[at])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(et)):Mt(Object(et)).forEach(function(at){Object.defineProperty(ke,at,Object.getOwnPropertyDescriptor(et,at))})}return ke}function dn(ke){if(Array.isArray(ke))return ke}function tn(ke,Te){var et=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(et!=null){var at,jt,qt,gn,Vn=[],Qn=!0,Gn=!1;try{if(qt=(et=et.call(ke)).next,Te===0){if(Object(et)!==et)return;Qn=!1}else for(;!(Qn=(at=qt.call(et)).done)&&(Vn.push(at.value),Vn.length!==Te);Qn=!0);}catch(gi){Gn=!0,jt=gi}finally{try{if(!Qn&&et.return!=null&&(gn=et.return(),Object(gn)!==gn))return}finally{if(Gn)throw jt}}return Vn}}function vn(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Tn(ke,Te){return dn(ke)||tn(ke,Te)||Re(ke,Te)||vn()}function Ve(ke,Te){if(ke==null)return{};var et={},at=Object.keys(ke),jt,qt;for(qt=0;qt<at.length;qt++)jt=at[qt],!(Te.indexOf(jt)>=0)&&(et[jt]=ke[jt]);return et}function Ze(ke,Te){if(ke==null)return{};var et=Ve(ke,Te),at,jt;if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(ke);for(jt=0;jt<qt.length;jt++)at=qt[jt],!(Te.indexOf(at)>=0)&&Object.prototype.propertyIsEnumerable.call(ke,at)&&(et[at]=ke[at])}return et}var Qe=Me(67294);function mn(ke){var Te=Qe.useRef();Te.current=ke;var et=Qe.useCallback(function(){for(var at,jt=arguments.length,qt=new Array(jt),gn=0;gn<jt;gn++)qt[gn]=arguments[gn];return(at=Te.current)===null||at===void 0?void 0:at.call.apply(at,[Te].concat(qt))},[]);return et}function kn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var At=kn()?Qe.useLayoutEffect:Qe.useEffect,pn=At,ln=function(Te,et){var at=Qe.useRef(!0);At(function(){if(!at.current)return Te()},et),At(function(){return at.current=!1,function(){at.current=!0}},[])};function jn(ke){var Te=Qe.useRef(!1),et=Qe.useState(ke),at=Tn(et,2),jt=at[0],qt=at[1];Qe.useEffect(function(){return Te.current=!1,function(){Te.current=!0}},[]);function gn(Vn,Qn){Qn&&Te.current||qt(Vn)}return[jt,gn]}function Gt(ke){return ke!==void 0}function mt(ke,Te){var et=Te||{},at=et.defaultValue,jt=et.value,qt=et.onChange,gn=et.postState,Vn=jn(function(){return Gt(jt)?jt:Gt(at)?typeof at=="function"?at():at:typeof ke=="function"?ke():ke}),Qn=Tn(Vn,2),Gn=Qn[0],gi=Qn[1],yi=jt!==void 0?jt:Gn,_i=gn?gn(yi):yi,mi=mn(qt),ui=jn([yi]),Fi=Tn(ui,2),ji=Fi[0],Rr=Fi[1];ln(function(){var Fr=ji[0];Gn!==Fr&&mi(Gn,Fr)},[ji]),ln(function(){Gt(jt)||gi(jt)},[jt]);var ao=mn(function(Fr,jr){gi(Fr,jr),Rr([yi],jr)});return[_i,ao]}var Et={};function on(ke,Te){}function Yt(ke,Te){}function ze(){Et={}}function be(ke,Te,et){!Te&&!Et[et]&&(ke(!1,et),Et[et]=!0)}function Ce(ke,Te){be(on,ke,Te)}function De(ke,Te){be(Yt,ke,Te)}var Ge=Ce,Fe=Me(94184),qe=Me.n(Fe),rn=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ke=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(ke)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(ke==null?void 0:ke.substr(0,4))},Kn=Me(16357);function Zn(ke,Te,et){var at=Qe.useRef({});return(!("value"in at.current)||et(at.current.condition,Te))&&(at.current.value=ke(),at.current.condition=Te),at.current.value}function $t(ke,Te){typeof ke=="function"?ke(Te):Je(ke)==="object"&&ke&&"current"in ke&&(ke.current=Te)}function Nn(){for(var ke=arguments.length,Te=new Array(ke),et=0;et<ke;et++)Te[et]=arguments[et];var at=Te.filter(function(jt){return jt});return at.length<=1?at[0]:function(jt){Te.forEach(function(qt){$t(qt,jt)})}}function Zt(){for(var ke=arguments.length,Te=new Array(ke),et=0;et<ke;et++)Te[et]=arguments[et];return Zn(function(){return Nn.apply(void 0,Te)},Te,function(at,jt){return at.length===jt.length&&at.every(function(qt,gn){return qt===jt[gn]})})}function qn(ke){var Te,et,at=isMemo(ke)?ke.type.type:ke.type;return!(typeof at=="function"&&!((Te=at.prototype)!==null&&Te!==void 0&&Te.render)||typeof ke=="function"&&!((et=ke.prototype)!==null&&et!==void 0&&et.render))}var $n=function(Te){var et=Te.className,at=Te.customizeIcon,jt=Te.customizeIconProps,qt=Te.children,gn=Te.onMouseDown,Vn=Te.onClick,Qn=typeof at=="function"?at(jt):at;return Qe.createElement("span",{className:et,onMouseDown:function(gi){gi.preventDefault(),gn==null||gn(gi)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Vn,"aria-hidden":!0},Qn!==void 0?Qn:Qe.createElement("span",{className:qe()(et.split(/\s+/).map(function(Gn){return"".concat(Gn,"-icon")}))},qt))},oi=$n,ri=function(Te,et,at,jt,qt){var gn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Vn=arguments.length>6?arguments[6]:void 0,Qn=arguments.length>7?arguments[7]:void 0,Gn=Qe.useMemo(function(){if(Je(jt)==="object")return jt.clearIcon;if(qt)return qt},[jt,qt]),gi=Qe.useMemo(function(){return!!(!gn&&jt&&(at.length||Vn)&&!(Qn==="combobox"&&Vn===""))},[jt,gn,at.length,Vn,Qn]);return{allowClear:gi,clearIcon:Qe.createElement(oi,{className:"".concat(Te,"-clear"),onMouseDown:et,customizeIcon:Gn},"\xD7")}},fr=Qe.createContext(null);function wr(){return Qe.useContext(fr)}function Li(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Te=Qe.useState(!1),et=Tn(Te,2),at=et[0],jt=et[1],qt=Qe.useRef(null),gn=function(){window.clearTimeout(qt.current)};Qe.useEffect(function(){return gn},[]);var Vn=function(Gn,gi){gn(),qt.current=window.setTimeout(function(){jt(Gn),gi&&gi()},ke)};return[at,Vn,gn]}function Ai(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Te=Qe.useRef(null),et=Qe.useRef(null);Qe.useEffect(function(){return function(){window.clearTimeout(et.current)}},[]);function at(jt){(jt||Te.current===null)&&(Te.current=jt),window.clearTimeout(et.current),et.current=window.setTimeout(function(){Te.current=null},ke)}return[function(){return Te.current},at]}function Ur(ke,Te,et,at){var jt=Qe.useRef(null);jt.current={open:Te,triggerOpen:et,customizedTrigger:at},Qe.useEffect(function(){function qt(gn){var Vn;if(!((Vn=jt.current)!==null&&Vn!==void 0&&Vn.customizedTrigger)){var Qn=gn.target;Qn.shadowRoot&&gn.composed&&(Qn=gn.composedPath()[0]||Qn),jt.current.open&&ke().filter(function(Gn){return Gn}).every(function(Gn){return!Gn.contains(Qn)&&Gn!==Qn})&&jt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",qt),function(){return window.removeEventListener("mousedown",qt)}},[])}var Yn={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Te){var et=Te.keyCode;if(Te.altKey&&!Te.ctrlKey||Te.metaKey||et>=Yn.F1&&et<=Yn.F12)return!1;switch(et){case Yn.ALT:case Yn.CAPS_LOCK:case Yn.CONTEXT_MENU:case Yn.CTRL:case Yn.DOWN:case Yn.END:case Yn.ESC:case Yn.HOME:case Yn.INSERT:case Yn.LEFT:case Yn.MAC_FF_META:case Yn.META:case Yn.NUMLOCK:case Yn.NUM_CENTER:case Yn.PAGE_DOWN:case Yn.PAGE_UP:case Yn.PAUSE:case Yn.PRINT_SCREEN:case Yn.RIGHT:case Yn.SHIFT:case Yn.UP:case Yn.WIN_KEY:case Yn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Te){if(Te>=Yn.ZERO&&Te<=Yn.NINE||Te>=Yn.NUM_ZERO&&Te<=Yn.NUM_MULTIPLY||Te>=Yn.A&&Te<=Yn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Te===0)return!0;switch(Te){case Yn.SPACE:case Yn.QUESTION_MARK:case Yn.NUM_PLUS:case Yn.NUM_MINUS:case Yn.NUM_PERIOD:case Yn.NUM_DIVISION:case Yn.SEMICOLON:case Yn.DASH:case Yn.EQUALS:case Yn.COMMA:case Yn.PERIOD:case Yn.SLASH:case Yn.APOSTROPHE:case Yn.SINGLE_QUOTE:case Yn.OPEN_SQUARE_BRACKET:case Yn.BACKSLASH:case Yn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Rn=Yn;function sr(ke){return ke&&![Rn.ESC,Rn.SHIFT,Rn.BACKSPACE,Rn.TAB,Rn.WIN_KEY,Rn.ALT,Rn.META,Rn.WIN_KEY_RIGHT,Rn.CTRL,Rn.SEMICOLON,Rn.EQUALS,Rn.CAPS_LOCK,Rn.CONTEXT_MENU,Rn.F1,Rn.F2,Rn.F3,Rn.F4,Rn.F5,Rn.F6,Rn.F7,Rn.F8,Rn.F9,Rn.F10,Rn.F11,Rn.F12].includes(ke)}var xr=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,Ni=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,lr="".concat(xr," ").concat(Ni).split(/[\s\n]+/),mo="aria-",pi="data-";function ti(ke,Te){return ke.indexOf(Te)===0}function hi(ke){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et;Te===!1?et={aria:!0,data:!0,attr:!0}:Te===!0?et={aria:!0}:et=pt({},Te);var at={};return Object.keys(ke).forEach(function(jt){(et.aria&&(jt==="role"||ti(jt,mo))||et.data&&ti(jt,pi)||et.attr&&lr.includes(jt))&&(at[jt]=ke[jt])}),at}function Ii(){return Ii=Object.assign?Object.assign.bind():function(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te];for(var at in et)Object.prototype.hasOwnProperty.call(et,at)&&(ke[at]=et[at])}return ke},Ii.apply(this,arguments)}function ir(ke){"@babel/helpers - typeof";return ir=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Te){return typeof Te}:function(Te){return Te&&typeof Symbol=="function"&&Te.constructor===Symbol&&Te!==Symbol.prototype?"symbol":typeof Te},ir(ke)}function zi(ke,Te){if(ir(ke)!=="object"||ke===null)return ke;var et=ke[Symbol.toPrimitive];if(et!==void 0){var at=et.call(ke,Te||"default");if(ir(at)!=="object")return at;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Te==="string"?String:Number)(ke)}function an(ke){var Te=zi(ke,"string");return ir(Te)==="symbol"?Te:String(Te)}function we(ke,Te,et){return Te=an(Te),Te in ke?Object.defineProperty(ke,Te,{value:et,enumerable:!0,configurable:!0,writable:!0}):ke[Te]=et,ke}function Ut(ke,Te){var et=Object.keys(ke);if(Object.getOwnPropertySymbols){var at=Object.getOwnPropertySymbols(ke);Te&&(at=at.filter(function(jt){return Object.getOwnPropertyDescriptor(ke,jt).enumerable})),et.push.apply(et,at)}return et}function en(ke){for(var Te=1;Te<arguments.length;Te++){var et=arguments[Te]!=null?arguments[Te]:{};Te%2?Ut(Object(et),!0).forEach(function(at){we(ke,at,et[at])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(et)):Ut(Object(et)).forEach(function(at){Object.defineProperty(ke,at,Object.getOwnPropertyDescriptor(et,at))})}return ke}function cn(ke){if(Array.isArray(ke))return ke}function xn(ke,Te){var et=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(et!=null){var at,jt,qt,gn,Vn=[],Qn=!0,Gn=!1;try{if(qt=(et=et.call(ke)).next,Te===0){if(Object(et)!==et)return;Qn=!1}else for(;!(Qn=(at=qt.call(et)).done)&&(Vn.push(at.value),Vn.length!==Te);Qn=!0);}catch(gi){Gn=!0,jt=gi}finally{try{if(!Qn&&et.return!=null&&(gn=et.return(),Object(gn)!==gn))return}finally{if(Gn)throw jt}}return Vn}}function In(ke,Te){(Te==null||Te>ke.length)&&(Te=ke.length);for(var et=0,at=new Array(Te);et<Te;et++)at[et]=ke[et];return at}function ni(ke,Te){if(ke){if(typeof ke=="string")return In(ke,Te);var et=Object.prototype.toString.call(ke).slice(8,-1);if(et==="Object"&&ke.constructor&&(et=ke.constructor.name),et==="Map"||et==="Set")return Array.from(ke);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return In(ke,Te)}}function Ui(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ot(ke,Te){return cn(ke)||xn(ke,Te)||ni(ke,Te)||Ui()}function _t(ke,Te){if(ke==null)return{};var et={},at=Object.keys(ke),jt,qt;for(qt=0;qt<at.length;qt++)jt=at[qt],!(Te.indexOf(jt)>=0)&&(et[jt]=ke[jt]);return et}function Ct(ke,Te){if(ke==null)return{};var et=_t(ke,Te),at,jt;if(Object.getOwnPropertySymbols){var qt=Object.getOwnPropertySymbols(ke);for(jt=0;jt<qt.length;jt++)at=qt[jt],!(Te.indexOf(at)>=0)&&Object.prototype.propertyIsEnumerable.call(ke,at)&&(et[at]=ke[at])}return et}var Jt=Me(48555);function ci(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Xn=ci()?Qe.useLayoutEffect:Qe.useEffect,_n=function(Te,et){var at=Qe.useRef(!0);Xn(function(){return Te(at.current)},et),Xn(function(){return at.current=!1,function(){at.current=!0}},[])},It=function(Te,et){_n(function(at){if(!at)return Te()},et)},hn=_n,Ci=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Ri=void 0;function Ln(ke,Te){var et=ke.prefixCls,at=ke.invalidate,jt=ke.item,qt=ke.renderItem,gn=ke.responsive,Vn=ke.responsiveDisabled,Qn=ke.registerSize,Gn=ke.itemKey,gi=ke.className,yi=ke.style,_i=ke.children,mi=ke.display,ui=ke.order,Fi=ke.component,ji=Fi===void 0?"div":Fi,Rr=Ct(ke,Ci),ao=gn&&!mi;function Fr(or){Qn(Gn,or)}Qe.useEffect(function(){return function(){Fr(null)}},[]);var jr=qt&&jt!==Ri?qt(jt):_i,To;at||(To={opacity:ao?0:1,height:ao?0:Ri,overflowY:ao?"hidden":Ri,order:gn?ui:Ri,pointerEvents:ao?"none":Ri,position:ao?"absolute":Ri});var bi={};ao&&(bi["aria-hidden"]=!0);var Kr=Qe.createElement(ji,Ii({className:qe()(!at&&et,gi),style:en(en({},To),yi)},bi,Rr,{ref:Te}),jr);return gn&&(Kr=Qe.createElement(Jt.Z,{onResize:function(Zr){var xo=Zr.offsetWidth;Fr(xo)},disabled:Vn},Kr)),Kr}var Rt=Qe.forwardRef(Ln);Rt.displayName="Item";var Si=Rt;function Zi(ke){var Te=Qe.useRef();Te.current=ke;var et=Qe.useCallback(function(){for(var at,jt=arguments.length,qt=new Array(jt),gn=0;gn<jt;gn++)qt[gn]=arguments[gn];return(at=Te.current)===null||at===void 0?void 0:at.call.apply(at,[Te].concat(qt))},[]);return et}var Wr=Me(73935),En=function(Te){return+setTimeout(Te,16)},li=function(Te){return clearTimeout(Te)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(En=function(Te){return window.requestAnimationFrame(Te)},li=function(Te){return window.cancelAnimationFrame(Te)});var bo=0,La=new Map;function sa(ke){La.delete(ke)}var Yi=function(Te){var et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;bo+=1;var at=bo;function jt(qt){if(qt===0)sa(at),Te();else{var gn=En(function(){jt(qt-1)});La.set(at,gn)}}return jt(et),at};Yi.cancel=function(ke){var Te=La.get(ke);return sa(Te),li(Te)};var Wi=Yi;function er(ke){if(typeof MessageChannel=="undefined")Wi(ke);else{var Te=new MessageChannel;Te.port1.onmessage=function(){return ke()},Te.port2.postMessage(void 0)}}function Mo(){var ke=Qe.useRef(null),Te=function(at){ke.current||(ke.current=[],er(function(){(0,Wr.unstable_batchedUpdates)(function(){ke.current.forEach(function(jt){jt()}),ke.current=null})})),ke.current.push(at)};return Te}function ra(ke,Te){var et=Qe.useState(Te),at=Ot(et,2),jt=at[0],qt=at[1],gn=Zi(function(Vn){ke(function(){qt(Vn)})});return[jt,gn]}var ai=Qe.createContext(null),Mr=["component"],ml=["className"],xs=["className"],$a=function(Te,et){var at=Qe.useContext(ai);if(!at){var jt=Te.component,qt=jt===void 0?"div":jt,gn=Ct(Te,Mr);return Qe.createElement(qt,Ii({},gn,{ref:et}))}var Vn=at.className,Qn=Ct(at,ml),Gn=Te.className,gi=Ct(Te,xs);return Qe.createElement(ai.Provider,{value:null},Qe.createElement(Si,Ii({ref:et,className:qe()(Vn,Gn)},Qn,gi)))},Wt=Qe.forwardRef($a);Wt.displayName="RawItem";var $i=Wt,Vo=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Pr="responsive",Ia="invalidate";function zo(ke){return"+ ".concat(ke.length," ...")}function na(ke,Te){var et=ke.prefixCls,at=et===void 0?"rc-overflow":et,jt=ke.data,qt=jt===void 0?[]:jt,gn=ke.renderItem,Vn=ke.renderRawItem,Qn=ke.itemKey,Gn=ke.itemWidth,gi=Gn===void 0?10:Gn,yi=ke.ssr,_i=ke.style,mi=ke.className,ui=ke.maxCount,Fi=ke.renderRest,ji=ke.renderRawRest,Rr=ke.suffix,ao=ke.component,Fr=ao===void 0?"div":ao,jr=ke.itemComponent,To=ke.onVisibleChange,bi=Ct(ke,Vo),Kr=yi==="full",or=Mo(),Zr=ra(or,null),xo=Ot(Zr,2),nr=xo[0],jo=xo[1],co=nr||0,oa=ra(or,new Map),ro=Ot(oa,2),Uo=ro[0],fa=ro[1],Ea=ra(or,0),ga=Ot(Ea,2),_r=ga[0],Co=ga[1],Ma=ra(or,0),pa=Ot(Ma,2),Da=pa[0],ka=pa[1],Xa=ra(or,0),Oa=Ot(Xa,2),es=Oa[0],Hs=Oa[1],as=(0,Qe.useState)(null),wo=Ot(as,2),yo=wo[0],fo=wo[1],ar=(0,Qe.useState)(null),mr=Ot(ar,2),so=mr[0],Jo=mr[1],ha=Qe.useMemo(function(){return so===null&&Kr?Number.MAX_SAFE_INTEGER:so||0},[so,nr]),Yo=(0,Qe.useState)(!1),ss=Ot(Yo,2),ks=ss[0],Za=ss[1],Ks="".concat(at,"-item"),ns=Math.max(_r,Da),fs=ui===Pr,ps=qt.length&&fs,rl=ui===Ia,ws=ps||typeof ui=="number"&&qt.length>ui,Ps=(0,Qe.useMemo)(function(){var Go=qt;return ps?nr===null&&Kr?Go=qt:Go=qt.slice(0,Math.min(qt.length,co/gi)):typeof ui=="number"&&(Go=qt.slice(0,ui)),Go},[qt,gi,nr,ui,ps]),ts=(0,Qe.useMemo)(function(){return ps?qt.slice(ha+1):qt.slice(Ps.length)},[qt,Ps,ps,ha]),ms=(0,Qe.useCallback)(function(Go,ja){var Wo;return typeof Qn=="function"?Qn(Go):(Wo=Qn&&(Go==null?void 0:Go[Qn]))!==null&&Wo!==void 0?Wo:ja},[Qn]),xl=(0,Qe.useCallback)(gn||function(Go){return Go},[gn]);function Cl(Go,ja,Wo){so===Go&&(ja===void 0||ja===yo)||(Jo(Go),Wo||(Za(Go<qt.length-1),To==null||To(Go)),ja!==void 0&&fo(ja))}function lo(Go,ja){jo(ja.clientWidth)}function zr(Go,ja){fa(function(Wo){var ol=new Map(Wo);return ja===null?ol.delete(Go):ol.set(Go,ja),ol})}function to(Go,ja){ka(ja),Co(Da)}function va(Go,ja){Hs(ja)}function Es(Go){return Uo.get(ms(Ps[Go],Go))}hn(function(){if(co&&typeof ns=="number"&&Ps){var Go=es,ja=Ps.length,Wo=ja-1;if(!ja){Cl(0,null);return}for(var ol=0;ol<ja;ol+=1){var Zl=Es(ol);if(Kr&&(Zl=Zl||0),Zl===void 0){Cl(ol-1,void 0,!0);break}if(Go+=Zl,Wo===0&&Go<=co||ol===Wo-1&&Go+Es(Wo)<=co){Cl(Wo,null);break}else if(Go+ns>co){Cl(ol-1,Go-Zl-es+Da);break}}Rr&&Es(0)+es>co&&fo(null)}},[co,Uo,Da,es,ms,Ps]);var Zs=ks&&!!ts.length,Al={};yo!==null&&ps&&(Al={position:"absolute",left:yo,top:0});var kt={prefixCls:Ks,responsive:ps,component:jr,invalidate:rl},Hl=Vn?function(Go,ja){var Wo=ms(Go,ja);return Qe.createElement(ai.Provider,{key:Wo,value:en(en({},kt),{},{order:ja,item:Go,itemKey:Wo,registerSize:zr,display:ja<=ha})},Vn(Go,ja))}:function(Go,ja){var Wo=ms(Go,ja);return Qe.createElement(Si,Ii({},kt,{order:ja,key:Wo,item:Go,renderItem:xl,itemKey:Wo,registerSize:zr,display:ja<=ha}))},$s,Ql={order:Zs?ha:Number.MAX_SAFE_INTEGER,className:"".concat(Ks,"-rest"),registerSize:to,display:Zs};if(ji)ji&&($s=Qe.createElement(ai.Provider,{value:en(en({},kt),Ql)},ji(ts)));else{var Ju=Fi||zo;$s=Qe.createElement(Si,Ii({},kt,Ql),typeof Ju=="function"?Ju(ts):Ju)}var Us=Qe.createElement(Fr,Ii({className:qe()(!rl&&at,mi),style:_i,ref:Te},bi),Ps.map(Hl),ws?$s:null,Rr&&Qe.createElement(Si,Ii({},kt,{responsive:fs,responsiveDisabled:!ps,order:ha,className:"".concat(Ks,"-suffix"),registerSize:va,display:!0,style:Al}),Rr));return fs&&(Us=Qe.createElement(Jt.Z,{onResize:lo,disabled:!ps},Us)),Us}var Fo=Qe.forwardRef(na);Fo.displayName="Overflow",Fo.Item=$i,Fo.RESPONSIVE=Pr,Fo.INVALIDATE=Ia;var _o=Fo,da=_o,bn=function(Te,et){var at,jt=Te.prefixCls,qt=Te.id,gn=Te.inputElement,Vn=Te.disabled,Qn=Te.tabIndex,Gn=Te.autoFocus,gi=Te.autoComplete,yi=Te.editable,_i=Te.activeDescendantId,mi=Te.value,ui=Te.maxLength,Fi=Te.onKeyDown,ji=Te.onMouseDown,Rr=Te.onChange,ao=Te.onPaste,Fr=Te.onCompositionStart,jr=Te.onCompositionEnd,To=Te.onBlur,bi=Te.open,Kr=Te.attrs,or=gn||Qe.createElement("input",null),Zr=or,xo=Zr.ref,nr=Zr.props,jo=nr.onKeyDown,co=nr.onChange,oa=nr.onMouseDown,ro=nr.onCompositionStart,Uo=nr.onCompositionEnd,fa=nr.onBlur,Ea=nr.style;return"maxLength"in or.props,or=Qe.cloneElement(or,pt(pt(pt({type:"search"},nr),{},{id:qt,ref:Nn(et,xo),disabled:Vn,tabIndex:Qn,autoComplete:gi||"off",autoFocus:Gn,className:qe()("".concat(jt,"-selection-search-input"),(at=or)===null||at===void 0||(at=at.props)===null||at===void 0?void 0:at.className),role:"combobox","aria-expanded":bi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(qt,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(qt,"_list"),"aria-activedescendant":bi?_i:void 0},Kr),{},{value:yi?mi:"",maxLength:ui,readOnly:!yi,unselectable:yi?null:"on",style:pt(pt({},Ea),{},{opacity:yi?null:0}),onKeyDown:function(_r){Fi(_r),jo&&jo(_r)},onMouseDown:function(_r){ji(_r),oa&&oa(_r)},onChange:function(_r){Rr(_r),co&&co(_r)},onCompositionStart:function(_r){Fr(_r),ro&&ro(_r)},onCompositionEnd:function(_r){jr(_r),Uo&&Uo(_r)},onPaste:ao,onBlur:function(_r){To(_r),fa&&fa(_r)}})),or},Ga=Qe.forwardRef(bn),Sn=Ga;function Zo(ke){return Array.isArray(ke)?ke:ke!==void 0?[ke]:[]}var js=typeof window!="undefined"&&window.document&&window.document.documentElement,Vr=js;function Ll(ke){return ke!=null}function Ha(ke){return!ke&&ke!==0}function $o(ke){return["string","number"].includes(Je(ke))}function Ba(ke){var Te=void 0;return ke&&($o(ke.title)?Te=ke.title.toString():$o(ke.label)&&(Te=ke.label.toString())),Te}function nl(ke,Te){Vr?Qe.useLayoutEffect(ke,Te):Qe.useEffect(ke,Te)}function wa(ke){var Te;return(Te=ke.key)!==null&&Te!==void 0?Te:ke.value}var ki=function(Te){Te.preventDefault(),Te.stopPropagation()},$e=function(Te){var et=Te.id,at=Te.prefixCls,jt=Te.values,qt=Te.open,gn=Te.searchValue,Vn=Te.autoClearSearchValue,Qn=Te.inputRef,Gn=Te.placeholder,gi=Te.disabled,yi=Te.mode,_i=Te.showSearch,mi=Te.autoFocus,ui=Te.autoComplete,Fi=Te.activeDescendantId,ji=Te.tabIndex,Rr=Te.removeIcon,ao=Te.maxTagCount,Fr=Te.maxTagTextLength,jr=Te.maxTagPlaceholder,To=jr===void 0?function(ar){return"+ ".concat(ar.length," ...")}:jr,bi=Te.tagRender,Kr=Te.onToggleOpen,or=Te.onRemove,Zr=Te.onInputChange,xo=Te.onInputPaste,nr=Te.onInputKeyDown,jo=Te.onInputMouseDown,co=Te.onInputCompositionStart,oa=Te.onInputCompositionEnd,ro=Te.onInputBlur,Uo=Qe.useRef(null),fa=(0,Qe.useState)(0),Ea=Tn(fa,2),ga=Ea[0],_r=Ea[1],Co=(0,Qe.useState)(!1),Ma=Tn(Co,2),pa=Ma[0],Da=Ma[1],ka="".concat(at,"-selection"),Xa=qt||yi==="multiple"&&Vn===!1||yi==="tags"?gn:"",Oa=yi==="tags"||yi==="multiple"&&Vn===!1||_i&&(qt||pa);nl(function(){_r(Uo.current.scrollWidth)},[Xa]);var es=function(mr,so,Jo,ha,Yo){return Qe.createElement("span",{title:Ba(mr),className:qe()("".concat(ka,"-item"),Lt({},"".concat(ka,"-item-disabled"),Jo))},Qe.createElement("span",{className:"".concat(ka,"-item-content")},so),ha&&Qe.createElement(oi,{className:"".concat(ka,"-item-remove"),onMouseDown:ki,onClick:Yo,customizeIcon:Rr},"\xD7"))},Hs=function(mr,so,Jo,ha,Yo,ss){var ks=function(Ks){ki(Ks),Kr(!qt)};return Qe.createElement("span",{onMouseDown:ks},bi({label:so,value:mr,disabled:Jo,closable:ha,onClose:Yo,isMaxTag:!!ss}))},as=function(mr){var so=mr.disabled,Jo=mr.label,ha=mr.value,Yo=!gi&&!so,ss=Jo;if(typeof Fr=="number"&&(typeof Jo=="string"||typeof Jo=="number")){var ks=String(ss);ks.length>Fr&&(ss="".concat(ks.slice(0,Fr),"..."))}var Za=function(ns){ns&&ns.stopPropagation(),or(mr)};return typeof bi=="function"?Hs(ha,ss,so,Yo,Za):es(mr,ss,so,Yo,Za)},wo=function(mr){if(!jt.length)return null;var so=typeof To=="function"?To(mr):To;return typeof bi=="function"?Hs(void 0,so,!1,!1,void 0,!0):es({title:so},so,!1)},yo=Qe.createElement("div",{className:"".concat(ka,"-search"),style:{width:ga},onFocus:function(){Da(!0)},onBlur:function(){Da(!1)}},Qe.createElement(Sn,{ref:Qn,open:qt,prefixCls:at,id:et,inputElement:null,disabled:gi,autoFocus:mi,autoComplete:ui,editable:Oa,activeDescendantId:Fi,value:Xa,onKeyDown:nr,onMouseDown:jo,onChange:Zr,onPaste:xo,onCompositionStart:co,onCompositionEnd:oa,onBlur:ro,tabIndex:ji,attrs:hi(Te,!0)}),Qe.createElement("span",{ref:Uo,className:"".concat(ka,"-search-mirror"),"aria-hidden":!0},Xa,"\xA0")),fo=Qe.createElement(da,{prefixCls:"".concat(ka,"-overflow"),data:jt,renderItem:as,renderRest:wo,suffix:yo,itemKey:wa,maxCount:ao});return Qe.createElement("span",{className:"".concat(ka,"-wrap")},fo,!jt.length&&!Xa&&Qe.createElement("span",{className:"".concat(ka,"-placeholder")},Gn))},rs=$e,hu=function(Te){var et=Te.inputElement,at=Te.prefixCls,jt=Te.id,qt=Te.inputRef,gn=Te.disabled,Vn=Te.autoFocus,Qn=Te.autoComplete,Gn=Te.activeDescendantId,gi=Te.mode,yi=Te.open,_i=Te.values,mi=Te.placeholder,ui=Te.tabIndex,Fi=Te.showSearch,ji=Te.searchValue,Rr=Te.activeValue,ao=Te.maxLength,Fr=Te.onInputKeyDown,jr=Te.onInputMouseDown,To=Te.onInputChange,bi=Te.onInputPaste,Kr=Te.onInputCompositionStart,or=Te.onInputCompositionEnd,Zr=Te.onInputBlur,xo=Te.title,nr=Qe.useState(!1),jo=Tn(nr,2),co=jo[0],oa=jo[1],ro=gi==="combobox",Uo=ro||Fi,fa=_i[0],Ea=ji||"";ro&&Rr&&!co&&(Ea=Rr),Qe.useEffect(function(){ro&&oa(!1)},[ro,Rr]);var ga=gi!=="combobox"&&!yi&&!Fi?!1:!!Ea,_r=xo===void 0?Ba(fa):xo,Co=Qe.useMemo(function(){return fa?null:Qe.createElement("span",{className:"".concat(at,"-selection-placeholder"),style:ga?{visibility:"hidden"}:void 0},mi)},[fa,ga,mi,at]);return Qe.createElement("span",{className:"".concat(at,"-selection-wrap")},Qe.createElement("span",{className:"".concat(at,"-selection-search")},Qe.createElement(Sn,{ref:qt,prefixCls:at,id:jt,open:yi,inputElement:et,disabled:gn,autoFocus:Vn,autoComplete:Qn,editable:Uo,activeDescendantId:Gn,value:Ea,onKeyDown:Fr,onMouseDown:jr,onChange:function(pa){oa(!0),To(pa)},onPaste:bi,onCompositionStart:Kr,onCompositionEnd:or,onBlur:Zr,tabIndex:ui,attrs:hi(Te,!0),maxLength:ro?ao:void 0})),!ro&&fa?Qe.createElement("span",{className:"".concat(at,"-selection-item"),title:_r,style:ga?{visibility:"hidden"}:void 0},fa.label):null,Co)},cu=hu,ul=function(Te,et){var at=(0,Qe.useRef)(null),jt=(0,Qe.useRef)(!1),qt=Te.prefixCls,gn=Te.open,Vn=Te.mode,Qn=Te.showSearch,Gn=Te.tokenWithEnter,gi=Te.disabled,yi=Te.prefix,_i=Te.autoClearSearchValue,mi=Te.onSearch,ui=Te.onSearchSubmit,Fi=Te.onToggleOpen,ji=Te.onInputKeyDown,Rr=Te.onInputBlur,ao=Te.domRef;Qe.useImperativeHandle(et,function(){return{focus:function(_r){at.current.focus(_r)},blur:function(){at.current.blur()}}});var Fr=Ai(0),jr=Tn(Fr,2),To=jr[0],bi=jr[1],Kr=function(_r){var Co=_r.which,Ma=at.current instanceof HTMLTextAreaElement;!Ma&&gn&&(Co===Rn.UP||Co===Rn.DOWN)&&_r.preventDefault(),ji&&ji(_r),Co===Rn.ENTER&&Vn==="tags"&&!jt.current&&!gn&&(ui==null||ui(_r.target.value)),!(Ma&&!gn&&~[Rn.UP,Rn.DOWN,Rn.LEFT,Rn.RIGHT].indexOf(Co))&&sr(Co)&&Fi(!0)},or=function(){bi(!0)},Zr=(0,Qe.useRef)(null),xo=function(_r){mi(_r,!0,jt.current)!==!1&&Fi(!0)},nr=function(){jt.current=!0},jo=function(_r){jt.current=!1,Vn!=="combobox"&&xo(_r.target.value)},co=function(_r){var Co=_r.target.value;if(Gn&&Zr.current&&/[\r\n]/.test(Zr.current)){var Ma=Zr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Co=Co.replace(Ma,Zr.current)}Zr.current=null,xo(Co)},oa=function(_r){var Co=_r.clipboardData,Ma=Co==null?void 0:Co.getData("text");Zr.current=Ma||""},ro=function(_r){var Co=_r.target;if(Co!==at.current){var Ma=document.body.style.msTouchAction!==void 0;Ma?setTimeout(function(){at.current.focus()}):at.current.focus()}},Uo=function(_r){var Co=To();_r.target!==at.current&&!Co&&!(Vn==="combobox"&&gi)&&_r.preventDefault(),(Vn!=="combobox"&&(!Qn||!Co)||!gn)&&(gn&&_i!==!1&&mi("",!0,!1),Fi())},fa={inputRef:at,onInputKeyDown:Kr,onInputMouseDown:or,onInputChange:co,onInputPaste:oa,onInputCompositionStart:nr,onInputCompositionEnd:jo,onInputBlur:Rr},Ea=Vn==="multiple"||Vn==="tags"?Qe.createElement(rs,ve({},Te,fa)):Qe.createElement(cu,ve({},Te,fa));return Qe.createElement("div",{ref:ao,className:"".concat(qt,"-selector"),onClick:ro,onMouseDown:Uo},yi&&Qe.createElement("div",{className:"".concat(qt,"-prefix")},yi),Ea)},kl=Qe.forwardRef(ul),zl=kl,sh=Me(98280),Su=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Ra=function(Te){var et=Te===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:et,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:et,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:et,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:et,adjustY:1},htmlRegion:"scroll"}}},qa=function(Te,et){var at=Te.prefixCls,jt=Te.disabled,qt=Te.visible,gn=Te.children,Vn=Te.popupElement,Qn=Te.animation,Gn=Te.transitionName,gi=Te.dropdownStyle,yi=Te.dropdownClassName,_i=Te.direction,mi=_i===void 0?"ltr":_i,ui=Te.placement,Fi=Te.builtinPlacements,ji=Te.dropdownMatchSelectWidth,Rr=Te.dropdownRender,ao=Te.dropdownAlign,Fr=Te.getPopupContainer,jr=Te.empty,To=Te.getTriggerDOMNode,bi=Te.onPopupVisibleChange,Kr=Te.onPopupMouseEnter,or=Ze(Te,Su),Zr="".concat(at,"-dropdown"),xo=Vn;Rr&&(xo=Rr(Vn));var nr=Qe.useMemo(function(){return Fi||Ra(ji)},[Fi,ji]),jo=Qn?"".concat(Zr,"-").concat(Qn):Gn,co=typeof ji=="number",oa=Qe.useMemo(function(){return co?null:ji===!1?"minWidth":"width"},[ji,co]),ro=gi;co&&(ro=pt(pt({},ro),{},{width:ji}));var Uo=Qe.useRef(null);return Qe.useImperativeHandle(et,function(){return{getPopupElement:function(){var Ea;return(Ea=Uo.current)===null||Ea===void 0?void 0:Ea.popupElement}}}),Qe.createElement(sh.Z,ve({},or,{showAction:bi?["click"]:[],hideAction:bi?["click"]:[],popupPlacement:ui||(mi==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:nr,prefixCls:Zr,popupTransitionName:jo,popup:Qe.createElement("div",{onMouseEnter:Kr},xo),ref:Uo,stretch:oa,popupAlign:ao,popupVisible:qt,getPopupContainer:Fr,popupClassName:qe()(yi,Lt({},"".concat(Zr,"-empty"),jr)),popupStyle:ro,getTriggerDOMNode:To,onPopupVisibleChange:bi}),gn)},Nr=Qe.forwardRef(qa),vr=Nr;function uo(ke){return dn(ke)||Oe(ke)||Re(ke)||vn()}function un(ke,Te){var et=ke.key,at;return"value"in ke&&(at=ke.value),et!=null?et:at!==void 0?at:"rc-index-key-".concat(Te)}function Gr(ke){return typeof ke!="undefined"&&!Number.isNaN(ke)}function Io(ke,Te){var et=ke||{},at=et.label,jt=et.value,qt=et.options,gn=et.groupLabel,Vn=at||(Te?"children":"label");return{label:Vn,value:jt||"value",options:qt||"options",groupLabel:gn||Vn}}function Va(ke){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=Te.fieldNames,at=Te.childrenAsData,jt=[],qt=Io(et,!1),gn=qt.label,Vn=qt.value,Qn=qt.options,Gn=qt.groupLabel;function gi(yi,_i){Array.isArray(yi)&&yi.forEach(function(mi){if(_i||!(Qn in mi)){var ui=mi[Vn];jt.push({key:un(mi,jt.length),groupOption:_i,data:mi,label:mi[gn],value:ui})}else{var Fi=mi[Gn];Fi===void 0&&at&&(Fi=mi.label),jt.push({key:un(mi,jt.length),group:!0,data:mi,label:Fi}),gi(mi[Qn],!0)}})}return gi(ke,!1),jt}function Ta(ke){var Te=pt({},ke);return"props"in Te||Object.defineProperty(Te,"props",{get:function(){return Ge(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Te}}),Te}var os=function(Te,et,at){if(!et||!et.length)return null;var jt=!1,qt=function Vn(Qn,Gn){var gi=uo(Gn),yi=gi[0],_i=gi.slice(1);if(!yi)return[Qn];var mi=Qn.split(yi);return jt=jt||mi.length>1,mi.reduce(function(ui,Fi){return[].concat(rt(ui),rt(Vn(Fi,_i)))},[]).filter(Boolean)},gn=qt(Te,et);return jt?typeof at!="undefined"?gn.slice(0,at):gn:null},Ws=Qe.createContext(null),vl=Ws;function yl(ke){var Te=ke.visible,et=ke.values;if(!Te)return null;var at=50;return Qe.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(et.slice(0,at).map(function(jt){var qt=jt.label,gn=jt.value;return["number","string"].includes(Je(qt))?qt:gn}).join(", ")),et.length>at?", ...":null)}var xu=["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"],Ou=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Xt=function(Te){return Te==="tags"||Te==="multiple"},El=Qe.forwardRef(function(ke,Te){var et,at=ke.id,jt=ke.prefixCls,qt=ke.className,gn=ke.showSearch,Vn=ke.tagRender,Qn=ke.direction,Gn=ke.omitDomProps,gi=ke.displayValues,yi=ke.onDisplayValuesChange,_i=ke.emptyOptions,mi=ke.notFoundContent,ui=mi===void 0?"Not Found":mi,Fi=ke.onClear,ji=ke.mode,Rr=ke.disabled,ao=ke.loading,Fr=ke.getInputElement,jr=ke.getRawInputElement,To=ke.open,bi=ke.defaultOpen,Kr=ke.onDropdownVisibleChange,or=ke.activeValue,Zr=ke.onActiveValueChange,xo=ke.activeDescendantId,nr=ke.searchValue,jo=ke.autoClearSearchValue,co=ke.onSearch,oa=ke.onSearchSplit,ro=ke.tokenSeparators,Uo=ke.allowClear,fa=ke.prefix,Ea=ke.suffixIcon,ga=ke.clearIcon,_r=ke.OptionList,Co=ke.animation,Ma=ke.transitionName,pa=ke.dropdownStyle,Da=ke.dropdownClassName,ka=ke.dropdownMatchSelectWidth,Xa=ke.dropdownRender,Oa=ke.dropdownAlign,es=ke.placement,Hs=ke.builtinPlacements,as=ke.getPopupContainer,wo=ke.showAction,yo=wo===void 0?[]:wo,fo=ke.onFocus,ar=ke.onBlur,mr=ke.onKeyUp,so=ke.onKeyDown,Jo=ke.onMouseDown,ha=Ze(ke,xu),Yo=Xt(ji),ss=(gn!==void 0?gn:Yo)||ji==="combobox",ks=pt({},ha);Ou.forEach(function(us){delete ks[us]}),Gn==null||Gn.forEach(function(us){delete ks[us]});var Za=Qe.useState(!1),Ks=Tn(Za,2),ns=Ks[0],fs=Ks[1];Qe.useEffect(function(){fs(rn())},[]);var ps=Qe.useRef(null),rl=Qe.useRef(null),ws=Qe.useRef(null),Ps=Qe.useRef(null),ts=Qe.useRef(null),ms=Qe.useRef(!1),xl=Li(),Cl=Tn(xl,3),lo=Cl[0],zr=Cl[1],to=Cl[2];Qe.useImperativeHandle(Te,function(){var us,Wa;return{focus:(us=Ps.current)===null||us===void 0?void 0:us.focus,blur:(Wa=Ps.current)===null||Wa===void 0?void 0:Wa.blur,scrollTo:function(dl){var Ol;return(Ol=ts.current)===null||Ol===void 0?void 0:Ol.scrollTo(dl)},nativeElement:ps.current||rl.current}});var va=Qe.useMemo(function(){var us;if(ji!=="combobox")return nr;var Wa=(us=gi[0])===null||us===void 0?void 0:us.value;return typeof Wa=="string"||typeof Wa=="number"?String(Wa):""},[nr,ji,gi]),Es=ji==="combobox"&&typeof Fr=="function"&&Fr()||null,Zs=typeof jr=="function"&&jr(),Al=Zt(rl,Zs==null||(et=Zs.props)===null||et===void 0?void 0:et.ref),kt=Qe.useState(!1),Hl=Tn(kt,2),$s=Hl[0],Ql=Hl[1];pn(function(){Ql(!0)},[]);var Ju=mt(!1,{defaultValue:bi,value:To}),Us=Tn(Ju,2),Go=Us[0],ja=Us[1],Wo=$s?Go:!1,ol=!ui&&_i;(Rr||ol&&Wo&&ji==="combobox")&&(Wo=!1);var Zl=ol?!1:Wo,Xo=Qe.useCallback(function(us){var Wa=us!==void 0?us:!Wo;Rr||(ja(Wa),Wo!==Wa&&(Kr==null||Kr(Wa)))},[Rr,Wo,ja,Kr]),Ca=Qe.useMemo(function(){return(ro||[]).some(function(us){return[`
|
|
`,`\r
|
|
`].includes(us)})},[ro]),ca=Qe.useContext(vl)||{},ma=ca.maxCount,ls=ca.rawValues,Ja=function(Wa,Lu,dl){if(!(Yo&&Gr(ma)&&(ls==null?void 0:ls.size)>=ma)){var Ol=!0,$l=Wa;Zr==null||Zr(null);var qu=os(Wa,ro,Gr(ma)?ma-ls.size:void 0),Mu=dl?null:qu;return ji!=="combobox"&&Mu&&($l="",oa==null||oa(Mu),Xo(!1),Ol=!1),co&&va!==$l&&co($l,{source:Lu?"typing":"effect"}),Ol}},du=function(Wa){!Wa||!Wa.trim()||co(Wa,{source:"submit"})};Qe.useEffect(function(){!Wo&&!Yo&&ji!=="combobox"&&Ja("",!1,!1)},[Wo]),Qe.useEffect(function(){Go&&Rr&&ja(!1),Rr&&!ms.current&&zr(!1)},[Rr]);var Qu=Ai(),Bl=Tn(Qu,2),al=Bl[0],$u=Bl[1],zu=Qe.useRef(!1),Tl=function(Wa){var Lu=al(),dl=Wa.key,Ol=dl==="Enter";if(Ol&&(ji!=="combobox"&&Wa.preventDefault(),Wo||Xo(!0)),$u(!!va),dl==="Backspace"&&!Lu&&Yo&&!va&&gi.length){for(var $l=rt(gi),qu=null,Mu=$l.length-1;Mu>=0;Mu-=1){var mc=$l[Mu];if(!mc.disabled){$l.splice(Mu,1),qu=mc;break}}qu&&yi($l,{type:"remove",values:[qu]})}for(var Fu=arguments.length,vc=new Array(Fu>1?Fu-1:0),Vc=1;Vc<Fu;Vc++)vc[Vc-1]=arguments[Vc];if(Wo&&(!Ol||!zu.current)){var Od;Ol&&(zu.current=!0),(Od=ts.current)===null||Od===void 0||Od.onKeyDown.apply(Od,[Wa].concat(vc))}so==null||so.apply(void 0,[Wa].concat(vc))},sd=function(Wa){for(var Lu=arguments.length,dl=new Array(Lu>1?Lu-1:0),Ol=1;Ol<Lu;Ol++)dl[Ol-1]=arguments[Ol];if(Wo){var $l;($l=ts.current)===null||$l===void 0||$l.onKeyUp.apply($l,[Wa].concat(dl))}Wa.key==="Enter"&&(zu.current=!1),mr==null||mr.apply(void 0,[Wa].concat(dl))},Na=function(Wa){var Lu=gi.filter(function(dl){return dl!==Wa});yi(Lu,{type:"remove",values:[Wa]})},qo=function(){zu.current=!1},qs=Qe.useRef(!1),bu=function(){zr(!0),Rr||(fo&&!qs.current&&fo.apply(void 0,arguments),yo.includes("focus")&&Xo(!0)),qs.current=!0},Dl=function(){ms.current=!0,zr(!1,function(){qs.current=!1,ms.current=!1,Xo(!1)}),!Rr&&(va&&(ji==="tags"?co(va,{source:"submit"}):ji==="multiple"&&co("",{source:"blur"})),ar&&ar.apply(void 0,arguments))},Wl=[];Qe.useEffect(function(){return function(){Wl.forEach(function(us){return clearTimeout(us)}),Wl.splice(0,Wl.length)}},[]);var wl=function(Wa){var Lu,dl=Wa.target,Ol=(Lu=ws.current)===null||Lu===void 0?void 0:Lu.getPopupElement();if(Ol&&Ol.contains(dl)){var $l=setTimeout(function(){var Fu=Wl.indexOf($l);if(Fu!==-1&&Wl.splice(Fu,1),to(),!ns&&!Ol.contains(document.activeElement)){var vc;(vc=Ps.current)===null||vc===void 0||vc.focus()}});Wl.push($l)}for(var qu=arguments.length,Mu=new Array(qu>1?qu-1:0),mc=1;mc<qu;mc++)Mu[mc-1]=arguments[mc];Jo==null||Jo.apply(void 0,[Wa].concat(Mu))},Bh=Qe.useState({}),Ns=Tn(Bh,2),fc=Ns[1];function sf(){fc({})}var gc;Zs&&(gc=function(Wa){Xo(Wa)}),Ur(function(){var us;return[ps.current,(us=ws.current)===null||us===void 0?void 0:us.getPopupElement()]},Zl,Xo,!!Zs);var ld=Qe.useMemo(function(){return pt(pt({},ke),{},{notFoundContent:ui,open:Wo,triggerOpen:Zl,id:at,showSearch:ss,multiple:Yo,toggleOpen:Xo})},[ke,ui,Zl,Wo,at,ss,Yo,Xo]),Zc=!!Ea||ao,lf;Zc&&(lf=Qe.createElement(oi,{className:qe()("".concat(jt,"-arrow"),Lt({},"".concat(jt,"-arrow-loading"),ao)),customizeIcon:Ea,customizeIconProps:{loading:ao,searchValue:va,open:Wo,focused:lo,showSearch:ss}}));var ud=function(){var Wa;Fi==null||Fi(),(Wa=Ps.current)===null||Wa===void 0||Wa.focus(),yi([],{type:"clear",values:gi}),Ja("",!1,!1)},uf=ri(jt,ud,gi,Uo,ga,Rr,va,ji),Jh=uf.allowClear,Wc=uf.clearIcon,hf=Qe.createElement(_r,{ref:ts}),cf=qe()(jt,qt,Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt(Lt({},"".concat(jt,"-focused"),lo),"".concat(jt,"-multiple"),Yo),"".concat(jt,"-single"),!Yo),"".concat(jt,"-allow-clear"),Uo),"".concat(jt,"-show-arrow"),Zc),"".concat(jt,"-disabled"),Rr),"".concat(jt,"-loading"),ao),"".concat(jt,"-open"),Wo),"".concat(jt,"-customize-input"),Es),"".concat(jt,"-show-search"),ss)),Dd=Qe.createElement(vr,{ref:ws,disabled:Rr,prefixCls:jt,visible:Zl,popupElement:hf,animation:Co,transitionName:Ma,dropdownStyle:pa,dropdownClassName:Da,direction:Qn,dropdownMatchSelectWidth:ka,dropdownRender:Xa,dropdownAlign:Oa,placement:es,builtinPlacements:Hs,getPopupContainer:as,empty:_i,getTriggerDOMNode:function(Wa){return rl.current||Wa},onPopupVisibleChange:gc,onPopupMouseEnter:sf},Zs?Qe.cloneElement(Zs,{ref:Al}):Qe.createElement(zl,ve({},ke,{domRef:rl,prefixCls:jt,inputElement:Es,ref:Ps,id:at,prefix:fa,showSearch:ss,autoClearSearchValue:jo,mode:ji,activeDescendantId:xo,tagRender:Vn,values:gi,open:Wo,onToggleOpen:Xo,activeValue:or,searchValue:va,onSearch:Ja,onSearchSubmit:du,onRemove:Na,tokenWithEnter:Ca,onInputBlur:qo}))),pc;return Zs?pc=Dd:pc=Qe.createElement("div",ve({className:cf},ks,{ref:ps,onMouseDown:wl,onKeyDown:Tl,onKeyUp:sd,onFocus:bu,onBlur:Dl}),Qe.createElement(yl,{visible:lo&&!Wo,values:gi}),Dd,lf,Jh&&Wc),Qe.createElement(fr.Provider,{value:ld},pc)}),Gl=El,wu=function(){return null};wu.isSelectOptGroup=!0;var vs=wu,Yu=function(){return null};Yu.isSelectOption=!0;var Hh=Yu;function yh(ke,Te){var et=pt({},ke);return Array.isArray(Te)&&Te.forEach(function(at){delete et[at]}),et}var Ka=Me(73299);function Ko(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Bo=["disabled","title","children","style","className"];function ia(ke){return typeof ke=="string"||typeof ke=="number"}var Ua=function(Te,et){var at=wr(),jt=at.prefixCls,qt=at.id,gn=at.open,Vn=at.multiple,Qn=at.mode,Gn=at.searchValue,gi=at.toggleOpen,yi=at.notFoundContent,_i=at.onPopupScroll,mi=Qe.useContext(vl),ui=mi.maxCount,Fi=mi.flattenOptions,ji=mi.onActiveValue,Rr=mi.defaultActiveFirstOption,ao=mi.onSelect,Fr=mi.menuItemSelectedIcon,jr=mi.rawValues,To=mi.fieldNames,bi=mi.virtual,Kr=mi.direction,or=mi.listHeight,Zr=mi.listItemHeight,xo=mi.optionRender,nr="".concat(jt,"-item"),jo=Zn(function(){return Fi},[gn,Fi],function(wo,yo){return yo[0]&&wo[1]!==yo[1]}),co=Qe.useRef(null),oa=Qe.useMemo(function(){return Vn&&Gr(ui)&&(jr==null?void 0:jr.size)>=ui},[Vn,ui,jr==null?void 0:jr.size]),ro=function(yo){yo.preventDefault()},Uo=function(yo){var fo;(fo=co.current)===null||fo===void 0||fo.scrollTo(typeof yo=="number"?{index:yo}:yo)},fa=Qe.useCallback(function(wo){return Qn==="combobox"?!1:jr.has(wo)},[Qn,rt(jr).toString(),jr.size]),Ea=function(yo){for(var fo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ar=jo.length,mr=0;mr<ar;mr+=1){var so=(yo+mr*fo+ar)%ar,Jo=jo[so]||{},ha=Jo.group,Yo=Jo.data;if(!ha&&!(Yo!=null&&Yo.disabled)&&(fa(Yo.value)||!oa))return so}return-1},ga=Qe.useState(function(){return Ea(0)}),_r=Tn(ga,2),Co=_r[0],Ma=_r[1],pa=function(yo){var fo=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Ma(yo);var ar={source:fo?"keyboard":"mouse"},mr=jo[yo];if(!mr){ji(null,-1,ar);return}ji(mr.value,yo,ar)};(0,Qe.useEffect)(function(){pa(Rr!==!1?Ea(0):-1)},[jo.length,Gn]);var Da=Qe.useCallback(function(wo){return Qn==="combobox"?String(wo).toLowerCase()===Gn.toLowerCase():jr.has(wo)},[Qn,Gn,rt(jr).toString(),jr.size]);(0,Qe.useEffect)(function(){var wo=setTimeout(function(){if(!Vn&&gn&&jr.size===1){var fo=Array.from(jr)[0],ar=jo.findIndex(function(mr){var so=mr.data;return so.value===fo});ar!==-1&&(pa(ar),Uo(ar))}});if(gn){var yo;(yo=co.current)===null||yo===void 0||yo.scrollTo(void 0)}return function(){return clearTimeout(wo)}},[gn,Gn]);var ka=function(yo){yo!==void 0&&ao(yo,{selected:!jr.has(yo)}),Vn||gi(!1)};if(Qe.useImperativeHandle(et,function(){return{onKeyDown:function(yo){var fo=yo.which,ar=yo.ctrlKey;switch(fo){case Rn.N:case Rn.P:case Rn.UP:case Rn.DOWN:{var mr=0;if(fo===Rn.UP?mr=-1:fo===Rn.DOWN?mr=1:Ko()&&ar&&(fo===Rn.N?mr=1:fo===Rn.P&&(mr=-1)),mr!==0){var so=Ea(Co+mr,mr);Uo(so),pa(so,!0)}break}case Rn.TAB:case Rn.ENTER:{var Jo,ha=jo[Co];ha&&!(ha!=null&&(Jo=ha.data)!==null&&Jo!==void 0&&Jo.disabled)&&!oa?ka(ha.value):ka(void 0),gn&&yo.preventDefault();break}case Rn.ESC:gi(!1),gn&&yo.stopPropagation()}},onKeyUp:function(){},scrollTo:function(yo){Uo(yo)}}}),jo.length===0)return Qe.createElement("div",{role:"listbox",id:"".concat(qt,"_list"),className:"".concat(nr,"-empty"),onMouseDown:ro},yi);var Xa=Object.keys(To).map(function(wo){return To[wo]}),Oa=function(yo){return yo.label};function es(wo,yo){var fo=wo.group;return{role:fo?"presentation":"option",id:"".concat(qt,"_list_").concat(yo)}}var Hs=function(yo){var fo=jo[yo];if(!fo)return null;var ar=fo.data||{},mr=ar.value,so=fo.group,Jo=hi(ar,!0),ha=Oa(fo);return fo?Qe.createElement("div",ve({"aria-label":typeof ha=="string"&&!so?ha:null},Jo,{key:yo},es(fo,yo),{"aria-selected":Da(mr)}),mr):null},as={role:"listbox",id:"".concat(qt,"_list")};return Qe.createElement(Qe.Fragment,null,bi&&Qe.createElement("div",ve({},as,{style:{height:0,width:0,overflow:"hidden"}}),Hs(Co-1),Hs(Co),Hs(Co+1)),Qe.createElement(Ka.Z,{itemKey:"key",ref:co,data:jo,height:or,itemHeight:Zr,fullHeight:!1,onMouseDown:ro,onScroll:_i,virtual:bi,direction:Kr,innerProps:bi?null:as},function(wo,yo){var fo=wo.group,ar=wo.groupOption,mr=wo.data,so=wo.label,Jo=wo.value,ha=mr.key;if(fo){var Yo,ss=(Yo=mr.title)!==null&&Yo!==void 0?Yo:ia(so)?so.toString():void 0;return Qe.createElement("div",{className:qe()(nr,"".concat(nr,"-group"),mr.className),title:ss},so!==void 0?so:ha)}var ks=mr.disabled,Za=mr.title,Ks=mr.children,ns=mr.style,fs=mr.className,ps=Ze(mr,Bo),rl=yh(ps,Xa),ws=fa(Jo),Ps=ks||!ws&&oa,ts="".concat(nr,"-option"),ms=qe()(nr,ts,fs,Lt(Lt(Lt(Lt({},"".concat(ts,"-grouped"),ar),"".concat(ts,"-active"),Co===yo&&!Ps),"".concat(ts,"-disabled"),Ps),"".concat(ts,"-selected"),ws)),xl=Oa(wo),Cl=!Fr||typeof Fr=="function"||ws,lo=typeof xl=="number"?xl:xl||Jo,zr=ia(lo)?lo.toString():void 0;return Za!==void 0&&(zr=Za),Qe.createElement("div",ve({},hi(rl),bi?{}:es(wo,yo),{"aria-selected":Da(Jo),className:ms,title:zr,onMouseMove:function(){Co===yo||Ps||pa(yo)},onClick:function(){Ps||ka(Jo)},style:ns}),Qe.createElement("div",{className:"".concat(ts,"-content")},typeof xo=="function"?xo(wo,{index:yo}):lo),Qe.isValidElement(Fr)||ws,Cl&&Qe.createElement(oi,{className:"".concat(nr,"-option-state"),customizeIcon:Fr,customizeIconProps:{value:Jo,disabled:Ps,isSelected:ws}},ws?"\u2713":null))}))},cs=Qe.forwardRef(Ua),Sr=cs,Zh=function(ke,Te){var et=Qe.useRef({values:new Map,options:new Map}),at=Qe.useMemo(function(){var qt=et.current,gn=qt.values,Vn=qt.options,Qn=ke.map(function(yi){if(yi.label===void 0){var _i;return pt(pt({},yi),{},{label:(_i=gn.get(yi.value))===null||_i===void 0?void 0:_i.label})}return yi}),Gn=new Map,gi=new Map;return Qn.forEach(function(yi){Gn.set(yi.value,yi),gi.set(yi.value,Te.get(yi.value)||Vn.get(yi.value))}),et.current.values=Gn,et.current.options=gi,Qn},[ke,Te]),jt=Qe.useCallback(function(qt){return Te.get(qt)||et.current.options.get(qt)},[Te]);return[at,jt]};function _u(ke,Te){return Zo(ke).join("").toUpperCase().includes(Te)}var Sl=function(ke,Te,et,at,jt){return Qe.useMemo(function(){if(!et||at===!1)return ke;var qt=Te.options,gn=Te.label,Vn=Te.value,Qn=[],Gn=typeof at=="function",gi=et.toUpperCase(),yi=Gn?at:function(mi,ui){return jt?_u(ui[jt],gi):ui[qt]?_u(ui[gn!=="children"?gn:"label"],gi):_u(ui[Vn],gi)},_i=Gn?function(mi){return Ta(mi)}:function(mi){return mi};return ke.forEach(function(mi){if(mi[qt]){var ui=yi(et,_i(mi));if(ui)Qn.push(mi);else{var Fi=mi[qt].filter(function(ji){return yi(et,_i(ji))});Fi.length&&Qn.push(pt(pt({},mi),{},Lt({},qt,Fi)))}return}yi(et,_i(mi))&&Qn.push(mi)}),Qn},[ke,at,jt,et,Te])},Wh=0,lh=kn();function Di(){var ke;return lh?(ke=Wh,Wh+=1):ke="TEST_OR_SSR",ke}function Ms(ke){var Te=Qe.useState(),et=Tn(Te,2),at=et[0],jt=et[1];return Qe.useEffect(function(){jt("rc_select_".concat(Di()))},[]),ke||at}function Os(ke){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},et=[];return Qe.Children.forEach(ke,function(at){at==null&&!Te.keepEmpty||(Array.isArray(at)?et=et.concat(Os(at)):(0,Kn.isFragment)(at)&&at.props?et=et.concat(Os(at.props.children,Te)):et.push(at))}),et}var Iu=["children","value"],sc=["children"];function Vh(ke){var Te=ke,et=Te.key,at=Te.props,jt=at.children,qt=at.value,gn=Ze(at,Iu);return pt({key:et,value:qt!==void 0?qt:et,children:jt},gn)}function Oo(ke){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Os(ke).map(function(et,at){if(!Qe.isValidElement(et)||!et.type)return null;var jt=et,qt=jt.type.isSelectOptGroup,gn=jt.key,Vn=jt.props,Qn=Vn.children,Gn=Ze(Vn,sc);return Te||!qt?Vh(et):pt(pt({key:"__RC_SELECT_GRP__".concat(gn===null?at:gn,"__"),label:gn},Gn),{},{options:Oo(Qn)})}).filter(function(et){return et})}var Fh=function(Te,et,at,jt,qt){return Qe.useMemo(function(){var gn=Te,Vn=!Te;Vn&&(gn=Oo(et));var Qn=new Map,Gn=new Map,gi=function(mi,ui,Fi){Fi&&typeof Fi=="string"&&mi.set(ui[Fi],ui)},yi=function _i(mi){for(var ui=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Fi=0;Fi<mi.length;Fi+=1){var ji=mi[Fi];!ji[at.options]||ui?(Qn.set(ji[at.value],ji),gi(Gn,ji,at.label),gi(Gn,ji,jt),gi(Gn,ji,qt)):_i(ji[at.options],!0)}};return yi(gn),{options:gn,valueOptions:Qn,labelOptions:Gn}},[Te,et,at,jt,qt])},Pu=Fh;function zs(ke){var Te=Qe.useRef();Te.current=ke;var et=Qe.useCallback(function(){return Te.current.apply(Te,arguments)},[]);return et}function il(ke){var Te=ke.mode,et=ke.options,at=ke.children,jt=ke.backfill,qt=ke.allowClear,gn=ke.placeholder,Vn=ke.getInputElement,Qn=ke.showSearch,Gn=ke.onSearch,gi=ke.defaultOpen,yi=ke.autoFocus,_i=ke.labelInValue,mi=ke.value,ui=ke.inputValue,Fi=ke.optionLabelProp,ji=isMultiple(Te),Rr=Qn!==void 0?Qn:ji||Te==="combobox",ao=et||convertChildrenToData(at);if(warning(Te!=="tags"||ao.every(function(bi){return!bi.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Te==="tags"||Te==="combobox"){var Fr=ao.some(function(bi){return bi.options?bi.options.some(function(Kr){return typeof("value"in Kr?Kr.value:Kr.key)=="number"}):typeof("value"in bi?bi.value:bi.key)=="number"});warning(!Fr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Te!=="combobox"||!Fi,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Te==="combobox"||!jt,"`backfill` only works with `combobox` mode."),warning(Te==="combobox"||!Vn,"`getInputElement` only work with `combobox` mode."),noteOnce(Te!=="combobox"||!Vn||!qt||!gn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Gn&&!Rr&&Te!=="combobox"&&Te!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!gi||yi,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),mi!=null){var jr=toArray(mi);warning(!_i||jr.every(function(bi){return _typeof(bi)==="object"&&("key"in bi||"value"in bi)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!ji||Array.isArray(mi),"`value` should be array when `mode` is `multiple` or `tags`")}if(at){var To=null;toNodeArray(at).some(function(bi){if(!React.isValidElement(bi)||!bi.type)return!1;var Kr=bi,or=Kr.type;if(or.isSelectOption)return!1;if(or.isSelectOptGroup){var Zr=toNodeArray(bi.props.children).every(function(xo){return!React.isValidElement(xo)||!bi.type||xo.type.isSelectOption?!0:(To=xo.type,!1)});return!Zr}return To=or,!0}),To&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(To.displayName||To.name||To,"`.")),warning(ui===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function kh(ke,Te){if(ke){var et=function at(jt){for(var qt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,gn=0;gn<jt.length;gn++){var Vn=jt[gn];if(Vn[Te==null?void 0:Te.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!qt&&Array.isArray(Vn[Te==null?void 0:Te.options])&&at(Vn[Te==null?void 0:Te.options],!0))break}};et(ke)}}var lc=null,Ml=["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"],Eu=["inputValue"];function uc(ke){return!ke||Je(ke)!=="object"}var od=Qe.forwardRef(function(ke,Te){var et=ke.id,at=ke.mode,jt=ke.prefixCls,qt=jt===void 0?"rc-select":jt,gn=ke.backfill,Vn=ke.fieldNames,Qn=ke.inputValue,Gn=ke.searchValue,gi=ke.onSearch,yi=ke.autoClearSearchValue,_i=yi===void 0?!0:yi,mi=ke.onSelect,ui=ke.onDeselect,Fi=ke.dropdownMatchSelectWidth,ji=Fi===void 0?!0:Fi,Rr=ke.filterOption,ao=ke.filterSort,Fr=ke.optionFilterProp,jr=ke.optionLabelProp,To=ke.options,bi=ke.optionRender,Kr=ke.children,or=ke.defaultActiveFirstOption,Zr=ke.menuItemSelectedIcon,xo=ke.virtual,nr=ke.direction,jo=ke.listHeight,co=jo===void 0?200:jo,oa=ke.listItemHeight,ro=oa===void 0?20:oa,Uo=ke.labelRender,fa=ke.value,Ea=ke.defaultValue,ga=ke.labelInValue,_r=ke.onChange,Co=ke.maxCount,Ma=Ze(ke,Ml),pa=Ms(et),Da=Xt(at),ka=!!(!To&&Kr),Xa=Qe.useMemo(function(){return Rr===void 0&&at==="combobox"?!1:Rr},[Rr,at]),Oa=Qe.useMemo(function(){return Io(Vn,ka)},[JSON.stringify(Vn),ka]),es=mt("",{value:Gn!==void 0?Gn:Qn,postState:function(Ca){return Ca||""}}),Hs=Tn(es,2),as=Hs[0],wo=Hs[1],yo=Pu(To,Kr,Oa,Fr,jr),fo=yo.valueOptions,ar=yo.labelOptions,mr=yo.options,so=Qe.useCallback(function(Xo){var Ca=Zo(Xo);return Ca.map(function(ca){var ma,ls,Ja,du,Qu;if(uc(ca))ma=ca;else{var Bl;Ja=ca.key,ls=ca.label,ma=(Bl=ca.value)!==null&&Bl!==void 0?Bl:Ja}var al=fo.get(ma);if(al){var $u;if(ls===void 0&&(ls=al==null?void 0:al[jr||Oa.label]),Ja===void 0&&(Ja=($u=al==null?void 0:al.key)!==null&&$u!==void 0?$u:ma),du=al==null?void 0:al.disabled,Qu=al==null?void 0:al.title,0)var zu}return{label:ls,value:ma,key:Ja,disabled:du,title:Qu}})},[Oa,jr,fo]),Jo=mt(Ea,{value:fa}),ha=Tn(Jo,2),Yo=ha[0],ss=ha[1],ks=Qe.useMemo(function(){var Xo,Ca=Da&&Yo===null?[]:Yo,ca=so(Ca);return at==="combobox"&&Ha((Xo=ca[0])===null||Xo===void 0?void 0:Xo.value)?[]:ca},[Yo,so,at,Da]),Za=Zh(ks,fo),Ks=Tn(Za,2),ns=Ks[0],fs=Ks[1],ps=Qe.useMemo(function(){if(!at&&ns.length===1){var Xo=ns[0];if(Xo.value===null&&(Xo.label===null||Xo.label===void 0))return[]}return ns.map(function(Ca){var ca;return pt(pt({},Ca),{},{label:(ca=typeof Uo=="function"?Uo(Ca):Ca.label)!==null&&ca!==void 0?ca:Ca.value})})},[at,ns,Uo]),rl=Qe.useMemo(function(){return new Set(ns.map(function(Xo){return Xo.value}))},[ns]);Qe.useEffect(function(){if(at==="combobox"){var Xo,Ca=(Xo=ns[0])===null||Xo===void 0?void 0:Xo.value;wo(Ll(Ca)?String(Ca):"")}},[ns]);var ws=zs(function(Xo,Ca){var ca=Ca!=null?Ca:Xo;return Lt(Lt({},Oa.value,Xo),Oa.label,ca)}),Ps=Qe.useMemo(function(){if(at!=="tags")return mr;var Xo=rt(mr),Ca=function(ma){return fo.has(ma)};return rt(ns).sort(function(ca,ma){return ca.value<ma.value?-1:1}).forEach(function(ca){var ma=ca.value;Ca(ma)||Xo.push(ws(ma,ca.label))}),Xo},[ws,mr,fo,ns,at]),ts=Sl(Ps,Oa,as,Xa,Fr),ms=Qe.useMemo(function(){return at!=="tags"||!as||ts.some(function(Xo){return Xo[Fr||"value"]===as})||ts.some(function(Xo){return Xo[Oa.value]===as})?ts:[ws(as)].concat(rt(ts))},[ws,Fr,at,ts,as,Oa]),xl=function Xo(Ca){var ca=rt(Ca).sort(function(ma,ls){return ao(ma,ls,{searchValue:as})});return ca.map(function(ma){return Array.isArray(ma.options)?pt(pt({},ma),{},{options:ma.options.length>0?Xo(ma.options):ma.options}):ma})},Cl=Qe.useMemo(function(){return ao?xl(ms):ms},[ms,ao,as]),lo=Qe.useMemo(function(){return Va(Cl,{fieldNames:Oa,childrenAsData:ka})},[Cl,Oa,ka]),zr=function(Ca){var ca=so(Ca);if(ss(ca),_r&&(ca.length!==ns.length||ca.some(function(Ja,du){var Qu;return((Qu=ns[du])===null||Qu===void 0?void 0:Qu.value)!==(Ja==null?void 0:Ja.value)}))){var ma=ga?ca:ca.map(function(Ja){return Ja.value}),ls=ca.map(function(Ja){return Ta(fs(Ja.value))});_r(Da?ma:ma[0],Da?ls:ls[0])}},to=Qe.useState(null),va=Tn(to,2),Es=va[0],Zs=va[1],Al=Qe.useState(0),kt=Tn(Al,2),Hl=kt[0],$s=kt[1],Ql=or!==void 0?or:at!=="combobox",Ju=Qe.useCallback(function(Xo,Ca){var ca=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ma=ca.source,ls=ma===void 0?"keyboard":ma;$s(Ca),gn&&at==="combobox"&&Xo!==null&&ls==="keyboard"&&Zs(String(Xo))},[gn,at]),Us=function(Ca,ca,ma){var ls=function(){var Na,qo=fs(Ca);return[ga?{label:qo==null?void 0:qo[Oa.label],value:Ca,key:(Na=qo==null?void 0:qo.key)!==null&&Na!==void 0?Na:Ca}:Ca,Ta(qo)]};if(ca&&mi){var Ja=ls(),du=Tn(Ja,2),Qu=du[0],Bl=du[1];mi(Qu,Bl)}else if(!ca&&ui&&ma!=="clear"){var al=ls(),$u=Tn(al,2),zu=$u[0],Tl=$u[1];ui(zu,Tl)}},Go=zs(function(Xo,Ca){var ca,ma=Da?Ca.selected:!0;ma?ca=Da?[].concat(rt(ns),[Xo]):[Xo]:ca=ns.filter(function(ls){return ls.value!==Xo}),zr(ca),Us(Xo,ma),at==="combobox"?Zs(""):(!Xt||_i)&&(wo(""),Zs(""))}),ja=function(Ca,ca){zr(Ca);var ma=ca.type,ls=ca.values;(ma==="remove"||ma==="clear")&&ls.forEach(function(Ja){Us(Ja.value,!1,ma)})},Wo=function(Ca,ca){if(wo(Ca),Zs(null),ca.source==="submit"){var ma=(Ca||"").trim();if(ma){var ls=Array.from(new Set([].concat(rt(rl),[ma])));zr(ls),Us(ma,!0),wo("")}return}ca.source!=="blur"&&(at==="combobox"&&zr(Ca),gi==null||gi(Ca))},ol=function(Ca){var ca=Ca;at!=="tags"&&(ca=Ca.map(function(ls){var Ja=ar.get(ls);return Ja==null?void 0:Ja.value}).filter(function(ls){return ls!==void 0}));var ma=Array.from(new Set([].concat(rt(rl),rt(ca))));zr(ma),ma.forEach(function(ls){Us(ls,!0)})},Zl=Qe.useMemo(function(){var Xo=xo!==!1&&ji!==!1;return pt(pt({},yo),{},{flattenOptions:lo,onActiveValue:Ju,defaultActiveFirstOption:Ql,onSelect:Go,menuItemSelectedIcon:Zr,rawValues:rl,fieldNames:Oa,virtual:Xo,direction:nr,listHeight:co,listItemHeight:ro,childrenAsData:ka,maxCount:Co,optionRender:bi})},[Co,yo,lo,Ju,Ql,Go,Zr,rl,Oa,xo,ji,nr,co,ro,ka,bi]);return Qe.createElement(vl.Provider,{value:Zl},Qe.createElement(Gl,ve({},Ma,{id:pa,prefixCls:qt,ref:Te,omitDomProps:Eu,mode:at,displayValues:ps,onDisplayValuesChange:ja,direction:nr,searchValue:as,onSearch:Wo,autoClearSearchValue:_i,onSearchSplit:ol,dropdownMatchSelectWidth:ji,OptionList:Sr,emptyOptions:!lo.length,activeValue:Es,activeDescendantId:"".concat(pa,"_list_").concat(Hl)})))}),hc=od;hc.Option=Hh,hc.OptGroup=vs;var ad=null,bc=null;function Jl(ke){var Te=Qe.useRef();Te.current=ke;var et=Qe.useCallback(function(){for(var at,jt=arguments.length,qt=new Array(jt),gn=0;gn<jt;gn++)qt[gn]=arguments[gn];return(at=Te.current)===null||at===void 0?void 0:at.call.apply(at,[Te].concat(qt))},[]);return et}function Nh(ke){if(Array.isArray(ke))return ke}function Ru(ke,Te){var et=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(et!=null){var at,jt,qt,gn,Vn=[],Qn=!0,Gn=!1;try{if(qt=(et=et.call(ke)).next,Te===0){if(Object(et)!==et)return;Qn=!1}else for(;!(Qn=(at=qt.call(et)).done)&&(Vn.push(at.value),Vn.length!==Te);Qn=!0);}catch(gi){Gn=!0,jt=gi}finally{try{if(!Qn&&et.return!=null&&(gn=et.return(),Object(gn)!==gn))return}finally{if(Gn)throw jt}}return Vn}}function Kh(ke,Te){(Te==null||Te>ke.length)&&(Te=ke.length);for(var et=0,at=new Array(Te);et<Te;et++)at[et]=ke[et];return at}function Uh(ke,Te){if(ke){if(typeof ke=="string")return Kh(ke,Te);var et=Object.prototype.toString.call(ke).slice(8,-1);if(et==="Object"&&ke.constructor&&(et=ke.constructor.name),et==="Map"||et==="Set")return Array.from(ke);if(et==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(et))return Kh(ke,Te)}}function Lc(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fs(ke,Te){return Nh(ke)||Ru(ke,Te)||Uh(ke,Te)||Lc()}function Yh(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Mc=Yh()?Qe.useLayoutEffect:Qe.useEffect,cc=function(Te,et){var at=Qe.useRef(!0);Mc(function(){return Te(at.current)},et),Mc(function(){return at.current=!1,function(){at.current=!0}},[])},Sh=function(Te,et){cc(function(at){if(!at)return Te()},et)},Fl=null;function hl(ke){var Te=Qe.useRef(!1),et=Qe.useState(ke),at=Fs(et,2),jt=at[0],qt=at[1];Qe.useEffect(function(){return Te.current=!1,function(){Te.current=!0}},[]);function gn(Vn,Qn){Qn&&Te.current||qt(Vn)}return[jt,gn]}function _s(ke){return ke!==void 0}function Qs(ke,Te){var et=Te||{},at=et.defaultValue,jt=et.value,qt=et.onChange,gn=et.postState,Vn=hl(function(){return _s(jt)?jt:_s(at)?typeof at=="function"?at():at:typeof ke=="function"?ke():ke}),Qn=Fs(Vn,2),Gn=Qn[0],gi=Qn[1],yi=jt!==void 0?jt:Gn,_i=gn?gn(yi):yi,mi=Jl(qt),ui=hl([yi]),Fi=Fs(ui,2),ji=Fi[0],Rr=Fi[1];Sh(function(){var Fr=ji[0];Gn!==Fr&&mi(Gn,Fr)},[ji]),Sh(function(){_s(jt)||gi(jt)},[jt]);var ao=Jl(function(Fr,jr){gi(Fr,jr),Rr([yi],jr)});return[_i,ao]}var Xh=Qe.createContext({}),ys=Xh,Ya="__rc_cascader_search_mark__",Nl=function(Te,et,at){var jt=at.label,qt=jt===void 0?"":jt;return et.some(function(gn){return String(gn[qt]).toLowerCase().includes(Te.toLowerCase())})},dc=function(Te,et,at,jt){return et.map(function(qt){return qt[jt.label]}).join(" / ")},Fc=function(Te,et,at,jt,qt,gn){var Vn=qt.filter,Qn=Vn===void 0?Nl:Vn,Gn=qt.render,gi=Gn===void 0?dc:Gn,yi=qt.limit,_i=yi===void 0?50:yi,mi=qt.sort;return Qe.useMemo(function(){var ui=[];if(!Te)return[];function Fi(ji,Rr){var ao=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;ji.forEach(function(Fr){if(!(!mi&&_i!==!1&&_i>0&&ui.length>=_i)){var jr=[].concat(Bt(Rr),[Fr]),To=Fr[at.children],bi=ao||Fr.disabled;if((!To||To.length===0||gn)&&Qn(Te,jr,{label:at.label})){var Kr;ui.push(He(He({},Fr),{},(Kr={disabled:bi},ft(Kr,at.label,gi(Te,jr,jt,at)),ft(Kr,Ya,jr),ft(Kr,at.children,void 0),Kr)))}To&&Fi(Fr[at.children],jr,bi)}})}return Fi(et,[]),mi&&ui.sort(function(ji,Rr){return mi(ji[Ya],Rr[Ya],Te,at)}),_i!==!1&&_i>0?ui.slice(0,_i):ui},[Te,et,at,jt,gi,gn,Qn,mi,_i])},ct=Fc,Vt="__RC_CASCADER_SPLIT__",Ie="SHOW_PARENT",wt="SHOW_CHILD";function no(ke){return ke.join(Vt)}function Ar(ke){return ke.map(no)}function ko(ke){return ke.split(Vt)}function Tr(ke){var Te=ke||{},et=Te.label,at=Te.value,jt=Te.children,qt=at||"value";return{label:et||"label",value:qt,key:qt,children:jt||"children"}}function Ir(ke,Te){var et,at;return(et=ke.isLeaf)!==null&&et!==void 0?et:!((at=ke[Te.children])!==null&&at!==void 0&&at.length)}function la(ke){var Te=ke.parentElement;if(Te){var et=ke.offsetTop-Te.offsetTop;et-Te.scrollTop<0?Te.scrollTo({top:et}):et+ke.offsetHeight-Te.scrollTop>Te.offsetHeight&&Te.scrollTo({top:et+ke.offsetHeight-Te.offsetHeight})}}function vo(ke,Te){return ke.map(function(et){var at;return(at=et[Ya])===null||at===void 0?void 0:at.map(function(jt){return jt[Te.value]})})}function qr(ke){return Array.isArray(ke)&&Array.isArray(ke[0])}function Ki(ke){return ke?qr(ke)?ke:(ke.length===0?[]:[ke]).map(function(Te){return Array.isArray(Te)?Te:[Te]}):[]}function No(ke,Te,et){var at=new Set(ke),jt=Te();return ke.filter(function(qt){var gn=jt[qt],Vn=gn?gn.parent:null,Qn=gn?gn.children:null;return gn&&gn.node.disabled?!0:et===wt?!(Qn&&Qn.some(function(Gn){return Gn.key&&at.has(Gn.key)})):!(Vn&&!Vn.node.disabled&&at.has(Vn.key))})}function Gi(ke,Te,et){for(var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,jt=Te,qt=[],gn=function(){var Gn,gi,yi,_i=ke[Vn],mi=(Gn=jt)===null||Gn===void 0?void 0:Gn.findIndex(function(Fi){var ji=Fi[et.value];return at?String(ji)===String(_i):ji===_i}),ui=mi!==-1?(gi=jt)===null||gi===void 0?void 0:gi[mi]:null;qt.push({value:(yi=ui==null?void 0:ui[et.value])!==null&&yi!==void 0?yi:_i,index:mi,option:ui}),jt=ui==null?void 0:ui[et.children]},Vn=0;Vn<ke.length;Vn+=1)gn();return qt}var ur=function(ke,Te,et,at,jt){return Qe.useMemo(function(){var qt=jt||function(gn){var Vn=at?gn.slice(-1):gn,Qn=" / ";return Vn.every(function(Gn){return["string","number"].includes(Ke(Gn))})?Vn.join(Qn):Vn.reduce(function(Gn,gi,yi){var _i=Qe.isValidElement(gi)?Qe.cloneElement(gi,{key:yi}):gi;return yi===0?[_i]:[].concat(Bt(Gn),[Qn,_i])},[])};return ke.map(function(gn){var Vn,Qn=Gi(gn,Te,et),Gn=qt(Qn.map(function(yi){var _i,mi=yi.option,ui=yi.value;return(_i=mi==null?void 0:mi[et.label])!==null&&_i!==void 0?_i:ui}),Qn.map(function(yi){var _i=yi.option;return _i})),gi=no(gn);return{label:Gn,value:gi,key:gi,valueCells:gn,disabled:(Vn=Qn[Qn.length-1])===null||Vn===void 0||(Vn=Vn.option)===null||Vn===void 0?void 0:Vn.disabled}})},[ke,Te,et,jt,at])};function Qi(ke,Te){return Qe.useCallback(function(et){var at=[],jt=[];return et.forEach(function(qt){var gn=Gi(qt,ke,Te);gn.every(function(Vn){return Vn.option})?jt.push(qt):at.push(qt)}),[jt,at]},[ke,Te])}var eo=Me(1089),Or=function(ke,Te){var et=Qe.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),at=Qe.useCallback(function(){return et.current.options!==ke&&(et.current.options=ke,et.current.info=(0,eo.I8)(ke,{fieldNames:Te,initWrapper:function(qt){return He(He({},qt),{},{pathKeyEntities:{}})},processEntity:function(qt,gn){var Vn=qt.nodes.map(function(Qn){return Qn[Te.value]}).join(Vt);gn.pathKeyEntities[Vn]=qt,qt.key=Vn}})),et.current.info.pathKeyEntities},[Te,ke]);return at};function Yr(ke,Te){var et=Qe.useMemo(function(){return Te||[]},[Te]),at=Or(et,ke),jt=Qe.useCallback(function(qt){var gn=at();return qt.map(function(Vn){var Qn=gn[Vn].nodes;return Qn.map(function(Gn){return Gn[ke.value]})})},[at,ke]);return[et,at,jt]}var Eo={},Vi=[],Hr=function(Te){Vi.push(Te)};function xi(ke,Te){if(0)var et}function tr(ke,Te){if(0)var et}function Er(){Eo={}}function Ao(ke,Te,et){!Te&&!Eo[et]&&(ke(!1,et),Eo[et]=!0)}function Ho(ke,Te){Ao(xi,ke,Te)}function Pa(ke,Te){Ao(tr,ke,Te)}Ho.preMessage=Hr,Ho.resetWarned=Er,Ho.noteOnce=Pa;var qi=null;function Vs(ke){return Qe.useMemo(function(){if(!ke)return[!1,{}];var Te={matchInputWidth:!0,limit:50};return ke&&Ke(ke)==="object"&&(Te=He(He({},Te),ke)),Te.limit<=0&&(Te.limit=!1),[!0,Te]},[ke])}var kr=Me(17341);function Ro(ke,Te,et,at,jt,qt,gn,Vn){return function(Qn){if(!ke)Te(Qn);else{var Gn=no(Qn),gi=Ar(et),yi=Ar(at),_i=gi.includes(Gn),mi=jt.some(function(bi){return no(bi)===Gn}),ui=et,Fi=jt;if(mi&&!_i)Fi=jt.filter(function(bi){return no(bi)!==Gn});else{var ji=_i?gi.filter(function(bi){return bi!==Gn}):[].concat(Bt(gi),[Gn]),Rr=qt(),ao;if(_i){var Fr=(0,kr.S)(ji,{checked:!1,halfCheckedKeys:yi},Rr);ao=Fr.checkedKeys}else{var jr=(0,kr.S)(ji,!0,Rr);ao=jr.checkedKeys}var To=No(ao,qt,Vn);ui=gn(To)}Te([].concat(Bt(Fi),Bt(ui)))}}}function Xr(ke,Te,et,at,jt){return Qe.useMemo(function(){var qt=jt(Te),gn=ue(qt,2),Vn=gn[0],Qn=gn[1];if(!ke||!Te.length)return[Vn,[],Qn];var Gn=Ar(Vn),gi=et(),yi=(0,kr.S)(Gn,!0,gi),_i=yi.checkedKeys,mi=yi.halfCheckedKeys;return[at(_i),at(mi),Qn]},[ke,Te,et,at,jt])}var ds=Qe.memo(function(ke){var Te=ke.children;return Te},function(ke,Te){return!Te.open}),Fa=ds;function Gs(ke){var Te,et=ke.prefixCls,at=ke.checked,jt=ke.halfChecked,qt=ke.disabled,gn=ke.onClick,Vn=ke.disableCheckbox,Qn=Qe.useContext(ys),Gn=Qn.checkable,gi=typeof Gn!="boolean"?Gn:null;return Qe.createElement("span",{className:qe()("".concat(et),(Te={},ft(Te,"".concat(et,"-checked"),at),ft(Te,"".concat(et,"-indeterminate"),!at&&jt),ft(Te,"".concat(et,"-disabled"),qt||Vn),Te)),onClick:gn},gi)}var Xu="__cascader_fix_label__";function Ah(ke){var Te=ke.prefixCls,et=ke.multiple,at=ke.options,jt=ke.activeValue,qt=ke.prevValuePath,gn=ke.onToggleOpen,Vn=ke.onSelect,Qn=ke.onActive,Gn=ke.checkedSet,gi=ke.halfCheckedSet,yi=ke.loadingKeys,_i=ke.isSelectable,mi=ke.disabled,ui="".concat(Te,"-menu"),Fi="".concat(Te,"-menu-item"),ji=Qe.useContext(ys),Rr=ji.fieldNames,ao=ji.changeOnSelect,Fr=ji.expandTrigger,jr=ji.expandIcon,To=ji.loadingIcon,bi=ji.dropdownMenuColumnStyle,Kr=ji.optionRender,or=Fr==="hover",Zr=function(jo){return mi||jo},xo=Qe.useMemo(function(){return at.map(function(nr){var jo,co=nr.disabled,oa=nr.disableCheckbox,ro=nr[Ya],Uo=(jo=nr[Xu])!==null&&jo!==void 0?jo:nr[Rr.label],fa=nr[Rr.value],Ea=Ir(nr,Rr),ga=ro?ro.map(function(Da){return Da[Rr.value]}):[].concat(Bt(qt),[fa]),_r=no(ga),Co=yi.includes(_r),Ma=Gn.has(_r),pa=gi.has(_r);return{disabled:co,label:Uo,value:fa,isLeaf:Ea,isLoading:Co,checked:Ma,halfChecked:pa,option:nr,disableCheckbox:oa,fullPath:ga,fullPathKey:_r}})},[at,Gn,Rr,gi,yi,qt]);return Qe.createElement("ul",{className:ui,role:"menu"},xo.map(function(nr){var jo,co=nr.disabled,oa=nr.label,ro=nr.value,Uo=nr.isLeaf,fa=nr.isLoading,Ea=nr.checked,ga=nr.halfChecked,_r=nr.option,Co=nr.fullPath,Ma=nr.fullPathKey,pa=nr.disableCheckbox,Da=function(){if(!Zr(co)){var es=Bt(Co);or&&Uo&&es.pop(),Qn(es)}},ka=function(){_i(_r)&&!Zr(co)&&Vn(Co,Uo)},Xa;return typeof _r.title=="string"?Xa=_r.title:typeof oa=="string"&&(Xa=oa),Qe.createElement("li",{key:Ma,className:qe()(Fi,(jo={},ft(jo,"".concat(Fi,"-expand"),!Uo),ft(jo,"".concat(Fi,"-active"),jt===ro||jt===Ma),ft(jo,"".concat(Fi,"-disabled"),Zr(co)),ft(jo,"".concat(Fi,"-loading"),fa),jo)),style:bi,role:"menuitemcheckbox",title:Xa,"aria-checked":Ea,"data-path-key":Ma,onClick:function(){Da(),!pa&&(!et||Uo)&&ka()},onDoubleClick:function(){ao&&gn(!1)},onMouseEnter:function(){or&&Da()},onMouseDown:function(es){es.preventDefault()}},et&&Qe.createElement(Gs,{prefixCls:"".concat(Te,"-checkbox"),checked:Ea,halfChecked:ga,disabled:Zr(co)||pa,disableCheckbox:pa,onClick:function(es){pa||(es.stopPropagation(),ka())}}),Qe.createElement("div",{className:"".concat(Fi,"-content")},Kr?Kr(_r):oa),!fa&&jr&&!Uo&&Qe.createElement("div",{className:"".concat(Fi,"-expand-icon")},jr),fa&&To&&Qe.createElement("div",{className:"".concat(Fi,"-loading-icon")},To))}))}var Cu=function(Te,et){var at=Qe.useContext(ys),jt=at.values,qt=jt[0],gn=Qe.useState([]),Vn=ue(gn,2),Qn=Vn[0],Gn=Vn[1];return Qe.useEffect(function(){Te||Gn(qt||[])},[et,qt]),[Qn,Gn]},ju=Cu,gr={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Te){var et=Te.keyCode;if(Te.altKey&&!Te.ctrlKey||Te.metaKey||et>=gr.F1&&et<=gr.F12)return!1;switch(et){case gr.ALT:case gr.CAPS_LOCK:case gr.CONTEXT_MENU:case gr.CTRL:case gr.DOWN:case gr.END:case gr.ESC:case gr.HOME:case gr.INSERT:case gr.LEFT:case gr.MAC_FF_META:case gr.META:case gr.NUMLOCK:case gr.NUM_CENTER:case gr.PAGE_DOWN:case gr.PAGE_UP:case gr.PAUSE:case gr.PRINT_SCREEN:case gr.RIGHT:case gr.SHIFT:case gr.UP:case gr.WIN_KEY:case gr.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Te){if(Te>=gr.ZERO&&Te<=gr.NINE||Te>=gr.NUM_ZERO&&Te<=gr.NUM_MULTIPLY||Te>=gr.A&&Te<=gr.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Te===0)return!0;switch(Te){case gr.SPACE:case gr.QUESTION_MARK:case gr.NUM_PLUS:case gr.NUM_MINUS:case gr.NUM_PERIOD:case gr.NUM_DIVISION:case gr.SEMICOLON:case gr.DASH:case gr.EQUALS:case gr.COMMA:case gr.PERIOD:case gr.SLASH:case gr.APOSTROPHE:case gr.SINGLE_QUOTE:case gr.OPEN_SQUARE_BRACKET:case gr.BACKSLASH:case gr.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},cl=gr,We=function(ke,Te,et,at,jt,qt,gn){var Vn=gn.direction,Qn=gn.searchValue,Gn=gn.toggleOpen,gi=gn.open,yi=Vn==="rtl",_i=Qe.useMemo(function(){for(var bi=-1,Kr=Te,or=[],Zr=[],xo=at.length,nr=vo(Te,et),jo=function(fa){var Ea=Kr.findIndex(function(ga,_r){return(nr[_r]?no(nr[_r]):ga[et.value])===at[fa]});if(Ea===-1)return 1;bi=Ea,or.push(bi),Zr.push(at[fa]),Kr=Kr[bi][et.children]},co=0;co<xo&&Kr&&!jo(co);co+=1);for(var oa=Te,ro=0;ro<or.length-1;ro+=1)oa=oa[or[ro]][et.children];return[Zr,bi,oa,nr]},[at,et,Te]),mi=ue(_i,4),ui=mi[0],Fi=mi[1],ji=mi[2],Rr=mi[3],ao=function(Kr){jt(Kr)},Fr=function(Kr){var or=ji.length,Zr=Fi;Zr===-1&&Kr<0&&(Zr=or);for(var xo=0;xo<or;xo+=1){Zr=(Zr+Kr+or)%or;var nr=ji[Zr];if(nr&&!nr.disabled){var jo=ui.slice(0,-1).concat(Rr[Zr]?no(Rr[Zr]):nr[et.value]);ao(jo);return}}},jr=function(){if(ui.length>1){var Kr=ui.slice(0,-1);ao(Kr)}else Gn(!1)},To=function(){var Kr,or=((Kr=ji[Fi])===null||Kr===void 0?void 0:Kr[et.children])||[],Zr=or.find(function(nr){return!nr.disabled});if(Zr){var xo=[].concat(Bt(ui),[Zr[et.value]]);ao(xo)}};Qe.useImperativeHandle(ke,function(){return{onKeyDown:function(Kr){var or=Kr.which;switch(or){case cl.UP:case cl.DOWN:{var Zr=0;or===cl.UP?Zr=-1:or===cl.DOWN&&(Zr=1),Zr!==0&&Fr(Zr);break}case cl.LEFT:{if(Qn)break;yi?To():jr();break}case cl.RIGHT:{if(Qn)break;yi?jr():To();break}case cl.BACKSPACE:{Qn||jr();break}case cl.ENTER:{if(ui.length){var xo=ji[Fi],nr=(xo==null?void 0:xo[Ya])||[];nr.length?qt(nr.map(function(jo){return jo[et.value]}),nr[nr.length-1]):qt(ui,ji[Fi])}break}case cl.ESC:Gn(!1),gi&&Kr.stopPropagation()}},onKeyUp:function(){}}})},dt=Qe.forwardRef(function(ke,Te){var et,at,jt,qt=ke.prefixCls,gn=ke.multiple,Vn=ke.searchValue,Qn=ke.toggleOpen,Gn=ke.notFoundContent,gi=ke.direction,yi=ke.open,_i=ke.disabled,mi=Qe.useRef(null),ui=gi==="rtl",Fi=Qe.useContext(ys),ji=Fi.options,Rr=Fi.values,ao=Fi.halfValues,Fr=Fi.fieldNames,jr=Fi.changeOnSelect,To=Fi.onSelect,bi=Fi.searchOptions,Kr=Fi.dropdownPrefixCls,or=Fi.loadData,Zr=Fi.expandTrigger,xo=Kr||qt,nr=Qe.useState([]),jo=ue(nr,2),co=jo[0],oa=jo[1],ro=function(ar){if(!(!or||Vn)){var mr=Gi(ar,ji,Fr),so=mr.map(function(Yo){var ss=Yo.option;return ss}),Jo=so[so.length-1];if(Jo&&!Ir(Jo,Fr)){var ha=no(ar);oa(function(Yo){return[].concat(Bt(Yo),[ha])}),or(so)}}};Qe.useEffect(function(){co.length&&co.forEach(function(fo){var ar=ko(fo),mr=Gi(ar,ji,Fr,!0).map(function(Jo){var ha=Jo.option;return ha}),so=mr[mr.length-1];(!so||so[Fr.children]||Ir(so,Fr))&&oa(function(Jo){return Jo.filter(function(ha){return ha!==fo})})})},[ji,co,Fr]);var Uo=Qe.useMemo(function(){return new Set(Ar(Rr))},[Rr]),fa=Qe.useMemo(function(){return new Set(Ar(ao))},[ao]),Ea=ju(gn,yi),ga=ue(Ea,2),_r=ga[0],Co=ga[1],Ma=function(ar){Co(ar),ro(ar)},pa=function(ar){if(_i)return!1;var mr=ar.disabled,so=Ir(ar,Fr);return!mr&&(so||jr||gn)},Da=function(ar,mr){var so=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;To(ar),!gn&&(mr||jr&&(Zr==="hover"||so))&&Qn(!1)},ka=Qe.useMemo(function(){return Vn?bi:ji},[Vn,bi,ji]),Xa=Qe.useMemo(function(){for(var fo=[{options:ka}],ar=ka,mr=vo(ar,Fr),so=function(){var Yo=_r[Jo],ss=ar.find(function(Za,Ks){return(mr[Ks]?no(mr[Ks]):Za[Fr.value])===Yo}),ks=ss==null?void 0:ss[Fr.children];if(!(ks!=null&&ks.length))return 1;ar=ks,fo.push({options:ks})},Jo=0;Jo<_r.length&&!so();Jo+=1);return fo},[ka,_r,Fr]),Oa=function(ar,mr){pa(mr)&&Da(ar,Ir(mr,Fr),!0)};We(Te,ka,Fr,_r,Ma,Oa,{direction:gi,searchValue:Vn,toggleOpen:Qn,open:yi}),Qe.useEffect(function(){if(!Vn)for(var fo=0;fo<_r.length;fo+=1){var ar,mr=_r.slice(0,fo+1),so=no(mr),Jo=(ar=mi.current)===null||ar===void 0?void 0:ar.querySelector('li[data-path-key="'.concat(so.replace(/\\{0,2}"/g,'\\"'),'"]'));Jo&&la(Jo)}},[_r,Vn]);var es=!((et=Xa[0])!==null&&et!==void 0&&(et=et.options)!==null&&et!==void 0&&et.length),Hs=[(at={},ft(at,Fr.value,"__EMPTY__"),ft(at,Xu,Gn),ft(at,"disabled",!0),at)],as=He(He({},ke),{},{multiple:!es&&gn,onSelect:Da,onActive:Ma,onToggleOpen:Qn,checkedSet:Uo,halfCheckedSet:fa,loadingKeys:co,isSelectable:pa}),wo=es?[{options:Hs}]:Xa,yo=wo.map(function(fo,ar){var mr=_r.slice(0,ar),so=_r[ar];return Qe.createElement(Ah,fe({key:ar},as,{prefixCls:xo,options:fo.options,prevValuePath:mr,activeValue:so}))});return Qe.createElement(Fa,{open:yi},Qe.createElement("div",{className:qe()("".concat(xo,"-menus"),(jt={},ft(jt,"".concat(xo,"-menu-empty"),es),ft(jt,"".concat(xo,"-rtl"),ui),jt)),ref:mi},yo))}),yt=dt,Pt=Qe.forwardRef(function(ke,Te){var et=wr();return Qe.createElement(yt,fe({},ke,et,{ref:Te}))}),Ht=Pt,Qt=Me(80705);function nn(ke,Te,et){var at=React.useRef({});return(!("value"in at.current)||et(at.current.condition,Te))&&(at.current.value=ke(),at.current.condition=Te),at.current.value}var wn=Symbol.for("react.element"),Un=Symbol.for("react.transitional.element"),An=Symbol.for("react.fragment");function Pi(ke){return ke&&_typeof(ke)==="object"&&(ke.$$typeof===wn||ke.$$typeof===Un)&&ke.type===An}var zn=Number(Qe.version.split(".")[0]),di=function(Te,et){typeof Te=="function"?Te(et):_typeof(Te)==="object"&&Te&&"current"in Te&&(Te.current=et)},ei=function(){for(var Te=arguments.length,et=new Array(Te),at=0;at<Te;at++)et[at]=arguments[at];var jt=et.filter(Boolean);return jt.length<=1?jt[0]:function(qt){et.forEach(function(gn){di(gn,qt)})}},Bi=function(){for(var Te=arguments.length,et=new Array(Te),at=0;at<Te;at++)et[at]=arguments[at];return useMemo(function(){return ei.apply(void 0,et)},et,function(jt,qt){return jt.length!==qt.length||jt.every(function(gn,Vn){return gn!==qt[Vn]})})},Xi=function(Te){var et,at;if(!Te)return!1;if(yr(Te)&&zn>=19)return!0;var jt=isMemo(Te)?Te.type.type:Te.type;return!(typeof jt=="function"&&!((et=jt.prototype)!==null&&et!==void 0&&et.render)&&jt.$$typeof!==ForwardRef||typeof Te=="function"&&!((at=Te.prototype)!==null&&at!==void 0&&at.render)&&Te.$$typeof!==ForwardRef)};function yr(ke){return isValidElement(ke)&&!isFragment(ke)}var Jr=function(Te){return yr(Te)&&Xi(Te)},Tt=function(Te){if(Te&&yr(Te)){var et=Te;return et.props.propertyIsEnumerable("ref")?et.props.ref:et.ref}return null};function Dn(ke,Te,et,at){if(!Te.length)return et;var jt=_toArray(Te),qt=jt[0],gn=jt.slice(1),Vn;return!ke&&typeof qt=="number"?Vn=[]:Array.isArray(ke)?Vn=_toConsumableArray(ke):Vn=_objectSpread({},ke),at&&et===void 0&&gn.length===1?delete Vn[qt][gn[0]]:Vn[qt]=Dn(Vn[qt],gn,et,at),Vn}function ii(ke,Te,et){var at=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Te.length&&at&&et===void 0&&!get(ke,Te.slice(0,-1))?ke:Dn(ke,Te,et,at)}function fi(ke){return _typeof(ke)==="object"&&ke!==null&&Object.getPrototypeOf(ke)===Object.prototype}function Bn(ke){return Array.isArray(ke)?[]:{}}var Oi=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Cr(){for(var ke=arguments.length,Te=new Array(ke),et=0;et<ke;et++)Te[et]=arguments[et];var at=Bn(Te[0]);return Te.forEach(function(jt){function qt(gn,Vn){var Qn=new Set(Vn),Gn=get(jt,gn),gi=Array.isArray(Gn);if(gi||fi(Gn)){if(!Qn.has(Gn)){Qn.add(Gn);var yi=get(at,gn);gi?at=ii(at,gn,[]):(!yi||_typeof(yi)!=="object")&&(at=ii(at,gn,Bn(Gn))),Oi(Gn).forEach(function(_i){qt([].concat(_toConsumableArray(gn),[_i]),Qn)})}}else at=ii(at,gn,Gn)}qt([])}),at}function pr(){}function rr(ke){var Te,et=ke,at=et.prefixCls,jt=at===void 0?"rc-cascader":at,qt=et.style,gn=et.className,Vn=et.options,Qn=et.checkable,Gn=et.defaultValue,gi=et.value,yi=et.fieldNames,_i=et.changeOnSelect,mi=et.onChange,ui=et.showCheckedStrategy,Fi=et.loadData,ji=et.expandTrigger,Rr=et.expandIcon,ao=Rr===void 0?">":Rr,Fr=et.loadingIcon,jr=et.direction,To=et.notFoundContent,bi=To===void 0?"Not Found":To,Kr=et.disabled,or=!!Qn,Zr=Qs(Gn,{value:gi,postState:Ki}),xo=ue(Zr,2),nr=xo[0],jo=xo[1],co=Qe.useMemo(function(){return Tr(yi)},[JSON.stringify(yi)]),oa=Yr(co,Vn),ro=ue(oa,3),Uo=ro[0],fa=ro[1],Ea=ro[2],ga=Qi(Uo,co),_r=Xr(or,nr,fa,Ea,ga),Co=ue(_r,3),Ma=Co[0],pa=Co[1],Da=Co[2],ka=Jl(function(wo){if(jo(wo),mi){var yo=Ki(wo),fo=yo.map(function(so){return Gi(so,Uo,co).map(function(Jo){return Jo.option})}),ar=or?yo:yo[0],mr=or?fo:fo[0];mi(ar,mr)}}),Xa=Ro(or,ka,Ma,pa,Da,fa,Ea,ui),Oa=Jl(function(wo){Xa(wo)}),es=Qe.useMemo(function(){return{options:Uo,fieldNames:co,values:Ma,halfValues:pa,changeOnSelect:_i,onSelect:Oa,checkable:Qn,searchOptions:[],dropdownPrefixCls:void 0,loadData:Fi,expandTrigger:ji,expandIcon:ao,loadingIcon:Fr,dropdownMenuColumnStyle:void 0}},[Uo,co,Ma,pa,_i,Oa,Qn,Fi,ji,ao,Fr]),Hs="".concat(jt,"-panel"),as=!Uo.length;return Qe.createElement(ys.Provider,{value:es},Qe.createElement("div",{className:qe()(Hs,(Te={},ft(Te,"".concat(Hs,"-rtl"),jr==="rtl"),ft(Te,"".concat(Hs,"-empty"),as),Te),gn),style:qt},as?bi:Qe.createElement(yt,{prefixCls:jt,searchValue:"",multiple:or,toggleOpen:pr,open:!0,direction:jr,disabled:Kr})))}function ua(ke){var Te=ke.onPopupVisibleChange,et=ke.popupVisible,at=ke.popupClassName,jt=ke.popupPlacement;warning(!Te,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(et===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(at===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(jt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Qr(ke,Te){if(ke){var et=function at(jt){for(var qt=0;qt<jt.length;qt++){var gn=jt[qt];if(gn[Te==null?void 0:Te.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(gn[Te==null?void 0:Te.children])&&at(gn[Te==null?void 0:Te.children]))return!0}};et(ke)}}var io=null,So=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],Hn=Qe.forwardRef(function(ke,Te){var et=ke.id,at=ke.prefixCls,jt=at===void 0?"rc-cascader":at,qt=ke.fieldNames,gn=ke.defaultValue,Vn=ke.value,Qn=ke.changeOnSelect,Gn=ke.onChange,gi=ke.displayRender,yi=ke.checkable,_i=ke.autoClearSearchValue,mi=_i===void 0?!0:_i,ui=ke.searchValue,Fi=ke.onSearch,ji=ke.showSearch,Rr=ke.expandTrigger,ao=ke.options,Fr=ke.dropdownPrefixCls,jr=ke.loadData,To=ke.popupVisible,bi=ke.open,Kr=ke.popupClassName,or=ke.dropdownClassName,Zr=ke.dropdownMenuColumnStyle,xo=ke.dropdownStyle,nr=ke.popupPlacement,jo=ke.placement,co=ke.onDropdownVisibleChange,oa=ke.onPopupVisibleChange,ro=ke.expandIcon,Uo=ro===void 0?">":ro,fa=ke.loadingIcon,Ea=ke.children,ga=ke.dropdownMatchSelectWidth,_r=ga===void 0?!1:ga,Co=ke.showCheckedStrategy,Ma=Co===void 0?Ie:Co,pa=ke.optionRender,Da=pe(ke,So),ka=Ms(et),Xa=!!yi,Oa=Qs(gn,{value:Vn,postState:Ki}),es=ue(Oa,2),Hs=es[0],as=es[1],wo=Qe.useMemo(function(){return Tr(qt)},[JSON.stringify(qt)]),yo=Yr(wo,ao),fo=ue(yo,3),ar=fo[0],mr=fo[1],so=fo[2],Jo=Qs("",{value:ui,postState:function(Go){return Go||""}}),ha=ue(Jo,2),Yo=ha[0],ss=ha[1],ks=function(Go,ja){ss(Go),ja.source!=="blur"&&Fi&&Fi(Go)},Za=Vs(ji),Ks=ue(Za,2),ns=Ks[0],fs=Ks[1],ps=ct(Yo,ar,wo,Fr||jt,fs,Qn||Xa),rl=Qi(ar,wo),ws=Xr(Xa,Hs,mr,so,rl),Ps=ue(ws,3),ts=Ps[0],ms=Ps[1],xl=Ps[2],Cl=Qe.useMemo(function(){var Us=Ar(ts),Go=No(Us,mr,Ma);return[].concat(Bt(xl),Bt(so(Go)))},[ts,mr,so,xl,Ma]),lo=ur(Cl,ar,wo,Xa,gi),zr=Jl(function(Us){if(as(Us),Gn){var Go=Ki(Us),ja=Go.map(function(Zl){return Gi(Zl,ar,wo).map(function(Xo){return Xo.option})}),Wo=Xa?Go:Go[0],ol=Xa?ja:ja[0];Gn(Wo,ol)}}),to=Ro(Xa,zr,ts,ms,xl,mr,so,Ma),va=Jl(function(Us){(!Xa||mi)&&ss(""),to(Us)}),Es=function(Go,ja){if(ja.type==="clear"){zr([]);return}var Wo=ja.values[0],ol=Wo.valueCells;va(ol)},Zs=bi!==void 0?bi:To,Al=or||Kr,kt=jo||nr,Hl=function(Go){co==null||co(Go),oa==null||oa(Go)},$s=Qe.useMemo(function(){return{options:ar,fieldNames:wo,values:ts,halfValues:ms,changeOnSelect:Qn,onSelect:va,checkable:yi,searchOptions:ps,dropdownPrefixCls:Fr,loadData:jr,expandTrigger:Rr,expandIcon:Uo,loadingIcon:fa,dropdownMenuColumnStyle:Zr,optionRender:pa}},[ar,wo,ts,ms,Qn,va,yi,ps,Fr,jr,Rr,Uo,fa,Zr,pa]),Ql=!(Yo?ps:ar).length,Ju=Yo&&fs.matchInputWidth||Ql?{}:{minWidth:"auto"};return Qe.createElement(ys.Provider,{value:$s},Qe.createElement(Gl,fe({},Da,{ref:Te,id:ka,prefixCls:jt,autoClearSearchValue:mi,dropdownMatchSelectWidth:_r,dropdownStyle:He(He({},Ju),xo),displayValues:lo,onDisplayValuesChange:Es,mode:Xa?"multiple":void 0,searchValue:Yo,onSearch:ks,showSearch:ns,OptionList:Ht,emptyOptions:Ql,open:Zs,dropdownClassName:Al,placement:kt,onDropdownVisibleChange:Hl,getRawInputElement:function(){return Ea}})))});Hn.SHOW_PARENT=Ie,Hn.SHOW_CHILD=wt,Hn.Panel=rr;var br=Hn,ho=br},42767:function(Cn,On){"use strict";var Me;var fe=typeof Symbol=="function"&&Symbol.for,Ke=fe?Symbol.for("react.element"):60103,St=fe?Symbol.for("react.portal"):60106,zt=fe?Symbol.for("react.fragment"):60107,ft=fe?Symbol.for("react.strict_mode"):60108,Be=fe?Symbol.for("react.profiler"):60114,He=fe?Symbol.for("react.provider"):60109,gt=fe?Symbol.for("react.context"):60110,it=fe?Symbol.for("react.async_mode"):60111,st=fe?Symbol.for("react.concurrent_mode"):60111,Ft=fe?Symbol.for("react.forward_ref"):60112,Nt=fe?Symbol.for("react.suspense"):60113,Bt=fe?Symbol.for("react.suspense_list"):60120,Ae=fe?Symbol.for("react.memo"):60115,ne=fe?Symbol.for("react.lazy"):60116,te=fe?Symbol.for("react.block"):60121,ue=fe?Symbol.for("react.fundamental"):60117,se=fe?Symbol.for("react.responder"):60118,pe=fe?Symbol.for("react.scope"):60119;function ve(Pe){if(typeof Pe=="object"&&Pe!==null){var Oe=Pe.$$typeof;switch(Oe){case Ke:switch(Pe=Pe.type,Pe){case it:case st:case zt:case Be:case ft:case Nt:return Pe;default:switch(Pe=Pe&&Pe.$$typeof,Pe){case gt:case Ft:case ne:case Ae:case He:return Pe;default:return Oe}}case St:return Oe}}}function Se(Pe){return ve(Pe)===st}Me=it,Me=st,Me=gt,Me=He,Me=Ke,Me=Ft,Me=zt,Me=ne,Me=Ae,Me=St,Me=Be,Me=ft,Me=Nt,Me=function(Pe){return Se(Pe)||ve(Pe)===it},Me=Se,Me=function(Pe){return ve(Pe)===gt},Me=function(Pe){return ve(Pe)===He},Me=function(Pe){return typeof Pe=="object"&&Pe!==null&&Pe.$$typeof===Ke},Me=function(Pe){return ve(Pe)===Ft},On.isFragment=function(Pe){return ve(Pe)===zt},Me=function(Pe){return ve(Pe)===ne},Me=function(Pe){return ve(Pe)===Ae},Me=function(Pe){return ve(Pe)===St},Me=function(Pe){return ve(Pe)===Be},Me=function(Pe){return ve(Pe)===ft},Me=function(Pe){return ve(Pe)===Nt},Me=function(Pe){return typeof Pe=="string"||typeof Pe=="function"||Pe===zt||Pe===st||Pe===Be||Pe===ft||Pe===Nt||Pe===Bt||typeof Pe=="object"&&Pe!==null&&(Pe.$$typeof===ne||Pe.$$typeof===Ae||Pe.$$typeof===He||Pe.$$typeof===gt||Pe.$$typeof===Ft||Pe.$$typeof===ue||Pe.$$typeof===se||Pe.$$typeof===pe||Pe.$$typeof===te)},Me=ve},16357:function(Cn,On,Me){"use strict";Cn.exports=Me(42767)},16404:function(Cn,On){"use strict";var Me;var fe=Symbol.for("react.element"),Ke=Symbol.for("react.portal"),St=Symbol.for("react.fragment"),zt=Symbol.for("react.strict_mode"),ft=Symbol.for("react.profiler"),Be=Symbol.for("react.provider"),He=Symbol.for("react.context"),gt=Symbol.for("react.server_context"),it=Symbol.for("react.forward_ref"),st=Symbol.for("react.suspense"),Ft=Symbol.for("react.suspense_list"),Nt=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Ae=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ue){if(typeof ue=="object"&&ue!==null){var se=ue.$$typeof;switch(se){case fe:switch(ue=ue.type,ue){case St:case ft:case zt:case st:case Ft:return ue;default:switch(ue=ue&&ue.$$typeof,ue){case gt:case He:case it:case Bt:case Nt:case Be:return ue;default:return se}}case Ke:return se}}}Me=He,Me=Be,Me=fe,Me=it,Me=St,Me=Bt,Me=Nt,Me=Ke,Me=ft,Me=zt,Me=st,Me=Ft,Me=function(){return!1},Me=function(){return!1},Me=function(ue){return te(ue)===He},Me=function(ue){return te(ue)===Be},Me=function(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===fe},Me=function(ue){return te(ue)===it},Me=function(ue){return te(ue)===St},Me=function(ue){return te(ue)===Bt},Me=function(ue){return te(ue)===Nt},Me=function(ue){return te(ue)===Ke},Me=function(ue){return te(ue)===ft},Me=function(ue){return te(ue)===zt},Me=function(ue){return te(ue)===st},Me=function(ue){return te(ue)===Ft},Me=function(ue){return typeof ue=="string"||typeof ue=="function"||ue===St||ue===ft||ue===zt||ue===st||ue===Ft||ue===Ae||typeof ue=="object"&&ue!==null&&(ue.$$typeof===Bt||ue.$$typeof===Nt||ue.$$typeof===Be||ue.$$typeof===He||ue.$$typeof===it||ue.$$typeof===ne||ue.getModuleId!==void 0)},Me=te},80705:function(Cn,On,Me){"use strict";Me(16404)},3510:function(Cn,On,Me){"use strict";Me.r(On),Me.d(On,{Panel:function(){return Mt},default:function(){return Lt}});var fe=Me(87462),Ke=Me(74902),St=Me(97685),zt=Me(71002),ft=Me(94184),Be=Me.n(ft),He=Me(21770),gt=Me(80334),it=Me(67294),st=Me(45987),Ft=Me(50344),Nt=Me(1413),Bt=Me(4942),Ae=Me(62874),ne=Me(15105),te=it.forwardRef(function(pt,dn){var tn=pt.prefixCls,vn=pt.forceRender,Tn=pt.className,Ve=pt.style,Ze=pt.children,Qe=pt.isActive,mn=pt.role,kn=pt.classNames,At=pt.styles,pn=it.useState(Qe||vn),ln=(0,St.Z)(pn,2),jn=ln[0],Gt=ln[1];return it.useEffect(function(){(vn||Qe)&&Gt(!0)},[vn,Qe]),jn?it.createElement("div",{ref:dn,className:Be()("".concat(tn,"-content"),(0,Bt.Z)((0,Bt.Z)({},"".concat(tn,"-content-active"),Qe),"".concat(tn,"-content-inactive"),!Qe),Tn),style:Ve,role:mn},it.createElement("div",{className:Be()("".concat(tn,"-content-box"),kn==null?void 0:kn.body),style:At==null?void 0:At.body},Ze)):null});te.displayName="PanelContent";var ue=te,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],pe=it.forwardRef(function(pt,dn){var tn=pt.showArrow,vn=tn===void 0?!0:tn,Tn=pt.headerClass,Ve=pt.isActive,Ze=pt.onItemClick,Qe=pt.forceRender,mn=pt.className,kn=pt.classNames,At=kn===void 0?{}:kn,pn=pt.styles,ln=pn===void 0?{}:pn,jn=pt.prefixCls,Gt=pt.collapsible,mt=pt.accordion,Et=pt.panelKey,on=pt.extra,Yt=pt.header,ze=pt.expandIcon,be=pt.openMotion,Ce=pt.destroyInactivePanel,De=pt.children,Ge=(0,st.Z)(pt,se),Fe=Gt==="disabled",qe=on!=null&&typeof on!="boolean",rn=(0,Bt.Z)((0,Bt.Z)((0,Bt.Z)({onClick:function(){Ze==null||Ze(Et)},onKeyDown:function($n){($n.key==="Enter"||$n.keyCode===ne.Z.ENTER||$n.which===ne.Z.ENTER)&&(Ze==null||Ze(Et))},role:mt?"tab":"button"},"aria-expanded",Ve),"aria-disabled",Fe),"tabIndex",Fe?-1:0),Kn=typeof ze=="function"?ze(pt):it.createElement("i",{className:"arrow"}),Zn=Kn&&it.createElement("div",(0,fe.Z)({className:"".concat(jn,"-expand-icon")},["header","icon"].includes(Gt)?rn:{}),Kn),$t=Be()("".concat(jn,"-item"),(0,Bt.Z)((0,Bt.Z)({},"".concat(jn,"-item-active"),Ve),"".concat(jn,"-item-disabled"),Fe),mn),Nn=Be()(Tn,"".concat(jn,"-header"),(0,Bt.Z)({},"".concat(jn,"-collapsible-").concat(Gt),!!Gt),At.header),Zt=(0,Nt.Z)({className:Nn,style:ln.header},["header","icon"].includes(Gt)?{}:rn);return it.createElement("div",(0,fe.Z)({},Ge,{ref:dn,className:$t}),it.createElement("div",Zt,vn&&Zn,it.createElement("span",(0,fe.Z)({className:"".concat(jn,"-header-text")},Gt==="header"?rn:{}),Yt),qe&&it.createElement("div",{className:"".concat(jn,"-extra")},on)),it.createElement(Ae.Z,(0,fe.Z)({visible:Ve,leavedClassName:"".concat(jn,"-content-hidden")},be,{forceRender:Qe,removeOnLeave:Ce}),function(qn,$n){var oi=qn.className,ri=qn.style;return it.createElement(ue,{ref:$n,prefixCls:jn,className:oi,classNames:At,style:ri,styles:ln,isActive:Ve,forceRender:Qe,role:mt?"tabpanel":void 0},De)}))}),ve=pe,Se=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Pe=function(dn,tn){var vn=tn.prefixCls,Tn=tn.accordion,Ve=tn.collapsible,Ze=tn.destroyInactivePanel,Qe=tn.onItemClick,mn=tn.activeKey,kn=tn.openMotion,At=tn.expandIcon;return dn.map(function(pn,ln){var jn=pn.children,Gt=pn.label,mt=pn.key,Et=pn.collapsible,on=pn.onItemClick,Yt=pn.destroyInactivePanel,ze=(0,st.Z)(pn,Se),be=String(mt!=null?mt:ln),Ce=Et!=null?Et:Ve,De=Yt!=null?Yt:Ze,Ge=function(rn){Ce!=="disabled"&&(Qe(rn),on==null||on(rn))},Fe=!1;return Tn?Fe=mn[0]===be:Fe=mn.indexOf(be)>-1,it.createElement(ve,(0,fe.Z)({},ze,{prefixCls:vn,key:be,panelKey:be,isActive:Fe,accordion:Tn,openMotion:kn,expandIcon:At,header:Gt,collapsible:Ce,onItemClick:Ge,destroyInactivePanel:De}),jn)})},Oe=function(dn,tn,vn){if(!dn)return null;var Tn=vn.prefixCls,Ve=vn.accordion,Ze=vn.collapsible,Qe=vn.destroyInactivePanel,mn=vn.onItemClick,kn=vn.activeKey,At=vn.openMotion,pn=vn.expandIcon,ln=dn.key||String(tn),jn=dn.props,Gt=jn.header,mt=jn.headerClass,Et=jn.destroyInactivePanel,on=jn.collapsible,Yt=jn.onItemClick,ze=!1;Ve?ze=kn[0]===ln:ze=kn.indexOf(ln)>-1;var be=on!=null?on:Ze,Ce=function(Fe){be!=="disabled"&&(mn(Fe),Yt==null||Yt(Fe))},De={key:ln,panelKey:ln,header:Gt,headerClass:mt,isActive:ze,prefixCls:Tn,destroyInactivePanel:Et!=null?Et:Qe,openMotion:At,accordion:Ve,children:dn.props.children,onItemClick:Ce,expandIcon:pn,collapsible:be};return typeof dn.type=="string"?dn:(Object.keys(De).forEach(function(Ge){typeof De[Ge]=="undefined"&&delete De[Ge]}),it.cloneElement(dn,De))};function Re(pt,dn,tn){return Array.isArray(pt)?Pe(pt,tn):(0,Ft.Z)(dn).map(function(vn,Tn){return Oe(vn,Tn,tn)})}var tt=Re,rt=Me(64217);function Je(pt){var dn=pt;if(!Array.isArray(dn)){var tn=(0,zt.Z)(dn);dn=tn==="number"||tn==="string"?[dn]:[]}return dn.map(function(vn){return String(vn)})}var bt=it.forwardRef(function(pt,dn){var tn=pt.prefixCls,vn=tn===void 0?"rc-collapse":tn,Tn=pt.destroyInactivePanel,Ve=Tn===void 0?!1:Tn,Ze=pt.style,Qe=pt.accordion,mn=pt.className,kn=pt.children,At=pt.collapsible,pn=pt.openMotion,ln=pt.expandIcon,jn=pt.activeKey,Gt=pt.defaultActiveKey,mt=pt.onChange,Et=pt.items,on=Be()(vn,mn),Yt=(0,He.Z)([],{value:jn,onChange:function(qe){return mt==null?void 0:mt(qe)},defaultValue:Gt,postState:Je}),ze=(0,St.Z)(Yt,2),be=ze[0],Ce=ze[1],De=function(qe){return Ce(function(){if(Qe)return be[0]===qe?[]:[qe];var rn=be.indexOf(qe),Kn=rn>-1;return Kn?be.filter(function(Zn){return Zn!==qe}):[].concat((0,Ke.Z)(be),[qe])})};(0,gt.ZP)(!kn,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Ge=tt(Et,kn,{prefixCls:vn,accordion:Qe,openMotion:pn,expandIcon:ln,collapsible:At,destroyInactivePanel:Ve,onItemClick:De,activeKey:be});return it.createElement("div",(0,fe.Z)({ref:dn,className:on,style:Ze,role:Qe?"tablist":void 0},(0,rt.Z)(pt,{aria:!0,data:!0})),Ge)}),lt=Object.assign(bt,{Panel:ve}),Lt=lt,Mt=lt.Panel},31457:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Et}});var fe=Me(4942),Ke=Me(87462),St=Me(71002),zt=Me(1413),ft=Me(97685),Be=Me(94184),He=Me.n(Be),gt=Me(67294);function it(on){var Yt=gt.useRef();Yt.current=on;var ze=gt.useCallback(function(){for(var be,Ce=arguments.length,De=new Array(Ce),Ge=0;Ge<Ce;Ge++)De[Ge]=arguments[Ge];return(be=Yt.current)===null||be===void 0?void 0:be.call.apply(be,[Yt].concat(De))},[]);return ze}function st(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ft=st()?gt.useLayoutEffect:gt.useEffect,Nt=function(Yt,ze){var be=gt.useRef(!0);Ft(function(){return Yt(be.current)},ze),Ft(function(){return be.current=!1,function(){be.current=!0}},[])},Bt=function(Yt,ze){Nt(function(be){if(!be)return Yt()},ze)},Ae=null;function ne(on){var Yt=gt.useRef(!1),ze=gt.useState(on),be=(0,ft.Z)(ze,2),Ce=be[0],De=be[1];gt.useEffect(function(){return Yt.current=!1,function(){Yt.current=!0}},[]);function Ge(Fe,qe){qe&&Yt.current||De(Fe)}return[Ce,Ge]}function te(on){return on!==void 0}function ue(on,Yt){var ze=Yt||{},be=ze.defaultValue,Ce=ze.value,De=ze.onChange,Ge=ze.postState,Fe=ne(function(){return te(Ce)?Ce:te(be)?typeof be=="function"?be():be:typeof on=="function"?on():on}),qe=(0,ft.Z)(Fe,2),rn=qe[0],Kn=qe[1],Zn=Ce!==void 0?Ce:rn,$t=Ge?Ge(Zn):Zn,Nn=it(De),Zt=ne([Zn]),qn=(0,ft.Z)(Zt,2),$n=qn[0],oi=qn[1];Bt(function(){var fr=$n[0];rn!==fr&&Nn(rn,fr)},[$n]),Bt(function(){te(Ce)||Kn(Ce)},[Ce]);var ri=it(function(fr,wr){Kn(fr,wr),oi([Zn],wr)});return[$t,ri]}var se={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Yt){var ze=Yt.keyCode;if(Yt.altKey&&!Yt.ctrlKey||Yt.metaKey||ze>=se.F1&&ze<=se.F12)return!1;switch(ze){case se.ALT:case se.CAPS_LOCK:case se.CONTEXT_MENU:case se.CTRL:case se.DOWN:case se.END:case se.ESC:case se.HOME:case se.INSERT:case se.LEFT:case se.MAC_FF_META:case se.META:case se.NUMLOCK:case se.NUM_CENTER:case se.PAGE_DOWN:case se.PAGE_UP:case se.PAUSE:case se.PRINT_SCREEN:case se.RIGHT:case se.SHIFT:case se.UP:case se.WIN_KEY:case se.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Yt){if(Yt>=se.ZERO&&Yt<=se.NINE||Yt>=se.NUM_ZERO&&Yt<=se.NUM_MULTIPLY||Yt>=se.A&&Yt<=se.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Yt===0)return!0;switch(Yt){case se.SPACE:case se.QUESTION_MARK:case se.NUM_PLUS:case se.NUM_MINUS:case se.NUM_PERIOD:case se.NUM_DIVISION:case se.SEMICOLON:case se.DASH:case se.EQUALS:case se.COMMA:case se.PERIOD:case se.SLASH:case se.APOSTROPHE:case se.SINGLE_QUOTE:case se.OPEN_SQUARE_BRACKET:case se.BACKSLASH:case se.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},pe=se,ve=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,Se=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Pe="".concat(ve," ").concat(Se).split(/[\s\n]+/),Oe="aria-",Re="data-";function tt(on,Yt){return on.indexOf(Yt)===0}function rt(on){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ze;Yt===!1?ze={aria:!0,data:!0,attr:!0}:Yt===!0?ze={aria:!0}:ze=(0,zt.Z)({},Yt);var be={};return Object.keys(on).forEach(function(Ce){(ze.aria&&(Ce==="role"||tt(Ce,Oe))||ze.data&&tt(Ce,Re)||ze.attr&&Pe.includes(Ce))&&(be[Ce]=on[Ce])}),be}var Je={},bt=[],lt=function(Yt){bt.push(Yt)};function Lt(on,Yt){if(0)var ze}function Mt(on,Yt){if(0)var ze}function pt(){Je={}}function dn(on,Yt,ze){!Yt&&!Je[ze]&&(on(!1,ze),Je[ze]=!0)}function tn(on,Yt){dn(Lt,on,Yt)}function vn(on,Yt){dn(Mt,on,Yt)}tn.preMessage=lt,tn.resetWarned=pt,tn.noteOnce=vn;var Tn=null,Ve=Me(81626),Ze=[10,20,50,100],Qe=function(Yt){var ze=Yt.pageSizeOptions,be=ze===void 0?Ze:ze,Ce=Yt.locale,De=Yt.changeSize,Ge=Yt.pageSize,Fe=Yt.goButton,qe=Yt.quickGo,rn=Yt.rootPrefixCls,Kn=Yt.disabled,Zn=Yt.buildOptionText,$t=Yt.showSizeChanger,Nn=Yt.sizeChangerRender,Zt=gt.useState(""),qn=(0,ft.Z)(Zt,2),$n=qn[0],oi=qn[1],ri=function(){return!$n||Number.isNaN($n)?void 0:Number($n)},fr=typeof Zn=="function"?Zn:function(Ni){return"".concat(Ni," ").concat(Ce.items_per_page)},wr=function(lr){oi(lr.target.value)},Li=function(lr){Fe||$n===""||(oi(""),!(lr.relatedTarget&&(lr.relatedTarget.className.indexOf("".concat(rn,"-item-link"))>=0||lr.relatedTarget.className.indexOf("".concat(rn,"-item"))>=0))&&(qe==null||qe(ri())))},Ai=function(lr){$n!==""&&(lr.keyCode===pe.ENTER||lr.type==="click")&&(oi(""),qe==null||qe(ri()))},Ur=function(){return be.some(function(lr){return lr.toString()===Ge.toString()})?be:be.concat([Ge]).sort(function(lr,mo){var pi=Number.isNaN(Number(lr))?0:Number(lr),ti=Number.isNaN(Number(mo))?0:Number(mo);return pi-ti})},Yn="".concat(rn,"-options");if(!$t&&!qe)return null;var Rn=null,sr=null,xr=null;return $t&&Nn&&(Rn=Nn({disabled:Kn,size:Ge,onSizeChange:function(lr){De==null||De(Number(lr))},"aria-label":Ce.page_size,className:"".concat(Yn,"-size-changer"),options:Ur().map(function(Ni){return{label:fr(Ni),value:Ni}})})),qe&&(Fe&&(xr=typeof Fe=="boolean"?gt.createElement("button",{type:"button",onClick:Ai,onKeyUp:Ai,disabled:Kn,className:"".concat(Yn,"-quick-jumper-button")},Ce.jump_to_confirm):gt.createElement("span",{onClick:Ai,onKeyUp:Ai},Fe)),sr=gt.createElement("div",{className:"".concat(Yn,"-quick-jumper")},Ce.jump_to,gt.createElement("input",{disabled:Kn,type:"text",value:$n,onChange:wr,onKeyUp:Ai,onBlur:Li,"aria-label":Ce.page}),Ce.page,xr)),gt.createElement("li",{className:Yn},Rn,sr)},mn=Qe,kn=function(Yt){var ze=Yt.rootPrefixCls,be=Yt.page,Ce=Yt.active,De=Yt.className,Ge=Yt.showTitle,Fe=Yt.onClick,qe=Yt.onKeyPress,rn=Yt.itemRender,Kn="".concat(ze,"-item"),Zn=He()(Kn,"".concat(Kn,"-").concat(be),(0,fe.Z)((0,fe.Z)({},"".concat(Kn,"-active"),Ce),"".concat(Kn,"-disabled"),!be),De),$t=function(){Fe(be)},Nn=function($n){qe($n,Fe,be)},Zt=rn(be,"page",gt.createElement("a",{rel:"nofollow"},be));return Zt?gt.createElement("li",{title:Ge?String(be):null,className:Zn,onClick:$t,onKeyDown:Nn,tabIndex:0},Zt):null},At=kn,pn=function(Yt,ze,be){return be};function ln(){}function jn(on){var Yt=Number(on);return typeof Yt=="number"&&!Number.isNaN(Yt)&&isFinite(Yt)&&Math.floor(Yt)===Yt}function Gt(on,Yt,ze){var be=typeof on=="undefined"?Yt:on;return Math.floor((ze-1)/be)+1}var mt=function(Yt){var ze=Yt.prefixCls,be=ze===void 0?"rc-pagination":ze,Ce=Yt.selectPrefixCls,De=Ce===void 0?"rc-select":Ce,Ge=Yt.className,Fe=Yt.current,qe=Yt.defaultCurrent,rn=qe===void 0?1:qe,Kn=Yt.total,Zn=Kn===void 0?0:Kn,$t=Yt.pageSize,Nn=Yt.defaultPageSize,Zt=Nn===void 0?10:Nn,qn=Yt.onChange,$n=qn===void 0?ln:qn,oi=Yt.hideOnSinglePage,ri=Yt.align,fr=Yt.showPrevNextJumpers,wr=fr===void 0?!0:fr,Li=Yt.showQuickJumper,Ai=Yt.showLessItems,Ur=Yt.showTitle,Yn=Ur===void 0?!0:Ur,Rn=Yt.onShowSizeChange,sr=Rn===void 0?ln:Rn,xr=Yt.locale,Ni=xr===void 0?Ve.Z:xr,lr=Yt.style,mo=Yt.totalBoundaryShowSizeChanger,pi=mo===void 0?50:mo,ti=Yt.disabled,hi=Yt.simple,Ii=Yt.showTotal,ir=Yt.showSizeChanger,zi=ir===void 0?Zn>pi:ir,an=Yt.sizeChangerRender,we=Yt.pageSizeOptions,Ut=Yt.itemRender,en=Ut===void 0?pn:Ut,cn=Yt.jumpPrevIcon,xn=Yt.jumpNextIcon,In=Yt.prevIcon,ni=Yt.nextIcon,Ui=gt.useRef(null),Ot=ue(10,{value:$t,defaultValue:Zt}),_t=(0,ft.Z)(Ot,2),Ct=_t[0],Jt=_t[1],ci=ue(1,{value:Fe,defaultValue:rn,postState:function(Gr){return Math.max(1,Math.min(Gr,Gt(void 0,Ct,Zn)))}}),Xn=(0,ft.Z)(ci,2),_n=Xn[0],It=Xn[1],hn=gt.useState(_n),Ci=(0,ft.Z)(hn,2),Ri=Ci[0],Ln=Ci[1];(0,gt.useEffect)(function(){Ln(_n)},[_n]);var Rt=$n!==ln,Si="current"in Yt,Zi=Math.max(1,_n-(Ai?3:5)),Wr=Math.min(Gt(void 0,Ct,Zn),_n+(Ai?3:5));function En(un,Gr){var Io=un||gt.createElement("button",{type:"button","aria-label":Gr,className:"".concat(be,"-item-link")});return typeof un=="function"&&(Io=gt.createElement(un,(0,zt.Z)({},Yt))),Io}function li(un){var Gr=un.target.value,Io=Gt(void 0,Ct,Zn),Va;return Gr===""?Va=Gr:Number.isNaN(Number(Gr))?Va=Ri:Gr>=Io?Va=Io:Va=Number(Gr),Va}function bo(un){return jn(un)&&un!==_n&&jn(Zn)&&Zn>0}var La=Zn>Ct?Li:!1;function sa(un){(un.keyCode===pe.UP||un.keyCode===pe.DOWN)&&un.preventDefault()}function Yi(un){var Gr=li(un);switch(Gr!==Ri&&Ln(Gr),un.keyCode){case pe.ENTER:Mo(Gr);break;case pe.UP:Mo(Gr-1);break;case pe.DOWN:Mo(Gr+1);break;default:break}}function Wi(un){Mo(li(un))}function er(un){var Gr=Gt(un,Ct,Zn),Io=_n>Gr&&Gr!==0?Gr:_n;Jt(un),Ln(Io),sr==null||sr(_n,un),It(Io),$n==null||$n(Io,un)}function Mo(un){if(bo(un)&&!ti){var Gr=Gt(void 0,Ct,Zn),Io=un;return un>Gr?Io=Gr:un<1&&(Io=1),Io!==Ri&&Ln(Io),It(Io),$n==null||$n(Io,Ct),Io}return _n}var ra=_n>1,ai=_n<Gt(void 0,Ct,Zn);function Mr(){ra&&Mo(_n-1)}function ml(){ai&&Mo(_n+1)}function xs(){Mo(Zi)}function $a(){Mo(Wr)}function Wt(un,Gr){if(un.key==="Enter"||un.charCode===pe.ENTER||un.keyCode===pe.ENTER){for(var Io=arguments.length,Va=new Array(Io>2?Io-2:0),Ta=2;Ta<Io;Ta++)Va[Ta-2]=arguments[Ta];Gr.apply(void 0,Va)}}function $i(un){Wt(un,Mr)}function Vo(un){Wt(un,ml)}function Pr(un){Wt(un,xs)}function Ia(un){Wt(un,$a)}function zo(un){var Gr=en(un,"prev",En(In,"prev page"));return gt.isValidElement(Gr)?gt.cloneElement(Gr,{disabled:!ra}):Gr}function na(un){var Gr=en(un,"next",En(ni,"next page"));return gt.isValidElement(Gr)?gt.cloneElement(Gr,{disabled:!ai}):Gr}function Fo(un){(un.type==="click"||un.keyCode===pe.ENTER)&&Mo(Ri)}var _o=null,da=rt(Yt,{aria:!0,data:!0}),bn=Ii&>.createElement("li",{className:"".concat(be,"-total-text")},Ii(Zn,[Zn===0?0:(_n-1)*Ct+1,_n*Ct>Zn?Zn:_n*Ct])),Ga=null,Sn=Gt(void 0,Ct,Zn);if(oi&&Zn<=Ct)return null;var Zo=[],js={rootPrefixCls:be,onClick:Mo,onKeyPress:Wt,showTitle:Yn,itemRender:en,page:-1},Vr=_n-1>0?_n-1:0,Ll=_n+1<Sn?_n+1:Sn,Ha=Li&&Li.goButton,$o=(0,St.Z)(hi)==="object"?hi.readOnly:!hi,Ba=Ha,nl=null;hi&&(Ha&&(typeof Ha=="boolean"?Ba=gt.createElement("button",{type:"button",onClick:Fo,onKeyUp:Fo},Ni.jump_to_confirm):Ba=gt.createElement("span",{onClick:Fo,onKeyUp:Fo},Ha),Ba=gt.createElement("li",{title:Yn?"".concat(Ni.jump_to).concat(_n,"/").concat(Sn):null,className:"".concat(be,"-simple-pager")},Ba)),nl=gt.createElement("li",{title:Yn?"".concat(_n,"/").concat(Sn):null,className:"".concat(be,"-simple-pager")},$o?Ri:gt.createElement("input",{type:"text","aria-label":Ni.jump_to,value:Ri,disabled:ti,onKeyDown:sa,onKeyUp:Yi,onChange:Yi,onBlur:Wi,size:3}),gt.createElement("span",{className:"".concat(be,"-slash")},"/"),Sn));var wa=Ai?1:2;if(Sn<=3+wa*2){Sn||Zo.push(gt.createElement(At,(0,Ke.Z)({},js,{key:"noPager",page:1,className:"".concat(be,"-item-disabled")})));for(var ki=1;ki<=Sn;ki+=1)Zo.push(gt.createElement(At,(0,Ke.Z)({},js,{key:ki,page:ki,active:_n===ki})))}else{var $e=Ai?Ni.prev_3:Ni.prev_5,rs=Ai?Ni.next_3:Ni.next_5,hu=en(Zi,"jump-prev",En(cn,"prev page")),cu=en(Wr,"jump-next",En(xn,"next page"));wr&&(_o=hu?gt.createElement("li",{title:Yn?$e:null,key:"prev",onClick:xs,tabIndex:0,onKeyDown:Pr,className:He()("".concat(be,"-jump-prev"),(0,fe.Z)({},"".concat(be,"-jump-prev-custom-icon"),!!cn))},hu):null,Ga=cu?gt.createElement("li",{title:Yn?rs:null,key:"next",onClick:$a,tabIndex:0,onKeyDown:Ia,className:He()("".concat(be,"-jump-next"),(0,fe.Z)({},"".concat(be,"-jump-next-custom-icon"),!!xn))},cu):null);var ul=Math.max(1,_n-wa),kl=Math.min(_n+wa,Sn);_n-1<=wa&&(kl=1+wa*2),Sn-_n<=wa&&(ul=Sn-wa*2);for(var zl=ul;zl<=kl;zl+=1)Zo.push(gt.createElement(At,(0,Ke.Z)({},js,{key:zl,page:zl,active:_n===zl})));if(_n-1>=wa*2&&_n!==3&&(Zo[0]=gt.cloneElement(Zo[0],{className:He()("".concat(be,"-item-after-jump-prev"),Zo[0].props.className)}),Zo.unshift(_o)),Sn-_n>=wa*2&&_n!==Sn-2){var sh=Zo[Zo.length-1];Zo[Zo.length-1]=gt.cloneElement(sh,{className:He()("".concat(be,"-item-before-jump-next"),sh.props.className)}),Zo.push(Ga)}ul!==1&&Zo.unshift(gt.createElement(At,(0,Ke.Z)({},js,{key:1,page:1}))),kl!==Sn&&Zo.push(gt.createElement(At,(0,Ke.Z)({},js,{key:Sn,page:Sn})))}var Su=zo(Vr);if(Su){var Ra=!ra||!Sn;Su=gt.createElement("li",{title:Yn?Ni.prev_page:null,onClick:Mr,tabIndex:Ra?null:0,onKeyDown:$i,className:He()("".concat(be,"-prev"),(0,fe.Z)({},"".concat(be,"-disabled"),Ra)),"aria-disabled":Ra},Su)}var qa=na(Ll);if(qa){var Nr,vr;hi?(Nr=!ai,vr=ra?0:null):(Nr=!ai||!Sn,vr=Nr?null:0),qa=gt.createElement("li",{title:Yn?Ni.next_page:null,onClick:ml,tabIndex:vr,onKeyDown:Vo,className:He()("".concat(be,"-next"),(0,fe.Z)({},"".concat(be,"-disabled"),Nr)),"aria-disabled":Nr},qa)}var uo=He()(be,Ge,(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(be,"-start"),ri==="start"),"".concat(be,"-center"),ri==="center"),"".concat(be,"-end"),ri==="end"),"".concat(be,"-simple"),hi),"".concat(be,"-disabled"),ti));return gt.createElement("ul",(0,Ke.Z)({className:uo,style:lr,ref:Ui},da),bn,Su,hi?nl:Zo,qa,gt.createElement(mn,{locale:Ni,rootPrefixCls:be,disabled:ti,selectPrefixCls:De,changeSize:er,pageSize:Ct,pageSizeOptions:we,quickGo:La?Mo:null,goButton:Ba,showSizeChanger:zi,sizeChangerRender:an}))},Et=mt},71032:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return ve}});var fe=Me(87462),Ke=Me(4942),St=Me(97685),zt=Me(45987),ft=Me(94184),Be=Me.n(ft),He=Me(21770),gt=Me(15105),it=Me(64217),st=Me(67294);function Ft(Se,Pe){var Oe=Se.disabled,Re=Se.prefixCls,tt=Se.character,rt=Se.characterRender,Je=Se.index,bt=Se.count,lt=Se.value,Lt=Se.allowHalf,Mt=Se.focused,pt=Se.onHover,dn=Se.onClick,tn=function(At){pt(At,Je)},vn=function(At){dn(At,Je)},Tn=function(At){At.keyCode===gt.Z.ENTER&&dn(At,Je)},Ve=Je+1,Ze=new Set([Re]);lt===0&&Je===0&&Mt?Ze.add("".concat(Re,"-focused")):Lt&<+.5>=Ve&<<Ve?(Ze.add("".concat(Re,"-half")),Ze.add("".concat(Re,"-active")),Mt&&Ze.add("".concat(Re,"-focused"))):(Ve<=lt?Ze.add("".concat(Re,"-full")):Ze.add("".concat(Re,"-zero")),Ve===lt&&Mt&&Ze.add("".concat(Re,"-focused")));var Qe=typeof tt=="function"?tt(Se):tt,mn=st.createElement("li",{className:Be()(Array.from(Ze)),ref:Pe},st.createElement("div",{onClick:Oe?null:vn,onKeyDown:Oe?null:Tn,onMouseMove:Oe?null:tn,role:"radio","aria-checked":lt>Je?"true":"false","aria-posinset":Je+1,"aria-setsize":bt,tabIndex:Oe?-1:0},st.createElement("div",{className:"".concat(Re,"-first")},Qe),st.createElement("div",{className:"".concat(Re,"-second")},Qe)));return rt&&(mn=rt(mn,Se)),mn}var Nt=st.forwardRef(Ft);function Bt(){var Se=st.useRef({});function Pe(Re){return Se.current[Re]}function Oe(Re){return function(tt){Se.current[Re]=tt}}return[Pe,Oe]}function Ae(Se){var Pe=Se.pageXOffset,Oe="scrollLeft";if(typeof Pe!="number"){var Re=Se.document;Pe=Re.documentElement[Oe],typeof Pe!="number"&&(Pe=Re.body[Oe])}return Pe}function ne(Se){var Pe,Oe,Re=Se.ownerDocument,tt=Re.body,rt=Re&&Re.documentElement,Je=Se.getBoundingClientRect();return Pe=Je.left,Oe=Je.top,Pe-=rt.clientLeft||tt.clientLeft||0,Oe-=rt.clientTop||tt.clientTop||0,{left:Pe,top:Oe}}function te(Se){var Pe=ne(Se),Oe=Se.ownerDocument,Re=Oe.defaultView||Oe.parentWindow;return Pe.left+=Ae(Re),Pe.left}var ue=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function se(Se,Pe){var Oe=Se.prefixCls,Re=Oe===void 0?"rc-rate":Oe,tt=Se.className,rt=Se.defaultValue,Je=Se.value,bt=Se.count,lt=bt===void 0?5:bt,Lt=Se.allowHalf,Mt=Lt===void 0?!1:Lt,pt=Se.allowClear,dn=pt===void 0?!0:pt,tn=Se.keyboard,vn=tn===void 0?!0:tn,Tn=Se.character,Ve=Tn===void 0?"\u2605":Tn,Ze=Se.characterRender,Qe=Se.disabled,mn=Se.direction,kn=mn===void 0?"ltr":mn,At=Se.tabIndex,pn=At===void 0?0:At,ln=Se.autoFocus,jn=Se.onHoverChange,Gt=Se.onChange,mt=Se.onFocus,Et=Se.onBlur,on=Se.onKeyDown,Yt=Se.onMouseLeave,ze=(0,zt.Z)(Se,ue),be=Bt(),Ce=(0,St.Z)(be,2),De=Ce[0],Ge=Ce[1],Fe=st.useRef(null),qe=function(){if(!Qe){var zi;(zi=Fe.current)===null||zi===void 0||zi.focus()}};st.useImperativeHandle(Pe,function(){return{focus:qe,blur:function(){if(!Qe){var zi;(zi=Fe.current)===null||zi===void 0||zi.blur()}}}});var rn=(0,He.Z)(rt||0,{value:Je}),Kn=(0,St.Z)(rn,2),Zn=Kn[0],$t=Kn[1],Nn=(0,He.Z)(null),Zt=(0,St.Z)(Nn,2),qn=Zt[0],$n=Zt[1],oi=function(zi,an){var we=kn==="rtl",Ut=zi+1;if(Mt){var en=De(zi),cn=te(en),xn=en.clientWidth;(we&&an-cn>xn/2||!we&&an-cn<xn/2)&&(Ut-=.5)}return Ut},ri=function(zi){$t(zi),Gt==null||Gt(zi)},fr=st.useState(!1),wr=(0,St.Z)(fr,2),Li=wr[0],Ai=wr[1],Ur=function(){Ai(!0),mt==null||mt()},Yn=function(){Ai(!1),Et==null||Et()},Rn=st.useState(null),sr=(0,St.Z)(Rn,2),xr=sr[0],Ni=sr[1],lr=function(zi,an){var we=oi(an,zi.pageX);we!==qn&&(Ni(we),$n(null)),jn==null||jn(we)},mo=function(zi){Qe||(Ni(null),$n(null),jn==null||jn(void 0)),zi&&(Yt==null||Yt(zi))},pi=function(zi,an){var we=oi(an,zi.pageX),Ut=!1;dn&&(Ut=we===Zn),mo(),ri(Ut?0:we),$n(Ut?we:null)},ti=function(zi){var an=zi.keyCode,we=kn==="rtl",Ut=Mt?.5:1;vn&&(an===gt.Z.RIGHT&&Zn<lt&&!we?(ri(Zn+Ut),zi.preventDefault()):an===gt.Z.LEFT&&Zn>0&&!we||an===gt.Z.RIGHT&&Zn>0&&we?(ri(Zn-Ut),zi.preventDefault()):an===gt.Z.LEFT&&Zn<lt&&we&&(ri(Zn+Ut),zi.preventDefault())),on==null||on(zi)};st.useEffect(function(){ln&&!Qe&&qe()},[]);var hi=new Array(lt).fill(0).map(function(ir,zi){return st.createElement(Nt,{ref:Ge(zi),index:zi,count:lt,disabled:Qe,prefixCls:"".concat(Re,"-star"),allowHalf:Mt,value:xr===null?Zn:xr,onClick:pi,onHover:lr,key:ir||zi,character:Ve,characterRender:Ze,focused:Li})}),Ii=Be()(Re,tt,(0,Ke.Z)((0,Ke.Z)({},"".concat(Re,"-disabled"),Qe),"".concat(Re,"-rtl"),kn==="rtl"));return st.createElement("ul",(0,fe.Z)({className:Ii,onMouseLeave:mo,tabIndex:Qe?-1:pn,onFocus:Qe?null:Ur,onBlur:Qe?null:Yn,onKeyDown:Qe?null:ti,ref:Fe},(0,it.Z)(ze,{aria:!0,data:!0,attr:!0})),hi)}var pe=st.forwardRef(se),ve=pe},58212:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return Tn}});function fe(){return fe=Object.assign?Object.assign.bind():function(Ve){for(var Ze=1;Ze<arguments.length;Ze++){var Qe=arguments[Ze];for(var mn in Qe)Object.prototype.hasOwnProperty.call(Qe,mn)&&(Ve[mn]=Qe[mn])}return Ve},fe.apply(this,arguments)}function Ke(Ve){"@babel/helpers - typeof";return Ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ze){return typeof Ze}:function(Ze){return Ze&&typeof Symbol=="function"&&Ze.constructor===Symbol&&Ze!==Symbol.prototype?"symbol":typeof Ze},Ke(Ve)}function St(Ve,Ze){if(Ke(Ve)!=="object"||Ve===null)return Ve;var Qe=Ve[Symbol.toPrimitive];if(Qe!==void 0){var mn=Qe.call(Ve,Ze||"default");if(Ke(mn)!=="object")return mn;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ze==="string"?String:Number)(Ve)}function zt(Ve){var Ze=St(Ve,"string");return Ke(Ze)==="symbol"?Ze:String(Ze)}function ft(Ve,Ze,Qe){return Ze=zt(Ze),Ze in Ve?Object.defineProperty(Ve,Ze,{value:Qe,enumerable:!0,configurable:!0,writable:!0}):Ve[Ze]=Qe,Ve}function Be(Ve){if(Array.isArray(Ve))return Ve}function He(Ve,Ze){var Qe=Ve==null?null:typeof Symbol!="undefined"&&Ve[Symbol.iterator]||Ve["@@iterator"];if(Qe!=null){var mn,kn,At,pn,ln=[],jn=!0,Gt=!1;try{if(At=(Qe=Qe.call(Ve)).next,Ze===0){if(Object(Qe)!==Qe)return;jn=!1}else for(;!(jn=(mn=At.call(Qe)).done)&&(ln.push(mn.value),ln.length!==Ze);jn=!0);}catch(mt){Gt=!0,kn=mt}finally{try{if(!jn&&Qe.return!=null&&(pn=Qe.return(),Object(pn)!==pn))return}finally{if(Gt)throw kn}}return ln}}function gt(Ve,Ze){(Ze==null||Ze>Ve.length)&&(Ze=Ve.length);for(var Qe=0,mn=new Array(Ze);Qe<Ze;Qe++)mn[Qe]=Ve[Qe];return mn}function it(Ve,Ze){if(Ve){if(typeof Ve=="string")return gt(Ve,Ze);var Qe=Object.prototype.toString.call(Ve).slice(8,-1);if(Qe==="Object"&&Ve.constructor&&(Qe=Ve.constructor.name),Qe==="Map"||Qe==="Set")return Array.from(Ve);if(Qe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Qe))return gt(Ve,Ze)}}function st(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ft(Ve,Ze){return Be(Ve)||He(Ve,Ze)||it(Ve,Ze)||st()}function Nt(Ve,Ze){if(Ve==null)return{};var Qe={},mn=Object.keys(Ve),kn,At;for(At=0;At<mn.length;At++)kn=mn[At],!(Ze.indexOf(kn)>=0)&&(Qe[kn]=Ve[kn]);return Qe}function Bt(Ve,Ze){if(Ve==null)return{};var Qe=Nt(Ve,Ze),mn,kn;if(Object.getOwnPropertySymbols){var At=Object.getOwnPropertySymbols(Ve);for(kn=0;kn<At.length;kn++)mn=At[kn],!(Ze.indexOf(mn)>=0)&&Object.prototype.propertyIsEnumerable.call(Ve,mn)&&(Qe[mn]=Ve[mn])}return Qe}var Ae=Me(67294),ne=Me(94184),te=Me.n(ne);function ue(Ve){if(Array.isArray(Ve))return Ve}function se(Ve,Ze){var Qe=Ve==null?null:typeof Symbol!="undefined"&&Ve[Symbol.iterator]||Ve["@@iterator"];if(Qe!=null){var mn,kn,At,pn,ln=[],jn=!0,Gt=!1;try{if(At=(Qe=Qe.call(Ve)).next,Ze===0){if(Object(Qe)!==Qe)return;jn=!1}else for(;!(jn=(mn=At.call(Qe)).done)&&(ln.push(mn.value),ln.length!==Ze);jn=!0);}catch(mt){Gt=!0,kn=mt}finally{try{if(!jn&&Qe.return!=null&&(pn=Qe.return(),Object(pn)!==pn))return}finally{if(Gt)throw kn}}return ln}}function pe(Ve,Ze){(Ze==null||Ze>Ve.length)&&(Ze=Ve.length);for(var Qe=0,mn=new Array(Ze);Qe<Ze;Qe++)mn[Qe]=Ve[Qe];return mn}function ve(Ve,Ze){if(Ve){if(typeof Ve=="string")return pe(Ve,Ze);var Qe=Object.prototype.toString.call(Ve).slice(8,-1);if(Qe==="Object"&&Ve.constructor&&(Qe=Ve.constructor.name),Qe==="Map"||Qe==="Set")return Array.from(Ve);if(Qe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Qe))return pe(Ve,Ze)}}function Se(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pe(Ve,Ze){return ue(Ve)||se(Ve,Ze)||ve(Ve,Ze)||Se()}function Oe(Ve){var Ze=Ae.useRef();Ze.current=Ve;var Qe=Ae.useCallback(function(){for(var mn,kn=arguments.length,At=new Array(kn),pn=0;pn<kn;pn++)At[pn]=arguments[pn];return(mn=Ze.current)===null||mn===void 0?void 0:mn.call.apply(mn,[Ze].concat(At))},[]);return Qe}function Re(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var tt=Re()?Ae.useLayoutEffect:Ae.useEffect,rt=function(Ze,Qe){var mn=Ae.useRef(!0);tt(function(){return Ze(mn.current)},Qe),tt(function(){return mn.current=!1,function(){mn.current=!0}},[])},Je=function(Ze,Qe){rt(function(mn){if(!mn)return Ze()},Qe)},bt=null;function lt(Ve){var Ze=Ae.useRef(!1),Qe=Ae.useState(Ve),mn=Pe(Qe,2),kn=mn[0],At=mn[1];Ae.useEffect(function(){return Ze.current=!1,function(){Ze.current=!0}},[]);function pn(ln,jn){jn&&Ze.current||At(ln)}return[kn,pn]}function Lt(Ve){return Ve!==void 0}function Mt(Ve,Ze){var Qe=Ze||{},mn=Qe.defaultValue,kn=Qe.value,At=Qe.onChange,pn=Qe.postState,ln=lt(function(){return Lt(kn)?kn:Lt(mn)?typeof mn=="function"?mn():mn:typeof Ve=="function"?Ve():Ve}),jn=Pe(ln,2),Gt=jn[0],mt=jn[1],Et=kn!==void 0?kn:Gt,on=pn?pn(Et):Et,Yt=Oe(At),ze=lt([Et]),be=Pe(ze,2),Ce=be[0],De=be[1];Je(function(){var Fe=Ce[0];Gt!==Fe&&Yt(Gt,Fe)},[Ce]),Je(function(){Lt(kn)||mt(kn)},[kn]);var Ge=Oe(function(Fe,qe){mt(Fe,qe),De([Et],qe)});return[on,Ge]}var pt={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229,isTextModifyingKeyEvent:function(Ze){var Qe=Ze.keyCode;if(Ze.altKey&&!Ze.ctrlKey||Ze.metaKey||Qe>=pt.F1&&Qe<=pt.F12)return!1;switch(Qe){case pt.ALT:case pt.CAPS_LOCK:case pt.CONTEXT_MENU:case pt.CTRL:case pt.DOWN:case pt.END:case pt.ESC:case pt.HOME:case pt.INSERT:case pt.LEFT:case pt.MAC_FF_META:case pt.META:case pt.NUMLOCK:case pt.NUM_CENTER:case pt.PAGE_DOWN:case pt.PAGE_UP:case pt.PAUSE:case pt.PRINT_SCREEN:case pt.RIGHT:case pt.SHIFT:case pt.UP:case pt.WIN_KEY:case pt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ze){if(Ze>=pt.ZERO&&Ze<=pt.NINE||Ze>=pt.NUM_ZERO&&Ze<=pt.NUM_MULTIPLY||Ze>=pt.A&&Ze<=pt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ze===0)return!0;switch(Ze){case pt.SPACE:case pt.QUESTION_MARK:case pt.NUM_PLUS:case pt.NUM_MINUS:case pt.NUM_PERIOD:case pt.NUM_DIVISION:case pt.SEMICOLON:case pt.DASH:case pt.EQUALS:case pt.COMMA:case pt.PERIOD:case pt.SLASH:case pt.APOSTROPHE:case pt.SINGLE_QUOTE:case pt.OPEN_SQUARE_BRACKET:case pt.BACKSLASH:case pt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},dn=pt,tn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],vn=Ae.forwardRef(function(Ve,Ze){var Qe,mn=Ve.prefixCls,kn=mn===void 0?"rc-switch":mn,At=Ve.className,pn=Ve.checked,ln=Ve.defaultChecked,jn=Ve.disabled,Gt=Ve.loadingIcon,mt=Ve.checkedChildren,Et=Ve.unCheckedChildren,on=Ve.onClick,Yt=Ve.onChange,ze=Ve.onKeyDown,be=Bt(Ve,tn),Ce=Mt(!1,{value:pn,defaultValue:ln}),De=Ft(Ce,2),Ge=De[0],Fe=De[1];function qe($t,Nn){var Zt=Ge;return jn||(Zt=$t,Fe(Zt),Yt==null||Yt(Zt,Nn)),Zt}function rn($t){$t.which===dn.LEFT?qe(!1,$t):$t.which===dn.RIGHT&&qe(!0,$t),ze==null||ze($t)}function Kn($t){var Nn=qe(!Ge,$t);on==null||on(Nn,$t)}var Zn=te()(kn,At,(Qe={},ft(Qe,"".concat(kn,"-checked"),Ge),ft(Qe,"".concat(kn,"-disabled"),jn),Qe));return Ae.createElement("button",fe({},be,{type:"button",role:"switch","aria-checked":Ge,disabled:jn,className:Zn,ref:Ze,onKeyDown:rn,onClick:Kn}),Gt,Ae.createElement("span",{className:"".concat(kn,"-inner")},Ae.createElement("span",{className:"".concat(kn,"-inner-checked")},mt),Ae.createElement("span",{className:"".concat(kn,"-inner-unchecked")},Et)))});vn.displayName="Switch";var Tn=vn},45233:function(Cn,On,Me){"use strict";Me.d(On,{R:function(){return Ke},w:function(){return fe}});var fe={},Ke="rc-table-internal-hook"},54768:function(Cn,On,Me){"use strict";Me.d(On,{L:function(){return ue},Z:function(){return Pe}});var fe=Me(97685),Ke=Me(4942),St=Me(74902),zt=Me(71002),ft=Me(1413),Be=Me(45987),He=Me(63295),gt=Me(67294);function it(Oe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},tt=[];return gt.Children.forEach(Oe,function(rt){rt==null&&!Re.keepEmpty||(Array.isArray(rt)?tt=tt.concat(it(rt)):(0,He.Z)(rt)&&rt.props?tt=tt.concat(it(rt.props.children,Re)):tt.push(rt))}),tt}var st=Me(40830),Ft=Me(45233),Nt=Me(62978);function Bt(Oe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Re=="number"?Re:Re.endsWith("%")?Oe*parseFloat(Re)/100:null}function Ae(Oe,Re,tt){return gt.useMemo(function(){if(Re&&Re>0){var rt=0,Je=0;Oe.forEach(function(vn){var Tn=Bt(Re,vn.width);Tn?rt+=Tn:Je+=1});var bt=Math.max(Re,tt),lt=Math.max(bt-rt,Je),Lt=Je,Mt=lt/Je,pt=0,dn=Oe.map(function(vn){var Tn=(0,ft.Z)({},vn),Ve=Bt(Re,Tn.width);if(Ve)Tn.width=Ve;else{var Ze=Math.floor(Mt);Tn.width=Lt===1?lt:Ze,lt-=Ze,Lt-=1}return pt+=Tn.width,Tn});if(pt<bt){var tn=bt/pt;lt=bt,dn.forEach(function(vn,Tn){var Ve=Math.floor(vn.width*tn);vn.width=Tn===dn.length-1?lt:Ve,lt-=Ve})}return[dn,Math.max(pt,bt)]}return[Oe,Re]},[Oe,Re,tt])}var ne=["children"],te=["fixed"];function ue(Oe){return it(Oe).filter(function(Re){return gt.isValidElement(Re)}).map(function(Re){var tt=Re.key,rt=Re.props,Je=rt.children,bt=(0,Be.Z)(rt,ne),lt=(0,ft.Z)({key:tt},bt);return Je&&(lt.children=ue(Je)),lt})}function se(Oe){return Oe.filter(function(Re){return Re&&(0,zt.Z)(Re)==="object"&&!Re.hidden}).map(function(Re){var tt=Re.children;return tt&&tt.length>0?(0,ft.Z)((0,ft.Z)({},Re),{},{children:se(tt)}):Re})}function pe(Oe){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Oe.filter(function(tt){return tt&&(0,zt.Z)(tt)==="object"}).reduce(function(tt,rt,Je){var bt=rt.fixed,lt=bt===!0?"left":bt,Lt="".concat(Re,"-").concat(Je),Mt=rt.children;return Mt&&Mt.length>0?[].concat((0,St.Z)(tt),(0,St.Z)(pe(Mt,Lt).map(function(pt){return(0,ft.Z)({fixed:lt},pt)}))):[].concat((0,St.Z)(tt),[(0,ft.Z)((0,ft.Z)({key:Lt},rt),{},{fixed:lt})])},[])}function ve(Oe){return Oe.map(function(Re){var tt=Re.fixed,rt=(0,Be.Z)(Re,te),Je=tt;return tt==="left"?Je="right":tt==="right"&&(Je="left"),(0,ft.Z)({fixed:Je},rt)})}function Se(Oe,Re){var tt=Oe.prefixCls,rt=Oe.columns,Je=Oe.children,bt=Oe.expandable,lt=Oe.expandedKeys,Lt=Oe.columnTitle,Mt=Oe.getRowKey,pt=Oe.onTriggerExpand,dn=Oe.expandIcon,tn=Oe.rowExpandable,vn=Oe.expandIconColumnIndex,Tn=Oe.direction,Ve=Oe.expandRowByClick,Ze=Oe.columnWidth,Qe=Oe.fixed,mn=Oe.scrollWidth,kn=Oe.clientWidth,At=gt.useMemo(function(){var ze=rt||ue(Je)||[];return se(ze.slice())},[rt,Je]),pn=gt.useMemo(function(){if(bt){var ze=At.slice();if(!ze.includes(Ft.w)){var be=vn||0;be>=0&&(be||Qe==="left"||!Qe)&&ze.splice(be,0,Ft.w),Qe==="right"&&ze.splice(At.length,0,Ft.w)}var Ce=ze.indexOf(Ft.w);ze=ze.filter(function(qe,rn){return qe!==Ft.w||rn===Ce});var De=At[Ce],Ge;Qe?Ge=Qe:Ge=De?De.fixed:null;var Fe=(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},Nt.v,{className:"".concat(tt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Lt),"fixed",Ge),"className","".concat(tt,"-row-expand-icon-cell")),"width",Ze),"render",function(rn,Kn,Zn){var $t=Mt(Kn,Zn),Nn=lt.has($t),Zt=tn?tn(Kn):!0,qn=dn({prefixCls:tt,expanded:Nn,expandable:Zt,record:Kn,onExpand:pt});return Ve?gt.createElement("span",{onClick:function(oi){return oi.stopPropagation()}},qn):qn});return ze.map(function(qe){return qe===Ft.w?Fe:qe})}return At.filter(function(qe){return qe!==Ft.w})},[bt,At,Mt,lt,dn,Tn]),ln=gt.useMemo(function(){var ze=pn;return Re&&(ze=Re(ze)),ze.length||(ze=[{render:function(){return null}}]),ze},[Re,pn,Tn]),jn=gt.useMemo(function(){return Tn==="rtl"?ve(pe(ln)):pe(ln)},[ln,Tn,mn]),Gt=gt.useMemo(function(){for(var ze=-1,be=jn.length-1;be>=0;be-=1){var Ce=jn[be].fixed;if(Ce==="left"||Ce===!0){ze=be;break}}if(ze>=0)for(var De=0;De<=ze;De+=1){var Ge=jn[De].fixed;if(Ge!=="left"&&Ge!==!0)return!0}var Fe=jn.findIndex(function(Kn){var Zn=Kn.fixed;return Zn==="right"});if(Fe>=0)for(var qe=Fe;qe<jn.length;qe+=1){var rn=jn[qe].fixed;if(rn!=="right")return!0}return!1},[jn]),mt=Ae(jn,mn,kn),Et=(0,fe.Z)(mt,2),on=Et[0],Yt=Et[1];return[ln,on,Yt,Gt]}var Pe=Se},29104:function(Cn,On,Me){"use strict";Me.d(On,{w2:function(){return fe.w},vP:function(){return Fo.v},RQ:function(){return fe.R},ER:function(){return an},Q$:function(){return Ko},TN:function(){return ju}});var fe=Me(45233),Ke=Me(97685),St=Me(66680),zt=Me(8410),ft=Me(91881),Be=Me(67294),He=Me(73935);function gt(We){var dt=Be.createContext(void 0),yt=function(Ht){var Qt=Ht.value,nn=Ht.children,wn=Be.useRef(Qt);wn.current=Qt;var Un=Be.useState(function(){return{getValue:function(){return wn.current},listeners:new Set}}),An=(0,Ke.Z)(Un,1),Pi=An[0];return(0,zt.Z)(function(){(0,He.unstable_batchedUpdates)(function(){Pi.listeners.forEach(function(zn){zn(Qt)})})},[Qt]),Be.createElement(dt.Provider,{value:Pi},nn)};return{Context:dt,Provider:yt,defaultValue:We}}function it(We,dt){var yt=(0,St.Z)(typeof dt=="function"?dt:function(zn){if(dt===void 0)return zn;if(!Array.isArray(dt))return zn[dt];var di={};return dt.forEach(function(ei){di[ei]=zn[ei]}),di}),Pt=Be.useContext(We==null?void 0:We.Context),Ht=Pt||{},Qt=Ht.listeners,nn=Ht.getValue,wn=Be.useRef();wn.current=yt(Pt?nn():We==null?void 0:We.defaultValue);var Un=Be.useState({}),An=(0,Ke.Z)(Un,2),Pi=An[1];return(0,zt.Z)(function(){if(!Pt)return;function zn(di){var ei=yt(di);(0,ft.Z)(wn.current,ei,!0)||Pi({})}return Qt.add(zn),function(){Qt.delete(zn)}},[Pt]),wn.current}var st=Me(87462),Ft=Me(42550);function Nt(){var We=Be.createContext(null);function dt(){return Be.useContext(We)}function yt(Ht,Qt){var nn=(0,Ft.Yr)(Ht),wn=function(An,Pi){var zn=nn?{ref:Pi}:{},di=Be.useRef(0),ei=Be.useRef(An),Bi=dt();return Bi!==null?Be.createElement(Ht,(0,st.Z)({},An,zn)):((!Qt||Qt(ei.current,An))&&(di.current+=1),ei.current=An,Be.createElement(We.Provider,{value:di.current},Be.createElement(Ht,(0,st.Z)({},An,zn))))};return nn?Be.forwardRef(wn):wn}function Pt(Ht,Qt){var nn=(0,Ft.Yr)(Ht),wn=function(An,Pi){var zn=nn?{ref:Pi}:{};return dt(),Be.createElement(Ht,(0,st.Z)({},An,zn))};return nn?Be.memo(Be.forwardRef(wn),Qt):Be.memo(wn,Qt)}return{makeImmutable:yt,responseImmutable:Pt,useImmutableMark:dt}}var Bt=Nt(),Ae=Bt.makeImmutable,ne=Bt.responseImmutable,te=Bt.useImmutableMark,ue=Nt(),se=ue.makeImmutable,pe=ue.responseImmutable,ve=ue.useImmutableMark,Se=gt(),Pe=Se;function Oe(We,dt){var yt=React.useRef(0);yt.current+=1;var Pt=React.useRef(We),Ht=[];Object.keys(We||{}).map(function(nn){var wn;(We==null?void 0:We[nn])!==((wn=Pt.current)===null||wn===void 0?void 0:wn[nn])&&Ht.push(nn)}),Pt.current=We;var Qt=React.useRef([]);return Ht.length&&(Qt.current=Ht),React.useDebugValue(yt.current),React.useDebugValue(Qt.current.join(", ")),dt&&console.log("".concat(dt,":"),yt.current,Qt.current),yt.current}var Re=null,tt=null,rt=Me(71002),Je=Me(1413),bt=Me(4942),lt=Me(94184),Lt=Me.n(lt);function Mt(We,dt,yt){var Pt=Be.useRef({});return(!("value"in Pt.current)||yt(Pt.current.condition,dt))&&(Pt.current.value=We(),Pt.current.condition=dt),Pt.current.value}var pt=Me(40830);function dn(We,dt){var yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pt=new Set;function Ht(Qt,nn){var wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,Un=Pt.has(Qt);if((0,pt.ZP)(!Un,"Warning: There may be circular references"),Un)return!1;if(Qt===nn)return!0;if(yt&&wn>1)return!1;Pt.add(Qt);var An=wn+1;if(Array.isArray(Qt)){if(!Array.isArray(nn)||Qt.length!==nn.length)return!1;for(var Pi=0;Pi<Qt.length;Pi++)if(!Ht(Qt[Pi],nn[Pi],An))return!1;return!0}if(Qt&&nn&&(0,rt.Z)(Qt)==="object"&&(0,rt.Z)(nn)==="object"){var zn=Object.keys(Qt);return zn.length!==Object.keys(nn).length?!1:zn.every(function(di){return Ht(Qt[di],nn[di],An)})}return!1}return Ht(We,dt)}var tn=dn;function vn(We,dt){for(var yt=We,Pt=0;Pt<dt.length;Pt+=1){if(yt==null)return;yt=yt[dt[Pt]]}return yt}var Tn=Be.createContext({renderWithProps:!1}),Ve=Tn,Ze="RC_TABLE_KEY";function Qe(We){return We==null?[]:Array.isArray(We)?We:[We]}function mn(We){var dt=[],yt={};return We.forEach(function(Pt){for(var Ht=Pt||{},Qt=Ht.key,nn=Ht.dataIndex,wn=Qt||Qe(nn).join("-")||Ze;yt[wn];)wn="".concat(wn,"_next");yt[wn]=!0,dt.push(wn)}),dt}function kn(We){return We!=null}function At(We){return typeof We=="number"&&!Number.isNaN(We)}function pn(We){return We&&(0,rt.Z)(We)==="object"&&!Array.isArray(We)&&!Be.isValidElement(We)}function ln(We,dt,yt,Pt,Ht,Qt){var nn=Be.useContext(Ve),wn=ve(),Un=Mt(function(){if(kn(Pt))return[Pt];var An=dt==null||dt===""?[]:Array.isArray(dt)?dt:[dt],Pi=vn(We,An),zn=Pi,di=void 0;if(Ht){var ei=Ht(Pi,We,yt);pn(ei)?(zn=ei.children,di=ei.props,nn.renderWithProps=!0):zn=ei}return[zn,di]},[wn,We,Pt,dt,Ht,yt],function(An,Pi){if(Qt){var zn=(0,Ke.Z)(An,2),di=zn[1],ei=(0,Ke.Z)(Pi,2),Bi=ei[1];return Qt(Bi,di)}return nn.renderWithProps?!0:!tn(An,Pi,!0)});return Un}function jn(We,dt,yt,Pt){var Ht=We+dt-1;return We<=Pt&&Ht>=yt}function Gt(We,dt){return it(Pe,function(yt){var Pt=jn(We,dt||1,yt.hoverStartRow,yt.hoverEndRow);return[Pt,yt.onHover]})}function mt(We){var dt=Be.useRef();dt.current=We;var yt=Be.useCallback(function(){for(var Pt,Ht=arguments.length,Qt=new Array(Ht),nn=0;nn<Ht;nn++)Qt[nn]=arguments[nn];return(Pt=dt.current)===null||Pt===void 0?void 0:Pt.call.apply(Pt,[dt].concat(Qt))},[]);return yt}function Et(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var on=Et()?Be.useLayoutEffect:Be.useEffect,Yt=function(dt,yt){var Pt=React.useRef(!0);on(function(){return dt(Pt.current)},yt),on(function(){return Pt.current=!1,function(){Pt.current=!0}},[])},ze=function(dt,yt){Yt(function(Pt){if(!Pt)return dt()},yt)},be=null;function Ce(We){var dt=React.useRef(!1),yt=React.useState(We),Pt=_slicedToArray(yt,2),Ht=Pt[0],Qt=Pt[1];React.useEffect(function(){return dt.current=!1,function(){dt.current=!0}},[]);function nn(wn,Un){Un&&dt.current||Qt(wn)}return[Ht,nn]}function De(We){return We!==void 0}function Ge(We,dt){var yt=dt||{},Pt=yt.defaultValue,Ht=yt.value,Qt=yt.onChange,nn=yt.postState,wn=useState(function(){return De(Ht)?Ht:De(Pt)?typeof Pt=="function"?Pt():Pt:typeof We=="function"?We():We}),Un=_slicedToArray(wn,2),An=Un[0],Pi=Un[1],zn=Ht!==void 0?Ht:An,di=nn?nn(zn):zn,ei=useEvent(Qt),Bi=useState([zn]),Xi=_slicedToArray(Bi,2),yr=Xi[0],Jr=Xi[1];useLayoutUpdateEffect(function(){var Dn=yr[0];An!==Dn&&ei(An,Dn)},[yr]),useLayoutUpdateEffect(function(){De(Ht)||Pi(Ht)},[Ht]);var Tt=useEvent(function(Dn,ii){Pi(Dn,ii),Jr([zn],ii)});return[di,Tt]}var Fe=Me(35110),qe=Me(63295),rn=Number(Be.version.split(".")[0]),Kn=function(dt,yt){typeof dt=="function"?dt(yt):(0,rt.Z)(dt)==="object"&&dt&&"current"in dt&&(dt.current=yt)},Zn=function(){for(var dt=arguments.length,yt=new Array(dt),Pt=0;Pt<dt;Pt++)yt[Pt]=arguments[Pt];var Ht=yt.filter(Boolean);return Ht.length<=1?Ht[0]:function(Qt){yt.forEach(function(nn){Kn(nn,Qt)})}},$t=function(){for(var dt=arguments.length,yt=new Array(dt),Pt=0;Pt<dt;Pt++)yt[Pt]=arguments[Pt];return useMemo(function(){return Zn.apply(void 0,yt)},yt,function(Ht,Qt){return Ht.length!==Qt.length||Ht.every(function(nn,wn){return nn!==Qt[wn]})})},Nn=function(dt){var yt,Pt;if(!dt)return!1;if(Zt(dt)&&rn>=19)return!0;var Ht=isMemo(dt)?dt.type.type:dt.type;return!(typeof Ht=="function"&&!((yt=Ht.prototype)!==null&&yt!==void 0&&yt.render)&&Ht.$$typeof!==ForwardRef||typeof dt=="function"&&!((Pt=dt.prototype)!==null&&Pt!==void 0&&Pt.render)&&dt.$$typeof!==ForwardRef)};function Zt(We){return isValidElement(We)&&!isFragment(We)}var qn=function(dt){return Zt(dt)&&Nn(dt)},$n=function(dt){if(dt&&Zt(dt)){var yt=dt;return yt.props.propertyIsEnumerable("ref")?yt.props.ref:yt.ref}return null};function oi(We,dt,yt,Pt){if(!dt.length)return yt;var Ht=_toArray(dt),Qt=Ht[0],nn=Ht.slice(1),wn;return!We&&typeof Qt=="number"?wn=[]:Array.isArray(We)?wn=_toConsumableArray(We):wn=_objectSpread({},We),Pt&&yt===void 0&&nn.length===1?delete wn[Qt][nn[0]]:wn[Qt]=oi(wn[Qt],nn,yt,Pt),wn}function ri(We,dt,yt){var Pt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return dt.length&&Pt&&yt===void 0&&!get(We,dt.slice(0,-1))?We:oi(We,dt,yt,Pt)}function fr(We){return _typeof(We)==="object"&&We!==null&&Object.getPrototypeOf(We)===Object.prototype}function wr(We){return Array.isArray(We)?[]:{}}var Li=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Ai(){for(var We=arguments.length,dt=new Array(We),yt=0;yt<We;yt++)dt[yt]=arguments[yt];var Pt=wr(dt[0]);return dt.forEach(function(Ht){function Qt(nn,wn){var Un=new Set(wn),An=get(Ht,nn),Pi=Array.isArray(An);if(Pi||fr(An)){if(!Un.has(An)){Un.add(An);var zn=get(Pt,nn);Pi?Pt=ri(Pt,nn,[]):(!zn||_typeof(zn)!=="object")&&(Pt=ri(Pt,nn,wr(An))),Li(An).forEach(function(di){Qt([].concat(_toConsumableArray(nn),[di]),Un)})}}else Pt=ri(Pt,nn,An)}Qt([])}),Pt}var Ur=function(dt){var yt=dt.ellipsis,Pt=dt.rowType,Ht=dt.children,Qt,nn=yt===!0?{showTitle:!0}:yt;return nn&&(nn.showTitle||Pt==="header")&&(typeof Ht=="string"||typeof Ht=="number"?Qt=Ht.toString():Be.isValidElement(Ht)&&typeof Ht.props.children=="string"&&(Qt=Ht.props.children)),Qt};function Yn(We){var dt,yt,Pt,Ht,Qt,nn,wn,Un,An=We.component,Pi=We.children,zn=We.ellipsis,di=We.scope,ei=We.prefixCls,Bi=We.className,Xi=We.align,yr=We.record,Jr=We.render,Tt=We.dataIndex,Dn=We.renderIndex,ii=We.shouldCellUpdate,fi=We.index,Bn=We.rowType,Oi=We.colSpan,Cr=We.rowSpan,pr=We.fixLeft,rr=We.fixRight,ua=We.firstFixLeft,Qr=We.lastFixLeft,io=We.firstFixRight,So=We.lastFixRight,Hn=We.appendNode,br=We.additionalProps,ho=br===void 0?{}:br,ke=We.isSticky,Te="".concat(ei,"-cell"),et=it(Pe,["supportSticky","allColumnsFixedLeft","rowHoverable"]),at=et.supportSticky,jt=et.allColumnsFixedLeft,qt=et.rowHoverable,gn=ln(yr,Tt,Dn,Pi,Jr,ii),Vn=(0,Ke.Z)(gn,2),Qn=Vn[0],Gn=Vn[1],gi={},yi=typeof pr=="number"&&at,_i=typeof rr=="number"&&at;yi&&(gi.position="sticky",gi.left=pr),_i&&(gi.position="sticky",gi.right=rr);var mi=(dt=(yt=(Pt=Gn==null?void 0:Gn.colSpan)!==null&&Pt!==void 0?Pt:ho.colSpan)!==null&&yt!==void 0?yt:Oi)!==null&&dt!==void 0?dt:1,ui=(Ht=(Qt=(nn=Gn==null?void 0:Gn.rowSpan)!==null&&nn!==void 0?nn:ho.rowSpan)!==null&&Qt!==void 0?Qt:Cr)!==null&&Ht!==void 0?Ht:1,Fi=Gt(fi,ui),ji=(0,Ke.Z)(Fi,2),Rr=ji[0],ao=ji[1],Fr=mt(function(xo){var nr;yr&&ao(fi,fi+ui-1),ho==null||(nr=ho.onMouseEnter)===null||nr===void 0||nr.call(ho,xo)}),jr=mt(function(xo){var nr;yr&&ao(-1,-1),ho==null||(nr=ho.onMouseLeave)===null||nr===void 0||nr.call(ho,xo)});if(mi===0||ui===0)return null;var To=(wn=ho.title)!==null&&wn!==void 0?wn:Ur({rowType:Bn,ellipsis:zn,children:Qn}),bi=Lt()(Te,Bi,(Un={},(0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)(Un,"".concat(Te,"-fix-left"),yi&&at),"".concat(Te,"-fix-left-first"),ua&&at),"".concat(Te,"-fix-left-last"),Qr&&at),"".concat(Te,"-fix-left-all"),Qr&&jt&&at),"".concat(Te,"-fix-right"),_i&&at),"".concat(Te,"-fix-right-first"),io&&at),"".concat(Te,"-fix-right-last"),So&&at),"".concat(Te,"-ellipsis"),zn),"".concat(Te,"-with-append"),Hn),"".concat(Te,"-fix-sticky"),(yi||_i)&&ke&&at),(0,bt.Z)(Un,"".concat(Te,"-row-hover"),!Gn&&Rr)),ho.className,Gn==null?void 0:Gn.className),Kr={};Xi&&(Kr.textAlign=Xi);var or=(0,Je.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)({},Gn==null?void 0:Gn.style),gi),Kr),ho.style),Zr=Qn;return(0,rt.Z)(Zr)==="object"&&!Array.isArray(Zr)&&!Be.isValidElement(Zr)&&(Zr=null),zn&&(Qr||io)&&(Zr=Be.createElement("span",{className:"".concat(Te,"-content")},Zr)),Be.createElement(An,(0,st.Z)({},Gn,ho,{className:bi,style:or,title:To,scope:di,onMouseEnter:qt?Fr:void 0,onMouseLeave:qt?jr:void 0,colSpan:mi!==1?mi:null,rowSpan:ui!==1?ui:null}),Hn,Zr)}var Rn=Be.memo(Yn);function sr(We,dt,yt,Pt,Ht){var Qt=yt[We]||{},nn=yt[dt]||{},wn,Un;Qt.fixed==="left"?wn=Pt.left[Ht==="rtl"?dt:We]:nn.fixed==="right"&&(Un=Pt.right[Ht==="rtl"?We:dt]);var An=!1,Pi=!1,zn=!1,di=!1,ei=yt[dt+1],Bi=yt[We-1],Xi=ei&&!ei.fixed||Bi&&!Bi.fixed||yt.every(function(ii){return ii.fixed==="left"});if(Ht==="rtl"){if(wn!==void 0){var yr=Bi&&Bi.fixed==="left";di=!yr&&Xi}else if(Un!==void 0){var Jr=ei&&ei.fixed==="right";zn=!Jr&&Xi}}else if(wn!==void 0){var Tt=ei&&ei.fixed==="left";An=!Tt&&Xi}else if(Un!==void 0){var Dn=Bi&&Bi.fixed==="right";Pi=!Dn&&Xi}return{fixLeft:wn,fixRight:Un,lastFixLeft:An,firstFixRight:Pi,lastFixRight:zn,firstFixLeft:di,isSticky:Pt.isSticky}}var xr=Be.createContext({}),Ni=xr;function lr(We){var dt=We.className,yt=We.index,Pt=We.children,Ht=We.colSpan,Qt=Ht===void 0?1:Ht,nn=We.rowSpan,wn=We.align,Un=it(Pe,["prefixCls","direction"]),An=Un.prefixCls,Pi=Un.direction,zn=Be.useContext(Ni),di=zn.scrollColumnIndex,ei=zn.stickyOffsets,Bi=zn.flattenColumns,Xi=yt+Qt-1,yr=Xi+1===di?Qt+1:Qt,Jr=sr(yt,yt+yr-1,Bi,ei,Pi);return Be.createElement(Rn,(0,st.Z)({className:dt,index:yt,component:"td",prefixCls:An,record:null,dataIndex:null,align:wn,colSpan:yr,rowSpan:nn,render:function(){return Pt}},Jr))}var mo=Me(45987),pi=["children"];function ti(We){var dt=We.children,yt=(0,mo.Z)(We,pi);return Be.createElement("tr",yt,dt)}function hi(We){var dt=We.children;return dt}hi.Row=ti,hi.Cell=lr;var Ii=hi;function ir(We){var dt=We.children,yt=We.stickyOffsets,Pt=We.flattenColumns,Ht=it(Pe,"prefixCls"),Qt=Pt.length-1,nn=Pt[Qt],wn=Be.useMemo(function(){return{stickyOffsets:yt,flattenColumns:Pt,scrollColumnIndex:nn!=null&&nn.scrollbar?Qt:null}},[nn,Pt,Qt,yt]);return Be.createElement(Ni.Provider,{value:wn},Be.createElement("tfoot",{className:"".concat(Ht,"-summary")},dt))}var zi=pe(ir),an=Ii,we=Me(48555),Ut=function(We){if(!We)return!1;if(We instanceof Element){if(We.offsetParent)return!0;if(We.getBBox){var dt=We.getBBox(),yt=dt.width,Pt=dt.height;if(yt||Pt)return!0}if(We.getBoundingClientRect){var Ht=We.getBoundingClientRect(),Qt=Ht.width,nn=Ht.height;if(Qt||nn)return!0}}return!1},en=function(dt){if(Et()&&window.document.documentElement){var yt=Array.isArray(dt)?dt:[dt],Pt=window.document.documentElement;return yt.some(function(Ht){return Ht in Pt.style})}return!1},cn=function(dt,yt){if(!en(dt))return!1;var Pt=document.createElement("div"),Ht=Pt.style[dt];return Pt.style[dt]=yt,Pt.style[dt]!==Ht};function xn(We,dt){return!Array.isArray(We)&&dt!==void 0?cn(We,dt):en(We)}function In(We,dt){if(!We)return!1;if(We.contains)return We.contains(dt);for(var yt=dt;yt;){if(yt===We)return!0;yt=yt.parentNode}return!1}var ni="data-rc-order",Ui="data-rc-priority",Ot="rc-util-key",_t=new Map;function Ct(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},dt=We.mark;return dt?dt.startsWith("data-")?dt:"data-".concat(dt):Ot}function Jt(We){if(We.attachTo)return We.attachTo;var dt=document.querySelector("head");return dt||document.body}function ci(We){return We==="queue"?"prependQueue":We?"prepend":"append"}function Xn(We){return Array.from((_t.get(We)||We).children).filter(function(dt){return dt.tagName==="STYLE"})}function _n(We){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Et())return null;var yt=dt.csp,Pt=dt.prepend,Ht=dt.priority,Qt=Ht===void 0?0:Ht,nn=ci(Pt),wn=nn==="prependQueue",Un=document.createElement("style");Un.setAttribute(ni,nn),wn&&Qt&&Un.setAttribute(Ui,"".concat(Qt)),yt!=null&&yt.nonce&&(Un.nonce=yt==null?void 0:yt.nonce),Un.innerHTML=We;var An=Jt(dt),Pi=An.firstChild;if(Pt){if(wn){var zn=(dt.styles||Xn(An)).filter(function(di){if(!["prepend","prependQueue"].includes(di.getAttribute(ni)))return!1;var ei=Number(di.getAttribute(Ui)||0);return Qt>=ei});if(zn.length)return An.insertBefore(Un,zn[zn.length-1].nextSibling),Un}An.insertBefore(Un,Pi)}else An.appendChild(Un);return Un}function It(We){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},yt=Jt(dt);return(dt.styles||Xn(yt)).find(function(Pt){return Pt.getAttribute(Ct(dt))===We})}function hn(We){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},yt=It(We,dt);if(yt){var Pt=Jt(dt);Pt.removeChild(yt)}}function Ci(We,dt){var yt=_t.get(We);if(!yt||!In(document,yt)){var Pt=_n("",dt),Ht=Pt.parentNode;_t.set(We,Ht),We.removeChild(Pt)}}function Ri(){_t.clear()}function Ln(We,dt){var yt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Pt=Jt(yt),Ht=Xn(Pt),Qt=(0,Je.Z)((0,Je.Z)({},yt),{},{styles:Ht});Ci(Pt,Qt);var nn=It(dt,Qt);if(nn){var wn,Un;if((wn=Qt.csp)!==null&&wn!==void 0&&wn.nonce&&nn.nonce!==((Un=Qt.csp)===null||Un===void 0?void 0:Un.nonce)){var An;nn.nonce=(An=Qt.csp)===null||An===void 0?void 0:An.nonce}return nn.innerHTML!==We&&(nn.innerHTML=We),nn}var Pi=_n(We,Qt);return Pi.setAttribute(Ct(Qt),dt),Pi}var Rt;function Si(We){var dt="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),yt=document.createElement("div");yt.id=dt;var Pt=yt.style;Pt.position="absolute",Pt.left="0",Pt.top="0",Pt.width="100px",Pt.height="100px",Pt.overflow="scroll";var Ht,Qt;if(We){var nn=getComputedStyle(We);Pt.scrollbarColor=nn.scrollbarColor,Pt.scrollbarWidth=nn.scrollbarWidth;var wn=getComputedStyle(We,"::-webkit-scrollbar"),Un=parseInt(wn.width,10),An=parseInt(wn.height,10);try{var Pi=Un?"width: ".concat(wn.width,";"):"",zn=An?"height: ".concat(wn.height,";"):"";Ln(`
|
|
#`.concat(dt,`::-webkit-scrollbar {
|
|
`).concat(Pi,`
|
|
`).concat(zn,`
|
|
}`),dt)}catch(Bi){console.error(Bi),Ht=Un,Qt=An}}document.body.appendChild(yt);var di=We&&Ht&&!isNaN(Ht)?Ht:yt.offsetWidth-yt.clientWidth,ei=We&&Qt&&!isNaN(Qt)?Qt:yt.offsetHeight-yt.clientHeight;return document.body.removeChild(yt),hn(dt),{width:di,height:ei}}function Zi(We){return typeof document=="undefined"?0:((We||Rt===void 0)&&(Rt=Si()),Rt.width)}function Wr(We){return typeof document=="undefined"||!We||!(We instanceof Element)?{width:0,height:0}:Si(We)}var En=`accept acceptCharset accessKey action allowFullScreen allowTransparency
|
|
alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge
|
|
charSet checked classID className colSpan cols content contentEditable contextMenu
|
|
controls coords crossOrigin data dateTime default defer dir disabled download draggable
|
|
encType form formAction formEncType formMethod formNoValidate formTarget frameBorder
|
|
headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity
|
|
is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media
|
|
mediaGroup method min minLength multiple muted name noValidate nonce open
|
|
optimum pattern placeholder poster preload radioGroup readOnly rel required
|
|
reversed role rowSpan rows sandbox scope scoped scrolling seamless selected
|
|
shape size sizes span spellCheck src srcDoc srcLang srcSet start step style
|
|
summary tabIndex target title type useMap value width wmode wrap`,li=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown
|
|
onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick
|
|
onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown
|
|
onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel
|
|
onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough
|
|
onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata
|
|
onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,bo="".concat(En," ").concat(li).split(/[\s\n]+/),La="aria-",sa="data-";function Yi(We,dt){return We.indexOf(dt)===0}function Wi(We){var dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,yt;dt===!1?yt={aria:!0,data:!0,attr:!0}:dt===!0?yt={aria:!0}:yt=(0,Je.Z)({},dt);var Pt={};return Object.keys(We).forEach(function(Ht){(yt.aria&&(Ht==="role"||Yi(Ht,La))||yt.data&&Yi(Ht,sa)||yt.attr&&bo.includes(Ht))&&(Pt[Ht]=We[Ht])}),Pt}function er(We,dt,yt,Pt,Ht,Qt,nn){We.push({record:dt,indent:yt,index:nn});var wn=Qt(dt),Un=Ht==null?void 0:Ht.has(wn);if(dt&&Array.isArray(dt[Pt])&&Un)for(var An=0;An<dt[Pt].length;An+=1)er(We,dt[Pt][An],yt+1,Pt,Ht,Qt,An)}function Mo(We,dt,yt,Pt){var Ht=Be.useMemo(function(){if(yt!=null&&yt.size){for(var Qt=[],nn=0;nn<(We==null?void 0:We.length);nn+=1){var wn=We[nn];er(Qt,wn,0,dt,yt,Pt,nn)}return Qt}return We==null?void 0:We.map(function(Un,An){return{record:Un,indent:0,index:An}})},[We,dt,yt,Pt]);return Ht}function ra(We,dt,yt,Pt){var Ht=it(Pe,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Qt=Ht.flattenColumns,nn=Ht.expandableType,wn=Ht.expandedKeys,Un=Ht.childrenColumnName,An=Ht.onTriggerExpand,Pi=Ht.rowExpandable,zn=Ht.onRow,di=Ht.expandRowByClick,ei=Ht.rowClassName,Bi=nn==="nest",Xi=nn==="row"&&(!Pi||Pi(We)),yr=Xi||Bi,Jr=wn&&wn.has(dt),Tt=Un&&We&&We[Un],Dn=mt(An),ii=zn==null?void 0:zn(We,yt),fi=ii==null?void 0:ii.onClick,Bn=function(rr){di&&yr&&An(We,rr);for(var ua=arguments.length,Qr=new Array(ua>1?ua-1:0),io=1;io<ua;io++)Qr[io-1]=arguments[io];fi==null||fi.apply(void 0,[rr].concat(Qr))},Oi;typeof ei=="string"?Oi=ei:typeof ei=="function"&&(Oi=ei(We,yt,Pt));var Cr=mn(Qt);return(0,Je.Z)((0,Je.Z)({},Ht),{},{columnsKey:Cr,nestExpandable:Bi,expanded:Jr,hasNestChildren:Tt,record:We,onTriggerExpand:Dn,rowSupportExpand:Xi,expandable:yr,rowProps:(0,Je.Z)((0,Je.Z)({},ii),{},{className:Lt()(Oi,ii==null?void 0:ii.className),onClick:Bn})})}function ai(We){var dt=We.prefixCls,yt=We.children,Pt=We.component,Ht=We.cellComponent,Qt=We.className,nn=We.expanded,wn=We.colSpan,Un=We.isEmpty,An=it(Pe,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Pi=An.scrollbarSize,zn=An.fixHeader,di=An.fixColumn,ei=An.componentWidth,Bi=An.horizonScroll,Xi=yt;return(Un?Bi&&ei:di)&&(Xi=Be.createElement("div",{style:{width:ei-(zn&&!Un?Pi:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(dt,"-expanded-row-fixed")},Xi)),Be.createElement(Pt,{className:Qt,style:{display:nn?null:"none"}},Be.createElement(Rn,{component:Ht,prefixCls:dt,colSpan:wn},Xi))}var Mr=ai;function ml(We){var dt=We.prefixCls,yt=We.record,Pt=We.onExpand,Ht=We.expanded,Qt=We.expandable,nn="".concat(dt,"-row-expand-icon");if(!Qt)return Be.createElement("span",{className:Lt()(nn,"".concat(dt,"-row-spaced"))});var wn=function(An){Pt(yt,An),An.stopPropagation()};return Be.createElement("span",{className:Lt()(nn,(0,bt.Z)((0,bt.Z)({},"".concat(dt,"-row-expanded"),Ht),"".concat(dt,"-row-collapsed"),!Ht)),onClick:wn})}function xs(We,dt,yt){var Pt=[];function Ht(Qt){(Qt||[]).forEach(function(nn,wn){Pt.push(dt(nn,wn)),Ht(nn[yt])})}return Ht(We),Pt}function $a(We,dt,yt,Pt){return typeof We=="string"?We:typeof We=="function"?We(dt,yt,Pt):""}function Wt(We,dt,yt,Pt,Ht){var Qt=We.record,nn=We.prefixCls,wn=We.columnsKey,Un=We.fixedInfoList,An=We.expandIconColumnIndex,Pi=We.nestExpandable,zn=We.indentSize,di=We.expandIcon,ei=We.expanded,Bi=We.hasNestChildren,Xi=We.onTriggerExpand,yr=wn[yt],Jr=Un[yt],Tt;yt===(An||0)&&Pi&&(Tt=Be.createElement(Be.Fragment,null,Be.createElement("span",{style:{paddingLeft:"".concat(zn*Pt,"px")},className:"".concat(nn,"-row-indent indent-level-").concat(Pt)}),di({prefixCls:nn,expanded:ei,expandable:Bi,record:Qt,onExpand:Xi})));var Dn;return dt.onCell&&(Dn=dt.onCell(Qt,Ht)),{key:yr,fixedInfo:Jr,appendCellNode:Tt,additionalCellProps:Dn||{}}}function $i(We){var dt=We.className,yt=We.style,Pt=We.record,Ht=We.index,Qt=We.renderIndex,nn=We.rowKey,wn=We.indent,Un=wn===void 0?0:wn,An=We.rowComponent,Pi=We.cellComponent,zn=We.scopeCellComponent,di=ra(Pt,nn,Ht,Un),ei=di.prefixCls,Bi=di.flattenColumns,Xi=di.expandedRowClassName,yr=di.expandedRowRender,Jr=di.rowProps,Tt=di.expanded,Dn=di.rowSupportExpand,ii=Be.useRef(!1);ii.current||(ii.current=Tt);var fi=$a(Xi,Pt,Ht,Un),Bn=Be.createElement(An,(0,st.Z)({},Jr,{"data-row-key":nn,className:Lt()(dt,"".concat(ei,"-row"),"".concat(ei,"-row-level-").concat(Un),Jr==null?void 0:Jr.className,(0,bt.Z)({},fi,Un>=1)),style:(0,Je.Z)((0,Je.Z)({},yt),Jr==null?void 0:Jr.style)}),Bi.map(function(pr,rr){var ua=pr.render,Qr=pr.dataIndex,io=pr.className,So=Wt(di,pr,rr,Un,Ht),Hn=So.key,br=So.fixedInfo,ho=So.appendCellNode,ke=So.additionalCellProps;return Be.createElement(Rn,(0,st.Z)({className:io,ellipsis:pr.ellipsis,align:pr.align,scope:pr.rowScope,component:pr.rowScope?zn:Pi,prefixCls:ei,key:Hn,record:Pt,index:Ht,renderIndex:Qt,dataIndex:Qr,render:ua,shouldCellUpdate:pr.shouldCellUpdate},br,{appendNode:ho,additionalProps:ke}))})),Oi;if(Dn&&(ii.current||Tt)){var Cr=yr(Pt,Ht,Un+1,Tt);Oi=Be.createElement(Mr,{expanded:Tt,className:Lt()("".concat(ei,"-expanded-row"),"".concat(ei,"-expanded-row-level-").concat(Un+1),fi),prefixCls:ei,component:An,cellComponent:Pi,colSpan:Bi.length,isEmpty:!1},Cr)}return Be.createElement(Be.Fragment,null,Bn,Oi)}var Vo=pe($i);function Pr(We){var dt=We.columnKey,yt=We.onColumnResize,Pt=Be.useRef();return Be.useEffect(function(){Pt.current&&yt(dt,Pt.current.offsetWidth)},[]),Be.createElement(we.Z,{data:dt},Be.createElement("td",{ref:Pt,style:{padding:0,border:0,height:0}},Be.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function Ia(We){var dt=We.prefixCls,yt=We.columnsKey,Pt=We.onColumnResize;return Be.createElement("tr",{"aria-hidden":"true",className:"".concat(dt,"-measure-row"),style:{height:0,fontSize:0}},Be.createElement(we.Z.Collection,{onBatchResize:function(Qt){Qt.forEach(function(nn){var wn=nn.data,Un=nn.size;Pt(wn,Un.offsetWidth)})}},yt.map(function(Ht){return Be.createElement(Pr,{key:Ht,columnKey:Ht,onColumnResize:Pt})})))}function zo(We){var dt=We.data,yt=We.measureColumnWidth,Pt=it(Pe,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),Ht=Pt.prefixCls,Qt=Pt.getComponent,nn=Pt.onColumnResize,wn=Pt.flattenColumns,Un=Pt.getRowKey,An=Pt.expandedKeys,Pi=Pt.childrenColumnName,zn=Pt.emptyNode,di=Mo(dt,Pi,An,Un),ei=Be.useRef({renderWithProps:!1}),Bi=Qt(["body","wrapper"],"tbody"),Xi=Qt(["body","row"],"tr"),yr=Qt(["body","cell"],"td"),Jr=Qt(["body","cell"],"th"),Tt;dt.length?Tt=di.map(function(ii,fi){var Bn=ii.record,Oi=ii.indent,Cr=ii.index,pr=Un(Bn,fi);return Be.createElement(Vo,{key:pr,rowKey:pr,record:Bn,index:fi,renderIndex:Cr,rowComponent:Xi,cellComponent:yr,scopeCellComponent:Jr,indent:Oi})}):Tt=Be.createElement(Mr,{expanded:!0,className:"".concat(Ht,"-placeholder"),prefixCls:Ht,component:Xi,cellComponent:yr,colSpan:wn.length,isEmpty:!0},zn);var Dn=mn(wn);return Be.createElement(Ve.Provider,{value:ei.current},Be.createElement(Bi,{className:"".concat(Ht,"-tbody")},yt&&Be.createElement(Ia,{prefixCls:Ht,columnsKey:Dn,onColumnResize:nn}),Tt))}var na=pe(zo),Fo=Me(62978),_o=["columnType"];function da(We){for(var dt=We.colWidths,yt=We.columns,Pt=We.columCount,Ht=it(Pe,["tableLayout"]),Qt=Ht.tableLayout,nn=[],wn=Pt||yt.length,Un=!1,An=wn-1;An>=0;An-=1){var Pi=dt[An],zn=yt&&yt[An],di=void 0,ei=void 0;if(zn&&(di=zn[Fo.v],Qt==="auto"&&(ei=zn.minWidth)),Pi||ei||di||Un){var Bi=di||{},Xi=Bi.columnType,yr=(0,mo.Z)(Bi,_o);nn.unshift(Be.createElement("col",(0,st.Z)({key:An,style:{width:Pi,minWidth:ei}},yr))),Un=!0}}return Be.createElement("colgroup",null,nn)}var bn=da,Ga=Me(74902),Sn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Zo(We,dt){return(0,Be.useMemo)(function(){for(var yt=[],Pt=0;Pt<dt;Pt+=1){var Ht=We[Pt];if(Ht!==void 0)yt[Pt]=Ht;else return null}return yt},[We.join("_"),dt])}var js=Be.forwardRef(function(We,dt){var yt=We.className,Pt=We.noData,Ht=We.columns,Qt=We.flattenColumns,nn=We.colWidths,wn=We.columCount,Un=We.stickyOffsets,An=We.direction,Pi=We.fixHeader,zn=We.stickyTopOffset,di=We.stickyBottomOffset,ei=We.stickyClassName,Bi=We.onScroll,Xi=We.maxContentScroll,yr=We.children,Jr=(0,mo.Z)(We,Sn),Tt=it(Pe,["prefixCls","scrollbarSize","isSticky","getComponent"]),Dn=Tt.prefixCls,ii=Tt.scrollbarSize,fi=Tt.isSticky,Bn=Tt.getComponent,Oi=Bn(["header","table"],"table"),Cr=fi&&!Pi?0:ii,pr=Be.useRef(null),rr=Be.useCallback(function(ke){Kn(dt,ke),Kn(pr,ke)},[]);Be.useEffect(function(){var ke;function Te(et){var at=et,jt=at.currentTarget,qt=at.deltaX;qt&&(Bi({currentTarget:jt,scrollLeft:jt.scrollLeft+qt}),et.preventDefault())}return(ke=pr.current)===null||ke===void 0||ke.addEventListener("wheel",Te,{passive:!1}),function(){var et;(et=pr.current)===null||et===void 0||et.removeEventListener("wheel",Te)}},[]);var ua=Be.useMemo(function(){return Qt.every(function(ke){return ke.width})},[Qt]),Qr=Qt[Qt.length-1],io={fixed:Qr?Qr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Dn,"-cell-scrollbar")}}},So=(0,Be.useMemo)(function(){return Cr?[].concat((0,Ga.Z)(Ht),[io]):Ht},[Cr,Ht]),Hn=(0,Be.useMemo)(function(){return Cr?[].concat((0,Ga.Z)(Qt),[io]):Qt},[Cr,Qt]),br=(0,Be.useMemo)(function(){var ke=Un.right,Te=Un.left;return(0,Je.Z)((0,Je.Z)({},Un),{},{left:An==="rtl"?[].concat((0,Ga.Z)(Te.map(function(et){return et+Cr})),[0]):Te,right:An==="rtl"?ke:[].concat((0,Ga.Z)(ke.map(function(et){return et+Cr})),[0]),isSticky:fi})},[Cr,Un,fi]),ho=Zo(nn,wn);return Be.createElement("div",{style:(0,Je.Z)({overflow:"hidden"},fi?{top:zn,bottom:di}:{}),ref:rr,className:Lt()(yt,(0,bt.Z)({},ei,!!ei))},Be.createElement(Oi,{style:{tableLayout:"fixed",visibility:Pt||ho?null:"hidden"}},(!Pt||!Xi||ua)&&Be.createElement(bn,{colWidths:ho?[].concat((0,Ga.Z)(ho),[Cr]):[],columCount:wn+1,columns:Hn}),yr((0,Je.Z)((0,Je.Z)({},Jr),{},{stickyOffsets:br,columns:So,flattenColumns:Hn}))))}),Vr=Be.memo(js),Ll=function(dt){var yt=dt.cells,Pt=dt.stickyOffsets,Ht=dt.flattenColumns,Qt=dt.rowComponent,nn=dt.cellComponent,wn=dt.onHeaderRow,Un=dt.index,An=it(Pe,["prefixCls","direction"]),Pi=An.prefixCls,zn=An.direction,di;wn&&(di=wn(yt.map(function(Bi){return Bi.column}),Un));var ei=mn(yt.map(function(Bi){return Bi.column}));return Be.createElement(Qt,di,yt.map(function(Bi,Xi){var yr=Bi.column,Jr=sr(Bi.colStart,Bi.colEnd,Ht,Pt,zn),Tt;return yr&&yr.onHeaderCell&&(Tt=Bi.column.onHeaderCell(yr)),Be.createElement(Rn,(0,st.Z)({},Bi,{scope:yr.title?Bi.colSpan>1?"colgroup":"col":null,ellipsis:yr.ellipsis,align:yr.align,component:nn,prefixCls:Pi,key:ei[Xi]},Jr,{additionalProps:Tt,rowType:"header"}))}))},Ha=Ll;function $o(We){var dt=[];function yt(nn,wn){var Un=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;dt[Un]=dt[Un]||[];var An=wn,Pi=nn.filter(Boolean).map(function(zn){var di={key:zn.key,className:zn.className||"",children:zn.title,column:zn,colStart:An},ei=1,Bi=zn.children;return Bi&&Bi.length>0&&(ei=yt(Bi,An,Un+1).reduce(function(Xi,yr){return Xi+yr},0),di.hasSubColumns=!0),"colSpan"in zn&&(ei=zn.colSpan),"rowSpan"in zn&&(di.rowSpan=zn.rowSpan),di.colSpan=ei,di.colEnd=di.colStart+ei-1,dt[Un].push(di),An+=ei,ei});return Pi}yt(We,0);for(var Pt=dt.length,Ht=function(wn){dt[wn].forEach(function(Un){!("rowSpan"in Un)&&!Un.hasSubColumns&&(Un.rowSpan=Pt-wn)})},Qt=0;Qt<Pt;Qt+=1)Ht(Qt);return dt}var Ba=function(dt){var yt=dt.stickyOffsets,Pt=dt.columns,Ht=dt.flattenColumns,Qt=dt.onHeaderRow,nn=it(Pe,["prefixCls","getComponent"]),wn=nn.prefixCls,Un=nn.getComponent,An=Be.useMemo(function(){return $o(Pt)},[Pt]),Pi=Un(["header","wrapper"],"thead"),zn=Un(["header","row"],"tr"),di=Un(["header","cell"],"th");return Be.createElement(Pi,{className:"".concat(wn,"-thead")},An.map(function(ei,Bi){var Xi=Be.createElement(Ha,{key:Bi,flattenColumns:Ht,cells:ei,stickyOffsets:yt,rowComponent:zn,cellComponent:di,onHeaderRow:Qt,index:Bi});return Xi}))},nl=pe(Ba),wa=Me(54768);function ki(We,dt,yt){var Pt=(0,Fo.g)(We),Ht=Pt.expandIcon,Qt=Pt.expandedRowKeys,nn=Pt.defaultExpandedRowKeys,wn=Pt.defaultExpandAllRows,Un=Pt.expandedRowRender,An=Pt.onExpand,Pi=Pt.onExpandedRowsChange,zn=Pt.childrenColumnName,di=Ht||ml,ei=zn||"children",Bi=Be.useMemo(function(){return Un?"row":We.expandable&&We.internalHooks===fe.R&&We.expandable.__PARENT_RENDER_ICON__||dt.some(function(fi){return fi&&(0,rt.Z)(fi)==="object"&&fi[ei]})?"nest":!1},[!!Un,dt]),Xi=Be.useState(function(){return nn||(wn?xs(dt,yt,ei):[])}),yr=(0,Ke.Z)(Xi,2),Jr=yr[0],Tt=yr[1],Dn=Be.useMemo(function(){return new Set(Qt||Jr||[])},[Qt,Jr]),ii=Be.useCallback(function(fi){var Bn=yt(fi,dt.indexOf(fi)),Oi,Cr=Dn.has(Bn);Cr?(Dn.delete(Bn),Oi=(0,Ga.Z)(Dn)):Oi=[].concat((0,Ga.Z)(Dn),[Bn]),Tt(Oi),An&&An(!Cr,fi),Pi&&Pi(Oi)},[yt,Dn,dt,An,Pi]);return[Pt,Bi,Dn,di,ei,ii]}function $e(We,dt,yt){var Pt=We.map(function(Ht,Qt){return sr(Qt,Qt,We,dt,yt)});return Mt(function(){return Pt},[Pt],function(Ht,Qt){return!tn(Ht,Qt)})}function rs(We){var dt=(0,Be.useRef)(We),yt=(0,Be.useState)({}),Pt=(0,Ke.Z)(yt,2),Ht=Pt[1],Qt=(0,Be.useRef)(null),nn=(0,Be.useRef)([]);function wn(Un){nn.current.push(Un);var An=Promise.resolve();Qt.current=An,An.then(function(){if(Qt.current===An){var Pi=nn.current,zn=dt.current;nn.current=[],Pi.forEach(function(di){dt.current=di(dt.current)}),Qt.current=null,zn!==dt.current&&Ht({})}})}return(0,Be.useEffect)(function(){return function(){Qt.current=null}},[]),[dt.current,wn]}function hu(We){var dt=(0,Be.useRef)(We||null),yt=(0,Be.useRef)();function Pt(){window.clearTimeout(yt.current)}function Ht(nn){dt.current=nn,Pt(),yt.current=window.setTimeout(function(){dt.current=null,yt.current=void 0},100)}function Qt(){return dt.current}return(0,Be.useEffect)(function(){return Pt},[]),[Ht,Qt]}function cu(){var We=Be.useState(-1),dt=(0,Ke.Z)(We,2),yt=dt[0],Pt=dt[1],Ht=Be.useState(-1),Qt=(0,Ke.Z)(Ht,2),nn=Qt[0],wn=Qt[1],Un=Be.useCallback(function(An,Pi){Pt(An),wn(Pi)},[]);return[yt,nn,Un]}var ul=Et()?window:null;function kl(We,dt){var yt=(0,rt.Z)(We)==="object"?We:{},Pt=yt.offsetHeader,Ht=Pt===void 0?0:Pt,Qt=yt.offsetSummary,nn=Qt===void 0?0:Qt,wn=yt.offsetScroll,Un=wn===void 0?0:wn,An=yt.getContainer,Pi=An===void 0?function(){return ul}:An,zn=Pi()||ul,di=!!We;return Be.useMemo(function(){return{isSticky:di,stickyClassName:di?"".concat(dt,"-sticky-holder"):"",offsetHeader:Ht,offsetSummary:nn,offsetScroll:Un,container:zn}},[di,Un,Ht,nn,dt,zn])}function zl(We,dt,yt){var Pt=(0,Be.useMemo)(function(){var Ht=dt.length,Qt=function(An,Pi,zn){for(var di=[],ei=0,Bi=An;Bi!==Pi;Bi+=zn)di.push(ei),dt[Bi].fixed&&(ei+=We[Bi]||0);return di},nn=Qt(0,Ht,1),wn=Qt(Ht-1,-1,-1).reverse();return yt==="rtl"?{left:wn,right:nn}:{left:nn,right:wn}},[We,dt,yt]);return Pt}var sh=zl;function Su(We){var dt=We.className,yt=We.children;return Be.createElement("div",{className:dt},yt)}var Ra=Su;function qa(We,dt,yt,Pt){var Ht=He.unstable_batchedUpdates?function(nn){He.unstable_batchedUpdates(yt,nn)}:yt;return We!=null&&We.addEventListener&&We.addEventListener(dt,Ht,Pt),{remove:function(){We!=null&&We.removeEventListener&&We.removeEventListener(dt,Ht,Pt)}}}var Nr=function(dt){return+setTimeout(dt,16)},vr=function(dt){return clearTimeout(dt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Nr=function(dt){return window.requestAnimationFrame(dt)},vr=function(dt){return window.cancelAnimationFrame(dt)});var uo=0,un=new Map;function Gr(We){un.delete(We)}var Io=function(dt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;uo+=1;var Pt=uo;function Ht(Qt){if(Qt===0)Gr(Pt),dt();else{var nn=Nr(function(){Ht(Qt-1)});un.set(Pt,nn)}}return Ht(yt),Pt};Io.cancel=function(We){var dt=un.get(We);return Gr(We),vr(dt)};var Va=Io;function Ta(We){return We instanceof HTMLElement||We instanceof SVGElement}function os(We){return We&&(0,rt.Z)(We)==="object"&&Ta(We.nativeElement)?We.nativeElement:Ta(We)?We:null}function Ws(We){var dt=os(We);if(dt)return dt;if(We instanceof React.Component){var yt;return(yt=ReactDOM.findDOMNode)===null||yt===void 0?void 0:yt.call(ReactDOM,We)}return null}function vl(We){var dt=os(We),yt=dt.getBoundingClientRect(),Pt=document.documentElement;return{left:yt.left+(window.pageXOffset||Pt.scrollLeft)-(Pt.clientLeft||document.body.clientLeft||0),top:yt.top+(window.pageYOffset||Pt.scrollTop)-(Pt.clientTop||document.body.clientTop||0)}}var yl=function(dt,yt){var Pt,Ht,Qt=dt.scrollBodyRef,nn=dt.onScroll,wn=dt.offsetScroll,Un=dt.container,An=dt.direction,Pi=it(Pe,"prefixCls"),zn=((Pt=Qt.current)===null||Pt===void 0?void 0:Pt.scrollWidth)||0,di=((Ht=Qt.current)===null||Ht===void 0?void 0:Ht.clientWidth)||0,ei=zn&&di*(di/zn),Bi=Be.useRef(),Xi=rs({scrollLeft:0,isHiddenScrollBar:!0}),yr=(0,Ke.Z)(Xi,2),Jr=yr[0],Tt=yr[1],Dn=Be.useRef({delta:0,x:0}),ii=Be.useState(!1),fi=(0,Ke.Z)(ii,2),Bn=fi[0],Oi=fi[1],Cr=Be.useRef(null);Be.useEffect(function(){return function(){Va.cancel(Cr.current)}},[]);var pr=function(){Oi(!1)},rr=function(Hn){Hn.persist(),Dn.current.delta=Hn.pageX-Jr.scrollLeft,Dn.current.x=0,Oi(!0),Hn.preventDefault()},ua=function(Hn){var br,ho=Hn||((br=window)===null||br===void 0?void 0:br.event),ke=ho.buttons;if(!Bn||ke===0){Bn&&Oi(!1);return}var Te=Dn.current.x+Hn.pageX-Dn.current.x-Dn.current.delta,et=An==="rtl";Te=Math.max(et?ei-di:0,Math.min(et?0:di-ei,Te));var at=!et||Math.abs(Te)+Math.abs(ei)<di;at&&(nn({scrollLeft:Te/di*(zn+2)}),Dn.current.x=Hn.pageX)},Qr=function(){Va.cancel(Cr.current),Cr.current=Va(function(){if(Qt.current){var Hn=vl(Qt.current).top,br=Hn+Qt.current.offsetHeight,ho=Un===window?document.documentElement.scrollTop+window.innerHeight:vl(Un).top+Un.clientHeight;br-Zi()<=ho||Hn>=ho-wn?Tt(function(ke){return(0,Je.Z)((0,Je.Z)({},ke),{},{isHiddenScrollBar:!0})}):Tt(function(ke){return(0,Je.Z)((0,Je.Z)({},ke),{},{isHiddenScrollBar:!1})})}})},io=function(Hn){Tt(function(br){return(0,Je.Z)((0,Je.Z)({},br),{},{scrollLeft:Hn/zn*di||0})})};return Be.useImperativeHandle(yt,function(){return{setScrollLeft:io,checkScrollBarVisible:Qr}}),Be.useEffect(function(){var So=qa(document.body,"mouseup",pr,!1),Hn=qa(document.body,"mousemove",ua,!1);return Qr(),function(){So.remove(),Hn.remove()}},[ei,Bn]),Be.useEffect(function(){if(Qt.current){for(var So=[],Hn=os(Qt.current);Hn;)So.push(Hn),Hn=Hn.parentElement;return So.forEach(function(br){return br.addEventListener("scroll",Qr,!1)}),window.addEventListener("resize",Qr,!1),window.addEventListener("scroll",Qr,!1),Un.addEventListener("scroll",Qr,!1),function(){So.forEach(function(br){return br.removeEventListener("scroll",Qr)}),window.removeEventListener("resize",Qr),window.removeEventListener("scroll",Qr),Un.removeEventListener("scroll",Qr)}}},[Un]),Be.useEffect(function(){Jr.isHiddenScrollBar||Tt(function(So){var Hn=Qt.current;return Hn?(0,Je.Z)((0,Je.Z)({},So),{},{scrollLeft:Hn.scrollLeft/Hn.scrollWidth*Hn.clientWidth}):So})},[Jr.isHiddenScrollBar]),zn<=di||!ei||Jr.isHiddenScrollBar?null:Be.createElement("div",{style:{height:Zi(),width:di,bottom:wn},className:"".concat(Pi,"-sticky-scroll")},Be.createElement("div",{onMouseDown:rr,ref:Bi,className:Lt()("".concat(Pi,"-sticky-scroll-bar"),(0,bt.Z)({},"".concat(Pi,"-sticky-scroll-bar-active"),Bn)),style:{width:"".concat(ei,"px"),transform:"translate3d(".concat(Jr.scrollLeft,"px, 0, 0)")}}))},xu=Be.forwardRef(yl);function Ou(We){return null}var Xt=Ou;function El(We){return null}var Gl=El,wu="rc-table",vs=[],Yu={};function Hh(){return"No Data"}function yh(We,dt){var yt=(0,Je.Z)({rowKey:"key",prefixCls:wu,emptyText:Hh},We),Pt=yt.prefixCls,Ht=yt.className,Qt=yt.rowClassName,nn=yt.style,wn=yt.data,Un=yt.rowKey,An=yt.scroll,Pi=yt.tableLayout,zn=yt.direction,di=yt.title,ei=yt.footer,Bi=yt.summary,Xi=yt.caption,yr=yt.id,Jr=yt.showHeader,Tt=yt.components,Dn=yt.emptyText,ii=yt.onRow,fi=yt.onHeaderRow,Bn=yt.onScroll,Oi=yt.internalHooks,Cr=yt.transformColumns,pr=yt.internalRefs,rr=yt.tailor,ua=yt.getContainerWidth,Qr=yt.sticky,io=yt.rowHoverable,So=io===void 0?!0:io,Hn=wn||vs,br=!!Hn.length,ho=Oi===fe.R,ke=Be.useCallback(function(Na,qo){return vn(Tt,Na)||qo},[Tt]),Te=Be.useMemo(function(){return typeof Un=="function"?Un:function(Na){var qo=Na&&Na[Un];return qo}},[Un]),et=ke(["body"]),at=cu(),jt=(0,Ke.Z)(at,3),qt=jt[0],gn=jt[1],Vn=jt[2],Qn=ki(yt,Hn,Te),Gn=(0,Ke.Z)(Qn,6),gi=Gn[0],yi=Gn[1],_i=Gn[2],mi=Gn[3],ui=Gn[4],Fi=Gn[5],ji=An==null?void 0:An.x,Rr=Be.useState(0),ao=(0,Ke.Z)(Rr,2),Fr=ao[0],jr=ao[1],To=(0,wa.Z)((0,Je.Z)((0,Je.Z)((0,Je.Z)({},yt),gi),{},{expandable:!!gi.expandedRowRender,columnTitle:gi.columnTitle,expandedKeys:_i,getRowKey:Te,onTriggerExpand:Fi,expandIcon:mi,expandIconColumnIndex:gi.expandIconColumnIndex,direction:zn,scrollWidth:ho&&rr&&typeof ji=="number"?ji:null,clientWidth:Fr}),ho?Cr:null),bi=(0,Ke.Z)(To,4),Kr=bi[0],or=bi[1],Zr=bi[2],xo=bi[3],nr=Zr!=null?Zr:ji,jo=Be.useMemo(function(){return{columns:Kr,flattenColumns:or}},[Kr,or]),co=Be.useRef(),oa=Be.useRef(),ro=Be.useRef(),Uo=Be.useRef();Be.useImperativeHandle(dt,function(){return{nativeElement:co.current,scrollTo:function(qo){var qs;if(ro.current instanceof HTMLElement){var bu=qo.index,Dl=qo.top,Wl=qo.key;if(At(Dl)){var wl;(wl=ro.current)===null||wl===void 0||wl.scrollTo({top:Dl})}else{var Bh,Ns=Wl!=null?Wl:Te(Hn[bu]);(Bh=ro.current.querySelector('[data-row-key="'.concat(Ns,'"]')))===null||Bh===void 0||Bh.scrollIntoView()}}else(qs=ro.current)!==null&&qs!==void 0&&qs.scrollTo&&ro.current.scrollTo(qo)}}});var fa=Be.useRef(),Ea=Be.useState(!1),ga=(0,Ke.Z)(Ea,2),_r=ga[0],Co=ga[1],Ma=Be.useState(!1),pa=(0,Ke.Z)(Ma,2),Da=pa[0],ka=pa[1],Xa=rs(new Map),Oa=(0,Ke.Z)(Xa,2),es=Oa[0],Hs=Oa[1],as=mn(or),wo=as.map(function(Na){return es.get(Na)}),yo=Be.useMemo(function(){return wo},[wo.join("_")]),fo=sh(yo,or,zn),ar=An&&kn(An.y),mr=An&&kn(nr)||!!gi.fixed,so=mr&&or.some(function(Na){var qo=Na.fixed;return qo}),Jo=Be.useRef(),ha=kl(Qr,Pt),Yo=ha.isSticky,ss=ha.offsetHeader,ks=ha.offsetSummary,Za=ha.offsetScroll,Ks=ha.stickyClassName,ns=ha.container,fs=Be.useMemo(function(){return Bi==null?void 0:Bi(Hn)},[Bi,Hn]),ps=(ar||Yo)&&Be.isValidElement(fs)&&fs.type===Ii&&fs.props.fixed,rl,ws,Ps;ar&&(ws={overflowY:br?"scroll":"auto",maxHeight:An.y}),mr&&(rl={overflowX:"auto"},ar||(ws={overflowY:"hidden"}),Ps={width:nr===!0?"auto":nr,minWidth:"100%"});var ts=Be.useCallback(function(Na,qo){Ut(co.current)&&Hs(function(qs){if(qs.get(Na)!==qo){var bu=new Map(qs);return bu.set(Na,qo),bu}return qs})},[]),ms=hu(null),xl=(0,Ke.Z)(ms,2),Cl=xl[0],lo=xl[1];function zr(Na,qo){qo&&(typeof qo=="function"?qo(Na):qo.scrollLeft!==Na&&(qo.scrollLeft=Na,qo.scrollLeft!==Na&&setTimeout(function(){qo.scrollLeft=Na},0)))}var to=mt(function(Na){var qo=Na.currentTarget,qs=Na.scrollLeft,bu=zn==="rtl",Dl=typeof qs=="number"?qs:qo.scrollLeft,Wl=qo||Yu;if(!lo()||lo()===Wl){var wl;Cl(Wl),zr(Dl,oa.current),zr(Dl,ro.current),zr(Dl,fa.current),zr(Dl,(wl=Jo.current)===null||wl===void 0?void 0:wl.setScrollLeft)}var Bh=qo||oa.current;if(Bh){var Ns=ho&&rr&&typeof nr=="number"?nr:Bh.scrollWidth,fc=Bh.clientWidth;if(Ns===fc){Co(!1),ka(!1);return}bu?(Co(-Dl<Ns-fc),ka(-Dl>0)):(Co(Dl>0),ka(Dl<Ns-fc))}}),va=mt(function(Na){to(Na),Bn==null||Bn(Na)}),Es=function(){if(mr&&ro.current){var qo;to({currentTarget:os(ro.current),scrollLeft:(qo=ro.current)===null||qo===void 0?void 0:qo.scrollLeft})}else Co(!1),ka(!1)},Zs=function(qo){var qs,bu=qo.width;(qs=Jo.current)===null||qs===void 0||qs.checkScrollBarVisible();var Dl=co.current?co.current.offsetWidth:bu;ho&&ua&&co.current&&(Dl=ua(co.current,Dl)||Dl),Dl!==Fr&&(Es(),jr(Dl))},Al=Be.useRef(!1);Be.useEffect(function(){Al.current&&Es()},[mr,wn,Kr.length]),Be.useEffect(function(){Al.current=!0},[]);var kt=Be.useState(0),Hl=(0,Ke.Z)(kt,2),$s=Hl[0],Ql=Hl[1],Ju=Be.useState(!0),Us=(0,Ke.Z)(Ju,2),Go=Us[0],ja=Us[1];Be.useEffect(function(){(!rr||!ho)&&(ro.current instanceof Element?Ql(Wr(ro.current).width):Ql(Wr(Uo.current).width)),ja(xn("position","sticky"))},[]),Be.useEffect(function(){ho&&pr&&(pr.body.current=ro.current)});var Wo=Be.useCallback(function(Na){return Be.createElement(Be.Fragment,null,Be.createElement(nl,Na),ps==="top"&&Be.createElement(zi,Na,fs))},[ps,fs]),ol=Be.useCallback(function(Na){return Be.createElement(zi,Na,fs)},[fs]),Zl=ke(["table"],"table"),Xo=Be.useMemo(function(){return Pi||(so?nr==="max-content"?"auto":"fixed":ar||Yo||or.some(function(Na){var qo=Na.ellipsis;return qo})?"fixed":"auto")},[ar,so,or,Pi,Yo]),Ca,ca={colWidths:yo,columCount:or.length,stickyOffsets:fo,onHeaderRow:fi,fixHeader:ar,scroll:An},ma=Be.useMemo(function(){return br?null:typeof Dn=="function"?Dn():Dn},[br,Dn]),ls=Be.createElement(na,{data:Hn,measureColumnWidth:ar||mr||Yo}),Ja=Be.createElement(bn,{colWidths:or.map(function(Na){var qo=Na.width;return qo}),columns:or}),du=Xi!=null?Be.createElement("caption",{className:"".concat(Pt,"-caption")},Xi):void 0,Qu=Wi(yt,{data:!0}),Bl=Wi(yt,{aria:!0});if(ar||Yo){var al;typeof et=="function"?(al=et(Hn,{scrollbarSize:$s,ref:ro,onScroll:to}),ca.colWidths=or.map(function(Na,qo){var qs=Na.width,bu=qo===or.length-1?qs-$s:qs;return typeof bu=="number"&&!Number.isNaN(bu)?bu:0})):al=Be.createElement("div",{style:(0,Je.Z)((0,Je.Z)({},rl),ws),onScroll:va,ref:ro,className:Lt()("".concat(Pt,"-body"))},Be.createElement(Zl,(0,st.Z)({style:(0,Je.Z)((0,Je.Z)({},Ps),{},{tableLayout:Xo})},Bl),du,Ja,ls,!ps&&fs&&Be.createElement(zi,{stickyOffsets:fo,flattenColumns:or},fs)));var $u=(0,Je.Z)((0,Je.Z)((0,Je.Z)({noData:!Hn.length,maxContentScroll:mr&&nr==="max-content"},ca),jo),{},{direction:zn,stickyClassName:Ks,onScroll:to});Ca=Be.createElement(Be.Fragment,null,Jr!==!1&&Be.createElement(Vr,(0,st.Z)({},$u,{stickyTopOffset:ss,className:"".concat(Pt,"-header"),ref:oa}),Wo),al,ps&&ps!=="top"&&Be.createElement(Vr,(0,st.Z)({},$u,{stickyBottomOffset:ks,className:"".concat(Pt,"-summary"),ref:fa}),ol),Yo&&ro.current&&ro.current instanceof Element&&Be.createElement(xu,{ref:Jo,offsetScroll:Za,scrollBodyRef:ro,onScroll:to,container:ns,direction:zn}))}else Ca=Be.createElement("div",{style:(0,Je.Z)((0,Je.Z)({},rl),ws),className:Lt()("".concat(Pt,"-content")),onScroll:to,ref:ro},Be.createElement(Zl,(0,st.Z)({style:(0,Je.Z)((0,Je.Z)({},Ps),{},{tableLayout:Xo})},Bl),du,Ja,Jr!==!1&&Be.createElement(nl,(0,st.Z)({},ca,jo)),ls,fs&&Be.createElement(zi,{stickyOffsets:fo,flattenColumns:or},fs)));var zu=Be.createElement("div",(0,st.Z)({className:Lt()(Pt,Ht,(0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)({},"".concat(Pt,"-rtl"),zn==="rtl"),"".concat(Pt,"-ping-left"),_r),"".concat(Pt,"-ping-right"),Da),"".concat(Pt,"-layout-fixed"),Pi==="fixed"),"".concat(Pt,"-fixed-header"),ar),"".concat(Pt,"-fixed-column"),so),"".concat(Pt,"-fixed-column-gapped"),so&&xo),"".concat(Pt,"-scroll-horizontal"),mr),"".concat(Pt,"-has-fix-left"),or[0]&&or[0].fixed),"".concat(Pt,"-has-fix-right"),or[or.length-1]&&or[or.length-1].fixed==="right")),style:nn,id:yr,ref:co},Qu),di&&Be.createElement(Ra,{className:"".concat(Pt,"-title")},di(Hn)),Be.createElement("div",{ref:Uo,className:"".concat(Pt,"-container")},Ca),ei&&Be.createElement(Ra,{className:"".concat(Pt,"-footer")},ei(Hn)));mr&&(zu=Be.createElement(we.Z,{onResize:Zs},zu));var Tl=$e(or,fo,zn),sd=Be.useMemo(function(){return{scrollX:nr,prefixCls:Pt,getComponent:ke,scrollbarSize:$s,direction:zn,fixedInfoList:Tl,isSticky:Yo,supportSticky:Go,componentWidth:Fr,fixHeader:ar,fixColumn:so,horizonScroll:mr,tableLayout:Xo,rowClassName:Qt,expandedRowClassName:gi.expandedRowClassName,expandIcon:mi,expandableType:yi,expandRowByClick:gi.expandRowByClick,expandedRowRender:gi.expandedRowRender,onTriggerExpand:Fi,expandIconColumnIndex:gi.expandIconColumnIndex,indentSize:gi.indentSize,allColumnsFixedLeft:or.every(function(Na){return Na.fixed==="left"}),emptyNode:ma,columns:Kr,flattenColumns:or,onColumnResize:ts,hoverStartRow:qt,hoverEndRow:gn,onHover:Vn,rowExpandable:gi.rowExpandable,onRow:ii,getRowKey:Te,expandedKeys:_i,childrenColumnName:ui,rowHoverable:So}},[nr,Pt,ke,$s,zn,Tl,Yo,Go,Fr,ar,so,mr,Xo,Qt,gi.expandedRowClassName,mi,yi,gi.expandRowByClick,gi.expandedRowRender,Fi,gi.expandIconColumnIndex,gi.indentSize,ma,Kr,or,ts,qt,gn,Vn,gi.rowExpandable,ii,Te,_i,ui,So]);return Be.createElement(Pe.Provider,{value:sd},zu)}var Ka=Be.forwardRef(yh);function Ko(We){return se(Ka,We)}var Bo=Ko();Bo.EXPAND_COLUMN=fe.w,Bo.INTERNAL_HOOKS=fe.R,Bo.Column=Xt,Bo.ColumnGroup=Gl,Bo.Summary=an;var ia=Bo;function Ua(We){var dt=Be.useRef();dt.current=We;var yt=Be.useCallback(function(){for(var Pt,Ht=arguments.length,Qt=new Array(Ht),nn=0;nn<Ht;nn++)Qt[nn]=arguments[nn];return(Pt=dt.current)===null||Pt===void 0?void 0:Pt.call.apply(Pt,[dt].concat(Qt))},[]);return yt}function cs(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Sr=cs()?Be.useLayoutEffect:Be.useEffect,Zh=function(dt,yt){var Pt=Be.useRef(!0);Sr(function(){return dt(Pt.current)},yt),Sr(function(){return Pt.current=!1,function(){Pt.current=!0}},[])},_u=function(dt,yt){Zh(function(Pt){if(!Pt)return dt()},yt)},Sl=Zh;function Wh(We){var dt=React.useRef(!1),yt=React.useState(We),Pt=_slicedToArray(yt,2),Ht=Pt[0],Qt=Pt[1];React.useEffect(function(){return dt.current=!1,function(){dt.current=!0}},[]);function nn(wn,Un){Un&&dt.current||Qt(wn)}return[Ht,nn]}function lh(We){return We!==void 0}function Di(We,dt){var yt=dt||{},Pt=yt.defaultValue,Ht=yt.value,Qt=yt.onChange,nn=yt.postState,wn=useState(function(){return lh(Ht)?Ht:lh(Pt)?typeof Pt=="function"?Pt():Pt:typeof We=="function"?We():We}),Un=_slicedToArray(wn,2),An=Un[0],Pi=Un[1],zn=Ht!==void 0?Ht:An,di=nn?nn(zn):zn,ei=useEvent(Qt),Bi=useState([zn]),Xi=_slicedToArray(Bi,2),yr=Xi[0],Jr=Xi[1];useLayoutUpdateEffect(function(){var Dn=yr[0];An!==Dn&&ei(An,Dn)},[yr]),useLayoutUpdateEffect(function(){lh(Ht)||Pi(Ht)},[Ht]);var Tt=useEvent(function(Dn,ii){Pi(Dn,ii),Jr([zn],ii)});return[di,Tt]}function Ms(We,dt,yt){var Pt=React.useRef({});return(!("value"in Pt.current)||yt(Pt.current.condition,dt))&&(Pt.current.value=We(),Pt.current.condition=dt),Pt.current.value}function Os(We,dt){typeof We=="function"?We(dt):_typeof(We)==="object"&&We&&"current"in We&&(We.current=dt)}function Iu(){for(var We=arguments.length,dt=new Array(We),yt=0;yt<We;yt++)dt[yt]=arguments[yt];var Pt=dt.filter(function(Ht){return Ht});return Pt.length<=1?Pt[0]:function(Ht){dt.forEach(function(Qt){Os(Qt,Ht)})}}function sc(){for(var We=arguments.length,dt=new Array(We),yt=0;yt<We;yt++)dt[yt]=arguments[yt];return useMemo(function(){return Iu.apply(void 0,dt)},dt,function(Pt,Ht){return Pt.length!==Ht.length||Pt.every(function(Qt,nn){return Qt!==Ht[nn]})})}function Vh(We){var dt,yt,Pt=isMemo(We)?We.type.type:We.type;return!(typeof Pt=="function"&&!((dt=Pt.prototype)!==null&&dt!==void 0&&dt.render)||typeof We=="function"&&!((yt=We.prototype)!==null&&yt!==void 0&&yt.render))}function Oo(We){return!isValidElement(We)||isFragment(We)?!1:Vh(We)}function Fh(We,dt,yt,Pt){if(!dt.length)return yt;var Ht=_toArray(dt),Qt=Ht[0],nn=Ht.slice(1),wn;return!We&&typeof Qt=="number"?wn=[]:Array.isArray(We)?wn=_toConsumableArray(We):wn=_objectSpread({},We),Pt&&yt===void 0&&nn.length===1?delete wn[Qt][nn[0]]:wn[Qt]=Fh(wn[Qt],nn,yt,Pt),wn}function Pu(We,dt,yt){var Pt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return dt.length&&Pt&&yt===void 0&&!get(We,dt.slice(0,-1))?We:Fh(We,dt,yt,Pt)}function zs(We){return _typeof(We)==="object"&&We!==null&&Object.getPrototypeOf(We)===Object.prototype}function il(We){return Array.isArray(We)?[]:{}}var kh=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function lc(){for(var We=arguments.length,dt=new Array(We),yt=0;yt<We;yt++)dt[yt]=arguments[yt];var Pt=il(dt[0]);return dt.forEach(function(Ht){function Qt(nn,wn){var Un=new Set(wn),An=get(Ht,nn),Pi=Array.isArray(An);if(Pi||zs(An)){if(!Un.has(An)){Un.add(An);var zn=get(Pt,nn);Pi?Pt=Pu(Pt,nn,[]):(!zn||_typeof(zn)!=="object")&&(Pt=Pu(Pt,nn,il(An))),kh(An).forEach(function(di){Qt([].concat(_toConsumableArray(nn),[di]),Un)})}}else Pt=Pu(Pt,nn,An)}Qt([])}),Pt}var Ml={},Eu=[],uc=function(dt){Eu.push(dt)};function od(We,dt){if(0)var yt}function hc(We,dt){if(0)var yt}function ad(){Ml={}}function bc(We,dt,yt){!dt&&!Ml[yt]&&(We(!1,yt),Ml[yt]=!0)}function Jl(We,dt){bc(od,We,dt)}function Nh(We,dt){bc(hc,We,dt)}Jl.preMessage=uc,Jl.resetWarned=ad,Jl.noteOnce=Nh;var Ru=null,Kh=Be.forwardRef(function(We,dt){var yt=We.height,Pt=We.offsetY,Ht=We.offsetX,Qt=We.children,nn=We.prefixCls,wn=We.onInnerResize,Un=We.innerProps,An=We.rtl,Pi=We.extra,zn={},di={display:"flex",flexDirection:"column"};return Pt!==void 0&&(zn={height:yt,position:"relative",overflow:"hidden"},di=(0,Je.Z)((0,Je.Z)({},di),{},(0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)((0,bt.Z)({transform:"translateY(".concat(Pt,"px)")},An?"marginRight":"marginLeft",-Ht),"position","absolute"),"left",0),"right",0),"top",0))),Be.createElement("div",{style:zn},Be.createElement(we.Z,{onResize:function(Bi){var Xi=Bi.offsetHeight;Xi&&wn&&wn()}},Be.createElement("div",(0,st.Z)({style:di,className:Lt()((0,bt.Z)({},"".concat(nn,"-holder-inner"),nn)),ref:dt},Un),Qt,Pi)))});Kh.displayName="Filler";var Uh=Kh;function Lc(We){var dt=We.children,yt=We.setRef,Pt=Be.useCallback(function(Ht){yt(Ht)},[]);return Be.cloneElement(dt,{ref:Pt})}function Fs(We,dt,yt,Pt,Ht,Qt,nn,wn){var Un=wn.getKey;return We.slice(dt,yt+1).map(function(An,Pi){var zn=dt+Pi,di=nn(An,zn,{style:{width:Pt},offsetX:Ht}),ei=Un(An);return Be.createElement(Lc,{key:ei,setRef:function(Xi){return Qt(An,Xi)}},di)})}function Yh(We,dt,yt,Pt){var Ht=yt-We,Qt=dt-yt,nn=Math.min(Ht,Qt)*2;if(Pt<=nn){var wn=Math.floor(Pt/2);return Pt%2?yt+wn+1:yt-wn}return Ht>Qt?yt-(Pt-Qt):yt+(Pt-Ht)}function Mc(We,dt,yt){var Pt=We.length,Ht=dt.length,Qt,nn;if(Pt===0&&Ht===0)return null;Pt<Ht?(Qt=We,nn=dt):(Qt=dt,nn=We);var wn={__EMPTY_ITEM__:!0};function Un(Bi){return Bi!==void 0?yt(Bi):wn}for(var An=null,Pi=Math.abs(Pt-Ht)!==1,zn=0;zn<nn.length;zn+=1){var di=Un(Qt[zn]),ei=Un(nn[zn]);if(di!==ei){An=zn,Pi=Pi||di!==Un(nn[zn+1]);break}}return An===null?null:{index:An,multiple:Pi}}function cc(We,dt,yt){var Pt=Be.useState(We),Ht=(0,Ke.Z)(Pt,2),Qt=Ht[0],nn=Ht[1],wn=Be.useState(null),Un=(0,Ke.Z)(wn,2),An=Un[0],Pi=Un[1];return Be.useEffect(function(){var zn=Mc(Qt||[],We||[],dt);(zn==null?void 0:zn.index)!==void 0&&(yt==null||yt(zn.index),Pi(We[zn.index])),nn(We)},[We]),[An]}var Sh=function(dt){return+setTimeout(dt,16)},Fl=function(dt){return clearTimeout(dt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Sh=function(dt){return window.requestAnimationFrame(dt)},Fl=function(dt){return window.cancelAnimationFrame(dt)});var hl=0,_s=new Map;function Qs(We){_s.delete(We)}var Xh=function(dt){var yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;hl+=1;var Pt=hl;function Ht(Qt){if(Qt===0)Qs(Pt),dt();else{var nn=Sh(function(){Ht(Qt-1)});_s.set(Pt,nn)}}return Ht(yt),Pt};Xh.cancel=function(We){var dt=_s.get(We);return Qs(dt),Fl(dt)};var ys=Xh,Ya=(typeof navigator=="undefined"?"undefined":(0,rt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Nl=Ya,dc=function(We,dt,yt,Pt){var Ht=(0,Be.useRef)(!1),Qt=(0,Be.useRef)(null);function nn(){clearTimeout(Qt.current),Ht.current=!0,Qt.current=setTimeout(function(){Ht.current=!1},50)}var wn=(0,Be.useRef)({top:We,bottom:dt,left:yt,right:Pt});return wn.current.top=We,wn.current.bottom=dt,wn.current.left=yt,wn.current.right=Pt,function(Un,An){var Pi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,zn=Un?An<0&&wn.current.left||An>0&&wn.current.right:An<0&&wn.current.top||An>0&&wn.current.bottom;return Pi&&zn?(clearTimeout(Qt.current),Ht.current=!1):(!zn||Ht.current)&&nn(),!Ht.current&&zn}};function Fc(We,dt,yt,Pt,Ht,Qt,nn){var wn=(0,Be.useRef)(0),Un=(0,Be.useRef)(null),An=(0,Be.useRef)(null),Pi=(0,Be.useRef)(!1),zn=dc(dt,yt,Pt,Ht);function di(Tt,Dn){if(ys.cancel(Un.current),!zn(!1,Dn)){var ii=Tt;if(!ii._virtualHandled)ii._virtualHandled=!0;else return;wn.current+=Dn,An.current=Dn,Nl||ii.preventDefault(),Un.current=ys(function(){var fi=Pi.current?10:1;nn(wn.current*fi,!1),wn.current=0})}}function ei(Tt,Dn){nn(Dn,!0),Nl||Tt.preventDefault()}var Bi=(0,Be.useRef)(null),Xi=(0,Be.useRef)(null);function yr(Tt){if(We){ys.cancel(Xi.current),Xi.current=ys(function(){Bi.current=null},2);var Dn=Tt.deltaX,ii=Tt.deltaY,fi=Tt.shiftKey,Bn=Dn,Oi=ii;(Bi.current==="sx"||!Bi.current&&fi&&ii&&!Dn)&&(Bn=ii,Oi=0,Bi.current="sx");var Cr=Math.abs(Bn),pr=Math.abs(Oi);Bi.current===null&&(Bi.current=Qt&&Cr>pr?"x":"y"),Bi.current==="y"?di(Tt,Oi):ei(Tt,Bn)}}function Jr(Tt){We&&(Pi.current=Tt.detail===An.current)}return[yr,Jr]}function ct(We,dt,yt,Pt){var Ht=Be.useMemo(function(){return[new Map,[]]},[We,yt.id,Pt]),Qt=(0,Ke.Z)(Ht,2),nn=Qt[0],wn=Qt[1],Un=function(Pi){var zn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pi,di=nn.get(Pi),ei=nn.get(zn);if(di===void 0||ei===void 0)for(var Bi=We.length,Xi=wn.length;Xi<Bi;Xi+=1){var yr,Jr=We[Xi],Tt=dt(Jr);nn.set(Tt,Xi);var Dn=(yr=yt.get(Tt))!==null&&yr!==void 0?yr:Pt;if(wn[Xi]=(wn[Xi-1]||0)+Dn,Tt===Pi&&(di=Xi),Tt===zn&&(ei=Xi),di!==void 0&&ei!==void 0)break}return{top:wn[di-1]||0,bottom:wn[ei]}};return Un}var Vt=Me(15671),Ie=Me(43144),wt=function(){function We(){(0,Vt.Z)(this,We),(0,bt.Z)(this,"maps",void 0),(0,bt.Z)(this,"id",0),(0,bt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Ie.Z)(We,[{key:"set",value:function(yt,Pt){this.maps[yt]=Pt,this.id+=1,this.diffKeys.add(yt)}},{key:"get",value:function(yt){return this.maps[yt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),We}(),no=wt;function Ar(We){var dt=parseFloat(We);return isNaN(dt)?0:dt}function ko(We,dt,yt){var Pt=Be.useState(0),Ht=(0,Ke.Z)(Pt,2),Qt=Ht[0],nn=Ht[1],wn=(0,Be.useRef)(new Map),Un=(0,Be.useRef)(new no),An=(0,Be.useRef)(0);function Pi(){An.current+=1}function zn(){var ei=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Pi();var Bi=function(){var Jr=!1;wn.current.forEach(function(Tt,Dn){if(Tt&&Tt.offsetParent){var ii=Tt.offsetHeight,fi=getComputedStyle(Tt),Bn=fi.marginTop,Oi=fi.marginBottom,Cr=Ar(Bn),pr=Ar(Oi),rr=ii+Cr+pr;Un.current.get(Dn)!==rr&&(Un.current.set(Dn,rr),Jr=!0)}}),Jr&&nn(function(Tt){return Tt+1})};if(ei)Bi();else{An.current+=1;var Xi=An.current;Promise.resolve().then(function(){Xi===An.current&&Bi()})}}function di(ei,Bi){var Xi=We(ei),yr=wn.current.get(Xi);Bi?(wn.current.set(Xi,Bi),zn()):wn.current.delete(Xi),!yr!=!Bi&&(Bi?dt==null||dt(ei):yt==null||yt(ei))}return(0,Be.useEffect)(function(){return Pi},[]),[di,zn,Un.current,Qt]}var Tr=14/15;function Ir(We,dt,yt){var Pt=(0,Be.useRef)(!1),Ht=(0,Be.useRef)(0),Qt=(0,Be.useRef)(0),nn=(0,Be.useRef)(null),wn=(0,Be.useRef)(null),Un,An=function(ei){if(Pt.current){var Bi=Math.ceil(ei.touches[0].pageX),Xi=Math.ceil(ei.touches[0].pageY),yr=Ht.current-Bi,Jr=Qt.current-Xi,Tt=Math.abs(yr)>Math.abs(Jr);Tt?Ht.current=Bi:Qt.current=Xi;var Dn=yt(Tt,Tt?yr:Jr,!1,ei);Dn&&ei.preventDefault(),clearInterval(wn.current),Dn&&(wn.current=setInterval(function(){Tt?yr*=Tr:Jr*=Tr;var ii=Math.floor(Tt?yr:Jr);(!yt(Tt,ii,!0)||Math.abs(ii)<=.1)&&clearInterval(wn.current)},16))}},Pi=function(){Pt.current=!1,Un()},zn=function(ei){Un(),ei.touches.length===1&&!Pt.current&&(Pt.current=!0,Ht.current=Math.ceil(ei.touches[0].pageX),Qt.current=Math.ceil(ei.touches[0].pageY),nn.current=ei.target,nn.current.addEventListener("touchmove",An,{passive:!1}),nn.current.addEventListener("touchend",Pi,{passive:!0}))};Un=function(){nn.current&&(nn.current.removeEventListener("touchmove",An),nn.current.removeEventListener("touchend",Pi))},Sl(function(){return We&&dt.current.addEventListener("touchstart",zn,{passive:!0}),function(){var di;(di=dt.current)===null||di===void 0||di.removeEventListener("touchstart",zn),Un(),clearInterval(wn.current)}},[We])}function la(We){return Math.floor(Math.pow(We,.5))}function vo(We,dt){var yt="touches"in We?We.touches[0]:We;return yt[dt?"pageX":"pageY"]-window[dt?"scrollX":"scrollY"]}function qr(We,dt,yt){Be.useEffect(function(){var Pt=dt.current;if(We&&Pt){var Ht=!1,Qt,nn,wn=function(){ys.cancel(Qt)},Un=function di(){wn(),Qt=ys(function(){yt(nn),di()})},An=function(ei){if(!(ei.target.draggable||ei.button!==0)){var Bi=ei;Bi._virtualHandled||(Bi._virtualHandled=!0,Ht=!0)}},Pi=function(){Ht=!1,wn()},zn=function(ei){if(Ht){var Bi=vo(ei,!1),Xi=Pt.getBoundingClientRect(),yr=Xi.top,Jr=Xi.bottom;if(Bi<=yr){var Tt=yr-Bi;nn=-la(Tt),Un()}else if(Bi>=Jr){var Dn=Bi-Jr;nn=la(Dn),Un()}else wn()}};return Pt.addEventListener("mousedown",An),Pt.ownerDocument.addEventListener("mouseup",Pi),Pt.ownerDocument.addEventListener("mousemove",zn),function(){Pt.removeEventListener("mousedown",An),Pt.ownerDocument.removeEventListener("mouseup",Pi),Pt.ownerDocument.removeEventListener("mousemove",zn),wn()}}},[We])}var Ki=10;function No(We,dt,yt,Pt,Ht,Qt,nn,wn){var Un=Be.useRef(),An=Be.useState(null),Pi=(0,Ke.Z)(An,2),zn=Pi[0],di=Pi[1];return Sl(function(){if(zn&&zn.times<Ki){if(!We.current){di(function(Te){return(0,Je.Z)({},Te)});return}Qt();var ei=zn.targetAlign,Bi=zn.originAlign,Xi=zn.index,yr=zn.offset,Jr=We.current.clientHeight,Tt=!1,Dn=ei,ii=null;if(Jr){for(var fi=ei||Bi,Bn=0,Oi=0,Cr=0,pr=Math.min(dt.length-1,Xi),rr=0;rr<=pr;rr+=1){var ua=Ht(dt[rr]);Oi=Bn;var Qr=yt.get(ua);Cr=Oi+(Qr===void 0?Pt:Qr),Bn=Cr}for(var io=fi==="top"?yr:Jr-yr,So=pr;So>=0;So-=1){var Hn=Ht(dt[So]),br=yt.get(Hn);if(br===void 0){Tt=!0;break}if(io-=br,io<=0)break}switch(fi){case"top":ii=Oi-yr;break;case"bottom":ii=Cr-Jr+yr;break;default:{var ho=We.current.scrollTop,ke=ho+Jr;Oi<ho?Dn="top":Cr>ke&&(Dn="bottom")}}ii!==null&&nn(ii),ii!==zn.lastTop&&(Tt=!0)}Tt&&di((0,Je.Z)((0,Je.Z)({},zn),{},{times:zn.times+1,targetAlign:Dn,lastTop:ii}))}},[zn,We.current]),function(ei){if(ei==null){wn();return}if(ys.cancel(Un.current),typeof ei=="number")nn(ei);else if(ei&&(0,rt.Z)(ei)==="object"){var Bi,Xi=ei.align;"index"in ei?Bi=ei.index:Bi=dt.findIndex(function(Tt){return Ht(Tt)===ei.key});var yr=ei.offset,Jr=yr===void 0?0:yr;di({times:0,index:Bi,offset:Jr,originAlign:Xi})}}}var Gi=Be.forwardRef(function(We,dt){var yt=We.prefixCls,Pt=We.rtl,Ht=We.scrollOffset,Qt=We.scrollRange,nn=We.onStartMove,wn=We.onStopMove,Un=We.onScroll,An=We.horizontal,Pi=We.spinSize,zn=We.containerSize,di=We.style,ei=We.thumbStyle,Bi=We.showScrollBar,Xi=Be.useState(!1),yr=(0,Ke.Z)(Xi,2),Jr=yr[0],Tt=yr[1],Dn=Be.useState(null),ii=(0,Ke.Z)(Dn,2),fi=ii[0],Bn=ii[1],Oi=Be.useState(null),Cr=(0,Ke.Z)(Oi,2),pr=Cr[0],rr=Cr[1],ua=!Pt,Qr=Be.useRef(),io=Be.useRef(),So=Be.useState(Bi),Hn=(0,Ke.Z)(So,2),br=Hn[0],ho=Hn[1],ke=Be.useRef(),Te=function(){Bi===!0||Bi===!1||(clearTimeout(ke.current),ho(!0),ke.current=setTimeout(function(){ho(!1)},3e3))},et=Qt-zn||0,at=zn-Pi||0,jt=Be.useMemo(function(){if(Ht===0||et===0)return 0;var mi=Ht/et;return mi*at},[Ht,et,at]),qt=function(ui){ui.stopPropagation(),ui.preventDefault()},gn=Be.useRef({top:jt,dragging:Jr,pageY:fi,startTop:pr});gn.current={top:jt,dragging:Jr,pageY:fi,startTop:pr};var Vn=function(ui){Tt(!0),Bn(vo(ui,An)),rr(gn.current.top),nn(),ui.stopPropagation(),ui.preventDefault()};Be.useEffect(function(){var mi=function(Rr){Rr.preventDefault()},ui=Qr.current,Fi=io.current;return ui.addEventListener("touchstart",mi,{passive:!1}),Fi.addEventListener("touchstart",Vn,{passive:!1}),function(){ui.removeEventListener("touchstart",mi),Fi.removeEventListener("touchstart",Vn)}},[]);var Qn=Be.useRef();Qn.current=et;var Gn=Be.useRef();Gn.current=at,Be.useEffect(function(){if(Jr){var mi,ui=function(Rr){var ao=gn.current,Fr=ao.dragging,jr=ao.pageY,To=ao.startTop;ys.cancel(mi);var bi=Qr.current.getBoundingClientRect(),Kr=zn/(An?bi.width:bi.height);if(Fr){var or=(vo(Rr,An)-jr)*Kr,Zr=To;!ua&&An?Zr-=or:Zr+=or;var xo=Qn.current,nr=Gn.current,jo=nr?Zr/nr:0,co=Math.ceil(jo*xo);co=Math.max(co,0),co=Math.min(co,xo),mi=ys(function(){Un(co,An)})}},Fi=function(){Tt(!1),wn()};return window.addEventListener("mousemove",ui,{passive:!0}),window.addEventListener("touchmove",ui,{passive:!0}),window.addEventListener("mouseup",Fi,{passive:!0}),window.addEventListener("touchend",Fi,{passive:!0}),function(){window.removeEventListener("mousemove",ui),window.removeEventListener("touchmove",ui),window.removeEventListener("mouseup",Fi),window.removeEventListener("touchend",Fi),ys.cancel(mi)}}},[Jr]),Be.useEffect(function(){return Te(),function(){clearTimeout(ke.current)}},[Ht]),Be.useImperativeHandle(dt,function(){return{delayHidden:Te}});var gi="".concat(yt,"-scrollbar"),yi={position:"absolute",visibility:br?null:"hidden"},_i={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return An?(yi.height=8,yi.left=0,yi.right=0,yi.bottom=0,_i.height="100%",_i.width=Pi,ua?_i.left=jt:_i.right=jt):(yi.width=8,yi.top=0,yi.bottom=0,ua?yi.right=0:yi.left=0,_i.width="100%",_i.height=Pi,_i.top=jt),Be.createElement("div",{ref:Qr,className:Lt()(gi,(0,bt.Z)((0,bt.Z)((0,bt.Z)({},"".concat(gi,"-horizontal"),An),"".concat(gi,"-vertical"),!An),"".concat(gi,"-visible"),br)),style:(0,Je.Z)((0,Je.Z)({},yi),di),onMouseDown:qt,onMouseMove:Te},Be.createElement("div",{ref:io,className:Lt()("".concat(gi,"-thumb"),(0,bt.Z)({},"".concat(gi,"-thumb-moving"),Jr)),style:(0,Je.Z)((0,Je.Z)({},_i),ei),onMouseDown:Vn}))}),ur=Gi,Qi=20;function eo(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,dt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,yt=We/dt*We;return isNaN(yt)&&(yt=0),yt=Math.max(yt,Qi),Math.floor(yt)}var Or=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Yr=[],Eo={overflowY:"auto",overflowAnchor:"none"};function Vi(We,dt){var yt=We.prefixCls,Pt=yt===void 0?"rc-virtual-list":yt,Ht=We.className,Qt=We.height,nn=We.itemHeight,wn=We.fullHeight,Un=wn===void 0?!0:wn,An=We.style,Pi=We.data,zn=We.children,di=We.itemKey,ei=We.virtual,Bi=We.direction,Xi=We.scrollWidth,yr=We.component,Jr=yr===void 0?"div":yr,Tt=We.onScroll,Dn=We.onVirtualScroll,ii=We.onVisibleChange,fi=We.innerProps,Bn=We.extraRender,Oi=We.styles,Cr=We.showScrollBar,pr=Cr===void 0?"optional":Cr,rr=(0,mo.Z)(We,Or),ua=Be.useCallback(function(lo){return typeof di=="function"?di(lo):lo==null?void 0:lo[di]},[di]),Qr=ko(ua,null,null),io=(0,Ke.Z)(Qr,4),So=io[0],Hn=io[1],br=io[2],ho=io[3],ke=!!(ei!==!1&&Qt&&nn),Te=Be.useMemo(function(){return Object.values(br.maps).reduce(function(lo,zr){return lo+zr},0)},[br.id,br.maps]),et=ke&&Pi&&(Math.max(nn*Pi.length,Te)>Qt||!!Xi),at=Bi==="rtl",jt=Lt()(Pt,(0,bt.Z)({},"".concat(Pt,"-rtl"),at),Ht),qt=Pi||Yr,gn=(0,Be.useRef)(),Vn=(0,Be.useRef)(),Qn=(0,Be.useRef)(),Gn=(0,Be.useState)(0),gi=(0,Ke.Z)(Gn,2),yi=gi[0],_i=gi[1],mi=(0,Be.useState)(0),ui=(0,Ke.Z)(mi,2),Fi=ui[0],ji=ui[1],Rr=(0,Be.useState)(!1),ao=(0,Ke.Z)(Rr,2),Fr=ao[0],jr=ao[1],To=function(){jr(!0)},bi=function(){jr(!1)},Kr={getKey:ua};function or(lo){_i(function(zr){var to;typeof lo=="function"?to=lo(zr):to=lo;var va=as(to);return gn.current.scrollTop=va,va})}var Zr=(0,Be.useRef)({start:0,end:qt.length}),xo=(0,Be.useRef)(),nr=cc(qt,ua),jo=(0,Ke.Z)(nr,1),co=jo[0];xo.current=co;var oa=Be.useMemo(function(){if(!ke)return{scrollHeight:void 0,start:0,end:qt.length-1,offset:void 0};if(!et){var lo;return{scrollHeight:((lo=Vn.current)===null||lo===void 0?void 0:lo.offsetHeight)||0,start:0,end:qt.length-1,offset:void 0}}for(var zr=0,to,va,Es,Zs=qt.length,Al=0;Al<Zs;Al+=1){var kt=qt[Al],Hl=ua(kt),$s=br.get(Hl),Ql=zr+($s===void 0?nn:$s);Ql>=yi&&to===void 0&&(to=Al,va=zr),Ql>yi+Qt&&Es===void 0&&(Es=Al),zr=Ql}return to===void 0&&(to=0,va=0,Es=Math.ceil(Qt/nn)),Es===void 0&&(Es=qt.length-1),Es=Math.min(Es+1,qt.length-1),{scrollHeight:zr,start:to,end:Es,offset:va}},[et,ke,yi,qt,ho,Qt]),ro=oa.scrollHeight,Uo=oa.start,fa=oa.end,Ea=oa.offset;Zr.current.start=Uo,Zr.current.end=fa,Be.useLayoutEffect(function(){var lo=br.getRecord();if(lo.size===1){var zr=Array.from(lo)[0],to=qt[Uo];if(to){var va=ua(to);if(va===zr){var Es=br.get(zr),Zs=Es-nn;or(function(Al){return Al+Zs})}}}br.resetRecord()},[ro]);var ga=Be.useState({width:0,height:Qt}),_r=(0,Ke.Z)(ga,2),Co=_r[0],Ma=_r[1],pa=function(zr){Ma({width:zr.offsetWidth,height:zr.offsetHeight})},Da=(0,Be.useRef)(),ka=(0,Be.useRef)(),Xa=Be.useMemo(function(){return eo(Co.width,Xi)},[Co.width,Xi]),Oa=Be.useMemo(function(){return eo(Co.height,ro)},[Co.height,ro]),es=ro-Qt,Hs=(0,Be.useRef)(es);Hs.current=es;function as(lo){var zr=lo;return Number.isNaN(Hs.current)||(zr=Math.min(zr,Hs.current)),zr=Math.max(zr,0),zr}var wo=yi<=0,yo=yi>=es,fo=Fi<=0,ar=Fi>=Xi,mr=dc(wo,yo,fo,ar),so=function(){return{x:at?-Fi:Fi,y:yi}},Jo=(0,Be.useRef)(so()),ha=Ua(function(lo){if(Dn){var zr=(0,Je.Z)((0,Je.Z)({},so()),lo);(Jo.current.x!==zr.x||Jo.current.y!==zr.y)&&(Dn(zr),Jo.current=zr)}});function Yo(lo,zr){var to=lo;zr?((0,He.flushSync)(function(){ji(to)}),ha()):or(to)}function ss(lo){var zr=lo.currentTarget.scrollTop;zr!==yi&&or(zr),Tt==null||Tt(lo),ha()}var ks=function(zr){var to=zr,va=Xi?Xi-Co.width:0;return to=Math.max(to,0),to=Math.min(to,va),to},Za=Ua(function(lo,zr){zr?((0,He.flushSync)(function(){ji(function(to){var va=to+(at?-lo:lo);return ks(va)})}),ha()):or(function(to){var va=to+lo;return va})}),Ks=Fc(ke,wo,yo,fo,ar,!!Xi,Za),ns=(0,Ke.Z)(Ks,2),fs=ns[0],ps=ns[1];Ir(ke,gn,function(lo,zr,to,va){var Es=va;return mr(lo,zr,to)?!1:!Es||!Es._virtualHandled?(Es&&(Es._virtualHandled=!0),fs({preventDefault:function(){},deltaX:lo?zr:0,deltaY:lo?0:zr}),!0):!1}),qr(et,gn,function(lo){or(function(zr){return zr+lo})}),Sl(function(){function lo(to){var va=wo&&to.detail<0,Es=yo&&to.detail>0;ke&&!va&&!Es&&to.preventDefault()}var zr=gn.current;return zr.addEventListener("wheel",fs,{passive:!1}),zr.addEventListener("DOMMouseScroll",ps,{passive:!0}),zr.addEventListener("MozMousePixelScroll",lo,{passive:!1}),function(){zr.removeEventListener("wheel",fs),zr.removeEventListener("DOMMouseScroll",ps),zr.removeEventListener("MozMousePixelScroll",lo)}},[ke,wo,yo]),Sl(function(){if(Xi){var lo=ks(Fi);ji(lo),ha({x:lo})}},[Co.width,Xi]);var rl=function(){var zr,to;(zr=Da.current)===null||zr===void 0||zr.delayHidden(),(to=ka.current)===null||to===void 0||to.delayHidden()},ws=No(gn,qt,br,nn,ua,function(){return Hn(!0)},or,rl);Be.useImperativeHandle(dt,function(){return{nativeElement:Qn.current,getScrollInfo:so,scrollTo:function(zr){function to(va){return va&&(0,rt.Z)(va)==="object"&&("left"in va||"top"in va)}to(zr)?(zr.left!==void 0&&ji(ks(zr.left)),ws(zr.top)):ws(zr)}}}),Sl(function(){if(ii){var lo=qt.slice(Uo,fa+1);ii(lo,qt)}},[Uo,fa,qt]);var Ps=ct(qt,ua,br,nn),ts=Bn==null?void 0:Bn({start:Uo,end:fa,virtual:et,offsetX:Fi,offsetY:Ea,rtl:at,getSize:Ps}),ms=Fs(qt,Uo,fa,Xi,Fi,So,zn,Kr),xl=null;Qt&&(xl=(0,Je.Z)((0,bt.Z)({},Un?"height":"maxHeight",Qt),Eo),ke&&(xl.overflowY="hidden",Xi&&(xl.overflowX="hidden"),Fr&&(xl.pointerEvents="none")));var Cl={};return at&&(Cl.dir="rtl"),Be.createElement("div",(0,st.Z)({ref:Qn,style:(0,Je.Z)((0,Je.Z)({},An),{},{position:"relative"}),className:jt},Cl,rr),Be.createElement(we.Z,{onResize:pa},Be.createElement(Jr,{className:"".concat(Pt,"-holder"),style:xl,ref:gn,onScroll:ss,onMouseEnter:rl},Be.createElement(Uh,{prefixCls:Pt,height:ro,offsetX:Fi,offsetY:Ea,scrollWidth:Xi,onInnerResize:Hn,ref:Vn,innerProps:fi,rtl:at,extra:ts},ms))),et&&ro>Qt&&Be.createElement(ur,{ref:Da,prefixCls:Pt,scrollOffset:yi,scrollRange:ro,rtl:at,onScroll:Yo,onStartMove:To,onStopMove:bi,spinSize:Oa,containerSize:Co.height,style:Oi==null?void 0:Oi.verticalScrollBar,thumbStyle:Oi==null?void 0:Oi.verticalScrollBarThumb,showScrollBar:pr}),et&&Xi>Co.width&&Be.createElement(ur,{ref:ka,prefixCls:Pt,scrollOffset:Fi,scrollRange:Xi,rtl:at,onScroll:Yo,onStartMove:To,onStopMove:bi,spinSize:Xa,containerSize:Co.width,horizontal:!0,style:Oi==null?void 0:Oi.horizontalScrollBar,thumbStyle:Oi==null?void 0:Oi.horizontalScrollBarThumb,showScrollBar:pr}))}var Hr=Be.forwardRef(Vi);Hr.displayName="List";var xi=Hr,tr=xi,Er=gt(null),Ao=gt(null);function Ho(We,dt,yt){var Pt=dt||1;return yt[We+Pt]-(yt[We]||0)}function Pa(We){var dt=We.rowInfo,yt=We.column,Pt=We.colIndex,Ht=We.indent,Qt=We.index,nn=We.component,wn=We.renderIndex,Un=We.record,An=We.style,Pi=We.className,zn=We.inverse,di=We.getHeight,ei=yt.render,Bi=yt.dataIndex,Xi=yt.className,yr=yt.width,Jr=it(Ao,["columnsOffset"]),Tt=Jr.columnsOffset,Dn=Wt(dt,yt,Pt,Ht,Qt),ii=Dn.key,fi=Dn.fixedInfo,Bn=Dn.appendCellNode,Oi=Dn.additionalCellProps,Cr=Oi.style,pr=Oi.colSpan,rr=pr===void 0?1:pr,ua=Oi.rowSpan,Qr=ua===void 0?1:ua,io=Pt-1,So=Ho(io,rr,Tt),Hn=rr>1?yr-So:0,br=(0,Je.Z)((0,Je.Z)((0,Je.Z)({},Cr),An),{},{flex:"0 0 ".concat(So,"px"),width:"".concat(So,"px"),marginRight:Hn,pointerEvents:"auto"}),ho=Be.useMemo(function(){return zn?Qr<=1:rr===0||Qr===0||Qr>1},[Qr,rr,zn]);ho?br.visibility="hidden":zn&&(br.height=di==null?void 0:di(Qr));var ke=ho?function(){return null}:ei,Te={};return(Qr===0||rr===0)&&(Te.rowSpan=1,Te.colSpan=1),Be.createElement(Rn,(0,st.Z)({className:Lt()(Xi,Pi),ellipsis:yt.ellipsis,align:yt.align,scope:yt.rowScope,component:nn,prefixCls:dt.prefixCls,key:ii,record:Un,index:Qt,renderIndex:wn,dataIndex:Bi,render:ke,shouldCellUpdate:yt.shouldCellUpdate},fi,{appendNode:Bn,additionalProps:(0,Je.Z)((0,Je.Z)({},Oi),{},{style:br},Te)}))}var qi=Pa,Vs=["data","index","className","rowKey","style","extra","getHeight"],kr=Be.forwardRef(function(We,dt){var yt=We.data,Pt=We.index,Ht=We.className,Qt=We.rowKey,nn=We.style,wn=We.extra,Un=We.getHeight,An=(0,mo.Z)(We,Vs),Pi=yt.record,zn=yt.indent,di=yt.index,ei=it(Pe,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Bi=ei.scrollX,Xi=ei.flattenColumns,yr=ei.prefixCls,Jr=ei.fixColumn,Tt=ei.componentWidth,Dn=it(Er,["getComponent"]),ii=Dn.getComponent,fi=ra(Pi,Qt,Pt,zn),Bn=ii(["body","row"],"div"),Oi=ii(["body","cell"],"div"),Cr=fi.rowSupportExpand,pr=fi.expanded,rr=fi.rowProps,ua=fi.expandedRowRender,Qr=fi.expandedRowClassName,io;if(Cr&&pr){var So=ua(Pi,Pt,zn+1,pr),Hn=$a(Qr,Pi,Pt,zn),br={};Jr&&(br={style:(0,bt.Z)({},"--virtual-width","".concat(Tt,"px"))});var ho="".concat(yr,"-expanded-row-cell");io=Be.createElement(Bn,{className:Lt()("".concat(yr,"-expanded-row"),"".concat(yr,"-expanded-row-level-").concat(zn+1),Hn)},Be.createElement(Rn,{component:Oi,prefixCls:yr,className:Lt()(ho,(0,bt.Z)({},"".concat(ho,"-fixed"),Jr)),additionalProps:br},So))}var ke=(0,Je.Z)((0,Je.Z)({},nn),{},{width:Bi});wn&&(ke.position="absolute",ke.pointerEvents="none");var Te=Be.createElement(Bn,(0,st.Z)({},rr,An,{"data-row-key":Qt,ref:Cr?null:dt,className:Lt()(Ht,"".concat(yr,"-row"),rr==null?void 0:rr.className,(0,bt.Z)({},"".concat(yr,"-row-extra"),wn)),style:(0,Je.Z)((0,Je.Z)({},ke),rr==null?void 0:rr.style)}),Xi.map(function(et,at){return Be.createElement(qi,{key:at,component:Oi,rowInfo:fi,column:et,colIndex:at,indent:zn,index:Pt,renderIndex:di,record:Pi,inverse:wn,getHeight:Un})}));return Cr?Be.createElement("div",{ref:dt},Te,io):Te}),Ro=pe(kr),Xr=Ro,ds=Be.forwardRef(function(We,dt){var yt=We.data,Pt=We.onScroll,Ht=it(Pe,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Qt=Ht.flattenColumns,nn=Ht.onColumnResize,wn=Ht.getRowKey,Un=Ht.expandedKeys,An=Ht.prefixCls,Pi=Ht.childrenColumnName,zn=Ht.scrollX,di=Ht.direction,ei=it(Er),Bi=ei.sticky,Xi=ei.scrollY,yr=ei.listItemHeight,Jr=ei.getComponent,Tt=ei.onScroll,Dn=Be.useRef(),ii=Mo(yt,Pi,Un,wn),fi=Be.useMemo(function(){var io=0;return Qt.map(function(So){var Hn=So.width,br=So.key;return io+=Hn,[br,Hn,io]})},[Qt]),Bn=Be.useMemo(function(){return fi.map(function(io){return io[2]})},[fi]);Be.useEffect(function(){fi.forEach(function(io){var So=(0,Ke.Z)(io,2),Hn=So[0],br=So[1];nn(Hn,br)})},[fi]),Be.useImperativeHandle(dt,function(){var io,So={scrollTo:function(br){var ho;(ho=Dn.current)===null||ho===void 0||ho.scrollTo(br)},nativeElement:(io=Dn.current)===null||io===void 0?void 0:io.nativeElement};return Object.defineProperty(So,"scrollLeft",{get:function(){var br;return((br=Dn.current)===null||br===void 0?void 0:br.getScrollInfo().x)||0},set:function(br){var ho;(ho=Dn.current)===null||ho===void 0||ho.scrollTo({left:br})}}),So});var Oi=function(So,Hn){var br,ho=(br=ii[Hn])===null||br===void 0?void 0:br.record,ke=So.onCell;if(ke){var Te,et=ke(ho,Hn);return(Te=et==null?void 0:et.rowSpan)!==null&&Te!==void 0?Te:1}return 1},Cr=function(So){var Hn=So.start,br=So.end,ho=So.getSize,ke=So.offsetY;if(br<0)return null;for(var Te=Qt.filter(function(mi){return Oi(mi,Hn)===0}),et=Hn,at=function(ui){if(Te=Te.filter(function(Fi){return Oi(Fi,ui)===0}),!Te.length)return et=ui,1},jt=Hn;jt>=0&&!at(jt);jt-=1);for(var qt=Qt.filter(function(mi){return Oi(mi,br)!==1}),gn=br,Vn=function(ui){if(qt=qt.filter(function(Fi){return Oi(Fi,ui)!==1}),!qt.length)return gn=Math.max(ui-1,br),1},Qn=br;Qn<ii.length&&!Vn(Qn);Qn+=1);for(var Gn=[],gi=function(ui){var Fi=ii[ui];if(!Fi)return 1;Qt.some(function(ji){return Oi(ji,ui)>1})&&Gn.push(ui)},yi=et;yi<=gn;yi+=1)gi(yi);var _i=Gn.map(function(mi){var ui=ii[mi],Fi=wn(ui.record,mi),ji=function(Fr){var jr=mi+Fr-1,To=wn(ii[jr].record,jr),bi=ho(Fi,To);return bi.bottom-bi.top},Rr=ho(Fi);return Be.createElement(Xr,{key:mi,data:ui,rowKey:Fi,index:mi,style:{top:-ke+Rr.top},extra:!0,getHeight:ji})});return _i},pr=Be.useMemo(function(){return{columnsOffset:Bn}},[Bn]),rr="".concat(An,"-tbody"),ua=Jr(["body","wrapper"]),Qr={};return Bi&&(Qr.position="sticky",Qr.bottom=0,(0,rt.Z)(Bi)==="object"&&Bi.offsetScroll&&(Qr.bottom=Bi.offsetScroll)),Be.createElement(Ao.Provider,{value:pr},Be.createElement(tr,{fullHeight:!1,ref:Dn,prefixCls:"".concat(rr,"-virtual"),styles:{horizontalScrollBar:Qr},className:rr,height:Xi,itemHeight:yr||24,data:ii,itemKey:function(So){return wn(So.record)},component:ua,scrollWidth:zn,direction:di,onVirtualScroll:function(So){var Hn,br=So.x;Pt({currentTarget:(Hn=Dn.current)===null||Hn===void 0?void 0:Hn.nativeElement,scrollLeft:br})},onScroll:Tt,extraRender:Cr},function(io,So,Hn){var br=wn(io.record,So);return Be.createElement(Xr,{data:io,rowKey:br,index:So,style:Hn.style})}))}),Fa=pe(ds),Gs=Fa,Xu=function(dt,yt){var Pt=yt.ref,Ht=yt.onScroll;return Be.createElement(Gs,{ref:Pt,data:dt,onScroll:Ht})};function Ah(We,dt){var yt=We.data,Pt=We.columns,Ht=We.scroll,Qt=We.sticky,nn=We.prefixCls,wn=nn===void 0?wu:nn,Un=We.className,An=We.listItemHeight,Pi=We.components,zn=We.onScroll,di=Ht||{},ei=di.x,Bi=di.y;typeof ei!="number"&&(ei=1),typeof Bi!="number"&&(Bi=500);var Xi=mt(function(Tt,Dn){return vn(Pi,Tt)||Dn}),yr=mt(zn),Jr=Be.useMemo(function(){return{sticky:Qt,scrollY:Bi,listItemHeight:An,getComponent:Xi,onScroll:yr}},[Qt,Bi,An,Xi,yr]);return Be.createElement(Er.Provider,{value:Jr},Be.createElement(ia,(0,st.Z)({},We,{className:Lt()(Un,"".concat(wn,"-virtual")),scroll:(0,Je.Z)((0,Je.Z)({},Ht),{},{x:ei}),components:(0,Je.Z)((0,Je.Z)({},Pi),{},{body:yt!=null&&yt.length?Xu:void 0}),columns:Pt,internalHooks:fe.R,tailor:!0,ref:dt})))}var Cu=Be.forwardRef(Ah);function ju(We){return se(Cu,We)}var gr=ju(),cl=null},62978:function(Cn,On,Me){"use strict";Me.d(On,{g:function(){return Be},v:function(){return ft}});var fe=Me(1413),Ke=Me(45987),St=Me(40830),zt=["expandable"],ft="RC_TABLE_INTERNAL_COL_DEFINE";function Be(He){var gt=He.expandable,it=(0,Ke.Z)(He,zt),st;return"expandable"in He?st=(0,fe.Z)((0,fe.Z)({},it),gt):st=it,st.showExpandColumn===!1&&(st.expandIconColumnIndex=-1),st}},63295:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return ft}});var fe=Me(71002),Ke=Symbol.for("react.element"),St=Symbol.for("react.transitional.element"),zt=Symbol.for("react.fragment");function ft(Be){return Be&&(0,fe.Z)(Be)==="object"&&(Be.$$typeof===Ke||Be.$$typeof===St)&&Be.type===zt}},40830:function(Cn,On,Me){"use strict";var fe={},Ke=[],St=function(Ft){Ke.push(Ft)};function zt(st,Ft){if(0)var Nt}function ft(st,Ft){if(0)var Nt}function Be(){fe={}}function He(st,Ft,Nt){!Ft&&!fe[Nt]&&(st(!1,Nt),fe[Nt]=!0)}function gt(st,Ft){He(zt,st,Ft)}function it(st,Ft){He(ft,st,Ft)}gt.preMessage=St,gt.resetWarned=Be,gt.noteOnce=it,On.ZP=gt},46762:function(Cn,On){"use strict";var Me;var fe=Symbol.for("react.element"),Ke=Symbol.for("react.portal"),St=Symbol.for("react.fragment"),zt=Symbol.for("react.strict_mode"),ft=Symbol.for("react.profiler"),Be=Symbol.for("react.provider"),He=Symbol.for("react.context"),gt=Symbol.for("react.server_context"),it=Symbol.for("react.forward_ref"),st=Symbol.for("react.suspense"),Ft=Symbol.for("react.suspense_list"),Nt=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Ae=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ue){if(typeof ue=="object"&&ue!==null){var se=ue.$$typeof;switch(se){case fe:switch(ue=ue.type,ue){case St:case ft:case zt:case st:case Ft:return ue;default:switch(ue=ue&&ue.$$typeof,ue){case gt:case He:case it:case Bt:case Nt:case Be:return ue;default:return se}}case Ke:return se}}}Me=He,Me=Be,Me=fe,Me=it,Me=St,Me=Bt,Me=Nt,Me=Ke,Me=ft,Me=zt,Me=st,Me=Ft,Me=function(){return!1},Me=function(){return!1},Me=function(ue){return te(ue)===He},Me=function(ue){return te(ue)===Be},Me=function(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===fe},Me=function(ue){return te(ue)===it},Me=function(ue){return te(ue)===St},Me=function(ue){return te(ue)===Bt},Me=function(ue){return te(ue)===Nt},Me=function(ue){return te(ue)===Ke},Me=function(ue){return te(ue)===ft},Me=function(ue){return te(ue)===zt},Me=function(ue){return te(ue)===st},Me=function(ue){return te(ue)===Ft},Me=function(ue){return typeof ue=="string"||typeof ue=="function"||ue===St||ue===ft||ue===zt||ue===st||ue===Ft||ue===Ae||typeof ue=="object"&&ue!==null&&(ue.$$typeof===Bt||ue.$$typeof===Nt||ue.$$typeof===Be||ue.$$typeof===He||ue.$$typeof===it||ue.$$typeof===ne||ue.getModuleId!==void 0)},Me=te},35110:function(Cn,On,Me){"use strict";Me(46762)},86128:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return ve}});var fe=Me(87462),Ke=Me(4942),St=Me(1413),zt=Me(97685),ft=Me(45987),Be=Me(67294),He=Me(94184),gt=Me.n(He),it=Me(64217),st=Me(27822),Ft=function(Pe){for(var Oe=Pe.prefixCls,Re=Pe.level,tt=Pe.isStart,rt=Pe.isEnd,Je="".concat(Oe,"-indent-unit"),bt=[],lt=0;lt<Re;lt+=1)bt.push(Be.createElement("span",{key:lt,className:gt()(Je,(0,Ke.Z)((0,Ke.Z)({},"".concat(Je,"-start"),tt[lt]),"".concat(Je,"-end"),rt[lt]))}));return Be.createElement("span",{"aria-hidden":"true",className:"".concat(Oe,"-indent")},bt)},Nt=Be.memo(Ft),Bt=Me(35381),Ae=Me(1089),ne=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],te="open",ue="close",se="---",pe=function(Pe){var Oe,Re,tt,rt=Pe.eventKey,Je=Pe.className,bt=Pe.style,lt=Pe.dragOver,Lt=Pe.dragOverGapTop,Mt=Pe.dragOverGapBottom,pt=Pe.isLeaf,dn=Pe.isStart,tn=Pe.isEnd,vn=Pe.expanded,Tn=Pe.selected,Ve=Pe.checked,Ze=Pe.halfChecked,Qe=Pe.loading,mn=Pe.domRef,kn=Pe.active,At=Pe.data,pn=Pe.onMouseMove,ln=Pe.selectable,jn=(0,ft.Z)(Pe,ne),Gt=Be.useContext(st.k),mt=Be.useContext(st.y),Et=Be.useRef(null),on=Be.useState(!1),Yt=(0,zt.Z)(on,2),ze=Yt[0],be=Yt[1],Ce=!!(Gt.disabled||Pe.disabled||(Oe=mt.nodeDisabled)!==null&&Oe!==void 0&&Oe.call(mt,At)),De=Be.useMemo(function(){return!Gt.checkable||Pe.checkable===!1?!1:Gt.checkable},[Gt.checkable,Pe.checkable]),Ge=function(en){Ce||Gt.onNodeSelect(en,(0,Ae.F)(Pe))},Fe=function(en){Ce||!De||Pe.disableCheckbox||Gt.onNodeCheck(en,(0,Ae.F)(Pe),!Ve)},qe=Be.useMemo(function(){return typeof ln=="boolean"?ln:Gt.selectable},[ln,Gt.selectable]),rn=function(en){Gt.onNodeClick(en,(0,Ae.F)(Pe)),qe?Ge(en):Fe(en)},Kn=function(en){Gt.onNodeDoubleClick(en,(0,Ae.F)(Pe))},Zn=function(en){Gt.onNodeMouseEnter(en,(0,Ae.F)(Pe))},$t=function(en){Gt.onNodeMouseLeave(en,(0,Ae.F)(Pe))},Nn=function(en){Gt.onNodeContextMenu(en,(0,Ae.F)(Pe))},Zt=Be.useMemo(function(){return!!(Gt.draggable&&(!Gt.draggable.nodeDraggable||Gt.draggable.nodeDraggable(At)))},[Gt.draggable,At]),qn=function(en){en.stopPropagation(),be(!0),Gt.onNodeDragStart(en,Pe);try{en.dataTransfer.setData("text/plain","")}catch(cn){}},$n=function(en){en.preventDefault(),en.stopPropagation(),Gt.onNodeDragEnter(en,Pe)},oi=function(en){en.preventDefault(),en.stopPropagation(),Gt.onNodeDragOver(en,Pe)},ri=function(en){en.stopPropagation(),Gt.onNodeDragLeave(en,Pe)},fr=function(en){en.stopPropagation(),be(!1),Gt.onNodeDragEnd(en,Pe)},wr=function(en){en.preventDefault(),en.stopPropagation(),be(!1),Gt.onNodeDrop(en,Pe)},Li=function(en){Qe||Gt.onNodeExpand(en,(0,Ae.F)(Pe))},Ai=Be.useMemo(function(){var Ut=(0,Bt.Z)(Gt.keyEntities,rt)||{},en=Ut.children;return!!(en||[]).length},[Gt.keyEntities,rt]),Ur=Be.useMemo(function(){return pt===!1?!1:pt||!Gt.loadData&&!Ai||Gt.loadData&&Pe.loaded&&!Ai},[pt,Gt.loadData,Ai,Pe.loaded]);Be.useEffect(function(){Qe||typeof Gt.loadData=="function"&&vn&&!Ur&&!Pe.loaded&&Gt.onNodeLoad((0,Ae.F)(Pe))},[Qe,Gt.loadData,Gt.onNodeLoad,vn,Ur,Pe]);var Yn=Be.useMemo(function(){var Ut;return(Ut=Gt.draggable)!==null&&Ut!==void 0&&Ut.icon?Be.createElement("span",{className:"".concat(Gt.prefixCls,"-draggable-icon")},Gt.draggable.icon):null},[Gt.draggable]),Rn=function(en){var cn=Pe.switcherIcon||Gt.switcherIcon;return typeof cn=="function"?cn((0,St.Z)((0,St.Z)({},Pe),{},{isLeaf:en})):cn},sr=function(){if(Ur){var en=Rn(!0);return en!==!1?Be.createElement("span",{className:gt()("".concat(Gt.prefixCls,"-switcher"),"".concat(Gt.prefixCls,"-switcher-noop"))},en):null}var cn=Rn(!1);return cn!==!1?Be.createElement("span",{onClick:Li,className:gt()("".concat(Gt.prefixCls,"-switcher"),"".concat(Gt.prefixCls,"-switcher_").concat(vn?te:ue))},cn):null},xr=Be.useMemo(function(){if(!De)return null;var Ut=typeof De!="boolean"?De:null;return Be.createElement("span",{className:gt()("".concat(Gt.prefixCls,"-checkbox"),(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)({},"".concat(Gt.prefixCls,"-checkbox-checked"),Ve),"".concat(Gt.prefixCls,"-checkbox-indeterminate"),!Ve&&Ze),"".concat(Gt.prefixCls,"-checkbox-disabled"),Ce||Pe.disableCheckbox)),onClick:Fe,role:"checkbox","aria-checked":Ze?"mixed":Ve,"aria-disabled":Ce||Pe.disableCheckbox,"aria-label":"Select ".concat(typeof Pe.title=="string"?Pe.title:"tree node")},Ut)},[De,Ve,Ze,Ce,Pe.disableCheckbox,Pe.title]),Ni=Be.useMemo(function(){return Ur?null:vn?te:ue},[Ur,vn]),lr=Be.useMemo(function(){return Be.createElement("span",{className:gt()("".concat(Gt.prefixCls,"-iconEle"),"".concat(Gt.prefixCls,"-icon__").concat(Ni||"docu"),(0,Ke.Z)({},"".concat(Gt.prefixCls,"-icon_loading"),Qe))})},[Gt.prefixCls,Ni,Qe]),mo=Be.useMemo(function(){var Ut=!!Gt.draggable,en=!Pe.disabled&&Ut&&Gt.dragOverNodeKey===rt;return en?Gt.dropIndicatorRender({dropPosition:Gt.dropPosition,dropLevelOffset:Gt.dropLevelOffset,indent:Gt.indent,prefixCls:Gt.prefixCls,direction:Gt.direction}):null},[Gt.dropPosition,Gt.dropLevelOffset,Gt.indent,Gt.prefixCls,Gt.direction,Gt.draggable,Gt.dragOverNodeKey,Gt.dropIndicatorRender]),pi=Be.useMemo(function(){var Ut=Pe.title,en=Ut===void 0?se:Ut,cn="".concat(Gt.prefixCls,"-node-content-wrapper"),xn;if(Gt.showIcon){var In=Pe.icon||Gt.icon;xn=In?Be.createElement("span",{className:gt()("".concat(Gt.prefixCls,"-iconEle"),"".concat(Gt.prefixCls,"-icon__customize"))},typeof In=="function"?In(Pe):In):lr}else Gt.loadData&&Qe&&(xn=lr);var ni;return typeof en=="function"?ni=en(At):Gt.titleRender?ni=Gt.titleRender(At):ni=en,Be.createElement("span",{ref:Et,title:typeof en=="string"?en:"",className:gt()(cn,"".concat(cn,"-").concat(Ni||"normal"),(0,Ke.Z)({},"".concat(Gt.prefixCls,"-node-selected"),!Ce&&(Tn||ze))),onMouseEnter:Zn,onMouseLeave:$t,onContextMenu:Nn,onClick:rn,onDoubleClick:Kn},xn,Be.createElement("span",{className:"".concat(Gt.prefixCls,"-title")},ni),mo)},[Gt.prefixCls,Gt.showIcon,Pe,Gt.icon,lr,Gt.titleRender,At,Ni,Zn,$t,Nn,rn,Kn]),ti=(0,it.Z)(jn,{aria:!0,data:!0}),hi=(0,Bt.Z)(Gt.keyEntities,rt)||{},Ii=hi.level,ir=tn[tn.length-1],zi=!Ce&&Zt,an=Gt.draggingNodeKey===rt,we=ln!==void 0?{"aria-selected":!!ln}:void 0;return Be.createElement("div",(0,fe.Z)({ref:mn,role:"treeitem","aria-expanded":pt?void 0:vn,className:gt()(Je,"".concat(Gt.prefixCls,"-treenode"),(tt={},(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)(tt,"".concat(Gt.prefixCls,"-treenode-disabled"),Ce),"".concat(Gt.prefixCls,"-treenode-switcher-").concat(vn?"open":"close"),!pt),"".concat(Gt.prefixCls,"-treenode-checkbox-checked"),Ve),"".concat(Gt.prefixCls,"-treenode-checkbox-indeterminate"),Ze),"".concat(Gt.prefixCls,"-treenode-selected"),Tn),"".concat(Gt.prefixCls,"-treenode-loading"),Qe),"".concat(Gt.prefixCls,"-treenode-active"),kn),"".concat(Gt.prefixCls,"-treenode-leaf-last"),ir),"".concat(Gt.prefixCls,"-treenode-draggable"),Zt),"dragging",an),(0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)((0,Ke.Z)(tt,"drop-target",Gt.dropTargetKey===rt),"drop-container",Gt.dropContainerKey===rt),"drag-over",!Ce&<),"drag-over-gap-top",!Ce&&Lt),"drag-over-gap-bottom",!Ce&&Mt),"filter-node",(Re=Gt.filterTreeNode)===null||Re===void 0?void 0:Re.call(Gt,(0,Ae.F)(Pe))),"".concat(Gt.prefixCls,"-treenode-leaf"),Ur))),style:bt,draggable:zi,onDragStart:zi?qn:void 0,onDragEnter:Zt?$n:void 0,onDragOver:Zt?oi:void 0,onDragLeave:Zt?ri:void 0,onDrop:Zt?wr:void 0,onDragEnd:Zt?fr:void 0,onMouseMove:pn},we,ti),Be.createElement(Nt,{prefixCls:Gt.prefixCls,level:Ii,isStart:dn,isEnd:tn}),Yn,sr(),xr,pi)};pe.isTreeNode=1;var ve=pe},27822:function(Cn,On,Me){"use strict";Me.d(On,{k:function(){return Ke},y:function(){return St}});var fe=Me(67294),Ke=fe.createContext(null),St=fe.createContext({})},70593:function(Cn,On,Me){"use strict";Me.d(On,{OF:function(){return rt.Z},y6:function(){return ue.y},ZP:function(){return Ce}});var fe=Me(87462),Ke=Me(71002),St=Me(1413),zt=Me(74902),ft=Me(15671),Be=Me(43144),He=Me(97326),gt=Me(60136),it=Me(29388),st=Me(4942),Ft=Me(94184),Nt=Me.n(Ft),Bt=Me(15105),Ae=Me(64217),ne=Me(80334),te=Me(67294),ue=Me(27822),se=function(Ge){var Fe=Ge.dropPosition,qe=Ge.dropLevelOffset,rn=Ge.indent,Kn={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Fe){case-1:Kn.top=0,Kn.left=-qe*rn;break;case 1:Kn.bottom=0,Kn.left=-qe*rn;break;case 0:Kn.bottom=0,Kn.left=rn;break}return te.createElement("div",{style:Kn})},pe=se;function ve(De){if(De==null)throw new TypeError("Cannot destructure "+De)}var Se=Me(97685),Pe=Me(45987),Oe=Me(8410),Re=Me(73299),tt=Me(62874),rt=Me(86128);function Je(De,Ge){var Fe=te.useState(!1),qe=(0,Se.Z)(Fe,2),rn=qe[0],Kn=qe[1];(0,Oe.Z)(function(){if(rn)return De(),function(){Ge()}},[rn]),(0,Oe.Z)(function(){return Kn(!0),function(){Kn(!1)}},[])}var bt=Je,lt=Me(1089),Lt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Mt=te.forwardRef(function(De,Ge){var Fe=De.className,qe=De.style,rn=De.motion,Kn=De.motionNodes,Zn=De.motionType,$t=De.onMotionStart,Nn=De.onMotionEnd,Zt=De.active,qn=De.treeNodeRequiredProps,$n=(0,Pe.Z)(De,Lt),oi=te.useState(!0),ri=(0,Se.Z)(oi,2),fr=ri[0],wr=ri[1],Li=te.useContext(ue.k),Ai=Li.prefixCls,Ur=Kn&&Zn!=="hide";(0,Oe.Z)(function(){Kn&&Ur!==fr&&wr(Ur)},[Kn]);var Yn=function(){Kn&&$t()},Rn=te.useRef(!1),sr=function(){Kn&&!Rn.current&&(Rn.current=!0,Nn())};bt(Yn,sr);var xr=function(lr){Ur===lr&&sr()};return Kn?te.createElement(tt.Z,(0,fe.Z)({ref:Ge,visible:fr},rn,{motionAppear:Zn==="show",onVisibleChanged:xr}),function(Ni,lr){var mo=Ni.className,pi=Ni.style;return te.createElement("div",{ref:lr,className:Nt()("".concat(Ai,"-treenode-motion"),mo),style:pi},Kn.map(function(ti){var hi=Object.assign({},(ve(ti.data),ti.data)),Ii=ti.title,ir=ti.key,zi=ti.isStart,an=ti.isEnd;delete hi.children;var we=(0,lt.H8)(ir,qn);return te.createElement(rt.Z,(0,fe.Z)({},hi,we,{title:Ii,active:Zt,data:ti.data,key:ir,isStart:zi,isEnd:an}))}))}):te.createElement(rt.Z,(0,fe.Z)({domRef:Ge,className:Fe,style:qe},$n,{active:Zt}))}),pt=Mt;function dn(){var De=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ge=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Fe=De.length,qe=Ge.length;if(Math.abs(Fe-qe)!==1)return{add:!1,key:null};function rn(Kn,Zn){var $t=new Map;Kn.forEach(function(Zt){$t.set(Zt,!0)});var Nn=Zn.filter(function(Zt){return!$t.has(Zt)});return Nn.length===1?Nn[0]:null}return Fe<qe?{add:!0,key:rn(De,Ge)}:{add:!1,key:rn(Ge,De)}}function tn(De,Ge,Fe){var qe=De.findIndex(function($t){return $t.key===Fe}),rn=De[qe+1],Kn=Ge.findIndex(function($t){return $t.key===Fe});if(rn){var Zn=Ge.findIndex(function($t){return $t.key===rn.key});return Ge.slice(Kn+1,Zn)}return Ge.slice(Kn+1)}var vn=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],Tn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ve=function(){},Ze="RC_TREE_MOTION_".concat(Math.random()),Qe={key:Ze},mn={key:Ze,level:0,index:0,pos:"0",node:Qe,nodes:[Qe]},kn={parent:null,children:[],pos:mn.pos,data:Qe,title:null,key:Ze,isStart:[],isEnd:[]};function At(De,Ge,Fe,qe){return Ge===!1||!Fe?De:De.slice(0,Math.ceil(Fe/qe)+1)}function pn(De){var Ge=De.key,Fe=De.pos;return(0,lt.km)(Ge,Fe)}function ln(De){for(var Ge=String(De.data.key),Fe=De;Fe.parent;)Fe=Fe.parent,Ge="".concat(Fe.data.key," > ").concat(Ge);return Ge}var jn=te.forwardRef(function(De,Ge){var Fe=De.prefixCls,qe=De.data,rn=De.selectable,Kn=De.checkable,Zn=De.expandedKeys,$t=De.selectedKeys,Nn=De.checkedKeys,Zt=De.loadedKeys,qn=De.loadingKeys,$n=De.halfCheckedKeys,oi=De.keyEntities,ri=De.disabled,fr=De.dragging,wr=De.dragOverNodeKey,Li=De.dropPosition,Ai=De.motion,Ur=De.height,Yn=De.itemHeight,Rn=De.virtual,sr=De.scrollWidth,xr=De.focusable,Ni=De.activeItem,lr=De.focused,mo=De.tabIndex,pi=De.onKeyDown,ti=De.onFocus,hi=De.onBlur,Ii=De.onActiveChange,ir=De.onListChangeStart,zi=De.onListChangeEnd,an=(0,Pe.Z)(De,vn),we=te.useRef(null),Ut=te.useRef(null);te.useImperativeHandle(Ge,function(){return{scrollTo:function(La){we.current.scrollTo(La)},getIndentWidth:function(){return Ut.current.offsetWidth}}});var en=te.useState(Zn),cn=(0,Se.Z)(en,2),xn=cn[0],In=cn[1],ni=te.useState(qe),Ui=(0,Se.Z)(ni,2),Ot=Ui[0],_t=Ui[1],Ct=te.useState(qe),Jt=(0,Se.Z)(Ct,2),ci=Jt[0],Xn=Jt[1],_n=te.useState([]),It=(0,Se.Z)(_n,2),hn=It[0],Ci=It[1],Ri=te.useState(null),Ln=(0,Se.Z)(Ri,2),Rt=Ln[0],Si=Ln[1],Zi=te.useRef(qe);Zi.current=qe;function Wr(){var bo=Zi.current;_t(bo),Xn(bo),Ci([]),Si(null),zi()}(0,Oe.Z)(function(){In(Zn);var bo=dn(xn,Zn);if(bo.key!==null)if(bo.add){var La=Ot.findIndex(function(ra){var ai=ra.key;return ai===bo.key}),sa=At(tn(Ot,qe,bo.key),Rn,Ur,Yn),Yi=Ot.slice();Yi.splice(La+1,0,kn),Xn(Yi),Ci(sa),Si("show")}else{var Wi=qe.findIndex(function(ra){var ai=ra.key;return ai===bo.key}),er=At(tn(qe,Ot,bo.key),Rn,Ur,Yn),Mo=qe.slice();Mo.splice(Wi+1,0,kn),Xn(Mo),Ci(er),Si("hide")}else Ot!==qe&&(_t(qe),Xn(qe))},[Zn,qe]),te.useEffect(function(){fr||Wr()},[fr]);var En=Ai?ci:qe,li={expandedKeys:Zn,selectedKeys:$t,loadedKeys:Zt,loadingKeys:qn,checkedKeys:Nn,halfCheckedKeys:$n,dragOverNodeKey:wr,dropPosition:Li,keyEntities:oi};return te.createElement(te.Fragment,null,lr&&Ni&&te.createElement("span",{style:Tn,"aria-live":"assertive"},ln(Ni)),te.createElement("div",null,te.createElement("input",{style:Tn,disabled:xr===!1||ri,tabIndex:xr!==!1?mo:null,onKeyDown:pi,onFocus:ti,onBlur:hi,value:"",onChange:Ve,"aria-label":"for screen reader"})),te.createElement("div",{className:"".concat(Fe,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},te.createElement("div",{className:"".concat(Fe,"-indent")},te.createElement("div",{ref:Ut,className:"".concat(Fe,"-indent-unit")}))),te.createElement(Re.Z,(0,fe.Z)({},an,{data:En,itemKey:pn,height:Ur,fullHeight:!1,virtual:Rn,itemHeight:Yn,scrollWidth:sr,prefixCls:"".concat(Fe,"-list"),ref:we,role:"tree",onVisibleChange:function(La){La.every(function(sa){return pn(sa)!==Ze})&&Wr()}}),function(bo){var La=bo.pos,sa=Object.assign({},(ve(bo.data),bo.data)),Yi=bo.title,Wi=bo.key,er=bo.isStart,Mo=bo.isEnd,ra=(0,lt.km)(Wi,La);delete sa.key,delete sa.children;var ai=(0,lt.H8)(ra,li);return te.createElement(pt,(0,fe.Z)({},sa,ai,{title:Yi,active:!!Ni&&Wi===Ni.key,pos:La,data:bo.data,isStart:er,isEnd:Mo,motion:Ai,motionNodes:Wi===Ze?hn:null,motionType:Rt,onMotionStart:ir,onMotionEnd:Wr,treeNodeRequiredProps:li,onMouseMove:function(){Ii(null)}}))}))}),Gt=jn,mt=Me(10225),Et=Me(17341),on=Me(35381),Yt=10,ze=function(De){(0,gt.Z)(Fe,De);var Ge=(0,it.Z)(Fe);function Fe(){var qe;(0,ft.Z)(this,Fe);for(var rn=arguments.length,Kn=new Array(rn),Zn=0;Zn<rn;Zn++)Kn[Zn]=arguments[Zn];return qe=Ge.call.apply(Ge,[this].concat(Kn)),(0,st.Z)((0,He.Z)(qe),"destroyed",!1),(0,st.Z)((0,He.Z)(qe),"delayedDragEnterLogic",void 0),(0,st.Z)((0,He.Z)(qe),"loadingRetryTimes",{}),(0,st.Z)((0,He.Z)(qe),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,lt.w$)()}),(0,st.Z)((0,He.Z)(qe),"dragStartMousePosition",null),(0,st.Z)((0,He.Z)(qe),"dragNodeProps",null),(0,st.Z)((0,He.Z)(qe),"currentMouseOverDroppableNodeKey",null),(0,st.Z)((0,He.Z)(qe),"listRef",te.createRef()),(0,st.Z)((0,He.Z)(qe),"onNodeDragStart",function($t,Nn){var Zt=qe.state,qn=Zt.expandedKeys,$n=Zt.keyEntities,oi=qe.props.onDragStart,ri=Nn.eventKey;qe.dragNodeProps=Nn,qe.dragStartMousePosition={x:$t.clientX,y:$t.clientY};var fr=(0,mt._5)(qn,ri);qe.setState({draggingNodeKey:ri,dragChildrenKeys:(0,mt.wA)(ri,$n),indent:qe.listRef.current.getIndentWidth()}),qe.setExpandedKeys(fr),window.addEventListener("dragend",qe.onWindowDragEnd),oi==null||oi({event:$t,node:(0,lt.F)(Nn)})}),(0,st.Z)((0,He.Z)(qe),"onNodeDragEnter",function($t,Nn){var Zt=qe.state,qn=Zt.expandedKeys,$n=Zt.keyEntities,oi=Zt.dragChildrenKeys,ri=Zt.flattenNodes,fr=Zt.indent,wr=qe.props,Li=wr.onDragEnter,Ai=wr.onExpand,Ur=wr.allowDrop,Yn=wr.direction,Rn=Nn.pos,sr=Nn.eventKey;if(qe.currentMouseOverDroppableNodeKey!==sr&&(qe.currentMouseOverDroppableNodeKey=sr),!qe.dragNodeProps){qe.resetDragState();return}var xr=(0,mt.OM)($t,qe.dragNodeProps,Nn,fr,qe.dragStartMousePosition,Ur,ri,$n,qn,Yn),Ni=xr.dropPosition,lr=xr.dropLevelOffset,mo=xr.dropTargetKey,pi=xr.dropContainerKey,ti=xr.dropTargetPos,hi=xr.dropAllowed,Ii=xr.dragOverNodeKey;if(oi.includes(mo)||!hi){qe.resetDragState();return}if(qe.delayedDragEnterLogic||(qe.delayedDragEnterLogic={}),Object.keys(qe.delayedDragEnterLogic).forEach(function(ir){clearTimeout(qe.delayedDragEnterLogic[ir])}),qe.dragNodeProps.eventKey!==Nn.eventKey&&($t.persist(),qe.delayedDragEnterLogic[Rn]=window.setTimeout(function(){if(qe.state.draggingNodeKey!==null){var ir=(0,zt.Z)(qn),zi=(0,on.Z)($n,Nn.eventKey);zi&&(zi.children||[]).length&&(ir=(0,mt.L0)(qn,Nn.eventKey)),qe.props.hasOwnProperty("expandedKeys")||qe.setExpandedKeys(ir),Ai==null||Ai(ir,{node:(0,lt.F)(Nn),expanded:!0,nativeEvent:$t.nativeEvent})}},800)),qe.dragNodeProps.eventKey===mo&&lr===0){qe.resetDragState();return}qe.setState({dragOverNodeKey:Ii,dropPosition:Ni,dropLevelOffset:lr,dropTargetKey:mo,dropContainerKey:pi,dropTargetPos:ti,dropAllowed:hi}),Li==null||Li({event:$t,node:(0,lt.F)(Nn),expandedKeys:qn})}),(0,st.Z)((0,He.Z)(qe),"onNodeDragOver",function($t,Nn){var Zt=qe.state,qn=Zt.dragChildrenKeys,$n=Zt.flattenNodes,oi=Zt.keyEntities,ri=Zt.expandedKeys,fr=Zt.indent,wr=qe.props,Li=wr.onDragOver,Ai=wr.allowDrop,Ur=wr.direction;if(qe.dragNodeProps){var Yn=(0,mt.OM)($t,qe.dragNodeProps,Nn,fr,qe.dragStartMousePosition,Ai,$n,oi,ri,Ur),Rn=Yn.dropPosition,sr=Yn.dropLevelOffset,xr=Yn.dropTargetKey,Ni=Yn.dropContainerKey,lr=Yn.dropTargetPos,mo=Yn.dropAllowed,pi=Yn.dragOverNodeKey;qn.includes(xr)||!mo||(qe.dragNodeProps.eventKey===xr&&sr===0?qe.state.dropPosition===null&&qe.state.dropLevelOffset===null&&qe.state.dropTargetKey===null&&qe.state.dropContainerKey===null&&qe.state.dropTargetPos===null&&qe.state.dropAllowed===!1&&qe.state.dragOverNodeKey===null||qe.resetDragState():Rn===qe.state.dropPosition&&sr===qe.state.dropLevelOffset&&xr===qe.state.dropTargetKey&&Ni===qe.state.dropContainerKey&&lr===qe.state.dropTargetPos&&mo===qe.state.dropAllowed&&pi===qe.state.dragOverNodeKey||qe.setState({dropPosition:Rn,dropLevelOffset:sr,dropTargetKey:xr,dropContainerKey:Ni,dropTargetPos:lr,dropAllowed:mo,dragOverNodeKey:pi}),Li==null||Li({event:$t,node:(0,lt.F)(Nn)}))}}),(0,st.Z)((0,He.Z)(qe),"onNodeDragLeave",function($t,Nn){qe.currentMouseOverDroppableNodeKey===Nn.eventKey&&!$t.currentTarget.contains($t.relatedTarget)&&(qe.resetDragState(),qe.currentMouseOverDroppableNodeKey=null);var Zt=qe.props.onDragLeave;Zt==null||Zt({event:$t,node:(0,lt.F)(Nn)})}),(0,st.Z)((0,He.Z)(qe),"onWindowDragEnd",function($t){qe.onNodeDragEnd($t,null,!0),window.removeEventListener("dragend",qe.onWindowDragEnd)}),(0,st.Z)((0,He.Z)(qe),"onNodeDragEnd",function($t,Nn){var Zt=qe.props.onDragEnd;qe.setState({dragOverNodeKey:null}),qe.cleanDragState(),Zt==null||Zt({event:$t,node:(0,lt.F)(Nn)}),qe.dragNodeProps=null,window.removeEventListener("dragend",qe.onWindowDragEnd)}),(0,st.Z)((0,He.Z)(qe),"onNodeDrop",function($t,Nn){var Zt,qn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,$n=qe.state,oi=$n.dragChildrenKeys,ri=$n.dropPosition,fr=$n.dropTargetKey,wr=$n.dropTargetPos,Li=$n.dropAllowed;if(Li){var Ai=qe.props.onDrop;if(qe.setState({dragOverNodeKey:null}),qe.cleanDragState(),fr!==null){var Ur=(0,St.Z)((0,St.Z)({},(0,lt.H8)(fr,qe.getTreeNodeRequiredProps())),{},{active:((Zt=qe.getActiveItem())===null||Zt===void 0?void 0:Zt.key)===fr,data:(0,on.Z)(qe.state.keyEntities,fr).node}),Yn=oi.includes(fr);(0,ne.ZP)(!Yn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Rn=(0,mt.yx)(wr),sr={event:$t,node:(0,lt.F)(Ur),dragNode:qe.dragNodeProps?(0,lt.F)(qe.dragNodeProps):null,dragNodesKeys:[qe.dragNodeProps.eventKey].concat(oi),dropToGap:ri!==0,dropPosition:ri+Number(Rn[Rn.length-1])};qn||Ai==null||Ai(sr),qe.dragNodeProps=null}}}),(0,st.Z)((0,He.Z)(qe),"cleanDragState",function(){var $t=qe.state.draggingNodeKey;$t!==null&&qe.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),qe.dragStartMousePosition=null,qe.currentMouseOverDroppableNodeKey=null}),(0,st.Z)((0,He.Z)(qe),"triggerExpandActionExpand",function($t,Nn){var Zt=qe.state,qn=Zt.expandedKeys,$n=Zt.flattenNodes,oi=Nn.expanded,ri=Nn.key,fr=Nn.isLeaf;if(!(fr||$t.shiftKey||$t.metaKey||$t.ctrlKey)){var wr=$n.filter(function(Ai){return Ai.key===ri})[0],Li=(0,lt.F)((0,St.Z)((0,St.Z)({},(0,lt.H8)(ri,qe.getTreeNodeRequiredProps())),{},{data:wr.data}));qe.setExpandedKeys(oi?(0,mt._5)(qn,ri):(0,mt.L0)(qn,ri)),qe.onNodeExpand($t,Li)}}),(0,st.Z)((0,He.Z)(qe),"onNodeClick",function($t,Nn){var Zt=qe.props,qn=Zt.onClick,$n=Zt.expandAction;$n==="click"&&qe.triggerExpandActionExpand($t,Nn),qn==null||qn($t,Nn)}),(0,st.Z)((0,He.Z)(qe),"onNodeDoubleClick",function($t,Nn){var Zt=qe.props,qn=Zt.onDoubleClick,$n=Zt.expandAction;$n==="doubleClick"&&qe.triggerExpandActionExpand($t,Nn),qn==null||qn($t,Nn)}),(0,st.Z)((0,He.Z)(qe),"onNodeSelect",function($t,Nn){var Zt=qe.state.selectedKeys,qn=qe.state,$n=qn.keyEntities,oi=qn.fieldNames,ri=qe.props,fr=ri.onSelect,wr=ri.multiple,Li=Nn.selected,Ai=Nn[oi.key],Ur=!Li;Ur?wr?Zt=(0,mt.L0)(Zt,Ai):Zt=[Ai]:Zt=(0,mt._5)(Zt,Ai);var Yn=Zt.map(function(Rn){var sr=(0,on.Z)($n,Rn);return sr?sr.node:null}).filter(Boolean);qe.setUncontrolledState({selectedKeys:Zt}),fr==null||fr(Zt,{event:"select",selected:Ur,node:Nn,selectedNodes:Yn,nativeEvent:$t.nativeEvent})}),(0,st.Z)((0,He.Z)(qe),"onNodeCheck",function($t,Nn,Zt){var qn=qe.state,$n=qn.keyEntities,oi=qn.checkedKeys,ri=qn.halfCheckedKeys,fr=qe.props,wr=fr.checkStrictly,Li=fr.onCheck,Ai=Nn.key,Ur,Yn={event:"check",node:Nn,checked:Zt,nativeEvent:$t.nativeEvent};if(wr){var Rn=Zt?(0,mt.L0)(oi,Ai):(0,mt._5)(oi,Ai),sr=(0,mt._5)(ri,Ai);Ur={checked:Rn,halfChecked:sr},Yn.checkedNodes=Rn.map(function(ti){return(0,on.Z)($n,ti)}).filter(Boolean).map(function(ti){return ti.node}),qe.setUncontrolledState({checkedKeys:Rn})}else{var xr=(0,Et.S)([].concat((0,zt.Z)(oi),[Ai]),!0,$n),Ni=xr.checkedKeys,lr=xr.halfCheckedKeys;if(!Zt){var mo=new Set(Ni);mo.delete(Ai);var pi=(0,Et.S)(Array.from(mo),{checked:!1,halfCheckedKeys:lr},$n);Ni=pi.checkedKeys,lr=pi.halfCheckedKeys}Ur=Ni,Yn.checkedNodes=[],Yn.checkedNodesPositions=[],Yn.halfCheckedKeys=lr,Ni.forEach(function(ti){var hi=(0,on.Z)($n,ti);if(hi){var Ii=hi.node,ir=hi.pos;Yn.checkedNodes.push(Ii),Yn.checkedNodesPositions.push({node:Ii,pos:ir})}}),qe.setUncontrolledState({checkedKeys:Ni},!1,{halfCheckedKeys:lr})}Li==null||Li(Ur,Yn)}),(0,st.Z)((0,He.Z)(qe),"onNodeLoad",function($t){var Nn,Zt=$t.key,qn=qe.state.keyEntities,$n=(0,on.Z)(qn,Zt);if(!($n!=null&&(Nn=$n.children)!==null&&Nn!==void 0&&Nn.length)){var oi=new Promise(function(ri,fr){qe.setState(function(wr){var Li=wr.loadedKeys,Ai=Li===void 0?[]:Li,Ur=wr.loadingKeys,Yn=Ur===void 0?[]:Ur,Rn=qe.props,sr=Rn.loadData,xr=Rn.onLoad;if(!sr||Ai.includes(Zt)||Yn.includes(Zt))return null;var Ni=sr($t);return Ni.then(function(){var lr=qe.state.loadedKeys,mo=(0,mt.L0)(lr,Zt);xr==null||xr(mo,{event:"load",node:$t}),qe.setUncontrolledState({loadedKeys:mo}),qe.setState(function(pi){return{loadingKeys:(0,mt._5)(pi.loadingKeys,Zt)}}),ri()}).catch(function(lr){if(qe.setState(function(pi){return{loadingKeys:(0,mt._5)(pi.loadingKeys,Zt)}}),qe.loadingRetryTimes[Zt]=(qe.loadingRetryTimes[Zt]||0)+1,qe.loadingRetryTimes[Zt]>=Yt){var mo=qe.state.loadedKeys;(0,ne.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),qe.setUncontrolledState({loadedKeys:(0,mt.L0)(mo,Zt)}),ri()}fr(lr)}),{loadingKeys:(0,mt.L0)(Yn,Zt)}})});return oi.catch(function(){}),oi}}),(0,st.Z)((0,He.Z)(qe),"onNodeMouseEnter",function($t,Nn){var Zt=qe.props.onMouseEnter;Zt==null||Zt({event:$t,node:Nn})}),(0,st.Z)((0,He.Z)(qe),"onNodeMouseLeave",function($t,Nn){var Zt=qe.props.onMouseLeave;Zt==null||Zt({event:$t,node:Nn})}),(0,st.Z)((0,He.Z)(qe),"onNodeContextMenu",function($t,Nn){var Zt=qe.props.onRightClick;Zt&&($t.preventDefault(),Zt({event:$t,node:Nn}))}),(0,st.Z)((0,He.Z)(qe),"onFocus",function(){var $t=qe.props.onFocus;qe.setState({focused:!0});for(var Nn=arguments.length,Zt=new Array(Nn),qn=0;qn<Nn;qn++)Zt[qn]=arguments[qn];$t==null||$t.apply(void 0,Zt)}),(0,st.Z)((0,He.Z)(qe),"onBlur",function(){var $t=qe.props.onBlur;qe.setState({focused:!1}),qe.onActiveChange(null);for(var Nn=arguments.length,Zt=new Array(Nn),qn=0;qn<Nn;qn++)Zt[qn]=arguments[qn];$t==null||$t.apply(void 0,Zt)}),(0,st.Z)((0,He.Z)(qe),"getTreeNodeRequiredProps",function(){var $t=qe.state,Nn=$t.expandedKeys,Zt=$t.selectedKeys,qn=$t.loadedKeys,$n=$t.loadingKeys,oi=$t.checkedKeys,ri=$t.halfCheckedKeys,fr=$t.dragOverNodeKey,wr=$t.dropPosition,Li=$t.keyEntities;return{expandedKeys:Nn||[],selectedKeys:Zt||[],loadedKeys:qn||[],loadingKeys:$n||[],checkedKeys:oi||[],halfCheckedKeys:ri||[],dragOverNodeKey:fr,dropPosition:wr,keyEntities:Li}}),(0,st.Z)((0,He.Z)(qe),"setExpandedKeys",function($t){var Nn=qe.state,Zt=Nn.treeData,qn=Nn.fieldNames,$n=(0,lt.oH)(Zt,$t,qn);qe.setUncontrolledState({expandedKeys:$t,flattenNodes:$n},!0)}),(0,st.Z)((0,He.Z)(qe),"onNodeExpand",function($t,Nn){var Zt=qe.state.expandedKeys,qn=qe.state,$n=qn.listChanging,oi=qn.fieldNames,ri=qe.props,fr=ri.onExpand,wr=ri.loadData,Li=Nn.expanded,Ai=Nn[oi.key];if(!$n){var Ur=Zt.includes(Ai),Yn=!Li;if((0,ne.ZP)(Li&&Ur||!Li&&!Ur,"Expand state not sync with index check"),Zt=Yn?(0,mt.L0)(Zt,Ai):(0,mt._5)(Zt,Ai),qe.setExpandedKeys(Zt),fr==null||fr(Zt,{node:Nn,expanded:Yn,nativeEvent:$t.nativeEvent}),Yn&&wr){var Rn=qe.onNodeLoad(Nn);Rn&&Rn.then(function(){var sr=(0,lt.oH)(qe.state.treeData,Zt,oi);qe.setUncontrolledState({flattenNodes:sr})}).catch(function(){var sr=qe.state.expandedKeys,xr=(0,mt._5)(sr,Ai);qe.setExpandedKeys(xr)})}}}),(0,st.Z)((0,He.Z)(qe),"onListChangeStart",function(){qe.setUncontrolledState({listChanging:!0})}),(0,st.Z)((0,He.Z)(qe),"onListChangeEnd",function(){setTimeout(function(){qe.setUncontrolledState({listChanging:!1})})}),(0,st.Z)((0,He.Z)(qe),"onActiveChange",function($t){var Nn=qe.state.activeKey,Zt=qe.props,qn=Zt.onActiveChange,$n=Zt.itemScrollOffset,oi=$n===void 0?0:$n;Nn!==$t&&(qe.setState({activeKey:$t}),$t!==null&&qe.scrollTo({key:$t,offset:oi}),qn==null||qn($t))}),(0,st.Z)((0,He.Z)(qe),"getActiveItem",function(){var $t=qe.state,Nn=$t.activeKey,Zt=$t.flattenNodes;return Nn===null?null:Zt.find(function(qn){var $n=qn.key;return $n===Nn})||null}),(0,st.Z)((0,He.Z)(qe),"offsetActiveKey",function($t){var Nn=qe.state,Zt=Nn.flattenNodes,qn=Nn.activeKey,$n=Zt.findIndex(function(fr){var wr=fr.key;return wr===qn});$n===-1&&$t<0&&($n=Zt.length),$n=($n+$t+Zt.length)%Zt.length;var oi=Zt[$n];if(oi){var ri=oi.key;qe.onActiveChange(ri)}else qe.onActiveChange(null)}),(0,st.Z)((0,He.Z)(qe),"onKeyDown",function($t){var Nn=qe.state,Zt=Nn.activeKey,qn=Nn.expandedKeys,$n=Nn.checkedKeys,oi=Nn.fieldNames,ri=qe.props,fr=ri.onKeyDown,wr=ri.checkable,Li=ri.selectable;switch($t.which){case Bt.Z.UP:{qe.offsetActiveKey(-1),$t.preventDefault();break}case Bt.Z.DOWN:{qe.offsetActiveKey(1),$t.preventDefault();break}}var Ai=qe.getActiveItem();if(Ai&&Ai.data){var Ur=qe.getTreeNodeRequiredProps(),Yn=Ai.data.isLeaf===!1||!!(Ai.data[oi.children]||[]).length,Rn=(0,lt.F)((0,St.Z)((0,St.Z)({},(0,lt.H8)(Zt,Ur)),{},{data:Ai.data,active:!0}));switch($t.which){case Bt.Z.LEFT:{Yn&&qn.includes(Zt)?qe.onNodeExpand({},Rn):Ai.parent&&qe.onActiveChange(Ai.parent.key),$t.preventDefault();break}case Bt.Z.RIGHT:{Yn&&!qn.includes(Zt)?qe.onNodeExpand({},Rn):Ai.children&&Ai.children.length&&qe.onActiveChange(Ai.children[0].key),$t.preventDefault();break}case Bt.Z.ENTER:case Bt.Z.SPACE:{wr&&!Rn.disabled&&Rn.checkable!==!1&&!Rn.disableCheckbox?qe.onNodeCheck({},Rn,!$n.includes(Zt)):!wr&&Li&&!Rn.disabled&&Rn.selectable!==!1&&qe.onNodeSelect({},Rn);break}}}fr==null||fr($t)}),(0,st.Z)((0,He.Z)(qe),"setUncontrolledState",function($t){var Nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Zt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!qe.destroyed){var qn=!1,$n=!0,oi={};Object.keys($t).forEach(function(ri){if(qe.props.hasOwnProperty(ri)){$n=!1;return}qn=!0,oi[ri]=$t[ri]}),qn&&(!Nn||$n)&&qe.setState((0,St.Z)((0,St.Z)({},oi),Zt))}}),(0,st.Z)((0,He.Z)(qe),"scrollTo",function($t){qe.listRef.current.scrollTo($t)}),qe}return(0,Be.Z)(Fe,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var rn=this.props,Kn=rn.activeKey,Zn=rn.itemScrollOffset,$t=Zn===void 0?0:Zn;Kn!==void 0&&Kn!==this.state.activeKey&&(this.setState({activeKey:Kn}),Kn!==null&&this.scrollTo({key:Kn,offset:$t}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var rn=this.state,Kn=rn.focused,Zn=rn.flattenNodes,$t=rn.keyEntities,Nn=rn.draggingNodeKey,Zt=rn.activeKey,qn=rn.dropLevelOffset,$n=rn.dropContainerKey,oi=rn.dropTargetKey,ri=rn.dropPosition,fr=rn.dragOverNodeKey,wr=rn.indent,Li=this.props,Ai=Li.prefixCls,Ur=Li.className,Yn=Li.style,Rn=Li.showLine,sr=Li.focusable,xr=Li.tabIndex,Ni=xr===void 0?0:xr,lr=Li.selectable,mo=Li.showIcon,pi=Li.icon,ti=Li.switcherIcon,hi=Li.draggable,Ii=Li.checkable,ir=Li.checkStrictly,zi=Li.disabled,an=Li.motion,we=Li.loadData,Ut=Li.filterTreeNode,en=Li.height,cn=Li.itemHeight,xn=Li.scrollWidth,In=Li.virtual,ni=Li.titleRender,Ui=Li.dropIndicatorRender,Ot=Li.onContextMenu,_t=Li.onScroll,Ct=Li.direction,Jt=Li.rootClassName,ci=Li.rootStyle,Xn=(0,Ae.Z)(this.props,{aria:!0,data:!0}),_n;hi&&((0,Ke.Z)(hi)==="object"?_n=hi:typeof hi=="function"?_n={nodeDraggable:hi}:_n={});var It={prefixCls:Ai,selectable:lr,showIcon:mo,icon:pi,switcherIcon:ti,draggable:_n,draggingNodeKey:Nn,checkable:Ii,checkStrictly:ir,disabled:zi,keyEntities:$t,dropLevelOffset:qn,dropContainerKey:$n,dropTargetKey:oi,dropPosition:ri,dragOverNodeKey:fr,indent:wr,direction:Ct,dropIndicatorRender:Ui,loadData:we,filterTreeNode:Ut,titleRender:ni,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return te.createElement(ue.k.Provider,{value:It},te.createElement("div",{className:Nt()(Ai,Ur,Jt,(0,st.Z)((0,st.Z)((0,st.Z)({},"".concat(Ai,"-show-line"),Rn),"".concat(Ai,"-focused"),Kn),"".concat(Ai,"-active-focused"),Zt!==null)),style:ci},te.createElement(Gt,(0,fe.Z)({ref:this.listRef,prefixCls:Ai,style:Yn,data:Zn,disabled:zi,selectable:lr,checkable:!!Ii,motion:an,dragging:Nn!==null,height:en,itemHeight:cn,virtual:In,focusable:sr,focused:Kn,tabIndex:Ni,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Ot,onScroll:_t,scrollWidth:xn},this.getTreeNodeRequiredProps(),Xn))))}}],[{key:"getDerivedStateFromProps",value:function(rn,Kn){var Zn=Kn.prevProps,$t={prevProps:rn};function Nn(Ni){return!Zn&&rn.hasOwnProperty(Ni)||Zn&&Zn[Ni]!==rn[Ni]}var Zt,qn=Kn.fieldNames;if(Nn("fieldNames")&&(qn=(0,lt.w$)(rn.fieldNames),$t.fieldNames=qn),Nn("treeData")?Zt=rn.treeData:Nn("children")&&((0,ne.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Zt=(0,lt.zn)(rn.children)),Zt){$t.treeData=Zt;var $n=(0,lt.I8)(Zt,{fieldNames:qn});$t.keyEntities=(0,St.Z)((0,st.Z)({},Ze,mn),$n.keyEntities)}var oi=$t.keyEntities||Kn.keyEntities;if(Nn("expandedKeys")||Zn&&Nn("autoExpandParent"))$t.expandedKeys=rn.autoExpandParent||!Zn&&rn.defaultExpandParent?(0,mt.r7)(rn.expandedKeys,oi):rn.expandedKeys;else if(!Zn&&rn.defaultExpandAll){var ri=(0,St.Z)({},oi);delete ri[Ze];var fr=[];Object.keys(ri).forEach(function(Ni){var lr=ri[Ni];lr.children&&lr.children.length&&fr.push(lr.key)}),$t.expandedKeys=fr}else!Zn&&rn.defaultExpandedKeys&&($t.expandedKeys=rn.autoExpandParent||rn.defaultExpandParent?(0,mt.r7)(rn.defaultExpandedKeys,oi):rn.defaultExpandedKeys);if($t.expandedKeys||delete $t.expandedKeys,Zt||$t.expandedKeys){var wr=(0,lt.oH)(Zt||Kn.treeData,$t.expandedKeys||Kn.expandedKeys,qn);$t.flattenNodes=wr}if(rn.selectable&&(Nn("selectedKeys")?$t.selectedKeys=(0,mt.BT)(rn.selectedKeys,rn):!Zn&&rn.defaultSelectedKeys&&($t.selectedKeys=(0,mt.BT)(rn.defaultSelectedKeys,rn))),rn.checkable){var Li;if(Nn("checkedKeys")?Li=(0,mt.E6)(rn.checkedKeys)||{}:!Zn&&rn.defaultCheckedKeys?Li=(0,mt.E6)(rn.defaultCheckedKeys)||{}:Zt&&(Li=(0,mt.E6)(rn.checkedKeys)||{checkedKeys:Kn.checkedKeys,halfCheckedKeys:Kn.halfCheckedKeys}),Li){var Ai=Li,Ur=Ai.checkedKeys,Yn=Ur===void 0?[]:Ur,Rn=Ai.halfCheckedKeys,sr=Rn===void 0?[]:Rn;if(!rn.checkStrictly){var xr=(0,Et.S)(Yn,!0,oi);Yn=xr.checkedKeys,sr=xr.halfCheckedKeys}$t.checkedKeys=Yn,$t.halfCheckedKeys=sr}}return Nn("loadedKeys")&&($t.loadedKeys=rn.loadedKeys),$t}}]),Fe}(te.Component);(0,st.Z)(ze,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:pe,allowDrop:function(){return!0},expandAction:!1}),(0,st.Z)(ze,"TreeNode",rt.Z);var be=ze,Ce=be},10225:function(Cn,On,Me){"use strict";Me.d(On,{BT:function(){return te},E6:function(){return pe},L0:function(){return st},OM:function(){return ne},_5:function(){return it},r7:function(){return ve},wA:function(){return Nt},yx:function(){return Ft}});var fe=Me(74902),Ke=Me(71002),St=Me(80334),zt=Me(67294),ft=Me(86128),Be=Me(35381),He=Me(1089),gt=null;function it(Se,Pe){if(!Se)return[];var Oe=Se.slice(),Re=Oe.indexOf(Pe);return Re>=0&&Oe.splice(Re,1),Oe}function st(Se,Pe){var Oe=(Se||[]).slice();return Oe.indexOf(Pe)===-1&&Oe.push(Pe),Oe}function Ft(Se){return Se.split("-")}function Nt(Se,Pe){var Oe=[],Re=(0,Be.Z)(Pe,Se);function tt(){var rt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];rt.forEach(function(Je){var bt=Je.key,lt=Je.children;Oe.push(bt),tt(lt)})}return tt(Re.children),Oe}function Bt(Se){if(Se.parent){var Pe=Ft(Se.pos);return Number(Pe[Pe.length-1])===Se.parent.children.length-1}return!1}function Ae(Se){var Pe=Ft(Se.pos);return Number(Pe[Pe.length-1])===0}function ne(Se,Pe,Oe,Re,tt,rt,Je,bt,lt,Lt){var Mt,pt=Se.clientX,dn=Se.clientY,tn=Se.target.getBoundingClientRect(),vn=tn.top,Tn=tn.height,Ve=(Lt==="rtl"?-1:1)*(((tt==null?void 0:tt.x)||0)-pt),Ze=(Ve-12)/Re,Qe=lt.filter(function(Ce){var De;return(De=bt[Ce])===null||De===void 0||(De=De.children)===null||De===void 0?void 0:De.length}),mn=(0,Be.Z)(bt,Oe.eventKey);if(dn<vn+Tn/2){var kn=Je.findIndex(function(Ce){return Ce.key===mn.key}),At=kn<=0?0:kn-1,pn=Je[At].key;mn=(0,Be.Z)(bt,pn)}var ln=mn.key,jn=mn,Gt=mn.key,mt=0,Et=0;if(!Qe.includes(ln))for(var on=0;on<Ze&&Bt(mn);on+=1)mn=mn.parent,Et+=1;var Yt=Pe.data,ze=mn.node,be=!0;return Ae(mn)&&mn.level===0&&dn<vn+Tn/2&&rt({dragNode:Yt,dropNode:ze,dropPosition:-1})&&mn.key===Oe.eventKey?mt=-1:(jn.children||[]).length&&Qe.includes(Gt)?rt({dragNode:Yt,dropNode:ze,dropPosition:0})?mt=0:be=!1:Et===0?Ze>-1.5?rt({dragNode:Yt,dropNode:ze,dropPosition:1})?mt=1:be=!1:rt({dragNode:Yt,dropNode:ze,dropPosition:0})?mt=0:rt({dragNode:Yt,dropNode:ze,dropPosition:1})?mt=1:be=!1:rt({dragNode:Yt,dropNode:ze,dropPosition:1})?mt=1:be=!1,{dropPosition:mt,dropLevelOffset:Et,dropTargetKey:mn.key,dropTargetPos:mn.pos,dragOverNodeKey:Gt,dropContainerKey:mt===0?null:((Mt=mn.parent)===null||Mt===void 0?void 0:Mt.key)||null,dropAllowed:be}}function te(Se,Pe){if(Se){var Oe=Pe.multiple;return Oe?Se.slice():Se.length?[Se[0]]:Se}}var ue=function(Pe){return Pe};function se(Se,Pe){if(!Se)return[];var Oe=Pe||{},Re=Oe.processProps,tt=Re===void 0?ue:Re,rt=Array.isArray(Se)?Se:[Se];return rt.map(function(Je){var bt=Je.children,lt=_objectWithoutProperties(Je,gt),Lt=se(bt,Pe);return React.createElement(TreeNode,_extends({key:lt.key},tt(lt)),Lt)})}function pe(Se){if(!Se)return null;var Pe;if(Array.isArray(Se))Pe={checkedKeys:Se,halfCheckedKeys:void 0};else if((0,Ke.Z)(Se)==="object")Pe={checkedKeys:Se.checked||void 0,halfCheckedKeys:Se.halfChecked||void 0};else return(0,St.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Pe}function ve(Se,Pe){var Oe=new Set;function Re(tt){if(!Oe.has(tt)){var rt=(0,Be.Z)(Pe,tt);if(rt){Oe.add(tt);var Je=rt.parent,bt=rt.node;bt.disabled||Je&&Re(Je.key)}}}return(Se||[]).forEach(function(tt){Re(tt)}),(0,fe.Z)(Oe)}},17341:function(Cn,On,Me){"use strict";Me.d(On,{S:function(){return He}});var fe=Me(80334),Ke=Me(35381);function St(gt,it){var st=new Set;return gt.forEach(function(Ft){it.has(Ft)||st.add(Ft)}),st}function zt(gt){var it=gt||{},st=it.disabled,Ft=it.disableCheckbox,Nt=it.checkable;return!!(st||Ft)||Nt===!1}function ft(gt,it,st,Ft){for(var Nt=new Set(gt),Bt=new Set,Ae=0;Ae<=st;Ae+=1){var ne=it.get(Ae)||new Set;ne.forEach(function(pe){var ve=pe.key,Se=pe.node,Pe=pe.children,Oe=Pe===void 0?[]:Pe;Nt.has(ve)&&!Ft(Se)&&Oe.filter(function(Re){return!Ft(Re.node)}).forEach(function(Re){Nt.add(Re.key)})})}for(var te=new Set,ue=st;ue>=0;ue-=1){var se=it.get(ue)||new Set;se.forEach(function(pe){var ve=pe.parent,Se=pe.node;if(!(Ft(Se)||!pe.parent||te.has(pe.parent.key))){if(Ft(pe.parent.node)){te.add(ve.key);return}var Pe=!0,Oe=!1;(ve.children||[]).filter(function(Re){return!Ft(Re.node)}).forEach(function(Re){var tt=Re.key,rt=Nt.has(tt);Pe&&!rt&&(Pe=!1),!Oe&&(rt||Bt.has(tt))&&(Oe=!0)}),Pe&&Nt.add(ve.key),Oe&&Bt.add(ve.key),te.add(ve.key)}})}return{checkedKeys:Array.from(Nt),halfCheckedKeys:Array.from(St(Bt,Nt))}}function Be(gt,it,st,Ft,Nt){for(var Bt=new Set(gt),Ae=new Set(it),ne=0;ne<=Ft;ne+=1){var te=st.get(ne)||new Set;te.forEach(function(ve){var Se=ve.key,Pe=ve.node,Oe=ve.children,Re=Oe===void 0?[]:Oe;!Bt.has(Se)&&!Ae.has(Se)&&!Nt(Pe)&&Re.filter(function(tt){return!Nt(tt.node)}).forEach(function(tt){Bt.delete(tt.key)})})}Ae=new Set;for(var ue=new Set,se=Ft;se>=0;se-=1){var pe=st.get(se)||new Set;pe.forEach(function(ve){var Se=ve.parent,Pe=ve.node;if(!(Nt(Pe)||!ve.parent||ue.has(ve.parent.key))){if(Nt(ve.parent.node)){ue.add(Se.key);return}var Oe=!0,Re=!1;(Se.children||[]).filter(function(tt){return!Nt(tt.node)}).forEach(function(tt){var rt=tt.key,Je=Bt.has(rt);Oe&&!Je&&(Oe=!1),!Re&&(Je||Ae.has(rt))&&(Re=!0)}),Oe||Bt.delete(Se.key),Re&&Ae.add(Se.key),ue.add(Se.key)}})}return{checkedKeys:Array.from(Bt),halfCheckedKeys:Array.from(St(Ae,Bt))}}function He(gt,it,st,Ft){var Nt=[],Bt;Ft?Bt=Ft:Bt=zt;var Ae=new Set(gt.filter(function(se){var pe=!!(0,Ke.Z)(st,se);return pe||Nt.push(se),pe})),ne=new Map,te=0;Object.keys(st).forEach(function(se){var pe=st[se],ve=pe.level,Se=ne.get(ve);Se||(Se=new Set,ne.set(ve,Se)),Se.add(pe),te=Math.max(te,ve)}),(0,fe.ZP)(!Nt.length,"Tree missing follow keys: ".concat(Nt.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ue;return it===!0?ue=ft(Ae,ne,te,Bt):ue=Be(Ae,it.halfCheckedKeys,ne,te,Bt),ue}},35381:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return fe}});function fe(Ke,St){return Ke[St]}},1089:function(Cn,On,Me){"use strict";Me.d(On,{F:function(){return ve},H8:function(){return pe},I8:function(){return se},km:function(){return Nt},oH:function(){return te},w$:function(){return Bt},zn:function(){return ne}});var fe=Me(71002),Ke=Me(74902),St=Me(1413),zt=Me(45987),ft=Me(50344),Be=Me(98423),He=Me(80334),gt=Me(35381),it=["children"];function st(Se,Pe){return"".concat(Se,"-").concat(Pe)}function Ft(Se){return Se&&Se.type&&Se.type.isTreeNode}function Nt(Se,Pe){return Se!=null?Se:Pe}function Bt(Se){var Pe=Se||{},Oe=Pe.title,Re=Pe._title,tt=Pe.key,rt=Pe.children,Je=Oe||"title";return{title:Je,_title:Re||[Je],key:tt||"key",children:rt||"children"}}function Ae(Se,Pe){var Oe=new Map;function Re(tt){var rt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(tt||[]).forEach(function(Je){var bt=Je[Pe.key],lt=Je[Pe.children];warning(bt!=null,"Tree node must have a certain key: [".concat(rt).concat(bt,"]"));var Lt=String(bt);warning(!Oe.has(Lt)||bt===null||bt===void 0,"Same 'key' exist in the Tree: ".concat(Lt)),Oe.set(Lt,!0),Re(lt,"".concat(rt).concat(Lt," > "))})}Re(Se)}function ne(Se){function Pe(Oe){var Re=(0,ft.Z)(Oe);return Re.map(function(tt){if(!Ft(tt))return(0,He.ZP)(!tt,"Tree/TreeNode can only accept TreeNode as children."),null;var rt=tt.key,Je=tt.props,bt=Je.children,lt=(0,zt.Z)(Je,it),Lt=(0,St.Z)({key:rt},lt),Mt=Pe(bt);return Mt.length&&(Lt.children=Mt),Lt}).filter(function(tt){return tt})}return Pe(Se)}function te(Se,Pe,Oe){var Re=Bt(Oe),tt=Re._title,rt=Re.key,Je=Re.children,bt=new Set(Pe===!0?[]:Pe),lt=[];function Lt(Mt){var pt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Mt.map(function(dn,tn){for(var vn=st(pt?pt.pos:"0",tn),Tn=Nt(dn[rt],vn),Ve,Ze=0;Ze<tt.length;Ze+=1){var Qe=tt[Ze];if(dn[Qe]!==void 0){Ve=dn[Qe];break}}var mn=Object.assign((0,Be.Z)(dn,[].concat((0,Ke.Z)(tt),[rt,Je])),{title:Ve,key:Tn,parent:pt,pos:vn,children:null,data:dn,isStart:[].concat((0,Ke.Z)(pt?pt.isStart:[]),[tn===0]),isEnd:[].concat((0,Ke.Z)(pt?pt.isEnd:[]),[tn===Mt.length-1])});return lt.push(mn),Pe===!0||bt.has(Tn)?mn.children=Lt(dn[Je]||[],mn):mn.children=[],mn})}return Lt(Se),lt}function ue(Se,Pe,Oe){var Re={};(0,fe.Z)(Oe)==="object"?Re=Oe:Re={externalGetKey:Oe},Re=Re||{};var tt=Re,rt=tt.childrenPropName,Je=tt.externalGetKey,bt=tt.fieldNames,lt=Bt(bt),Lt=lt.key,Mt=lt.children,pt=rt||Mt,dn;Je?typeof Je=="string"?dn=function(Tn){return Tn[Je]}:typeof Je=="function"&&(dn=function(Tn){return Je(Tn)}):dn=function(Tn,Ve){return Nt(Tn[Lt],Ve)};function tn(vn,Tn,Ve,Ze){var Qe=vn?vn[pt]:Se,mn=vn?st(Ve.pos,Tn):"0",kn=vn?[].concat((0,Ke.Z)(Ze),[vn]):[];if(vn){var At=dn(vn,mn),pn={node:vn,index:Tn,pos:mn,key:At,parentPos:Ve.node?Ve.pos:null,level:Ve.level+1,nodes:kn};Pe(pn)}Qe&&Qe.forEach(function(ln,jn){tn(ln,jn,{node:vn,pos:mn,level:Ve?Ve.level+1:-1},kn)})}tn(null)}function se(Se){var Pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=Pe.initWrapper,Re=Pe.processEntity,tt=Pe.onProcessFinished,rt=Pe.externalGetKey,Je=Pe.childrenPropName,bt=Pe.fieldNames,lt=arguments.length>2?arguments[2]:void 0,Lt=rt||lt,Mt={},pt={},dn={posEntities:Mt,keyEntities:pt};return Oe&&(dn=Oe(dn)||dn),ue(Se,function(tn){var vn=tn.node,Tn=tn.index,Ve=tn.pos,Ze=tn.key,Qe=tn.parentPos,mn=tn.level,kn=tn.nodes,At={node:vn,nodes:kn,index:Tn,key:Ze,pos:Ve,level:mn},pn=Nt(Ze,Ve);Mt[Ve]=At,pt[pn]=At,At.parent=Mt[Qe],At.parent&&(At.parent.children=At.parent.children||[],At.parent.children.push(At)),Re&&Re(At,dn)},{externalGetKey:Lt,childrenPropName:Je,fieldNames:bt}),tt&&tt(dn),dn}function pe(Se,Pe){var Oe=Pe.expandedKeys,Re=Pe.selectedKeys,tt=Pe.loadedKeys,rt=Pe.loadingKeys,Je=Pe.checkedKeys,bt=Pe.halfCheckedKeys,lt=Pe.dragOverNodeKey,Lt=Pe.dropPosition,Mt=Pe.keyEntities,pt=(0,gt.Z)(Mt,Se),dn={eventKey:Se,expanded:Oe.indexOf(Se)!==-1,selected:Re.indexOf(Se)!==-1,loaded:tt.indexOf(Se)!==-1,loading:rt.indexOf(Se)!==-1,checked:Je.indexOf(Se)!==-1,halfChecked:bt.indexOf(Se)!==-1,pos:String(pt?pt.pos:""),dragOver:lt===Se&&Lt===0,dragOverGapTop:lt===Se&&Lt===-1,dragOverGapBottom:lt===Se&&Lt===1};return dn}function ve(Se){var Pe=Se.data,Oe=Se.expanded,Re=Se.selected,tt=Se.checked,rt=Se.loaded,Je=Se.loading,bt=Se.halfChecked,lt=Se.dragOver,Lt=Se.dragOverGapTop,Mt=Se.dragOverGapBottom,pt=Se.pos,dn=Se.active,tn=Se.eventKey,vn=(0,St.Z)((0,St.Z)({},Pe),{},{expanded:Oe,selected:Re,checked:tt,loaded:rt,loading:Je,halfChecked:bt,dragOver:lt,dragOverGapTop:Lt,dragOverGapBottom:Mt,pos:pt,active:dn,key:tn});return"props"in vn||Object.defineProperty(vn,"props",{get:function(){return(0,He.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),Se}}),vn}},73299:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return zi}});var fe=Me(87462),Ke=Me(1413),St=Me(71002),zt=Me(97685),ft=Me(4942),Be=Me(45987),He=Me(67294),gt=Me(73935),it=Me(94184),st=Me.n(it),Ft=Me(48555),Nt=He.forwardRef(function(an,we){var Ut=an.height,en=an.offsetY,cn=an.offsetX,xn=an.children,In=an.prefixCls,ni=an.onInnerResize,Ui=an.innerProps,Ot=an.rtl,_t=an.extra,Ct={},Jt={display:"flex",flexDirection:"column"};if(en!==void 0){var ci;Ct={height:Ut,position:"relative",overflow:"hidden"},Jt=(0,Ke.Z)((0,Ke.Z)({},Jt),{},(ci={transform:"translateY(".concat(en,"px)")},(0,ft.Z)(ci,Ot?"marginRight":"marginLeft",-cn),(0,ft.Z)(ci,"position","absolute"),(0,ft.Z)(ci,"left",0),(0,ft.Z)(ci,"right",0),(0,ft.Z)(ci,"top",0),ci))}return He.createElement("div",{style:Ct},He.createElement(Ft.Z,{onResize:function(_n){var It=_n.offsetHeight;It&&ni&&ni()}},He.createElement("div",(0,fe.Z)({style:Jt,className:st()((0,ft.Z)({},"".concat(In,"-holder-inner"),In)),ref:we},Ui),xn,_t)))});Nt.displayName="Filler";var Bt=Nt,Ae=function(we){return+setTimeout(we,16)},ne=function(we){return clearTimeout(we)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Ae=function(we){return window.requestAnimationFrame(we)},ne=function(we){return window.cancelAnimationFrame(we)});var te=0,ue=new Map;function se(an){ue.delete(an)}var pe=function(we){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;te+=1;var en=te;function cn(xn){if(xn===0)se(en),we();else{var In=Ae(function(){cn(xn-1)});ue.set(en,In)}}return cn(Ut),en};pe.cancel=function(an){var we=ue.get(an);return se(we),ne(we)};var ve=pe;function Se(an,we){var Ut="touches"in an?an.touches[0]:an;return Ut[we?"pageX":"pageY"]}var Pe=He.forwardRef(function(an,we){var Ut,en=an.prefixCls,cn=an.rtl,xn=an.scrollOffset,In=an.scrollRange,ni=an.onStartMove,Ui=an.onStopMove,Ot=an.onScroll,_t=an.horizontal,Ct=an.spinSize,Jt=an.containerSize,ci=an.style,Xn=an.thumbStyle,_n=He.useState(!1),It=(0,zt.Z)(_n,2),hn=It[0],Ci=It[1],Ri=He.useState(null),Ln=(0,zt.Z)(Ri,2),Rt=Ln[0],Si=Ln[1],Zi=He.useState(null),Wr=(0,zt.Z)(Zi,2),En=Wr[0],li=Wr[1],bo=!cn,La=He.useRef(),sa=He.useRef(),Yi=He.useState(!1),Wi=(0,zt.Z)(Yi,2),er=Wi[0],Mo=Wi[1],ra=He.useRef(),ai=function(){clearTimeout(ra.current),Mo(!0),ra.current=setTimeout(function(){Mo(!1)},3e3)},Mr=In-Jt||0,ml=Jt-Ct||0,xs=Mr>0,$a=He.useMemo(function(){if(xn===0||Mr===0)return 0;var _o=xn/Mr;return _o*ml},[xn,Mr,ml]),Wt=function(da){da.stopPropagation(),da.preventDefault()},$i=He.useRef({top:$a,dragging:hn,pageY:Rt,startTop:En});$i.current={top:$a,dragging:hn,pageY:Rt,startTop:En};var Vo=function(da){Ci(!0),Si(Se(da,_t)),li($i.current.top),ni(),da.stopPropagation(),da.preventDefault()};He.useEffect(function(){var _o=function(Sn){Sn.preventDefault()},da=La.current,bn=sa.current;return da.addEventListener("touchstart",_o),bn.addEventListener("touchstart",Vo),function(){da.removeEventListener("touchstart",_o),bn.removeEventListener("touchstart",Vo)}},[]);var Pr=He.useRef();Pr.current=Mr;var Ia=He.useRef();Ia.current=ml,He.useEffect(function(){if(hn){var _o,da=function(Sn){var Zo=$i.current,js=Zo.dragging,Vr=Zo.pageY,Ll=Zo.startTop;if(ve.cancel(_o),js){var Ha=Se(Sn,_t)-Vr,$o=Ll;!bo&&_t?$o-=Ha:$o+=Ha;var Ba=Pr.current,nl=Ia.current,wa=nl?$o/nl:0,ki=Math.ceil(wa*Ba);ki=Math.max(ki,0),ki=Math.min(ki,Ba),_o=ve(function(){Ot(ki,_t)})}},bn=function(){Ci(!1),Ui()};return window.addEventListener("mousemove",da),window.addEventListener("touchmove",da),window.addEventListener("mouseup",bn),window.addEventListener("touchend",bn),function(){window.removeEventListener("mousemove",da),window.removeEventListener("touchmove",da),window.removeEventListener("mouseup",bn),window.removeEventListener("touchend",bn),ve.cancel(_o)}}},[hn]),He.useEffect(function(){ai()},[xn]),He.useImperativeHandle(we,function(){return{delayHidden:ai}});var zo="".concat(en,"-scrollbar"),na={position:"absolute",visibility:er&&xs?null:"hidden"},Fo={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return _t?(na.height=8,na.left=0,na.right=0,na.bottom=0,Fo.height="100%",Fo.width=Ct,bo?Fo.left=$a:Fo.right=$a):(na.width=8,na.top=0,na.bottom=0,bo?na.right=0:na.left=0,Fo.width="100%",Fo.height=Ct,Fo.top=$a),He.createElement("div",{ref:La,className:st()(zo,(Ut={},(0,ft.Z)(Ut,"".concat(zo,"-horizontal"),_t),(0,ft.Z)(Ut,"".concat(zo,"-vertical"),!_t),(0,ft.Z)(Ut,"".concat(zo,"-visible"),er),Ut)),style:(0,Ke.Z)((0,Ke.Z)({},na),ci),onMouseDown:Wt,onMouseMove:ai},He.createElement("div",{ref:sa,className:st()("".concat(zo,"-thumb"),(0,ft.Z)({},"".concat(zo,"-thumb-moving"),hn)),style:(0,Ke.Z)((0,Ke.Z)({},Fo),Xn),onMouseDown:Vo}))}),Oe=Pe;function Re(an){var we=an.children,Ut=an.setRef,en=He.useCallback(function(cn){Ut(cn)},[]);return He.cloneElement(we,{ref:en})}function tt(an,we,Ut,en,cn,xn,In){var ni=In.getKey;return an.slice(we,Ut+1).map(function(Ui,Ot){var _t=we+Ot,Ct=xn(Ui,_t,{style:{width:en}}),Jt=ni(Ui);return He.createElement(Re,{key:Jt,setRef:function(Xn){return cn(Ui,Xn)}},Ct)})}function rt(an){return an instanceof HTMLElement||an instanceof SVGElement}function Je(an){return rt(an)?an:an instanceof He.Component?gt.findDOMNode(an):null}var bt=Me(15671),lt=Me(43144),Lt=function(){function an(){(0,bt.Z)(this,an),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,lt.Z)(an,[{key:"set",value:function(Ut,en){this.maps[Ut]=en,this.id+=1}},{key:"get",value:function(Ut){return this.maps[Ut]}}]),an}(),Mt=Lt;function pt(an,we,Ut){var en=He.useState(0),cn=(0,zt.Z)(en,2),xn=cn[0],In=cn[1],ni=(0,He.useRef)(new Map),Ui=(0,He.useRef)(new Mt),Ot=(0,He.useRef)();function _t(){ve.cancel(Ot.current)}function Ct(){var ci=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;_t();var Xn=function(){ni.current.forEach(function(It,hn){if(It&&It.offsetParent){var Ci=Je(It),Ri=Ci.offsetHeight;Ui.current.get(hn)!==Ri&&Ui.current.set(hn,Ci.offsetHeight)}}),In(function(It){return It+1})};ci?Xn():Ot.current=ve(Xn)}function Jt(ci,Xn){var _n=an(ci),It=ni.current.get(_n);Xn?(ni.current.set(_n,Xn),Ct()):ni.current.delete(_n),!It!=!Xn&&(Xn?we==null||we(ci):Ut==null||Ut(ci))}return(0,He.useEffect)(function(){return _t},[]),[Jt,Ct,Ui.current,xn]}function dn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var tn=dn()?He.useLayoutEffect:He.useEffect,vn=function(we,Ut){var en=He.useRef(!0);tn(function(){return we(en.current)},Ut),tn(function(){return en.current=!1,function(){en.current=!0}},[])},Tn=function(we,Ut){vn(function(en){if(!en)return we()},Ut)},Ve=vn;function Ze(an){var we=He.useRef();we.current=an;var Ut=He.useCallback(function(){for(var en,cn=arguments.length,xn=new Array(cn),In=0;In<cn;In++)xn[In]=arguments[In];return(en=we.current)===null||en===void 0?void 0:en.call.apply(en,[we].concat(xn))},[]);return Ut}function Qe(an){var we=React.useRef(!1),Ut=React.useState(an),en=_slicedToArray(Ut,2),cn=en[0],xn=en[1];React.useEffect(function(){return we.current=!1,function(){we.current=!0}},[]);function In(ni,Ui){Ui&&we.current||xn(ni)}return[cn,In]}function mn(an){return an!==void 0}function kn(an,we){var Ut=we||{},en=Ut.defaultValue,cn=Ut.value,xn=Ut.onChange,In=Ut.postState,ni=useState(function(){return mn(cn)?cn:mn(en)?typeof en=="function"?en():en:typeof an=="function"?an():an}),Ui=_slicedToArray(ni,2),Ot=Ui[0],_t=Ui[1],Ct=cn!==void 0?cn:Ot,Jt=In?In(Ct):Ct,ci=useEvent(xn),Xn=useState([Ct]),_n=_slicedToArray(Xn,2),It=_n[0],hn=_n[1];useLayoutUpdateEffect(function(){var Ri=It[0];Ot!==Ri&&ci(Ot,Ri)},[It]),useLayoutUpdateEffect(function(){mn(cn)||_t(cn)},[cn]);var Ci=useEvent(function(Ri,Ln){_t(Ri,Ln),hn([Ct],Ln)});return[Jt,Ci]}var At=Me(31461);function pn(an,we,Ut){var en=React.useRef({});return(!("value"in en.current)||Ut(en.current.condition,we))&&(en.current.value=an(),en.current.condition=we),en.current.value}function ln(an,we){typeof an=="function"?an(we):_typeof(an)==="object"&&an&&"current"in an&&(an.current=we)}function jn(){for(var an=arguments.length,we=new Array(an),Ut=0;Ut<an;Ut++)we[Ut]=arguments[Ut];var en=we.filter(function(cn){return cn});return en.length<=1?en[0]:function(cn){we.forEach(function(xn){ln(xn,cn)})}}function Gt(){for(var an=arguments.length,we=new Array(an),Ut=0;Ut<an;Ut++)we[Ut]=arguments[Ut];return useMemo(function(){return jn.apply(void 0,we)},we,function(en,cn){return en.length!==cn.length||en.every(function(xn,In){return xn!==cn[In]})})}function mt(an){var we,Ut,en=isMemo(an)?an.type.type:an.type;return!(typeof en=="function"&&!((we=en.prototype)!==null&&we!==void 0&&we.render)||typeof an=="function"&&!((Ut=an.prototype)!==null&&Ut!==void 0&&Ut.render))}function Et(an){return!isValidElement(an)||isFragment(an)?!1:mt(an)}function on(an,we,Ut,en){if(!we.length)return Ut;var cn=_toArray(we),xn=cn[0],In=cn.slice(1),ni;return!an&&typeof xn=="number"?ni=[]:Array.isArray(an)?ni=_toConsumableArray(an):ni=_objectSpread({},an),en&&Ut===void 0&&In.length===1?delete ni[xn][In[0]]:ni[xn]=on(ni[xn],In,Ut,en),ni}function Yt(an,we,Ut){var en=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return we.length&&en&&Ut===void 0&&!get(an,we.slice(0,-1))?an:on(an,we,Ut,en)}function ze(an){return _typeof(an)==="object"&&an!==null&&Object.getPrototypeOf(an)===Object.prototype}function be(an){return Array.isArray(an)?[]:{}}var Ce=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function De(){for(var an=arguments.length,we=new Array(an),Ut=0;Ut<an;Ut++)we[Ut]=arguments[Ut];var en=be(we[0]);return we.forEach(function(cn){function xn(In,ni){var Ui=new Set(ni),Ot=get(cn,In),_t=Array.isArray(Ot);if(_t||ze(Ot)){if(!Ui.has(Ot)){Ui.add(Ot);var Ct=get(en,In);_t?en=Yt(en,In,[]):(!Ct||_typeof(Ct)!=="object")&&(en=Yt(en,In,be(Ot))),Ce(Ot).forEach(function(Jt){xn([].concat(_toConsumableArray(In),[Jt]),Ui)})}}else en=Yt(en,In,Ot)}xn([])}),en}var Ge={},Fe=[],qe=function(we){Fe.push(we)};function rn(an,we){if(0)var Ut}function Kn(an,we){if(0)var Ut}function Zn(){Ge={}}function $t(an,we,Ut){!we&&!Ge[Ut]&&(an(!1,Ut),Ge[Ut]=!0)}function Nn(an,we){$t(rn,an,we)}function Zt(an,we){$t(Kn,an,we)}Nn.preMessage=qe,Nn.resetWarned=Zn,Nn.noteOnce=Zt;var qn=null,$n=10;function oi(an,we,Ut,en,cn,xn,In,ni){var Ui=He.useRef(),Ot=He.useState(null),_t=(0,zt.Z)(Ot,2),Ct=_t[0],Jt=_t[1];return Ve(function(){if(Ct&&Ct.times<$n){if(!an.current){Jt(function(ai){return(0,Ke.Z)({},ai)});return}xn();var ci=Ct.targetAlign,Xn=Ct.originAlign,_n=Ct.index,It=Ct.offset,hn=an.current.clientHeight,Ci=!1,Ri=ci,Ln=null;if(hn){for(var Rt=ci||Xn,Si=0,Zi=0,Wr=0,En=Math.min(we.length-1,_n),li=0;li<=En;li+=1){var bo=cn(we[li]);Zi=Si;var La=Ut.get(bo);Wr=Zi+(La===void 0?en:La),Si=Wr}for(var sa=Rt==="top"?It:hn-It,Yi=En;Yi>=0;Yi-=1){var Wi=cn(we[Yi]),er=Ut.get(Wi);if(er===void 0){Ci=!0;break}if(sa-=er,sa<=0)break}switch(Rt){case"top":Ln=Zi-It;break;case"bottom":Ln=Wr-hn+It;break;default:{var Mo=an.current.scrollTop,ra=Mo+hn;Zi<Mo?Ri="top":Wr>ra&&(Ri="bottom")}}Ln!==null&&In(Ln),Ln!==Ct.lastTop&&(Ci=!0)}Ci&&Jt(function(ai){return(0,Ke.Z)((0,Ke.Z)({},ai),{},{times:ai.times+1,targetAlign:Ri,lastTop:Ln})})}},[Ct,an.current]),function(ci){if(ci==null){ni();return}if(ve.cancel(Ui.current),typeof ci=="number")In(ci);else if(ci&&(0,St.Z)(ci)==="object"){var Xn,_n=ci.align;"index"in ci?Xn=ci.index:Xn=we.findIndex(function(Ci){return cn(Ci)===ci.key});var It=ci.offset,hn=It===void 0?0:It;Jt({times:0,index:Xn,offset:hn,originAlign:_n})}}}function ri(an,we,Ut,en){var cn=Ut-an,xn=we-Ut,In=Math.min(cn,xn)*2;if(en<=In){var ni=Math.floor(en/2);return en%2?Ut+ni+1:Ut-ni}return cn>xn?Ut-(en-xn):Ut+(en-cn)}function fr(an,we,Ut){var en=an.length,cn=we.length,xn,In;if(en===0&&cn===0)return null;en<cn?(xn=an,In=we):(xn=we,In=an);var ni={__EMPTY_ITEM__:!0};function Ui(Xn){return Xn!==void 0?Ut(Xn):ni}for(var Ot=null,_t=Math.abs(en-cn)!==1,Ct=0;Ct<In.length;Ct+=1){var Jt=Ui(xn[Ct]),ci=Ui(In[Ct]);if(Jt!==ci){Ot=Ct,_t=_t||Jt!==Ui(In[Ct+1]);break}}return Ot===null?null:{index:Ot,multiple:_t}}function wr(an,we,Ut){var en=He.useState(an),cn=(0,zt.Z)(en,2),xn=cn[0],In=cn[1],ni=He.useState(null),Ui=(0,zt.Z)(ni,2),Ot=Ui[0],_t=Ui[1];return He.useEffect(function(){var Ct=fr(xn||[],an||[],we);(Ct==null?void 0:Ct.index)!==void 0&&(Ut==null||Ut(Ct.index),_t(an[Ct.index])),In(an)},[an]),[Ot]}var Li=(typeof navigator=="undefined"?"undefined":(0,St.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ai=Li,Ur=function(an,we){var Ut=(0,He.useRef)(!1),en=(0,He.useRef)(null);function cn(){clearTimeout(en.current),Ut.current=!0,en.current=setTimeout(function(){Ut.current=!1},50)}var xn=(0,He.useRef)({top:an,bottom:we});return xn.current.top=an,xn.current.bottom=we,function(In){var ni=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ui=In<0&&xn.current.top||In>0&&xn.current.bottom;return ni&&Ui?(clearTimeout(en.current),Ut.current=!1):(!Ui||Ut.current)&&cn(),!Ut.current&&Ui}};function Yn(an,we,Ut,en,cn){var xn=(0,He.useRef)(0),In=(0,He.useRef)(null),ni=(0,He.useRef)(null),Ui=(0,He.useRef)(!1),Ot=Ur(we,Ut);function _t(It,hn){ve.cancel(In.current),xn.current+=hn,ni.current=hn,!Ot(hn)&&(Ai||It.preventDefault(),In.current=ve(function(){var Ci=Ui.current?10:1;cn(xn.current*Ci),xn.current=0}))}function Ct(It,hn){cn(hn,!0),Ai||It.preventDefault()}var Jt=(0,He.useRef)(null),ci=(0,He.useRef)(null);function Xn(It){if(an){ve.cancel(ci.current),ci.current=ve(function(){Jt.current=null},2);var hn=It.deltaX,Ci=It.deltaY,Ri=It.shiftKey,Ln=hn,Rt=Ci;(Jt.current==="sx"||!Jt.current&&Ri&&Ci&&!hn)&&(Ln=Ci,Rt=0,Jt.current="sx");var Si=Math.abs(Ln),Zi=Math.abs(Rt);Jt.current===null&&(Jt.current=en&&Si>Zi?"x":"y"),Jt.current==="y"?_t(It,Rt):Ct(It,Ln)}}function _n(It){an&&(Ui.current=It.detail===ni.current)}return[Xn,_n]}var Rn=14/15;function sr(an,we,Ut){var en=(0,He.useRef)(!1),cn=(0,He.useRef)(0),xn=(0,He.useRef)(null),In=(0,He.useRef)(null),ni,Ui=function(Jt){if(en.current){var ci=Math.ceil(Jt.touches[0].pageY),Xn=cn.current-ci;cn.current=ci,Ut(Xn)&&Jt.preventDefault(),clearInterval(In.current),In.current=setInterval(function(){Xn*=Rn,(!Ut(Xn,!0)||Math.abs(Xn)<=.1)&&clearInterval(In.current)},16)}},Ot=function(){en.current=!1,ni()},_t=function(Jt){ni(),Jt.touches.length===1&&!en.current&&(en.current=!0,cn.current=Math.ceil(Jt.touches[0].pageY),xn.current=Jt.target,xn.current.addEventListener("touchmove",Ui),xn.current.addEventListener("touchend",Ot))};ni=function(){xn.current&&(xn.current.removeEventListener("touchmove",Ui),xn.current.removeEventListener("touchend",Ot))},Ve(function(){return an&&we.current.addEventListener("touchstart",_t),function(){var Ct;(Ct=we.current)===null||Ct===void 0||Ct.removeEventListener("touchstart",_t),ni(),clearInterval(In.current)}},[an])}var xr=20;function Ni(){var an=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ut=an/we*100;return isNaN(Ut)&&(Ut=0),Ut=Math.max(Ut,xr),Ut=Math.min(Ut,an/2),Math.floor(Ut)}function lr(an,we,Ut,en){var cn=He.useMemo(function(){return[new Map,[]]},[an,Ut.id,en]),xn=(0,zt.Z)(cn,2),In=xn[0],ni=xn[1],Ui=function(_t){var Ct=arguments.length>1&&arguments[1]!==void 0?arguments[1]:_t,Jt=In.get(_t),ci=In.get(Ct);if(Jt===void 0||ci===void 0)for(var Xn=an.length,_n=ni.length;_n<Xn;_n+=1){var It,hn=an[_n],Ci=we(hn);In.set(Ci,_n);var Ri=(It=Ut.get(Ci))!==null&&It!==void 0?It:en;if(ni[_n]=(ni[_n-1]||0)+Ri,Ci===_t&&(Jt=_n),Ci===Ct&&(ci=_n),Jt!==void 0&&ci!==void 0)break}return{top:ni[Jt-1]||0,bottom:ni[ci]}};return Ui}var mo=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],pi=[],ti={overflowY:"auto",overflowAnchor:"none"};function hi(an,we){var Ut=an.prefixCls,en=Ut===void 0?"rc-virtual-list":Ut,cn=an.className,xn=an.height,In=an.itemHeight,ni=an.fullHeight,Ui=ni===void 0?!0:ni,Ot=an.style,_t=an.data,Ct=an.children,Jt=an.itemKey,ci=an.virtual,Xn=an.direction,_n=an.scrollWidth,It=an.component,hn=It===void 0?"div":It,Ci=an.onScroll,Ri=an.onVirtualScroll,Ln=an.onVisibleChange,Rt=an.innerProps,Si=an.extraRender,Zi=an.styles,Wr=(0,Be.Z)(an,mo),En=!!(ci!==!1&&xn&&In),li=En&&_t&&(In*_t.length>xn||!!_n),bo=Xn==="rtl",La=st()(en,(0,ft.Z)({},"".concat(en,"-rtl"),bo),cn),sa=_t||pi,Yi=(0,He.useRef)(),Wi=(0,He.useRef)(),er=(0,He.useState)(0),Mo=(0,zt.Z)(er,2),ra=Mo[0],ai=Mo[1],Mr=(0,He.useState)(0),ml=(0,zt.Z)(Mr,2),xs=ml[0],$a=ml[1],Wt=(0,He.useState)(!1),$i=(0,zt.Z)(Wt,2),Vo=$i[0],Pr=$i[1],Ia=function(){Pr(!0)},zo=function(){Pr(!1)},na=He.useCallback(function(Bo){return typeof Jt=="function"?Jt(Bo):Bo==null?void 0:Bo[Jt]},[Jt]),Fo={getKey:na};function _o(Bo){ai(function(ia){var Ua;typeof Bo=="function"?Ua=Bo(ia):Ua=Bo;var cs=uo(Ua);return Yi.current.scrollTop=cs,cs})}var da=(0,He.useRef)({start:0,end:sa.length}),bn=(0,He.useRef)(),Ga=wr(sa,na),Sn=(0,zt.Z)(Ga,1),Zo=Sn[0];bn.current=Zo;var js=pt(na,null,null),Vr=(0,zt.Z)(js,4),Ll=Vr[0],Ha=Vr[1],$o=Vr[2],Ba=Vr[3],nl=He.useMemo(function(){if(!En)return{scrollHeight:void 0,start:0,end:sa.length-1,offset:void 0};if(!li){var Bo;return{scrollHeight:((Bo=Wi.current)===null||Bo===void 0?void 0:Bo.offsetHeight)||0,start:0,end:sa.length-1,offset:void 0}}for(var ia=0,Ua,cs,Sr,Zh=sa.length,_u=0;_u<Zh;_u+=1){var Sl=sa[_u],Wh=na(Sl),lh=$o.get(Wh),Di=ia+(lh===void 0?In:lh);Di>=ra&&Ua===void 0&&(Ua=_u,cs=ia),Di>ra+xn&&Sr===void 0&&(Sr=_u),ia=Di}return Ua===void 0&&(Ua=0,cs=0,Sr=Math.ceil(xn/In)),Sr===void 0&&(Sr=sa.length-1),Sr=Math.min(Sr+1,sa.length-1),{scrollHeight:ia,start:Ua,end:Sr,offset:cs}},[li,En,ra,sa,Ba,xn]),wa=nl.scrollHeight,ki=nl.start,$e=nl.end,rs=nl.offset;da.current.start=ki,da.current.end=$e;var hu=He.useState({width:0,height:xn}),cu=(0,zt.Z)(hu,2),ul=cu[0],kl=cu[1],zl=function(ia){kl({width:ia.width||ia.offsetWidth,height:ia.height||ia.offsetHeight})},sh=(0,He.useRef)(),Su=(0,He.useRef)(),Ra=He.useMemo(function(){return Ni(ul.width,_n)},[ul.width,_n]),qa=He.useMemo(function(){return Ni(ul.height,wa)},[ul.height,wa]),Nr=wa-xn,vr=(0,He.useRef)(Nr);vr.current=Nr;function uo(Bo){var ia=Bo;return Number.isNaN(vr.current)||(ia=Math.min(ia,vr.current)),ia=Math.max(ia,0),ia}var un=ra<=0,Gr=ra>=Nr,Io=Ur(un,Gr),Va=function(){return{x:bo?-xs:xs,y:ra}},Ta=(0,He.useRef)(Va()),os=Ze(function(){if(Ri){var Bo=Va();(Ta.current.x!==Bo.x||Ta.current.y!==Bo.y)&&(Ri(Bo),Ta.current=Bo)}});function Ws(Bo,ia){var Ua=Bo;ia?((0,gt.flushSync)(function(){$a(Ua)}),os()):_o(Ua)}function vl(Bo){var ia=Bo.currentTarget.scrollTop;ia!==ra&&_o(ia),Ci==null||Ci(Bo),os()}var yl=function(ia){var Ua=ia,cs=_n-ul.width;return Ua=Math.max(Ua,0),Ua=Math.min(Ua,cs),Ua},xu=Ze(function(Bo,ia){ia?((0,gt.flushSync)(function(){$a(function(Ua){var cs=Ua+(bo?-Bo:Bo);return yl(cs)})}),os()):_o(function(Ua){var cs=Ua+Bo;return cs})}),Ou=Yn(En,un,Gr,!!_n,xu),Xt=(0,zt.Z)(Ou,2),El=Xt[0],Gl=Xt[1];sr(En,Yi,function(Bo,ia){return Io(Bo,ia)?!1:(El({preventDefault:function(){},deltaY:Bo}),!0)}),Ve(function(){function Bo(Ua){En&&Ua.preventDefault()}var ia=Yi.current;return ia.addEventListener("wheel",El),ia.addEventListener("DOMMouseScroll",Gl),ia.addEventListener("MozMousePixelScroll",Bo),function(){ia.removeEventListener("wheel",El),ia.removeEventListener("DOMMouseScroll",Gl),ia.removeEventListener("MozMousePixelScroll",Bo)}},[En]),Ve(function(){_n&&$a(function(Bo){return yl(Bo)})},[ul.width,_n]);var wu=function(){var ia,Ua;(ia=sh.current)===null||ia===void 0||ia.delayHidden(),(Ua=Su.current)===null||Ua===void 0||Ua.delayHidden()},vs=oi(Yi,sa,$o,In,na,function(){return Ha(!0)},_o,wu);He.useImperativeHandle(we,function(){return{getScrollInfo:Va,scrollTo:function(ia){function Ua(cs){return cs&&(0,St.Z)(cs)==="object"&&("left"in cs||"top"in cs)}Ua(ia)?(ia.left!==void 0&&$a(yl(ia.left)),vs(ia.top)):vs(ia)}}}),Ve(function(){if(Ln){var Bo=sa.slice(ki,$e+1);Ln(Bo,sa)}},[ki,$e,sa]);var Yu=lr(sa,na,$o,In),Hh=Si==null?void 0:Si({start:ki,end:$e,virtual:li,offsetX:xs,offsetY:rs,rtl:bo,getSize:Yu}),yh=tt(sa,ki,$e,_n,Ll,Ct,Fo),Ka=null;xn&&(Ka=(0,Ke.Z)((0,ft.Z)({},Ui?"height":"maxHeight",xn),ti),En&&(Ka.overflowY="hidden",_n&&(Ka.overflowX="hidden"),Vo&&(Ka.pointerEvents="none")));var Ko={};return bo&&(Ko.dir="rtl"),He.createElement("div",(0,fe.Z)({style:(0,Ke.Z)((0,Ke.Z)({},Ot),{},{position:"relative"}),className:La},Ko,Wr),He.createElement(Ft.Z,{onResize:zl},He.createElement(hn,{className:"".concat(en,"-holder"),style:Ka,ref:Yi,onScroll:vl,onMouseEnter:wu},He.createElement(Bt,{prefixCls:en,height:wa,offsetX:xs,offsetY:rs,scrollWidth:_n,onInnerResize:Ha,ref:Wi,innerProps:Rt,rtl:bo,extra:Hh},yh))),li&&wa>xn&&He.createElement(Oe,{ref:sh,prefixCls:en,scrollOffset:ra,scrollRange:wa,rtl:bo,onScroll:Ws,onStartMove:Ia,onStopMove:zo,spinSize:qa,containerSize:ul.height,style:Zi==null?void 0:Zi.verticalScrollBar,thumbStyle:Zi==null?void 0:Zi.verticalScrollBarThumb}),li&&_n&&He.createElement(Oe,{ref:Su,prefixCls:en,scrollOffset:xs,scrollRange:_n,rtl:bo,onScroll:Ws,onStartMove:Ia,onStopMove:zo,spinSize:Ra,containerSize:ul.width,horizontal:!0,style:Zi==null?void 0:Zi.horizontalScrollBar,thumbStyle:Zi==null?void 0:Zi.horizontalScrollBarThumb}))}var Ii=He.forwardRef(hi);Ii.displayName="List";var ir=Ii,zi=ir},66392:function(Cn,On){"use strict";var Me;var fe=Symbol.for("react.element"),Ke=Symbol.for("react.portal"),St=Symbol.for("react.fragment"),zt=Symbol.for("react.strict_mode"),ft=Symbol.for("react.profiler"),Be=Symbol.for("react.provider"),He=Symbol.for("react.context"),gt=Symbol.for("react.server_context"),it=Symbol.for("react.forward_ref"),st=Symbol.for("react.suspense"),Ft=Symbol.for("react.suspense_list"),Nt=Symbol.for("react.memo"),Bt=Symbol.for("react.lazy"),Ae=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ue){if(typeof ue=="object"&&ue!==null){var se=ue.$$typeof;switch(se){case fe:switch(ue=ue.type,ue){case St:case ft:case zt:case st:case Ft:return ue;default:switch(ue=ue&&ue.$$typeof,ue){case gt:case He:case it:case Bt:case Nt:case Be:return ue;default:return se}}case Ke:return se}}}Me=He,Me=Be,Me=fe,Me=it,Me=St,Me=Bt,Me=Nt,Me=Ke,Me=ft,Me=zt,Me=st,Me=Ft,Me=function(){return!1},Me=function(){return!1},Me=function(ue){return te(ue)===He},Me=function(ue){return te(ue)===Be},Me=function(ue){return typeof ue=="object"&&ue!==null&&ue.$$typeof===fe},Me=function(ue){return te(ue)===it},Me=function(ue){return te(ue)===St},Me=function(ue){return te(ue)===Bt},Me=function(ue){return te(ue)===Nt},Me=function(ue){return te(ue)===Ke},Me=function(ue){return te(ue)===ft},Me=function(ue){return te(ue)===zt},Me=function(ue){return te(ue)===st},Me=function(ue){return te(ue)===Ft},Me=function(ue){return typeof ue=="string"||typeof ue=="function"||ue===St||ue===ft||ue===zt||ue===st||ue===Ft||ue===Ae||typeof ue=="object"&&ue!==null&&(ue.$$typeof===Bt||ue.$$typeof===Nt||ue.$$typeof===Be||ue.$$typeof===He||ue.$$typeof===it||ue.$$typeof===ne||ue.getModuleId!==void 0)},Me=te},31461:function(Cn,On,Me){"use strict";Me(66392)},32637:function(Cn,On,Me){"use strict";Cn.exports=Me.p+"static/AssistantCode3.a8740efb.jpeg"},4977:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(Cn){"use strict";Cn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALAAAAA8CAYAAADGxTD9AAAAAXNSR0IArs4c6QAAFoFJREFUeF7tXQl4k1W6fv8sTbqvlJa2tJSy74ugsiMqq4AKIlDUueNwR2dGHR0XdLwixW3uuF6Xq3O9o15nxuUiIIsCsijK1pa20NJ937eke5tmmec7f/40TfInaUNK6+R7nj5Jk7Of93z/t55w8JBnBYbwCnBDeOyeoXtWAB4Ae0AwpFeA+1SWbbA1A07KQSID6JWT0ivAyThIpBwgBSQy4+fCq0T4jANnrEdlWFkpjK/0ndAetd/znpMaTO0LZcz74tsxti0xjqVXfeNYZcZyxvHSuK3GbDYX03iMbbLy5nOz+pzGbGDrwpfj52DQG2DQAwad8Gcwvudf9ToDQN/pDdBrDYBFWfqMry/UAytP9fjPjJ/rYVHf2L7Qph4GaA0tOj1UnBYqvd6gMugMKr0OKoOOq+UMhhQ5DGfHPRNWMaSRaxy8bQBzPGAZAI3AFMAoAIJtnBnA2WaagdlU39iOAKKeje85FKY2TYDkwWh+APi2ebD0AJ8HMn/AzAHFA4x9Jxwss7bN5yXUpbnwB4SvY3Nu9LmwLr36NIKWAEhA1BlMgOUBCAZYBtJe761Byx+A3vV54Av1efDrtUawm4G+N+D5MfUcHH5s7H890KnqNjRWNGkaqlXqhgp1VV1JwxkOSJUAqUB0xk4s0Q4FgIty4KEweM8Yba+ARCmBzBuQeksgVXKQKugVkAdIoRwhhU+EHJycg0GrNz01Whs6UJhegtLsCmi7tI0GYC8H7osYTPhuO2Z3D9a19gB4sO6Mm8flFSKBd4QcyuFS+MbKIfOWMM6v69KjIq8WhVlFaKpvAQeuFsCr/gh45wmsbXHzsPrcvAfAfV6yn18FjgN8YmUInKiAd4TMJObUlNQj42wWutq7SNtXA9zrIVC88nts7Bgsq+AB8GDZiUEyDrm/BAFj5PBLUAASniNnpeSgvLCSjZADl8dBev8ubD41GIbsAfBg2IVBOAaSnUNnK6GM5DlyQ5UKmSlZ6GjvJBiT5epdGRSP7MRGzbUcvgfA13L1h0DfPtFyBE9VMKuMVqNH2rl0NNapBG78vQ98b9+B2xuu1VQ8AL5WKz+E+pV6cQiaqoAyXAp9tx5pyZfQUNdoBDEKAG5VEhJzrsWUPAC+Fqs+RPsMnOgF3xg5dBod0i9eRmM9D2IAFYB03m5sKRnoqXkAPNArPsT7CxingE+UFDqdHpfSMtHYYJIecn2hnL8DG+sGcooeAA/kav9M+gpIkEMZJYdBq0PqxXS0NDcLMvEFKRTzB1Kx8wD4ZwKqgZ6G/2g5vCPlaGttR+rFZMaRiSSQvLILW58YqPF4ADxQK/1z64cDs05IlByqqiqRX5gvKHV6gLspCYknB2LKHgAPxCr/TPuQ+XAImOQFzsDh0pVLUDcJ5jWUSaGcuBMbW9099WsOYDKYU8Qbi5zqshnZ6e41uGrtSxScU3NQhErR1UBhae4hstkaBiiWzDtSykSJri4NLmYmQ6s1dfz6bmx7xD0z7Gn1mgN4bX48CyapP9eBI/NLXZ5v3JYAzHlnOGvnyMJSqNO7TG36xMjYe41KB22r+GGR+nC48aNIVrb4780o2+OYkYTOVWLRnijk/JcKee+qoVHzMqE5zXlvOGLW+0MRIsXBGUVouuweJ9bys7HwjpJBldaJk2vcH/brP9aLRb1V11aisLzAKEpwWimks3Zic4bLm2qngUED4K5GHWpOttuda+U3bSj83ya7ZeLvCcD1f+HBd3hOMVQXeQDL/DhsVI1l71MerUXOm/zjzhYRV1lfmsC+Sn28FtmviZcV6t/wUSRGbQ5g/575RRWKPuE1c3Ma8+sgXPcmf7gynqvH5d3OO7DkARIowigzwDEtPxcLryApmrK7cGqtYwB31evQ3Wx94Bz3xJcgOThwrBd0Wj1Ssi6gW8sfTA44swuJ8zje9ewWGjQAdmZ2OW+rkPIwRfeJ09UAsH+CHGuuxLNOzj9Yjfz37R8axTAp1hWPBnmsOuu02BtXCL3Ges8IhOvLRkPmI0FjSie+ud55u//YB4Iw+w0e/Febkh+qQe47apea9Y2VQeYrQXlNGcpqeubFQfKrJGz9wKXG7VQeNADuqNKi6FNrrmU+9rqfOlDxtf3HudMAfkuFmPV+iN0QgMyXG6BK6xE1gqYpsDI5jnX9071VKHYwrklPhWDa88NY+csvNiDj2XrRJZ/7fgRG3xfIvv8qrgAdFc4Jq4MdwHQoCcQkA6fmXIBOz8v4HNAog2zcc9gsviguoNutAKZHsdRHYnd4y76LgU+UHKr0TvxwFx+y54iIu7WX9Ww8SwGS8/mp8YkBmPNuBHv/7fwSHph6A0jBshQhVqbGIWiKAgUfqnFue42p22HzvHHzyZHs/+83VKB8r/ihoRQjkuMp6IVShvYlFGLyjlCEzVXanIZXiJS5Y4laizSij+78/2lisrRA8kAJCz53RKO2BLL+ic5tr0btaftiGZXrrNGhu6n/IoQwJt+RMrbOJTVFqG4030vJX3dj632Oxt6f790K4CWHohF5s29/xmW3DoH98Oyex9TY3wRh9mvij1f15S4cWVBiBWCBW2vb9fhqZIFpEyNv9sGSQzFsDCdWlqHqqDgIiIsv+DyKlS39/xac3lSJpd9EI+Im1+Z9+YUGZPyHbaYVMlOB0DneNtdo5J3+GL7Ih31HcraYtYPmXPSx/SdeXzeORAifETJ0dnYivTgFBoMgRpEMLF24G5tP97VNR+WHJIBL97TgtBm37i+AJV4c1hbEsywEc8XOHJRHl5Si7rTtBASZLwfi4n7xXmydT60rR8XBNkx/IQwhM3s4cMgsJVOqCDT1Z5xLZij6W7MowMxFFkcbLPZ9R7UWX8XwFoOrSd4jOUilMuRWZkHdZq78cpdliJ5xtZNFBwTAxAW+u7nMap1uOhbDTEo1p9qR8oh95Ywe9YJp68fESpT8oyc9K+x6JUas8GPtB09TIGoV/55Eg45qHTprtSj8qMmmFWLKs6GY8scwNOdqcGBSEas3KjEAN3xotGRcV9xLPjafBJnFEv4tyPTRsZtKUfu9NUBJTApf6NOrD1dAYw7gikOt0Hc7r+SHTFcys6W7AOwVLIFXoBQ16iqU1BdaTvOJ3dj2iitzt6w7IADuqNHiq2jr0357xWgow2UoP9CK8/9eDZ8YOXxjZPAZaXyNkcN7uBRHF5dh7gcRGH1vIHQaA/ZE5ovKjk4rcUYzmt9oOW7L5i0Ox28tQ/Xxdkz+YyimPhvGPvsyPA8albV8GLXaF4u+iu61nqIAPhGD8Pk+aM7R4MBk/pC4QuYA3juqAJo+yK/XvRUOkpPdBWB6qpHuo9F0I73sgsU0uTYZFOShc93gb2x5wAD89YQiDLteyUBKDgVSZGI3+bOUb0e0L6EAEx8PRfQaP6gyOnFytbhts68Apr5vOT0SYXO9Uba3BT9sqMSNn0QiblMAOuu12BNpffDIbLYqLY4dPnMSA/CKlFgET1UyRdVcdnc0b7HvB7MIQWP2jiJlk8OVqgy0a6wU4H27sW1df+d+zTjwiRXlTF60R6TFd1Rq0VbSjbYyLdpLu9FW2s2UoxG3+qK1RIumzC67GnN/AEwmqmlJw5D3ngppO+pBjgCSYet+bGfc35IW7olih4mIQK4M44EsBuC1hfHswDYkd+LECuv2zNunC0wcORXMAaxR060nzsNB6ith9mp3cWAaiVewFBQnUaEqRVVzudXgOEjWJGHrAedHLV5ywDjw/rGFWF86Gu2lWrSV8cCM3xbIjPoElB+3VjHw0gbaIsHlXPyPZvyUWCU6I0sAtxV3Y/QvApH332pRTxx56TgJZwLOBtUYyP0kKPhrE87dX92rL6k3hzvrEtiTgwBZ+HGTybsmBuCN6jHMyO8M0eElU5w9MgfwF2F5fTKBCXZodwKY3MoE4rauVmTX2vQkF4dCOfFqpOcPGIBtycArLsQieLoS3a16ZL/WaFOWkyo4hN3gjejVPMdLe7oOWa+YUlms9tkcwAR2Uuh0HXrsH1folCuZYgjWF4/m+9pRh6w/Wfe1+EAUgiYp8M0NJezJILiubQGYAmvu7hjnDHZZmeY8DQ5MtC8nmwOY5Gq6b81Z8o6UMYuIOwFM3gvv4TLGjDJqkqHVWcd8SICXdmHbU86OW6zcNQWwI/OX5aAJ6IdnFqO1yPZNR8RJJz8dhomPhfSqShz/4NQipwAcscwHSw/zNuDv76hA+X5rJwYFDJFtmQKFzA+MLQCbx1VUHmlD9bE2m3sx/qFg5tBRZ3bh0PRipzlwfwHgVgADkAdL2F1zZc1FqG/v/RQzjrmbg9e0JGy60t85UD23AniZUfsmj9P+sdZchTRWAgxxMb943jtli7Tt5HnrRsnnLWg4T/cS9KaEXwZi5EZ/pulLjB45KkHyYe7bauS8pWIXdDgTzDPrtXCM+00w62BPTD46q+2HPToCcNQqXyzay1srLM1/5rNYkRyL4GlKNKZ24pu59mMkzDnwoZnF0DQ5H5o546VhzH3ubgBLlRLI/Tk0dzQjX51pc185cCeTkLhk0AL4ttxR8BvlxdyZx5bwygu5Q8l1KRDJpxTk0pKnYU4Aoti7/EEu1/Zyba/YB3Kn2nJ5Lvh8BAtTtKRvbyxBwwUe8M5Go60rjudd2xmdODzLcbCNIwBPfT4Mk5/iXbv2QihXpsUxsaTuTAeOLrRvZTIHcOmXLcy06CyRJYgcL+4GMF1XJQ+RsvvWLjcmQ0fXadogCbh7diHxY2fHb1nOrRz4rtYxTNkp+byZhQ7OejUc4Yt9cHBKEVryeDFAUM7MvWurMuIQOEGB6hNtOH4Lr8WS6eq23HhUHm5F+tP1vcSIcb8NwqQdoaDNNHQD437Lc1BnwinZ3b7G8xS+0BvLvuNjILLfaETqY44TbB0BeOmRaEQs8WXOhs8CckUDzVdfHoWAcV6oOtYGstjYo8FuRhPGToyJ4lRKW4rQ2NUTa2I+N7o8UAq/cTuxvl/hcG4DMGUd3FHNx9ReebWRKV7ktiVtPPcdFZIf4j1vzgJ4WlIYJj0RCl0nKWRFzGIhELl0dZ383bt9MaORy3j6i8NwfHk5yFohgI3abS3U4OCMYuja7XM3ewCmw3Fn3RjQfWP15ztwZJ44Z70tLx5+cXKTLdpZAP90TxW0rc4H4ox9MAgRS33dzoFp/BTYQ0p4i6YZha1Z9qb03m5s+3V/uLDbAEw3uaxM4e2+KY/VIucNFWb+aRjGPxzCrA57YwuY2coZAFMg9205o9j9tln/2Yi0p8Q5oxiAzZUpciuTB45kZqLkR2qgvtSFZcd47isQZVc4cnHbA/DIDf6Y/7cRrDlH1hMyMZKFoOj/mnDmvt5KD3FmWk+BYtb5IXYjHzx/9pdVIB3BWRqzPYgF+5B+cP6BHq6ozuhinsKrSSRGyPwl7B7izJZU6ETynDhAL4X0hp3Ycr6v/bsNwObKy+m7K9njnUxUxIVJO039Qy2yX1c5BeDrP4xAfGIgU1b2jym06doVJi4GYOK0ltYJqlN9vA2Xkhow+9VwZtKjCKqa4+0smozeH1taJhrMQ/XtAfjmUyMx7EY+auzriYUmscnWJt1Zn8BiCLLfVCH10d5xIRMeDcaMl8L7urd9Kn/xyVpc+bPjzJM+NUpc2FsCCQeUdRRA1S3OeDjg4lQor9uIjc5rpO60Qlz39nCM+RUf6GKuTC3aH4WoFX4sFpZEgbV5fE6cmAx8OanBJJemP1uHzBfFbcCWgBJkYP8xcqzJ4uMdiAiYFBif+VIjU/JINhfk5rz31YzDr8kZxTxsZJc9NKNYNFlTDMAhsxRYfpZ/AjnjQt7UOZYd7LRn6pD1cu85DmUAc3L6SQgJ2rXNKOiwK0ZQbu9Du7Dtzb4cErdwYDLe316eAJKDyQa7L77HsxS9zg8Lv4hC7Q/tOL25EreejrULYJKdKZWGLBDkzeuLTGquxJFiSMmHJZ+1IOvlBjRl8Y9LYTz0XrAXU8KneQaEvYMjBmDzWGjhCSS2MaSg3lHJ6wskEhR+ZB2nS8qQJUUs8wVF01Ecx8Wn6pD9qu3DPeU53hJCQVXkkcx/X42uut6MTswD2hcwiZUlzxz9NkduZxq6DeJiCgeu2RsY/zTsuFotOnELgEes9MXifbzt0zLFhsBNFgaSOYmckYFJGfIf44XmbMcy2vTdYSzwh+jgtCITUClIvTmvmylrAo1Y7osFX45glhLiyidXlZuC16nPVem8ZYBk9q8nFNq0CdsCsLmVwBnuO/EPIZj+Ap+SRFkkDeesbd3CmAkMI1b4ghwfw+bxMjwRJcSeWF1u/aTggDlvDwc5X8htT0Q28eK/tzD7OMm+7ibBNl+tKUO9zn7WDQd8loRtm5wdk1sALERz0SBI9qOYh/GP8KYtSxKi0djPTxnjWsnBwXEcA5Wt5Ehq48y91UyuJgpf5I15n4xgSiEBjoiSK/dEFYgGukTe4ouFe3rAe+GBGuT/pXfyprkcbysugvqxBDB9tvRIDBMHaPxkEqv+js/oGLbAGzNfCYeuXQ9dFz9fUlDDjNkVFAdB4ZZkUbEkGi/FKUet9mNxGgK1FGhw8ck6u2lPVJZMWgRicvpQZJwJ+KfaWYZ2OeUaOq8LOosvVo7iTCgxuVuvQW53msO6UnC3PI/Eow4LuksGnvnncIz/XTDqz3bgyIJSZqqypUA5M0CxMj9urWTiABFpuhvqE/iFMpKjDGaSUZedGMnuM7jwYA3yP7CdeXzT0RgMX+xjU7myBWAy7y0+EA3/0V649Hw9Lu3qSZ2nQKA7ahLYD6pYEkXiHVtSivqztrmv5RqSKzv/AzX70/fxN4ToYFL0XdBk3rJBThvy/rnzMhT62TNyahTpMtFhsO1OF9aEfsYgHKFTfoeVDh8PbuHANJCJj4ewC0QIGOQgEMvh6i+IKw609hIpxv8+mAWp0O0+ZftanLo0hOKRyUYrBl4aG5mvKOWo6ojtRY+72x+z3+Lz8egOhrofOxhXpUd8+h+tc9oS7g9EAF0EYvwJLNJc6n/qQOW3bb0SVS3XhTyYK5LjUL6vlUXJNSaLixlOrSnHZ55MeSaU5fE1pjrEilPNOiqkMtSiSmc/1oNxbXDPJSFxp6P23AZgRx17vu/HCtAD5mo/5t3Rpp2p6aFHji4VBgdaIwd0SsFN2YlE/tZAEfIAuB848lRxbQUq9Plo0ts3hxp7+HY3ti33ANi19fbUvsor0GFoRZHOvk1Y6FIC7q5dSPzcw4Gv8iZ4mnNtBQp0l9BlcHzFAAeu0h8B48V+JdQjQri2D57a/VyBBkMNanSOw1WNCt0bSUh82FZXHgD3cwM81VxbAT10yNWlQm+6vceupKuTQTJ7J7ZYGZE9AHZtHzy1XViBSn0B1Hpnr5jlziZh642WV7V6AOzCBniqurYCnWhDodZ2upGtliXA9l3Y9r75dx4Au7YHntourkChLhOdDjxzPV1wKl8oxpn/Fp0HwC5ugKe6ayvQbGhAuc75SwY5cB8lIfFeoVcPgF1bf09tl1fAgDxdut0wS+supIt2Y8v3zELxqSz7ajsnXZ6Sp4F/rRVoMFShRmf/yq3eK8JljcSE6dsxu9sD4H8trAzK2eqgQ54uDXohPdyJUXLgnkxC4sseADuxWJ4i7l+Ban0JGvW2U+9t9c4B7QZIJ3oA7P698fTgxAo0GepRobN/qaFlMxy4/f8E90wA8RE2tUgAAAAASUVORK5CYII="},17423:function(Cn,On,Me){"use strict";Me.d(On,{Z:function(){return gt}});const fe=it=>typeof it=="object"&&it!=null&&it.nodeType===1,Ke=(it,st)=>(!st||it!=="hidden")&&it!=="visible"&&it!=="clip",St=(it,st)=>{if(it.clientHeight<it.scrollHeight||it.clientWidth<it.scrollWidth){const Ft=getComputedStyle(it,null);return Ke(Ft.overflowY,st)||Ke(Ft.overflowX,st)||(Nt=>{const Bt=(Ae=>{if(!Ae.ownerDocument||!Ae.ownerDocument.defaultView)return null;try{return Ae.ownerDocument.defaultView.frameElement}catch(ne){return null}})(Nt);return!!Bt&&(Bt.clientHeight<Nt.scrollHeight||Bt.clientWidth<Nt.scrollWidth)})(it)}return!1},zt=(it,st,Ft,Nt,Bt,Ae,ne,te)=>Ae<it&&ne>st||Ae>it&&ne<st?0:Ae<=it&&te<=Ft||ne>=st&&te>=Ft?Ae-it-Nt:ne>st&&te<Ft||Ae<it&&te>Ft?ne-st+Bt:0,ft=it=>{const st=it.parentElement;return st==null?it.getRootNode().host||null:st},Be=(it,st)=>{var Ft,Nt,Bt,Ae;if(typeof document=="undefined")return[];const{scrollMode:ne,block:te,inline:ue,boundary:se,skipOverflowHiddenElements:pe}=st,ve=typeof se=="function"?se:kn=>kn!==se;if(!fe(it))throw new TypeError("Invalid target");const Se=document.scrollingElement||document.documentElement,Pe=[];let Oe=it;for(;fe(Oe)&&ve(Oe);){if(Oe=ft(Oe),Oe===Se){Pe.push(Oe);break}Oe!=null&&Oe===document.body&&St(Oe)&&!St(document.documentElement)||Oe!=null&&St(Oe,pe)&&Pe.push(Oe)}const Re=(Nt=(Ft=window.visualViewport)==null?void 0:Ft.width)!=null?Nt:innerWidth,tt=(Ae=(Bt=window.visualViewport)==null?void 0:Bt.height)!=null?Ae:innerHeight,{scrollX:rt,scrollY:Je}=window,{height:bt,width:lt,top:Lt,right:Mt,bottom:pt,left:dn}=it.getBoundingClientRect(),{top:tn,right:vn,bottom:Tn,left:Ve}=(kn=>{const At=window.getComputedStyle(kn);return{top:parseFloat(At.scrollMarginTop)||0,right:parseFloat(At.scrollMarginRight)||0,bottom:parseFloat(At.scrollMarginBottom)||0,left:parseFloat(At.scrollMarginLeft)||0}})(it);let Ze=te==="start"||te==="nearest"?Lt-tn:te==="end"?pt+Tn:Lt+bt/2-tn+Tn,Qe=ue==="center"?dn+lt/2-Ve+vn:ue==="end"?Mt+vn:dn-Ve;const mn=[];for(let kn=0;kn<Pe.length;kn++){const At=Pe[kn],{height:pn,width:ln,top:jn,right:Gt,bottom:mt,left:Et}=At.getBoundingClientRect();if(ne==="if-needed"&&Lt>=0&&dn>=0&&pt<=tt&&Mt<=Re&&Lt>=jn&&pt<=mt&&dn>=Et&&Mt<=Gt)return mn;const on=getComputedStyle(At),Yt=parseInt(on.borderLeftWidth,10),ze=parseInt(on.borderTopWidth,10),be=parseInt(on.borderRightWidth,10),Ce=parseInt(on.borderBottomWidth,10);let De=0,Ge=0;const Fe="offsetWidth"in At?At.offsetWidth-At.clientWidth-Yt-be:0,qe="offsetHeight"in At?At.offsetHeight-At.clientHeight-ze-Ce:0,rn="offsetWidth"in At?At.offsetWidth===0?0:ln/At.offsetWidth:0,Kn="offsetHeight"in At?At.offsetHeight===0?0:pn/At.offsetHeight:0;if(Se===At)De=te==="start"?Ze:te==="end"?Ze-tt:te==="nearest"?zt(Je,Je+tt,tt,ze,Ce,Je+Ze,Je+Ze+bt,bt):Ze-tt/2,Ge=ue==="start"?Qe:ue==="center"?Qe-Re/2:ue==="end"?Qe-Re:zt(rt,rt+Re,Re,Yt,be,rt+Qe,rt+Qe+lt,lt),De=Math.max(0,De+Je),Ge=Math.max(0,Ge+rt);else{De=te==="start"?Ze-jn-ze:te==="end"?Ze-mt+Ce+qe:te==="nearest"?zt(jn,mt,pn,ze,Ce+qe,Ze,Ze+bt,bt):Ze-(jn+pn/2)+qe/2,Ge=ue==="start"?Qe-Et-Yt:ue==="center"?Qe-(Et+ln/2)+Fe/2:ue==="end"?Qe-Gt+be+Fe:zt(Et,Gt,ln,Yt,be+Fe,Qe,Qe+lt,lt);const{scrollLeft:Zn,scrollTop:$t}=At;De=Kn===0?0:Math.max(0,Math.min($t+De/Kn,At.scrollHeight-pn/Kn+qe)),Ge=rn===0?0:Math.max(0,Math.min(Zn+Ge/rn,At.scrollWidth-ln/rn+Fe)),Ze+=$t-De,Qe+=Zn-Ge}mn.push({el:At,top:De,left:Ge})}return mn},He=it=>it===!1?{block:"end",inline:"nearest"}:(st=>st===Object(st)&&Object.keys(st).length!==0)(it)?it:{block:"start",inline:"nearest"};function gt(it,st){if(!it.isConnected||!(Bt=>{let Ae=Bt;for(;Ae&&Ae.parentNode;){if(Ae.parentNode===document)return!0;Ae=Ae.parentNode instanceof ShadowRoot?Ae.parentNode.host:Ae.parentNode}return!1})(it))return;const Ft=(Bt=>{const Ae=window.getComputedStyle(Bt);return{top:parseFloat(Ae.scrollMarginTop)||0,right:parseFloat(Ae.scrollMarginRight)||0,bottom:parseFloat(Ae.scrollMarginBottom)||0,left:parseFloat(Ae.scrollMarginLeft)||0}})(it);if((Bt=>typeof Bt=="object"&&typeof Bt.behavior=="function")(st))return st.behavior(Be(it,st));const Nt=typeof st=="boolean"||st==null?void 0:st.behavior;for(const{el:Bt,top:Ae,left:ne}of Be(it,He(st))){const te=Ae-Ft.top+Ft.bottom,ue=ne-Ft.left+Ft.right;Bt.scroll({top:te,left:ue,behavior:Nt})}}}}]);
|