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.
NewEduCoderBuild/p__Paperlibrary__Random__Ed...

1304 lines
2.4 MiB

(self.webpackChunk=self.webpackChunk||[]).push([[5816],{71749:function(){"use strict"},30483:function(){"use strict"},71736:function(Rn,$n){"use strict";$n.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},52654:function(Rn,$n){"use strict";$n.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(Rn,$n,be){"use strict";var le=be(67294),Xe=Object.defineProperty,Lt=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,_e=(ut,pt,Rt)=>pt in ut?Xe(ut,pt,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):ut[pt]=Rt,Ve=(ut,pt)=>{for(var Rt in pt||(pt={}))At.call(pt,Rt)&&_e(ut,Rt,pt[Rt]);if(Lt)for(var Rt of Lt(pt))wt.call(pt,Rt)&&_e(ut,Rt,pt[Rt]);return ut};const xt=ut=>React.createElement("svg",Ve({width:14,height:14,xmlns:"http://www.w3.org/2000/svg"},ut),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"})));$n.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},18023:function(){"use strict";function Rn(Te,ne,te,ce){te===void 0&&(te=0),ce===void 0&&(ce=1/0),this._name=Te,this._defaultValue=ne,this._minimum=te,this._maximum=ce}Object.defineProperty(Rn.prototype,"name",{get:function(){return this._name},set:function(Te){if(typeof Te!="string"||Te==="")throw new Error("Shape name must be a valid string.");this._name=Te}}),Object.defineProperty(Rn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("The default value must be a real number, not: "+Te);this._defaultValue=Te}}),Object.defineProperty(Rn.prototype,"minimum",{get:function(){return this._minimum},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("Minimum must be a real number, not: "+Te);this._minimum=Te}}),Object.defineProperty(Rn.prototype,"maximum",{get:function(){return this._maximum},set:function(Te){if(typeof Te!="number"||isNaN(Te))throw new Error("Maximum must be a real number, not: "+Te);this._maximum=Te}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Te,ne){var te=go.Shape._FigureParameters[Te];return te?te[ne]:null},go.Shape.setFigureParameter=function(Te,ne,te){if(!(te instanceof Rn))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 ce=go.Shape._FigureParameters[Te];ce||(ce=[],go.Shape._FigureParameters[Te]=ce),ce[ne]=te};var $n=[];function be(Te,ne){var te=$n.pop();return te===void 0?new go.Point(Te,ne):(te.x=Te,te.y=ne,te)}function le(){var Te=$n.pop();return Te===void 0?new go.Point:Te}function Xe(Te){$n.push(Te)}function Lt(Te,ne,te,ce,se,ge,ye,we,Ce){Ce||(Ce=new go.Point);var Re=Te-te,We=se-ye,lt=NaN,ht=NaN;if(Re===0)if(We===0)Te===te&&(lt=Te,ht=ne);else{var nt=(ge-we)/We,mt=ge-nt*se;lt=Te,ht=nt*lt+mt}else if(We===0){var at=(ne-ce)/Re,Pt=ne-at*Te;lt=se,ht=at*lt+Pt}else{var at=(ne-ce)/Re,nt=(ge-we)/We,Pt=ne-at*Te,mt=ge-nt*se;lt=(mt-Pt)/(at-nt),ht=at*lt+Pt}return Ce.x=lt,Ce.y=ht,Ce}function At(Te,ne,te,ce,se,ge,ye,we,Ce,Re,We,lt,ht,nt){var mt=1-Ce,at=Ce,Pt=Te*mt+te*at,Nt=ne*mt+ce*at,Et=te*mt+se*at,Ln=ce*mt+ge*at,xn=se*mt+ye*at,Nn=ge*mt+we*at,fn=Pt*mt+Et*at,Qe=Nt*mt+Ln*at,Ke=Et*mt+xn*at,Je=Ln*mt+Nn*at,_n=fn*mt+Ke*at,Xn=Qe*mt+Je*at;Re.x=Pt,Re.y=Nt,We.x=fn,We.y=Qe,lt.x=_n,lt.y=Xn,ht.x=Ke,ht.y=Je,nt.x=xn,nt.y=Nn}var wt=new go.Spot(.156,.156),_e=new go.Spot(.844,.844),Ve=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Rn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=5),ce=Math.min(ce,ne/3),ce=Math.min(ce,te/3);var se=ce*Ve,ge=new go.Geometry().add(new go.PathFigure(ce,0,!0).add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)).add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)).add(new go.PathSegment(go.PathSegment.Line,ne,te-ce)).add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,te,ne,te-se,ne-se,te)).add(new go.PathSegment(go.PathSegment.Line,ce,te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te-ce,se,te,0,te-se)).add(new go.PathSegment(go.PathSegment.Line,0,ce)).add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()));return se>1&&(ge.spot1=new go.Spot(0,0,se,se),ge.spot2=new go.Spot(1,1,-se,-se)),ge}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Te,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(Te,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(Te,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(Te,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(Te,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(Te,ne,te){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=te/2,ce.endX=ne,ce.endY=te/2,ce}),go.Shape.defineFigureGenerator("LineV",function(Te,ne,te){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne/2,ce.startY=0,ce.endX=ne/2,ce.endY=te,ce}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Te,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(Te,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(Te,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(Te,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(Te,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(Te,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(Te,ne,te){var ce=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(ce*ne,(1-ce)*te,!1).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*te)).add(new go.PathSegment(go.PathSegment.Move,ce*ne,ce*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,(1-ce)*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(Te,ne,te){var ce=ne/2,se=new go.Geometry().add(new go.PathFigure(ne,ne/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,ce,ce,ce,ce).close()));return se.spot1=wt,se.spot2=_e,se.defaultStretch=go.GraphObject.Uniform,se}),go.Shape.defineFigureGenerator("Line1",function(Te,ne,te){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=0,ce.startY=0,ce.endX=ne,ce.endY=te,ce}),go.Shape.defineFigureGenerator("Line2",function(Te,ne,te){var ce=new go.Geometry(go.Geometry.Line);return ce.startX=ne,ce.startY=0,ce.endX=0,ce.endY=te,ce}),go.Shape.defineFigureGenerator("Curve1",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,Ve*ne,0,ne,(1-Ve)*te)))}),go.Shape.defineFigureGenerator("Curve2",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,ne,te,0,Ve*te,(1-Ve)*ne,te)))}),go.Shape.defineFigureGenerator("Curve3",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,Ve*te,Ve*ne,te)))}),go.Shape.defineFigureGenerator("Curve4",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,te,(1-Ve)*ne,0,0,(1-Ve)*te)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Te,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(Te,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(Te,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(Te,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 Rn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)?ce=.1:ce<-1?ce=-1:ce>1&&(ce=1);var se=Math.abs(ce)*ne;if(ce===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ce>0?ge.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())):ge.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&&ge.setSpots(se/ne,0,(ne-se)/ne,1),ge}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Rn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne:ce>ne&&(ce=ne);var se=Math.abs(ce);if(ce===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ce>0?ge.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())):ge.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&&ge.setSpots(se/ne,0,(ne-se)/ne,1),ge}}),go.Shape.setFigureParameter("Trapezoid1",0,new Rn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)?ce=.2:ce<.5?ce=-.5:ce>.5&&(ce=.5);var se=Math.abs(ce)*ne;if(ce===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ce>0?ge.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())):ge.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&&ge.setSpots(se/ne,0,(ne-se)/ne,1),ge}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Rn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)?ce=20:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ce>0?ge.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())):ge.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&&ge.setSpots(se/ne,0,(ne-se)/ne,1),ge}}),go.Shape.setFigureParameter("ManualOperation",0,new Rn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)?ce=10:ce<-ne?ce=-ne/2:ce>ne&&(ce=ne/2);var se=Math.abs(ce);if(ce===0){var ge=new go.Geometry(go.Geometry.Rectangle);return ge.startX=0,ge.startY=0,ge.endX=ne,ge.endY=te,ge}else{var ge=new go.Geometry;return ce>0?ge.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())):ge.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&&ge.setSpots(se/ne,0,(ne-se)/ne,1),ge}});var xt=[];function ut(){var Te=xt.pop();return Te===void 0?[]:Te}function pt(Te){Te.length=0,xt.push(Te)}function Rt(Te){for(var ne=ut(),te=.5,ce=.5,se=Math.PI*1.5,ge=0,ye=0;ye<Te;ye++)ge=2*Math.PI/Te*ye+se,ne[ye]=new go.Point(ce+te*Math.cos(ge),ce+te*Math.sin(ge));return ne.push(ne[0]),ne}function Ot(Te){var ne=jt(Te),te=ut();te[0]=ne[0];for(var ce=1,se=1;ce<ne.length;ce+=2,se+=3)te[se]=ne[ce],te[se+1]=ne[ce],te[se+2]=ne[ce+1];return pt(ne),te}function jt(Te){for(var ne=Rt(Te),te=ut(),ce=Math.floor(ne.length/2),se=ne.length-1,ge=Te%2===0?2:1,ye=0;ye<se;ye++){var we=ne[ye],Ce=ne[ye+1],Re=ne[(ce+ye-1)%se],We=ne[(ce+ye+ge)%se];te[ye*2]=we,te[ye*2+1]=Lt(we.x,we.y,Re.x,Re.y,Ce.x,Ce.y,We.x,We.y,new go.Point)}return te[te.length]=te[0],pt(ne),te}go.Shape.defineFigureGenerator("Pentagon",function(Te,ne,te){var ce=Rt(5),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<5;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.2,.22),se.spot2=new go.Spot(.8,.9),se}),go.Shape.defineFigureGenerator("Hexagon",function(Te,ne,te){var ce=Rt(6),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<6;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.07,.25),se.spot2=new go.Spot(.93,.75),se}),go.Shape.defineFigureGenerator("Heptagon",function(Te,ne,te){var ce=Rt(7),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<7;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.2,.15),se.spot2=new go.Spot(.8,.85),se}),go.Shape.defineFigureGenerator("Octagon",function(Te,ne,te){var ce=Rt(8),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<8;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.15,.15),se.spot2=new go.Spot(.85,.85),se}),go.Shape.defineFigureGenerator("Nonagon",function(Te,ne,te){var ce=Rt(9),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<9;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.17,.13),se.spot2=new go.Spot(.82,.82),se}),go.Shape.defineFigureGenerator("Decagon",function(Te,ne,te){var ce=Rt(10),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<10;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("Dodecagon",function(Te,ne,te){var ce=Rt(12),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<12;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.16,.16),se.spot2=new go.Spot(.84,.84),se}),go.Shape.defineFigureGenerator("FivePointedStar",function(Te,ne,te){var ce=jt(5),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<10;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.266,.333),se.spot2=new go.Spot(.733,.733),se}),go.Shape.defineFigureGenerator("SixPointedStar",function(Te,ne,te){var ce=jt(6),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<12;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.17,.25),se.spot2=new go.Spot(.83,.75),se}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Te,ne,te){var ce=jt(7),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<14;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("EightPointedStar",function(Te,ne,te){var ce=jt(8),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<16;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.25,.25),se.spot2=new go.Spot(.75,.75),se}),go.Shape.defineFigureGenerator("NinePointedStar",function(Te,ne,te){var ce=jt(9),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<18;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.666),se}),go.Shape.defineFigureGenerator("TenPointedStar",function(Te,ne,te){var ce=jt(10),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<20;ye++)ge.add(new go.PathSegment(go.PathSegment.Line,ce[ye].x*ne,ce[ye].y*te));return ge.add(new go.PathSegment(go.PathSegment.Line,ce[0].x*ne,ce[0].y*te).close()),pt(ce),se.spot1=new go.Spot(.281,.261),se.spot2=new go.Spot(.723,.748),se}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Te,ne,te){var ce=Ot(5),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.222,.277),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Te,ne,te){var ce=Ot(6),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.17,.222),se.spot2=new go.Spot(.833,.777),se}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Te,ne,te){var ce=Ot(7),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Te,ne,te){var ce=Ot(8),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Te,ne,te){var ce=Ot(9),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Te,ne,te){var ce=Ot(10),se=new go.Geometry,ge=new go.PathFigure(ce[0].x*ne,ce[0].y*te,!0);se.add(ge);for(var ye=1;ye<ce.length;ye+=3)ge.add(new go.PathSegment(go.PathSegment.Bezier,ce[ye+2].x*ne,ce[ye+2].y*te,ce[ye].x*ne,ce[ye].y*te,ce[ye+1].x*ne,ce[ye+1].y*te));return ge.segments.last().close(),pt(ce),se.spot1=new go.Spot(.222,.222),se.spot2=new go.Spot(.777,.777),se}),go.Shape.setFigureParameter("FramedRectangle",0,new Rn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Rn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Te,ne,te){var ce=Te?Te.parameter1:NaN,se=Te?Te.parameter2:NaN;isNaN(ce)&&(ce=8),isNaN(se)&&(se=8);var ge=new go.Geometry,ye=new go.PathFigure(0,0,!0);return ge.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce<ne/2&&se<te/2&&(ye.add(new go.PathSegment(go.PathSegment.Move,ce,se)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,te-se)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,te-se)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,se).close())),ge.setSpots(0,0,1,1,ce,se,-ce,-se),ge}),go.Shape.setFigureParameter("Ring",0,new Rn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=8);var se=ne/2,ge=new go.Geometry,ye=new go.PathFigure(ne,ne/2,!0);ge.add(ye),ye.add(new go.PathSegment(go.PathSegment.Arc,0,360,se,se,se,se).close());var we=Math.max(se-ce,0);return we>0&&(ye.add(new go.PathSegment(go.PathSegment.Move,ne/2+we,ne/2)),ye.add(new go.PathSegment(go.PathSegment.Arc,0,-360,se,se,we,we).close())),ge.spot1=wt,ge.spot2=_e,ge.defaultStretch=go.GraphObject.Uniform,ge}),go.Shape.defineFigureGenerator("Cloud",function(Te,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(Te,ne,te){var ce=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(ce*ne,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,0)).add(new go.PathSegment(go.PathSegment.Line,ne,ce*te)).add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,te)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,te)).add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*te)).add(new go.PathSegment(go.PathSegment.Line,0,ce*te).close())).setSpots(ce/2,ce/2,1-ce/2,1-ce/2)}),go.Shape.setFigureParameter("Pie",0,new Rn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Rn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Te,ne,te){var ce=Te?Te.parameter1:NaN,se=Te?Te.parameter2:NaN;isNaN(ce)&&(ce=0),isNaN(se)&&(se=315);var ge=ce%360;ge<0&&(ge+=360);var ye=se%360,we=Math.min(ne,te)/2;return new go.Geometry().add(new go.PathFigure(we,we).add(new go.PathSegment(go.PathSegment.Arc,ge,ye,we,we,we,we).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Te,ne,te){var ce=Ve/Math.SQRT2*.5,se=Math.SQRT2/2,ge=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(ne,te,!0).add(new go.PathSegment(go.PathSegment.Bezier,se*ne,ge*te,ne,(1-ce)*te,(se+ce)*ne,(ge+ce)*te)).add(new go.PathSegment(go.PathSegment.Line,0,te).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Rn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30);var se=Math.min(ce,ne)/2,ge=ne/2,ye=te/2;return new go.Geometry().add(new go.PathFigure(ge-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,ge+se,0)).add(new go.PathSegment(go.PathSegment.Line,ge+se,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ge-se,ye-se).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Rn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=Math.min(ce,ne)/2,ge=ne/2,ye=te/2;return new go.Geometry().add(new go.PathFigure(ge-se,0,!0).add(new go.PathSegment(go.PathSegment.Line,ge+se,0)).add(new go.PathSegment(go.PathSegment.Line,ge+se,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ne,ye+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,ge+se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,te)).add(new go.PathSegment(go.PathSegment.Line,ge-se,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye+se)).add(new go.PathSegment(go.PathSegment.Line,0,ye-se)).add(new go.PathSegment(go.PathSegment.Line,ge-se,ye-se).close()))}),go.Shape.setFigureParameter("ThickX",0,new Rn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;if((isNaN(ce)||ce<0)&&(ce=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 ge=ne/2,ye=te/2,we=Math.atan2(te,ne),Ce=ce-Math.min(Math.cos(we)*ce/2,ge),Re=ce-Math.min(Math.sin(we)*ce/2,ye),se=new go.Geometry,We=new go.PathFigure(Ce,0,!0);return se.add(We),We.add(new go.PathSegment(go.PathSegment.Line,ge,.2*te)),We.add(new go.PathSegment(go.PathSegment.Line,ne-Ce,0)),We.add(new go.PathSegment(go.PathSegment.Line,ne,Re)),We.add(new go.PathSegment(go.PathSegment.Line,.8*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,ne,te-Re)),We.add(new go.PathSegment(go.PathSegment.Line,ne-Ce,te)),We.add(new go.PathSegment(go.PathSegment.Line,ge,.8*te)),We.add(new go.PathSegment(go.PathSegment.Line,Ce,te)),We.add(new go.PathSegment(go.PathSegment.Line,0,te-Re)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,0,Re).close()),se}}),go.Shape.setFigureParameter("ThinX",0,new Rn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=10);var se=new go.Geometry,ge=new go.PathFigure(.1*ne,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.1*te).close()),se}),go.Shape.setFigureParameter("SquareIBeam",0,new Rn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,ge=new go.PathFigure(0,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,ce*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,ce*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5+ce/2)*ne,(1-ce)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,(1-ce)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,(1-ce)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,(1-ce)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(.5-ce/2)*ne,ce*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ce*te).close()),se}),go.Shape.setFigureParameter("RoundedIBeam",0,new Rn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.5);var se=new go.Geometry,ge=new go.PathFigure(0,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,te,Math.abs(1-ce)*ne,.25*te,Math.abs(1-ce)*ne,.75*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*te,ce*ne,.25*te).close()),se}),go.Shape.defineFigureGenerator("HalfEllipse",function(Te,ne,te){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,Ve*ne,0,ne,(.5-Ve/2)*te)).add(new go.PathSegment(go.PathSegment.Bezier,0,te,ne,(.5+Ve/2)*te,Ve*ne,te).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Te,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(Te,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(Te,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(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.4*ne,.6*te,!0);ce.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 ge=.2,ye=.3,we=0,Ce=ge*Ve;return se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5+ge+we)*te,(.5-ge+ye)*ne,(.5+Ce+we)*te,(.5-Ce+ye)*ne,(.5+ge+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ge+ye)*ne,(.5+we)*te,(.5+Ce+ye)*ne,(.5+ge+we)*te,(.5+ge+ye)*ne,(.5+Ce+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-ge+we)*te,(1-.5+ge+ye)*ne,(.5-Ce+we)*te,(.5+Ce+ye)*ne,(.5-ge+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.65*ne,.36771243*te,(.5-Ce+ye)*ne,(.5-ge+we)*te,(.5-ge+ye+.05)*ne,(.5-Ce+we-.02)*te)),ge=.2,ye=0,we=-.3,Ce=ge*Ve,se.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+ge+ye)*ne,(.5+we)*te,(.5+Ce+ye)*ne,(.5+ge+we)*te,(.5+ge+ye)*ne,(.5+Ce+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-ge+we)*te,(1-.5+ge+ye)*ne,(.5-Ce+we)*te,(.5+Ce+ye)*ne,(.5-ge+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ge+ye)*ne,(.5+we)*te,(.5-Ce+ye)*ne,(.5-ge+we)*te,(.5-ge+ye)*ne,(.5-Ce+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-Ce+ye)*ne,(.5+ge+we)*te,(.5-ge+ye)*ne,(.5+Ce+we)*te,(.5-Ce+ye)*ne,(.5+ge+we)*te)),ge=.2,ye=-.3,we=0,Ce=ge*Ve,se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5-ge+we)*te,(1-.5+ge+ye-.05)*ne,(.5-Ce+we-.02)*te,(.5+Ce+ye)*ne,(.5-ge+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5-ge+ye)*ne,(.5+we)*te,(.5-Ce+ye)*ne,(.5-ge+we)*te,(.5-ge+ye)*ne,(.5-Ce+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ye)*ne,(.5+ge+we)*te,(.5-ge+ye)*ne,(.5+Ce+we)*te,(.5-Ce+ye)*ne,(.5+ge+we)*te)),se.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.6*te,(.5+Ce+ye)*ne,(.5+ge+we)*te,(.5+ge+ye)*ne,(.5+Ce+we)*te).close()),ce.setSpots(.06,.33,.93,.68),ce}),go.Shape.defineFigureGenerator("YinYang",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,0,!0);ce.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 ge=.1,ye=.5,we=.25;return se.add(new go.PathSegment(go.PathSegment.Move,(ye+ge)*ne,we*te)),se.add(new go.PathSegment(go.PathSegment.Arc,0,-360,ne*ye,te*we,ge*ne,ge*ne).close()),se=new go.PathFigure(ne*.5,0,!1),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*.5,ne*.5,ne*.5,ne*.5)),we=.75,se=new go.PathFigure((ye+ge)*ne,we*te,!0),ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,0,360,ne*ye,te*we,ge*ne,ge*ne).close()),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Peace",function(Te,ne,te){var ce=.8535533905932737,se=.5*ne,ge=.5*te;return new go.Geometry().add(new go.PathFigure(se,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,se,ge,se,ge)).add(new go.PathSegment(go.PathSegment.Line,se,te)).add(new go.PathSegment(go.PathSegment.Move,se,ge)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*ne,ce*te)).add(new go.PathSegment(go.PathSegment.Move,se,ge)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,ce*te)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=.5,ye=.5,we=.5,Ce=new go.PathFigure(ye*ne,(we-ge)*te);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),ge=.4,se=Ve*.4;var Re=le(),We=le(),lt=le(),ht=le();At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.42,Re,We,lt,ht,ht);var nt=le(),mt=le(),at=le();At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.58,ht,ht,at,nt,mt);var Pt=le(),Nt=le(),Et=le();At(ye,we+ge,ye-se,we+ge,ye-ge,we+se,ye-ge,we,.42,Pt,Nt,Et,ht,ht);var Ln=le(),xn=le(),Nn=le();return At(ye,we+ge,ye-se,we+ge,ye-ge,we+se,ye-ge,we,.58,ht,ht,Nn,Ln,xn),Ce.add(new go.PathSegment(go.PathSegment.Move,Nn.x*ne,Nn.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,Ln.x*ne,Ln.y*te,xn.x*ne,xn.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,lt.x*ne,lt.y*te,Re.x*ne,Re.y*te,We.x*ne,We.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,Nn.x*ne,Nn.y*te).close()),Ce.add(new go.PathSegment(go.PathSegment.Move,Et.x*ne,Et.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,at.x*ne,at.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,nt.x*ne,nt.y*te,mt.x*ne,mt.y*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,Et.x*ne,Et.y*te,Pt.x*ne,Pt.y*te,Nt.x*ne,Nt.y*te).close()),Xe(Re),Xe(We),Xe(lt),Xe(ht),Xe(nt),Xe(mt),Xe(at),Xe(Pt),Xe(Nt),Xe(Et),Xe(Ln),Xe(xn),Xe(Nn),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("Fragile",function(Te,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 Rn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=30),ce>ne&&(ce=ne);var se=(ne-ce)/2,ge=se+ce;return new go.Geometry().add(new go.PathFigure(ge,.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(Te,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(Te,ne,te){var ce=new go.Geometry,se=Ve*.4,ge=.4,ye=.5,we=.5,Ce=le(),Re=le(),We=le(),lt=le(),ht=new go.PathFigure((ye-ge)*ne,we*te,!1);ce.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te)),At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.44,We,lt,Re,Ce,Ce),ht.add(new go.PathSegment(go.PathSegment.Bezier,Re.x*ne,Re.y*te,We.x*ne,We.y*te,lt.x*ne,lt.y*te));var nt=be(Re.x,Re.y);At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.56,Ce,Ce,Re,We,lt);var mt=be(Re.x,Re.y);ht.add(new go.PathSegment(go.PathSegment.Line,(nt.x*.1+.95*.9)*ne,nt.y*.1*te)),ht.add(new go.PathSegment(go.PathSegment.Line,.85*ne,nt.y*.1*te)),ht.add(new go.PathSegment(go.PathSegment.Line,.85*ne,0)),ht.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ht.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),ht.add(new go.PathSegment(go.PathSegment.Line,(mt.x*.1+.9)*ne,.15*te)),ht.add(new go.PathSegment(go.PathSegment.Line,(mt.x*.1+.9)*ne,(mt.y*.1+.05*.9)*te)),ht.add(new go.PathSegment(go.PathSegment.Line,mt.x*ne,mt.y*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,We.x*ne,We.y*te,lt.x*ne,lt.y*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te)),ge=.35,se=Ve*.35;var at=new go.PathFigure(ye*ne,(we-ge)*te,!1);ce.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),at.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te));var Pt=new go.PathFigure((ye-ge)*ne,we*te,!1);return ce.add(Pt),Xe(Ce),Xe(Re),Xe(We),Xe(lt),Xe(nt),Xe(mt),ce.spot1=new go.Spot(.202,.257),ce.spot2=new go.Spot(.792,.739),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("GenderFemale",function(Te,ne,te){var ce=new go.Geometry,se=.375,ge=0,ye=-.125,we=se*Ve,Ce=new go.PathFigure((.525+ge)*ne,(.5+se+ye)*te,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ge)*ne,(.5+ye)*te,(.5+we+ge)*ne,(.5+se+ye)*te,(.5+se+ge)*ne,(.5+we+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5-se+ye)*te,(1-.5+se+ge)*ne,(.5-we+ye)*te,(.5+we+ge)*ne,(.5-se+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+ye)*te,(.5-we+ge)*ne,(.5-se+ye)*te,(.5-se+ge)*ne,(.5-we+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.475+ge)*ne,(.5+se+ye)*te,(.5-se+ge)*ne,(.5+we+ye)*te,(.5-we+ge)*ne,(.5+se+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.85*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.85*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.425*ne,.9*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.475*ne,.9*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.475*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.525*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.9*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.9*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.85*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.85*te).close()),se=.325,ge=0,ye=-.125,we=se*Ve;var Ce=new go.PathFigure((1-.5+se+ge)*ne,(.5+ye)*te,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5+se+ye)*te,(.5+se+ge)*ne,(.5+we+ye)*te,(.5+we+ge)*ne,(.5+se+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+ye)*te,(.5-we+ge)*ne,(.5+se+ye)*te,(.5-se+ge)*ne,(.5+we+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(.5+ge)*ne,(.5-se+ye)*te,(.5-se+ge)*ne,(.5-we+ye)*te,(.5-we+ge)*ne,(.5-se+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+se+ge)*ne,(.5+ye)*te,(.5+we+ge)*ne,(.5-se+ye)*te,(1-.5+se+ge)*ne,(.5-we+ye)*te));var Ce=new go.PathFigure((.525+ge)*ne,(.5+se+ye)*te,!1);return ce.add(Ce),ce.spot1=new go.Spot(.232,.136),ce.spot2=new go.Spot(.682,.611),ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicImplies",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*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(Te,ne,te){var ce=Te?Te.parameter1:NaN;return isNaN(ce)&&(ce=.2),new go.Geometry().add(new go.PathFigure((1-ce)*ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)).add(new go.PathSegment(go.PathSegment.Line,(1-ce)*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,ce*ne,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*te)).add(new go.PathSegment(go.PathSegment.Line,ce*ne,te))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Te,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(Te,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(Te,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(Te,ne,te){var ce=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 ce.defaultStretch=go.GraphObject.Uniform,ce}),go.Shape.defineFigureGenerator("LogicTruth",function(Te,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(Te,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(Te,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(Te,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(Te,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(Te,ne,te){var ce=.5;return new go.Geometry().add(new go.PathFigure(0,te,!1).add(new go.PathSegment(go.PathSegment.Line,0,ce*te)).add(new go.PathSegment(go.PathSegment.Arc,180,180,ce*ne,ce*te,ce*ne,ce*te)).add(new go.PathSegment(go.PathSegment.Line,ne,te))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Te,ne,te){var ce=.5;return new go.Geometry().add(new go.PathFigure(ne,0,!1).add(new go.PathSegment(go.PathSegment.Line,ne,ce*te)).add(new go.PathSegment(go.PathSegment.Arc,0,180,ce*ne,ce*te,ce*ne,ce*te)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Rn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Rn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=.3);var ge=(1-ce)*ne,ye=(.5-se/2)*te,we=(.5+se/2)*te,Ce=new go.Geometry,Re=new go.PathFigure(0,ye,!0);Ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,ge,ye)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,0)),Re.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,te)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,we)),Re.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Ce.spot1=new go.Spot(0,ye/te);var We=Lt(0,we/te,1,we/te,ge/ne,1,1,.5,le());return Ce.spot2=new go.Spot(We.x,We.y),Xe(We),Ce}),go.Shape.setFigureParameter("Arrow2",0,new Rn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Rn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=30),ce>ne&&(ce=ne);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=30),se=Math.min(se,te/2);var ge=ne-ce,ye=(te-se)/2,we=ye+se,Ce=new go.Geometry,Re=new go.PathFigure(0,ye,!0);Ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,ge,ye)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,0)),Re.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,te)),Re.add(new go.PathSegment(go.PathSegment.Line,ge,we)),Re.add(new go.PathSegment(go.PathSegment.Line,0,we).close()),Ce.spot1=new go.Spot(0,ye/te);var We=Lt(0,we/te,1,we/te,ge/ne,1,1,.5,le());return Ce.spot2=new go.Spot(We.x,We.y),Xe(We),Ce}),go.Shape.defineFigureGenerator("Chevron",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("DoubleArrow",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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()),ce}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Rn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*te,ge=(.5+ce/2)*te,ye=new go.Geometry,we=new go.PathFigure(ne,.5*te,!0);ye.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.3*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,.3*ne,0)),we.add(new go.PathSegment(go.PathSegment.Line,.3*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close());var Ce=Lt(0,.5,.3,0,0,se/te,.1,se/te,le());return ye.spot1=new go.Spot(Ce.x,Ce.y),Ce=Lt(.7,1,1,.5,0,ge/te,1,ge/te,Ce),ye.spot2=new go.Spot(Ce.x,Ce.y),Xe(Ce),ye}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Rn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Rn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=100);var ge=(te-ce)/2,ye=ge+ce,we=(te-se)/2,Ce=we+se;(ce>te||se>te)&&(se>ce?(ce=ce*te/se,ge=(te-ce)/2,ye=ge+ce,we=0,Ce=te):(ge=0,ye=te,we=0,Ce=te));var Re=new go.Geometry,We=new go.PathFigure(ne,.5*te,!0);Re.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Ce)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,.3*ne,Ce)),We.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),We.add(new go.PathSegment(go.PathSegment.Line,.3*ne,we)),We.add(new go.PathSegment(go.PathSegment.Line,.3*ne,ge)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,we).close());var lt=Lt(0,.5,.3,we/te,0,ge/te,1,ge/te,le());return Re.spot1=new go.Spot(lt.x,lt.y),lt=Lt(.7,Ce/te,1,.5,0,ye/te,1,ye/te,lt),Re.spot2=new go.Spot(lt.x,lt.y),Xe(lt),Re}),go.Shape.setFigureParameter("IBeamArrow",0,new Rn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=(.5-ce/2)*te,ge=(.5+ce/2)*te,ye=new go.Geometry,we=new go.PathFigure(ne,.5*te,!0);ye.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,0,te)),we.add(new go.PathSegment(go.PathSegment.Line,0,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,0)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(0,se/te);var Ce=Lt(.7,1,1,.5,0,ge/te,1,ge/te,le());return ye.spot2=new go.Spot(Ce.x,Ce.y),Xe(Ce),ye}),go.Shape.setFigureParameter("IBeamArrow2",0,new Rn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Rn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=40);var se=Te?Te.parameter2:NaN;isNaN(se)&&(se=100);var ge=(te-ce)/2,ye=ge+ce,we=(te-se)/2,Ce=we+se;(ce>te||se>te)&&(se>ce?(ce=ce*te/se,ge=(te-ce)/2,ye=ge+ce,we=0,Ce=te):(ge=0,ye=te,we=0,Ce=te));var Re=new go.Geometry,We=new go.PathFigure(ne,.5*te,!0);Re.add(We),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,Ce)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ye)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ne,Ce)),We.add(new go.PathSegment(go.PathSegment.Line,0,Ce)),We.add(new go.PathSegment(go.PathSegment.Line,0,we)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ne,we)),We.add(new go.PathSegment(go.PathSegment.Line,.2*ne,ge)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),We.add(new go.PathSegment(go.PathSegment.Line,.7*ne,we).close()),Re.spot1=new go.Spot(0,ge/te);var lt=Lt(.7,Ce/te,1,.5,0,ye/te,1,ye/te,le());return Re.spot2=new go.Spot(lt.x,lt.y),Xe(lt),Re}),go.Shape.setFigureParameter("Pointer",0,new Rn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.1);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,ce*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),se.spot1=new go.Spot(ce,.35);var ye=Lt(.2,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ye.x,ye.y),Xe(ye),se}),go.Shape.setFigureParameter("RoundedPointer",0,new Rn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.3);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,0,0,ce*ne,.75*te,ce*ne,.25*te).close()),se.spot1=new go.Spot(ce,.35);var ye=Lt(0,.65,1,.65,0,1,1,.5,le());return se.spot2=new go.Spot(ye.x,ye.y),Xe(ye),se}),go.Shape.setFigureParameter("SplitEndArrow",0,new Rn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.4);var se=(.5-ce/2)*te,ge=(.5+ce/2)*te,ye=new go.Geometry,we=new go.PathFigure(ne,.5*te,!0);ye.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,0,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(.2,.3);var Ce=Lt(.7,1,1,.5,0,ge/te,1,ge/te,le());return ye.spot2=new go.Spot(Ce.x,Ce.y),Xe(Ce),ye}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Rn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=50);var se=(te-ce)/2,ge=se+ce;ce>te&&(se=0,ge=te);var ye=new go.Geometry,we=new go.PathFigure(ne,.5*te,!0);ye.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,ge)),we.add(new go.PathSegment(go.PathSegment.Line,0,ge)),we.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,0,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,.7*ne,0).close()),ye.spot1=new go.Spot(.2,se/te);var Ce=Lt(.7,1,1,.5,0,ge/te,1,ge/te,le());return ye.spot2=new go.Spot(Ce.x,Ce.y),Xe(Ce),ye}),go.Shape.setFigureParameter("SquareArrow",0,new Rn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.7);var se=new go.Geometry,ge=new go.PathFigure(ne,.5*te,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ce*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=go.Spot.TopLeft,se.spot2=new go.Spot(ce,1),se}),go.Shape.defineFigureGenerator("Cone1",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=Ve*.1,ye=new go.PathFigure(0,.9*te,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te).close()),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.97),ce}),go.Shape.defineFigureGenerator("Cone2",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.9*te,!0);ce.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 ge=new go.PathFigure(0,.9*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.9*te,(1-.85/.9)*ne,.8*te,.85/.9*ne,.8*te)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.82),ce}),go.Shape.defineFigureGenerator("Cube1",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,te,!0);ce.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 ge=new go.PathFigure(.5*ne,te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.15*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.15*te)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.5,.85),ce}),go.Shape.defineFigureGenerator("Cube2",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.3*te,!0);ce.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 ge=new go.PathFigure(0,.3*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Move,.7*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,te)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(.7,1),ce}),go.Shape.defineFigureGenerator("Cylinder1",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,te/3);var se=new go.Geometry,ge=Ve*.5,ye=new go.PathFigure(0,ce,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Ve*ce,(.5-ge)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,1*ne,ce,(.5+ge)*ne,0,1*ne,Ve*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te-ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,1*te,1*ne,te-Ve*ce,(.5+ge)*ne,1*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ce,(.5-ge)*ne,1*te,0,te-Ve*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,0,ce));var we=new go.PathFigure(ne,ce,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,2*ce,1*ne,2*ce-Ve*ce,(.5+ge)*ne,2*ce)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ce,(.5-ge)*ne,2*ce,0,2*ce-Ve*ce)),se.spot1=new go.Spot(0,0,0,2*ce),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder2",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,te/3);var se=new go.Geometry,ge=Ve*.5,ye=new go.PathFigure(0,te-ce,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,Ve*ce,(.5-ge)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,(.5+ge)*ne,0,ne,Ve*ce)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te-ce)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,te-Ve*ce,(.5+ge)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,te-ce,(.5-ge)*ne,te,0,te-Ve*ce));var we=new go.PathFigure(0,te-ce,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te-2*ce,0,te-ce-Ve*ce,(.5-ge)*ne,te-2*ce)),we.add(new go.PathSegment(go.PathSegment.Bezier,ne,te-ce,(.5+ge)*ne,te-2*ce,ne,te-ce-Ve*ce)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,0,-2*ce),se}),go.Shape.defineFigureGenerator("Cylinder3",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,ge=Ve*.5,ye=new go.PathFigure(ce,0,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-Ve*ce,0,ne,(.5-ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,te,ne,(.5+ge)*te,ne-Ve*ce,te)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,Ve*ce,te,0,(.5+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-ge)*te,Ve*ce,0));var we=new go.PathFigure(ce,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,2*ce,.5*te,ce+Ve*ce,0,2*ce,(.5-ge)*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,ce,te,2*ce,(.5+ge)*te,ce+Ve*ce,te)),se.spot1=new go.Spot(0,0,2*ce,0),se.spot2=new go.Spot(1,1),se}),go.Shape.defineFigureGenerator("Cylinder4",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=5),ce=Math.min(ce,ne/3);var se=new go.Geometry,ge=Ve*.5,ye=new go.PathFigure(ne-ce,0,!0);se.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,ne-Ve*ce,0,ne,(.5-ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,te,ne,(.5+ge)*te,ne-Ve*ce,te)),ye.add(new go.PathSegment(go.PathSegment.Line,ce,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*te,Ve*ce,te,0,(.5+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,(.5-ge)*te,Ve*ce,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0));var we=new go.PathFigure(ne-ce,0,!1);return se.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ne-2*ce,.5*te,ne-ce-Ve*ce,0,ne-2*ce,(.5-ge)*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,te,ne-2*ce,(.5+ge)*te,ne-ce-Ve*ce,te)),se.spot1=new go.Spot(0,0),se.spot2=new go.Spot(1,1,-2*ce,0),se}),go.Shape.defineFigureGenerator("Prism1",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,.25*te,!0);ce.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 ge=new go.PathFigure(.25*ne,.25*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ce.spot1=new go.Spot(.408,.172),ce.spot2=new go.Spot(.833,.662),ce}),go.Shape.defineFigureGenerator("Prism2",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.25*te,!0);ce.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 ge=new go.PathFigure(0,te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Move,0,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.5*te)),ce.spot1=new go.Spot(.25,.5),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("Pyramid1",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.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 ge=new go.PathFigure(.5*ne,0,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Pyramid2",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.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 ge=new go.PathFigure(.5*ne,0,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.7*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.85*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.85*te)),ce.spot1=new go.Spot(.25,.367),ce.spot2=new go.Spot(.75,.875),ce}),go.Shape.defineFigureGenerator("Actor",function(Te,ne,te){var ce=new go.Geometry,se=.2,ge=.1,ye=Ve*se,we=Ve*ge,Ce=.5,Re=.1,We=new go.PathFigure(Ce*ne,(Re+ge)*te,!0);ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-se)*ne,Re*te,(Ce-ye)*ne,(Re+ge)*te,(Ce-se)*ne,(Re+we)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-ge)*te,(Ce-se)*ne,(Re-we)*te,(Ce-ye)*ne,(Re-ge)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+se)*ne,Re*te,(Ce+ye)*ne,(Re-ge)*te,(Ce+se)*ne,(Re-we)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re+ge)*te,(Ce+se)*ne,(Re+we)*te,(Ce+ye)*ne,(Re+ge)*te));var lt=.05,ht=Ve*lt;Ce=.05,Re=.25;var nt=new go.PathFigure(.5*ne,.2*te,!0);return ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,.95*ne,.2*te)),Ce=.95,Re=.25,nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+lt)*ne,Re*te,(Ce+ht)*ne,(Re-lt)*te,(Ce+lt)*ne,(Re-ht)*te)),nt.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.35*te)),lt=.025,ht=Ve*lt,Ce=.825,Re=.35,nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-lt)*te,(Ce+lt)*ne,(Re-ht)*te,(Ce+ht)*ne,(Re-lt)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-lt)*ne,Re*te,(Ce-ht)*ne,(Re-lt)*te,(Ce-lt)*ne,(Re-ht)*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,te)),nt.add(new go.PathSegment(go.PathSegment.Line,.55*ne,te)),nt.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te)),lt=.05,ht=Ve*lt,Ce=.5,Re=.7,nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-lt)*te,(Ce+lt)*ne,(Re-ht)*te,(Ce+ht)*ne,(Re-lt)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-lt)*ne,Re*te,(Ce-ht)*ne,(Re-lt)*te,(Ce-lt)*ne,(Re-ht)*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.45*ne,te)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),nt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.35*te)),lt=.025,ht=Ve*lt,Ce=.175,Re=.35,nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-lt)*te,(Ce+lt)*ne,(Re-ht)*te,(Ce+ht)*ne,(Re-lt)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-lt)*ne,Re*te,(Ce-ht)*ne,(Re-lt)*te,(Ce-lt)*ne,(Re-ht)*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.6*te)),nt.add(new go.PathSegment(go.PathSegment.Line,0,.6*te)),nt.add(new go.PathSegment(go.PathSegment.Line,0,.25*te)),lt=.05,ht=Ve*lt,Ce=.05,Re=.25,nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-lt)*te,(Ce-lt)*ne,(Re-ht)*te,(Ce-ht)*ne,(Re-lt)*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.2*te)),ce.spot1=new go.Spot(.2,.2),ce.spot2=new go.Spot(.8,.65),ce}),go.Shape.setFigureParameter("Card",0,new Rn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;isNaN(ce)&&(ce=.2);var se=new go.Geometry,ge=new go.PathFigure(ne,0,!0);return se.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,ce*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ce*ne,0).close()),se.spot1=new go.Spot(0,ce),se.spot2=go.Spot.BottomRight,se}),go.Shape.defineFigureGenerator("Collate",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,.5*te,!0);ce.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 ge=new go.PathFigure(.5*ne,.5*te,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,.25),ce}),go.Shape.defineFigureGenerator("CreateRequest",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ye=new go.PathFigure(0,se*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ye.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ce}),go.Shape.defineFigureGenerator("Database",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=Ve*.1,ye=new go.PathFigure(ne,.1*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-ge)*te,(.5-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-ge)*te));var we=new go.PathFigure(ne,.1*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+ge)*te,(.5+se)*ne,.2*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+ge)*te)),we.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+ge)*te,(.5+se)*ne,.3*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+ge)*te)),we.add(new go.PathSegment(go.PathSegment.Move,ne,.3*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.4*te,ne,(.3+ge)*te,(.5+se)*ne,.4*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*te,(.5-se)*ne,.4*te,0,(.3+ge)*te)),ce.spot1=new go.Spot(0,.4),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("DataStorage",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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()),ce.spot1=new go.Spot(.226,0),ce.spot2=new go.Spot(.81,1),ce}),go.Shape.defineFigureGenerator("DiskStorage",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=Ve*.1,ye=new go.PathFigure(ne,.1*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.9+ge)*te,(.5+se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*te,(.5-se)*ne,te,0,(.9+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.1*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,0,0,(.1-ge)*te,(.5-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.1*te,(.5+se)*ne,0,ne,(.1-ge)*te));var we=new go.PathFigure(ne,.1*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,ne,(.1+ge)*te,(.5+se)*ne,.2*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*te,(.5-se)*ne,.2*te,0,(.1+ge)*te)),we.add(new go.PathSegment(go.PathSegment.Move,ne,.2*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.3*te,ne,(.2+ge)*te,(.5+se)*ne,.3*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*te,(.5-se)*ne,.3*te,0,(.2+ge)*te)),ce.spot1=new go.Spot(0,.3),ce.spot2=new go.Spot(1,.9),ce}),go.Shape.defineFigureGenerator("Display",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.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()),ce.spot1=new go.Spot(.25,0),ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("DividedEvent",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)?se=.2:se<.15&&(se=.15);var ge=Ve*.2,ye=new go.PathFigure(0,.2*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,0,(.2-ge)*te,(.2-ge)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.8*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.2*te,(.8+ge)*ne,0,ne,(.2-ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,te,ne,(.8+ge)*te,(.8+ge)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.2*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*te,(.2-ge)*ne,te,0,(.8+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.2*te));var we=new go.PathFigure(0,se*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ce}),go.Shape.defineFigureGenerator("DividedProcess",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;(isNaN(se)||se<.1)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ye=new go.PathFigure(0,se*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,se*te)),ce}),go.Shape.defineFigureGenerator("Document",function(Te,ne,te){var ce=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ce.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()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;(isNaN(se)||se<.2)&&(se=.2);var ge=new go.PathFigure(0,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,0,se*te)),ye.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Move,0,(1-se)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,(1-se)*te)),ce}),go.Shape.defineFigureGenerator("ExternalProcess",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.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 ge=new go.PathFigure(.1*ne,.4*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.9*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.6*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.4*ne,.9*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.9*te)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("File",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(.75*ne,0,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.25*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.25*te)),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Interrupt",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,.5*te,!0);ce.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 ge=new go.PathFigure(ne,.5*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te));var ye=new go.PathFigure(ne,.5*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("InternalStorage",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.1);var ye=new go.PathFigure(0,0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var we=new go.PathFigure(se*ne,0,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),we.add(new go.PathSegment(go.PathSegment.Move,0,ge*te)),we.add(new go.PathSegment(go.PathSegment.Line,ne,ge*te)),ce}),go.Shape.defineFigureGenerator("Junction",function(Te,ne,te){var ce=new go.Geometry,se=1/Math.SQRT2,ge=(1-1/Math.SQRT2)/2,ye=Ve*.5,we=.5,Ce=new go.PathFigure(ne,we*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,we*ne,te,ne,(we+ye)*te,(we+ye)*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,0,we*te,(we-ye)*ne,te,0,(we+ye)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,we*ne,0,0,(we-ye)*te,(we-ye)*ne,0)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ne,we*te,(we+ye)*ne,0,ne,(we-ye)*te));var Re=new go.PathFigure((ge+se)*ne,(ge+se)*te,!1);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,ge*ne,ge*te)),Re.add(new go.PathSegment(go.PathSegment.Move,ge*ne,(ge+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Line,(ge+se)*ne,ge*te)),ce}),go.Shape.defineFigureGenerator("LinedDocument",function(Te,ne,te){var ce=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);ce.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 ge=new go.PathFigure(.1*ne,0,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.75*te)),ce.spot1=new go.Spot(.1,0),ce.spot2=new go.Spot(1,.6),ce}),go.Shape.defineFigureGenerator("LoopLimit",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);return ce.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()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MagneticTape",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=.5,ye=new go.PathFigure(.5*ne,te,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(ge+.1)*ne,.9*te,ne,(ge+se)*te,(ge+se)*ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te)),ce.spot1=new go.Spot(.15,.15),ce.spot2=new go.Spot(.85,.8),ce}),go.Shape.defineFigureGenerator("ManualInput",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.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()),ce.spot1=new go.Spot(0,.25),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("MessageFromUser",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.7);var ge=new go.PathFigure(0,0,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,se*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.25);var ge=new go.PathFigure(0,0,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,se*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,(1-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce}),go.Shape.defineFigureGenerator("MicroformRecording",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("MultiDocument",function(Te,ne,te){var ce=new go.Geometry;te=te/.8;var se=new go.PathFigure(ne,0,!0);ce.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 ge=new go.PathFigure(.1*ne,.2*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.44*te)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.8,.77),ce}),go.Shape.defineFigureGenerator("MultiProcess",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.1*te,!0);ce.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 ge=new go.PathFigure(.2*ne,.1*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.1*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.1*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.9*te)),ce.spot1=new go.Spot(0,.2),ce.spot2=new go.Spot(.8,1),ce}),go.Shape.defineFigureGenerator("OfflineStorage",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=1-se,ye=new go.PathFigure(0,0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,te).close());var we=new go.PathFigure(.5*se*ne,se*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,(1-.5*se)*ne,se*te)),ce}),go.Shape.defineFigureGenerator("OffPageConnector",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.75,1),ce}),go.Shape.defineFigureGenerator("Or",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=.5,ye=new go.PathFigure(ne,ge*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,te,ne,(ge+se)*te,(ge+se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te));var we=new go.PathFigure(ne,.5*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,0,.5*te)),we.add(new go.PathSegment(go.PathSegment.Move,.5*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ce}),go.Shape.defineFigureGenerator("PaperTape",function(Te,ne,te){var ce=new go.Geometry;te=te/.8;var se=new go.PathFigure(0,.7*te,!0);return ce.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()),ce.spot1=new go.Spot(0,.49),ce.spot2=new go.Spot(1,.75),ce}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.3);var ye=new go.PathFigure(0,0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,.5*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN,ge=Te?Te.parameter2:NaN;isNaN(se)&&(se=.1),isNaN(ge)&&(ge=.3);var ye=new go.PathFigure(0,0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-ge)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce}),go.Shape.defineFigureGenerator("Procedure",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ye=new go.PathFigure((1-se)*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Move,se*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ce}),go.Shape.defineFigureGenerator("Process",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close());var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ce.spot2=go.Spot.BottomRight,ce}),go.Shape.defineFigureGenerator("Sort",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);ce.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 ge=new go.PathFigure(0,.5*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),ce.spot1=new go.Spot(.25,.25),ce.spot2=new go.Spot(.75,.5),ce}),go.Shape.defineFigureGenerator("Start",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.25);var ge=new go.PathFigure(se*ne,0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*ne,.5*te,.25*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*ne,.5*te,.25*ne,.5*te));var ye=new go.PathFigure(se*ne,0,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,se*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Move,(1-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,(1-se)*ne,te)),ce.spot1=new go.Spot(se,0),ce.spot2=new go.Spot(1-se,1),ce}),go.Shape.defineFigureGenerator("Terminator",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.25*ne,0,!0);return ce.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)),ce.spot1=new go.Spot(.23,0),ce.spot2=new go.Spot(.77,1),ce}),go.Shape.defineFigureGenerator("TransmittalTape",function(Te,ne,te){var ce=new go.Geometry,se=Te?Te.parameter1:NaN;isNaN(se)&&(se=.1);var ge=new go.PathFigure(0,0,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,(1-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,(1-se)*te).close()),ce.spot1=go.Spot.TopLeft,ce}),go.Shape.defineFigureGenerator("AndGate",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=new go.PathFigure(0,0,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(.5+se)*ne,0,ne,(.5-se)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,te,ne,(.5+se)*te,(.5+se)*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce.spot1=go.Spot.TopLeft,ce.spot2=new go.Spot(.55,1),ce}),go.Shape.defineFigureGenerator("Buffer",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.add(se),se.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),se.add(new go.PathSegment(go.PathSegment.Line,0,te).close()),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Clock",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=.5,ye=new go.PathFigure(ne,ge*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,te,ne,(ge+se)*te,(ge+se)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,ge*te,(ge-se)*ne,te,0,(ge+se)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ge*ne,0,0,(ge-se)*te,(ge-se)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,ge*te,(ge+se)*ne,0,ne,(ge-se)*te));var we=new go.PathFigure(ne,ge*te,!1);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne,ge*te));var Ce=new go.PathFigure(.8*ne,.75*te,!1);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.25*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.25*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.75*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.75*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.25*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.25*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.75*te)),ce}),go.Shape.defineFigureGenerator("Ground",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Inverter",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.1,ge=.1,ye=.9,we=.5,Ce=new go.PathFigure(.8*ne,.5*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,0,te)),Ce.add(new go.PathSegment(go.PathSegment.Line,0,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te));var Re=new go.PathFigure((ye+ge)*ne,we*te,!0);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,(ye+se)*ne,(we-ge)*te,(ye+ge)*ne,(we-se)*te)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.4,.75),ce}),go.Shape.defineFigureGenerator("NandGate",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=Ve*.4,ye=Ve*.1,we=.1,Ce=.9,Re=.5,We=new go.PathFigure(.8*ne,.5*te,!0);ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,te,.8*ne,(.5+ge)*te,(.4+se)*ne,te)),We.add(new go.PathSegment(go.PathSegment.Line,0,te)),We.add(new go.PathSegment(go.PathSegment.Line,0,0)),We.add(new go.PathSegment(go.PathSegment.Line,.4*ne,0)),We.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(.4+se)*ne,0,.8*ne,(.5-ge)*te));var lt=new go.PathFigure((Ce+we)*ne,Re*te,!0);return ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re+we)*te,(Ce+we)*ne,(Re+ye)*te,(Ce+ye)*ne,(Re+we)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we)*ne,Re*te,(Ce-ye)*ne,(Re+we)*te,(Ce-we)*ne,(Re+ye)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-we)*te,(Ce-we)*ne,(Re-ye)*te,(Ce-ye)*ne,(Re-we)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we)*ne,Re*te,(Ce+ye)*ne,(Re-we)*te,(Ce+we)*ne,(Re-ye)*te)),ce.spot1=new go.Spot(0,.05),ce.spot2=new go.Spot(.55,.95),ce}),go.Shape.defineFigureGenerator("NorGate",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*se,ye=0,we=.5,Ce=new go.PathFigure(.8*ne,.5*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.7*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(ye+ge)*ne,(we-se)*te,.7*ne,(we-ge)*te)),se=.1,ge=Ve*.1,ye=.9,we=.5;var Re=new go.PathFigure((ye-se)*ne,we*te,!0);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te)),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.6,.75),ce}),go.Shape.defineFigureGenerator("OrGate",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*se,ye=0,we=.5,Ce=new go.PathFigure(0,0,!0);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(ye+ge+ge)*ne,(we-se)*te,.8*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,0,te,.8*ne,(we+ge)*te,(ye+ge+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*ne,.75*te,.25*ne,.25*te).close()),ce.spot1=new go.Spot(.2,.25),ce.spot2=new go.Spot(.75,.75),ce}),go.Shape.defineFigureGenerator("XnorGate",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*se,ye=.2,we=.5,Ce=new go.PathFigure(.1*ne,0,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Re=new go.PathFigure(.8*ne,.5*te,!0);ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.7*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.5*te,(ye+ge)*ne,(we-se)*te,.7*ne,(we-ge)*te)),se=.1,ge=Ve*.1,ye=.9,we=.5;var We=new go.PathFigure((ye-se)*ne,we*te,!0);return ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te)),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.65,.75),ce}),go.Shape.defineFigureGenerator("XorGate",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*se,ye=.2,we=.5,Ce=new go.PathFigure(.1*ne,0,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,.1*ne,te,.35*ne,.25*te,.35*ne,.75*te));var Re=new go.PathFigure(.2*ne,0,!0);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,(ye+ge)*ne,(we-se)*te,.9*ne,(we-ge)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,te,.9*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.2*ne,0,.45*ne,.75*te,.45*ne,.25*te).close()),ce.spot1=new go.Spot(.4,.25),ce.spot2=new go.Spot(.8,.75),ce}),go.Shape.defineFigureGenerator("Capacitor",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Resistor",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.5*te,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Inductor",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.1,ge=.1,ye=.1,we=.5,Ce=new go.PathFigure((ye-se*.5)*ne,te,!1);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,0,(ye-se)*ne,te,(ye-ge)*ne,0)),ye=.3,Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,te,(ye+ge)*ne,0,(ye+se)*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,0,(ye-se)*ne,te,(ye-ge)*ne,0)),ye=.5,Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,te,(ye+ge)*ne,0,(ye+se)*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,0,(ye-se)*ne,te,(ye-ge)*ne,0)),ye=.7,Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,te,(ye+ge)*ne,0,(ye+se)*ne,te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,0,(ye-se)*ne,te,(ye-ge)*ne,0)),ye=.9,Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se*.5)*ne,te,(ye+ge)*ne,0,(ye+se)*ne,te)),ce}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.5,ge=.5,ye=.5,we=.5,Ce=new go.PathFigure((ye-ge)*ne,we*te,!1);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,(ye+se)*ne,(we-ge)*te,(ye+ge)*ne,(we-se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Move,(ye-ge+.1)*ne,we*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge-.1)*ne,we*te,ye*ne,(we-ge)*te,ye*ne,(we+ge)*te)),ce}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Diode",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!1);return ce.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)),ce.spot1=new go.Spot(0,.25),ce.spot2=new go.Spot(.5,.75),ce}),go.Shape.defineFigureGenerator("Wifi",function(Te,ne,te){var ce=new go.Geometry,se=ne,ge=te;ne=ne*.38,te=te*.6;var ye=Ve*.8,we=.8,Ce=0,Re=.5,We=(se-ne)/2,lt=(ge-te)/2,ht=new go.PathFigure(Ce*ne+We,(Re+we)*te+lt,!0);ce.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we)*ne+We,Re*te+lt,(Ce-ye)*ne+We,(Re+we)*te+lt,(Ce-we)*ne+We,(Re+ye)*te+lt)),ht.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re-we)*te+lt,(Ce-we)*ne+We,(Re-ye)*te+lt,(Ce-ye)*ne+We,(Re-we)*te+lt)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we+ye*.5)*ne+We,Re*te+lt,Ce*ne+We,(Re-we)*te+lt,(Ce-we+ye*.5)*ne+We,(Re-ye)*te+lt)),ht.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re+we)*te+lt,(Ce-we+ye*.5)*ne+We,(Re+ye)*te+lt,Ce*ne+We,(Re+we)*te+lt).close()),ye=Ve*.4,we=.4,Ce=.2,Re=.5;var nt=new go.PathFigure(Ce*ne+We,(Re+we)*te+lt,!0);ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we)*ne+We,Re*te+lt,(Ce-ye)*ne+We,(Re+we)*te+lt,(Ce-we)*ne+We,(Re+ye)*te+lt)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re-we)*te+lt,(Ce-we)*ne+We,(Re-ye)*te+lt,(Ce-ye)*ne+We,(Re-we)*te+lt)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we+ye*.5)*ne+We,Re*te+lt,Ce*ne+We,(Re-we)*te+lt,(Ce-we+ye*.5)*ne+We,(Re-ye)*te+lt)),nt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re+we)*te+lt,(Ce-we+ye*.5)*ne+We,(Re+ye)*te+lt,Ce*ne+We,(Re+we)*te+lt).close()),ye=Ve*.2,we=.2,Ce=.5,Re=.5;var mt=new go.PathFigure((Ce-we)*ne+We,Re*te+lt,!0);ce.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re-we)*te+lt,(Ce-we)*ne+We,(Re-ye)*te+lt,(Ce-ye)*ne+We,(Re-we)*te+lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we)*ne+We,Re*te+lt,(Ce+ye)*ne+We,(Re-we)*te+lt,(Ce+we)*ne+We,(Re-ye)*te+lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re+we)*te+lt,(Ce+we)*ne+We,(Re+ye)*te+lt,(Ce+ye)*ne+We,(Re+we)*te+lt)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-we)*ne+We,Re*te+lt,(Ce-ye)*ne+We,(Re+we)*te+lt,(Ce-we)*ne+We,(Re+ye)*te+lt)),ye=Ve*.4,we=.4,Ce=.8,Re=.5;var at=new go.PathFigure(Ce*ne+We,(Re-we)*te+lt,!0);ce.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we)*ne+We,Re*te+lt,(Ce+ye)*ne+We,(Re-we)*te+lt,(Ce+we)*ne+We,(Re-ye)*te+lt)),at.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re+we)*te+lt,(Ce+we)*ne+We,(Re+ye)*te+lt,(Ce+ye)*ne+We,(Re+we)*te+lt)),at.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we-ye*.5)*ne+We,Re*te+lt,Ce*ne+We,(Re+we)*te+lt,(Ce+we-ye*.5)*ne+We,(Re+ye)*te+lt)),at.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re-we)*te+lt,(Ce+we-ye*.5)*ne+We,(Re-ye)*te+lt,Ce*ne+We,(Re-we)*te+lt).close()),ye=Ve*.8,we=.8,Ce=1,Re=.5;var Pt=new go.PathFigure(Ce*ne+We,(Re-we)*te+lt,!0);return ce.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we)*ne+We,Re*te+lt,(Ce+ye)*ne+We,(Re-we)*te+lt,(Ce+we)*ne+We,(Re-ye)*te+lt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re+we)*te+lt,(Ce+we)*ne+We,(Re+ye)*te+lt,(Ce+ye)*ne+We,(Re+we)*te+lt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+we-ye*.5)*ne+We,Re*te+lt,Ce*ne+We,(Re+we)*te+lt,(Ce+we-ye*.5)*ne+We,(Re+ye)*te+lt)),Pt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne+We,(Re-we)*te+lt,(Ce+we-ye*.5)*ne+We,(Re-ye)*te+lt,Ce*ne+We,(Re-we)*te+lt).close()),ce}),go.Shape.defineFigureGenerator("Email",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(0,0,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,0)),ge.add(new go.PathSegment(go.PathSegment.Move,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Move,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.54*te)),ce}),go.Shape.defineFigureGenerator("Ethernet",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.35*ne,0,!0);ce.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 ge=new go.PathFigure(.1*ne,te,!0,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.1*ne,te).close());var ye=new go.PathFigure(.6*ne,te,!0,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.6*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.6*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.6*ne,te).close());var we=new go.PathFigure(0,.5*te,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.4*te)),we.add(new go.PathSegment(go.PathSegment.Move,.75*ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.6*te)),we.add(new go.PathSegment(go.PathSegment.Move,.25*ne,.5*te)),we.add(new go.PathSegment(go.PathSegment.Line,.25*ne,.6*te)),ce}),go.Shape.defineFigureGenerator("Power",function(Te,ne,te){var ce=new go.Geometry,se=Ve*.4,ge=.4,ye=.5,we=.5,Ce=le(),Re=le(),We=le(),lt=le();At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.5,Ce,Ce,Re,We,lt);var ht=be(Re.x,Re.y),nt=new go.PathFigure(Re.x*ne,Re.y*te,!0);ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,We.x*ne,We.y*te,lt.x*ne,lt.y*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,(ye-se)*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te)),At(ye-ge,we,ye-ge,we-se,ye-se,we-ge,ye,we-ge,.5,We,lt,Re,Ce,Ce),nt.add(new go.PathSegment(go.PathSegment.Bezier,Re.x*ne,Re.y*te,We.x*ne,We.y*te,lt.x*ne,lt.y*te)),se=Ve*.3,ge=.3,At(ye-ge,we,ye-ge,we-se,ye-se,we-ge,ye,we-ge,.5,We,lt,Re,Ce,Ce),nt.add(new go.PathSegment(go.PathSegment.Line,Re.x*ne,Re.y*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye-ge)*ne,we*te,lt.x*ne,lt.y*te,We.x*ne,We.y*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+ge)*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(ye+ge)*ne,we*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),At(ye,we-ge,ye+se,we-ge,ye+ge,we-se,ye+ge,we,.5,Ce,Ce,Re,We,lt),nt.add(new go.PathSegment(go.PathSegment.Bezier,Re.x*ne,Re.y*te,lt.x*ne,lt.y*te,We.x*ne,We.y*te).close());var nt=new go.PathFigure(.45*ne,0,!0);return ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.5*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.5*te)),nt.add(new go.PathSegment(go.PathSegment.Line,.55*ne,0).close()),Xe(Ce),Xe(Re),Xe(We),Xe(lt),Xe(ht),ce.spot1=new go.Spot(.25,.45),ce.spot2=new go.Spot(.75,.8),ce}),go.Shape.defineFigureGenerator("Fallout",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te/2,!0);ce.add(se),se.add(new go.PathSegment(go.PathSegment.Arc,180,360,ne/2,te/2,ne/2,te/2));function ge(ye,we,Ce){ye.add(new go.PathSegment(go.PathSegment.Move,(.3+we)*ne,(.8+Ce)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,(.5+we)*ne,(.5+Ce)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,(.1+we)*ne,(.5+Ce)*te)),ye.add(new go.PathSegment(go.PathSegment.Line,(.3+we)*ne,(.8+Ce)*te).close())}return ge(se,0,0),ge(se,.4,0),ge(se,.2,-.3),ce}),go.Shape.defineFigureGenerator("IrritationHazard",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!0);return ce.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()),ce.spot1=new go.Spot(.3,.3),ce.spot2=new go.Spot(.7,.7),ce}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.37*ne,0,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("FireHazard",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,te,!0);return ce.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()),ce.spot1=new go.Spot(.07,.445),ce.spot2=new go.Spot(.884,.958),ce}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=0,ye=0,we=se*Ve,Ce=.4*Math.SQRT2/2+.5,Re=.5-.5*Math.SQRT2/2,We=1,lt=.5,ht=.5,nt=0,mt=new go.PathFigure(Ce*ne,(1-Re)*te,!1);return ce.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,We*ne,lt*te,We*ne,.7*te,We*ne,lt*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ht+ge)*ne,(nt+ge)*te,(.5+se+ge)*ne,(.5-we+ge)*te,(.5+we+ge)*ne,(.5-se+ge)*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-se+ge)*ne,(.5+ye)*te,(.5-we+ge)*ne,(.5-se+ye)*te,(.5-se+ge)*ne,(.5-we+ye)*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(.35+ge)*ne,.9*te,(.5-se+ge)*ne,(.5+we+ye)*te,(.5-we+ge)*ne,.9*te)),mt.add(new go.PathSegment(go.PathSegment.Move,(.25+ge)*ne,.8*te)),mt.add(new go.PathSegment(go.PathSegment.Line,(.35+ge)*ne,.9*te)),mt.add(new go.PathSegment(go.PathSegment.Line,(.2+ge)*ne,.95*te)),ce}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var ge=new go.PathFigure(ne,te,!1);ce.add(ge);var ye=new go.PathFigure(0,.5*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.5*te,.2*ne,.35*te,.3*ne,.35*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,.5*te,.7*ne,.65*te,.8*ne,.65*te)),ce}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);ce.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 ce.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)),ce}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.7*ne,te,!0);ce.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 ge=new go.PathFigure(.45*ne,.73*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.73*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.38*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.63*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.31*ne,.27*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.56*ne,.27*te)),ce}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var ge=new go.PathFigure(.335*ne,(1-.555)*te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,ne,.68*te,(1-.12)*ne,.46*te,(1-.02)*ne,.54*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.68*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.335*ne,(1-.555)*te,.02*ne,.54*te,.12*ne,.46*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.365*ne,(1-.595)*te));var ye=.5-.285,we=.5,Ce=ye,Re=Math.PI/4,We=4*(1-Math.cos(Re))/(3*Math.sin(Re)),lt=We*.5,ht=ye,nt=ye,mt=We*ht,at=We*nt;ge.add(new go.PathSegment(go.PathSegment.Bezier,(we-ht)*ne,Ce*te,(we-(mt+ht)/2)*ne,(Ce+(nt+at)/2)*te,(we-ht)*ne,(Ce+at)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,we*ne,(Ce-nt)*te,(we-ht)*ne,(Ce-at)*te,(we-mt)*ne,(Ce-nt)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(we+ht)*ne,Ce*te,(we+mt)*ne,(Ce-nt)*te,(we+ht)*ne,(Ce-at)*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*ne,(1-.595)*te,(we+ht)*ne,(Ce+at)*te,(we+(mt+ht)/2)*ne,(Ce+(nt+at)/2)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*ne,(1-.595)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.555)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*ne,(1-.405)*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.335*ne,(1-.405)*te));var Pt=new go.PathFigure(.2*ne,te,!1);ce.add(Pt),Pt.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.8*te));var Nt=new go.PathFigure(.8*ne,te,!1);return ce.add(Nt),Nt.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ce}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,0,!0);ce.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 ge=new go.PathFigure(.2*ne,.2*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.8*te)),ce}),go.Shape.defineFigureGenerator("BpmnEventError",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.add(se);var ge=new go.PathFigure(ne,te,!1);ce.add(ge);var ye=new go.PathFigure(.1*ne,te,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te).close()),ce}),go.Shape.defineFigureGenerator("Caution",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.05*ne,te,!0);ce.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 ge=.05;return se.add(new go.PathSegment(go.PathSegment.Move,(.5-ge)*ne,.875*te)),se.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*ne,.875*te,ge*ne,ge*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)),ce}),go.Shape.defineFigureGenerator("Recycle",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.45*ne,.95*te,!1);ce.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 ge=new go.PathFigure(.475*ne,.2*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.225*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.275*ne,.175*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.325*ne,.05*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.4*ne,.05*te,.35*ne,0,.375*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.575*ne,.375*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.525*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.75*ne,.475*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.315*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.32*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.05*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.575*ne,0,.65*ne,.05*te,.625*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.38*ne,.0105*te));var ye=new go.PathFigure(.675*ne,.575*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.875*ne,.525*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,.85*ne,.95*te,ne,.8*te,ne,.85*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.95*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.85*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.725*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.775*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.7*ne,.775*te)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.775*te)),ye.add(new go.PathSegment(go.PathSegment.Move,.675*ne,.575*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.775*ne,.775*te)),ce}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*.5,ye=new go.PathFigure(ne,se*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,te,ne,(se+ge)*te,(se+ge)*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,se*te,(se-ge)*ne,te,0,(se+ge)*te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,se*ne,0,0,(se-ge)*te,(se-ge)*ne,0)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne,se*te,(se+ge)*ne,0,ne,(se-ge)*te));var we=new go.PathFigure(se*ne,0,!1);return ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,se*ne,.15*te)),we.add(new go.PathSegment(go.PathSegment.Move,se*ne,te)),we.add(new go.PathSegment(go.PathSegment.Line,se*ne,.85*te)),we.add(new go.PathSegment(go.PathSegment.Move,0,se*te)),we.add(new go.PathSegment(go.PathSegment.Line,.15*ne,se*te)),we.add(new go.PathSegment(go.PathSegment.Move,ne,se*te)),we.add(new go.PathSegment(go.PathSegment.Line,.85*ne,se*te)),we.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),we.add(new go.PathSegment(go.PathSegment.Line,.58*ne,.1*te)),we.add(new go.PathSegment(go.PathSegment.Move,se*ne,se*te)),we.add(new go.PathSegment(go.PathSegment.Line,.78*ne,.54*te)),ce}),go.Shape.defineFigureGenerator("Package",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.15*te,!0);ce.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 ge=new go.PathFigure(0,.15*te,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.65*ne,.15*te).close()),ce.spot1=new go.Spot(0,.1),ce.spot2=new go.Spot(1,1),ce}),go.Shape.defineFigureGenerator("Class",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(0,.2*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var ye=new go.PathFigure(0,.5*te,!1);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,.5*te).close()),ce}),go.Shape.defineFigureGenerator("Component",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,te,!0);ce.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 ge=new go.PathFigure(0,.2*te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.2*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.2*te).close());var ye=new go.PathFigure(0,.6*te,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.6*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.45*ne,.8*te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ye.add(new go.PathSegment(go.PathSegment.Line,0,.6*te).close()),ce}),go.Shape.defineFigureGenerator("Boat Shipment",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.15*ne,.6*te,!0);ce.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 ge=new go.PathFigure(.15*ne,.6*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.6*te)),ce}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Workcell",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Supermarket",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("TruckShipment",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(ne,.8*te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.6*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.8*te).close());var ye=.1,we=Ve*.1,Ce=.2,Re=.9,We=new go.PathFigure((Ce-ye)*ne,Re*te,!0);ce.add(We),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-ye)*te,(Ce-ye)*ne,(Re-we)*te,(Ce-we)*ne,(Re-ye)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+ye)*ne,Re*te,(Ce+we)*ne,(Re-ye)*te,(Ce+ye)*ne,(Re-we)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re+ye)*te,(Ce+ye)*ne,(Re+we)*te,(Ce+we)*ne,(Re+ye)*te)),We.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-ye)*ne,Re*te,(Ce-we)*ne,(Re+ye)*te,(Ce-ye)*ne,(Re+we)*te).close()),ye=.1,we=Ve*.1,Ce=.8,Re=.9;var lt=new go.PathFigure((Ce-ye)*ne,Re*te,!0);return ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re-ye)*te,(Ce-ye)*ne,(Re-we)*te,(Ce-we)*ne,(Re-ye)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce+ye)*ne,Re*te,(Ce+we)*ne,(Re-ye)*te,(Ce+ye)*ne,(Re-we)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Ce*ne,(Re+ye)*te,(Ce+ye)*ne,(Re+we)*te,(Ce+we)*ne,(Re+ye)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Ce-ye)*ne,Re*te,(Ce-we)*ne,(Re+ye)*te,(Ce-ye)*ne,(Re+we)*te).close()),ce}),go.Shape.defineFigureGenerator("KanbanPost",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.2*ne,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Forklift",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(0,.5*te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,0,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,0,.5*te));var ye=new go.PathFigure(.5*ne,.8*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.1*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.1*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.8*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.8*te));var we=new go.PathFigure(.5*ne,.7*te,!1);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne,.7*te));var Ce=.1,Re=Ve*.1,We=.1,lt=.9,ht=new go.PathFigure((We-Ce)*ne,lt*te,!0);ce.add(ht),ht.add(new go.PathSegment(go.PathSegment.Bezier,We*ne,(lt-Ce)*te,(We-Ce)*ne,(lt-Re)*te,(We-Re)*ne,(lt-Ce)*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(We+Ce)*ne,lt*te,(We+Re)*ne,(lt-Ce)*te,(We+Ce)*ne,(lt-Re)*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,We*ne,(lt+Ce)*te,(We+Ce)*ne,(lt+Re)*te,(We+Re)*ne,(lt+Ce)*te)),ht.add(new go.PathSegment(go.PathSegment.Bezier,(We-Ce)*ne,lt*te,(We-Re)*ne,(lt+Ce)*te,(We-Ce)*ne,(lt+Re)*te)),Ce=.1,Re=Ve*.1,We=.4,lt=.9;var nt=new go.PathFigure((We-Ce)*ne,lt*te,!0);return ce.add(nt),nt.add(new go.PathSegment(go.PathSegment.Bezier,We*ne,(lt-Ce)*te,(We-Ce)*ne,(lt-Re)*te,(We-Re)*ne,(lt-Ce)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(We+Ce)*ne,lt*te,(We+Re)*ne,(lt-Ce)*te,(We+Ce)*ne,(lt-Re)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,We*ne,(lt+Ce)*te,(We+Ce)*ne,(lt+Re)*te,(We+Re)*ne,(lt+Ce)*te)),nt.add(new go.PathSegment(go.PathSegment.Bezier,(We-Ce)*ne,lt*te,(We-Re)*ne,(lt+Ce)*te,(We-Ce)*ne,(lt+Re)*te)),ce}),go.Shape.defineFigureGenerator("RailShipment",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.1*ne,.4*te,!0);ce.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 ge=new go.PathFigure(.45*ne,.7*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.7*te));var ye=new go.PathFigure(.55*ne,.4*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.4*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.9*ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.9*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.55*ne,.4*te).close());var We=.05,lt=Ve*.05,ht=.175,nt=.95,we=new go.PathFigure((ht-We)*ne,nt*te,!0);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt-We)*te,(ht-We)*ne,(nt-lt)*te,(ht-lt)*ne,(nt-We)*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ht+We)*ne,nt*te,(ht+lt)*ne,(nt-We)*te,(ht+We)*ne,(nt-lt)*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt+We)*te,(ht+We)*ne,(nt+lt)*te,(ht+lt)*ne,(nt+We)*te)),we.add(new go.PathSegment(go.PathSegment.Bezier,(ht-We)*ne,nt*te,(ht-lt)*ne,(nt+We)*te,(ht-We)*ne,(nt+lt)*te));var We=.05,lt=Ve*.05,ht=.375,nt=.95,Ce=new go.PathFigure((ht-We)*ne,nt*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt-We)*te,(ht-We)*ne,(nt-lt)*te,(ht-lt)*ne,(nt-We)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ht+We)*ne,nt*te,(ht+lt)*ne,(nt-We)*te,(ht+We)*ne,(nt-lt)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt+We)*te,(ht+We)*ne,(nt+lt)*te,(ht+lt)*ne,(nt+We)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ht-We)*ne,nt*te,(ht-lt)*ne,(nt+We)*te,(ht-We)*ne,(nt+lt)*te));var We=.05,lt=Ve*.05,ht=.625,nt=.95,Re=new go.PathFigure((ht-We)*ne,nt*te,!0);ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt-We)*te,(ht-We)*ne,(nt-lt)*te,(ht-lt)*ne,(nt-We)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ht+We)*ne,nt*te,(ht+lt)*ne,(nt-We)*te,(ht+We)*ne,(nt-lt)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt+We)*te,(ht+We)*ne,(nt+lt)*te,(ht+lt)*ne,(nt+We)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ht-We)*ne,nt*te,(ht-lt)*ne,(nt+We)*te,(ht-We)*ne,(nt+lt)*te));var We=.05,lt=Ve*.05,ht=.825,nt=.95,mt=new go.PathFigure((ht-We)*ne,nt*te,!0);ce.add(mt),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt-We)*te,(ht-We)*ne,(nt-lt)*te,(ht-lt)*ne,(nt-We)*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ht+We)*ne,nt*te,(ht+lt)*ne,(nt-We)*te,(ht+We)*ne,(nt-lt)*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,ht*ne,(nt+We)*te,(ht+We)*ne,(nt+lt)*te,(ht+lt)*ne,(nt+We)*te)),mt.add(new go.PathSegment(go.PathSegment.Bezier,(ht-We)*ne,nt*te,(ht-lt)*ne,(nt+We)*te,(ht-We)*ne,(nt+lt)*te).close());var at=new go.PathFigure(0,te,!1);return ce.add(at),at.add(new go.PathSegment(go.PathSegment.Line,ne,te).close()),ce}),go.Shape.defineFigureGenerator("Warehouse",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(0,.2*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.2*te).close());var ye=new go.PathFigure(.15*ne,te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.15*ne,.5*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.4*ne,.5*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.4*ne,te)),ye.add(new go.PathSegment(go.PathSegment.Line,.15*ne,te).close());var we=.05,Ce=Ve*.05,Re=.35,We=.775,lt=new go.PathFigure((Re-we)*ne,We*te,!0);return ce.add(lt),lt.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(We-we)*te,(Re-we)*ne,(We-Ce)*te,(Re-Ce)*ne,(We-we)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Re+we)*ne,We*te,(Re+Ce)*ne,(We-we)*te,(Re+we)*ne,(We-Ce)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,Re*ne,(We+we)*te,(Re+we)*ne,(We+Ce)*te,(Re+Ce)*ne,(We+we)*te)),lt.add(new go.PathSegment(go.PathSegment.Bezier,(Re-we)*ne,We*te,(Re-Ce)*ne,(We+we)*te,(Re-we)*ne,(We+Ce)*te).close()),ce}),go.Shape.defineFigureGenerator("ControlCenter",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Bluetooth",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.75*te,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("Bookmark",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("Globe",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Wave",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.25*te,!1);return ce.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)),ce}),go.Shape.defineFigureGenerator("Operator",function(Te,ne,te){var ce=new go.Geometry,se=.3,ge=Ve*.3,ye=.5,we=.7,Ce=new go.PathFigure((ye-se)*ne,we*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te));var Re=new go.PathFigure(0,.7*te,!1);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ne,.7*te,0,0,ne,0)),ce}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.5*ne,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne,0,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("Battery",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);ce.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 ge=new go.PathFigure(0,.6*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,0,.4*te)),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.4*te)),ce}),go.Shape.defineFigureGenerator("Delete",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*.5,ye=.5,we=.5,Ce=new go.PathFigure((ye-se)*ne,we*te,!0);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te));var Re=new go.PathFigure(.15*ne,.5*te,!1);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,.85*ne,.5*te)),ce}),go.Shape.defineFigureGenerator("Flag",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.1*te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Help",function(Te,ne,te){var ce=new go.Geometry,se=.5,ge=Ve*.5,ye=.5,we=.5,Ce=new go.PathFigure((ye-se)*ne,we*te,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Ce.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te).close()),se=.05,ge=Ve*.05,ye=.5,we=.8;var Re=new go.PathFigure((ye-se)*ne,we*te,!1);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we-se)*te,(ye-se)*ne,(we-ge)*te,(ye-ge)*ne,(we-se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye+se)*ne,we*te,(ye+ge)*ne,(we-se)*te,(ye+se)*ne,(we-ge)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,ye*ne,(we+se)*te,(ye+se)*ne,(we+ge)*te,(ye+ge)*ne,(we+se)*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,(ye-se)*ne,we*te,(ye-ge)*ne,(we+se)*te,(ye-se)*ne,(we+ge)*te).close()),Re.add(new go.PathSegment(go.PathSegment.Move,.5*ne,.7*te)),Re.add(new go.PathSegment(go.PathSegment.Line,.5*ne,.5*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.5*ne,.2*te,.75*ne,.475*te,.75*ne,.225*te)),Re.add(new go.PathSegment(go.PathSegment.Bezier,.3*ne,.35*te,.4*ne,.2*te,.3*ne,.25*te)),ce}),go.Shape.defineFigureGenerator("Location",function(Te,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(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ce.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 ge=new go.PathFigure(.2*ne,.5*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.3*te)),ce}),go.Shape.defineFigureGenerator("Unlocked",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);ce.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 ge=new go.PathFigure(.2*ne,.5*te,!1);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Move,.2*ne,.5*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.2*ne,.3*te)),ge.add(new go.PathSegment(go.PathSegment.Bezier,.8*ne,.3*te,.25*ne,0,.75*ne,0)),ge.add(new go.PathSegment(go.PathSegment.Line,.8*ne,.35*te)),ce}),go.Shape.defineFigureGenerator("Gear",function(Te,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(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.5*te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Map",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,.2*te,!0);return ce.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)),ce}),go.Shape.defineFigureGenerator("Eject",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te,!0);ce.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 ge=new go.PathFigure(0,te*.6,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne,.6*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.5*ne,0).close()),ce}),go.Shape.defineFigureGenerator("Pencil",function(Te,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(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*1,te*1,!1);ce.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 ge=new go.PathFigure(.126*ne,.85*te,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,.126*ne,.45*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.45*te)),ge.add(new go.PathSegment(go.PathSegment.Line,.322*ne,.85*te).close());var ye=new go.PathFigure(.402*ne,.85*te,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,.402*ne,.45*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.45*te)),ye.add(new go.PathSegment(go.PathSegment.Line,.598*ne,.85*te).close());var we=new go.PathFigure(.678*ne,.85*te,!1);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,.678*ne,.45*te)),we.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.45*te)),we.add(new go.PathSegment(go.PathSegment.Line,.874*ne,.85*te).close());var Ce=new go.PathFigure(.5*ne,.1*te,!1);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*ne,.3*te)),Ce.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*ne,.3*te).close()),ce}),go.Shape.defineFigureGenerator("Staircase",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te*1,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("5Bars",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,te*1,!0);ce.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 ge=new go.PathFigure(ne*.204,te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.204,te*(1-.184))),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*(1-.184*2))),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.388,te*1).close());var ye=new go.PathFigure(ne*.408,te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.408,te*(1-.184*2))),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*(1-.184*3))),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.592,te*1).close());var we=new go.PathFigure(ne*.612,te,!0);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne*.612,te*(1-.184*3))),we.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*(1-.184*4))),we.add(new go.PathSegment(go.PathSegment.Line,ne*.796,te*1).close());var Ce=new go.PathFigure(ne*.816,te,!0);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.816,te*(1-.184*4))),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*(1-.184*5))),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1).close()),ce}),go.Shape.defineFigureGenerator("PC",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!0);ce.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 ge=new go.PathFigure(ne*.055,.07*te,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.07)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.1).close());var ye=new go.PathFigure(ne*.055,.13*te,!0);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.13)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.16)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.16).close());var we=new go.PathFigure(ne*.055,.18*te,!0);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.18)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.245,te*.21)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.055,te*.21).close());var Ce=new go.PathFigure(ne*1,0,!0);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.4,0)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.65)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.65).close()),ce}),go.Shape.defineFigureGenerator("Plane",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(.55*ne,te,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("Key",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*1,te*.5,!0);return ce.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()),ce}),go.Shape.defineFigureGenerator("FilmTape",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(0,0,!1);ce.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 ge=new go.PathFigure(0,0,!1);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*0)),ge.add(new go.PathSegment(go.PathSegment.Arc,270,-180,ne*1,ne*.3,ne*.055)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*1));var ye=new go.PathFigure(ne*.11,te*.1,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.1)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*0),te*.8)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.11,te*.8).close());var we=new go.PathFigure(ne*(.11+.24133333*1+.028*1),te*.1,!1);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.1)),we.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*1),te*.8)),we.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*1+.028*1),te*.8).close());var Ce=new go.PathFigure(ne*(.11+.24133333*2+.028*2),te*.1,!1);return ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.1)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*3+.028*2),te*.8)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*(.11+.24133333*2+.028*2),te*.8).close()),ce}),go.Shape.defineFigureGenerator("FloppyDisk",function(Te,ne,te){var ce=new go.Geometry,se=8,ge=se*Ve,ye=new go.PathFigure(se,0,!1);ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.86,0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*1,te*.14)),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-ge,ne-ge,te)),ye.add(new go.PathSegment(go.PathSegment.Line,se,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ge,te,0,te-ge)),ye.add(new go.PathSegment(go.PathSegment.Line,0,se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,se,0,0,ge,ge,0).close());var we=new go.PathFigure(ne*.83,0,!1);ce.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.3)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.3)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*0).close());var Ce=new go.PathFigure(ne*.83,te*1,!1);ce.add(Ce),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.83,te*.5)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*.5)),Ce.add(new go.PathSegment(go.PathSegment.Line,ne*.17,te*1).close());var Re=new go.PathFigure(ne*.78,te*.05,!1);return ce.add(Re),Re.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.05)),Re.add(new go.PathSegment(go.PathSegment.Line,ne*.66,te*.25)),Re.add(new go.PathSegment(go.PathSegment.Line,ne*.78,te*.25).close()),ce}),go.Shape.defineFigureGenerator("SpeechBubble",function(Te,ne,te){var ce=Te?Te.parameter1:NaN;(isNaN(ce)||ce<0)&&(ce=15),ce=Math.min(ce,ne/3),ce=Math.min(ce,te/3);var se=ce*Ve,ge=te*.8,ye=new go.Geometry,we=new go.PathFigure(ce,0,!0);return ye.add(we),we.add(new go.PathSegment(go.PathSegment.Line,ne-ce,0)),we.add(new go.PathSegment(go.PathSegment.Bezier,ne,ce,ne-se,0,ne,se)),we.add(new go.PathSegment(go.PathSegment.Line,ne,ge-ce)),we.add(new go.PathSegment(go.PathSegment.Bezier,ne-ce,ge,ne,ge-se,ne-se,ge)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.7,ge)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te)),we.add(new go.PathSegment(go.PathSegment.Line,ne*.55,ge)),we.add(new go.PathSegment(go.PathSegment.Line,ce,ge)),we.add(new go.PathSegment(go.PathSegment.Bezier,0,ge-ce,se,ge,0,ge-se)),we.add(new go.PathSegment(go.PathSegment.Line,0,ce)),we.add(new go.PathSegment(go.PathSegment.Bezier,ce,0,0,se,se,0).close()),se>1?(ye.spot1=new go.Spot(0,0,se,se),ye.spot2=new go.Spot(1,.8,-se,-se)):(ye.spot1=go.Spot.TopLeft,ye.spot2=new go.Spot(1,.8)),ye}),go.Shape.defineFigureGenerator("Repeat",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*0,te*.45,!0);ce.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 ge=new go.PathFigure(ne*1,te*.55,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.75,te*1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.55)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.55)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.7,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.1)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.35,te*0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*0)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.8,te*.55).close()),ce}),go.Shape.defineFigureGenerator("Windows",function(Te,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(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*0,te*.1,!1);ce.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 ge=new go.PathFigure(ne*.1,te*.2,!0);ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.25)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.22,te*.285)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.32)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.1,te*.37)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.32)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.275,te*.25).close());var ye=new go.PathFigure(ne*.28,te*.37,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.37)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.45,te*.41)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.28,te*.41).close()),ce}),go.Shape.defineFigureGenerator("Beaker",function(Te,ne,te){var ce=new go.Geometry,se=15,ge=se*Ve,ye=new go.PathFigure(ne*.62,te*.475,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne,te-se)),ye.add(new go.PathSegment(go.PathSegment.Bezier,ne-se,te,ne,te-ge,ne-ge,te)),ye.add(new go.PathSegment(go.PathSegment.Line,se,te)),ye.add(new go.PathSegment(go.PathSegment.Bezier,0,te-se,ge,te,0,te-ge)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.475)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.38,te*.03)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.36,te*0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*0)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.62,te*.03).close()),ge>1?(ce.spot1=new go.Spot(0,0,ge,ge),ce.spot2=new go.Spot(1,1,-ge,-ge)):(ce.spot1=go.Spot.TopLeft,ce.spot2=go.Spot.BottomRight),ce}),go.Shape.defineFigureGenerator("Download",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ce.add(se);var ge=.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-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),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-ge)).close());var ye=new go.PathFigure(ne*.4,te*0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.5,te*.66)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*(1-.26),te*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.44)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*0).close()),ce}),go.Shape.defineFigureGenerator("Bin",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ce.add(se);var ge=.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-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),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-ge)).close()),ce}),go.Shape.defineFigureGenerator("Upload",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*0,te*1,!0);ce.add(se);var ge=.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-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.64,te*(1-ge))),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-ge))),se.add(new go.PathSegment(go.PathSegment.Line,ne*.07,te*(1-ge))),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-ge)).close());var ye=new go.PathFigure(ne*.5,te*0,!0);return ce.add(ye),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.26,te*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.4,te*.63)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.63)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.6,te*.25)),ye.add(new go.PathSegment(go.PathSegment.Line,ne*.74,te*.25).close()),ce}),go.Shape.defineFigureGenerator("EmptyDrink",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);return ce.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()),ce}),go.Shape.defineFigureGenerator("Drink",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*.15,te*0,!1);ce.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 ge=new go.PathFigure(ne*.235,te*.28,!0);return ce.add(ge),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.765,te*.28)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.655,te*.97)),ge.add(new go.PathSegment(go.PathSegment.Line,ne*.345,te*.97).close()),ce}),go.Shape.defineFigureGenerator("4Arrows",function(Te,ne,te){var ce=new go.Geometry,se=new go.PathFigure(ne*.5,te*0,!0);return ce.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()),ce}),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 Rn={},$n="5.0",be={},le=null,Xe=!1,Lt=!1,At=null,wt=!1,_e=null,Ve=null,xt=0;xt<arguments.length;xt++){var ut=arguments[xt];if(ut!==null)switch(typeof ut){case"number":$n=ut.toFixed(1);break;case"string":ut.match(new RegExp("^[0-9]\\.[0-9]+$"))?$n=ut:At=ut;break;case"object":typeof ut.is3D!="undefined"?le=ut:be=ut;break;case"boolean":Xe=ut,Lt=!0;break}}le===null&&(le={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},be.material_id!==void 0&&!Lt&&(Xe=!0)),At!==null&&be.id===void 0&&(be.id=At);var pt="",Rt="",Ot=!1,jt=null,Te=null,ne=null,te=!1,ce=null,se=null,ge=null,ye=null,we=null;be.height!==void 0&&(be.height=Math.round(be.height)),be.width!==void 0&&(be.width=Math.round(be.width));var Ce=function(zt){return parseFloat(zt)>4?parseFloat(zt):5};Rn.setHTML5Codebase=function(zt,kn){Ve=zt,Je(zt,kn)},Rn.setJavaCodebase=Rn.setJavaCodebaseVersion=Rn.isCompiledInstalled=Rn.setPreCompiledScriptPath=Rn.setPreCompiledResourcePath=function(){},Rn.setHTML5CodebaseVersion=function(zt,kn){var bn=parseFloat(zt);if(bn!==NaN&&bn<5){console.log("The GeoGebra HTML5 codebase version "+bn+" is deprecated. Using version latest instead.");return}_e=zt,Ke(zt,kn)},Rn.getHTML5CodebaseVersion=function(){return Te},Rn.getParameters=function(){return be},Rn.setFontsCSSURL=function(zt){ye=zt},Rn.setGiacJSURL=function(zt){},Rn.setJNLPFile=function(zt){pt=zt},Rn.setJNLPBaseDir=function(zt){},Rn.inject=function(){function zt(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var kn="auto",bn=be.id,oi,Yt=!1,Mt=0;Mt<arguments.length;Mt++){var _t=arguments[Mt];typeof _t=="string"?(_t=_t.toLowerCase(),_t.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?kn=_t:bn=arguments[Mt]):typeof _t=="boolean"?Yt=_t:_t instanceof HTMLElement&&(oi=_t)}mn();function mn(){if(!wt){setTimeout(mn,200);return}kn=fn(kn);var rn=oi||document.getElementById(bn);if(!rn){console.log("possibly bug on ajax loading? ");return}if(Rn.removeExistingApplet(rn,!1),be.width===void 0&&rn.clientWidth&&(be.width=rn.clientWidth),be.height===void 0&&rn.clientHeight&&(be.height=rn.clientHeight),!(be.width&&be.height)&&kn==="html5"&&(delete be.width,delete be.height),jt=kn,kn==="screenshot")Nt(rn,be);else{var He=!1;be.hasOwnProperty("playButton")&&be.playButton||be.hasOwnProperty("clickToLoad")&&be.clickToLoad?He=!0:be.hasOwnProperty("playButtonAutoDecide")&&be.playButtonAutoDecide&&(He=(!Re()||zt())&&We()),He?(jt="screenshot",Ln(rn,be,Yt,kn)):Pt(rn,be,Yt)}}};function Re(){try{return window.self!==window.top}catch(zt){return!0}}function We(){return be.hasOwnProperty("screenshotGenerator")&&be.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Rn.getViews=function(){return le},Rn.isJavaInstalled=function(){return!1};var lt=function(zt){var kn=function(Mt){var _t=JSON.parse(Mt),mn=function(Me){return Me.type=="G"||Me.type=="E"},rn=_t.elements?_t.elements.filter(mn)[0]:_t;if(!rn||!rn.url){bn();return}be.fileName=rn.url,ht(rn.settings||{}),le.is3D=!0;var He="https://www.geogebra.org/images/";Rn.setPreviewImage(ce||rn.previewUrl,He+"GeoGebra_loading.png",He+"applet_play.png"),zt()},bn=function(){be.onError&&be.onError(),_n("Error: Fetching material (id "+be.material_id+") failed.",be)},oi=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",Yt="/materials/"+be.material_id+"?scope=basic";nt("https://"+oi+"/api/proxy.php?path="+encodeURIComponent(Yt),kn,bn)};function ht(zt){var kn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(bn){zt[bn]=!!zt[bn]}),kn.forEach(function(bn){be[bn]===void 0&&zt[bn]!==void 0&&(be[bn]=zt[bn])}),be.showToolBarHelp===void 0&&(be.showToolBarHelp=be.showToolBar)}function nt(zt,kn,bn){var oi=new XMLHttpRequest;oi.open("GET",zt),oi.onload=function(){kn(oi.responseText)},oi.onerror=bn,oi.send()}Rn.isHTML5Installed=function(){return!0},Rn.getLoadedAppletType=function(){return jt},Rn.setPreviewImage=function(zt,kn,bn){ce=zt,se=kn,ge=bn},Rn.removeExistingApplet=function(zt,kn){var bn;typeof zt=="string"&&(zt=document.getElementById(zt)),jt=null;var oi=null;for(bn=0;bn<zt.childNodes.length;bn++){var Yt=zt.childNodes[bn],Mt=Yt.className;Mt==="applet_screenshot"?kn?(Yt.style.display="block",jt="screenshot"):Yt.style.display="none":Mt!=="applet_scaler prerender"&&(zt.removeChild(Yt),oi=Mt&&Mt.indexOf("appletParameters")!=-1?Yt.id:null,bn--)}var _t=be.id!==void 0?be.id:oi,mn=window[_t];mn&&typeof mn.getBase64=="function"&&(mn.remove(),window[_t]=null)},Rn.refreshHitPoints=function(){if(Ce(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var zt=Rn.getAppletObject();return zt&&typeof zt.recalculateEnvironments=="function"?(zt.recalculateEnvironments(),!0):!1},Rn.startAnimation=function(){var zt=Rn.getAppletObject();return zt&&typeof zt.startAnimation=="function"?(zt.startAnimation(),!0):!1},Rn.stopAnimation=function(){var zt=Rn.getAppletObject();return zt&&typeof zt.stopAnimation=="function"?(zt.stopAnimation(),!0):!1},Rn.getAppletObject=function(){var zt=be.id!==void 0?be.id:"ggbApplet";return window[zt]},Rn.resize=function(){};var mt=function(zt,kn,bn){var oi=document.createElement("param");oi.setAttribute("name",kn),oi.setAttribute("value",bn),zt.appendChild(oi)},at=function(zt){return zt&&zt!=="false"},Pt=function(zt,kn,bn){Ce(Te)<=4.2&&(bn=!0);var oi=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Te||ggbHTML5LoadedCodebaseIsWebSimple&&!te)&&(oi=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var Yt=document.createElement("div");Yt.classList.add("appletParameters","notranslate");var Mt=kn.width,_t=kn.height;if(kn.disableAutoScale=kn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():kn.disableAutoScale,kn.width!==void 0)if(Ce(Te)<=4.4)at(kn.showToolBar)&&(kn.height-=7),at(kn.showAlgebraInput)&&(kn.height-=37),kn.width<605&&at(kn.showToolBar)&&(kn.width=605,Mt=605);else{var mn=100;(at(kn.showToolBar)||at(kn.showMenuBar))&&(kn.hasOwnProperty("customToolBar")&&(kn.customToolbar=kn.customToolBar),mn=at(kn.showMenuBar)?245:155),Mt<mn&&(kn.width=mn,Mt=mn)}Yt.style.border="none",Yt.style.display="inline-block";for(var rn in kn)kn.hasOwnProperty(rn)&&rn!=="appletOnLoad"&&Yt.setAttribute("data-param-"+rn,kn[rn]);ye&&Yt.setAttribute("data-param-fontscssurl",ye),Rn.resize=function(){GGBAppletUtils.responsiveResize(zt,kn)},window.addEventListener("resize",function(en){Rn.resize()});var He=typeof kn.appletOnLoad=="function"?kn.appletOnLoad:function(){};if(!bn&&kn.width!==void 0){kn.hasOwnProperty("showSplash")||Yt.setAttribute("data-param-showSplash","false");var Me=zt.querySelector(".applet_scaler.prerender"),Fe=Me!==null;if(Fe)var Oe=Me.querySelector(".ggb_preview");else{var Oe=Nn(Mt,_t,kn.borderColor,!1);Me=document.createElement("div"),Me.className="applet_scaler",Me.style.position="relative",Me.style.display="block",Me.style.width=Mt+"px",Me.style.height=_t+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Me,"66%"),Ce(Te)>=5?(kn.appletOnLoad=function(en){var wi=zt.querySelector(".ggb_preview");wi&&wi.parentNode.removeChild(wi),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Me),window.GGBT_wsf_view&&$(window).trigger("resize"),He(en)},Fe||Me.appendChild(Oe)):Yt.appendChild(Oe),Me.appendChild(Yt),Fe||zt.appendChild(Me),setTimeout(function(){Rn.resize()},1)}else{var Ue=document.createElement("div");Ue.className="applet_scaler",Ue.style.position="relative",Ue.style.display="block",Ue.appendChild(Yt),zt.appendChild(Ue),kn.appletOnLoad=function(en){Rn.resize(),He(en)}}function Be(en,wi){wi&&typeof wi.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(en,wi.appletOnLoad):renderGGBElement(en),_n("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",wi)}function ot(en,wi){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:en,params:wi}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Si){Be(Si.article,Si.params)}),html5AppletsToProcess=null)},Ce(Te)<5&&(en.className+=" geogebraweb")):Be(en,wi)}if(oi){scriptLoadStarted=!0;for(var Cn=0;Cn<Yt.childNodes.length;Cn++){var ci=Yt.childNodes[Cn].tagName;ci==="TABLE"&&(Yt.removeChild(Yt.childNodes[Cn]),Cn--)}if(ggbHTML5LoadedScript!==null){var si=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');si!=null&&si.parentNode.removeChild(si)}var pn=document.createElement("script"),qn=function(){ot(Yt,kn)};pn.src=Rt+ne,ggbHTML5LoadedCodebaseIsWebSimple=te,ggbHTML5LoadedCodebaseVersion=Te,ggbHTML5LoadedScript=pn.src,_n("GeoGebra HTML5 codebase loaded: '"+Rt+"'.",kn),!Ve&&(!_e||_e=="5.0")?(te?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),qn()):Rt.requirejs?__webpack_require__.e(12).then(function(){var en=[__webpack_require__(12)];qn.apply(null,en)}.bind(this)).catch(__webpack_require__.oe):(pn.onload=qn,zt.appendChild(pn))}else ot(Yt,kn);kn.height=_t,kn.width=Mt},Nt=function(zt,kn,bn){var oi=Nn(kn.width,kn.height,kn.borderColor,bn),Yt=document.createElement("div");Yt.style.position="relative",Yt.style.display="block",Yt.style.width=kn.width+"px",Yt.style.height=kn.height+"px",Yt.className="applet_screenshot applet_scaler"+(bn?" applet_screenshot_play":""),Yt.appendChild(oi);var Mt=GGBAppletUtils.getScale(kn,zt,bn);bn?(zt.appendChild(xn()),window.GGBT_wsf_view||(zt.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Yt,"66%"),zt.appendChild(Yt),Mt!==1&&!isNaN(Mt)&&(GGBAppletUtils.scaleElement(Yt,Mt),Yt.style.width=kn.width+"px",Yt.style.height=kn.height+"px",Yt.parentNode.style.width=kn.width*Mt+"px",Yt.parentNode.style.height=kn.height*Mt+"px"),Rn.resize=function(){Et(zt,oi,Yt,bn)},window.addEventListener("resize",function(_t){Rn.resize()}),Rn.resize()};function Et(zt,kn,bn,oi){if(zt.contains(kn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(zt.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(zt)}var Yt=GGBAppletUtils.getScale(be,zt,oi);bn.parentNode!==null&&(!isNaN(Yt)&&Yt!==1?(GGBAppletUtils.scaleElement(bn,Yt),bn.parentNode.style.width=be.width*Yt+"px",bn.parentNode.style.height=be.height*Yt+"px"):(GGBAppletUtils.scaleElement(bn,1),bn.parentNode.style.width=be.width+"px",bn.parentNode.style.height=be.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(zt),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Rn.onExitFullscreen=function(zt,kn){kn.appendChild(zt)};var Ln=function(zt,kn,bn,oi){Nt(zt,kn,!0);for(var Yt=function(){var mn=[];for(_t=0;_t<zt.childNodes.length;_t++)mn.push(zt.childNodes[_t]);if(window.GGBT_wsf_view){var rn=window.GGBT_wsf_view.renderFullScreen(zt,kn.id),He=document.getElementById("fullscreencontainer"),Me=jQuery(zt).find(".fullscreencontent");Me.length>0?(rn.remove(),Me.attr("id","fullscreencontent").show(),jQuery(He).append(Me),window.dispatchEvent(new Event("resize"))):Pt(rn,kn,!1),window.GGBT_wsf_view.launchFullScreen(He)}else jt=oi,Pt(zt,kn,!1);if(!window.GGBT_wsf_view)for(_t=0;_t<mn.length;_t++)zt.removeChild(mn[_t])},Mt=zt.getElementsByClassName("ggb_preview_play"),_t=0;_t<Mt.length;_t++)Mt[_t].addEventListener("click",Yt,!1),Mt[_t].addEventListener("ontouchstart",Yt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(zt),We()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},xn=function(){var zt=document.createElement("div");if(zt.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var kn='.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");}',bn=document.createElement("style");bn.styleSheet?bn.styleSheet.cssText=kn:bn.appendChild(document.createTextNode(kn)),document.getElementsByTagName("head")[0].appendChild(bn)}return zt},Nn=function(zt,kn,bn,oi){var Yt=document.createElement("div");Yt.className="ggb_preview",Yt.style.position="absolute",Yt.style.zIndex="90",Yt.style.width=zt-2+"px",Yt.style.height=kn-2+"px",Yt.style.top="0px",Yt.style.left="0px",Yt.style.overflow="hidden",Yt.style.backgroundColor="white";var Mt="lightgrey";bn!==void 0&&(bn==="none"?Mt="transparent":Mt=bn),Yt.style.border="1px solid "+Mt;var _t=document.createElement("img");if(_t.style.position="relative",_t.style.zIndex="1000",_t.style.top="-1px",_t.style.left="-1px",ce!==null&&_t.setAttribute("src",ce),_t.style.opacity=.7,se!==null){var mn,rn,He;if(!oi){mn=document.createElement("img"),mn.style.position="absolute",mn.style.zIndex="1001",mn.style.opacity=1,_t.style.opacity=.3,rn=360,rn>zt/4*3&&(rn=zt/4*3),He=rn/5.8,mn.setAttribute("src",se),mn.setAttribute("width",rn),mn.setAttribute("height",He);var Me=(zt-rn)/2,Fe=(kn-He)/2;mn.style.left=Me+"px",mn.style.top=Fe+"px",Yt.appendChild(mn)}}return Yt.appendChild(_t),Yt},fn=function(zt){return zt=zt.toLowerCase(),zt==="html5"||zt==="screenshot"?zt:"html5"},Qe=["web","webSimple","web3d","tablet","tablet3d","phone"],Ke=function(zt,kn){if(Te=zt,kn){Je(Te,!0);return}var bn=!Xe;if(bn){var oi=Ce(Te);!isNaN(oi)&&oi<4.4&&(bn=!1)}var Yt,Mt;window.location.protocol.substr(0,4)==="http"?Yt=window.location.protocol:Yt="http:";var _t=Te.indexOf("//");_t>0?Mt=Te:_t===0?Mt=Yt+Te:Mt="https://www.geogebra.org/apps/5.2.814.0/";for(var mn in Qe)if(Te.slice(Qe[mn].length*-1)===Qe[mn]||Te.slice((Qe[mn].length+1)*-1)===Qe[mn]+"/"){Je(Mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&bn&&!le.is3D&&!le.AV&&!le.SV&&!le.CV&&!le.EV2&&!le.CP&&!le.PC&&!le.DA&&!le.FI&&!le.PV&&!at(be.showToolBar)&&!at(be.showMenuBar)&&!at(be.showAlgebraInput)&&!at(be.enableRightClick)&&(!be.appName||be.appName=="classic")?Mt+="webSimple/":Mt+="web3d/",Je(Mt,!1)},Je=function(zt,kn){if(zt.requirejs){Rt=zt;return}zt.slice(-1)!=="/"&&(zt+="/"),Rt=zt,kn===null&&(kn=zt.indexOf("http")===-1),Ot=kn,ne="web.nocache.js",te=!1;var bn=Rt.split("/");bn.length>1&&(!kn&&bn[bn.length-2]==="webSimple"?(ne="webSimple.nocache.js",te=!0):Qe.indexOf(bn[bn.length-2])>=0&&(ne=bn[bn.length-2]+".nocache.js")),bn=zt.split("/"),Te=bn[bn.length-3],Te.substr(0,4)==="test"?Te=Te.substr(4,1)+"."+Te.substr(5,1):(Te.substr(0,3)==="war"||Te.substr(0,4)==="beta")&&(Te="5.0");var oi=parseFloat(Te);oi!==NaN&&oi<5&&zt.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+oi+" is deprecated. Using version latest instead."),Ke("5.0",kn))},_n=function(zt,kn){window.console&&window.console.log&&(!kn||typeof kn.showLogging=="undefined"||kn.showLogging&&kn.showLogging!=="false")&&console.log(zt)};be.material_id!==void 0?lt(Xn):Xn();function Xn(){var zt=$n;_e!==null?zt=_e:parseFloat(zt)<5&&(zt="5.0"),Ke(zt,!1),Ve!==null&&Je(Ve,Ot),wt=!0}return Rn},GGBAppletUtils=function(){"use strict";function Rn(){return window.GGBT_wsf_edit!==void 0}function $n(wt,_e){_e!=1?(wt.style.transformOrigin="0% 0% 0px",wt.style.webkitTransformOrigin="0% 0% 0px",wt.style.transform="scale("+_e+","+_e+")",wt.style.webkitTransform="scale("+_e+","+_e+")",wt.style.maxWidth="initial",wt.querySelector(".ggb_preview")!==null&&(wt.querySelector(".ggb_preview").style.maxWidth="initial"),wt.querySelectorAll(".ggb_preview img")[0]!==void 0&&(wt.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),wt.querySelectorAll(".ggb_preview img")[1]!==void 0&&(wt.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(wt.style.transform="none",wt.style.webkitTransform="none")}function be(wt,_e,Ve,xt,ut,pt){var Rt=null;if(pt!=null&&pt!="")for(var Ot=wt.parentNode;Ot!=null;)if((" "+Ot.className+" ").indexOf(" "+pt+" ")>-1){Rt=Ot;break}else Ot=Ot.parentNode;var jt=0,Te=0,ne=0,te=0,ce=0,se=0,ge=0;if(Rt)jt=Rt.offsetWidth,Te=Math.max(xt?Rt.offsetWidth:0,Rt.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(jt=Math.min(window.innerWidth,document.documentElement.clientWidth),Te=Math.min(window.innerHeight,document.documentElement.clientHeight),ne=jt):(jt=window.innerWidth,Te=window.innerHeight,ne=window.innerWidth),wt){var ye=wt.getBoundingClientRect();ye.left>0&&ye.left<=jt&&(ut===void 0||!ut)&&(document.dir==="rtl"?(ce=jt-ye.width-ye.left,se=ne<=480?10:30):(se=ye.left,ce=ne<=480?10:30),te=se+ce)}if(wt&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var we=wt.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(te=40,ge=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(te=0,ge=40)}}return wt&&((Ve===void 0||!Ve)&&_e>0&&_e+te<jt?jt=_e:jt-=te,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Ve===void 0||!Ve)&&(Te-=ge)),{width:jt,height:Te}}function le(wt,_e,Ve,xt,ut){if(wt.isScreenshoGenerator)return 1;var pt=xt!==void 0&&xt,Rt=wt.noScaleMargin!=null&&wt.noScaleMargin,Ot=function(we){return we&&we!=="false"},jt=Ot(wt.autoHeight),Te=be(_e,wt.width,Ve,jt,pt&&window.GGBT_wsf_view||Rt,ut),ne=parseInt(Te.width),te=wt.width,ce=wt.height;if(te===void 0){var se=_e.querySelector(".appletParameters");se&&(te=se.offsetWidth,ce=se.offsetHeight)}var ge=ne/te,ye=pt?1:Te.height/ce;return Ve!==void 0&&!Ve&&(ge=Math.min(1,ge),ye=Math.min(1,ye)),Math.min(ge,ye)}function Xe(wt,_e,Ve){var xt=1,ut,pt=!1;if(wt.hasOwnProperty("allowUpscale")&&(pt=wt.allowUpscale),wt.hasOwnProperty("scale")&&(xt=parseFloat(wt.scale),(isNaN(xt)||xt===null||xt===0)&&(xt=1),xt>1&&(pt=!0)),_e&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(pt=!0),!(wt.hasOwnProperty("disableAutoScale")&&wt.disableAutoScale))ut=le(wt,_e,pt,Ve,wt.scaleContainerClass);else return xt;return pt&&(!wt.hasOwnProperty("scale")||xt===1)?ut:Math.min(xt,ut)}function Lt(wt){var _e=Math.min(window.innerWidth,document.documentElement.clientWidth),Ve=Math.min(window.innerHeight,document.documentElement.clientHeight),xt=wt.getBoundingClientRect(),ut=(_e-xt.width)/2,pt=(Ve-xt.height)/2;pt<0&&(pt=0),wt.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ut<40?wt.style.left="40px":wt.style.left=ut+"px",wt.style.top=pt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(pt<40?wt.style.top="40px":wt.style.top=pt+"px",wt.style.left=ut+"px")}function At(wt,_e){var Ve=wt.querySelector(".appletParameters");if(Ve){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(_e.id!==Ve.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(wt)}if(Ve.parentElement&&/fullscreen/.test(Ve.parentElement.className))return;var xt=Xe(_e,wt);Rn()&&Ve.setAttribute("data-param-scale",xt);for(var ut=null,pt=0;pt<wt.childNodes.length;pt++)if(wt.childNodes[pt].className!==void 0&&wt.childNodes[pt].className.match(/^applet_scaler/)){ut=wt.childNodes[pt];break}if(ut!==null&&ut.querySelector(".noscale")!==null)return;var Rt=_e.id!==void 0?_e.id:"ggbApplet",Ot=window[Rt];(Ot==null||!Ot.recalculateEnvironments)&&ut!==null&&!ut.className.match(/fullscreen/)&&(ut.parentNode.style.transform="",!isNaN(xt)&&xt!==1?(ut.parentNode.style.width=_e.width*xt+"px",ut.parentNode.style.height=_e.height*xt+"px",$n(ut,xt)):($n(ut,1),ut.parentNode.style.width=_e.width+"px",ut.parentNode.style.height=_e.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Lt(wt),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(Ve).parents(".content-added-content"))}}return{responsiveResize:At,isFlexibleWorksheetEditor:Rn,positionCenter:Lt,getScale:Xe,scaleElement:$n}}();__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 Rn=n.location.search;return Rn.indexOf(J)!=-1||Rn.indexOf(K)!=-1}function q(Rn,$n){}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(Rn){var $n=s[L].bindings;s[L].bindings=function(){for(var be=$n?$n():{},le=Rn[webModule.__softPermutationId],Xe=O;Xe<le.length;Xe++){var Lt=le[Xe];be[Lt[O]]=Lt[P]}return be}};var t;function u(){return v(),t}function v(){if(!t){var Rn=o.createElement(Q);if(Rn.id=L,Rn.style.cssText=R+S,Rn.tabIndex=-1,o.body.appendChild(Rn),t=Rn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var $n=document.compatMode==U?V:W;t.write($n+X),t.close()}}}function w(Rn){function $n(le){function Xe(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Lt=Xe();if(Lt){le();return}function At(){if(!Lt){if(!Xe())return;Lt=!0,le(),o.removeEventListener&&o.removeEventListener(Z,At,!1),wt&&clearInterval(wt)}}o.addEventListener&&o.addEventListener(Z,At,!1);var wt=setInterval(function(){At()},$)}function be(le){var Xe=u(),Lt=Xe.body,At=Xe.createElement(_);At.language=ab,At.crossOrigin=W,At.src=le,webModule.__errFn&&(At.onerror=function(){webModule.__errFn(L,new Error(bb+le))}),Lt.appendChild(At)}$n(function(){be(Rn)})}webModule.__startLoadingFragment=function(Rn){return C(Rn)},webModule.__installRunAsyncCode=function(Rn){var $n=u(),be=$n.body,le=$n.createElement(_);le.language=ab,le.text=Rn,be.appendChild(le),be.removeChild(le)};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(Rn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Rn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Rn){var $n=c[Rn];return $n==null?null:$n},r=d,webModule.__errFn=e}function B(){function Rn(wt){var _e=wt.lastIndexOf(rb);_e==-1&&(_e=wt.length);var Ve=wt.indexOf(sb);Ve==-1&&(Ve=wt.length);var xt=wt.lastIndexOf(tb,Math.min(Ve,_e));return xt>=O?wt.substring(O,xt+P):W}function $n(wt){if(!wt.match(/^\w+:\/\//)){var _e=o.createElement(ub);_e.src=wt+vb,wt=Rn(_e.src)}return wt}function be(){var wt=__gwt_getMetaProperty(wb);return wt!=null?wt:W}function le(){for(var wt=o.getElementsByTagName(_),_e=O;_e<wt.length;++_e)if(wt[_e].src.indexOf(xb)!=-1)return Rn(wt[_e].src);return W}function Xe(){var wt=o.getElementsByTagName(yb);return wt.length>O?wt[wt.length-P].href:W}function Lt(){var wt=o.location;return wt.href==wt.protocol+zb+wt.host+wt.pathname+wt.search+wt.hash}var At=be();return At==W&&(At=le()),At==W&&(At=Xe()),At==W&&Lt()&&(At=Rn(o.location.href)),At=$n(At),At}function C(Rn){return Rn.match(/^\//)||Rn.match(/^[a-zA-Z]+:\/\//)?Rn:webModule.__moduleBase+Rn}function D(){var Rn=[],$n=O,be=[],le=[];function Xe(wt){var _e=le[wt](),Ve=be[wt];if(_e in Ve)return _e;var xt=[];for(var ut in Ve)xt[Ve[ut]]=ut;throw r&&r(wt,xt,_e),null}if(__gwt_isKnownPropertyValue=function(wt,_e){return _e in be[wt]},webModule.__getPropMap=function(){var wt={};for(var _e in be)be.hasOwnProperty(_e)&&(wt[_e]=Xe(_e));return wt},webModule.__computePropValue=Xe,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Lt;try{Lt=Cb;var At=Lt.indexOf(Db);At!=-1&&($n=parseInt(Lt.substring(At+P),$),Lt=Lt.substring(O,At))}catch(wt){}return webModule.__softPermutationId=$n,C(Lt+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(Rn,$n,be){"use strict";be.d($n,{Ax:function(){return At},Ds:function(){return wt},KI:function(){return Ve},SI:function(){return Lt},f1:function(){return Xe}});var le=be(11320);function Xe(xt){let ut=!0;if(xt.length>0){for(let pt=0;pt<xt.length;pt++)if(xt[pt].compile_success==0||!xt[pt].compile_success){ut=!1;break}}else ut=!1;return ut}function Lt(xt,ut=""){let pt=[];for(let Rt=0;Rt<xt.length;Rt++){let Ot=xt[Rt],jt=ut?`${ut}/${Ot.name}`:`${Ot.name}`;pt.push({title:Ot.name,type:Ot.type,isLeaf:Ot.type!=="tree",key:jt})}return pt}function At(xt,ut,pt){for(let Rt=0;Rt<xt.length;Rt++){let Ot=xt[Rt];if(Ot.key===ut){Ot.children=pt;break}Ot.children&&At(Ot.children,ut,pt)}return xt}function wt(xt,ut,pt){let Rt;return function(){let Ot=this,jt=arguments,Te=function(){Rt=null,pt||xt.apply(Ot,jt)},ne=pt&&!Rt;clearTimeout(Rt),Rt=setTimeout(Te,ut),ne&&xt.apply(Ot,jt)}}const _e=!0,Ve=le.Z.API_SERVER},60580:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Te}});var le=be(85804),Xe=be(67294),Lt=Object.defineProperty,At=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,ut=(ne,te,ce)=>te in ne?Lt(ne,te,{enumerable:!0,configurable:!0,writable:!0,value:ce}):ne[te]=ce,pt=(ne,te)=>{for(var ce in te||(te={}))Ve.call(te,ce)&&ut(ne,ce,te[ce]);if(_e)for(var ce of _e(te))xt.call(te,ce)&&ut(ne,ce,te[ce]);return ne},Rt=(ne,te)=>At(ne,wt(te)),Ot=(ne,te)=>{var ce={};for(var se in ne)Ve.call(ne,se)&&te.indexOf(se)<0&&(ce[se]=ne[se]);if(ne!=null&&_e)for(var se of _e(ne))te.indexOf(se)<0&&xt.call(ne,se)&&(ce[se]=ne[se]);return ce},jt=(ne,te,ce)=>new Promise((se,ge)=>{var ye=Re=>{try{Ce(ce.next(Re))}catch(We){ge(We)}},we=Re=>{try{Ce(ce.throw(Re))}catch(We){ge(We)}},Ce=Re=>Re.done?se(Re.value):Promise.resolve(Re.value).then(ye,we);Ce((ce=ce.apply(ne,te)).next())});const Te=ne=>{var te=ne,{children:ce}=te,se=Ot(te,["children"]);const[ge,ye]=(0,Xe.useState)(!1);return Xe.createElement(le.ZP,Rt(pt({},se),{loading:ge,onClick:we=>jt(void 0,null,function*(){try{ye(!0),yield se.onClick(we),ye(!1)}catch(Ce){console.error(Ce),ye(!1)}})}),ce)}},63037:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return jt}});var le=be(67294),Xe=be(2453),Lt=be(28802),At={codeBox:"codeBox___WpkVl"},wt=be(94184),_e=be.n(wt),Ve=Object.defineProperty,xt=(Te,ne,te)=>ne in Te?Ve(Te,ne,{enumerable:!0,configurable:!0,writable:!0,value:te}):Te[ne]=te,ut=(Te,ne,te)=>xt(Te,typeof ne!="symbol"?ne+"":ne,te),pt=(Te,ne,te)=>new Promise((ce,se)=>{var ge=Ce=>{try{we(te.next(Ce))}catch(Re){se(Re)}},ye=Ce=>{try{we(te.throw(Ce))}catch(Re){se(Re)}},we=Ce=>Ce.done?ce(Ce.value):Promise.resolve(Ce.value).then(ge,ye);we((te=te.apply(Te,ne)).next())});class Rt extends le.Component{constructor(ne){super(ne),ut(this,"canvas"),ut(this,"randomNum",(te,ce)=>Math.floor(Math.random()*(ce-te)+te)),ut(this,"drawPic",()=>{this.randomCode()}),ut(this,"reloadPic",()=>{this.drawPic()}),ut(this,"changeCode",te=>{console.log(te.target.value,222),this.setState({value:te.target.value,showError:!1})}),ut(this,"onVerify",()=>{let te;return this.state.value.toLowerCase()!==""&&this.state.value.toLowerCase()!==this.state.code.toLowerCase()?(te=!0,Xe.ZP.error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801"),this.reloadPic()):this.state.value.toLowerCase()===""?(te=!0,Xe.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=le.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 ce=this.randomNum(ne,te),se=this.randomNum(ne,te),ge=this.randomNum(ne,te);return`rgb(${ce}, ${se}, ${ge})`}drawText(ne,te,ce){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 ge=10,ye=(this.state.contentWidth-40)/(this.state.code.length-1);let we=ge;ce>0&&(we=ge+ce*ye);let Ce=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);se>40&&(Ce=40);const Re=this.randomNum(-10,10);ne.translate(we,Ce),ne.rotate(Re*Math.PI/180),ne.fillText(te,0,0),ne.rotate(-Re*Math.PI/180),ne.translate(-we,-Ce)}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 ce=0;ce<this.state.codeLength;ce++){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 ge=0;ge<this.state.code.length;ge++)this.drawText(se,this.state.code[ge],ge);this.drawLine(se),this.drawDot(se)})}render(){const{className:ne,width:te=300}=this.props;return le.createElement("div",{className:_e()(At.codeBox,ne),style:{width:te}},le.createElement("aside",null,le.createElement(Lt.default,{value:this.state.value,onChange:this.changeCode,placeholder:"\u8BF7\u8F93\u5165\u56FE\u7247\u4E2D\u7684\u9A8C\u8BC1\u7801"})),le.createElement("div",null,le.createElement("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),le.createElement("div",{className:"current",onClick:this.reloadPic},"\u770B\u4E0D\u6E05\uFF1F\u6362\u4E00\u5F20")))}}const Ot=(Te,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(Rt,{ref:ce=>te=ce})),onOk:()=>pt(void 0,null,function*(){if(te.onVerify())return Promise.reject();Te()})})};var jt=Rt},73646:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return ut}});var le=be(67294),Xe=be(28802),Lt=be(66309),At=be(2453),wt={flex:"flex___eLcnP",flex1:"flex1___yUTT7",color666:"color666___TiUhG",error:"error___gTTtv",deleteIcon:"deleteIcon___mnZW1",addIcon:"addIcon___JC5NS"},_e=be(38308);const{TextArea:Ve}=Xe.default;class xt extends le.Component{constructor(Rt){super(Rt),this.state={inputVisible:!1,EditInputIndex:-1}}render(){let{index:Rt,onAnswerChange:Ot,addChildAnswer:jt,exerciseIsPublish:Te,answers:ne,activeOptionErrorIndex:te,flex:ce="0 0 1000px"}=this.props;console.log("----",ne);let{inputVisible:se,EditInputIndex:ge}=this.state;return le.createElement("div",{className:wt.flex},le.createElement("div",{className:`${wt.color666} mb5 mt6`,style:{flex:"0 0 90px"}},"\u7B54\u6848(\u586B\u7A7A",Rt+1,"):"),le.createElement("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10}},ne==null?void 0:ne.map((ye,we)=>le.createElement(le.Fragment,null,ge!==we?(ye==null?void 0:ye.length)>0?le.createElement(Lt.default,{className:"edit-tag",key:ye,closable:!((ne==null?void 0:ne.length)===1&&we===0),onClose:Ce=>{Ce.preventDefault(),(ne==null?void 0:ne.length)===1&&we===0?this.props.deleteChildAnswermain(Rt,we):this.props.deleteChildAnswer(Rt,we)}},le.createElement("span",{onDoubleClick:Ce=>{this.setState({EditInputIndex:we}),Ce.preventDefault()}},ye)):le.createElement(Xe.default,{defaultValue:ye,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ce=>{if(Ce.target.value.replaceAll(" ","").length<=0){At.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Ot(Rt,we,Ce.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}):le.createElement(Xe.default,{defaultValue:ye,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:Ce=>{if(Ce.target.value.replaceAll(" ","").length<=0){At.ZP.info("\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7EAF\u7A7A\u683C");return}Ot(Rt,we,Ce.target.value),this.setState({EditInputIndex:-1,inputVisible:!1})}}))),!se&&le.createElement(Lt.default,{className:"site-tag-plus",onClick:()=>{jt(Rt),this.setState({inputVisible:!0})}},le.createElement(_e.Z,null)," \u65B0\u589E\u7B54\u6848")))}}var ut=xt},35566:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Te}});var le=be(67294),Xe=be(35567),Lt=Object.defineProperty,At=Object.defineProperties,wt=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,Ve=Object.prototype.hasOwnProperty,xt=Object.prototype.propertyIsEnumerable,ut=(ne,te,ce)=>te in ne?Lt(ne,te,{enumerable:!0,configurable:!0,writable:!0,value:ce}):ne[te]=ce,pt=(ne,te)=>{for(var ce in te||(te={}))Ve.call(te,ce)&&ut(ne,ce,te[ce]);if(_e)for(var ce of _e(te))xt.call(te,ce)&&ut(ne,ce,te[ce]);return ne},Rt=(ne,te)=>At(ne,wt(te)),Ot=(ne,te,ce)=>ut(ne,typeof te!="symbol"?te+"":te,ce);const jt="\u2581";class Te extends le.Component{constructor(){super(...arguments),Ot(this,"getChCountBeforeCursor",(te,ce)=>{const se=ce.line;let ge=0;for(let we=0;we<se;we++)ge+=te.getLine(we).split(jt).length-1;const ye=te.getLine(se).substring(0,ce.ch);return ge+=ye.split(jt).length-1,ge}),Ot(this,"onCMBeforeChange",(te,ce)=>{const se=te.getRange(ce.from,ce.to);let ge=0;if(ce.text.forEach(ye=>{ge+=ye.split(jt).length-1}),se&&se.indexOf(jt)!=-1){const ye=se.split(jt).length-1,we=this.getChCountBeforeCursor(te,ce.from);console.log(`\u5220\u9664${ye}\u4E2A\uFF0C \u4E4B\u524D\u6709${we}\u4E2A\uFF0C\u65B0\u589E${ge}\u4E2A`),this.props.deleteEmptyDisabled?ce.cancel():this.props.onPlaceholderChange&&this.props.onPlaceholderChange(we,ye,ge)}else if(ge){const ye=this.getChCountBeforeCursor(te,ce.from);console.log(`\u65B0\u589E${ge}\u4E2A\uFF0C\u4E4B\u524D\u6709${ye}\u4E2A`),this.props.onPlaceholderChange&&this.props.onPlaceholderChange(ye,0,ge)}})}render(){return le.createElement(Xe.Z,Rt(pt({},this.props),{onCMBeforeChange:this.onCMBeforeChange}))}}},40950:function(Rn,$n,be){"use strict";be.d($n,{d4:function(){return jt},VP:function(){return ut}});var le=be(67294),Xe={digitalLabel:"digitalLabel___hkWuZ",active:"active___jawU1",titleEditor:"titleEditor___wX1lW",title:"title___SuT2h",editIcon:"editIcon___XrTIi",paperTab:"paperTab___GUxeB",tabItem:"tabItem___or0fY",dottedLine:"dottedLine___Ln0Xr"};const Lt=({number:Te,active:ne,className:te})=>le.createElement("div",{className:`${Xe.digitalLabel} ${ne?Xe.active:""} ${te}`},Te);var At=be(83062),wt=be(28802),_e=be(2453),Ve=be(67294),xt=(Te,ne,te)=>new Promise((ce,se)=>{var ge=Ce=>{try{we(te.next(Ce))}catch(Re){se(Re)}},ye=Ce=>{try{we(te.throw(Ce))}catch(Re){se(Re)}},we=Ce=>Ce.done?ce(Ce.value):Promise.resolve(Ce.value).then(ge,ye);we((te=te.apply(Te,ne)).next())});const ut=({defaultValue:Te,onFinish:ne})=>{const[te,ce]=(0,le.useState)(!1),[se,ge]=(0,le.useState)(Te);return(0,le.useEffect)(()=>{ge(Te)},[Te]),Ve.createElement("div",{className:Xe.titleEditor},te?Ve.createElement(wt.default,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:se,onChange:ye=>{ge(ye.target.value)},onBlur:()=>xt(void 0,null,function*(){var ye;if(((ye=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ye.length)<=0){_e.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield ne(se))&&ce(!1)}),onPressEnter:()=>xt(void 0,null,function*(){var ye;if(((ye=se==null?void 0:se.replaceAll(" ",""))==null?void 0:ye.length)<=0){_e.ZP.error("\u8BD5\u5377\u6807\u9898\u4E0D\u80FD\u4E3A\u7A7A");return}(yield ne(se))&&ce(!1)})}):Ve.createElement("div",{className:Xe.title,onDoubleClick:()=>ce(!0)},se,Ve.createElement(At.Z,{title:"\u7F16\u8F91\u8BD5\u5377\u540D\u79F0"},Ve.createElement("i",{className:`${Xe.editIcon} iconfont icon-bianji_Hover`,onClick:()=>ce(!0)}))))};var pt=be(71230),Rt=be(15746),Ot=(Te,ne,te)=>new Promise((ce,se)=>{var ge=Ce=>{try{we(te.next(Ce))}catch(Re){se(Re)}},ye=Ce=>{try{we(te.throw(Ce))}catch(Re){se(Re)}},we=Ce=>Ce.done?ce(Ce.value):Promise.resolve(Ce.value).then(ge,ye);we((te=te.apply(Te,ne)).next())});const jt=({onChange:Te=()=>Ot(void 0,null,function*(){}),tabs:ne,activeKey:te,defaultActiveKey:ce,className:se=""})=>{var ge,ye,we,Ce,Re,We,lt;const[ht,nt]=(0,le.useState)(ce===void 0?(ge=ne[0])==null?void 0:ge.key:ce);return(0,le.useEffect)(()=>{te!==void 0&&nt(te)},[te]),le.createElement(pt.Z,{justify:"center",align:"middle",className:`${Xe.paperTab} ${se}`},le.createElement(Rt.Z,{className:`${Xe.tabItem} ${ht===((ye=ne[0])==null?void 0:ye.key)?Xe.active:""}`,onClick:()=>Ot(void 0,null,function*(){var mt;yield Te(ne[0].key),nt((mt=ne[0])==null?void 0:mt.key)})},le.createElement(Lt,{number:1,active:ht===((we=ne[0])==null?void 0:we.key),className:"mr10"}),le.createElement("span",null,(Ce=ne[0])==null?void 0:Ce.label)),le.createElement(Rt.Z,{flex:"188px",className:`${Xe.dottedLine} ml30 mr30`}),le.createElement(Rt.Z,{className:`${Xe.tabItem} ${ht===((Re=ne[1])==null?void 0:Re.key)?Xe.active:""}`,onClick:()=>Ot(void 0,null,function*(){var mt,at;yield Te((mt=ne[1])==null?void 0:mt.key),nt((at=ne[1])==null?void 0:at.key)})},le.createElement(Lt,{number:2,active:ht===((We=ne[1])==null?void 0:We.key),className:"mr10"}),le.createElement("span",null,(lt=ne[1])==null?void 0:lt.label)))}},20670:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return _e}});var le=be(55241),Xe={text:"text___FxbAX",wrap:"wrap___UlBQ1",contact:"contact____pUDq",img:"img___BapAv"},Lt=be(32637),At=be(67294),_e=({type:Ve,style:xt})=>{const ut=At.createElement("div",{className:Xe.wrap,onClick:pt=>{pt.preventDefault(),pt.stopPropagation()}},At.createElement("p",null,Ve==="shixun"||Ve==="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",At.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002",Ve==="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"),At.createElement("div",{className:Xe.contact},At.createElement("div",{className:Xe.img},At.createElement("img",{src:Lt,width:"124px",height:"124px"})),At.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")));return At.createElement(le.Z,{content:ut},At.createElement("span",{className:Xe.text,style:xt},"\u9AD8\u6D88\u8017"))}},63205:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Rt}});var le=be(67294),Xe={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Lt=be(94184),At=be.n(Lt),wt=be(74330),_e=be(15979),Ve=be(33170),xt=be(28706),ut=(Ot,jt,Te)=>new Promise((ne,te)=>{var ce=ye=>{try{ge(Te.next(ye))}catch(we){te(we)}},se=ye=>{try{ge(Te.throw(ye))}catch(we){te(we)}},ge=ye=>ye.done?ne(ye.value):Promise.resolve(ye.value).then(ce,se);ge((Te=Te.apply(Ot,jt)).next())}),Rt=({data:Ot,className:jt,fullWidth:Te,style:ne={},onClose:te,onOk:ce,showFullTools:se,noAssociationId:ge})=>{const ye=(0,le.useRef)(null),we=(0,le.useRef)(null),Ce=(0,le.useRef)(null),Re=(0,le.useRef)(null),[We,lt]=(0,le.useState)(!1),[ht,nt]=(0,le.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,le.useEffect)(()=>(Ce.current||(Ce.current=document.createElement("style"),document.head.appendChild(Ce.current)),Ot!=null&&Ot.visible?(document.body.setAttribute("data-custom","y-hidden"),Ce.current.innerHTML=" html { overflow-y: hidden; }",Ot!=null&&Ot.src&&mt()):(document.body.removeAttribute("data-custom"),Ce.current&&(document.head.removeChild(Ce.current),Ce.current=null)),()=>{document.body.removeAttribute("data-custom"),Ce.current&&(document.head.removeChild(Ce.current),Ce.current=null)}),[Ot==null?void 0:Ot.visible]);const mt=()=>ut(void 0,null,function*(){lt(!0),nt("\u6B63\u5728\u52A0\u8F7D\u4E2D");const Et=yield(0,xt.ZJ)(Ot==null?void 0:Ot.src);ye.current.src="",ye.current.src=Et,ye.current.onload=function(){Nt()},lt(!1),nt("")}),at=Et=>ut(void 0,null,function*(){lt(!0),nt("\u6B63\u5728\u4FDD\u5B58\u4E2D");const Ln=yield(0,Ve.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Ot.title,file:Et.dataUrl}});Ln!=null&&Ln.id&&!ge?(yield(0,Ve.ZP)(`/api/attachments/${Ot.id}/add_subitem.json`,{method:"post",body:{subitem_id:Ln==null?void 0:Ln.id,settings:JSON.stringify(Et.state)}})).status===0&&ce():Ln!=null&&Ln.id&&ce(Ln),lt(!1),nt("")}),Pt=()=>{const Et=document.querySelector('a[href="https://markerjs.com/"]');Et&&Et.parentNode&&(Et.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(xn=>{const Nn=document.querySelector(xn.name);Nn&&Nn.setAttribute("title",xn.title)})},Nt=()=>{we.current=new _e.hP(ye.current),we.current.targetRoot=Re.current,we.current.addEventListener("render",at),we.current.addEventListener("beforeclose",te),se&&(we.current.availableMarkerTypes=we.current.ALL_MARKER_TYPES,we.current.uiStyleSettings.redoButtonVisible=!0,we.current.uiStyleSettings.notesButtonVisible=!0,we.current.uiStyleSettings.zoomButtonVisible=!0,we.current.uiStyleSettings.zoomOutButtonVisible=!0,we.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=we.current.uiStyleSettings,we.current.show(),Ot!=null&&Ot.snapshotData&&we.current.restoreState(Ot.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Pt()},300)};return le.createElement(le.Fragment,null,(Ot==null?void 0:Ot.visible)&&le.createElement(wt.Z,{spinning:We,tip:ht,style:{position:"absolute",width:"100vw"}},le.createElement("div",{ref:Re,className:At()(Xe.imageDimensions,jt,Te?Xe.fullWidth:""),style:ne},le.createElement("img",{className:Xe.img,ref:ye}))))}},35713:function(Rn,$n,be){"use strict";var le=be(67294),Xe=be(71736),Lt=be(84279),At=be(36527),wt=be(62844),_e=be(67294);const Ve=(0,le.forwardRef)(({callback:xt,width:ut,onChange:pt,disabled:Rt,readOnly:Ot,type:jt="",value:Te="",style:ne={}},te)=>{const ce=(0,le.useRef)(),se=(0,le.useRef)(),[ge,ye]=(0,le.useState)(0),[we,Ce]=(0,le.useState)(0),[Re,We]=(0,le.useState)(!1),lt=()=>{var at=document.createElement("div");at.innerHTML=ce.current.getValue();var Pt=at.innerText;return xt&&xt(Pt),Pt};(0,le.useImperativeHandle)(te,()=>({getData:lt}));const ht=at=>{at.preventDefault();const Pt=at.clientX-ge,Nt=at.clientY-we;document.body.onmousemove=Et=>{let Ln=Et.clientX-Pt,xn=Et.clientY-Nt;const Nn=document.getElementsByClassName("markdown-popup-form")[0],fn=window.innerWidth-Nn.offsetWidth,Qe=window.innerHeight-Nn.offsetHeight;Ln=Math.max(0,Math.min(Ln,fn)),xn=Math.max(0,Math.min(xn,Qe)),nt(Et.clientX,Et.clientY,Pt,Nt)&&(ye(Ln),Ce(xn))},document.body.onmouseup=function(){document.body.onmousemove=null}},nt=(at,Pt,Nt,Et)=>{const Ln=document.body.clientHeight,xn=document.body.clientWidth;return at<20&&Nt>at||at>xn-20&&Nt<at||Pt<20&&Et>Pt||Pt>Ln-20&&Et<Pt?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};(0,le.useEffect)(()=>{Re&&setTimeout(()=>{const at=document.getElementsByClassName("markdown-popup-form")[0],Pt=window.innerWidth/2-at.offsetWidth/2,Nt=window.innerHeight/2-at.offsetHeight/2;ye(Pt),Ce(Nt)},0)},[Re]);const mt=()=>{Rt||Ot||We(!0)};return _e.createElement("div",{style:ne},_e.createElement("div",{style:{width:ut||"100%",position:"relative"},className:`${Xe.Z.mathFillWrap} ${Rt||Ot?"cursorDefault":""}`,onClick:()=>mt()},_e.createElement("math-field",{disabled:Rt,locale:"zh_cn",class:`${Xe.Z.mathField} ${jt}`,readOnly:Ot,placeholder:"\u8BF7\u8F93\u5165\u516C\u5F0F",ref:ce,style:{width:"100%",fontSize:Te?18:14},value:Te||""})),_e.createElement(wt.default,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:ge,top:we},title:_e.createElement("div",{style:{cursor:"move"},onMouseDown:ht},"\u8F93\u5165\u516C\u5F0F"),open:Re,onOk:()=>{const at=se.current.getData();ce.current.setValue(at),pt(at),We(!1)},onCancel:()=>{We(!1)},destroyOnClose:!0,className:"markdown-popup-form"},_e.createElement(At.Z,{value:Te,ref:se,onChange:pt,showSaveButton:!1})))});$n.Z=Ve},36527:function(Rn,$n,be){"use strict";var le=be(67294),Xe=be(71230),Lt=be(15746),At=be(55238),wt=be(85804),_e=be(65226),Ve=be(71736),xt=be(84279),ut=be(67294);const pt=(0,le.forwardRef)(({callback:Rt,showSaveButton:Ot,value:jt=""},Te)=>{const ne=(0,le.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 "}]}]}],ce=[{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=we=>{ne.current.setValue(ne.current.getValue()+" "+we.value+" ")},ge=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ut.createElement(Xe.Z,{className:Ve.Z.lists,gutter:[10,10]},te.map((we,Ce)=>ut.createElement(Lt.Z,{flex:"110px",className:Ve.Z.item},ut.createElement("div",null,ut.createElement(_e.Z,{value:`$$${we.value}$$`}),we.name),ut.createElement("div",{className:Ve.Z.children},we.children.map((Re,We)=>ut.createElement("div",{key:We},ut.createElement("h1",null,Re.name),ut.createElement(Xe.Z,{gutter:[10,10]},Re.data.map((lt,ht)=>ut.createElement(Lt.Z,{key:ht,onClick:()=>se(lt),className:Ve.Z.diamond},ut.createElement(_e.Z,{value:"`$$"+lt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ut.createElement(Xe.Z,{className:Ve.Z.lists,gutter:[10,10]},ce.map((we,Ce)=>ut.createElement(Lt.Z,{flex:"110px",className:Ve.Z.item},ut.createElement("div",null,ut.createElement(_e.Z,{value:"`$$"+we.value+"$$`"}),we.name),ut.createElement("div",{className:Ve.Z.children},we.children.map((Re,We)=>ut.createElement("div",{key:We},Re.name&&ut.createElement("h1",null,Re.name),ut.createElement(Xe.Z,{gutter:[10,10]},Re.data.map((lt,ht)=>ut.createElement(Lt.Z,{key:ht,onClick:()=>se(lt),className:Ve.Z.diamond},ut.createElement(_e.Z,{value:"`$$"+lt.value+"$$`"}))))))))))}],ye=()=>{var we=document.createElement("div");we.innerHTML=ne.current.getValue();var Ce=we.innerText;return Rt&&Rt(Ce),Ce};return(0,le.useImperativeHandle)(Te,()=>({getData:ye})),ut.createElement("div",{className:Ve.Z.mathWrap},ut.createElement(At.default,{defaultActiveKey:"1",items:ge}),ut.createElement("math-field",{locale:"zh_cn",className:Ve.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ne,style:{width:800,marginTop:30,fontSize:18}},jt||""),Ot&&ut.createElement("div",{className:Ve.Z.button},ut.createElement(wt.ZP,{size:"large",onClick:ye,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});$n.Z=pt},26194:function(Rn,$n,be){"use strict";var le=be(67294),Xe=be(4977),Lt=be(85804),At=Object.defineProperty,wt=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,Ve=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,pt=(Te,ne,te)=>ne in Te?At(Te,ne,{enumerable:!0,configurable:!0,writable:!0,value:te}):Te[ne]=te,Rt=(Te,ne)=>{for(var te in ne||(ne={}))xt.call(ne,te)&&pt(Te,te,ne[te]);if(Ve)for(var te of Ve(ne))ut.call(ne,te)&&pt(Te,te,ne[te]);return Te},Ot=(Te,ne)=>wt(Te,_e(ne));const jt=({img:Te,buttonProps:ne={},styles:te={},customText:ce,ButtonText:se,ButtonClick:ge,Buttonclass:ye,ButtonTwo:we,imgStyles:Ce,loading:Re=!1,className:We=""})=>le.createElement("section",{className:`tc animated fadeIn ${We}`,style:Rt({color:"#999",margin:"100px auto",visibility:Re?"hidden":"visible"},te)},le.createElement("img",{src:Te||Xe,style:Ot(Rt({},Ce),{pointerEvents:"none",userSelect:"none"})}),le.createElement("p",{className:"mt20 font14"},ce||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),se&&le.createElement(Lt.ZP,Rt({className:ye,onClick:ge},ne),se),we&&we);$n.Z=jt},20819:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return ye}});var le=be(67294),Xe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Lt=be(85804),At=be(30153),wt=be(36295),_e=be(83062),Ve=be(28706),xt=be(15835),ut=be(26194),pt=be(11320),Rt=be(66540),Ot=be(67294),jt=Object.defineProperty,Te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ce=(we,Ce,Re)=>Ce in we?jt(we,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Re}):we[Ce]=Re,se=(we,Ce)=>{for(var Re in Ce||(Ce={}))ne.call(Ce,Re)&&ce(we,Re,Ce[Re]);if(Te)for(var Re of Te(Ce))te.call(Ce,Re)&&ce(we,Re,Ce[Re]);return we},ge=(we,Ce,Re)=>new Promise((We,lt)=>{var ht=at=>{try{mt(Re.next(at))}catch(Pt){lt(Pt)}},nt=at=>{try{mt(Re.throw(at))}catch(Pt){lt(Pt)}},mt=at=>at.done?We(at.value):Promise.resolve(at.value).then(ht,nt);mt((Re=Re.apply(we,Ce)).next())}),ye=({editOffice:we="view",data:Ce,issaver:Re,onSaver:We,theme:lt,type:ht,filename:nt,monacoEditor:mt,className:at,style:Pt,close:Nt,onClose:Et,hasMask:Ln,disabledDownload:xn,onImgDimensions:Nn,showNodata:fn,recordInfo:Qe})=>{const[Ke,Je]=(0,le.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[_n,Xn]=(0,le.useState)(""),[zt,kn]=(0,le.useState)(),bn=window.ENV==="build"?"/react/build":"",oi=location.host.startsWith("localhost")?pt.Z.PROXY_SERVER:pt.Z.API_SERVER,Mt=10*(1024*1024),_t=(0,le.useRef)();Ce!=null&&Ce.startsWith("/api")&&ht!=="txt"&&(Ce=pt.Z.API_SERVER+Ce);const mn=Oe=>Oe.substring(Oe.lastIndexOf("/")+1).split(".").pop();nt&&mt&&(mt.filename=nt),(0,le.useEffect)(()=>{var Oe,Ue;const Be=(Ue=(Oe=document.cookie)==null?void 0:Oe.replace(/\s/g,""))==null?void 0:Ue.split(";");Be==null||Be.map(ot=>{let Cn=ot.split("=");Cn[0]==="_educoder_session"&&Xn(Cn[1])})},[]),(0,le.useEffect)(()=>{ht==="office"&&(Ce.indexOf("bigfilescdn.")>-1||Ce.indexOf("bigfiles1")>-1?kn({url:Ce,fileType:mn(Ce),model:Ce.indexOf("model=edit")?"edit":"view"}):He())},[ht,Ce]);function rn(Oe){return ge(this,null,function*(){Oe.data.type==="pdfdata"&&(We(Oe.data.data),window.removeEventListener("message",rn,!1)),console.log("mess---:",Oe.data)})}const He=()=>ge(void 0,null,function*(){console.log("data:",Ce);let Oe=Ce;Ce.startsWith("http")||(Oe=location.origin+Oe);let Ue=new URL(Oe).pathname.split("/").pop();const Be=yield(0,xt.gJ)({attachment_id:Ue});Be.url=oi+Be.url,kn(Be)}),Me=()=>{if(Ce.startsWith("http")||Ce.startsWith("blob:")){Fe();return}(0,Ve.Sv)(nt||"educoder",Ce,nt)},Fe=()=>{Qe&&(0,Rt.fc)({id:Qe==null?void 0:Qe.id,watch_type:1,course_id:Qe==null?void 0:Qe.course_id}),(0,Ve.Nd)(nt||"educoder",decodeURIComponent(Ce))};return Ot.createElement("div",{style:se({},Pt||{}),className:`${Ln&&Xe.bgBlack} ${ht?Xe.wrp:"hide"}`},Nt&&Ot.createElement("div",{className:Xe.close,ref:_t},!!Nn&&Ot.createElement(_e.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>_t.current},Ot.createElement("span",{onClick:()=>{Et(),Nn()}},Ot.createElement("i",{className:"icon-yulanpizhu"}))),!xn&&Ot.createElement(_e.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>_t.current},Ot.createElement("span",{onClick:Fe},Ot.createElement("i",{className:"icon-quxiaozhiding"}))),Re&&Ot.createElement(_e.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>_t.current},Ot.createElement("span",{className:"",onClick:()=>{const Oe=document.getElementById("pdfiframe");window.addEventListener("message",rn,!1),setTimeout(()=>{Oe.contentWindow.postMessage("getData","*")},300)}},Ot.createElement("i",{className:"icon-baocun"}))),Ot.createElement(_e.Z,{title:"\u5173\u95ED",getPopupContainer:()=>_t.current},Ot.createElement("span",{className:"",onClick:()=>{Et()}},Ot.createElement("i",{className:"icon-guanbi1"})))),Ot.createElement("div",{className:`${Xe[at]} ${at} ${Xe.monaco} ${ht==="txt"?"show":"hide"}`},ht==="txt"&&Ot.createElement(Ot.Fragment,null,Ot.createElement(wt.ZP,se({},mt)))),ht==="audio"&&Ot.createElement("audio",{src:`${(Ce==null?void 0:Ce.indexOf("http://"))>-1||(Ce==null?void 0:Ce.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${Ce}`,autoPlay:!0}),ht==="video"&&Ot.createElement(Ot.Fragment,null,(Ce==null?void 0:Ce.indexOf("http"))>-1?Ot.createElement("video",{controls:!0,src:`${Ce}`,autoPlay:!0}):Ot.createElement("video",{controls:!0,src:`data:video/mp4;base64,${Ce}`,autoPlay:!0})),ht==="office"&&zt&&Ot.createElement("iframe",{src:`${bn}/office.html?key=${zt.key}&url=${btoa(zt.url)}&callbackUrl=${oi+(zt.callbackUrl||"")}&fileType=${zt.fileType}&title=${zt.title||""}&model=${we}&officeServer=${pt.Z.ONLYOFFICE}&disabledDownload=${!!xn}`}),ht==="html"&&Ot.createElement("iframe",{src:Ce+"&disposition=inline"}),ht==="pdf"&&Ot.createElement("iframe",{id:"pdfiframe",src:`${bn}/js/pdfview/index.html?filename=${nt||"educoder.pdf"}&url=${encodeURIComponent(Ce)}&disabledDownload=${!!xn}&model=${we}`}),ht==="image"&&Ot.createElement("img",{src:`${(Ce==null?void 0:Ce.indexOf("http://"))>-1||(Ce==null?void 0:Ce.indexOf("https://"))>-1?"":"data:image/png;base64,"}${Ce}`}),(ht==="other"||ht==="download")&&Ot.createElement(Ot.Fragment,null,fn?Ot.createElement(ut.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Ot.createElement(Lt.ZP,{icon:Ot.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Me,disabled:xn},"\u4E0B\u8F7D")}):Ot.createElement(Lt.ZP,{type:"primary",size:"middle",onClick:Me,disabled:xn},Ot.createElement(At.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},15312:function(Rn,$n,be){"use strict";be.d($n,{t:function(){return Fe}});var le=be(67294),Xe=be(28802),Lt=be(91773),At=be(62844),wt=be(71230),_e=be(15746),Ve=be(37720),xt=be(88044),ut=be(98813),pt=be(41307),Rt=be(35973),Ot=be(52654),jt=be(2453),Te=be(85804),ne=be(74330),te=be(19575),ce={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=be(33170),ge=be(88742),ye=be(35567),we=be(74855),Ce=be(96707),Re=be(67294),We=Object.defineProperty,lt=Object.defineProperties,ht=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,mt=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,Pt=(Oe,Ue,Be)=>Ue in Oe?We(Oe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Oe[Ue]=Be,Nt=(Oe,Ue)=>{for(var Be in Ue||(Ue={}))mt.call(Ue,Be)&&Pt(Oe,Be,Ue[Be]);if(nt)for(var Be of nt(Ue))at.call(Ue,Be)&&Pt(Oe,Be,Ue[Be]);return Oe},Et=(Oe,Ue)=>lt(Oe,ht(Ue)),Ln=(Oe,Ue,Be)=>new Promise((ot,Cn)=>{var ci=qn=>{try{pn(Be.next(qn))}catch(en){Cn(en)}},si=qn=>{try{pn(Be.throw(qn))}catch(en){Cn(en)}},pn=qn=>qn.done?ot(qn.value):Promise.resolve(qn.value).then(ci,si);pn((Be=Be.apply(Oe,Ue)).next())}),Nn=({buttonProps:Oe,buttonText:Ue,form:Be,hackIdentifier:ot="",answerKey:Cn,data:ci})=>{const[si,pn]=(0,le.useState)(!1),[qn,en]=(0,le.useState)(!1),[wi,Si]=(0,le.useState)(!1),[Di,Ti]=(0,le.useState)({}),[ro,Zr]=(0,le.useState)(""),[Fi,mi]=(0,le.useState)(""),Co=(0,le.useRef)(ot),jn=(0,le.useRef)(""),yn=(0,le.useRef)(!1);(0,le.useEffect)(()=>{wi&&Nr()},[wi]),(0,le.useEffect)(()=>()=>{sessionStorage.removeItem("projectFill")},[]);const Jr=()=>new Date().getTime(),lo=ci==null?void 0:ci.code,hr=()=>{var Mi,Oi;let vr=lo?ci==null?void 0:ci.code:(Mi=Be.getFieldValue("hack_codes"))==null?void 0:Mi.code,Dr=lo?ci==null?void 0:ci.answer_content:Be.getFieldValue(Cn),Cr=lo?ci==null?void 0:ci.input:(Oi=Be.getFieldValue("hack_sets"))==null?void 0:Oi.input;Dr==null||Dr.forEach(En=>{const Ee=En.value||En.answer_text||"";vr=vr.replace(/(@▁@|@▁▁@)/,Ee)}),mi(Cr),Zr(vr),Ti({}),Si(!0)},Nr=()=>Ln(void 0,null,function*(){var Mi,Oi,vr,Dr;const Cr=Jr(),En=lo?ci==null?void 0:ci.time_limit:(Mi=Be.getFieldsValue())==null?void 0:Mi.hack.time_limit,Ee=lo?(Oi=ci==null?void 0:ci.answer_content)==null?void 0:Oi.length:(Dr=(vr=Be.getFieldsValue())==null?void 0:vr.standard_answers)==null?void 0:Dr.length;pn(!0),yield(0,ge.bM)(jn.current,{test_hack_code:ro,test_input:Fi});function on(){return Ln(this,null,function*(){const{status:gn,data:Mn}=yield(0,ge.rX)(jn.current,"submit"),ii=Jr()-Cr>(En+3)*1e3*Ee;if(yn.current){if(ii){jt.ZP.error("\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"),pn(!1);return}if(gn===0){pn(!1),Ti(Et(Nt({},Mn),{showText:!0}));return}setTimeout(on,1e3)}})}on()}),Xo=()=>Ln(void 0,null,function*(){var Mi,Oi,vr,Dr,Cr,En,Ee;if(!ci){try{yield Be.validateFields()}catch(In){(vr=(Oi=(Mi=In==null?void 0:In.errorFields)==null?void 0:Mi[0])==null?void 0:Oi.name)!=null&&vr.includes("standard_answers")?jt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):jt.ZP.error(In.errorFields[0].errors[0]),Be.scrollToField(In.errorFields[0].name,{behavior:"smooth",block:"center"});return}en(!0);let gn="";const Mn=Be.getFieldsValue();Co.current?gn=yield(0,se.ZP)(`/api/problems/${Co.current}.json`,{method:"put",body:Et(Nt({},Mn),{hack:Et(Nt({},Mn==null?void 0:Mn.hack),{sub_discipline_id:(Ee=(En=Mn==null?void 0:Mn.hack)==null?void 0:En.sub_discipline_id)==null?void 0:Ee[1],difficult:Mn.difficulty,item_banks_group_id:Mn.item_banks_group_id}),hack_codes:Et(Nt({},Mn.hack_codes),{code:te.Base64.encode(Mn.hack_codes.code)}),update_hack_sets:[Nt({},Mn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}):(gn=yield(0,se.ZP)("/api/problems.json",{method:"post",body:Et(Nt({},Mn),{hack:Et(Nt({},Mn==null?void 0:Mn.hack),{sub_discipline_id:(Cr=(Dr=Mn==null?void 0:Mn.hack)==null?void 0:Dr.sub_discipline_id)==null?void 0:Cr[1],difficult:Mn.difficulty,item_banks_group_id:Mn.item_banks_group_id}),hack_codes:Et(Nt({},Mn.hack_codes),{code:te.Base64.encode(Mn.hack_codes.code)}),hack_sets:[Nt({},Mn.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})}),Co.current=gn==null?void 0:gn.identifier,sessionStorage.projectFill=gn==null?void 0:gn.identifier)}const on=yield(0,se.ZP)(`/api/problems/${Co.current}/start.json`,{method:"get"});if((on==null?void 0:on.status)===0){jn.current=on==null?void 0:on.identifier,yn.current=!0,en(!1),hr();return}en(!1)}),ji=Mi=>{const{status:Oi,error_msg:vr,execute_time:Dr,output:Cr,input:En,expected_output:Ee}=Mi;let on=null;switch(Oi){case Ce.h.OK:on=Re.createElement(Re.Fragment,null,Re.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Dr/1e3,"\u79D2"),Re.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A\u8C03\u8BD5\u901A\u8FC7"));break;case Ce.h.NOMATCH:on=Re.createElement(Re.Fragment,null,Re.createElement("div",null,"\u8F93\u5165\uFF1A"),Re.createElement("pre",{style:{fontFamily:"initial"}},En),Re.createElement("div",null,"\u8F93\u51FA\uFF1A"),Re.createElement("pre",{style:{fontFamily:"initial"}},Cr&&te.Base64.decode(Cr)),Re.createElement("div",null,"\u9884\u671F\u8F93\u51FA\uFF1A"),Re.createElement("pre",{style:{fontFamily:"initial"}},Ee&&te.Base64.decode(Ee)));break;case Ce.h.EXECUTEFAILURE:on=Re.createElement(Re.Fragment,null,Re.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Re.createElement("pre",null,En)),Re.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Re.createElement("pre",{className:"error"},te.Base64.decode(vr)));break;case Ce.h.COMPILEFAILURE:on=Re.createElement(Re.Fragment,null,Re.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",Re.createElement("pre",null,En)),Re.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),Re.createElement("pre",{className:"error"},te.Base64.decode(vr)));break;case Ce.h.PODFAILURE:on=Re.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case Ce.h.TIMEOUT:on=Re.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return Re.createElement(Re.Fragment,null," ",on," ")};return Re.createElement("div",null,Re.createElement(Te.ZP,Et(Nt({loading:qn},Oe),{onClick:Xo}),Ue),Re.createElement(At.default,{open:wi,title:"\u8C03\u8BD5\u4EE3\u7801",destroyOnClose:!0,width:1200,okText:"\u8FD0\u884C\u6D4B\u8BD5",confirmLoading:si,cancelButtonProps:{style:{display:"none"}},onOk:()=>Nr(),onCancel:()=>{yn.current=!1,Si(!1)}},Re.createElement("div",{className:ce.result},Re.createElement("div",{className:ce.left},Re.createElement("div",{className:"mb20"},Re.createElement("span",{className:"c-black"},"\u6267\u884C\u4EE3\u7801"),!ci&&Re.createElement(we.CopyToClipboard,{text:ro,onCopy:()=>jt.ZP.success("\u590D\u5236\u6210\u529F")},Re.createElement("span",{style:{float:"right"},className:"current c-light-primary"},Re.createElement("i",{className:"iconfont icon-fuzhi8 mr5"}),"\u590D\u5236"))),Re.createElement(ye.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:ro,onChange:Mi=>Zr(Mi)})),Re.createElement("div",{className:ce.right},Re.createElement("div",{className:"c-black mb20"},"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B"),Re.createElement("div",{className:ce.box},Re.createElement("div",{className:ce.li},Re.createElement(Xe.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165",value:Fi,onChange:Mi=>mi(Mi.target.value),bordered:!1,style:{height:180}}))),Re.createElement("div",{className:"c-black mb20 mt30"},"\u4EE3\u7801\u6267\u884C\u7ED3\u679C"),Re.createElement("div",{className:ce.box},Re.createElement(ne.Z,{spinning:si,tip:"\u4EE3\u7801\u6267\u884C\u4E2D"},Re.createElement("div",{className:ce.li,style:{height:196,overflow:"auto",padding:10}},ji(Di))))))))},fn=be(55304),Qe=be(67294),Ke=Object.defineProperty,Je=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,Xn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable,bn=(Oe,Ue,Be)=>Ue in Oe?Ke(Oe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Be}):Oe[Ue]=Be,oi=(Oe,Ue)=>{for(var Be in Ue||(Ue={}))zt.call(Ue,Be)&&bn(Oe,Be,Ue[Be]);if(Xn)for(var Be of Xn(Ue))kn.call(Ue,Be)&&bn(Oe,Be,Ue[Be]);return Oe},Yt=(Oe,Ue)=>Je(Oe,_n(Ue)),Mt=(Oe,Ue)=>{var Be={};for(var ot in Oe)zt.call(Oe,ot)&&Ue.indexOf(ot)<0&&(Be[ot]=Oe[ot]);if(Oe!=null&&Xn)for(var ot of Xn(Oe))Ue.indexOf(ot)<0&&kn.call(Oe,ot)&&(Be[ot]=Oe[ot]);return Be};const{TextArea:_t}=Xe.default,mn=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],rn=({value:Oe,onChange:Ue})=>Qe.createElement(Switch,{checked:Oe,onChange:Be=>{Ue(Be)}}),He="@\u2581@",Me="@\u2581\u2581@",Fe=({questionTitlePlaceholder:Oe,form:Ue,scoreByBlank:Be=!1,hackidentifier:ot,answerKey:Cn})=>{const[ci,si]=(0,le.useState)(!1),[pn,qn]=(0,le.useState)(!1),wi=(0,Rt.useParams)().type==="edit",Si=(jn,yn)=>{const Jr=yn.line;let lo=0;for(let Nr=0;Nr<Jr;Nr++)lo+=jn.getLine(Nr).split(He).length-1;for(let Nr=0;Nr<Jr;Nr++)lo+=jn.getLine(Nr).split(Me).length-1;const hr=jn.getLine(Jr).substring(0,yn.ch);return lo+=hr.split(He).length-1,lo+=hr.split(Me).length-1,lo},Di=(jn,yn,Jr,lo)=>{const hr=jn.getRange(yn.from,yn.to);let Nr=0;if(yn.text.forEach(Xo=>{Nr+=Xo.split(He).length-1}),yn.text.forEach(Xo=>{Nr+=Xo.split(Me).length-1}),yn.origin!=="setValue"){if(hr&&(hr.indexOf(He)!==-1||hr.indexOf(Me)!==-1)){const Xo=hr.split(He).length-1+hr.split(Me).length-1,ji=Si(jn,yn.from);if(console.log(`\u5220\u9664${Xo}\u4E2A\uFF0C \u524D\u9762\u6709${ji}\u4E2A\uFF0C\u65B0\u589E${Nr}\u4E2A`),Xo>1){const Mi=Array.from({length:Xo},(Oi,vr)=>ji+vr);lo(Mi)}else lo(ji)}else if(Nr>0){const Xo=Si(jn,yn.from);console.log(`\u65B0\u589E${Nr}\u4E2A\uFF0C\u4E4B\u524D\u6709${Xo}\u4E2A`),Jr(Nr,Xo)}}},Ti=()=>{const jn=Ue.getFieldValue(Cn);Ue.setFieldsValue({[Cn]:jn==null?void 0:jn.map((yn,Jr)=>Yt(oi({},yn),{position:Jr+1}))})},ro=(0,le.useRef)(),Zr=(jn,yn)=>{for(let Jr=0;Jr<jn;Jr++)ro.current({position:null,answer_text:""},yn+Jr);Ti()},Fi=(0,le.useRef)(),mi=jn=>{Fi.current(jn),Ti()},Co=Lt.default.useWatch(Cn,Ue);return Qe.createElement("div",{className:Ot.Z.wrap},Qe.createElement(Lt.default.Item,{label:"\u8BD5\u9898\u63CF\u8FF0",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}]},Qe.createElement(pt.h,{scrollId:"name",watch:!0,height:140})),Qe.createElement("div",{className:Ot.Z.questionTitleEditorWrap},Qe.createElement(Lt.default.Item,{label:"\u7A0B\u5E8F\u4EE3\u7801",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}]},Qe.createElement(pt.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:(jn,yn)=>{const Jr=Ue.getFieldValue(Cn);console.log("--preAnswerData",Jr,yn),Ue.setFieldsValue({[Cn]:Jr==null?void 0:Jr.map((lo,hr)=>{var Nr;return Yt(oi({},lo),{position:hr+1,multi_line:(Nr=yn==null?void 0:yn[hr])==null?void 0:Nr.multiLine})})})},placeholder:Oe,onCMBeforeChange:(jn,yn)=>{Di(jn,yn,Zr,mi)}}))),Qe.createElement(Lt.default.List,{name:Cn,rules:[{validator(jn,yn){if(!(yn!=null&&yn.length))return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const Jr of yn){const{answer_text:lo}=Jr||{};if((lo==null?void 0:lo.length)===0)return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(jn,{add:yn,remove:Jr},{errors:lo})=>(ro.current=yn,Fi.current=Jr,Qe.createElement(Qe.Fragment,null,Qe.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Qe.createElement(Lt.default.Item,{label:"\u586B\u7A7A\u9879\u7B54\u6848",required:!0,labelCol:{span:24}}),Qe.createElement("div",{onClick:()=>{At.default.warning({title:"\u7ED9\u5206\u8BF4\u660E",icon:null,width:700,centered:!0,content:Qe.createElement("div",null,Qe.createElement("div",null,"1.\u5B66\u751F\u586B\u5199\u7B54\u6848\u4E4B\u540E\uFF0C\u5FC5\u987B\u63D0\u4EA4\u4EE3\u7801",Qe.createElement("span",{style:{color:"#e30000"}},"\u8FDB\u884C\u8BC4\u6D4B"),"\u624D\u80FD\u5F97\u5206\u3002"),Qe.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"}},Qe.createElement(fn.Z,{style:{marginRight:3,color:"#3061D0"}}),Qe.createElement("span",null," \u7ED9\u5206\u8BF4\u660E"))),jn.map((hr,Nr)=>{var Xo=hr,{key:ji,name:Mi}=Xo,Oi=Mt(Xo,["key","name"]),vr,Dr;return Qe.createElement(wt.Z,{className:"mb20",key:ji,align:"middle",wrap:!1},Qe.createElement(_e.Z,{flex:"0 0 auto",className:`${Ot.Z.blankIndex}`},"\u586B\u7A7A\u9879",Nr+1),Qe.createElement(_e.Z,{flex:1},Qe.createElement(wt.Z,{align:"top",justify:"space-between",wrap:!1},Qe.createElement(_e.Z,null,Qe.createElement(Lt.default.Item,Yt(oi({},Oi),{name:[Mi,"answer_text"],noStyle:!0}),(vr=Co==null?void 0:Co[Mi])!=null&&vr.multi_line||(Dr=Co==null?void 0:Co[Mi])!=null&&Dr.multiLine?Qe.createElement(_t,{spellCheck:!1,style:{marginLeft:10,width:550}}):Qe.createElement(Xe.default,{style:{marginLeft:10,width:550},className:Ot.Z.blankInput,size:"large",maxLength:1e3,onBlur:Cr=>{}}))),Be&&Qe.createElement(_e.Z,{flex:"224px"},Qe.createElement(Lt.default.Item,Yt(oi({},Oi),{name:[Mi,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Qe.createElement(Ve.Z,{size:"large",className:Ot.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"}))))))})))),Qe.createElement("div",{onClick:()=>si(!0)},Qe.createElement(Lt.default.Item,{name:["hack","analysis"],label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Qe.createElement(pt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:ci}))),Qe.createElement(Lt.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"}]},Qe.createElement(xt.default,{size:"large"},mn.map(jn=>Qe.createElement(xt.default.Option,{key:jn.title,value:jn.key}," ",jn.title)))),Qe.createElement(Lt.default.Item,{label:"\u6700\u5927\u8BC4\u6D4B\u65F6\u957F\uFF08\u79D2\uFF09",style:{marginTop:30},labelCol:{span:24},required:!0},Qe.createElement(Lt.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},Qe.createElement(Ve.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})),Qe.createElement("span",{className:"ml10 font14"},"\u79D2")),Qe.createElement(Lt.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"}]},Qe.createElement(ut.ZP.Group,{style:{marginTop:-10}},Qe.createElement(ut.ZP,{value:0},"\u4E0D\u5FFD\u7565\u7A7A\u683C"),Qe.createElement(ut.ZP,{value:1},"\u5FFD\u7565\u9996\u5C3E\u7A7A\u683C"),Qe.createElement(ut.ZP,{value:2},"\u5FFD\u7565\u6240\u6709\u7A7A\u683C"))),Qe.createElement(Lt.default.Item,{label:"\u6D4B\u8BD5\u7528\u4F8B",required:!0,style:{marginTop:30}}),Qe.createElement("div",{style:{background:"#F6F7F9",padding:15}},Qe.createElement(Lt.default.Item,{label:"\u8F93\u5165",labelCol:{span:24},name:["hack_sets","input"]},Qe.createElement(_t,{rows:4})),Qe.createElement(Lt.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u8F93\u51FA\u5185\u5BB9"}]},Qe.createElement(_t,{rows:4}))),Qe.createElement(Nn,{form:Ue,answerKey:Cn,hackIdentifier:ot,buttonText:"\u8FD0\u884C\u8C03\u8BD5",buttonProps:{ghost:!0,icon:Qe.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(Rn,$n,be){"use strict";be.d($n,{u:function(){return Re}});var le=be(67294),Xe=be(71230),Lt=be(15746),At=be(83062),wt=be(91773),_e=be(52654),Ve=be(40043),xt=be(24018),ut=be(41307),pt=be(67294),Rt=Object.defineProperty,Ot=Object.defineProperties,jt=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ce=(We,lt,ht)=>lt in We?Rt(We,lt,{enumerable:!0,configurable:!0,writable:!0,value:ht}):We[lt]=ht,se=(We,lt)=>{for(var ht in lt||(lt={}))ne.call(lt,ht)&&ce(We,ht,lt[ht]);if(Te)for(var ht of Te(lt))te.call(lt,ht)&&ce(We,ht,lt[ht]);return We},ge=(We,lt)=>Ot(We,jt(lt)),ye=(We,lt)=>{var ht={};for(var nt in We)ne.call(We,nt)&&lt.indexOf(nt)<0&&(ht[nt]=We[nt]);if(We!=null&&Te)for(var nt of Te(We))lt.indexOf(nt)<0&&te.call(We,nt)&&(ht[nt]=We[nt]);return ht};const we=["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"],Ce=({value:We,onChange:lt,choiceTextKey:ht,answerKey:nt,index:mt,isEdit:at,setInputActive:Pt,form:Nt,choiceOptionsPath:Et,allowChangeMode:Ln,showAddIcon:xn,addItem:Nn,deleteItem:fn})=>{console.log(We,"value");const Qe=(We==null?void 0:We[nt])===1,Ke=()=>{const _n=Nt.getFieldValue(Et);Nt.setFieldValue(Et,_n.map(Xn=>ge(se({},Xn),{[nt]:0})))},Je=()=>{Qe?lt(ge(se({},We),{[nt]:0})):(Ln||Ke(),lt(ge(se({},We),{[nt]:1})))};return pt.createElement(Xe.Z,{className:_e.Z.choiceWrap,align:"middle",wrap:!1},pt.createElement(Lt.Z,{onClick:Je,className:`${_e.Z.choiceIndex} ${Qe?_e.Z.activeAnswer:""}`},we[mt]),pt.createElement(Lt.Z,{flex:1,className:`${_e.Z.editorWrap} ml15`,onClick:Pt},pt.createElement(ut.x,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:at,value:We==null?void 0:We[ht],onChange:_n=>{lt(ge(se({},We),{[ht]:_n}))}})),pt.createElement(Lt.Z,{flex:"0 0 auto",className:"ml15"},pt.createElement("div",{onClick:Je,className:`${_e.Z.setAnswerBtn} ${Qe?_e.Z.activeAnswer:""}`},Qe?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),pt.createElement(Lt.Z,{className:_e.Z.actionWrapper},pt.createElement(At.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},pt.createElement(Ve.Z,{className:_e.Z.addIcon,onClick:Nn,style:{visibility:xn?"visible":"hidden"}})),pt.createElement(At.Z,{title:"\u5220\u9664"},pt.createElement(xt.Z,{className:_e.Z.deleteIcon,onClick:fn,style:{visibility:mt>1?"visible":"hidden"}}))))},Re=({questionTitlePlaceholder:We,titleKey:lt,choiceKey:ht,analysisKey:nt,choiceTextKey:mt,answerKey:at,choiceOptionsPath:Pt,allowChangeMode:Nt=!0,form:Et,showAnalysis:Ln=!0})=>{const[xn,Nn]=(0,le.useState)(),[fn,Qe]=(0,le.useState)(!1);return pt.createElement("div",{className:_e.Z.wrap},pt.createElement("div",{className:_e.Z.questionTitleEditorWrap},pt.createElement(wt.default.Item,{label:"\u9898\u5E72",name:lt,labelCol:{span:24},rules:[{required:!0}]},pt.createElement(ut.h,{scrollId:Array.isArray(lt)?lt.join("_"):`${lt}`,watch:!0,height:140,placeholder:We}))),pt.createElement(wt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),pt.createElement(wt.default.List,{name:ht,rules:[{validator(Ke,Je){const _n=Je.some(zt=>zt[at]===1),Xn=Je.findIndex(zt=>{var kn;return((kn=zt[mt])==null?void 0:kn.length)<=0});return Xn!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[Xn]}\u9009\u9879\u7684\u5185\u5BB9`)):_n?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ke,{add:Je,remove:_n})=>pt.createElement("div",{id:Array.isArray(Pt)?Pt.join("_"):`${Pt}`},Ke.map((Xn,zt)=>{var kn=Xn,{key:bn,name:oi}=kn,Yt=ye(kn,["key","name"]);const Mt=xn===bn,_t=()=>{Nn(bn)},mn=zt<7&&zt===Ke.length-1,rn=()=>Je({[mt]:"",[at]:0}),He=()=>_n(oi);return pt.createElement(wt.default.Item,ge(se({},Yt),{key:bn,name:oi,className:_e.Z.choiceListWrap,rules:[{validator(Me,Fe){return Fe!=null&&Fe.choice_text?Promise.resolve():Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${we[zt]}\u9009\u9879\u7684\u5185\u5BB9`))}}]}),pt.createElement(Ce,{choiceTextKey:mt,answerKey:at,index:zt,isEdit:Mt,setInputActive:_t,form:Et,choiceOptionsPath:Pt,allowChangeMode:Nt,showAddIcon:mn,addItem:rn,deleteItem:He}))}),Ke.length<8&&pt.createElement("div",{className:`${_e.Z.addBtn} mb30`,onClick:()=>Je({[mt]:"",[at]:0})},"\u6DFB\u52A0\u9009\u9879"))),Ln&&pt.createElement("div",{onClick:()=>Qe(!0)},pt.createElement(wt.default.Item,{name:nt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},pt.createElement(ut.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:fn}))))}},81580:function(Rn,$n,be){"use strict";be.d($n,{u:function(){return Nt}});var le=be(67294),Xe=be(62844),Lt=be(71230),At=be(15746),wt=be(28802),_e=be(83062),Ve=be(59637),xt=be(91773),ut=be(98813),pt=be(37720),Rt=be(41307),Ot=be(24018),jt=be(17663),Te=be(52654),ne=be(35713),te=be(67294),ce=Object.defineProperty,se=Object.defineProperties,ge=Object.getOwnPropertyDescriptors,ye=Object.getOwnPropertySymbols,we=Object.prototype.hasOwnProperty,Ce=Object.prototype.propertyIsEnumerable,Re=(Et,Ln,xn)=>Ln in Et?ce(Et,Ln,{enumerable:!0,configurable:!0,writable:!0,value:xn}):Et[Ln]=xn,We=(Et,Ln)=>{for(var xn in Ln||(Ln={}))we.call(Ln,xn)&&Re(Et,xn,Ln[xn]);if(ye)for(var xn of ye(Ln))Ce.call(Ln,xn)&&Re(Et,xn,Ln[xn]);return Et},lt=(Et,Ln)=>se(Et,ge(Ln)),ht=(Et,Ln)=>{var xn={};for(var Nn in Et)we.call(Et,Nn)&&Ln.indexOf(Nn)<0&&(xn[Nn]=Et[Nn]);if(Et!=null&&ye)for(var Nn of ye(Et))Ln.indexOf(Nn)<0&&Ce.call(Et,Nn)&&(xn[Nn]=Et[Nn]);return xn};const nt=({value:Et,onChange:Ln})=>{const xn=fn=>{Xe.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:Te.Z.modal,onOk:()=>{const Qe=[...Et];Qe.splice(fn,1),Ln(Qe)}})},Nn=()=>{const fn=[...Et];fn.push(""),Ln(fn)};return te.createElement(Lt.Z,{className:"ml20"},te.createElement(At.Z,{flex:1},Et==null?void 0:Et.map((fn,Qe)=>te.createElement(Lt.Z,{key:`${fn}_${Qe}`,className:"mb20"},te.createElement(wt.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:fn,autoSize:{maxRows:3},maxLength:1e3,onBlur:Ke=>{const Je=[...Et],_n=Ke.target.value.trim();Je[Qe]=_n,Ln(Je)}}),te.createElement(_e.Z,{title:"\u5220\u9664"},te.createElement(Ot.Z,{className:Te.Z.deleteIcon,style:{marginLeft:15,visibility:Qe>0?"visible":"hidden"},onClick:()=>xn(Qe)}))))),te.createElement(At.Z,null,te.createElement("div",{className:`${Te.Z.addBtn}`,onClick:()=>{Nn()}},"\u65B0\u589E\u7B54\u6848")))},mt=({value:Et,onChange:Ln})=>{const xn=fn=>{Xe.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:Te.Z.modal,onOk:()=>{const Qe=[...Et];Qe.splice(fn,1),Ln(Qe)}})},Nn=()=>{const fn=[...Et];fn.push(""),Ln(fn)};return te.createElement(Lt.Z,{className:"ml20"},te.createElement(At.Z,{flex:1},Et==null?void 0:Et.map((fn,Qe)=>te.createElement(Lt.Z,{key:`${fn}_${Qe}`,align:"middle",className:"mb20"},te.createElement(ne.Z,{value:fn,style:{flex:1},onChange:Ke=>{const Je=[...Et];Je[Qe]=Ke,Ln(Je)}}),te.createElement(_e.Z,{title:"\u5220\u9664"},te.createElement(Ot.Z,{className:Te.Z.deleteIcon,style:{marginLeft:15,visibility:Qe>0?"visible":"hidden"},onClick:()=>xn(Qe)}))))),te.createElement(At.Z,null,te.createElement("div",{className:`${Te.Z.addBtn}`,onClick:()=>{Nn()}},"\u65B0\u589E\u7B54\u6848")))},at=({value:Et=!0,onChange:Ln})=>te.createElement(Ve.Z,{checked:!Et,onChange:xn=>{Ln(!xn)}}),Pt="\u2581",Nt=({questionTitlePlaceholder:Et,form:Ln,scoreByBlank:xn=!1,answerKey:Nn})=>{const[fn,Qe]=(0,le.useState)(!1),Ke=(Yt,Mt)=>{const _t=Mt.line;let mn=0;for(let He=0;He<_t;He++)mn+=Yt.getLine(He).split(Pt).length-1;const rn=Yt.getLine(_t).substring(0,Mt.ch);return mn+=rn.split(Pt).length-1,mn},Je=(Yt,Mt,_t,mn)=>{const rn=Yt.getRange(Mt.from,Mt.to);let He=0;if(Mt.text.forEach(Me=>{He+=Me.split(Pt).length-1}),Mt.origin!=="setValue"){if(rn&&rn.indexOf(Pt)!==-1){const Me=rn.split(Pt).length-1,Fe=Ke(Yt,Mt.from);if(console.log(`\u5220\u9664${Me}\u4E2A\uFF0C \u524D\u9762\u6709${Fe}\u4E2A\uFF0C\u65B0\u589E${He}\u4E2A`),Me>1){const Oe=Array.from({length:Me},(Ue,Be)=>Fe+Be);mn(Oe)}else mn(Fe)}else if(He>0){const Me=Ke(Yt,Mt.from);console.log(`\u65B0\u589E${He}\u4E2A\uFF0C\u4E4B\u524D\u6709${Me}\u4E2A`),_t(He,Me)}}},_n=()=>{const Yt=Ln.getFieldValue(Nn);Ln.setFieldsValue({[Nn]:Yt.map((Mt,_t)=>lt(We({},Mt),{position:_t+1}))})},Xn=(0,le.useRef)(),zt=(Yt,Mt)=>{for(let _t=0;_t<Yt;_t++)Xn.current({position:null,answer_text:[""],model:1},Mt+_t);_n()},kn=(0,le.useRef)(),bn=Yt=>{kn.current(Yt),_n()},oi=xt.default.useWatch(Nn,Ln);return te.createElement("div",{className:Te.Z.wrap},te.createElement("div",{className:Te.Z.questionTitleEditorWrap},te.createElement(xt.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},te.createElement(Rt.h,{scrollId:"name",watch:!0,height:140,placeholder:Et,showNullButton:!0,onCMBeforeChange:(Yt,Mt)=>{Je(Yt,Mt,zt,bn)}}))),te.createElement(xt.default.List,{name:Nn,rules:[{validator(Yt,Mt){if(!(Mt!=null&&Mt.length))return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const _t of Mt){const{answer_text:mn}=_t||{};if(mn!=null&&mn.some(rn=>(rn==null?void 0:rn.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(Yt,{add:Mt,remove:_t},{errors:mn})=>(Xn.current=Mt,kn.current=_t,te.createElement(te.Fragment,null,te.createElement(xt.default.Item,{label:te.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(Yt!=null&&Yt.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}}),Yt.map((rn,He)=>{var Me=rn,{key:Fe,name:Oe}=Me,Ue=ht(Me,["key","name"]),Be,ot;return te.createElement("div",{style:{marginBottom:10},key:Fe},te.createElement(Lt.Z,{className:"mb20",align:"middle",wrap:!1},te.createElement(At.Z,{style:{marginRight:10},flex:"0 0 auto",className:`${Te.Z.blankIndex}`},"\u586B\u7A7A\u9879",He+1),te.createElement(xt.default.Item,lt(We({},Ue),{name:[Oe,"model"],noStyle:!0}),te.createElement(ut.ZP.Group,{onChange:()=>{const Cn=Ln.getFieldValue(Nn);Ln.setFieldsValue({[Nn]:Cn.map((ci,si)=>lt(We({},ci),{answer_text:Oe===si?[""]:ci.answer_text}))})}},te.createElement(ut.ZP,{value:1},"\u6587\u672C\u6A21\u5F0F ",te.createElement(_e.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u5728\u6587\u672C\u6846\u4E2D\u586B\u5199\u6587\u672C\u7B54\u6848"},te.createElement(jt.Z,null))),te.createElement(ut.ZP,{value:2},"\u6570\u5B66\u516C\u5F0F\u6A21\u5F0F ",te.createElement(_e.Z,{title:"\u5B66\u751F\u7B54\u9898\u65F6\uFF0C\u9700\u8981\u7F16\u5199\u6570\u5B66\u516C\u5F0F\u4F5C\u4E3A\u7B54\u6848"},te.createElement(jt.Z,null)))))),te.createElement(Lt.Z,{style:{marginLeft:20},align:"middle",wrap:!1},te.createElement(At.Z,{flex:1},te.createElement(Lt.Z,{align:"top",justify:"space-between",wrap:!1},te.createElement(At.Z,{flex:1},te.createElement(xt.default.Item,lt(We({},Ue),{name:[Oe,"answer_text"],noStyle:!0}),((ot=(Be=Ln.getFieldValue(Nn))==null?void 0:Be[Oe])==null?void 0:ot.model)===1?te.createElement(nt,null):te.createElement(mt,null))),xn&&te.createElement(At.Z,{flex:"224px",style:{margin:"-7px 0 0 20px"}},te.createElement(xt.default.Item,lt(We({},Ue),{name:[Oe,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Te.Z.blankInputNumberWrapper}),te.createElement(pt.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5206\u503C"})))),te.createElement(xt.default.Item,lt(We({},Ue),{name:[Oe,"position"],noStyle:!0}),te.createElement(wt.default,{type:"hidden"})))))})))),te.createElement(Lt.Z,{align:"middle"},te.createElement(xt.default.Item,{name:"downcase",valuePropName:"checked"},te.createElement(Ve.Z,null)),te.createElement(At.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),te.createElement(Lt.Z,{align:"middle"},te.createElement(xt.default.Item,{name:"no_space",valuePropName:"checked"},te.createElement(Ve.Z,null)),te.createElement(At.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(oi==null?void 0:oi.length)>1&&te.createElement(Lt.Z,{align:"middle",className:(oi==null?void 0:oi.length)>1?"mb30":`${Te.Z.hide}`},te.createElement(xt.default.Item,{name:"is_ordered"},te.createElement(at,null)),te.createElement(At.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:()=>Qe(!0)},te.createElement(xt.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},te.createElement(Rt.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:fn}))))}},66495:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return ye}});var le=be(67294),Xe=be(71230),Lt=be(15746),At=be(91773),wt=be(52654),_e=be(41307),Ve=be(67294),xt=Object.defineProperty,ut=Object.defineProperties,pt=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertySymbols,Ot=Object.prototype.hasOwnProperty,jt=Object.prototype.propertyIsEnumerable,Te=(we,Ce,Re)=>Ce in we?xt(we,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Re}):we[Ce]=Re,ne=(we,Ce)=>{for(var Re in Ce||(Ce={}))Ot.call(Ce,Re)&&Te(we,Re,Ce[Re]);if(Rt)for(var Re of Rt(Ce))jt.call(Ce,Re)&&Te(we,Re,Ce[Re]);return we},te=(we,Ce)=>ut(we,pt(Ce)),ce=(we,Ce)=>{var Re={};for(var We in we)Ot.call(we,We)&&Ce.indexOf(We)<0&&(Re[We]=we[We]);if(we!=null&&Rt)for(var We of Rt(we))Ce.indexOf(We)<0&&jt.call(we,We)&&(Re[We]=we[We]);return Re};const se={\u6B63\u786E:"T",\u9519\u8BEF:"F"},ge=({value:we,onChange:Ce,form:Re})=>{const We=(we==null?void 0:we.is_answer)===1,lt=we==null?void 0:we.choice_text,ht=()=>{const nt=Re.getFieldsValue().choices.map(mt=>({choice_text:mt.choice_text,is_answer:0}));Re.setFieldsValue({choices:nt}),Ce(te(ne({},we),{is_answer:1}))};return Ve.createElement(Xe.Z,{className:wt.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"}},Ve.createElement(Lt.Z,{onClick:ht,className:`${wt.Z.choiceIndex} ${wt.Z.judgementIndex} ${We?wt.Z.activeAnswer:""}`},se[lt]),Ve.createElement(Lt.Z,{flex:1,className:`${wt.Z.editorWrap} ml15`},Ve.createElement("div",{className:`${wt.Z.inputBorder} ${wt.Z.placeholder} ${We?wt.Z.activeJudgementAnswer:""}`},lt)),Ve.createElement(Lt.Z,{flex:"0 0 auto",className:"ml15"},Ve.createElement("div",{onClick:ht,className:`${wt.Z.setAnswerBtn} ${We?wt.Z.activeAnswer:""}`},We?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ye=({questionTitlePlaceholder:we,choiceKey:Ce,form:Re})=>{const[We,lt]=(0,le.useState)(!1);return Ve.createElement("div",{className:wt.Z.wrap},Ve.createElement("div",{className:wt.Z.questionTitleEditorWrap},Ve.createElement(At.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Ve.createElement(_e.h,{scrollId:"name",watch:!0,height:140,placeholder:we}))),Ve.createElement(At.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},Ve.createElement(At.default.List,{name:"choices",rules:[{validator(ht,nt){return nt.some(at=>(at==null?void 0:at.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},ht=>Ve.createElement("div",{id:"choices"},ht.map(nt=>{var mt=nt,{key:at,name:Pt}=mt,Nt=ce(mt,["key","name"]);return Ve.createElement(At.default.Item,te(ne({},Nt),{key:at,name:Pt,noStyle:!0}),Ve.createElement(ge,{form:Re}))})))),Ve.createElement("div",{onClick:()=>lt(!0)},Ve.createElement(At.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Ve.createElement(_e.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:We}))))}},41307:function(Rn,$n,be){"use strict";be.d($n,{h:function(){return ne},x:function(){return te}});var le=be(35567),Xe=be(52654),Lt=be(65226),At=be(67294),wt=Object.defineProperty,_e=Object.defineProperties,Ve=Object.getOwnPropertyDescriptors,xt=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,pt=Object.prototype.propertyIsEnumerable,Rt=(ce,se,ge)=>se in ce?wt(ce,se,{enumerable:!0,configurable:!0,writable:!0,value:ge}):ce[se]=ge,Ot=(ce,se)=>{for(var ge in se||(se={}))ut.call(se,ge)&&Rt(ce,ge,se[ge]);if(xt)for(var ge of xt(se))pt.call(se,ge)&&Rt(ce,ge,se[ge]);return ce},jt=(ce,se)=>_e(ce,Ve(se)),Te=(ce,se)=>{var ge={};for(var ye in ce)ut.call(ce,ye)&&se.indexOf(ye)<0&&(ge[ye]=ce[ye]);if(ce!=null&&xt)for(var ye of xt(ce))se.indexOf(ye)<0&&pt.call(ce,ye)&&(ge[ye]=ce[ye]);return ge};const ne=ce=>{var se=ce,{value:ge,onChange:ye,scrollId:we}=se,Ce=Te(se,["value","onChange","scrollId"]);return At.createElement("div",{id:we||""},At.createElement(le.Z,jt(Ot({},Ce),{defaultValue:ge,onChange:(Re,We)=>{We!=null&&We.length?ye(Re,We):ye(Re)}})))},te=({value:ce,onChange:se,placeholder:ge,height:ye=140,isEdit:we,miniToolbar:Ce,watch:Re=!0})=>we?At.createElement(le.Z,{watch:Re,isFocus:!0,height:ye||void 0,placeholder:ge,defaultValue:ce,onChange:se,miniToolbar:Ce}):At.createElement("div",{style:{cursor:"pointer"}},ce?At.createElement(Lt.Z,{className:Xe.Z.inputBorder,value:ce}):At.createElement("div",{className:`${Xe.Z.inputBorder} ${Xe.Z.placeholder} inputBorderError`},ge))},77792:function(Rn,$n,be){"use strict";be.d($n,{W:function(){return mt}});var le=be(67294),Xe=be(2453),Lt=be(66309),At=be(91773),wt=be(59637),_e=be(71230),Ve=be(15746),xt=be(83062),ut=be(28802),pt=be(37720),Rt=be(52654),Ot=be(41307),jt=be(35567),Te=be(17663),ne=Object.defineProperty,te=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,se=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable,we=(at,Pt,Nt)=>Pt in at?ne(at,Pt,{enumerable:!0,configurable:!0,writable:!0,value:Nt}):at[Pt]=Nt,Ce=(at,Pt)=>{for(var Nt in Pt||(Pt={}))ge.call(Pt,Nt)&&we(at,Nt,Pt[Nt]);if(se)for(var Nt of se(Pt))ye.call(Pt,Nt)&&we(at,Nt,Pt[Nt]);return at},Re=(at,Pt)=>te(at,ce(Pt)),We=(at,Pt)=>{var Nt={};for(var Et in at)ge.call(at,Et)&&Pt.indexOf(Et)<0&&(Nt[Et]=at[Et]);if(at!=null&&se)for(var Et of se(at))Pt.indexOf(Et)<0&&ye.call(at,Et)&&(Nt[Et]=at[Et]);return Nt};const lt=at=>{var Pt=at,{value:Nt,onChange:Et}=Pt,Ln=We(Pt,["value","onChange"]);const xn=Nn=>{Et([Nn])};return le.createElement(jt.Z,Re(Ce({},Ln),{defaultValue:Nt==null?void 0:Nt[0],onChange:xn}))},ht=at=>{if(!at)return!1;if(/^s*$/.test(at)||at.trim()===""){Xe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Pt=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 at==="|"?(Xe.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},nt=({value:at=[],onClose:Pt})=>le.createElement(Lt.default,{closable:!0,onClose:Pt,className:Rt.Z.keywordTag},le.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},at.join(" \u6216 "))),mt=({questionTitlePlaceholder:at,form:Pt,showKeywords:Nt,isMustKeyWords:Et=Nt})=>{const[Ln,xn]=(0,le.useState)(!1),[Nn,fn]=(0,le.useState)(""),Qe=At.default.useWatch("use_keywords",Pt),Ke=At.default.useWatch("question_score",Pt);return le.createElement("div",{className:Rt.Z.wrap},le.createElement("div",{className:Rt.Z.questionTitleEditorWrap},le.createElement(At.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},le.createElement(Ot.h,{scrollId:"name",watch:!0,height:140,placeholder:at}))),le.createElement(At.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:"answer_texts",labelCol:{span:24}},le.createElement(lt,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Nt&&!Et&&le.createElement(At.default.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked"},le.createElement(wt.Z,{defaultChecked:!0})),Nt&&Et&&le.createElement(_e.Z,{align:"middle",className:"mb30"},le.createElement(At.default.Item,{name:"use_keywords",valuePropName:"checked"},le.createElement(wt.Z,null)),le.createElement(Ve.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(Ve.Z,null,le.createElement(xt.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"},le.createElement(Te.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Qe||!Et)&&le.createElement(At.default.List,{name:"keywords",rules:[{validator(Je,_n){return Et?_n!=null&&_n.length?(_n==null?void 0:_n.reduce((zt,kn)=>zt+kn.score,0))>parseFloat(Ke)?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()}}]},(Je,{add:_n,remove:Xn})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${Rt.Z.title} mb10`},Et?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(_e.Z,{align:"middle",className:"font14 mb30"},le.createElement(Ve.Z,{flex:1},le.createElement(ut.default,{value:Nn,onChange:zt=>{fn(zt.target.value)},maxLength:50,allowClear:!0,onPressEnter:zt=>{var kn,bn,oi,Yt;const Mt=`${(kn=zt.target)==null?void 0:kn.value}`,_t=(oi=(bn=Mt==null?void 0:Mt.split("|"))==null?void 0:bn.filter(He=>!!He))==null?void 0:oi.map(He=>He==null?void 0:He.trim()),mn=Pt.getFieldValue("keywords"),rn=((Yt=mn==null?void 0:mn.map(He=>He==null?void 0:He.keyword))==null?void 0:Yt.flat())||[];for(const He of _t)if(rn.includes(He)){Xe.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}ht(Mt)&&(_n({keyword:_t,score:1}),fn(""))},className:Rt.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"})),le.createElement(Ve.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Je.map(zt=>{var kn=zt,{key:bn,name:oi}=kn,Yt=We(kn,["key","name"]);return le.createElement(_e.Z,{key:bn,className:"mb20",style:{marginRight:148}},le.createElement(Ve.Z,{flex:1},le.createElement(_e.Z,{align:"middle",justify:"space-between"},le.createElement(At.default.Item,Re(Ce({},Yt),{name:[oi,"keyword"]}),le.createElement(nt,{onClose:()=>Xn(oi)})),Et&&le.createElement(At.default.Item,Re(Ce({},Yt),{name:[oi,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Rt.Z.blankInputNumberWrapper}),le.createElement(pt.Z,{className:Rt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>xn(!0)},le.createElement(At.default.Item,{name:"analysis",label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Ot.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Ln}))))}},30351:function(Rn,$n,be){"use strict";be.d($n,{tc:function(){return Xo.t},uh:function(){return le.u},rL:function(){return Nr},u8:function(){return Lt.u},ZZ:function(){return Xe.Z},Wk:function(){return At.W}});var le=be(11776),Xe=be(66495),Lt=be(81580),At=be(77792),wt=be(67294),_e=be(69234),Ve=be(91773),xt=be(71230),ut=be(15746),pt=be(37720),Rt=be(83062),Ot=be(85418),jt=be(52654),Te=be(24018),ne=be(41307),te=be(62844),ce=be(28802),se=be(59637),ge=be(67294),ye=Object.defineProperty,we=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ht=(ji,Mi,Oi)=>Mi in ji?ye(ji,Mi,{enumerable:!0,configurable:!0,writable:!0,value:Oi}):ji[Mi]=Oi,nt=(ji,Mi)=>{for(var Oi in Mi||(Mi={}))We.call(Mi,Oi)&&ht(ji,Oi,Mi[Oi]);if(Re)for(var Oi of Re(Mi))lt.call(Mi,Oi)&&ht(ji,Oi,Mi[Oi]);return ji},mt=(ji,Mi)=>we(ji,Ce(Mi)),at=(ji,Mi)=>{var Oi={};for(var vr in ji)We.call(ji,vr)&&Mi.indexOf(vr)<0&&(Oi[vr]=ji[vr]);if(ji!=null&&Re)for(var vr of Re(ji))Mi.indexOf(vr)<0&&lt.call(ji,vr)&&(Oi[vr]=ji[vr]);return Oi};const Pt=({value:ji,onChange:Mi})=>{const Oi=Dr=>{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:jt.Z.modal,onOk:()=>{const Cr=[...ji];Cr.splice(Dr,1),Mi(Cr)}})},vr=()=>{const Dr=[...ji];Dr.push(""),Mi(Dr)};return ge.createElement(xt.Z,{className:"ml20"},ge.createElement(ut.Z,{flex:1},ji==null?void 0:ji.map((Dr,Cr)=>ge.createElement(xt.Z,{key:`${Dr}_${Cr}`,align:"middle",className:"mb20"},ge.createElement(ce.default.TextArea,{style:{flex:1,minHeight:44},defaultValue:Dr,autoSize:{maxRows:3},maxLength:1e3,onBlur:En=>{const Ee=[...ji],on=En.target.value.trim();Ee[Cr]=on,Mi(Ee)}}),ge.createElement(Rt.Z,{title:"\u5220\u9664"},ge.createElement(Te.Z,{className:jt.Z.deleteIcon,style:{marginLeft:15,visibility:Cr>0?"visible":"hidden"},onClick:()=>Oi(Cr)}))))),ge.createElement(ut.Z,null,ge.createElement("div",{className:`${jt.Z.addBtn}`,onClick:()=>{vr()}},"\u65B0\u589E\u7B54\u6848")))},Nt=({value:ji=!0,onChange:Mi})=>ge.createElement(se.Z,{checked:!ji,onChange:Oi=>{Mi(!Oi)}}),Et="\u2581",Ln=({questionTitlePlaceholder:ji,form:Mi,name:Oi,scoreByBlank:vr=!1,answerKey:Dr,titleKey:Cr="name",analysisKey:En="analysis",isOrdered:Ee="is_ordered"})=>{var on,gn;const[Mn,In]=(0,wt.useState)(!1),ii=(hi,ri)=>{const Kt=ri.line;let wn=0;for(let wr=0;wr<Kt;wr++)wn+=hi.getLine(wr).split(Et).length-1;const Ki=hi.getLine(Kt).substring(0,ri.ch);return wn+=Ki.split(Et).length-1,wn},Ci=(hi,ri,Kt,wn)=>{const Ki=hi.getRange(ri.from,ri.to);let wr=0;if(ri.text.forEach(Kn=>{wr+=Kn.split(Et).length-1}),ri.origin!=="setValue"){if(Ki&&Ki.indexOf(Et)!==-1){const Kn=Ki.split(Et).length-1,Wt=ii(hi,ri.from);if(console.log(`\u5220\u9664${Kn}\u4E2A\uFF0C \u524D\u9762\u6709${Wt}\u4E2A\uFF0C\u65B0\u589E${wr}\u4E2A`),Kn>1){const Yi=Array.from({length:Kn},(pr,Ro)=>Wt+Ro);wn(Yi)}else wn(Wt)}else if(wr>0){const Kn=ii(hi,ri.from);console.log(`\u65B0\u589E${wr}\u4E2A\uFF0C\u4E4B\u524D\u6709${Kn}\u4E2A`),Kt(wr,Kn)}}},Ji=()=>{const hi=Mi.getFieldValue(["sub_item_banks",...Dr]);Mi.setFieldValue(["sub_item_banks",...Dr],hi==null?void 0:hi.map((ri,Kt)=>mt(nt({},ri),{position:Kt+1})))},Vt=(0,wt.useRef)(),Zt=(hi,ri)=>{for(let Kt=0;Kt<hi;Kt++)Vt.current({position:null,answer_text:[""]},ri+Kt);Ji()},It=(0,wt.useRef)(),dn=hi=>{It.current(hi),Ji()},Ri=(gn=(on=Mi.getFieldValue("sub_item_banks"))==null?void 0:on[Dr==null?void 0:Dr[0]])==null?void 0:gn[Dr==null?void 0:Dr[1]];return(0,wt.useEffect)(()=>{console.log("========",Mi.getFieldsValue())},[Mi]),ge.createElement("div",{className:jt.Z.wrap},ge.createElement("div",{className:jt.Z.questionTitleEditorWrap},ge.createElement(Ve.default.Item,{label:"\u9898\u5E72",name:Cr,labelCol:{span:24},rules:[{required:!0}]},ge.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:ji,showNullButton:!0,onCMBeforeChange:(hi,ri)=>{Ci(hi,ri,Zt,dn)}}))),ge.createElement(Ve.default.List,{name:Dr,rules:[{validator(hi,ri){if((ri==null?void 0:ri.length)===0)return Promise.reject(new Error("\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879"));for(const Kt of ri){const{answer_text:wn}=Kt||{};if(wn!=null&&wn.some(Ki=>(Ki==null?void 0:Ki.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(hi,{add:ri,remove:Kt},{errors:wn})=>(Vt.current=ri,It.current=Kt,ge.createElement(ge.Fragment,null,ge.createElement(Ve.default.Item,{label:ge.createElement("span",null,"\u586B\u7A7A\u9879\u7B54\u6848",!(hi!=null&&hi.length)&&ge.createElement("span",{style:{color:"#E99237"}},"\uFF08\u8BF7\u5148\u5728\u9898\u5E72\u4E2D\u63D2\u5165\u586B\u7A7A\u9879\uFF09")),required:!0,labelCol:{span:24}}),hi.map((Ki,wr)=>{var Kn=Ki,{key:Wt,name:Yi}=Kn,pr=at(Kn,["key","name"]);return ge.createElement(xt.Z,{align:"top",key:Wt},ge.createElement(ut.Z,{className:`${jt.Z.blankIndex} pt5`},"\u586B\u7A7A\u9879",wr+1),ge.createElement(ut.Z,{flex:1},ge.createElement(xt.Z,{align:"top",justify:"space-between"},ge.createElement(ut.Z,{flex:1},ge.createElement(Ve.default.Item,mt(nt({},pr),{name:[Yi,"answer_text"],noStyle:!0}),ge.createElement(Pt,null))),vr&&ge.createElement(ut.Z,{flex:"224px"},ge.createElement(Ve.default.Item,mt(nt({},pr),{name:[Yi,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:jt.Z.blankInputNumberWrapper}),ge.createElement(pt.Z,{className:jt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),ge.createElement(Ve.default.Item,mt(nt({},pr),{name:[Yi,"position"],noStyle:!0}),ge.createElement(ce.default,{type:"hidden"}))))})))),ge.createElement(xt.Z,{align:"middle"},ge.createElement(Ve.default.Item,{name:[Oi,"downcase"],valuePropName:"checked"},ge.createElement(se.Z,null)),ge.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),ge.createElement(xt.Z,{align:"middle"},ge.createElement(Ve.default.Item,{name:[Oi,"no_space"],valuePropName:"checked"},ge.createElement(se.Z,null)),ge.createElement(ut.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Ri==null?void 0:Ri.length)>1&&ge.createElement(xt.Z,{align:"middle",className:(Ri==null?void 0:Ri.length)>1?"mb30":`${jt.Z.hide}`},ge.createElement(Ve.default.Item,{name:Ee},ge.createElement(Nt,null)),ge.createElement(ut.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")),ge.createElement("div",{className:"mt30",onClick:()=>In(!0)},ge.createElement(Ve.default.Item,{name:En,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},ge.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mn}))))};var xn=be(67294),Nn=Object.defineProperty,fn=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Ke=Object.getOwnPropertySymbols,Je=Object.prototype.hasOwnProperty,_n=Object.prototype.propertyIsEnumerable,Xn=(ji,Mi,Oi)=>Mi in ji?Nn(ji,Mi,{enumerable:!0,configurable:!0,writable:!0,value:Oi}):ji[Mi]=Oi,zt=(ji,Mi)=>{for(var Oi in Mi||(Mi={}))Je.call(Mi,Oi)&&Xn(ji,Oi,Mi[Oi]);if(Ke)for(var Oi of Ke(Mi))_n.call(Mi,Oi)&&Xn(ji,Oi,Mi[Oi]);return ji},kn=(ji,Mi)=>fn(ji,Qe(Mi)),bn=(ji,Mi)=>{var Oi={};for(var vr in ji)Je.call(ji,vr)&&Mi.indexOf(vr)<0&&(Oi[vr]=ji[vr]);if(ji!=null&&Ke)for(var vr of Ke(ji))Mi.indexOf(vr)<0&&_n.call(ji,vr)&&(Oi[vr]=ji[vr]);return Oi};const oi={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Yt=({value:ji,onChange:Mi,form:Oi,choiceKey:vr})=>{const Dr=(ji==null?void 0:ji.is_answer)===1,Cr=ji==null?void 0:ji.choice_text,En=()=>{var Ee;const on=(Ee=Oi==null?void 0:Oi.getFieldValue(["sub_item_banks",...vr]))==null?void 0:Ee.map(gn=>({choice_text:gn.choice_text,is_answer:0}));Oi==null||Oi.setFieldValue(["sub_item_banks",...vr],on),Mi(kn(zt({},ji),{is_answer:1}))};return xn.createElement(xt.Z,{className:jt.Z.choiceWrap,align:"middle",wrap:!1},xn.createElement(ut.Z,{onClick:En,className:`${jt.Z.choiceIndex} ${jt.Z.judgementIndex} ${Dr?jt.Z.activeAnswer:""}`},oi[Cr]),xn.createElement(ut.Z,{flex:1,className:`${jt.Z.editorWrap} ml15`},xn.createElement("div",{className:`${jt.Z.inputBorder} ${jt.Z.placeholder} ${Dr?jt.Z.activeJudgementAnswer:""}`},Cr)),xn.createElement(ut.Z,{flex:"0 0 auto",className:"ml15"},xn.createElement("div",{onClick:En,className:`${jt.Z.setAnswerBtn} ${Dr?jt.Z.activeAnswer:""}`},Dr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},Mt=({questionTitlePlaceholder:ji,choiceKey:Mi="choices",form:Oi,titleKey:vr="name",analysisKey:Dr="analysis"})=>{const[Cr,En]=(0,wt.useState)(!1);return xn.createElement("div",{className:jt.Z.wrap},xn.createElement("div",{className:jt.Z.questionTitleEditorWrap},xn.createElement(Ve.default.Item,{label:"\u9898\u5E72",name:vr,labelCol:{span:24},rules:[{required:!0}]},xn.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:ji}))),xn.createElement(Ve.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},xn.createElement(Ve.default.List,{name:Mi,rules:[{validator(Ee,on){return on.some(Mn=>(Mn==null?void 0:Mn.is_answer)===1)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},Ee=>xn.createElement("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"}},Ee.map(on=>{var gn=on,{key:Mn,name:In}=gn,ii=bn(gn,["key","name"]);return xn.createElement(Ve.default.Item,kn(zt({},ii),{key:Mn,name:In,noStyle:!0}),xn.createElement(Yt,{form:Oi,choiceKey:Mi}))})))),xn.createElement("div",{className:"mt30",onClick:()=>En(!0)},xn.createElement(Ve.default.Item,{name:Dr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},xn.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Cr}))))};var _t=be(2453),mn=be(66309),rn=be(35567),He=be(17663),Me=Object.defineProperty,Fe=Object.defineProperties,Oe=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Cn=(ji,Mi,Oi)=>Mi in ji?Me(ji,Mi,{enumerable:!0,configurable:!0,writable:!0,value:Oi}):ji[Mi]=Oi,ci=(ji,Mi)=>{for(var Oi in Mi||(Mi={}))Be.call(Mi,Oi)&&Cn(ji,Oi,Mi[Oi]);if(Ue)for(var Oi of Ue(Mi))ot.call(Mi,Oi)&&Cn(ji,Oi,Mi[Oi]);return ji},si=(ji,Mi)=>Fe(ji,Oe(Mi)),pn=(ji,Mi)=>{var Oi={};for(var vr in ji)Be.call(ji,vr)&&Mi.indexOf(vr)<0&&(Oi[vr]=ji[vr]);if(ji!=null&&Ue)for(var vr of Ue(ji))Mi.indexOf(vr)<0&&ot.call(ji,vr)&&(Oi[vr]=ji[vr]);return Oi};const qn=ji=>{var Mi=ji,{value:Oi,onChange:vr}=Mi,Dr=pn(Mi,["value","onChange"]);const Cr=En=>{vr([En])};return wt.createElement(rn.Z,si(ci({},Dr),{defaultValue:Oi==null?void 0:Oi[0],onChange:Cr}))},en=ji=>{if(!ji)return!1;let Mi=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 ji==="|"?(_t.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},wi=({value:ji=[],onClose:Mi})=>wt.createElement(mn.default,{closable:!0,onClose:Mi,className:jt.Z.keywordTag},wt.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},ji.join(" \u6216 "))),Si=({questionTitlePlaceholder:ji,form:Mi,showKeywords:Oi,isMustKeyWords:vr=Oi,titleKey:Dr="name",analysisKey:Cr="analysis",answerTexts:En="answer_texts",keywords:Ee="keywords",useKeywords:on="use_keywords",indexs:gn})=>{const[Mn,In]=(0,wt.useState)(!1),[ii,Ci]=(0,wt.useState)(""),[Ji,Vt]=(0,wt.useState)(!1),Zt=Ve.default.useWatch("question_score",Mi);return wt.createElement("div",{className:jt.Z.wrap},wt.createElement("div",{className:jt.Z.questionTitleEditorWrap},wt.createElement(Ve.default.Item,{label:"\u9898\u5E72",name:Dr,labelCol:{span:24},rules:[{required:!0}]},wt.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:ji}))),wt.createElement(Ve.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:En,labelCol:{span:24}},wt.createElement(qn,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),Oi&&!vr&&wt.createElement(Ve.default.Item,{hidden:!0,name:on,valuePropName:"checked"},wt.createElement(se.Z,{defaultChecked:!0})),Oi&&vr&&wt.createElement(xt.Z,{align:"middle",className:"mb30"},wt.createElement(Ve.default.Item,{name:on,valuePropName:"checked"},wt.createElement(se.Z,{onChange:()=>{var It,dn,Ri,hi,ri,Kt;console.log(Mi.getFieldsValue()),Vt((Ri=(dn=(It=Mi.getFieldsValue())==null?void 0:It.sub_item_banks)==null?void 0:dn[gn])==null?void 0:Ri.use_keywords),console.log((Kt=(ri=(hi=Mi.getFieldsValue())==null?void 0:hi.sub_item_banks)==null?void 0:ri[gn])==null?void 0:Kt.use_keywords),console.log(Ji)}})),wt.createElement(ut.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),wt.createElement(ut.Z,null,wt.createElement(Rt.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"},wt.createElement(He.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(Ji||!vr)&&wt.createElement(Ve.default.List,{name:Ee,rules:[{validator(It,dn){return vr?dn!=null&&dn.length?(dn==null?void 0:dn.reduce((hi,ri)=>hi+ri.score,0))>parseFloat(Zt)?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()}}]},(It,{add:dn,remove:Ri})=>wt.createElement(wt.Fragment,null,wt.createElement("div",{className:`${jt.Z.title} mb10`},vr?"\u5173\u952E\u8BCD":wt.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),wt.createElement(xt.Z,{align:"middle",className:"font14 mb30"},wt.createElement(ut.Z,{flex:1},wt.createElement(ce.default,{value:ii,onChange:hi=>{Ci(hi.target.value)},maxLength:50,allowClear:!0,onPressEnter:hi=>{var ri,Kt,wn,Ki;const wr=`${(ri=hi.target)==null?void 0:ri.value}`,Kn=(wn=(Kt=wr==null?void 0:wr.split("|"))==null?void 0:Kt.filter(pr=>!!pr))==null?void 0:wn.map(pr=>pr==null?void 0:pr.trim()),Wt=Mi.getFieldValue(["sub_item_banks",...Ee]),Yi=((Ki=Wt==null?void 0:Wt.map(pr=>pr==null?void 0:pr.keyword))==null?void 0:Ki.flat())||[];for(const pr of Kn)if(Yi.includes(pr)){_t.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}en(wr)&&(dn({keyword:Kn,score:1}),Ci(""))},className:jt.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"})),wt.createElement(ut.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),It.map(hi=>{var ri=hi,{key:Kt,name:wn}=ri,Ki=pn(ri,["key","name"]);return wt.createElement(xt.Z,{key:Kt,className:"mb20",style:{marginRight:148}},wt.createElement(ut.Z,{flex:1},wt.createElement(xt.Z,{align:"middle",justify:"space-between"},wt.createElement(Ve.default.Item,si(ci({},Ki),{name:[wn,"keyword"]}),wt.createElement(wi,{onClose:()=>Ri(wn)})),vr&&wt.createElement(Ve.default.Item,si(ci({},Ki),{name:[wn,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:jt.Z.blankInputNumberWrapper}),wt.createElement(pt.Z,{className:jt.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),wt.createElement("div",{onClick:()=>In(!0)},wt.createElement(Ve.default.Item,{name:Cr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},wt.createElement(ne.x,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Mn}))))};var Di=be(67294),Ti=Object.defineProperty,ro=Object.defineProperties,Zr=Object.getOwnPropertyDescriptors,Fi=Object.getOwnPropertySymbols,mi=Object.prototype.hasOwnProperty,Co=Object.prototype.propertyIsEnumerable,jn=(ji,Mi,Oi)=>Mi in ji?Ti(ji,Mi,{enumerable:!0,configurable:!0,writable:!0,value:Oi}):ji[Mi]=Oi,yn=(ji,Mi)=>{for(var Oi in Mi||(Mi={}))mi.call(Mi,Oi)&&jn(ji,Oi,Mi[Oi]);if(Fi)for(var Oi of Fi(Mi))Co.call(Mi,Oi)&&jn(ji,Oi,Mi[Oi]);return ji},Jr=(ji,Mi)=>ro(ji,Zr(Mi)),lo=(ji,Mi)=>{var Oi={};for(var vr in ji)mi.call(ji,vr)&&Mi.indexOf(vr)<0&&(Oi[vr]=ji[vr]);if(ji!=null&&Fi)for(var vr of Fi(ji))Mi.indexOf(vr)<0&&Co.call(ji,vr)&&(Oi[vr]=ji[vr]);return Oi};const{Panel:hr}=_e.default,Nr=({questionTitlePlaceholder:ji,choiceKey:Mi,form:Oi,withScore:vr})=>{const[Dr,Cr]=(0,wt.useState)([]),En=Ee=>{Cr(Ee)};return Di.createElement("div",{className:jt.Z.wrap},Di.createElement("div",{className:jt.Z.questionTitleEditorWrap},Di.createElement(Ve.default.Item,{label:"\u9898\u5E72",name:"name",labelCol:{span:24},rules:[{required:!0}]},Di.createElement(ne.h,{scrollId:"name",watch:!0,height:140,placeholder:ji}))),Di.createElement(Ve.default.Item,{label:"\u5C0F\u9898",required:!0,labelCol:{span:24}}),Di.createElement(Ve.default.List,{name:"sub_item_banks",rules:[{validator(Ee,on){return on?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(Ee,{add:on,remove:gn,move:Mn})=>{const In=Oi.getFieldValue("sub_item_banks");return Di.createElement(Di.Fragment,null,Di.createElement(_e.default,{className:Ee.length>0?jt.Z.collapseWrapper:"",bordered:!1,activeKey:Dr,onChange:En,expandIcon:({isActive:ii})=>Di.createElement("i",{className:`iconfont icon-weizhankai ${ii?jt.Z.open:jt.Z.close}`,style:{fontSize:14,transition:"all .2s"}})},Ee.map((ii,Ci)=>{var Ji=ii,{key:Vt,name:Zt}=Ji,It=lo(Ji,["key","name"]),dn,Ri,hi,ri,Kt,wn,Ki,wr,Kn,Wt;return Di.createElement(hr,{className:jt.Z.panel,forceRender:!0,header:Di.createElement("div",{className:jt.Z.panelHeader},"\u7B2C",Ci+1,"\u5C0F\u9898",Di.createElement("span",null,"\uFF08",((dn=In==null?void 0:In[Zt])==null?void 0:dn.item_type)=="SINGLE"?"\u5355\u9009\u9898":((Ri=In==null?void 0:In[Zt])==null?void 0:Ri.item_type)=="MULTIPLE"?"\u591A\u9009\u9898":((hi=In==null?void 0:In[Zt])==null?void 0:hi.item_type)=="COMPLETION"?"\u586B\u7A7A\u9898":((ri=In==null?void 0:In[Zt])==null?void 0:ri.item_type)=="JUDGMENT"?"\u5224\u65AD\u9898":"\u7B80\u7B54\u9898","\uFF09")),key:Zt,extra:Di.createElement(xt.Z,{align:"middle",onClick:Yi=>Yi.stopPropagation()},vr&&Di.createElement(ut.Z,null,Di.createElement(Ve.default.Item,Jr(yn({},It),{rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5C0F\u9898\u5206\u503C"}],label:"\u5206\u503C",name:[Zt,"question_score"],className:jt.Z.blankInputNumberWrapper}),Di.createElement(pt.Z,{className:jt.Z.blankInput,placeholder:"\u8BF7\u8F93\u5165\u5F53\u524D\u5C0F\u9898\u5206\u6570",min:.1,precision:1,max:100,style:{width:150}}))),Di.createElement(ut.Z,null,Di.createElement(xt.Z,{align:"middle",className:"pl40",justify:"end"},Ci!==0&&Di.createElement("div",{onClick:()=>{var Yi;Mn(Ci,Ci-1);const pr=(Yi=Oi.getFieldValue("sub_item_banks"))==null?void 0:Yi.map((Ro,Zn)=>(Ee.map((Ni,Pi)=>{Zn===Pi&&(Ro.q_position=Number(Ni.name)+1)}),Ro));Oi.setFieldValue("sub_item_banks",pr)}},Di.createElement(Rt.Z,{title:"\u4E0A\u79FB"},Di.createElement("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"}))),Ci<Ee.length-1&&Di.createElement("div",{onClick:()=>{var Yi;Mn(Ci,Ci+1);const pr=(Yi=Oi.getFieldValue("sub_item_banks"))==null?void 0:Yi.map((Ro,Zn)=>(Ee.map((Ni,Pi)=>{Zn===Pi&&(Ro.q_position=Number(Ni.name)+1)}),Ro));Oi.setFieldValue("sub_item_banks",pr)},className:Ci===0?"":"ml15"},Di.createElement(Rt.Z,{title:"\u4E0B\u79FB"},Di.createElement("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"}))))),Di.createElement(ut.Z,null,Di.createElement(Rt.Z,{title:"\u5220\u9664"},Di.createElement(Te.Z,{className:`${jt.Z.deleteIcon} ml15`,onClick:()=>gn(Zt)}))))},Di.createElement(Ve.default.Item,Jr(yn({},It),{name:Zt}),(((Kt=In==null?void 0:In[Zt])==null?void 0:Kt.item_type)=="SINGLE"||((wn=In==null?void 0:In[Zt])==null?void 0:wn.item_type)=="MULTIPLE")&&Di.createElement(le.u,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Ki=In==null?void 0:In[Zt])==null?void 0:Ki.item_type)=="MULTIPLE",form:Oi,choiceKey:[Zt,"choices"],titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceOptionsPath:["sub_item_banks",Zt,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((wr=In==null?void 0:In[Zt])==null?void 0:wr.item_type)=="COMPLETION"&&Di.createElement(Ln,{form:Oi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,name:Zt,titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],isOrdered:[Zt,"is_ordered"],answerKey:[Zt,"standard_answers"]}),((Kn=In==null?void 0:In[Zt])==null?void 0:Kn.item_type)=="JUDGMENT"&&Di.createElement(Mt,{form:Oi,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],choiceKey:[Zt,"choices"]}),((Wt=In==null?void 0:In[Zt])==null?void 0:Wt.item_type)=="SUBJECTIVE"&&Di.createElement(Si,{showKeywords:!0,isMustKeyWords:!1,form:Oi,titleKey:[Zt,"name"],analysisKey:[Zt,"analysis"],answerTexts:[Zt,"answer_texts"],useKeywords:[Zt,"use_keywords"],keywords:[Zt,"keywords"],indexs:Zt,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})),Ee.length<20&&Di.createElement(Ot.Z,{menu:{items:[{label:Di.createElement("div",{onClick:()=>{on({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"SINGLE"}),Cr([Ee==null?void 0:Ee.length,...Dr])}},"\u5355\u9009\u9898"),key:"1",show:!0},{label:Di.createElement("div",{onClick:()=>{on({name:"",choices:Array.from({length:4},()=>({choice_text:"",is_answer:0})),analysis:"",item_type:"MULTIPLE"}),Cr([Ee==null?void 0:Ee.length,...Dr])}},"\u591A\u9009\u9898"),key:"2",show:!0},{label:Di.createElement("div",{onClick:()=>{on({name:"",choices:[{choice_text:"\u6B63\u786E",is_answer:0},{choice_text:"\u9519\u8BEF",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),Cr([Ee==null?void 0:Ee.length,...Dr])}},"\u5224\u65AD\u9898"),key:"3",show:!0},{label:Di.createElement("div",{onClick:()=>{on({name:"",analysis:"",is_ordered:!0,standard_answers:[],item_type:"COMPLETION",downcase:!0,no_space:!0}),Cr([Ee==null?void 0:Ee.length,...Dr])}},"\u586B\u7A7A\u9898"),key:"4",show:!0},{label:Di.createElement("div",{onClick:()=>{on({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),Cr([Ee==null?void 0:Ee.length,...Dr])}},"\u7B80\u7B54\u9898"),key:"5",show:!0}].filter(ii=>ii.show).map(ii=>({label:ii.label,key:ii.key}))}},Di.createElement("div",{className:`${jt.Z.addBtn}`},"\u6DFB\u52A0\u5C0F\u9898")))}))};var Xo=be(15312)},65226:function(Rn,$n,be){"use strict";be.d($n,{z:function(){return ht},Z:function(){return nt}});var le=be(67294),Xe=be(81897),Lt=be(51161),At=be(11771),wt=be(67631),_e=be.n(wt),Ve=be(11320),xt=be(28706),ut=be(20527),pt=be(25934),Rt=be(20819),Ot=be(67294),Te=({html:mt})=>{const at=(0,le.useRef)(null),Pt=(0,le.useRef)(null),Nt=`.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,le.useEffect)(()=>{const Et=at.current.attachShadow({mode:"open"});Pt.current=document.createElement("div"),Pt.current.className="markdown-body",Pt.current.innerHTML=mt,Et.appendChild(Pt.current);const Ln=document.createElement("style");return Ln.textContent=Nt,Et.appendChild(Ln),()=>{Et.innerHTML=""}},[]),(0,le.useEffect)(()=>{Pt.current&&(Pt.current.innerHTML=mt)},[mt]),Ot.createElement("div",{ref:at})};function ne(mt){const at=["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"],Pt=new RegExp(`\\b(${at.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return mt.replace(Pt,"").trim()}var te=Object.defineProperty,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,ye=(mt,at,Pt)=>at in mt?te(mt,at,{enumerable:!0,configurable:!0,writable:!0,value:Pt}):mt[at]=Pt,we=(mt,at)=>{for(var Pt in at||(at={}))se.call(at,Pt)&&ye(mt,Pt,at[Pt]);if(ce)for(var Pt of ce(at))ge.call(at,Pt)&&ye(mt,Pt,at[Pt]);return mt};const Ce="@\u2581\u2581@",Re="@\u2581@",We=/<pre[^>]*>/g;function lt(mt){let at=document.createElement("div");return at.innerHTML=mt,at.childNodes.length===0?"":at.childNodes[0].nodeValue}const ht=(mt,at)=>{mt=mt||"";const Pt=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Nt=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Et=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ln=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return at?mt.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Pt,(xn,Nn,fn,Qe,Ke,Je,_n)=>{const Xn=Nn||Qe||Je,zt=fn||Ke||_n||"?";return Ve.Z.API_SERVER+"/api/attachments/"+Xn+zt+"&t="+(0,xt.Jn)(Xn,Date.now())+(xn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(mt=mt.replace(Ln,(xn,Nn,fn,Qe,Ke,Je,_n)=>{const Xn=Nn||Qe||Je,zt=fn||Ke||_n||"?";return Ve.Z.API_SERVER+"/attachments/download/"+Xn+zt+"&t="+(0,xt.Jn)(Xn,Date.now())+(xn.indexOf(")")>-1?")":"&")}).replace(Pt,(xn,Nn,fn,Qe,Ke,Je,_n)=>{const Xn=Nn||Qe||Je,zt=fn||Ke||_n||"?";return Ve.Z.API_SERVER+"/api/attachments/"+Xn+zt+"&t="+(0,xt.Jn)(Xn,Date.now())+(xn.indexOf(")")>-1?")":"&")}).replace(Nt,(xn,Nn,fn,Qe,Ke)=>{const Je=Nn||Qe,_n=fn||Ke||"";return'"'+Ve.Z.API_SERVER+"/api/attachments/"+Je+_n+Je+_n+"&t="+(0,xt.Jn)(Je,Date.now())}).replace(Et,(xn,Nn,fn,Qe,Ke)=>{const Je=Nn||Qe,_n=fn||Ke||"";return"("+Ve.Z.API_SERVER+"/files/uploads/"+Je+_n+Je+_n+"&t="+(0,xt.Jn)(Je,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,`
`),mt)};var nt=({value:mt="",className:at,showTextOnly:Pt,showLines:Nt,style:Et={},stylesPrev:Ln={},highlightKeywords:xn,showProgramFill:Nn,isProgramFill:fn,disabledFill:Qe=!1,programFillValue:Ke,onFillChange:Je=zt=>{},onFillBlur:_n=()=>{},onFillFocus:Xn=()=>{}})=>{let zt=ne(String(mt||""));const[kn,bn]=(0,le.useState)(""),[oi,Yt]=(0,le.useState)("office"),[Mt,_t]=(0,le.useState)([]),mn=(0,le.useRef)("a"+(0,pt.Z)()),rn={},He=en=>/<style[\s\S]*?>/i.test(en||""),Me=(en,wi,Si)=>{const Di=document.createElement(en===Re?"input":"textarea");Di.style.width="100%",Di.style.height=en===Re?"40px":"151px",Di.rows=5,Di.spellcheck=!1,Di.name="edu-program-fill",Di.placeholder="\u8BF7\u8F93\u5165",Di.dataset.id=wi;const Ti=Object.keys(rn).length;return rn[Ti]=Di,`<span class="edu-program-fill-wrap ${en===Re?"":"show"}" style="width:${en===Re?"600px":"100%"}" title=${Si||""}><span>${Di.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Fe(en){return en=en.replace(/!\[.*?\]\(.*?\)/g,""),en=en.replace(/\[.*?\]\(.*?\)/g,""),en=en.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),en=en.replace(/<embed.*?>/g,""),en=en.replace(/<img.*?>/g,""),en=en.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),en=en.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),en=en.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),en=en.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),en}const Oe=en=>!Pt&&He(zt)?en:en.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(wi,Si){let Di=Si.replace(/(\n|\r)/g,"").split("}"),Ti=[];return Di.map(ro=>{ro!=""&&Ti.push(`.${mn.current} ${ro}`)}),`<style>${Ti.join("}")}</style>`}),Ue=(0,le.useMemo)(()=>{try{const Di=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ti=/\"\/api\/attachments\/|\"\/attachments\/download\//g,ro=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Zr=/\(\/attachments\/download\//g;zt=zt.replace(Zr,"("+Ve.Z.API_SERVER+"/attachments/download/").replace(Di,"("+Ve.Z.API_SERVER+"/api/attachments/").replace(Ti,'"'+Ve.Z.API_SERVER+"/api/attachments/").replace(ro,'"'+Ve.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(Di){}if(Nn){let Di=-1;return zt=zt.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Ti,ro,Zr){var Fi;return++Di,Me(Ti,Di,(Fi=Ke==null?void 0:Ke[Di])==null?void 0:Fi.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Oe(zt||"")}</pre>`}let en=Oe(zt);en=(0,Lt.ZP)(en);const wi=(0,Lt.ez)();zt.match(/\[TOC\]/)&&(en=en.replace("<p>[TOC]</p>",(0,Lt.Qv)()),(0,Lt.Iy)()),en=en.replace(/(__special_katext_id_\d+__)/g,(Di,Ti)=>{const{type:ro,expression:Zr}=wi[Ti];return(0,ut.renderToString)(lt(Zr)||"",{displayMode:ro==="block",throwOnError:!1,output:"html"})}),en=en.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Lt.AL)();const Si=document.createElement("div");if(Si.innerHTML=en,Pt)return Si.innerText;if(xn){const Di=xn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return ci(Si,Di),Si.innerHTML}return setTimeout(()=>qn(),500),Si.innerHTML},[zt,xn]);(0,le.useEffect)(()=>{si.current&&si.current.querySelectorAll(["input","textarea"]).forEach(wi=>{wi.oninput=Be,wi.onblur=ot,wi.onfocus=Cn})},[Mt]),(0,le.useEffect)(()=>{var en,wi,Si,Di,Ti;if(Ke!=null&&Ke.length)try{const ro=si.current.querySelectorAll(".edu-program-fill-score"),Zr=si.current.querySelectorAll('[name="edu-program-fill"]');for(const[Fi,mi]of Zr.entries())mi.value=((en=Ke==null?void 0:Ke[Fi])==null?void 0:en.value)||"",((wi=Ke==null?void 0:Ke[Fi])==null?void 0:wi.type)==="warning"?mi.className="program-fill-warning":((Si=Ke==null?void 0:Ke[Fi])==null?void 0:Si.type)==="success"?mi.className="program-fill-success":mi.className="";for(const[Fi,mi]of ro.entries())mi.innerHTML=(Di=Ke==null?void 0:Ke[Fi])!=null&&Di.score?`${(Ti=Ke==null?void 0:Ke[Fi])==null?void 0:Ti.score}\u5206`:"";_t(Ke)}catch(ro){console.log(ro,"error")}},[Ke]);const Be=en=>{Mt[en.target.dataset.id]=Mt[en.target.dataset.id]||{},Mt[en.target.dataset.id].value=en.target.value,_t([...Mt]),Je(Mt,en.target.dataset.id)},ot=en=>{Mt[en.target.dataset.id]=Mt[en.target.dataset.id]||{},Mt[en.target.dataset.id].value=en.target.value,_t([...Mt]),_n(Mt,en.target.dataset.id)},Cn=en=>{Mt[en.target.dataset.id]=Mt[en.target.dataset.id]||{},Mt[en.target.dataset.id].value=en.target.value,_t([...Mt]),Xn(Mt,en.target.dataset.id)};function ci(en,wi){return en.childNodes.forEach(Si=>{var Di;if(Si.childNodes.length>0)ci(Si,wi);else if(Si.nodeName!=="IMG")if(Si.innerHTML)Si.innerHTML=(Di=Si.innerHTML)==null?void 0:Di.replace(new RegExp(wi,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ti=document.createElement("span");Ti.innerHTML=Si.textContent.replace(new RegExp(wi,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Si.replaceWith(Ti)}})}const si=(0,le.useRef)();Lt.jb.WebkitLineClamp=Nt,Nt&&(Et=we(we({},Et),Lt.jb));function pn(en){let wi=en.target;if(wi.tagName.toUpperCase()==="A"){let Si=wi.getAttribute("href");if(Si.indexOf("office")>-1)en.preventDefault(),bn(Si),Yt("office");else if(Si.indexOf("application/pdf")>-1)en.preventDefault(),bn(Si),Yt("pdf");else if(Si.indexOf("text/html")>-1)en.preventDefault(),bn(Si),Yt("html");else if(Si.startsWith("#")){en.preventDefault();let Di=document.getElementById(Si.replace("#",""));Di&&Di.scrollIntoView(!0)}}}const qn=()=>{var en;const wi=(en=si.current)==null?void 0:en.querySelectorAll("video");wi==null||wi.forEach(Si=>{if(Si.oncontextmenu=()=>!1,Si.src.indexOf(".m3u8")>-1&&!Si.canPlayType("application/vnd.apple.mpegurl")){if(_e().isSupported()){var Di=new(_e());Di.loadSource(Si.src),Di.attachMedia(Si)}}})};return(0,le.useEffect)(()=>{if(si.current&&Ue&&Ue.match(We)&&window.PR.prettyPrint(),si.current)return si.current.addEventListener("click",pn),()=>{var en;(en=si.current)==null||en.removeEventListener("click",pn),(0,Lt.AL)(),(0,Lt.Iy)()}},[Ue,si.current,pn]),(0,le.useEffect)(()=>{var en;const wi=Si=>{Si.preventDefault(),Si.clipboardData.setData("text",window.getSelection().toString())};return(en=si.current)==null||en.addEventListener("copy",wi),()=>{var Si;(Si=si.current)==null||Si.removeEventListener("copy",wi)}},[si.current]),le.createElement(le.Fragment,null,Pt&&le.createElement("div",{ref:si},Ue),!Pt&&!He(Ue)&&le.createElement("div",{ref:si,style:we({},Et),className:`${at||""} ${Qe?"disabled-fill":""} markdown-body ${mn.current}`,dangerouslySetInnerHTML:{__html:Ue}}),!Pt&&He(Ue)&&le.createElement(Te,{html:Ue}),le.createElement(Rt.Z,{close:!0,data:kn,type:kn!=null&&kn.length?oi:"",style:we({},Ln),onClose:()=>bn("")}))}},48994:function(Rn,$n,be){"use strict";be.d($n,{C:function(){return Ln}});var le=be(67294),Xe={recalculation:"recalculation____i9AE",tips:"tips___GoMu8",filter:"filter___Vx7VO",input:"input___OEMMv",operating:"operating___TS9iA",operatingItem:"operatingItem___AT84q"},Lt=be(94184),At=be.n(Lt),wt=be(84567),_e=be(71230),Ve=be(2453),xt=be(83062),ut=be(85804),pt=be(62844),Rt=be(57399),Ot=be(37720),jt=be(91773),Te=be(74330),ne=be(28706),te=be(33170),ce=be(52262),se=be(63037),ge=be(30001),ye=Object.defineProperty,we=Object.defineProperties,Ce=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,We=Object.prototype.hasOwnProperty,lt=Object.prototype.propertyIsEnumerable,ht=(xn,Nn,fn)=>Nn in xn?ye(xn,Nn,{enumerable:!0,configurable:!0,writable:!0,value:fn}):xn[Nn]=fn,nt=(xn,Nn)=>{for(var fn in Nn||(Nn={}))We.call(Nn,fn)&&ht(xn,fn,Nn[fn]);if(Re)for(var fn of Re(Nn))lt.call(Nn,fn)&&ht(xn,fn,Nn[fn]);return xn},mt=(xn,Nn)=>we(xn,Ce(Nn)),at=(xn,Nn,fn)=>new Promise((Qe,Ke)=>{var Je=zt=>{try{Xn(fn.next(zt))}catch(kn){Ke(kn)}},_n=zt=>{try{Xn(fn.throw(zt))}catch(kn){Ke(kn)}},Xn=zt=>zt.done?Qe(zt.value):Promise.resolve(zt.value).then(Je,_n);Xn((fn=fn.apply(xn,Nn)).next())});const Pt=wt.default.Group,Nt=({className:xn,title:Nn,items:fn=[],value:Qe,onChange:Ke})=>{const Je=(fn==null?void 0:fn.length)===(Qe==null?void 0:Qe.length),_n=(Qe==null?void 0:Qe.length)>0&&(Qe==null?void 0:Qe.length)<(fn==null?void 0:fn.length),Xn=zt=>{const kn=fn.map(bn=>bn.id);Ke(zt.target.checked?kn:[])};return le.createElement(_e.Z,{align:"middle",className:xn},!!Nn&&le.createElement("div",{className:"mr20",style:{color:"#5F6368"}},Nn),le.createElement(wt.default,{indeterminate:_n,onChange:Xn,checked:Je},"\u5168\u90E8"),le.createElement(Pt,{value:Qe,onChange:Ke},fn.map(zt=>le.createElement(wt.default,{className:"ml30 c-black",key:zt.id,value:zt.id},zt.name,le.createElement("span",null,`(${zt.count})`)))))};var Ln=({className:xn,style:Nn,dataSource:fn})=>{var Qe,Ke,Je,_n,Xn,zt,kn;const[bn,oi]=(0,le.useState)({}),[Yt,Mt]=(0,le.useState)(!0),[_t,mn]=(0,le.useState)(!1),[rn,He]=(0,le.useState)(!1),[Me,Fe]=(0,le.useState)(null),[Oe,Ue]=(0,le.useState)(0),[Be,ot]=(0,le.useState)({}),[Cn,ci]=(0,le.useState)(!0),[si,pn]=(0,le.useState)(0),[qn,en]=(0,le.useState)(0),[wi,Si]=(0,le.useState)(!1),Di=(0,le.useRef)(null),[Ti,ro]=(0,le.useState)(!1),[Zr,Fi]=(0,le.useState)(!0),[mi,Co]=(0,le.useState)([]),jn={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},[yn,Jr]=(0,le.useState)(nt({},jn));(0,le.useEffect)(()=>{fn!=null&&fn.question_id&&oi(fn)},[fn==null?void 0:fn.question_id]),(0,le.useEffect)(()=>{var on;if(((on=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:on.status)==="running"){const gn=setInterval(()=>{Nr()},3e3);return()=>clearInterval(gn)}},[(Qe=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:Qe.status]),(0,le.useEffect)(()=>{var on;rn&&(rn===1&&(yn.question_status=Xo.map(gn=>gn.value),yn.review=ji.map(gn=>gn.value)),rn===2&&(yn.exercise_question_resubmit_id=(on=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:on.id,Me===1&&(yn.success_status=[1]),Me===2&&(yn.success_status=[0])),Jr(nt({},yn)),lo(yn),en(bn!=null&&bn.is_mirror?3:10),pn(bn!=null&&bn.is_mirror?1:5))},[rn]),(0,le.useEffect)(()=>{Ti&&hr()},[Ti]);const lo=on=>at(void 0,null,function*(){Mt(!0);const gn=yield(0,te.ZP)(`/api/exercise_questions/${bn==null?void 0:bn.question_id}/resubmit_student_list.json`,{method:"get",params:on});(gn==null?void 0:gn.status)==0&&(ot(gn||[]),Ue(gn==null?void 0:gn.count)),Mt(!1)}),hr=()=>at(void 0,null,function*(){Fi(!0);const on=yield(0,te.ZP)(`/api/exercise_questions/${bn==null?void 0:bn.question_id}/resubmit_history.json`,{method:"get"});(on==null?void 0:on.status)==0&&Co((on==null?void 0:on.data)||[]),Fi(!1)}),Nr=()=>at(void 0,null,function*(){const on=yield(0,te.ZP)(`/api/exercise_questions/${bn==null?void 0:bn.question_id}/resubmit_status.json`,{method:"get"});(on==null?void 0:on.status)==0&&oi(mt(nt({},bn),{show_resubmit_history:!0,exercise_question_resubmit:(on==null?void 0:on.data)||{}}))}),Xo=[{label:"\u672A\u8BC4\u6D4B",value:2,color:"#9096A3"},{label:"\u672A\u901A\u5173",value:0,color:"#E30000"},{label:"\u5DF2\u901A\u5173",value:1,color:"#00B187"}],ji=[{label:"\u672A\u8BC4\u9605",value:0,color:"#9096A3"},{label:"\u8BC4\u9605\u4E2D",value:2,color:"#FF9D18"},{label:"\u5DF2\u8BC4\u9605",value:1,color:"#3061D0"}],Mi=[{label:"\u6210\u529F",value:1,color:"#00B187"},{label:"\u5931\u8D25",value:0,color:"#E30000"}],Oi=[{title:"\u5E8F\u53F7",dataIndex:"key",render:(on,gn,Mn)=>le.createElement("span",{className:"c-black"},Mn+1+(yn.page-1)*yn.per_page)},{title:"\u59D3\u540D",dataIndex:"user_name",render:on=>le.createElement("span",{className:"c-black"},on)},{title:"\u5B66\u53F7",dataIndex:"student_id",sorter:!0,render:on=>le.createElement("span",{className:"c-grey-666"},on||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",render:on=>le.createElement("span",{className:"c-black"},on)},{title:"\u9898\u76EE\u72B6\u6001",dataIndex:"question_status",render:on=>{const{label:gn,color:Mn}=Xo.find(In=>In.value===on)||{};return le.createElement("span",{style:{color:Mn}},gn)}},{title:"\u9898\u76EE\u5F97\u5206",dataIndex:"question_score",sorter:!0,render:on=>le.createElement("span",{className:"c-black"},on)},{title:"\u6700\u7EC8\u6210\u7EE9",dataIndex:"score",sorter:!0,render:on=>le.createElement("span",{className:"c-black"},on)},{title:"\u8BC4\u9605\u72B6\u6001",dataIndex:"review",render:on=>{const{label:gn,color:Mn}=ji.find(In=>In.value===on)||{};return le.createElement("span",{style:{color:Mn}},gn)}},rn===2&&{title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"success_status",render:on=>{const{label:gn,color:Mn}=Mi.find(In=>In.value===on)||{};return le.createElement("span",{style:{color:Mn}},gn)}}].filter(Boolean),vr=(on,gn,Mn)=>{yn.page=on==null?void 0:on.current,yn.per_page=on==null?void 0:on.pageSize,Mn!=null&&Mn.order?(yn.sort_by=Mn==null?void 0:Mn.field,yn.direction=(Mn==null?void 0:Mn.order)==="ascend"?"asc":"desc"):(yn.sort_by=null,yn.direction=null),Jr(nt({},yn)),lo(yn)},Dr=()=>{if(!si){Ve.ZP.warning("\u8BF7\u8F93\u5165\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570");return}Si(!0)},Cr=()=>at(void 0,null,function*(){var on,gn;if((on=Di.current)!=null&&on.onVerify())return;mn(!0);const Mn=yield(0,te.ZP)(`/api/exercise_questions/${bn==null?void 0:bn.question_id}/resubmit.json`,{method:"post",body:{keyword:yn.keyword,question_status:yn.question_status,review:yn.review_status,success_status:yn.success_status,use_max_score:Cn,permits:si,exercise_question_resubmit_id:rn===1?null:(gn=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:gn.id}});(Mn==null?void 0:Mn.status)==0&&(yield Nr(),Ve.ZP.success("\u64CD\u4F5C\u6210\u529F"),Si(!1),He(!1)),mn(!1)}),En=(on,gn)=>{yn.page=1,yn[gn]=on,Jr(nt({},yn)),lo(yn)},Ee=["","\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 le.createElement(le.Fragment,null,le.createElement("div",{className:At()(Xe.recalculation,xn),style:Nn},le.createElement(xt.Z,{title:Ee[(bn==null?void 0:bn.disable_resubmit_reason)||0]},le.createElement(ut.ZP,{disabled:(bn==null?void 0:bn.disable_resubmit)||((Ke=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:Ke.status)==="running",onClick:()=>He(1),icon:le.createElement("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0},"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206")),(bn==null?void 0:bn.show_resubmit_history)&&le.createElement(le.Fragment,null,((Je=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:Je.status)==="running"?le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},(_n=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:_n.rate)):le.createElement("div",{className:"c-grey-666"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{onClick:()=>{He(2),Fe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"}},(Xn=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:Xn.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{onClick:()=>{He(2),Fe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"}},(zt=bn==null?void 0:bn.exercise_question_resubmit)==null?void 0:zt.fail_count),"\u4EBA"),le.createElement(xt.Z,{title:"\u64CD\u4F5C\u8BB0\u5F55"},le.createElement("i",{onClick:()=>ro(!0),className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})))),le.createElement(pt.default,{centered:!0,open:!!rn,title:`\u91CD\u65B0\u8BC4\u6D4B${rn===1?"\u7B97\u5206":"\u7ED3\u679C"}`,width:870,okText:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",onCancel:()=>He(!1),onOk:Dr,afterClose:()=>{ci(!0),Fe(null),Jr(nt({},jn))}},le.createElement("div",{className:Xe.filter},rn===1&&le.createElement(le.Fragment,null,le.createElement("div",{className:Xe.tips},le.createElement("div",{className:"mb5",style:{color:"#FF9D18"}},le.createElement("i",{className:"iconfont icon-tishi9 mr10 font14"}),"\u6E29\u99A8\u63D0\u793A"),le.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"),le.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"),le.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")),le.createElement(Nt,{className:"mt10",title:"\u9898\u76EE\u72B6\u6001",items:(Be==null?void 0:Be.question_status)||[],value:yn.question_status,onChange:on=>En(on,"question_status")}),le.createElement(Nt,{className:"mt10",title:"\u8BC4\u9605\u72B6\u6001",items:(Be==null?void 0:Be.review_status)||[],value:yn.review,onChange:on=>En(on,"review")})),rn===2&&le.createElement(le.Fragment,null,le.createElement(Nt,{className:"mt10",title:"\u91CD\u65B0\u8BC4\u6D4B\u7ED3\u679C",items:(Be==null?void 0:Be.success_status)||[],value:yn.success_status,onChange:on=>En(on,"success_status")})),le.createElement(ge.t7,{className:Xe.input,style:{bottom:rn===1?10:-5},value:yn.keyword,onChange:on=>En(on,"keyword"),placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u6216\u8005\u5B66\u53F7\u641C\u7D22"})),le.createElement(Rt.default,{className:"mt20",columns:Oi,scroll:((kn=Be==null?void 0:Be.data)==null?void 0:kn.length)>7?{y:300}:{},dataSource:(Be==null?void 0:Be.data)||[],loading:Yt,onChange:vr,pagination:{total:Oe,pageSize:yn.per_page,current:yn.page,hideOnSinglePage:!Oe,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:ne.rU}}),le.createElement(_e.Z,{justify:"space-between",align:"middle",className:"mt10"},le.createElement(wt.default,{className:"c-black",checked:Cn,onChange:on=>ci(on.target.checked)},"\u91CD\u65B0\u8BC4\u6D4B\u540E\u7684\u5206\u6570\u5927\u4E8E\u539F\u6765\u7684\u5206\u6570\u624D\u66F4\u65B0\u6210\u7EE9"),(0,ce.Ny)()&&le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4EFB\u52A1\u5E76\u53D1\u4EBA\u6570",le.createElement(Ot.Z,{className:"ml10 mr10",value:si,max:qn,min:1,precision:0,onChange:on=>pn(on)}),"\u4EBA",le.createElement(xt.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"},le.createElement("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"}))))),le.createElement(pt.default,{centered:!0,title:"\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206",open:wi,width:494,zIndex:1001,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",confirmLoading:_t,destroyOnClose:!0,onOk:Cr,onCancel:()=>Si(!1)},le.createElement(jt.default.Item,{className:"mb0",colon:!1,label:"\u9A8C\u8BC1\u7801",name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},le.createElement(se.Z,{ref:on=>Di.current=on}))),le.createElement(pt.default,{centered:!0,title:"\u64CD\u4F5C\u8BB0\u5F55",open:Ti,width:710,onCancel:()=>ro(!1),footer:null},le.createElement(Te.Z,{spinning:Zr},le.createElement("div",{className:Xe.operating},mi.map((on,gn)=>le.createElement("div",{key:gn,className:Xe.operatingItem},le.createElement("div",{style:{flex:"0 0 180px"},className:"c-grey-666"},on==null?void 0:on.created_at),le.createElement("div",{className:"c-black"},on==null?void 0:on.user_name,"\u64CD\u4F5C\u4E86\u91CD\u65B0\u8BC4\u6D4B\u7B97\u5206"),(on==null?void 0:on.status)==="running"?le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u4E2D\uFF0C\u5F53\u524D\u8FDB\u5EA6",le.createElement("span",{className:"c-light-primary ml3"},on==null?void 0:on.rate)):le.createElement("div",{className:"c-black"},"\u91CD\u65B0\u8BC4\u6D4B\u6210\u529F",le.createElement("span",{style:{color:"#3061D0",margin:"0 3px"}},on==null?void 0:on.success_student_count),"\u4EBA\uFF0C\u5931\u8D25",le.createElement("span",{style:{color:"#E30000",margin:"0 3px"}},on==null?void 0:on.fail_count),"\u4EBA")))),le.createElement("div",{style:{height:20}}))))}},96332:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return xt}});var le=be(67294),Xe={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"},Lt=be(62844),At="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",_e=(ut,pt,Rt)=>new Promise((Ot,jt)=>{var Te=ce=>{try{te(Rt.next(ce))}catch(se){jt(se)}},ne=ce=>{try{te(Rt.throw(ce))}catch(se){jt(se)}},te=ce=>ce.done?Ot(ce.value):Promise.resolve(ce.value).then(Te,ne);te((Rt=Rt.apply(ut,pt)).next())}),xt=({type:ut,resdata:pt,onok:Rt,oktext:Ot,okloading:jt})=>{const[Te,ne]=(0,le.useState)(!1),{can_copy_list:te,can_copy_num:ce,challenge_type:se,course_data_list:ge,no_copy_list:ye,no_copy_num:we,no_use_list:Ce,no_use_num:Re,repeat_shixun_num:We,student_count:lt,total_num:ht,use_num:nt}=pt;let mt=ce>0||ut==="exercise";(0,le.useEffect)(()=>{(pt==null?void 0:pt.student_count)>0&&ne(!0)},[pt]),console.log("---11",jt),(0,le.useEffect)(()=>{jt||ne(!1)},[jt]);const at=()=>{if(ut==="exercise"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Xe.orangeColor},nt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Xe.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(ut==="exercise"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Xe.orangeColor},nt),"\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",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="shixun"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BE5\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="shixun"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\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",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="subject"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Xe.orangeColor},nt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="subject"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709 ",le.createElement("span",{className:Xe.orangeColor},lt)," \u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u6311\u6218\u8FC7\u5176\u4E2D\u7684 ",le.createElement("span",{className:Xe.orangeColor},nt)," \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",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u9001\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="exercisepush")return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u5176\u4ED6\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u8BD5\u5377\u4E2D\u7684",le.createElement("span",{className:Xe.orangeColor},nt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE \uFF0C",le.createElement("span",{className:Xe.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(ut==="shixunpush"&&se===1)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u8003\u8BD5\u4E2D\u6311\u6218\u8FC7\u5176\u4E2D\u7684",le.createElement("span",{className:Xe.orangeColor},nt),"\u4E2A\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"));if(ut==="shixunpush"&&se===2)return le.createElement(le.Fragment,null,"\u8BFE\u5802\u5185\u6709",le.createElement("span",{className:Xe.orangeColor},lt),"\u540D\u5B66\u751F\u5DF2\u5728\u8BFE\u5802\u5B9E\u9A8C\u4E2D\u6311\u6218\u8FC7",le.createElement("span",{className:Xe.orangeColor},nt),"\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",le.createElement("span",{className:Xe.redColor},"\u91CD\u590D\u53D1\u5E03\u4F1A\u5BFC\u81F4\u8FD9\u90E8\u5206\u5B66\u751F\u65E0\u6CD5\u518D\u63D0\u4EA4\u4F5C\u4E1A\u3002"))},Pt=()=>{if(ut==="exercise"||ut==="subject"||ut==="exercisepush"||ut==="shixunpush")return le.createElement("div",{style:{marginTop:20}},we>0&&le.createElement("div",null,le.createElement("span",{className:Xe.flex},le.createElement("img",{src:wt,style:{width:14}}),le.createElement("span",{className:Xe.statustitle},"\u4E0D\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:Xe.statusbody},ut==="exercise"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",le.createElement("span",{className:Xe.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"),(ut==="subject"||ut==="exercisepush")&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",mt&&le.createElement("span",{className:Xe.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"),ut==="shixunpush"&&le.createElement("div",{style:{marginBottom:15}},"\u6CA1\u6709\u590D\u5236\u6743\u9650\u7684\u5B9E\u8DF5\u9879\u76EE\uFF0C",mt&&le.createElement("span",{className:Xe.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"),le.createElement("div",null,ye==null?void 0:ye.map((Nt,Et)=>le.createElement("a",{href:`/shixuns/${Nt.identifier}/challenges`,target:"_blank"},"\u300A",Nt==null?void 0:Nt.name,"\u300B",Et+1!==we&&"\u3001"))))),ce>0&&le.createElement("div",{style:{marginTop:20}},le.createElement("span",{className:Xe.flex},le.createElement("img",{src:At,style:{width:14}}),le.createElement("span",{className:Xe.statustitle},"\u652F\u6301\u590D\u5236\u7684\u5B9E\u8DF5\u9879\u76EE")),le.createElement("div",{className:Xe.statusbody},ut==="exercise"&&le.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"),(ut==="subject"||ut==="exercisepush")&&le.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"),ut==="shixunpush"&&le.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"),le.createElement("div",null,te==null?void 0:te.map((Nt,Et)=>le.createElement("a",{href:`/shixuns/${Nt.identifier}/challenges`,target:"_blank"},"\u300A",Nt==null?void 0:Nt.name,"\u300B",Et+1!==ce&&"\u3001"))))));if(ut==="shixun")return le.createElement("div",{style:{marginTop:20}},ce>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 le.createElement(Lt.default,{open:Te,onCancel:()=>{ne(!1)},cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",width:700,centered:!0,cancelButtonProps:{style:{display:!mt&&"none"}},zIndex:1003,confirmLoading:jt,okText:mt?Ot:"\u6211\u77E5\u9053\u4E86",onOk:()=>_e(void 0,null,function*(){mt?yield Rt([...te,...Ce]):ne(!1)})},le.createElement("div",{style:{maxHeight:600,overflow:"auto"}},at(),Pt()))}},2715:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return _e}});var le=be(67294),Xe={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},Lt=be(94184),At=be.n(Lt),_e=({className:Ve,style:xt,state:ut,onClick:pt})=>{var Rt,Ot;return le.createElement("div",{onClick:pt,className:At()(ut?(Rt=Xe)==null?void 0:Rt.redBtn:(Ot=Xe)==null?void 0:Ot.btn,Ve),style:xt},ut?le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaoji1"}),le.createElement("span",null,"\u53D6\u6D88\u6807\u8BB0\u9519\u9898")):le.createElement(le.Fragment,null,le.createElement("i",{className:"iconfont icon-biaojigaiti"}),le.createElement("span",null,"\u6807\u8BB0\u9519\u9898")))}},57444:function(Rn,$n,be){"use strict";be.d($n,{h:function(){return we}});var le=be(67294),Xe=be(88044),Lt=be(91773),At=be(85804),wt=be(4631),_e=be.n(wt),Ve=be(71749),xt=be(30483),ut=Object.defineProperty,pt=Object.defineProperties,Rt=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,jt=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,ne=(Ce,Re,We)=>Re in Ce?ut(Ce,Re,{enumerable:!0,configurable:!0,writable:!0,value:We}):Ce[Re]=We,te=(Ce,Re)=>{for(var We in Re||(Re={}))jt.call(Re,We)&&ne(Ce,We,Re[We]);if(Ot)for(var We of Ot(Re))Te.call(Re,We)&&ne(Ce,We,Re[We]);return Ce},ce=(Ce,Re)=>pt(Ce,Rt(Re));const se=Xe.default.Option,ge={labelCol:{span:4},wrapperCol:{span:20}},ye={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"]};$n.Z=({callback:Ce,onCancel:Re})=>{const[We,lt]=(0,le.useState)("python");function ht(mt){lt(ye[mt][1])}function nt(mt){Ce(mt)}return le.createElement(Lt.default,ce(te({},ge),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:nt,style:{width:500}}),le.createElement(Lt.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},le.createElement(Xe.default,{getPopupContainer:mt=>mt.parentNode,onChange:ht},Object.keys(ye).map(mt=>le.createElement(se,{key:mt,value:mt},ye[mt][0])))),le.createElement(Lt.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},le.createElement(we,{mode:We})),le.createElement("div",{className:"flex-container flex-end"},le.createElement(At.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(At.ZP,{type:"ghost",onClick:Re},"\u53D6\u6D88")))};function we({value:Ce,onChange:Re,mode:We,options:lt={}}){const ht=(0,le.useRef)(),[nt,mt]=(0,le.useState)();return(0,le.useEffect)(()=>{if(nt){let at=function(Pt){const Nt=Pt.getValue();Re&&Re(Nt)};return nt.on("change",at),()=>{nt.off("change",at)}}},[nt,Re]),(0,le.useEffect)(()=>{nt&&nt.setOption("mode",We)},[nt,We]),(0,le.useEffect)(()=>{nt&&(Ce!==nt.getValue()||Ce==="")&&setTimeout(()=>{nt.setValue(Ce||"")},300)},[nt,Ce]),(0,le.useEffect)(()=>{if(ht.current&&!nt){const at=_e().fromTextArea(ht.current,te({mode:We,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},lt));mt(at)}},[ht.current,nt]),le.createElement("div",{className:"my-codemirror-container"},le.createElement("textarea",{ref:ht}))}},35567:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Ji}});var le=be(67294),Xe=be(4631),Lt=be.n(Xe),At=be(91033),wt=be(71749),_e=be(57341),Ve=be(82801),xt=be(88386),ut=be(49047),pt=be(80785),Rt=be(65226),Ot=({value:Vt="",className:Zt,showTextOnly:It,showLines:dn,style:Ri={}})=>{const hi=(0,le.useMemo)(()=>"",[Vt]);return le.createElement(le.Fragment,null,le.createElement("div",{dangerouslySetInnerHTML:{__html:hi}}))},jt=Object.defineProperty,Te=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,ce=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,ge=(Vt,Zt,It)=>Zt in Vt?jt(Vt,Zt,{enumerable:!0,configurable:!0,writable:!0,value:It}):Vt[Zt]=It,ye=(Vt,Zt)=>{for(var It in Zt||(Zt={}))ce.call(Zt,It)&&ge(Vt,It,Zt[It]);if(te)for(var It of te(Zt))se.call(Zt,It)&&ge(Vt,It,Zt[It]);return Vt},we=(Vt,Zt)=>Te(Vt,ne(Zt));let Ce=[{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 Re({onActionCallback:Vt,title:Zt,icon:It,actionName:dn,className:Ri="",children:hi}){function ri(){Vt(dn)}return le.createElement("a",{title:Zt,className:Ri,onClick:ri},le.createElement("i",{className:`${It}`}),hi)}var We=({watch:Vt,showNullButton:Zt,showNullProgramButton:It,onActionCallback:dn,fullScreen:Ri,insertTemp:hi,hidetoolBar:ri,extraUse:Kt})=>{const wn=[...Ce,{title:`${Vt?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Vt?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return le.createElement("ul",{className:"markdown-toolbar-container"},!ri&&wn.map((Ki,wr)=>le.createElement("li",{key:wr},Ki.actionName?le.createElement(Re,we(ye({},Ki),{onActionCallback:dn})):le.createElement("span",{className:"v-line"}))),Zt?le.createElement("li",null,le.createElement(Re,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:dn},le.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,It?le.createElement(le.Fragment,null,le.createElement("li",null,le.createElement(Re,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:dn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),le.createElement("li",null,le.createElement(Re,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:dn},le.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,hi&&le.createElement("li",null,le.createElement(Re,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${hi}`,onActionCallback:dn},le.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),Kt&&le.createElement("li",null,Kt),le.createElement("li",{className:"btn-full-screen"},le.createElement(Re,{icon:`${Ri?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ri?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:dn})))},lt=be(76621),ht=be(91773),nt=be(28802),mt=be(85804),at=Object.defineProperty,Pt=Object.defineProperties,Nt=Object.getOwnPropertyDescriptors,Et=Object.getOwnPropertySymbols,Ln=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,Nn=(Vt,Zt,It)=>Zt in Vt?at(Vt,Zt,{enumerable:!0,configurable:!0,writable:!0,value:It}):Vt[Zt]=It,fn=(Vt,Zt)=>{for(var It in Zt||(Zt={}))Ln.call(Zt,It)&&Nn(Vt,It,Zt[It]);if(Et)for(var It of Et(Zt))xn.call(Zt,It)&&Nn(Vt,It,Zt[It]);return Vt},Qe=(Vt,Zt)=>Pt(Vt,Nt(Zt));const Ke={labelCol:{span:4},wrapperCol:{span:20}};var Je=({callback:Vt,onCancel:Zt})=>{function It(dn){Vt(dn)}return le.createElement(ht.default,Qe(fn({},Ke),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:It,style:{width:500}}),le.createElement(ht.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},le.createElement(nt.default,null)),le.createElement(ht.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},le.createElement(nt.default,null)),le.createElement("div",{className:"flex-container flex-end"},le.createElement(mt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(mt.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},_n=be(57444),Xn=be(70859),zt=be(62844),kn=be(71230),bn=be(63205),oi=be(67294),Yt=({callback:Vt,onCancel:Zt})=>{const It=document.createElement("canvas"),dn=It.getContext("2d");It.width=1e3,It.height=800,dn.fillStyle="#ffffff",dn.fillRect(0,0,It.width,It.height);const Ri=It.toDataURL("image/png");return oi.createElement(zt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},oi.createElement(kn.Z,{style:{height:"100vh"}},oi.createElement(bn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ri,visible:!0,title:String(Date.now())},onOk:hi=>{Vt({src:hi.url})},onClose:Zt})))},Mt=be(23495);function _t(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(_t,go.CommandHandler),_t.prototype.canAlignSelection=function(){var Vt=this.diagram;return!(Vt===null||Vt.isReadOnly||Vt.isModelReadOnly||Vt.selection.count<2)},_t.prototype.alignLeft=function(){var Vt=this.diagram;Vt.startTransaction("aligning left");var Zt=1/0;Vt.selection.each(function(It){It instanceof go.Link||(Zt=Math.min(It.position.x,Zt))}),Vt.selection.each(function(It){It instanceof go.Link||It.move(new go.Point(Zt,It.position.y))}),Vt.commitTransaction("aligning left")},_t.prototype.alignRight=function(){var Vt=this.diagram;Vt.startTransaction("aligning right");var Zt=-1/0;Vt.selection.each(function(It){if(!(It instanceof go.Link)){var dn=It.actualBounds.x+It.actualBounds.width;Zt=Math.max(dn,Zt)}}),Vt.selection.each(function(It){It instanceof go.Link||It.move(new go.Point(Zt-It.actualBounds.width,It.position.y))}),Vt.commitTransaction("aligning right")},_t.prototype.alignTop=function(){var Vt=this.diagram;Vt.startTransaction("alignTop");var Zt=1/0;Vt.selection.each(function(It){It instanceof go.Link||(Zt=Math.min(It.position.y,Zt))}),Vt.selection.each(function(It){It instanceof go.Link||It.move(new go.Point(It.position.x,Zt))}),Vt.commitTransaction("alignTop")},_t.prototype.alignBottom=function(){var Vt=this.diagram;Vt.startTransaction("aligning bottom");var Zt=-1/0;Vt.selection.each(function(It){if(!(It instanceof go.Link)){var dn=It.actualBounds.y+It.actualBounds.height;Zt=Math.max(dn,Zt)}}),Vt.selection.each(function(It){It instanceof go.Link||It.move(new go.Point(It.actualBounds.x,Zt-It.actualBounds.height))}),Vt.commitTransaction("aligning bottom")},_t.prototype.alignCenterX=function(){var Vt=this.diagram,Zt=Vt.selection.first();if(Zt){Vt.startTransaction("aligning Center X");var It=Zt.actualBounds.x+Zt.actualBounds.width/2;Vt.selection.each(function(dn){dn instanceof go.Link||dn.move(new go.Point(It-dn.actualBounds.width/2,dn.actualBounds.y))}),Vt.commitTransaction("aligning Center X")}},_t.prototype.alignCenterY=function(){var Vt=this.diagram,Zt=Vt.selection.first();if(Zt){Vt.startTransaction("aligning Center Y");var It=Zt.actualBounds.y+Zt.actualBounds.height/2;Vt.selection.each(function(dn){dn instanceof go.Link||dn.move(new go.Point(dn.actualBounds.x,It-dn.actualBounds.height/2))}),Vt.commitTransaction("aligning Center Y")}},_t.prototype.alignColumn=function(Vt){var Zt=this.diagram;Zt.startTransaction("align Column"),Vt===void 0&&(Vt=0),Vt=parseFloat(Vt);var It=new Array;Zt.selection.each(function(Kt){Kt instanceof go.Link||It.push(Kt)});for(var dn=0;dn<It.length-1;dn++){var Ri=It[dn],hi=Ri.actualBounds.y+Ri.actualBounds.height+Vt,ri=It[dn+1];ri.move(new go.Point(Ri.actualBounds.x,hi))}Zt.commitTransaction("align Column")},_t.prototype.alignRow=function(Vt){Vt===void 0&&(Vt=0),Vt=parseFloat(Vt);var Zt=this.diagram;Zt.startTransaction("align Row");var It=new Array;Zt.selection.each(function(Kt){Kt instanceof go.Link||It.push(Kt)});for(var dn=0;dn<It.length-1;dn++){var Ri=It[dn],hi=Ri.actualBounds.x+Ri.actualBounds.width+Vt,ri=It[dn+1];ri.move(new go.Point(hi,Ri.actualBounds.y))}Zt.commitTransaction("align Row")},_t.prototype.canRotate=function(Vt){var Zt=this.diagram;return!(Zt===null||Zt.isReadOnly||Zt.isModelReadOnly||Zt.selection.count<1)},_t.prototype.rotate=function(Vt){Vt===void 0&&(Vt=90);var Zt=this.diagram;Zt.startTransaction("rotate "+Vt.toString());var Zt=this.diagram;Zt.selection.each(function(It){It instanceof go.Link||It instanceof go.Group||(It.angle+=Vt)}),Zt.commitTransaction("rotate "+Vt.toString())},_t.prototype.pullToFront=function(){var Vt=this.diagram;Vt.startTransaction("pullToFront");var Zt=new go.Map;Vt.selection.each(function(It){Zt.set(It.layer,0)}),Zt.iteratorKeys.each(function(It){var dn=0;It.parts.each(function(Ri){if(!Ri.isSelected){var hi=Ri.zOrder;isNaN(hi)?Ri.zOrder=0:dn=Math.max(dn,hi)}}),Zt.set(It,dn)}),Vt.selection.each(function(It){_t._assignZOrder(It,Zt.get(It.layer)+1)}),Vt.commitTransaction("pullToFront")},_t.prototype.pushToBack=function(){var Vt=this.diagram;Vt.startTransaction("pushToBack");var Zt=new go.Map;Vt.selection.each(function(It){Zt.set(It.layer,0)}),Zt.iteratorKeys.each(function(It){var dn=0;It.parts.each(function(Ri){if(!Ri.isSelected){var hi=Ri.zOrder;isNaN(hi)?Ri.zOrder=0:dn=Math.min(dn,hi)}}),Zt.set(It,dn)}),Vt.selection.each(function(It){_t._assignZOrder(It,Zt.get(It.layer)-1-_t._findGroupDepth(It))}),Vt.commitTransaction("pushToBack")},_t._assignZOrder=function(Vt,Zt,It){It===void 0&&(It=Vt),Vt.layer===It.layer&&(Vt.zOrder=Zt),Vt instanceof go.Group&&Vt.memberParts.each(function(dn){_t._assignZOrder(dn,Zt+1,It)})},_t._findGroupDepth=function(Vt){if(Vt instanceof go.Group){var Zt=0;return Vt.memberParts.each(function(It){Zt=Math.max(Zt,_t._findGroupDepth(It))}),Zt+1}else return 0},_t.prototype.doKeyDown=function(){var Vt=this.diagram;if(Vt!==null){var Zt=Vt.lastInput;if(Zt.key==="Up"||Zt.key==="Down"||Zt.key==="Left"||Zt.key==="Right"){var It=this.arrowKeyBehavior;if(It==="none")return;if(It==="select"){this._arrowKeySelect();return}else if(It==="move"){this._arrowKeyMove();return}else if(It==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},_t.prototype._getAllParts=function(){var Vt=new Array;return this.diagram.nodes.each(function(Zt){Vt.push(Zt)}),this.diagram.parts.each(function(Zt){Vt.push(Zt)}),Vt},_t.prototype._arrowKeyMove=function(){var Vt=this.diagram,Zt=Vt.lastInput,It=0,dn=0;if(Zt.control||Zt.meta)It=1,dn=1;else if(Vt.grid!==null){var Ri=Vt.grid.gridCellSize;dn=Ri.width,It=Ri.height}Vt.startTransaction("arrowKeyMove"),Vt.selection.each(function(hi){Zt.key==="Up"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y-It)):Zt.key==="Down"?hi.move(new go.Point(hi.actualBounds.x,hi.actualBounds.y+It)):Zt.key==="Left"?hi.move(new go.Point(hi.actualBounds.x-dn,hi.actualBounds.y)):Zt.key==="Right"&&hi.move(new go.Point(hi.actualBounds.x+dn,hi.actualBounds.y))}),Vt.commitTransaction("arrowKeyMove")},_t.prototype._arrowKeySelect=function(){var Vt=this.diagram,Zt=Vt.lastInput,It=null;Zt.key==="Up"?It=this._findNearestPartTowards(270):Zt.key==="Down"?It=this._findNearestPartTowards(90):Zt.key==="Left"?It=this._findNearestPartTowards(180):Zt.key==="Right"&&(It=this._findNearestPartTowards(0)),It!==null&&(Zt.shift?It.isSelected=!0:Zt.control||Zt.meta?It.isSelected=!It.isSelected:Vt.select(It))},_t.prototype._findNearestPartTowards=function(Vt){var Zt=this.diagram.selection.first();if(Zt===null)return null;for(var It=Zt.actualBounds.center,dn=this._getAllParts(),Ri=1/0,hi=Zt,ri=0;ri<dn.length;ri++){var Kt=dn[ri];if(Kt!==Zt&&Kt.canSelect()){var wn=Kt.actualBounds.center,Ki=It.directionPoint(wn),wr=this._angleCloseness(Ki,Vt);if(wr<=45){var Kn=It.distanceSquaredPoint(wn);Kn*=1+Math.sin(wr*Math.PI/180),Kn<Ri&&(Ri=Kn,hi=Kt)}}}return hi},_t.prototype._angleCloseness=function(Vt,Zt){return Math.min(Math.abs(Zt-Vt),Math.min(Math.abs(Zt+360-Vt),Math.abs(Zt-360-Vt)))},_t.prototype._arrowKeyTree=function(){var Vt=this.diagram,Zt=Vt.selection.first();if(Zt instanceof go.Node){var It=Vt.lastInput;if(It.key==="Right"){if(!Zt.isTreeLeaf)if(!Zt.isTreeExpanded)Vt.commandHandler.canExpandTree(Zt)&&Vt.commandHandler.expandTree(Zt);else{var dn=this._sortTreeChildrenByY(Zt).first();dn!==null&&Vt.select(dn)}}else if(It.key==="Left")if(!Zt.isTreeLeaf&&Zt.isTreeExpanded)Vt.commandHandler.canCollapseTree(Zt)&&Vt.commandHandler.collapseTree(Zt);else{var Ri=Zt.findTreeParentNode();Ri!==null&&Vt.select(Ri)}else if(It.key==="Up"){var Ri=Zt.findTreeParentNode();if(Ri!==null){var hi=this._sortTreeChildrenByY(Ri),ri=hi.indexOf(Zt);if(ri>0){for(var Kt=hi.elt(ri-1);Kt!==null&&Kt.isTreeExpanded&&!Kt.isTreeLeaf;){var wn=this._sortTreeChildrenByY(Kt);Kt=wn.last()}Kt!==null&&Vt.select(Kt)}else Vt.select(Ri)}}else if(It.key==="Down")if(Zt.isTreeExpanded&&!Zt.isTreeLeaf){var dn=this._sortTreeChildrenByY(Zt).first();dn!==null&&Vt.select(dn)}else for(;Zt!==null;){var Ri=Zt.findTreeParentNode();if(Ri===null)break;var hi=this._sortTreeChildrenByY(Ri),ri=hi.indexOf(Zt);if(ri<hi.length-1){Vt.select(hi.elt(ri+1));break}else Zt=Ri}var Ki=Vt.selection.first();Ki!==null&&Vt.scrollToRect(Ki.actualBounds)}},_t.prototype._sortTreeChildrenByY=function(Vt){var Zt=new go.List().addAll(Vt.findTreeChildrenNodes());return Zt.sort(function(It,dn){var Ri=It.location,hi=dn.location;return Ri.y<hi.y?-1:Ri.y>hi.y?1:Ri.x<hi.x?-1:Ri.x>hi.x?1:0}),Zt},_t.prototype.copyToClipboard=function(Vt){go.CommandHandler.prototype.copyToClipboard.call(this,Vt),this._lastPasteOffset.set(this.pasteOffset)},_t.prototype.pasteFromClipboard=function(){var Vt=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(Vt,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),Vt},Object.defineProperty(_t.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(Vt){if(Vt!=="move"&&Vt!=="select"&&Vt!=="scroll"&&Vt!=="tree"&&Vt!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+Vt);this._arrowKeyBehavior=Vt}}),Object.defineProperty(_t.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(Vt){if(!(Vt instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+Vt);this._pasteOffset.set(Vt)}});var mn=_t,rn=be(18023),He=be(15746),Me=be(33170),Fe={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},Oe=be(52262),Ue=be(67294),Be=(Vt,Zt,It)=>new Promise((dn,Ri)=>{var hi=wn=>{try{Kt(It.next(wn))}catch(Ki){Ri(Ki)}},ri=wn=>{try{Kt(It.throw(wn))}catch(Ki){Ri(Ki)}},Kt=wn=>wn.done?dn(wn.value):Promise.resolve(wn.value).then(hi,ri);Kt((It=It.apply(Vt,Zt)).next())});function ot({onCancel:Vt,callback:Zt}){let It=(0,le.useRef)(),dn=(0,le.useRef)(),Ri=(0,le.useRef)(),hi=(0,le.useRef)(!1);const ri=(0,le.useRef)(!1),[Kt,wn]=(0,le.useState)(0);function Ki(){const Kn=Mt.bx.make,Wt={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"};It.current=new Mt.S0(dn.current,{padding:20,grid:Kn(Mt.s_,"Grid",Kn(Mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Kn(Mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Qt=>{var Br=Qt.diagram.commandHandler.addTopLevelParts(Qt.diagram.selection,!0);Br||Qt.diagram.currentTool.doCancel()},commandHandler:Kn(mn),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Qt=>{var Br=Qt.subject;Br.location=Br.location.copy().snapToGridPoint(Qt.diagram.grid.gridOrigin,Qt.diagram.grid.gridCellSize),setTimeout(()=>{Qt.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Qt=>{var Br=Qt.subject;setTimeout(()=>{Qt.diagram.commandHandler.editTextBlock()})},LinkRelinked:Qt=>{var Br=Qt.parameter.part;Br.invalidateConnectedLinks();var ba=Qt.subject;Qt.diagram.toolManager.linkingTool.isForwards?ba.toNode.invalidateConnectedLinks():ba.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),It.current.nodeTemplate=Kn(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),Kn(Mt.bn,{name:"SHAPE",fill:Wt.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")),Kn(Mt.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),Kn(Mt.al,{margin:1,textAlign:"center",overflow:Mt.al.OverflowEllipsis,editable:!0},new Mt.KX("text").makeTwoWay(),new Mt.KX("stroke","color"))),It.current.nodeTemplate.toolTip=Kn("ToolTip",Kn(Mt.s_,"Vertical",{maxSize:new Mt.$u(200,NaN)},Kn(Mt.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Mt.KX("text")),Kn(Mt.al,{font:"10pt sans-serif",textAlign:"center"},new Mt.KX("text","details"))));function Yi(Qt,Br){var ba=(to,vs)=>{to.handled=!0,to.diagram.model.commit(La=>{var Za=vs.part.adornedPart,wa=new Mt.E9().setRectSpot(Za.actualBounds,Qt);wa.subtract(Za.location),wa.scale(2,2),wa.x+=Math.sign(wa.x)*130,wa.y+=Math.sign(wa.y)*130,wa.add(Za.location),wa.snapToGridPoint(to.diagram.grid.gridOrigin,to.diagram.grid.gridCellSize);var ca=La.copyNodeData(Za.data);La.setGroupKeyForNodeData(ca,La.getGroupKeyForNodeData(Za.data)),La.addNodeData(ca);var Ya={from:Za.key,to:La.getKeyForNodeData(ca)};La.addLinkData(Ya);var Un=to.diagram.findNodeForData(ca);Un.location=wa,to.diagram.select(Un),setTimeout(()=>{to.diagram.commandHandler.editTextBlock()},20)})};return Kn(Mt.bn,{figure:Br,alignment:Qt,alignmentFocus:Qt.opposite(),width:Qt.equals(Mt.z6.Top)||Qt.equals(Mt.z6.Bottom)?25:18,height:Qt.equals(Mt.z6.Top)||Qt.equals(Mt.z6.Bottom)?18:25,fill:"orange",stroke:Wt.white,strokeWidth:4,mouseEnter:(to,vs)=>vs.fill="dodgerblue",mouseLeave:(to,vs)=>vs.fill="orange",isActionable:!0,click:ba,contextClick:ba})}function pr(Qt){return Kn(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:(Br,ba)=>ba.fill="dodgerblue",mouseLeave:(Br,ba)=>ba.fill="orange",click:(Br,ba)=>{Br.diagram.commandHandler.showContextMenu(ba.part.adornedPart)}},Qt||{})}It.current.nodeTemplate.selectionAdornmentTemplate=Kn(Mt.uz,"Spot",Kn(Mt.Vm,{padding:10}),Yi(Mt.z6.Top,"TriangleUp"),Yi(Mt.z6.Left,"TriangleLeft"),Yi(Mt.z6.Right,"TriangleRight"),Yi(Mt.z6.Bottom,"TriangleDown"),pr({alignment:new Mt.z6(.75,0)}));function Ro(Qt,Br){return(ba,to)=>{ba.handled=!0,ba.diagram.model.commit(vs=>{vs.set(to.part.adornedPart.data,Qt,Br)})}}function Zn(Qt,Br){return Br||(Br="color"),Kn(Mt.bn,{width:16,height:16,stroke:"lightgray",fill:Qt,margin:1,background:"transparent",mouseEnter:(ba,to)=>to.stroke="dodgerblue",mouseLeave:(ba,to)=>to.stroke="lightgray",click:Ro(Br,Qt),contextClick:Ro(Br,Qt)})}function Ni(){return[Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",Zn(Wt.white,"fill"),Zn(Wt.beige,"fill"),Zn(Wt.extralightblue,"fill"),Zn(Wt.extralightred,"fill"))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",Zn(Wt.lightgray,"fill"),Zn(Wt.lightgreen,"fill"),Zn(Wt.lightblue,"fill"),Zn(Wt.lightred,"fill")))]}function Pi(){return[Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",Zn(Wt.black),Zn(Wt.green),Zn(Wt.blue),Zn(Wt.red))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",Zn(Wt.white),Zn(Wt.magenta),Zn(Wt.purple),Zn(Wt.orange)))]}function xs(Qt,Br){return Br||(Br="thickness"),Kn(Mt.bn,"LineH",{width:16,height:16,strokeWidth:Qt,margin:1,background:"transparent",mouseEnter:(ba,to)=>to.background="dodgerblue",mouseLeave:(ba,to)=>to.background="transparent",click:Ro(Br,Qt),contextClick:Ro(Br,Qt)})}function qa(Qt,Br){return Br||(Br="dash"),Kn(Mt.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Qt,margin:1,background:"transparent",mouseEnter:(ba,to)=>to.background="dodgerblue",mouseLeave:(ba,to)=>to.background="transparent",click:Ro(Br,Qt),contextClick:Ro(Br,Qt)})}function Ar(){return[Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",xs(1),xs(2),xs(3),xs(4))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",qa(null),qa([2,4]),qa([4,4])))]}function br(Qt,Br){return Br||(Br="figure"),Kn(Mt.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Qt,margin:1,background:"transparent",mouseEnter:(ba,to)=>to.fill="dodgerblue",mouseLeave:(ba,to)=>to.fill="lightgray",click:Ro(Br,Qt),contextClick:Ro(Br,Qt)})}It.current.nodeTemplate.contextMenu=Kn("ContextMenu",Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",br("Rectangle"),br("RoundedRectangle"),br("Ellipse"),br("Diamond"))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",br("Parallelogram2"),br("ManualOperation"),br("Procedure"),br("Cylinder1"))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",br("Terminator"),br("CreateRequest"),br("Document"),br("TriangleDown"))),Ni(),Pi(),Ar()),It.current.groupTemplate=Kn(Mt.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Mt.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Qt,Br)=>{var ba=Br.addMembers(Br.diagram.selection,!0);ba||Br.diagram.currentTool.doCancel()},avoidable:!1},new Mt.KX("location","loc",Mt.E9.parse).makeTwoWay(Mt.E9.stringify),Kn(Mt.s_,"Auto",{name:"BODY"},Kn(Mt.bn,{parameter1:10,fill:Wt.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")),Kn(Mt.Vm,{background:"transparent",margin:20})),Kn(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"))),It.current.groupTemplate.selectionAdornmentTemplate=Kn(Mt.uz,"Spot",Kn(Mt.s_,"Auto",Kn(Mt.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),Kn(Mt.Vm,{margin:1.5})),pr({alignment:Mt.z6.TopRight,alignmentFocus:Mt.z6.BottomRight})),It.current.groupTemplate.contextMenu=Kn("ContextMenu",Ni(),Pi(),Ar()),It.current.linkTemplate=Kn(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",Qt=>Qt>=1?10:0),new Mt.KX("toShortLength","dir",Qt=>Qt>=1?10:0),new Mt.KX("points").makeTwoWay(),Kn(Mt.bn,{strokeWidth:2},new Mt.KX("stroke","color"),new Mt.KX("strokeWidth","thickness"),new Mt.KX("strokeDashArray","dash")),Kn(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",Qt=>Qt===1)),Kn(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",Qt=>Qt>=1),new Mt.KX("width","thickness",Qt=>7+3*Qt),new Mt.KX("height","thickness",Qt=>7+3*Qt),new Mt.KX("segmentOffset","thickness",Qt=>new Mt.E9(-15,4+1.5*Qt))),Kn(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",Qt=>Qt===2),new Mt.KX("width","thickness",Qt=>7+3*Qt),new Mt.KX("height","thickness",Qt=>7+3*Qt),new Mt.KX("segmentOffset","thickness",Qt=>new Mt.E9(-15,4+1.5*Qt))),Kn(Mt.al,{alignmentFocus:new Mt.z6(0,1,-4,0),editable:!0},new Mt.KX("text").makeTwoWay(),new Mt.KX("stroke","color"))),It.current.linkTemplate.selectionAdornmentTemplate=Kn(Mt.uz,Kn(Mt.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:Rr(2)},new Mt.KX("pathPattern","thickness",Rr)),pr({alignmentFocus:new Mt.z6(0,0,-6,-4)}));function Rr(Qt){return Kn(Mt.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Qt+4).toString()+" H3"})}function xa(Qt){var Br="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Qt===0?Br="M0 0 M16 16 M0 8 L16 8":Qt===2&&(Br="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),Kn(Mt.bn,{geometryString:Br,margin:2,background:"transparent",mouseEnter:(ba,to)=>to.background="dodgerblue",mouseLeave:(ba,to)=>to.background="transparent",click:Ro("dir",Qt),contextClick:Ro("dir",Qt)})}function Ka(Qt){var Br=(ba,to)=>{ba.handled=!0,ba.diagram.model.commit(vs=>{var La=to.part.adornedPart;vs.set(La.data,Qt?"toSpot":"fromSpot",Mt.z6.stringify(Mt.z6.AllSides)),(Qt?La.toNode:La.fromNode).invalidateConnectedLinks()})};return Kn(Mt.bn,{width:12,height:12,fill:"transparent",mouseEnter:(ba,to)=>to.background="dodgerblue",mouseLeave:(ba,to)=>to.background="transparent",click:Br,contextClick:Br})}function _i(Qt,Br){var ba=0,to=Mt.z6.RightSide;Qt.equals(Mt.z6.Top)?(ba=270,to=Mt.z6.TopSide):Qt.equals(Mt.z6.Left)?(ba=180,to=Mt.z6.LeftSide):Qt.equals(Mt.z6.Bottom)&&(ba=90,to=Mt.z6.BottomSide),Br||(ba-=180);var vs=(La,Za)=>{La.handled=!0,La.diagram.model.commit(wa=>{var ca=Za.part.adornedPart;wa.set(ca.data,Br?"toSpot":"fromSpot",Mt.z6.stringify(to)),(Br?ca.toNode:ca.fromNode).invalidateConnectedLinks()})};return Kn(Mt.bn,{alignment:Qt,alignmentFocus:Qt.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:ba,background:"transparent",mouseEnter:(La,Za)=>Za.background="dodgerblue",mouseLeave:(La,Za)=>Za.background="transparent",click:vs,contextClick:vs})}It.current.linkTemplate.contextMenu=Kn("ContextMenu",Pi(),Ar(),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",xa(0),xa(1),xa(2))),Kn("ContextMenuButton",Kn(Mt.s_,"Horizontal",Kn(Mt.s_,"Spot",Ka(!1),_i(Mt.z6.Top,!1),_i(Mt.z6.Left,!1),_i(Mt.z6.Right,!1),_i(Mt.z6.Bottom,!1)),Kn(Mt.s_,"Spot",{margin:new Mt.Zt(0,0,0,2)},Ka(!0),_i(Mt.z6.Top,!0),_i(Mt.z6.Left,!0),_i(Mt.z6.Right,!0),_i(Mt.z6.Bottom,!0)))));const yo=`{ "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 zl=["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 ms(Qt){return console.log("shapeName:",Qt),zl.indexOf(Qt)>=0}var as=new Mt.YI(Ri.current,{maxSelectionCount:1,linkTemplate:Kn(Mt.rU,{locationSpot:Mt.z6.Center,selectionAdornmentTemplate:Kn(Mt.uz,"Link",{locationSpot:Mt.z6.Center},Kn(Mt.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),Kn(Mt.bn,{toArrow:"Standard",stroke:null}))},{routing:Mt.rU.AvoidsNodes,curve:Mt.rU.JumpOver,corner:5,toShortLength:4},new Mt.KX("points"),Kn(Mt.bn,{isPanelMain:!0,strokeWidth:2}),Kn(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(Qt=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Qt.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return It.current.addDiagramListener("TextEdited",function(Qt){var Br;const ba=Qt.subject.part;var to=(Br=document.activeElement)==null?void 0:Br.value;typeof to=="string"&&to.trim()===""&&It.current.model.commit(function(vs){vs.set(ba.data,"text","\u672A\u547D\u540D"),It.current.commandHandler.stopCommand()},"increment")}),as.nodeTemplate=Kn(Mt.NB,"Auto",{locationSpot:Mt.z6.Center},new Mt.KX("location","location",Mt.E9.parse).makeTwoWay(Mt.E9.stringify),Kn(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")),Kn(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(()=>{It.current.grid=Kn(Mt.s_,"Grid",Kn(Mt.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),Kn(Mt.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),It.current.grid.visible=!0,It.current.grid.gridCellStroke="darkgray",It.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=It.current,It.current}const wr=()=>Be(this,null,function*(){var Kn,Wt=It.current.makeImage();const Yi=yield(0,Me.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:Wt.src,file_data:JSON.stringify({login:(Kn=(0,Oe.eY)())==null?void 0:Kn.login,data:JSON.parse(It.current.model.toJson())})}});Zt({src:Yi.url})});return(0,le.useEffect)(()=>(setTimeout(()=>{Ki()},500),wn(Kt+1),()=>{It.current=null}),[]),Ue.createElement("div",{ref:ri,className:"body-overflow-initial"},Ue.createElement(zt.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!Kt,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Ue.createElement(kn.Z,null,Ue.createElement(He.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ue.createElement(He.Z,{onClick:()=>{var Kn,Wt,Yi=It.current.selection.first();if(hi.current=!hi.current,document.activeElement&&Yi){let pr=(Wt=(Kn=document.activeElement)==null?void 0:Kn.value)==null?void 0:Wt.trim();typeof pr=="string"&&It.current.model.commit(function(Ro){Ro.set(Yi.data,"text",pr||"\u672A\u547D\u540D"),It.current.commandHandler.stopCommand()},"increment")}wn(Kt+1)}},Ue.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:Vt},Ue.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:hi.current?"none":"block"},className:Fe.flowChartWrp},Ue.createElement("div",{style:{display:"flex",height:"100%"}},Ue.createElement("div",{style:{width:"300px",height:"100%"}},Ue.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Ue.createElement("div",{style:{height:"calc(100% - 50px)"},className:Fe.myPaletteDiv,ref:Ri})),Ue.createElement("div",{style:{flex:1,position:"relative"}},Ue.createElement("div",{ref:dn,style:{height:"80vh"}}))),Ue.createElement("div",{className:"tr"},Ue.createElement(mt.ZP,{size:"large",onClick:wr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Cn=ot,ci=be(98813),si=be(37720);const pn=ci.ZP.Group,qn={margin:"0 8px"};var en=({callback:Vt,onCancel:Zt})=>{function It(dn){Vt(dn)}return le.createElement(ht.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:It},le.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},le.createElement("span",{style:qn},"\u5355\u5143\u683C\u6570\uFF1A"),le.createElement("span",{style:qn},"\u884C\u6570"),le.createElement(ht.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},le.createElement(si.Z,null)),le.createElement("span",{style:qn},"\u5217\u6570"),le.createElement(ht.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},le.createElement(si.Z,null))),le.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},le.createElement("span",{style:qn},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),le.createElement(ht.default.Item,{name:"align"},le.createElement(pn,null,le.createElement(ci.ZP,{value:"default"},le.createElement("i",{className:"fa fa-align-justify"})),le.createElement(ci.ZP,{value:"left"},le.createElement("i",{className:"fa fa-align-left"})),le.createElement(ci.ZP,{value:"center"},le.createElement("i",{className:"fa fa-align-center"})),le.createElement(ci.ZP,{value:"right"},le.createElement("i",{className:"fa fa-align-right"}))))),le.createElement("div",{className:"flex-container flex-end"},le.createElement(mt.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),le.createElement(mt.ZP,{type:"ghost",onClick:Zt},"\u53D6\u6D88")))},wi=be(59637),Si=be(61016),Di=be.n(Si),ro=(0,le.forwardRef)(({use3d:Vt,width:Zt,height:It,callback:dn,showSaveButton:Ri},hi)=>{const ri=(0,le.useRef)(),Kt=(0,le.useRef)(),[wn,Ki]=(0,le.useState)(!1),wr=(0,le.useRef)({id:ri,appName:"graphing",width:Zt||1e3,height:It||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,le.useEffect)(()=>{Kt.current=new(Di())(wr.current,!0),window.onload=function(){Kt.current.inject("applet_container")}},[]);const Kn=()=>{var Wt=window.ggbApplet.getPNGBase64(1,!0,72);return dn&&dn(Wt),Wt};return(0,le.useEffect)(()=>{wr.current.appName=wn?"3D":"graphing",Kt.current.inject("applet_container")},[wn]),(0,le.useEffect)(()=>{Ki(Vt)},[Vt]),(0,le.useImperativeHandle)(hi,()=>({getImgData:Kn})),le.createElement(le.Fragment,null,le.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:ri}),le.createElement(kn.Z,{align:"middle"},le.createElement(He.Z,{flex:1},le.createElement(wi.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:wn,onChange:Wt=>Ki(Wt)})),le.createElement(He.Z,null,le.createElement(mt.ZP,{size:"large",onClick:Kn,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Zr=be(36527),Fi=be(2453);const mi="link",Co="upload-image",jn="add-flowchart",yn="draw-image",Jr="add-flowchart",lo="code-block",hr="add-table",Nr="------------",Xo={default:Nr,left:`:${Nr}`,center:`:${Nr}:`,right:`${Nr}:`};var ji=be(99914);function Mi(){}let Oi=0;const vr=1e4,Dr="\u2581",Cr="@\u2581\u2581@",En="@\u2581@",Ee=`
**\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`,on=["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 gn(Vt){return/^\d+$/.test(Vt)?`${Vt}px`:Vt}const In=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ii={[In+"-B"]:"bold",[In+"-I"]:"italic"},Ci={[mi]:"\u6DFB\u52A0\u94FE\u63A5",[lo]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Co]:"\u6DFB\u52A0\u56FE\u7247",[yn]:"\u6DFB\u52A0\u753B\u56FE",[jn]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[hr]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Ji=({defaultValue:Vt="",onChange:Zt,width:It="100%",height:dn=400,miniToolbar:Ri=!1,isFocus:hi=!1,watch:ri,insertTemp:Kt,mode:wn="markdown",id:Ki="markdown-editor-id",showResizeBar:wr=!1,noStorage:Kn=!1,showNullButton:Wt=!1,showNullProgramButton:Yi=!1,hidetoolBar:pr=!1,fullScreen:Ro=!1,onBlur:Zn,onCMBeforeChange:Ni,onFullScreen:Pi,className:xs="",disablePaste:qa=!1,disabled:Ar=!1,disabledFill:br=!1,placeholder:Rr="",values:xa="",extraUse:Ka})=>{const[_i,yo]=(0,le.useState)(null),[zl,ms]=(0,le.useState)(Vt),[as,Qt]=(0,le.useState)(ri),[Br,ba]=(0,le.useState)(Ro),[to,vs]=(0,le.useState)(""),[La,Za]=(0,le.useState)(0),[wa,ca]=(0,le.useState)(dn),[Ya,Un]=(0,le.useState)(!1),[js,zn]=(0,le.useState)(0),[_a,Sl]=(0,le.useState)(0),No=(0,le.useRef)(),kl=(0,le.useRef)(),bs=(0,le.useRef)(),ja=(0,le.useRef)();(0,le.useEffect)(()=>{const Xr=window.scrollY||window.pageYOffset;ms(xa),_i==null||_i.setValue(xa),window.scrollTo(0,Xr)},[xa]),(0,le.useEffect)(()=>{Pi==null||Pi(Br)},[Br]),(0,le.useEffect)(()=>{if(No.current){let Xr=function(na,Fn){var Bo;if(qa){Fn.preventDefault();return}const io=Fn.clipboardData;if(io){const Ds=io.types.toString(),Ps=io.items;if(Ds==="Files"||io.types.indexOf("Files")>-1){if(Fn.preventDefault(),wn=="stex")return;try{let ol=Ps[1];((Bo=Ps[0])==null?void 0:Bo.kind)==="file"&&(ol=Ps[0]);const Al=ol.getAsFile(),hu=Al.name.split(".").pop();(0,Xn.I)(Al,eu=>{var Eu,Wu,ln;eu.id?((Eu=Al==null?void 0:Al.type)==null?void 0:Eu.indexOf("image"))>-1?no.replaceSelection(`<img width="100%" src="/api/attachments/${eu.id}?type=${eu.content_type})" alt="" />`):((Wu=Al==null?void 0:Al.type)==null?void 0:Wu.indexOf("video"))>-1?no.replaceSelection(`<video width="100%" controls src="/api/attachments/${eu.id}"></video>`):((ln=Al==null?void 0:Al.type)==null?void 0:ln.indexOf("pdf"))>-1?no.replaceSelection(`<a href="/api/attachments/${eu.id}?type=${Al.type}&disposition=inline" target="_blank">${Al.name}</a>`):on.includes(hu)?no.replaceSelection(`<a href="/api/attachments/${eu.id}?type=office&disposition=inline" target="_blank">${Al.name}</a>`):no.replaceSelection(`[${Al.name}](/api/attachments/${eu.id}?type=${eu.content_type})`):(eu==null?void 0:eu.status)===401&&(document.location.href="/user/login")})}catch(ol){Fi.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const no=Lt().fromTextArea(No.current,{mode:wn,lineNumbers:!Ri,lineWrapping:!0,value:Vt,autoCloseTags:!0,autoCloseBrackets:!0});return no.on("keyup",function(na,Fn){Fn.keyCode===8&&(na.getValue()==""?no.setOption("placeholder",Rr):no.setOption("placeholder",null))}),no.on("keydown",function(na,Fn){if(Fn.keyCode===8){var Bo=fl(na);Bo&&Fn.preventDefault()}}),hi&&no.focus(),no.on("paste",Xr),Ar&&no.on("beforeChange",function(na,Fn){(Fn.origin==="paste"||Fn.origin==="+input")&&Fn.cancel()}),yo(no),()=>{no.off("paste",Xr)}}},[]);const es=(0,le.useCallback)(()=>{if(kl.current)try{}catch(Xr){console.log(Xr,"---- to set md editor body height")}},[wa,kl,Br]);(0,le.useEffect)(()=>{function Xr(){let no=new At.Z(na=>{for(let Fn of na)(Fn.target.offsetHeight>0||Fn.target.offsetWidth>0)&&(es(),_i.setSize("100%","100%"),_i.refresh())});return no.observe(No.current.parentElement),no}if(_i){const no=Xr();return()=>{var na,Fn;(na=No.current)!=null&&na.parentElement&&no.unobserve((Fn=No.current)==null?void 0:Fn.parentElement)}}},[_i,es]),(0,le.useEffect)(()=>{if(_i){let Xr=[];for(const[no,na]of Object.entries(ii)){let Fn={[no]:()=>{ps(na)}};Xr.push(Fn),_i.addKeyMap(Fn)}return()=>{for(let no of Xr)_i.removeKeyMap(no)}}},[_i]),(0,le.useEffect)(()=>{Ro!==Br&&ba(Ro)},[Ro]),(0,ji.Z)(()=>{if(!Kn&&La>0){let Xr=new Date().getTime(),no=window.sessionStorage.getItem(Ki);Xr>=La+vr&&(!no||no!==zl)&&(window.sessionStorage.setItem(Ki,zl),Un(!0))}},vr),(0,le.useEffect)(()=>{Qt(ri)},[_i,ri]),(0,le.useEffect)(()=>{_i&&hi&&_i.focus()},[_i,hi]),(0,le.useEffect)(()=>{if(as&&_i){let Xr=function(na){let Fn=na.target;if(ja.current){let Bo=Fn.scrollTop/Fn.scrollHeight;ja.current.scrollTop=ja.current.scrollHeight*Bo}};const no=_i.getScrollerElement();return no.addEventListener("scroll",Xr),()=>{no.removeEventListener("scroll",Xr)}}},[_i,as]),(0,le.useEffect)(()=>{if(_i&&Ni){let Xr=function(no,na){Ni(no,na)};return _i.on("beforeChange",Xr),()=>{_i.off("beforeChange",Xr)}}},[_i,Ni]),(0,le.useEffect)(()=>{if(_i&&Zn){let Xr=function(){Zn(_i.getValue())};return _i.on("blur",Xr),()=>{_i.off("blur",Xr)}}},[_i,Zn]);function fl(Xr,no){var na=Xr.getDoc(),Fn=na.getCursor(),Bo=na.getLine(Fn.line),io=Bo.charAt(Fn.ch-1),Ds=Bo.lastIndexOf("@\u2581@",Fn.ch),Ps=Bo.lastIndexOf("@\u2581\u2581@",Fn.ch),ol=Ds>Ps?Ds:Ps,Al=Ds>Ps?3:4;if(Cr.indexOf(io)===-1)return null;if(console.log("change1:",no,Xr,Bo,Fn,ol,Ds,Ps,io),ol>=0&&Fn.ch-ol<5){var hu=ol+Al;return na.replaceRange("",{line:Fn.line,ch:ol},{line:Fn.line,ch:hu}),{line:Fn.line,ch:hu}}return null}(0,le.useEffect)(()=>{if(_i){let Xr=function(no,na){const Fn=no.getValue();ms(Fn),Za(new Date().getTime()),no.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Zt&&(Yi?Zt(Fn,Mu(Fn)):Zt(Fn))};return _i.on("change",Xr),()=>{_i.off("change",Xr)}}},[_i,Zt]),(0,le.useEffect)(()=>{if(_i)if(Vt==null)_i.setValue(""),ms("");else{const Xr=window.scrollY||window.pageYOffset;Vt!==_i.getValue()&&(_i.setValue(Vt),ms(Vt),_i.setCursor(Ar?1:_i.lineCount(),0),window.scrollTo(0,Xr))}},[_i,Vt]);const ps=(0,le.useCallback)(Xr=>{const no=_i.getCursor(),na=_i.getSelection();let Fn=na.split(`
`);switch(Xr){case"bold":return _i.replaceSelection("**"+na+"**"),na===""&&_i.setCursor(no.line,no.ch+2),_i.focus();case"italic":return _i.replaceSelection("*"+na+"*"),na===""&&_i.setCursor(no.line,no.ch+1),_i.focus();case"code":return _i.replaceSelection("`"+na+"`"),na===""&&_i.setCursor(no.line,no.ch+1),_i.focus();case"inline-latex":return vs("inline-latex"),_i.focus();case"latex":return _i.replaceSelection("```latex\n"+na+"\n```"),_i.setCursor(no.line+1,na.length+1),_i.focus();case"line-break":return _i.replaceSelection(`<br/>
`),_i.focus();case"list-ul":return na===""?_i.replaceSelection("- "+na):_i.replaceSelection(Fn.map(Bo=>Bo===""?"":`- ${Bo}`).join(`
`)),_i.focus();case"list-ol":return na===""?_i.replaceSelection("1. "+na):_i.replaceSelection(Fn.map((Bo,io)=>Bo===""?"":`${io+1}. ${Bo}`).join(`
`)),_i.focus();case"add-null-ch":return na===""&&_i.setCursor(no.line,no.ch),_i.replaceSelection(Dr),_i.focus();case"add-signal":return na===""&&_i.setCursor(no.line,no.ch),_i.replaceSelection(En),_i.focus();case"add-multiple":return na===""&&_i.setCursor(no.line,no.ch),_i.replaceSelection(Cr),_i.focus();case"inster-template-1":return na===""&&_i.setCursor(no.line,no.ch),_i.replaceSelection(Ee),_i.focus();case"eraser":return _i.setValue(""),_i.focus();case"trigger-watch":return Qt(!as),_i.focus();case"trigger-full-screen":return ba(!Br),_i.focus();case mi:vs(mi);return;case lo:vs(lo);return;case Co:vs(Co);return;case yn:vs(yn);return;case"maths-latex":vs("maths-latex");return;case jn:vs(jn);return;case hr:vs(hr);return;default:throw new Error}},[_i,as,Br]),sr=(0,le.useCallback)((Xr,no)=>{var na,Fn,Bo,io,Ds,Ps;switch(vs(""),to){case mi:const{title:Eu,link:Wu}=Xr;return _i.replaceSelection(`[${Eu}](${Wu})`),_i.focus();case lo:const{language:ln,content:Gl}=Xr;return _i.replaceSelection(["```"+ln,Gl,"```"].join(`
`)),_i.focus();case"maths-latex":for(var ol=atob(Xr),Al=new Uint8Array(ol.length),hu=0;hu<ol.length;hu++)Al[hu]=ol.charCodeAt(hu);var eu=new Blob([Al],{type:"image/png"});(0,Xn.I)(eu,Pa=>{Pa.id?_i.replaceSelection(`![,](/api/attachments/${Pa.id}?type=${Pa.content_type})`):(Pa==null?void 0:Pa.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":_i.replaceSelection("`$$"+Xr+"$$`");break;case Co:case yn:case Jr:const{src:Uo,alt:Zu}=Xr,al=no,Su=(Bo=(Fn=(na=al==null?void 0:al.name)==null?void 0:na.split("."))==null?void 0:Fn.pop)==null?void 0:Bo.call(Fn);return((io=al==null?void 0:al.type)==null?void 0:io.indexOf("image"))>-1||!(al!=null&&al.type)?al!=null&&al.align||al!=null&&al.width?_i.replaceSelection(`<p style="text-align:${al.align||"initial"}"><img width="${al.width?al.width+"%":"initial"}" src="${Uo}" alt="${Zu||""}" /></p>`):_i.replaceSelection(`<img width="100%" src="${Uo}" alt="${Zu||""}" />`):((Ds=al==null?void 0:al.type)==null?void 0:Ds.indexOf("video"))>-1?_i.replaceSelection(`<video width="100%" controls src="${Uo}"></video>`):((Ps=al==null?void 0:al.type)==null?void 0:Ps.indexOf("pdf"))>-1?_i.replaceSelection(`<a href="${Uo}?type=${al.type}&disposition=inline" target="_blank">${al.name}</a>`):on.includes(Su)?_i.replaceSelection(`<a href="${Uo}?type=office&disposition=inline" target="_blank">${al.name}</a>`):_i.replaceSelection(`[${al.name}](${Uo})`),_i.focus();case hr:const{row:Jc,col:Dc,align:Ws}=Xr;let Oa=`
`;for(let Pa=0;Pa<Jc;Pa++){let Ga=[],ts=[];for(let sl=0;sl<Dc;sl++)Pa===1&&ts.push(Xo[Ws]),Ga.push(" ");Pa===1&&(Oa+=`| ${ts.join(" | ")} |
`),Oa+=`| ${Ga.join(Dc===1?"":" | ")} |
`}return _i.replaceSelection(Oa+`
`),_i.focus();default:throw new Error}},[_i,to]),tt=(0,le.useMemo)(()=>{switch(to){case mi:return le.createElement(Je,{callback:sr,onCancel:il});case lo:return le.createElement(_n.Z,{callback:sr,onCancel:il});case Co:return le.createElement(Xn.Z,{callback:sr,onCancel:il});case jn:return le.createElement(Cn,{callback:sr,onCancel:il});case hr:return le.createElement(en,{callback:sr,onCancel:il});case"maths-latex":return le.createElement(ro,{showSaveButton:!0,callback:sr});case"inline-latex":return le.createElement(Zr.Z,{showSaveButton:!0,callback:sr});default:return null}},[to]);function il(){vs("")}(0,le.useEffect)(()=>{if(bs.current){let Xr=function(Ds){Bo=!0,io=Ds.pageY},no=function(){Bo=!1},na=function(Ds){if(Bo){let Ps=Ds.pageY-io;Ps<0&&(Ps=0),Ps>300&&(Ps=300);let ol=dn+Ps+"px";ca(ol)}},Fn=bs.current,Bo=!1,io=0;return Fn.addEventListener("mousedown",Xr),document.addEventListener("mousemove",na),document.addEventListener("mouseup",no),()=>{Fn.removeEventListener("mousedown",Xr),document.removeEventListener("mousemove",na),document.removeEventListener("mouseup",no)}}},[_i,bs]),(0,le.useEffect)(()=>{ca(dn)},[dn]);const ql=gn(It),rl=gn(wa),Il={width:ql,height:rl},nu=(0,le.useMemo)(()=>{if(La){let Xr=new Date(La),no=Xr.getHours(),na=Xr.getMinutes(),Fn=Xr.getSeconds();return no=no<10?"0"+no:no,na=na<10?"0"+na:na,Fn=Fn<10?"0"+Fn:Fn,`${no}:${na}:${Fn}`}return 0},[La]),Mu=Xr=>{const no=[];if(Yi){let na=-1;Xr=Xr.replace(/(@▁▁@|@▁@)/g,function(Fn,Bo,io){no.push({multiLine:Fn!==En})})}return no};function Au(){window.sessionStorage.removeItem(Ki),Un(!1),Za(0)}function Hu(){Un(!1),Za(0),_i.setValue(window.sessionStorage.getItem(Ki))}(0,le.useEffect)(()=>{Ci[to]&&to!==yn&&to!==jn&&setTimeout(()=>{const Xr=document.getElementsByClassName("markdown-popup-form")[0],no=window.innerWidth/2-Xr.offsetWidth/2,na=window.innerHeight/2-Xr.offsetHeight/2;zn(no),Sl(na)},0)},[to]);const ws=Xr=>{Xr.preventDefault();const no=Xr.clientX-js,na=Xr.clientY-_a;document.body.onmousemove=Fn=>{let Bo=Fn.clientX-no,io=Fn.clientY-na;const Ds=document.getElementsByClassName("markdown-popup-form")[0],Ps=window.innerWidth-Ds.offsetWidth,ol=window.innerHeight-Ds.offsetHeight;Bo=Math.max(0,Math.min(Bo,Ps)),io=Math.max(0,Math.min(io,ol)),Js(Fn.clientX,Fn.clientY,no,na)&&(zn(Bo),Sl(io))},document.body.onmouseup=function(){document.body.onmousemove=null}},Js=(Xr,no,na,Fn)=>{const Bo=document.body.clientHeight,io=document.body.clientWidth;return Xr<20&&na>Xr||Xr>io-20&&na<Xr||no<20&&Fn>no||no>Bo-20&&Fn<no?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return le.createElement(le.Fragment,null,le.createElement("div",{className:"markdown-editor-wrapper",ref:kl},le.createElement("div",{className:`markdown-editor-container ${xs} ${as?"on-preview":""} ${Ri?"mini":""} ${Br?"full-screen":""}`,style:Il},le.createElement(We,{insertTemp:Kt,watch:as,fullScreen:Br,showNullButton:Wt,showNullProgramButton:Yi,onActionCallback:ps,hidetoolBar:pr,extraUse:Ka}),le.createElement("div",{className:"markdown-editor-body"},le.createElement("div",{className:"codemirror-container"},le.createElement("textarea",{ref:No,placeholder:Rr})),as?le.createElement("div",{ref:ja,className:"preview-container"},wn==="stex"&&le.createElement(Ot,{value:zl}),wn!=="stex"&&le.createElement(Rt.Z,{disabledFill:br,showProgramFill:Yi,value:zl})):null))),wr?le.createElement("a",{ref:bs,className:"editor-resize"}):null,to===yn&&le.createElement(Yt,{callback:sr,onCancel:il}),to===jn&&le.createElement(Cn,{callback:sr,onCancel:il}),le.createElement(lt.Z,null,Ci[to]&&to!==yn&&to!==jn?le.createElement(zt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:js,top:_a},title:le.createElement("div",{style:{cursor:"move"},onMouseDown:ws},Ci[to]),open:!0,onCancel:il,footer:null,destroyOnClose:!0,width:to===jn?"1200px":null,height:to===jn?"80vh":null,className:"markdown-popup-form"},tt):null))}},70859:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Re},I:function(){return lt}});var le=be(91773),Xe=be(2453),Lt=be(28802),At=be(78957),wt=be(37720),_e=be(98813),Ve=be(85804),xt=be(15476),ut=be(67294),pt=be(67294),Rt=Object.defineProperty,Ot=Object.defineProperties,jt=Object.getOwnPropertyDescriptors,Te=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,ce=(ht,nt,mt)=>nt in ht?Rt(ht,nt,{enumerable:!0,configurable:!0,writable:!0,value:mt}):ht[nt]=mt,se=(ht,nt)=>{for(var mt in nt||(nt={}))ne.call(nt,mt)&&ce(ht,mt,nt[mt]);if(Te)for(var mt of Te(nt))te.call(nt,mt)&&ce(ht,mt,nt[mt]);return ht},ge=(ht,nt)=>Ot(ht,jt(nt));const{useForm:ye}=le.default,we={width:280,marginRight:10},Ce={labelCol:{span:5},wrapperCol:{span:19}};var Re=({callback:ht,onCancel:nt})=>{const[mt]=ye();let at=(0,ut.useRef)();function Pt(Ln){at.current.width=mt.getFieldValue("width"),at.current.align=mt.getFieldValue("align"),ht(Ln,at.current)}function Nt(Ln,xn){if(Ln.status===-1){Xe.ZP.error(Ln.message);return}mt.setFieldsValue({src:`/api/attachments/${Ln.id}`,type:xn.type})}function Et(Ln){let xn=Ln.target.files[0];at.current=xn,lt(xn,Nt)}return pt.createElement(le.default,ge(se({form:mt},Ce),{className:"upload-image-panel",onFinish:Pt,style:{width:470,overflow:"hidden"}}),pt.createElement(le.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},pt.createElement("div",{className:"flex-container"},pt.createElement(le.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},pt.createElement(Lt.default,{style:we})),pt.createElement(We,{onFileChange:Et}))),pt.createElement(le.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},pt.createElement(Lt.default,{style:{width:264}})),pt.createElement(le.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},pt.createElement(At.Z,null,pt.createElement(le.default.Item,{name:"width",style:{margin:0}},pt.createElement(wt.Z,{style:{width:264}})),pt.createElement("span",{className:"ml8"},"%"))),pt.createElement(le.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},pt.createElement(_e.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"}]})),pt.createElement("aside",null,pt.createElement(le.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},pt.createElement(Ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),pt.createElement(Ve.ZP,{type:"default",onClick:nt},"\u53D6\u6D88"))))};function We({onFileChange:ht}){return pt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",pt.createElement("input",{type:"file",onChange:ht}))}function lt(ht,nt){if(!ht)throw new String("\u6CA1\u6709\u6587\u4EF6");let mt=new FormData;mt.append("editormd-image-file",ht),mt.append("file_param_name","editormd-image-file"),mt.append("byxhr","true");var at=new window.XMLHttpRequest;at.withCredentials=!0,at.addEventListener("load",function(Pt){nt(JSON.parse(Pt.target.responseText),ht)},!1),at.addEventListener("error",function(Pt){console.error(Pt)},!1),at.open("POST",`${xt.KI}/api/attachments.json`),at.send(mt)}},76621:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Lt}});var le=be(67294),Xe=be(73935);class Lt extends le.Component{constructor(wt){super(wt);const _e=window.document;this.node=_e.createElement("div"),_e.body.appendChild(this.node)}render(){const{children:wt}=this.props;return(0,Xe.createPortal)(wt,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},36295:function(Rn,$n,be){"use strict";be.d($n,{SV:function(){return Mt},ZP:function(){return Yt}});var le=be(67294),Xe=be(91033);const Lt={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"]},At={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"]},wt={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(`
`)}]},_e={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(`
`)}]},Ve={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 xt=be(84204),ut=be.n(xt),pt=(_t,mn,rn)=>new Promise((He,Me)=>{var Fe=Be=>{try{Ue(rn.next(Be))}catch(ot){Me(ot)}},Oe=Be=>{try{Ue(rn.throw(Be))}catch(ot){Me(ot)}},Ue=Be=>Be.done?He(Be.value):Promise.resolve(Be.value).then(Fe,Oe);Ue((rn=rn.apply(_t,mn)).next())});const Rt={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"]}},Ot=(_t,mn,rn,He)=>{const Me=mn.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:rn.lineNumber,endColumn:rn.column});return Array.from(new Set(Me.match(/\b\w{2,}\b/g)||[])).map(Oe=>({label:Oe,kind:_t.languages.CompletionItemKind.Text,insertText:Oe,range:He}))},jt=(_t,mn,rn,He)=>{_t.languages.registerCompletionItemProvider(mn,{provideCompletionItems(Me,Fe){const Oe=Me.getWordUntilPosition(Fe),Ue={startLineNumber:Fe.lineNumber,endLineNumber:Fe.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},Be=Me.getLineContent(Fe.lineNumber).substring(Oe.startColumn-2,Oe.endColumn);return{suggestions:[...Ot(_t,Me,Fe,Ue),...rn.map(Cn=>({label:Cn,kind:_t.languages.CompletionItemKind.Keyword,documentation:Cn,insertText:Cn,insertTextRules:_t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue})),...He.map(Cn=>({label:Cn.label,kind:_t.languages.CompletionItemKind.Snippet,documentation:Cn.content,insertText:Be.startsWith("#")?Cn.content.replace(/#/,""):Cn.content,insertTextRules:_t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ue}))]}}})};var Te=_t=>{Rt.languages.forEach(mn=>{_t.languages.registerDocumentFormattingEditProvider(mn,{provideDocumentFormattingEdits(rn){return pt(this,null,function*(){const He=ut()(rn.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:rn.getFullModelRange(),text:He}]})}})}),jt(_t,"java",At.keywords,At.quickKey),jt(_t,"cpp",wt.keywords,wt.quickKey),jt(_t,"c",Lt.keywords,[]),jt(_t,"python",_e.keywords,_e.quickKey),jt(_t,"scala",Ve.keywords,Ve.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,ce=(_t,mn,rn)=>mn in _t?te(_t,mn,{enumerable:!0,configurable:!0,writable:!0,value:rn}):_t[mn]=rn,se=(_t,mn,rn)=>ce(_t,typeof mn!="symbol"?mn+"":mn,rn);const ge=class mx{constructor(mn,rn,He){this.placeholder=mn,this.editor=rn,this.monaco=He,rn.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return mx.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(ge,"ID","editor.widget.placeholderHint");var we=ge,Ce=be(84144),Re=be(2453),We=be(83062),lt=be(96486),ht=be(33054),nt=be(74855),mt=Object.defineProperty,at=Object.defineProperties,Pt=Object.getOwnPropertyDescriptors,Nt=Object.getOwnPropertySymbols,Et=Object.prototype.hasOwnProperty,Ln=Object.prototype.propertyIsEnumerable,xn=(_t,mn,rn)=>mn in _t?mt(_t,mn,{enumerable:!0,configurable:!0,writable:!0,value:rn}):_t[mn]=rn,Nn=(_t,mn)=>{for(var rn in mn||(mn={}))Et.call(mn,rn)&&xn(_t,rn,mn[rn]);if(Nt)for(var rn of Nt(mn))Ln.call(mn,rn)&&xn(_t,rn,mn[rn]);return _t},fn=(_t,mn)=>at(_t,Pt(mn)),Qe=(_t,mn)=>{var rn={};for(var He in _t)Et.call(_t,He)&&mn.indexOf(He)<0&&(rn[He]=_t[He]);if(_t!=null&&Nt)for(var He of Nt(_t))mn.indexOf(He)<0&&Ln.call(_t,He)&&(rn[He]=_t[He]);return rn},Ke=(_t,mn,rn)=>new Promise((He,Me)=>{var Fe=Be=>{try{Ue(rn.next(Be))}catch(ot){Me(ot)}},Oe=Be=>{try{Ue(rn.throw(Be))}catch(ot){Me(ot)}},Ue=Be=>Be.done?He(Be.value):Promise.resolve(Be.value).then(Fe,Oe);Ue((rn=rn.apply(_t,mn)).next())});function Je(_t){return/^\d+$/.test(_t)?`${_t}px`:_t}function _n(){}let Xn=!1;const zt={"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 kn(_t=[]){let mn=_t;if(Array.isArray(_t)){for(let rn=0;rn<_t.length;rn++){let He=zt[_t[rn]];if(He)return He}return mn[0]}return zt[mn]||mn}let bn=null;const oi=()=>Ke(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(_t){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",_t)}});var Yt=_t=>{var mn=_t,{width:rn="100%",height:He="100%",value:Me,language:Fe="javascript",style:Oe={},options:Ue={},overrideServices:Be={},theme:ot="vs-dark",onEditBlur:Cn,isCopy:ci=!1,onSave:si,autoHeight:pn=!1,forbidCopy:qn=!1,onChange:en=_n,editorDidMount:wi=_n,onFocus:Si=_n,onBreakPoint:Di=_n,breakPointValue:Ti=[],filename:ro="educoder.txt",errorLine:Zr,errorContent:Fi="",highlightLine:mi,openBreakPoint:Co=!1,placeholder:jn="",showMiniMap:yn=!0}=mn,Jr=Qe(mn,["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 lo=(0,le.useRef)(),hr=(0,le.useRef)({}),Nr=(0,le.useRef)(),Xo=(0,le.useRef)(),ji=(0,le.useRef)([]),Mi=(0,le.useRef)(!1),Oi=(0,le.useRef)(),vr=(0,le.useRef)(),Dr=(0,le.useRef)(!1),[Cr,En]=(0,le.useState)(!1);function Ee(){let Kt;return lo.current&&(Kt=new Xe.Z(wn=>{for(let Ki of wn)(Ki.target.offsetHeight>0||Ki.target.offsetWidth>0)&&hr.current.instance.layout()}),Kt.observe(lo.current)),Kt}function on(){Re.ZP.warning({content:decodeURIComponent(ne),key:"monaco-editor-tip"})}const gn=()=>{let Kt=hr.current.instance;if(Me!=null&&Kt&&Cr){const wn=Kt.getModel();wn&&Me!==wn.getValue()&&(Xn=!0,wn.setValue(Me),Kt.layout(),Xn=!1)}};(0,le.useEffect)(()=>{const Kt=ht.Z.subscribe("formatDocument",wn=>{var Ki;let wr=hr.current.instance;(Ki=wr==null?void 0:wr.getAction)==null||Ki.call(wr,"editor.action.formatDocument").run()});return window.updateMonacoValue=wn=>{en(wn)},Kt},[]),(0,le.useEffect)(()=>{var Kt;let wn=hr.current.instance;Xo.current&&clearTimeout(Xo.current),Xo.current=setTimeout(()=>{gn()},500),Me&&(Me!=null&&Me.length)&&((Kt=wn==null?void 0:wn.updateOptions)==null||Kt.call(wn,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Me.split(/\r\n|\r|\n/g).length))+3,5)}))},[Me,Cr,hr.current]),(0,le.useEffect)(()=>{if(Zr&&hr.current&&hr.current.instance){let wn=hr.current.instance;wn.changeViewZones(function(Ki){var wr=document.createElement("div");wr.style.padding="10px 20px",wr.style.width="calc(100% - 20px)",wr.className="my-error-line-wrp",wr.innerHTML=Fi,Ki.addZone({afterLineNumber:Zr||11,heightInLines:3,domNode:wr})});var Kt={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}};wn.addOverlayWidget(Kt),wn.revealPositionInCenter({lineNumber:20,column:1})}},[Zr,hr.current,Cr]);const Mn=(Kt="",wn)=>{if(!Kt||Kt.trim()==="")return!0;const wr=hr.current.instance.getModel().getLineTokens(wn);let Kn=!1;for(let Wt=0;Wt<2;Wt++)wr.getStandardTokenType(Wt)===1&&(Kn=!0);return Kn};(0,le.useEffect)(()=>{var Kt;const wn=(Kt=hr.current)==null?void 0:Kt.instance;if(wn&&Cr&&qn){const Ki=wn.onDidBlurEditorWidget(()=>{Dr.current=!1}),wr=wn.onDidFocusEditorText(()=>{Dr.current=!0});return()=>{Ki.dispose(),wr.dispose()}}},[hr.current,Cr,qn]),(0,le.useEffect)(()=>{var Kt;if((Kt=hr.current)!=null&&Kt.instance&&Cr&&Co){let wn=hr.current.instance,Ki=wn.getModel();if(!Ki)return;(()=>{var Ar;let br=[],Rr=[];const xa=Ki.getAllDecorations();for(let _i of xa)_i.options.className==="highlighted-line"&&(br.push((Ar=_i==null?void 0:_i.range)==null?void 0:Ar.startLineNumber),Rr.push(_i==null?void 0:_i.id));if(mi===br[0])return;Ki.deltaDecorations(Rr,[]);const Ka=Ki.getLineCount();mi&&mi<=Ka&&(wn.deltaDecorations([],[{range:new bn.Range(mi,1,mi,Ki.getLineMaxColumn(mi)),options:{isWholeLine:!0,className:"highlighted-line"}}]),wn.revealLineInCenter(mi))})();const Kn=(Ar=!1)=>{var br;let Rr=[],xa=[];const Ka=Ki.getAllDecorations();for(let _i of Ka)_i.options.linesDecorationsClassName==="breakpoints-select"&&(Rr.push((br=_i==null?void 0:_i.range)==null?void 0:br.startLineNumber),xa.push(_i==null?void 0:_i.id));if(Ar)return{lines:Rr,ids:xa};Di(Rr)},Wt=Ar=>Ke(void 0,null,function*(){let br={range:new bn.Range(Ar,1,Ar,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Ki.deltaDecorations([],[br]),Kn()}),Yi=Ar=>Ke(void 0,null,function*(){let br=[];const Rr=wn.getLineDecorations(Ar);for(let xa of Rr)xa.options.linesDecorationsClassName==="breakpoints-select"&&br.push(xa.id);yield Ki.deltaDecorations(br,[]),Kn()}),pr=Ar=>{let br=wn.getLineDecorations(Ar);for(let Rr of br)if(Rr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,lt.isEqual)(Ti,Kn(!0).lines)){Ki.deltaDecorations(Kn(!0).ids,[]);const Ar=Ti.map(br=>({range:new bn.Range(br,1,br,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Ki.deltaDecorations([],Ar)}const Ro=wn.onDidChangeModelContent(Ar=>{let br=wn.getPosition();if(br){let Rr=br.lineNumber;clearTimeout(vr.current),vr.current=setTimeout(()=>{Mn(Ki.getLineContent(Rr),Rr)?Yi(Rr):pr(Rr)?(Yi(Rr),Wt(Rr)):Kn()},100)}}),Zn=wn.onMouseDown(Ar=>{var br,Rr,xa;if(Ar.target.detail&&((xa=(Rr=(br=Ar.target)==null?void 0:br.element)==null?void 0:Rr.className)!=null&&xa.includes("line-numbers"))){let Ka=Ar.target.position.lineNumber;if(Mn(Ki.getLineContent(Ka),Ka))return;pr(Ka)?Yi(Ka):Wt(Ka)}}),Ni=Ar=>{let br={range:new bn.Range(Ar,1,Ar,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};ji.current=wn.deltaDecorations(ji.current,[br])},Pi=()=>{ji.current=wn.deltaDecorations(ji.current,[])},xs=wn.onMouseMove(Ar=>{var br,Rr,xa;if(Pi(),Ar.target.detail&&((xa=(Rr=(br=Ar.target)==null?void 0:br.element)==null?void 0:Rr.className)!=null&&xa.includes("line-numbers"))){let Ka=Ar.target.position.lineNumber;if(Mn(Ki.getLineContent(Ka),Ka))return;Ni(Ka)}}),qa=wn.onMouseLeave(()=>{Pi()});return()=>{Ro.dispose(),Zn.dispose(),xs.dispose(),qa.dispose()}}},[hr.current,Cr,Ti,mi,Co,Fe]),(0,le.useEffect)(()=>{var Kt;(Kt=hr.current)!=null&&Kt.instance&&Co&&hr.current.instance.setPosition({lineNumber:0,column:0})},[mi]);function In(){let Kt=hr.current.instance;if(Kt){const wn=Kt.getSelection(),Ki=hr.current.pastePos||{},wr=new bn.Range(Ki.startLineNumber||wn.endLineNumber,Ki.startColumn||wn.endColumn,Ki.endLineNumber||wn.endLineNumber,Ki.endColumn||wn.endColumn);setTimeout(()=>{Kt.executeEdits("",[{range:wr,text:""}])},300)}}function ii(Kt){(window.navigator.platform.match("Mac")?Kt.metaKey:Kt.ctrlKey)&&Kt.keyCode==83&&(Kt.preventDefault(),si())}const Ci=()=>{if(pn&&hr.current.instance){const Kt=hr.current.instance.getContentHeight();hi(Kt<He?He:Kt)}else hi(He)};function Ji(Kt){var wn=document.createEvent("MouseEvents");wn.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Kt.dispatchEvent(wn)}const Vt=Kt=>{if(!Dr.current)return;const{keyCode:wn,ctrlKey:Ki,metaKey:wr,target:Kn,type:Wt}=Kt;return(Wt==="paste"||(wn===67||wn===86)&&(wr||Ki))&&Kn.nodeName==="TEXTAREA"&&(on(),Kt.preventDefault()),!1};function Zt(Kt,wn){var Ki=window.URL||window.webkitURL||window,wr=new Blob([wn]),Kn=document.createElementNS("http://www.w3.org/1999/xhtml","a");Kn.href=Ki.createObjectURL(wr),Kn.download=Kt,Ji(Kn)}(0,le.useEffect)(()=>{Ci()},[Ci]),(0,le.useEffect)(()=>{lo.current&&!Cr&&Promise.all([be.e(5552),be.e(9651)]).then(be.bind(be,55826)).then(Kt=>{try{bn=Kt,hr.current.instance=bn.editor.create(lo.current,{value:Me,language:kn(Fe),theme:ot,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:yn||!1}},Be);const wn=hr.current.instance;let Kn=[...Ce.BH._menuItems].find(Ro=>Ro[0]._debugName=="EditorContext")[1],Wt=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Yi=(Ro,Zn)=>{var Ni,Pi;let xs=Ro._first;do Zn.includes((Pi=(Ni=xs.element)==null?void 0:Ni.command)==null?void 0:Pi.id)&&Ro._remove(xs);while(xs=xs.next)};if(wi(wn,bn),setTimeout(()=>{Ci(),hr.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Zt(ro||"educoder.txt",wn.getValue())}})},500),hr.current.subscription=wn.onDidChangeModelContent(Ro=>{Mi.current?clearTimeout(Oi.current):(Ci(),en(wn.getValue(),Ro)),Oi.current=setTimeout(()=>{Mi.current=!1},500)}),window.Monaco||Te(bn,kn(Fe)),qn&&(Yi(Kn,Wt),lo.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Vt),window.removeEventListener("paste",Vt),window.addEventListener("keydown",Vt),window.addEventListener("paste",Vt)),window.Monaco=bn,Cn&&wn.onDidBlurEditorWidget(()=>{Cn(wn.getValue())}),Si&&wn.onDidFocusEditorText(()=>{qn&&oi(),Si(wn.getValue())}),qn){oi();try{wn.onDidPaste(Ro=>{const Zn=wn.getSelection(),Ni=hr.current.pastePos||{},Pi=new bn.Range(Ni.startLineNumber||Zn.endLineNumber,Ni.startColumn||Zn.endColumn,Ni.endLineNumber||Zn.endLineNumber,Ni.endColumn||Zn.endColumn);wn.executeEdits("",[{range:Ro.range,text:""}])})}catch(Ro){}}let pr=Ee();return jn&&typeof jn=="string"&&new we(jn,wn,bn),En(!0),()=>{const Ro=hr.current.instance;Ro.dispose();const Zn=Ro.getModel();Zn&&Zn.dispose(),hr.current.subscription&&hr.current.subscription.dispose(),pr.unobserve(lo.current)}}catch(wn){}})},[]),(0,le.useEffect)(()=>{if(hr.current.instance&&Cr)return document.addEventListener("keydown",ii,!1),()=>{document.removeEventListener("keydown",ii)}},[si,Cr]),(0,le.useEffect)(()=>{let Kt=hr.current.instance;if(Kt&&Cr){let wn=kn(Fe);bn.editor.setModelLanguage(Kt.getModel(),wn)}},[Fe,Cr]),(0,le.useEffect)(()=>{hr.current.instance&&Cr&&bn.editor.setTheme(ot)},[ot,Cr]),(0,le.useEffect)(()=>{let Kt=hr.current.instance;Nr.current=Ue,Kt&&Cr&&(Kt.updateOptions(Nn({},Ue)),setTimeout(()=>{Kt.getModel().updateOptions(Nn({},Ue))},200))},[JSON.stringify(Ue),Cr]),(0,le.useEffect)(()=>{let Kt=hr.current.instance;Kt&&Cr&&Kt.layout()},[rn,He,Cr]);const[It,dn]=(0,le.useState)(Je(rn)),[Ri,hi]=(0,le.useState)(Je(He)),ri=fn(Nn({},Oe),{width:It,height:Ri,position:"relative"});return le.createElement("div",{className:"my-monaco-editor",ref:lo,style:ri},ci&&le.createElement(nt.CopyToClipboard,{text:Me,onCopy:()=>Re.ZP.success("\u590D\u5236\u6210\u529F")},le.createElement(We.Z,{title:"\u590D\u5236\u4EE3\u7801"},le.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},le.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Mt({width:_t="100%",height:mn="100%",original:rn,modified:He,language:Me,options:Fe={}}){const Oe=(0,le.useRef)(),[Ue,Be]=(0,le.useState)(null);function ot(pn){let qn;return Oe.current&&(qn=new Xe.Z(en=>{for(let wi of en)(wi.target.offsetHeight>0||wi.target.offsetWidth>0)&&pn.layout()}),qn.observe(Oe.current)),qn}(0,le.useEffect)(()=>(Oe.current&&Promise.all([be.e(5552),be.e(9404)]).then(be.bind(be,50048)).then(pn=>{bn=pn;const qn=bn.editor.createDiffEditor(Oe.current,fn(Nn({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},Fe),{wordWrap:!0}));Be(qn);let en=ot(qn);return()=>{qn.dispose();const wi=qn.getModel();wi&&wi.dispose(),en.unobserve(Oe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,le.useEffect)(()=>{Ue&&Ue.setModel({original:bn.editor.createModel(rn,Me),modified:bn.editor.createModel(He,Me)})},[rn,He,Me,Ue]);const Cn=Je(_t),ci=Je(mn),si={width:Cn,height:ci};return le.createElement("div",{className:"my-diff-editor",ref:Oe,style:si})}},5476:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Rt}});var le={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"},Xe=be(74330),Lt=be(83062),At=be(94184),wt=be.n(At),_e=be(28706),Ve=be(26194),xt=be(52262),ut=be(67294),Rt=({className:Ot,dataSource:jt=[],col:Te=4,right:ne,bottom:te=23,precision:ce=0,wrapWidth:se=1200,trackEventItems:ge,loading:ye,onRemove:we=()=>{},isCurrent:Ce=!0,showAlias:Re=!1})=>{const We=Math.floor((se-(Te-1)*ne)/Te),lt=[{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 ut.createElement(Xe.Z,{spinning:ye},ut.createElement("div",{className:wt()(le.list,Ot)},!!(jt!=null&&jt.length)&&(jt==null?void 0:jt.map((ht,nt)=>{var mt;const{name:at,id:Pt,identifier:Nt,featured:Et,school_name:Ln,image_url:xn,excellent:Nn,is_plan:fn}=ht;return ut.createElement("div",{key:Pt,className:le.wrap,style:{width:We,marginRight:(1+nt)%Te===0?0:ne+ce,marginBottom:te}},ut.createElement("a",{className:le.li,onClick:Qe=>{Qe.preventDefault(),Qe.stopPropagation(),ge&&(0,_e.L9)([ge]),(0,_e.xg)(`/paths/${Nt}`)}},ut.createElement("div",{className:le.img},ut.createElement("img",{className:le.cover,src:`${xn}`}),Ce&&(0,xt.bg)()&&(ht==null?void 0:ht.studying)&&ut.createElement("div",{className:`${le.movebq} user-path-items`,onClick:Qe=>{Qe.stopPropagation(),we(ht)}},ut.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ut.createElement("span",{className:"c-red"},"\u79FB\u9664")),(mt=ht==null?void 0:ht.subject_tags)==null?void 0:mt.map((Qe,Ke)=>{var Je,_n;if(Ke===0){const zt=(Je=lt.find(kn=>kn.name==Qe))==null?void 0:Je.swimg;return ut.createElement("img",{className:le.sign,src:zt,style:{left:"-4px"}})}const Xn=(_n=lt.find(zt=>zt.name==Qe))==null?void 0:_n.ptimg;return ut.createElement("img",{className:le.sign,src:Xn,style:{left:`${48+52*(Ke-1)+2*Ke}px`}})}),ut.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ht==null?void 0:ht.excellent)&&ut.createElement("div",{className:le.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ut.createElement("div",{className:le.name},ut.createElement(Lt.Z,{title:Re&&(ht!=null&&ht.excellent_alias_name)?ut.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${at}`,ut.createElement("br",null),ut.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ht==null?void 0:ht.excellent_alias_name}`)):at},ut.createElement("span",{className:le.e},Re&&(ht==null?void 0:ht.excellent_alias_name)||at))),ut.createElement(Lt.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ln}`},ut.createElement("div",{className:le.unit},ut.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ln)),ut.createElement("div",{className:le.tags},ut.createElement("div",null,ut.createElement(Lt.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ut.createElement("span",null,ut.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ut.createElement("span",null,ht.stages_count))),ut.createElement(Lt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ut.createElement("span",null,ut.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ut.createElement("span",null,ht.members_count)))))))})),!jt.length&&ut.createElement(Ve.Z,null)))}},30001:function(Rn,$n,be){"use strict";be.d($n,{jL:function(){return wt},w9:function(){return Je},QD:function(){return Zr},cQ:function(){return xn.Z},op:function(){return en},O5:function(){return gn},_b:function(){return Jr},t7:function(){return se},Gi:function(){return oi},YG:function(){return kn},qp:function(){return Rt},vr:function(){return Co},qE:function(){return Di},Je:function(){return we},wb:function(){return Ln},cq:function(){return He},tp:function(){return Te}});var le=be(67294),Xe={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},Lt="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==",wt=({dataSource:Mn=[],img:In,imgWidth:ii=346,title:Ci,sunTitle:Ji,bannerExtraContent:Vt})=>le.createElement("div",{className:Xe.banner},le.createElement("div",{className:Xe.content},le.createElement("aside",null,le.createElement("p",null,le.createElement("b",null,Ci),le.createElement("span",null,Ji)),Mn.length>0&&le.createElement("div",{className:Xe.btns},Mn.map((Zt,It)=>le.createElement("div",{key:It,onClick:Zt.click},Zt.name,Zt.sign?le.createElement("img",{src:Lt,width:39}):null))),Vt),In&&le.createElement("img",{style:{marginTop:33,marginRight:38},src:In,width:ii}))),_e={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"},Ve=be(94184),xt=be.n(Ve),ut=be(96486),Rt=({dataSource:Mn=[],value:In,onChange:ii,onTitleChange:Ci,className:Ji,title:Vt,titleWidth:Zt=41,style:It={},fontColor:dn="#6A7283",showCount:Ri})=>{const[hi,ri]=(0,le.useState)(0),[Kt,wn]=(0,le.useState)(!1),Ki=(0,le.useRef)(null),wr=(0,le.useRef)(null);return(0,le.useEffect)(()=>{var Kn;Mn.length!==0&&(((Kn=Ki==null?void 0:Ki.current)==null?void 0:Kn.clientHeight)>97?ri(1):ri(0)),Mn.length===0&&ri(0),wn(!1)},[Mn]),le.createElement("div",{className:xt()(_e.row,Ji),style:It},le.createElement("div",{onClick:(0,ut.throttle)(()=>Ci==null?void 0:Ci(),2e3),style:{width:Zt,marginTop:Kt?12:4},className:`${_e.title} ${Ci?"current":""}`},Vt),le.createElement("div",{className:Kt?`${_e.tagsWrap} ${_e.tagsBorderWrap}`:_e.tagsWrap},le.createElement("div",{className:_e.bar,ref:wr,style:hi>0?{height:hi===1?97:"auto",overflow:hi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},le.createElement("div",{className:_e.tag,ref:Ki},Mn==null?void 0:Mn.map(Kn=>le.createElement("span",{onClick:()=>ii(Kn.id),key:Kn.id,style:{color:dn},className:In===Kn.id?_e.active:""},le.createElement("span",{title:Kn.name,className:_e.name},Kn.name),!!Ri&&le.createElement("span",{className:_e.num},Kn.count))))),!!hi&&le.createElement(le.Fragment,null,hi===1?le.createElement("div",{onClick:()=>{var Kn;ri(2),((Kn=Ki==null?void 0:Ki.current)==null?void 0:Kn.clientHeight)>245?wn(!0):wn(!1)},className:_e.action},"\u5C55\u5F00",le.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):le.createElement("div",{onClick:()=>{wr.current.scrollTop=0,ri(1),wn(!1)},className:_e.action},"\u6536\u8D77",le.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Ot={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"},Te=({dataSource:Mn=[],value:In,onChange:ii,className:Ci,style:Ji={}})=>le.createElement("div",{style:Ji,className:xt()(Ot.tabs,Ci)},Mn.map(Vt=>le.createElement("span",{onClick:()=>ii(Vt.id),className:In===Vt.id?Ot.active:"",key:Vt.id},Vt.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=be(28802),se=({dataSource:Mn=[],value:In="",onChange:ii,onInputChange:Ci=()=>{},className:Ji,style:Vt={},placeholder:Zt,allowClear:It=!1})=>{var dn;const[Ri,hi]=(0,le.useState)(""),[ri,Kt]=(0,le.useState)("");(0,le.useEffect)(()=>{var wr;let Kn=In;(wr=JSON.stringify(In))!=null&&wr.includes("{")&&(hi(In.id),Kn=In.value||"");try{Kt(decodeURIComponent(Kn||""))}catch(Wt){Kt(decodeURIComponent(Kn||""))}},[In]);const wn=()=>{ii(encodeURIComponent(ri),Ri||null)},Ki=wr=>{wr!==Ri&&(hi(wr),ii(encodeURIComponent(ri),wr))};return le.createElement("div",{className:xt()(ne.input,Ji),style:Vt},!!Mn.length&&le.createElement("div",{className:ne.dropdown},le.createElement("div",{className:ne.text},(dn=Mn.find(wr=>wr.id===Ri))==null?void 0:dn.name,le.createElement("i",{className:"iconfont icon-zhankai4"}),le.createElement("b",{className:ne.b1}),le.createElement("b",{className:ne.b2})),le.createElement("div",{className:ne.menu},Mn.map((wr,Kn)=>le.createElement("div",{key:Kn,onClick:()=>Ki(wr.id)},wr.name)))),le.createElement(te.default,{onPressEnter:wn,value:ri,onChange:wr=>{Kt(wr.target.value),Ci(encodeURIComponent(wr.target.value),Ri||null)},bordered:!1,placeholder:Zt}),le.createElement("i",{onClick:wn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},ge={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"},we=({value:Mn,onChange:In,className:ii,total:Ci,pageSize:Ji,style:Vt={}})=>{const Zt=Mn<2,It=Mn>=Math.ceil(Ci/Ji);return Ci<=Ji?le.createElement(le.Fragment,null):le.createElement("div",{className:xt()(ge.quickPager,ii),style:Vt},le.createElement("div",{onClick:()=>{Zt||In(Mn-1,"prev")},className:Zt?ge.disabled:""},"\u4E0A\u4E00\u9875"),le.createElement("div",{onClick:()=>{It||In(Mn+1,"next")},className:It?ge.disabled:""},"\u4E0B\u4E00\u9875"))},Ce={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"},Re=be(74330),We=be(83062),lt=be(57097),ht=be(11320),nt=be(28706),mt=be(96908),at=be(57177),Pt=be(81378),Nt=be(26194),Ln=({className:Mn,dataSource:In=[],col:ii=4,right:Ci,bottom:Ji=23,precision:Vt=0,wrapWidth:Zt=1200,trackEventItems:It,loading:dn})=>{const Ri=Math.floor((Zt-(ii-1)*Ci)/ii);return le.createElement(Re.Z,{spinning:dn},le.createElement("div",{className:xt()(Ce.list,Mn)},!!In.length&&In.map((hi,ri)=>{const{name:Kt,id:wn,identifier:Ki,power:wr,cover_image_id:Kn,pic:Wt}=hi;return le.createElement("div",{className:Ce.wrap,key:wn,style:{width:Ri,marginRight:(1+ri)%ii===0?0:Ci+Vt,marginBottom:Ji}},le.createElement("a",{target:"_blank",href:`/shixuns/${Ki}/challenges`,className:Ce.li,onClick:Yi=>{Yi.preventDefault(),It&&(0,nt.L9)([It]),wr&&(0,nt.xg)(`/shixuns/${Ki}/challenges`)}},le.createElement("div",{className:Ce.img},le.createElement("img",{className:Ce.cover,src:`${Wt}`}),hi.is_jupyter&&le.createElement("img",{className:Ce.sign,src:mt}),hi.is_jupyter_lab&&le.createElement("img",{className:Ce.sign,src:at}),hi.is_unity_3d&&le.createElement("img",{className:Ce.sign,src:Pt})),le.createElement("div",{className:Ce.name},le.createElement(We.Z,{title:Kt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},le.createElement("span",{className:Ce.e},Kt||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),le.createElement("div",{className:Ce.tags},le.createElement(We.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),le.createElement("span",null,hi.challenges_count))),!!hi.myshixuns_count&&le.createElement(We.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},le.createElement("span",null,le.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),le.createElement("span",null,hi.myshixuns_count))),le.createElement(We.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},le.createElement("span",null,le.createElement("span",null,hi.level))),le.createElement("div",{className:Ce.rate},le.createElement(lt.Z,{allowHalf:!0,disabled:!0,defaultValue:hi.score_info}),le.createElement("span",null,"\xA0",hi.score_info?`${hi.score_info}\u5206`:"5\u5206")))),!wr&&le.createElement("div",{className:Ce.lockWrap},le.createElement("img",{src:`${ht.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),le.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!In.length&&le.createElement(Nt.Z,null)))},xn=be(5476),Nn={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"},fn="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",Qe=be(67294),Je=({className:Mn,dataSource:In=[],col:ii=4,right:Ci,bottom:Ji=23,precision:Vt=0,wrapWidth:Zt=1200,trackEventItems:It,loading:dn,handleVery:Ri=()=>!0})=>{const hi=Math.floor((Zt-(ii-1)*Ci)/ii);return Qe.createElement(Re.Z,{spinning:dn},Qe.createElement("div",{className:xt()(Nn.list,Mn)},!!In.length&&In.map((ri,Kt)=>{const{subject_identifier:wn,id:Ki,identifier:wr,power:Kn}=ri,Wt=ri.is_public!=0&&ri.is_public;return Qe.createElement("div",{className:Nn.wrap,key:Ki,style:{width:hi,marginRight:(1+Kt)%ii===0?0:Ci+Vt,marginBottom:Ji}},Qe.createElement("a",{className:Nn.li,onClick:Yi=>{Yi.preventDefault(),Ri(ri==null?void 0:ri.first_category_url)&&(It&&(0,nt.L9)([It]),(0,nt.xg)(ri.first_category_url))}},Qe.createElement("div",{className:Nn.top},Qe.createElement(We.Z,{title:ri.name},Qe.createElement("div",{className:Nn.name},ri.name)),Qe.createElement("img",{className:Nn.img,src:ht.Z.IMG_SERVER+"/images/"+ri.avatar_url}),Qe.createElement("div",{className:Nn.text,title:ri.creator},ri.creator),wn&&Qe.createElement("div",{className:Nn.btns},Qe.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),Qe.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Wt&&Qe.createElement("div",{className:Nn.sign},"\u516C\u5F00")),Qe.createElement("div",{className:Nn.bottom},ri.visits>0&&Qe.createElement(We.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},Qe.createElement("span",null,Qe.createElement("i",{className:"iconfont icon-liulanyan"}),Qe.createElement("span",null,ri.visits))),ri.course_members_count>0&&Qe.createElement(We.Z,{title:"\u6210\u5458",placement:"bottom"},Qe.createElement("span",null,Qe.createElement("i",{className:"iconfont icon-chengyuan"}),ri.course_members_count)),ri.tasks_count>0&&Qe.createElement(We.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},Qe.createElement("span",null,Qe.createElement("i",{className:"iconfont icon-zuoye"}),ri.tasks_count)),ri.is_end?Qe.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):Qe.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!ri.is_accessible&&Qe.createElement("div",{className:Nn.lockWrap},Qe.createElement("img",{src:`${ht.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),Qe.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!In.length&&Qe.createElement(Nt.Z,null)))},_n={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"},Xn=be(35973),kn=({dataSource:Mn=[],value:In,onChange:ii,className:Ci,style:Ji={},tabBarExtraContent:Vt})=>le.createElement("div",{className:xt()(_n.tabs,Ci),style:Ji},le.createElement("div",{className:_n.tabsWrap},Mn.map((Zt,It)=>!(Zt!=null&&Zt.hide)&&le.createElement("aside",{className:_n.tab,onClick:()=>{ii(Zt.id),Zt.link&&Xn.history.push(Zt.link)},key:It},le.createElement("div",{className:In===Zt.id?_n.active:""},Zt.name),(Zt==null?void 0:Zt.resetCount)==null&&(Zt==null?void 0:Zt.total)!==void 0&&le.createElement("span",null,"\uFF08",Zt==null?void 0:Zt.total,"\uFF09"),(Zt==null?void 0:Zt.resetCount)!==void 0&&(Zt==null?void 0:Zt.total)!==void 0&&le.createElement(We.Z,{title:(Zt==null?void 0:Zt.tip)!=null?Zt==null?void 0:Zt.tip:""},le.createElement("span",{style:{color:"#9096A3"}},"\uFF08",le.createElement("span",{style:{color:"#000"}},Zt==null?void 0:Zt.resetCount),"/",le.createElement("span",null,Zt==null?void 0:Zt.total),"\uFF09"))))),le.createElement("div",{className:_n.tabBar},Vt)),oi=({className:Mn,style:In={},children:ii})=>le.createElement("div",{className:xt()(Mn),style:In},ii),Yt={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=be(85418),_t=be(50136);const mn=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var He=({sortValue:Mn,dropValue:In,className:ii,onSort:Ci,onDrop:Ji,dataSource:Vt=mn})=>{var Zt;return le.createElement("div",{className:xt()(Yt.orderWrap,ii)},le.createElement(Mt.Z,{dropdownRender:()=>le.createElement(_t.default,null,Vt.map((It,dn)=>le.createElement(_t.default.Item,{key:dn,onClick:()=>Ji(It.id)},It.name)))},le.createElement("span",{className:Yt.orderTextWrap},(Zt=Vt.find(It=>In===It.id))==null?void 0:Zt.name)),le.createElement("span",{className:Yt.orderIconWrap},le.createElement("span",{className:Yt.orderAsc},le.createElement("i",{className:Mn==="asc"?`iconfont icon-sanjiaoxing-up font12 ${Yt.cursorPointer} ${Yt.active}`:`iconfont icon-sanjiaoxing-up font12 ${Yt.cursorPointer}`,onClick:()=>Ci(Mn==="asc"?"desc":"asc")})),le.createElement("span",{className:Yt.orderDesc},le.createElement("i",{className:Mn==="desc"?`iconfont icon-sanjiaoxing-down font12 ${Yt.cursorPointer} ${Yt.active}`:`iconfont icon-sanjiaoxing-down font12 ${Yt.cursorPointer}`,onClick:()=>Ci(Mn==="asc"?"desc":"asc")}))))},Me={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"},Fe=be(85804),Oe=Object.defineProperty,Ue=Object.getOwnPropertySymbols,Be=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable,Cn=(Mn,In,ii)=>In in Mn?Oe(Mn,In,{enumerable:!0,configurable:!0,writable:!0,value:ii}):Mn[In]=ii,ci=(Mn,In)=>{for(var ii in In||(In={}))Be.call(In,ii)&&Cn(Mn,ii,In[ii]);if(Ue)for(var ii of Ue(In))ot.call(In,ii)&&Cn(Mn,ii,In[ii]);return Mn},si=(Mn,In)=>{var ii={};for(var Ci in Mn)Be.call(Mn,Ci)&&In.indexOf(Ci)<0&&(ii[Ci]=Mn[Ci]);if(Mn!=null&&Ue)for(var Ci of Ue(Mn))In.indexOf(Ci)<0&&ot.call(Mn,Ci)&&(ii[Ci]=Mn[Ci]);return ii},pn=(Mn,In,ii)=>new Promise((Ci,Ji)=>{var Vt=dn=>{try{It(ii.next(dn))}catch(Ri){Ji(Ri)}},Zt=dn=>{try{It(ii.throw(dn))}catch(Ri){Ji(Ri)}},It=dn=>dn.done?Ci(dn.value):Promise.resolve(dn.value).then(Vt,Zt);It((ii=ii.apply(Mn,In)).next())}),en=Mn=>{var In=Mn,{className:ii,style:Ci,children:Ji,loading:Vt=!1,openLoading:Zt,onClick:It=()=>{},size:dn="middle",shape:Ri="round"}=In,hi=si(In,["className","style","children","loading","openLoading","onClick","size","shape"]);const[ri,Kt]=(0,le.useState)(!1);return le.createElement(Fe.ZP,ci({onClick:(0,ut.throttle)(wn=>pn(void 0,null,function*(){Zt&&Kt(!0);try{yield It(wn)}catch(Ki){console.log("error",Ki)}Zt&&Kt(!1)}),2e3,{leading:!0,trailing:!1}),className:xt()(Me.btn,Me[`${dn}-${Ri}`],ii),style:Ci,size:dn,shape:Ri,loading:ri||Vt},hi),Ji)},wi={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"},Di=({className:Mn,style:In,children:ii=null,onClick:Ci,title:Ji})=>le.createElement("div",{className:xt()(wi.head,Mn),style:In},le.createElement("span",{className:"primary-hover",onClick:Ci},le.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),le.createElement("b",{title:Ji},Ji),le.createElement("div",{className:wi.node},ii)),Ti={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"},Zr=({confirmShow:Mn=!0,confirmTitle:In,confirmClick:ii,cancelShow:Ci=!0,cancelTitle:Ji,cancelClick:Vt,className:Zt,style:It,confirmLoading:dn=!1})=>le.createElement("div",{className:xt()(Ti.btns,Zt),style:It},Mn&&le.createElement(Fe.ZP,{loading:dn,onClick:ii,type:"primary",className:Ti.confirm},In),Ci&&le.createElement(Fe.ZP,{onClick:Vt,className:Ti.cancel},Ji)),Fi={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"},Co=({className:Mn,style:In={},LeftContent:ii,children:Ci,RightContent:Ji})=>le.createElement("div",{className:xt()(Fi.fixedBottom,Mn),style:In},le.createElement("div",{className:Fi.wrap},le.createElement("div",{className:Fi.left},ii),le.createElement("div",{className:Fi.center},Ci),le.createElement("div",{className:Fi.right},Ji))),jn={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"},Jr=({className:Mn,style:In={},dataSource:ii=[]})=>le.createElement("div",{className:xt()(jn.crumbs,Mn),style:In},ii.map((Ci,Ji)=>Ji<ii.length-1?le.createElement(le.Fragment,{key:Ji},Ci.path||Ci.onClick?le.createElement("span",{className:jn.hover,onClick:Ci!=null&&Ci.onClick?Ci.onClick:()=>Xn.history.push(Ci.path)},Ci.name):le.createElement("span",null,Ci.name),le.createElement("span",null,"\xA0",">","\xA0")):le.createElement("span",{key:Ji,style:{color:"#5F6368"}},Ci.name))),lo=be(55054),hr=Object.defineProperty,Nr=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,ji=Object.getOwnPropertySymbols,Mi=Object.prototype.hasOwnProperty,Oi=Object.prototype.propertyIsEnumerable,vr=(Mn,In,ii)=>In in Mn?hr(Mn,In,{enumerable:!0,configurable:!0,writable:!0,value:ii}):Mn[In]=ii,Dr=(Mn,In)=>{for(var ii in In||(In={}))Mi.call(In,ii)&&vr(Mn,ii,In[ii]);if(ji)for(var ii of ji(In))Oi.call(In,ii)&&vr(Mn,ii,In[ii]);return Mn},Cr=(Mn,In)=>Nr(Mn,Xo(In)),En=(Mn,In)=>{var ii={};for(var Ci in Mn)Mi.call(Mn,Ci)&&In.indexOf(Ci)<0&&(ii[Ci]=Mn[Ci]);if(Mn!=null&&ji)for(var Ci of ji(Mn))In.indexOf(Ci)<0&&Oi.call(Mn,Ci)&&(ii[Ci]=Mn[Ci]);return ii};const{Countdown:Ee}=lo.default;var gn=Mn=>{var In=Mn,{onChange:ii}=In,Ci=En(In,["onChange"]);const[Ji,Vt]=(0,le.useState)(null);(0,le.useEffect)(()=>{typeof Ji=="number"&&Ji>=0&&ii(Ji)},[Ji]);const Zt=It=>{const dn=Math.floor(It/1e3);Vt(dn)};return le.createElement(Ee,Cr(Dr({},Ci),{onChange:Zt}))}},99914:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Xe}});var le=be(67294);function Xe(Lt,At){const wt=(0,le.useRef)();(0,le.useEffect)(()=>{wt.current=Lt}),(0,le.useEffect)(()=>{function _e(){wt.current()}if(At!==null){let Ve=setInterval(_e,At);return()=>clearInterval(Ve)}},[At])}},96707:function(Rn,$n,be){"use strict";be.d($n,{h:function(){return le}});var le=(Xe=>(Xe[Xe.NOMATCH=-1]="NOMATCH",Xe[Xe.OK=0]="OK",Xe[Xe.TIMEOUT=2]="TIMEOUT",Xe[Xe.PODFAILURE=3]="PODFAILURE",Xe[Xe.COMPILEFAILURE=4]="COMPILEFAILURE",Xe[Xe.EXECUTEFAILURE=5]="EXECUTEFAILURE",Xe[Xe.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",Xe))(le||{})},88742:function(Rn,$n,be){"use strict";be.d($n,{H7:function(){return ne},MK:function(){return Te},MU:function(){return pt},X6:function(){return Ot},bM:function(){return ut},fi:function(){return te},fu:function(){return xt},n4:function(){return ce},rX:function(){return jt},vl:function(){return se},zO:function(){return Rt}});var le=be(33170),Xe=Object.defineProperty,Lt=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,_e=(ge,ye,we)=>ye in ge?Xe(ge,ye,{enumerable:!0,configurable:!0,writable:!0,value:we}):ge[ye]=we,Ve=(ge,ye)=>{for(var we in ye||(ye={}))At.call(ye,we)&&_e(ge,we,ye[we]);if(Lt)for(var we of Lt(ye))wt.call(ye,we)&&_e(ge,we,ye[we]);return ge};function xt(ge,ye){return(0,le.U2)(`myproblems/${ge}.json`,Ve({hidePopLogin:!0},ye||{}))}function ut(ge,ye){return(0,le.v_)(`myproblems/${ge}/code_submit.json`,ye)}function pt(ge,ye){return(0,le.v_)(`myproblems/${ge}/code_debug.json`,ye)}function Rt(ge,ye){return ye.language&&(ye.language=encodeURIComponent(ye.language)),(0,le.U2)(`myproblems/${ge}/submit_records.json`,ye)}function Ot(ge){return(0,le.U2)("myproblems/record_detail.json",{id:ge})}function jt(ge,ye){return(0,le.U2)(`myproblems/${ge}/result.json`,{mode:ye})}function Te(ge,ye){return(0,le.v_)(`myproblems/${ge}/add_notes.json`,ye)}function ne(ge,ye){return(0,le.v_)(`myproblems/${ge}/restore_initial_code.json`,ye)}function te(ge){return(0,le.v_)(`myproblems/${ge}/sync_code.json`)}function ce(ge,ye){return(0,le.v_)(`myproblems/${ge}/update_code.json`,ye)}function se(ge,ye){return(0,le.v_)(`discusses/${ge}/plus.json`,ye)}},38884:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return fu}});var le=be(67294),Xe={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"},Lt=be(91773),At=be(83062),wt=be(85804),_e=be(62844),Ve=be(37720),xt=be(2453),ut=be(28802),pt=be(96074),Rt=be(84567),Ot=be(55241),jt=be(71230),Te=be(15746),ne=be(14845),te=Object.defineProperty,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,ye=(St,Jt,ze)=>Jt in St?te(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,we=(St,Jt)=>{for(var ze in Jt||(Jt={}))se.call(Jt,ze)&&ye(St,ze,Jt[ze]);if(ce)for(var ze of ce(Jt))ge.call(Jt,ze)&&ye(St,ze,Jt[ze]);return St};const Ce=St=>React.createElement("svg",we({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},St),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 Re="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg==",We=be(65226),lt=be(35973),ht=be(28706),nt=be(33170),mt=Object.defineProperty,at=Object.getOwnPropertySymbols,Pt=Object.prototype.hasOwnProperty,Nt=Object.prototype.propertyIsEnumerable,Et=(St,Jt,ze)=>Jt in St?mt(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Ln=(St,Jt)=>{for(var ze in Jt||(Jt={}))Pt.call(Jt,ze)&&Et(St,ze,Jt[ze]);if(at)for(var ze of at(Jt))Nt.call(Jt,ze)&&Et(St,ze,Jt[ze]);return St};const xn=St=>React.createElement("svg",Ln({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},St),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 Nn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4=",fn=Object.defineProperty,Qe=Object.getOwnPropertySymbols,Ke=Object.prototype.hasOwnProperty,Je=Object.prototype.propertyIsEnumerable,_n=(St,Jt,ze)=>Jt in St?fn(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Xn=(St,Jt)=>{for(var ze in Jt||(Jt={}))Ke.call(Jt,ze)&&_n(St,ze,Jt[ze]);if(Qe)for(var ze of Qe(Jt))Je.call(Jt,ze)&&_n(St,ze,Jt[ze]);return St};const zt=St=>React.createElement("svg",Xn({width:34,height:34,xmlns:"http://www.w3.org/2000/svg"},St),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 kn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg==",bn=be(14375),oi=be(35567),Yt=be(35566),Mt=be(73646),_t={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"},mn=be(67294),rn=Object.defineProperty,He=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,Ue=Object.prototype.propertyIsEnumerable,Be=(St,Jt,ze)=>Jt in St?rn(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,ot=(St,Jt)=>{for(var ze in Jt||(Jt={}))Oe.call(Jt,ze)&&Be(St,ze,Jt[ze]);if(Fe)for(var ze of Fe(Jt))Ue.call(Jt,ze)&&Be(St,ze,Jt[ze]);return St},Cn=(St,Jt)=>He(St,Me(Jt)),ci=(St,Jt)=>{var ze={};for(var dt in St)Oe.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Fe)for(var dt of Fe(St))Jt.indexOf(dt)<0&&Ue.call(St,dt)&&(ze[dt]=St[dt]);return ze};const si=null,pn=(St,Jt)=>{var ze=St,{globalSetting:dt,loading:lr,dispatch:rr,isEdit:kr,editData:tr}=ze,Yn=ci(ze,["globalSetting","loading","dispatch","isEdit","editData"]);const[Tr,Lr]=(0,le.useState)(""),[Vr,mr]=(0,le.useState)(""),[zo,Ii]=(0,le.useState)([]),[vi,Ai]=(0,le.useState)(""),[Or,Ur]=(0,le.useState)(),[Fr,ko]=(0,le.useState)(!1),[yr,vo]=(0,le.useState)({}),[Xi,Gr]=(0,le.useState)([]);(0,le.useEffect)(()=>{!tr||!kr||(Lr(tr==null?void 0:tr.name),mr(tr==null?void 0:tr.analysis),Ur(tr==null?void 0:tr.is_ordered),vo(tr),ko(!0))},[tr]),(0,le.useEffect)(()=>{if(!Fr)return;const Da=tr==null?void 0:tr.standard_answer.map(yl=>yl==null?void 0:yl.answer_text);Ii(Da);const jo=tr==null?void 0:tr.standard_answer.map(yl=>yl==null?void 0:yl.score);Gr(jo),ko(!1)},[Fr]),(0,le.useImperativeHandle)(Jt,()=>({onSave:mo,Clear:aa}));const mo=()=>{let Da=[],jo=!1;return Tr?(zo.forEach((yl,Ls)=>{Da.push({position:Ls+1,answer_text:[],score:Xi[Ls]}),yl==null||yl.forEach((Rl,Oc)=>{Da[Ls].answer_text.push(Rl),(!Rl||!(0,ht.eR)(Rl,1e4))&&(Ai(`${Ls}-${Oc}`),xt.ZP.info(Rl?"\u7B54\u6848\u4E0D\u80FD\u8D85\u8FC710000\u5B57\u7B26":"\u7B54\u6848\uFF1A\u4E0D\u80FD\u4E3A\u7A7A"),jo=!0)})}),jo?!1:(Da==null?void 0:Da.length)>20?(xt.ZP.warning("\u586B\u7A7A\u9898\u6807\u51C6\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A/\u4E0D\u80FD\u8D85\u8FC720\u4E2A\uFF01"),!1):{name:Tr,analysis:Vr,standard_answers:Da,is_ordered:Or,downcase:yr==null?void 0:yr.downcase,no_space:yr==null?void 0:yr.no_space,use_blank_score:yr==null?void 0:yr.use_blank_score}):(xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1)},aa=()=>{Lr(""),mr(""),Ii([]),Ur(!1)},ka=(Da,jo,yl)=>{const Ls=zo.slice();if(jo&&Ls.splice(Da,jo),yl)for(let Rl=0;Rl<yl;Rl++)Ls.splice(Da+Rl,0,[""]);Ii(Ls)},Fs=(Da,jo,yl)=>{Ai("");let Ls=zo.slice();Ls[Da][jo]=yl,Ii(Ls)},Kr=Da=>{let jo=zo.slice();jo[Da]=[...jo[Da],""],Ii(jo)},Xl=(Da,jo)=>{let yl=zo.slice();if(!yl[Da][jo]){yl[Da]=yl[Da].filter((Ls,Rl)=>Rl!==jo),Ii(yl);return}_e.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:_t.modal,onOk:()=>{yl[Da]=yl[Da].filter((Ls,Rl)=>Rl!==jo),Ii(yl)}})},Fo=Da=>{_e.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:_t.modal,onOk:()=>{let jo=zo.slice();jo=zo.filter((yl,Ls)=>Da!==Ls),Ii(jo)}})};return mn.createElement("section",{className:_t.wrap},mn.createElement("p",{className:_t.titleWrap},mn.createElement("span",{className:_t.required},"*"),mn.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),mn.createElement("div",null,mn.createElement(Yt.Z,{id:"completion-question-tittle",placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE",height:155,defaultValue:Tr,onChange:Da=>Lr(Da),showNullButton:!0,onPlaceholderChange:ka})),mn.createElement("div",{className:"mt20"},zo.map((Da,jo)=>mn.createElement("div",{style:{display:"flex"}},mn.createElement("div",{style:{flex:1}},mn.createElement(Mt.Z,{key:jo,answers:Da,index:jo,flex:1,is_md:!0,activeOptionErrorIndex:vi,onAnswerChange:Fs,addChildAnswer:Kr,deleteChildAnswer:Xl,deleteChildAnswermain:Fo})),yr.use_blank_score&&mn.createElement("div",{style:{display:"flex",alignItems:"center",width:"165px"}},mn.createElement("span",{style:{color:"red",margin:"auto 5px auto 10px"}},"*"),"\u5206\u503C\uFF1A",mn.createElement(Ve.Z,{style:{width:"100px"},size:"large",defaultValue:Xi[jo],onBlur:yl=>{Xi[jo]=yl.target.value,Gr([...Xi])}}))))),mn.createElement("div",null,mn.createElement(Rt.default,{className:`${_t.color333} font14 mt20`,checked:yr.use_blank_score,onChange:Da=>vo(Cn(ot({},yr),{use_blank_score:Da.target.checked}))},"\u5224\u5206\u65F6\u6309\u7A7A\u7ED9\u5206"),mn.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")),mn.createElement("div",null,mn.createElement(Rt.default,{className:`${_t.color333} font14 mt20`,checked:yr.downcase,onChange:Da=>vo(Cn(ot({},yr),{downcase:Da.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),mn.createElement("div",null,mn.createElement(Rt.default,{className:`${_t.color333} font14 mt20`,checked:yr.no_space,onChange:Da=>vo(Cn(ot({},yr),{no_space:Da.target.checked}))},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),mn.createElement("div",{className:"mt20"},(zo==null?void 0:zo.length)>1&&mn.createElement("span",null,mn.createElement(Rt.default,{checked:Or,onChange:Da=>Ur(Da.target.checked),className:`${_t.color333} font14`},"\u591A\u4E2A\u586B\u7A7A\u7684\u7B54\u6848\u6709\u987A\u5E8F\u8981\u6C42"),mn.createElement("span",{className:`${_t.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"))),mn.createElement("p",{className:_t.titleWrap},mn.createElement("span",{className:_t.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),mn.createElement(oi.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Vr,onChange:Da=>mr(Da)}))};var qn=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(pn)),en=be(98813),wi=Object.getOwnPropertySymbols,Si=Object.prototype.hasOwnProperty,Di=Object.prototype.propertyIsEnumerable,Ti=(St,Jt)=>{var ze={};for(var dt in St)Si.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&wi)for(var dt of wi(St))Jt.indexOf(dt)<0&&Di.call(St,dt)&&(ze[dt]=St[dt]);return ze};const ro=null,Zr=(St,Jt)=>{var ze=St,{globalSetting:dt,loading:lr,editData:rr,dispatch:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=Ti(ze,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)(),[mr,zo]=(0,le.useState)(""),[Ii,vi]=(0,le.useState)("");(0,le.useEffect)(()=>{if(!rr||!Yn)return;zo(rr==null?void 0:rr.name),vi(rr==null?void 0:rr.analysis);const Ur=rr==null?void 0:rr.choices.find(Fr=>Fr.is_answer);Vr(Ur.choice_text==="\u6B63\u786E"?"0":"1")},[rr]),(0,le.useImperativeHandle)(Jt,()=>({onSave:Ai,Clear:Or}));const Ai=()=>mr?Lr?{name:mr,choices:[{choice_text:"\u6B63\u786E",is_answer:Lr==="0"?1:0},{choice_text:"\u9519\u8BEF",is_answer:Lr==="1"?1:0}],analysis:Ii}:(xt.ZP.info("\u8BF7\u5148\u70B9\u51FB\u9009\u62E9\u672C\u9009\u62E9\u9898\u7684\u6B63\u786E\u9009\u9879"),!1):(xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1),Or=()=>{zo(""),vi(""),Vr("")};return le.createElement("section",{className:_t.wrap},le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),le.createElement(oi.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:mr,onChange:Ur=>zo(Ur)}),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:_t.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),le.createElement(en.ZP.Group,{buttonStyle:"solid",value:Lr,onChange:Ur=>Vr(Ur.target.value)},le.createElement(en.ZP.Button,{value:"0",className:`${_t.radio} mr40`},"\u6B63\u786E"),le.createElement(en.ZP.Button,{value:"1",className:_t.radio},"\u9519\u8BEF")),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(oi.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ii,onChange:Ur=>vi(Ur)}))};var Fi=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Zr)),mi=Object.getOwnPropertySymbols,Co=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,yn=(St,Jt)=>{var ze={};for(var dt in St)Co.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&mi)for(var dt of mi(St))Jt.indexOf(dt)<0&&jn.call(St,dt)&&(ze[dt]=St[dt]);return ze};const Jr=null,lo=(St,Jt)=>{var ze=St,{globalSetting:dt,loading:lr,editData:rr,dispatch:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=yn(ze,["globalSetting","loading","editData","dispatch","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)([]);(0,le.useEffect)(()=>{var vi;if(!rr||!Yn)return;const Ai=(vi=rr==null?void 0:rr.shixun)==null?void 0:vi.challenges.map(Or=>({id:Or==null?void 0:Or.id,score:Or.score}));Vr(Ai)},[rr]),(0,le.useImperativeHandle)(Jt,()=>({onSave:mr,Clear:zo}));const mr=()=>({challenges:[...Lr]}),zo=()=>{Vr([])};console.log("editData--",rr);const Ii=vi=>{var Ai,Or;return le.createElement("div",null,(Or=(Ai=vi==null?void 0:vi.shixun)==null?void 0:Ai.challenges)==null?void 0:Or.map((Ur,Fr)=>{var ko;return le.createElement("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",Fr+1,"\u5173"),le.createElement(At.Z,{key:Fr,title:Ur==null?void 0:Ur.challenge_name},le.createElement("span",null,(0,ht.Pq)(Ur==null?void 0:Ur.challenge_name,44)))),le.createElement("p",{style:{marginBottom:0}},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u5206\u503C\uFF1A"),le.createElement(Ve.Z,{precision:1,min:1,max:100,className:_t.baseFormItem,style:{width:176},value:(ko=Lr.find(yr=>yr.id===Ur.id))==null?void 0:ko.score,onChange:yr=>{Lr.find(vo=>vo.id===Ur.id).score=yr,Vr([...Lr])}})))}),le.createElement("div",{style:{clear:"both"}}))};return le.createElement("section",{className:_t.wrap},le.createElement(We.Z,{style:{paddingRight:10},className:_t.titleHtml,value:`${rr==null?void 0:rr.position}\u3001${rr==null?void 0:rr.name}`}),le.createElement("p",{style:{marginBottom:"10px",marginTop:"25px"}},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u5173\u5361")),Ii(rr))};var hr=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(lo)),Nr=Object.getOwnPropertySymbols,Xo=Object.prototype.hasOwnProperty,ji=Object.prototype.propertyIsEnumerable,Mi=(St,Jt)=>{var ze={};for(var dt in St)Xo.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Nr)for(var dt of Nr(St))Jt.indexOf(dt)<0&&ji.call(St,dt)&&(ze[dt]=St[dt]);return ze};const Oi=["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"],vr=(St,Jt)=>{var ze=St,{editData:dt,globalSetting:lr,loading:rr,dispatch:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=Mi(ze,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)([]),[mr,zo]=(0,le.useState)(),[Ii,vi]=(0,le.useState)([]),[Ai,Or]=(0,le.useState)(""),[Ur,Fr]=(0,le.useState)("");(0,le.useEffect)(()=>{Vr(["","","",""])},[]),(0,le.useEffect)(()=>{if(!dt||!Yn)return;Or(dt==null?void 0:dt.name),Fr(dt==null?void 0:dt.analysis),Vr(dt==null?void 0:dt.choices.map(Xi=>Xi.choice_text));const vo=[];dt==null||dt.choices.map((Xi,Gr)=>{Xi.is_answer&&vo.push(Gr)}),vi(vo)},[dt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:ko,Clear:yr}));const ko=()=>{if(!Ai)return xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const vo=Lr.findIndex(Gr=>!Gr);if(vo>-1)return xt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${Oi[vo]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Ii.length)return xt.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(Ii.length<2)return xt.ZP.info("\u591A\u9009\u9898\u6700\u5C0F\u6B63\u786E\u9009\u9879\u4E3A2\u4E2A"),!1;const Xi=Lr.map((Gr,mo)=>({choice_text:Gr,is_answer:Ii.includes(mo)?1:0}));return{name:Ai,choices:Xi,analysis:Ur}},yr=()=>{Vr(["","","",""]),Or(""),Fr(""),vi("")};return le.createElement("section",{className:_t.wrap},le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),le.createElement(oi.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ai,onChange:vo=>Or(vo)}),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:_t.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Lr.map((vo,Xi)=>le.createElement("div",{className:_t.choiceWrap,key:Xi},le.createElement(At.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${_t.answer} ${Ii.includes(Xi)?_t.activeAnswer:""}`,onClick:()=>{Ii.includes(Xi)?vi(Ii.filter(Gr=>Gr!==Xi)):vi([...Ii,Xi])}},Oi[Xi])),le.createElement("div",{className:_t.editorWrap},mr===Xi?le.createElement(oi.Z,{id:`single-question-option-${Xi}`,watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:vo,onChange:Gr=>{Lr[Xi]=Gr,Vr(Lr)}}):le.createElement("div",{className:_t.htmlWrap,onClick:()=>zo(Xi)},le.createElement(We.Z,{value:vo}))),Xi>1&&le.createElement(At.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${_t.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Vr(Lr.filter((Gr,mo)=>mo!==Xi)),Ii.includes(Xi)?vi(Ii.filter(Gr=>Gr!==Xi)):vi([...Ii,Xi])}})),Xi<7&&Xi===Lr.length-1&&le.createElement(At.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${_t.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Vr([...Lr,""])})))),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(oi.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ur,onChange:vo=>Fr(vo)}))};var Dr=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(vr)),Cr=Object.getOwnPropertySymbols,En=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,on=(St,Jt)=>{var ze={};for(var dt in St)En.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Cr)for(var dt of Cr(St))Jt.indexOf(dt)<0&&Ee.call(St,dt)&&(ze[dt]=St[dt]);return ze};const gn=["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"],Mn=(St,Jt)=>{var ze=St,{editData:dt,globalSetting:lr,loading:rr,dispatch:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=on(ze,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)([]),[mr,zo]=(0,le.useState)(),[Ii,vi]=(0,le.useState)(),[Ai,Or]=(0,le.useState)(""),[Ur,Fr]=(0,le.useState)("");(0,le.useEffect)(()=>{Vr(["","","",""])},[]),(0,le.useEffect)(()=>{if(!dt||!Yn)return;const vo=[],Xi=[];dt==null||dt.choices.forEach((Gr,mo)=>{vo.push(Gr.choice_text),Gr.is_answer&&Xi.push(mo)}),Or(dt==null?void 0:dt.name),Fr(dt==null?void 0:dt.analysis),Vr(vo),vi(Xi)},[dt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:ko,Clear:yr}));const ko=()=>{if(!Ai)return xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;const vo=Lr.findIndex(Gr=>!Gr);if(vo>-1)return xt.ZP.info(`\u8BF7\u5148\u8F93\u5165 ${gn[vo]} \u9009\u9879\u7684\u5185\u5BB9`),!1;if(!Array.isArray(Ii))return xt.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=Lr.map((Gr,mo)=>({choice_text:Gr,is_answer:Ii.includes(mo)?1:0}));return{name:Ai,choices:Xi,analysis:Ur}},yr=()=>{Vr(["","","",""]),Or(""),Fr(""),vi("")};return le.createElement("section",{className:_t.wrap},le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),le.createElement(oi.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Ai,onChange:vo=>Or(vo)}),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.required},"*"),le.createElement("span",{className:_t.title},"\u7B54\u6848\u9009\u9879\uFF1A",le.createElement("span",{className:_t.colorGray},"\u70B9\u51FB\u9009\u9879\u53EF\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))),Lr.map((vo,Xi)=>le.createElement("div",{className:_t.choiceWrap,key:Xi},le.createElement(At.Z,{title:"\u70B9\u51FB\u8BBE\u7F6E\u4E3A\u6807\u51C6\u7B54\u6848",placement:"left"},le.createElement("div",{className:`${_t.answer} ${Ii!=null&&Ii.includes(Xi)?_t.activeAnswer:""}`,onClick:()=>vi([Xi])},gn[Xi])),le.createElement("div",{className:_t.editorWrap},mr===Xi?le.createElement(oi.Z,{id:`single-question-option-${Xi}`,watch:!0,height:155,isFocus:!0,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",defaultValue:vo,onChange:Gr=>{Lr[Xi]=Gr,Vr(Lr)}}):le.createElement("div",{className:_t.htmlWrap,onClick:()=>zo(Xi)},le.createElement(We.Z,{value:vo}))),Xi>1&&le.createElement(At.Z,{title:"\u5220\u9664"},le.createElement("i",{className:`${_t.deleteIcon} iconfont icon-htmal5icon19`,onClick:()=>{Vr(Lr.filter((Gr,mo)=>mo!==Xi)),Xi===Ii&&vi(null)}})),Xi<7&&Xi===Lr.length-1&&le.createElement(At.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},le.createElement("i",{className:`${_t.addIcon} iconfont icon-roundaddfill ml6`,onClick:()=>Vr([...Lr,""])})))),le.createElement("p",{className:_t.titleWrap},le.createElement("span",{className:_t.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),le.createElement(oi.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:Ur,onChange:vo=>Fr(vo)}))};var In=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Mn)),ii=be(66309),Ci=be(59637),Ji=be(17663),Vt=be(67294),Zt=Object.defineProperty,It=Object.defineProperties,dn=Object.getOwnPropertyDescriptors,Ri=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,Kt=(St,Jt,ze)=>Jt in St?Zt(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,wn=(St,Jt)=>{for(var ze in Jt||(Jt={}))hi.call(Jt,ze)&&Kt(St,ze,Jt[ze]);if(Ri)for(var ze of Ri(Jt))ri.call(Jt,ze)&&Kt(St,ze,Jt[ze]);return St},Ki=(St,Jt)=>It(St,dn(Jt)),wr=(St,Jt)=>{var ze={};for(var dt in St)hi.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Ri)for(var dt of Ri(St))Jt.indexOf(dt)<0&&ri.call(St,dt)&&(ze[dt]=St[dt]);return ze},Kn=(St,Jt,ze)=>new Promise((dt,lr)=>{var rr=Yn=>{try{tr(ze.next(Yn))}catch(Tr){lr(Tr)}},kr=Yn=>{try{tr(ze.throw(Yn))}catch(Tr){lr(Tr)}},tr=Yn=>Yn.done?dt(Yn.value):Promise.resolve(Yn.value).then(rr,kr);tr((ze=ze.apply(St,Jt)).next())});const Wt=St=>{if(!St)return!1;if(/^s*$/.test(St)||St.trim()===""){xt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u5168\u4E3A\u7A7A\u683C");return}let Jt=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 St==="|"?(xt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Yi=({value:St=[],onClose:Jt})=>Vt.createElement(ii.default,{closable:!0,onClose:Jt,className:_t.keywordTag},Vt.createElement("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"}},St.join(" \u6216 "))),pr=(St,Jt)=>{var ze=St,{editData:dt,globalSetting:lr,loading:rr,dispatch:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=wr(ze,["editData","globalSetting","loading","dispatch","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)(""),[mr,zo]=(0,le.useState)(""),[Ii,vi]=(0,le.useState)(""),[Ai,Or]=(0,le.useState)(""),[Ur]=Lt.default.useForm(),Fr=Lt.default.useWatch("use_keywords",Ur);(0,le.useEffect)(()=>{var Xi;!dt||!Yn||(Vr(dt==null?void 0:dt.name),zo(dt==null?void 0:dt.analysis),vi((Xi=dt==null?void 0:dt.answer_texts)==null?void 0:Xi[0]),Ur.setFieldsValue(wn({},dt)))},[dt]),(0,le.useImperativeHandle)(Jt,()=>({onSave:ko,Clear:yr}));const ko=()=>Kn(void 0,null,function*(){if(!Lr)return xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Ur.validateFields()}catch(Gr){xt.ZP.error(Gr.errorFields[0].errors[0]);return}const Xi=Ur.getFieldsValue();return console.log(Xi,"values"),wn({name:Lr,answer_texts:[Ii],analysis:mr},Xi)}),yr=()=>{Vr(""),zo(""),vi(""),Ur.resetFields()},vo=dt==null?void 0:dt.score;return Vt.createElement("section",{className:_t.wrap},Vt.createElement("p",{className:_t.titleWrap},Vt.createElement("span",{className:_t.required},"*"),Vt.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),Vt.createElement(oi.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Lr,onChange:Xi=>Vr(Xi)}),Vt.createElement("p",{className:_t.titleWrap},Vt.createElement("span",{className:_t.title},"\u53C2\u8003\u7B54\u6848\uFF1A")),Vt.createElement(oi.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u53C2\u8003\u7B54\u6848",defaultValue:Ii,onChange:Xi=>vi(Xi)}),Vt.createElement("p",{className:_t.titleWrap},Vt.createElement("span",{className:_t.title},"\u9898\u76EE\u89E3\u6790\uFF1A")),Vt.createElement(oi.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u76EE\u89E3\u6790",defaultValue:mr,onChange:Xi=>zo(Xi)}),Vt.createElement(Lt.default,{form:Ur,size:"large",onFinishFailed:Xi=>Kn(void 0,null,function*(){var Gr,mo;xt.ZP.error(Xi.errorFields[0].errors[0]),Ur.scrollToField((mo=(Gr=Xi==null?void 0:Xi.errorFields)==null?void 0:Gr[0])==null?void 0:mo.name,{behavior:"smooth",block:"center"})})},Vt.createElement(jt.Z,{align:"middle",className:"mb30 mt20"},Vt.createElement(Lt.default.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked"},Vt.createElement(Ci.Z,null)),Vt.createElement(Te.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),Vt.createElement(Te.Z,null,Vt.createElement(At.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"},Vt.createElement(Ji.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),Fr&&Vt.createElement(Lt.default.List,{name:"keywords",rules:[{validator(Xi,Gr){return Gr!=null&&Gr.length?(Gr==null?void 0:Gr.reduce((aa,ka)=>aa+ka.score,0))>parseFloat(vo)?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:Gr,remove:mo})=>Vt.createElement(Vt.Fragment,null,Vt.createElement("div",{className:"mb10"},"\u5173\u952E\u8BCD"),Vt.createElement(jt.Z,{align:"middle",className:"font14 mb30"},Vt.createElement(Te.Z,{flex:1},Vt.createElement(ut.default,{value:Ai,onChange:aa=>{Or(aa.target.value)},maxLength:50,allowClear:!0,onPressEnter:aa=>{var ka,Fs,Kr,Xl;const Fo=`${(ka=aa.target)==null?void 0:ka.value}`,Da=(Kr=(Fs=Fo==null?void 0:Fo.split("|"))==null?void 0:Fs.filter(Ls=>!!Ls))==null?void 0:Kr.map(Ls=>Ls==null?void 0:Ls.trim()),jo=Ur.getFieldValue("keywords"),yl=((Xl=jo==null?void 0:jo.map(Ls=>Ls==null?void 0:Ls.keyword))==null?void 0:Xl.flat())||[];for(const Ls of Da)if(yl.includes(Ls)){xt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Wt(Fo)&&(Gr({keyword:Da,score:1}),Or(""))},className:_t.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"})),Vt.createElement(Te.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Xi.map(aa=>{var ka=aa,{key:Fs,name:Kr}=ka,Xl=wr(ka,["key","name"]);return Vt.createElement(jt.Z,{key:Fs,style:{marginRight:148}},Vt.createElement(Te.Z,{flex:1},Vt.createElement(jt.Z,{align:"middle",justify:"space-between"},Vt.createElement(Lt.default.Item,Ki(wn({},Xl),{name:[Kr,"keyword"]}),Vt.createElement(Yi,{onClose:()=>mo(Kr)})),Vt.createElement(Lt.default.Item,Ki(wn({},Xl),{name:[Kr,"score"],label:"\u5206\u503C",rules:[{required:!0}]}),Vt.createElement(Ve.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))})))))};var Ro=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(pr)),Zn=be(69234),Ni={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"},Pi=be(40043),xs=be(24018),qa=Object.defineProperty,Ar=Object.defineProperties,br=Object.getOwnPropertyDescriptors,Rr=Object.getOwnPropertySymbols,xa=Object.prototype.hasOwnProperty,Ka=Object.prototype.propertyIsEnumerable,_i=(St,Jt,ze)=>Jt in St?qa(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,yo=(St,Jt)=>{for(var ze in Jt||(Jt={}))xa.call(Jt,ze)&&_i(St,ze,Jt[ze]);if(Rr)for(var ze of Rr(Jt))Ka.call(Jt,ze)&&_i(St,ze,Jt[ze]);return St},zl=(St,Jt)=>Ar(St,br(Jt)),ms=(St,Jt)=>{var ze={};for(var dt in St)xa.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Rr)for(var dt of Rr(St))Jt.indexOf(dt)<0&&Ka.call(St,dt)&&(ze[dt]=St[dt]);return ze};const as=St=>{var Jt=St,{value:ze,onChange:dt,scrollId:lr}=Jt,rr=ms(Jt,["value","onChange","scrollId"]);return le.createElement("div",{id:lr||""},le.createElement(oi.Z,zl(yo({},rr),{defaultValue:ze,onChange:(kr,tr)=>{tr!=null&&tr.length?dt(kr,tr):dt(kr)}})))},Qt=({value:St,onChange:Jt,placeholder:ze,height:dt=140,isEdit:lr})=>lr?le.createElement(oi.Z,{watch:!0,isFocus:!0,height:dt,placeholder:ze,defaultValue:St,onChange:Jt}):le.createElement("div",{style:{cursor:"pointer"}},St?le.createElement(We.Z,{className:Ni.inputBorder,value:St}):le.createElement("div",{className:`${Ni.inputBorder} ${Ni.placeholder}`},ze));var Br=be(67294),ba=Object.defineProperty,to=Object.defineProperties,vs=Object.getOwnPropertyDescriptors,La=Object.getOwnPropertySymbols,Za=Object.prototype.hasOwnProperty,wa=Object.prototype.propertyIsEnumerable,ca=(St,Jt,ze)=>Jt in St?ba(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Ya=(St,Jt)=>{for(var ze in Jt||(Jt={}))Za.call(Jt,ze)&&ca(St,ze,Jt[ze]);if(La)for(var ze of La(Jt))wa.call(Jt,ze)&&ca(St,ze,Jt[ze]);return St},Un=(St,Jt)=>to(St,vs(Jt)),js=(St,Jt)=>{var ze={};for(var dt in St)Za.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&La)for(var dt of La(St))Jt.indexOf(dt)<0&&wa.call(St,dt)&&(ze[dt]=St[dt]);return ze};const zn=["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"],_a=({value:St,onChange:Jt,choiceTextKey:ze,answerKey:dt,index:lr,isEdit:rr,setInputActive:kr,form:tr,choiceOptionsPath:Yn,allowChangeMode:Tr,showAddIcon:Lr,addItem:Vr,deleteItem:mr})=>{const zo=(St==null?void 0:St[dt])===!0,Ii=()=>{const Ai=tr.getFieldValue(Yn);tr.setFieldValue(Yn,Ai.map(Or=>Un(Ya({},Or),{[dt]:!1})))},vi=()=>{zo?Jt(Un(Ya({},St),{[dt]:!1})):(Tr||Ii(),Jt(Un(Ya({},St),{[dt]:!0})))};return Br.createElement(jt.Z,{className:Ni.choiceWrap,align:"middle",wrap:!1},Br.createElement(Te.Z,{onClick:vi,className:`${Ni.choiceIndex} ${zo?Ni.activeAnswer:""}`},zn[lr]),Br.createElement(Te.Z,{flex:1,className:`${Ni.editorWrap} ml15`,onClick:kr},Br.createElement(Qt,{height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9009\u9879",isEdit:rr,value:St==null?void 0:St[ze],onChange:Ai=>{Jt(Un(Ya({},St),{[ze]:Ai}))}})),Br.createElement(Te.Z,{flex:"0 0 auto",className:"ml15"},Br.createElement("div",{onClick:vi,className:`${Ni.setAnswerBtn} ${zo?Ni.activeAnswer:""}`},zo?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")),Br.createElement(Te.Z,{className:Ni.actionWrapper},Br.createElement(At.Z,{title:"\u65B0\u589E\u53C2\u8003\u7B54\u6848"},Br.createElement(Pi.Z,{className:Ni.addIcon,onClick:Vr,style:{visibility:Lr?"visible":"hidden"}})),Br.createElement(At.Z,{title:"\u5220\u9664"},Br.createElement(xs.Z,{className:Ni.deleteIcon,onClick:mr,style:{visibility:lr>1?"visible":"hidden"}}))))},Sl=({questionTitlePlaceholder:St,titleKey:Jt,choiceKey:ze,analysisKey:dt,choiceTextKey:lr,answerKey:rr,choiceOptionsPath:kr,allowChangeMode:tr=!0,form:Yn,showAnalysis:Tr=!0})=>{const[Lr,Vr]=(0,le.useState)(),[mr,zo]=(0,le.useState)(!1);return Br.createElement("div",{className:Ni.wrap},Br.createElement("div",{className:Ni.questionTitleEditorWrap},Br.createElement(Lt.default.Item,{label:"\u9898\u5E72",name:Jt,labelCol:{span:24},rules:[{required:!0}]},Br.createElement(as,{scrollId:Array.isArray(Jt)?Jt.join("_"):`${Jt}`,watch:!0,height:140,placeholder:St}))),Br.createElement(Lt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),Br.createElement(Lt.default.List,{name:ze,rules:[{validator(Ii,vi){const Ai=vi.some(Ur=>Ur[rr]),Or=vi.findIndex(Ur=>{var Fr;return((Fr=Ur[lr])==null?void 0:Fr.length)<=0});return Or!==-1?Promise.reject(new Error(`\u8BF7\u5148\u8F93\u5165${zn[Or]}\u9009\u9879\u7684\u5185\u5BB9`)):Ai?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},(Ii,{add:vi,remove:Ai})=>Br.createElement("div",{id:Array.isArray(kr)?kr.join("_"):`${kr}`},Ii.map((Or,Ur)=>{var Fr=Or,{key:ko,name:yr}=Fr,vo=js(Fr,["key","name"]);const Xi=Lr===ko,Gr=()=>{Vr(ko)},mo=Ur<7&&Ur===Ii.length-1,aa=()=>vi({[lr]:"",[rr]:0}),ka=()=>Ai(yr);return Br.createElement(Lt.default.Item,Un(Ya({},vo),{key:ko,name:yr,noStyle:!0}),Br.createElement(_a,{choiceTextKey:lr,answerKey:rr,index:Ur,isEdit:Xi,setInputActive:Gr,form:Yn,choiceOptionsPath:kr,allowChangeMode:tr,showAddIcon:mo,addItem:aa,deleteItem:ka}))}),Ii.length<8&&Br.createElement("div",{className:`${Ni.addBtn} mb30`,onClick:()=>vi({[lr]:"",[rr]:0})},"\u6DFB\u52A0\u9009\u9879"))),Tr&&Br.createElement("div",{onClick:()=>zo(!0)},Br.createElement(Lt.default.Item,{name:dt,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},Br.createElement(Qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:mr}))))};var No=be(67294),kl=Object.defineProperty,bs=Object.defineProperties,ja=Object.getOwnPropertyDescriptors,es=Object.getOwnPropertySymbols,fl=Object.prototype.hasOwnProperty,ps=Object.prototype.propertyIsEnumerable,sr=(St,Jt,ze)=>Jt in St?kl(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,tt=(St,Jt)=>{for(var ze in Jt||(Jt={}))fl.call(Jt,ze)&&sr(St,ze,Jt[ze]);if(es)for(var ze of es(Jt))ps.call(Jt,ze)&&sr(St,ze,Jt[ze]);return St},il=(St,Jt)=>bs(St,ja(Jt)),ql=(St,Jt)=>{var ze={};for(var dt in St)fl.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&es)for(var dt of es(St))Jt.indexOf(dt)<0&&ps.call(St,dt)&&(ze[dt]=St[dt]);return ze};const rl=({value:St,onChange:Jt})=>{const ze=lr=>{_e.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:Ni.modal,onOk:()=>{const rr=[...St];rr.splice(lr,1),Jt(rr)}})},dt=()=>{const lr=[...St];lr.push(""),Jt(lr)};return No.createElement(jt.Z,{align:"middle",className:"ml20",gutter:[40,20]},St==null?void 0:St.map((lr,rr)=>No.createElement(Te.Z,{key:`${lr}_${rr}`,className:Ni.blankWrapper},No.createElement(ut.default,{className:Ni.blankInput,defaultValue:lr,maxLength:1e3,onBlur:kr=>{const tr=[...St],Yn=kr.target.value.trim();tr[rr]=Yn,Jt(tr)}}),No.createElement(At.Z,{title:"\u5220\u9664"},No.createElement(xs.Z,{className:Ni.deleteIcon,style:{marginLeft:15,visibility:rr>0?"visible":"hidden"},onClick:()=>ze(rr)})))),No.createElement(Te.Z,null,No.createElement("div",{className:`${Ni.addBtn}`,onClick:()=>{dt()}},"\u65B0\u589E\u7B54\u6848")))},Il=({value:St=!0,onChange:Jt})=>No.createElement(Ci.Z,{checked:!St,onChange:ze=>{Jt(!ze)}}),nu="\u2581",Mu=({questionTitlePlaceholder:St,form:Jt,name:ze,scoreByBlank:dt="use_blank_score",answerKey:lr,titleKey:rr="name",analysisKey:kr="analysis",isOrdered:tr="is_ordered"})=>{var Yn,Tr;const[Lr,Vr]=(0,le.useState)(!1),mr=(ko,yr)=>{const vo=yr.line;let Xi=0;for(let mo=0;mo<vo;mo++)Xi+=ko.getLine(mo).split(nu).length-1;const Gr=ko.getLine(vo).substring(0,yr.ch);return Xi+=Gr.split(nu).length-1,Xi},zo=(ko,yr,vo,Xi)=>{const Gr=ko.getRange(yr.from,yr.to);let mo=0;if(yr.text.forEach(aa=>{mo+=aa.split(nu).length-1}),yr.origin!=="setValue"){if(Gr&&Gr.indexOf(nu)!==-1){const aa=Gr.split(nu).length-1,ka=mr(ko,yr.from);if(console.log(`\u5220\u9664${aa}\u4E2A\uFF0C \u524D\u9762\u6709${ka}\u4E2A\uFF0C\u65B0\u589E${mo}\u4E2A`),aa>1){const Fs=Array.from({length:aa},(Kr,Xl)=>ka+Xl);Xi(Fs)}else Xi(ka)}else if(mo>0){const aa=mr(ko,yr.from);console.log(`\u65B0\u589E${mo}\u4E2A\uFF0C\u4E4B\u524D\u6709${aa}\u4E2A`),vo(mo,aa)}}},Ii=()=>{const ko=Jt.getFieldValue(["sub_item_banks",...lr]);Jt.setFieldValue(["sub_item_banks",...lr],ko==null?void 0:ko.map((yr,vo)=>il(tt({},yr),{position:vo+1})))},vi=(0,le.useRef)(),Ai=(ko,yr)=>{for(let vo=0;vo<ko;vo++)vi.current({position:null,answer_text:[""]},yr+vo);Ii()},Or=(0,le.useRef)(),Ur=ko=>{Or.current(ko),Ii()},Fr=(Tr=(Yn=Jt.getFieldValue("sub_item_banks"))==null?void 0:Yn[lr==null?void 0:lr[0]])==null?void 0:Tr[lr==null?void 0:lr[1]];return No.createElement("div",{className:Ni.wrap},No.createElement("div",{className:Ni.questionTitleEditorWrap},No.createElement(Lt.default.Item,{label:"\u9898\u5E72",name:rr,labelCol:{span:24},rules:[{required:!0}]},No.createElement(as,{scrollId:"name",watch:!0,height:140,placeholder:St,showNullButton:!0,onCMBeforeChange:(ko,yr)=>{zo(ko,yr,Ai,Ur)}}))),No.createElement(Lt.default.List,{name:lr,rules:[{validator(ko,yr){if((yr==null?void 0:yr.length)===0)return Promise.reject(new Error("\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"));for(const vo of yr){const{answer_text:Xi}=vo||{};if(Xi!=null&&Xi.some(Gr=>(Gr==null?void 0:Gr.length)===0))return Promise.reject(new Error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"))}return Promise.resolve()}}]},(ko,{add:yr,remove:vo},{errors:Xi})=>(vi.current=yr,Or.current=vo,No.createElement(No.Fragment,null,No.createElement(Lt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}}),ko.map((Gr,mo)=>{var aa=Gr,{key:ka,name:Fs}=aa,Kr=ql(aa,["key","name"]);return No.createElement(jt.Z,{className:"mb20",key:ka,align:"middle",wrap:!1},No.createElement(Te.Z,{flex:"0 0 auto",className:`${Ni.blankIndex}`},"\u586B\u7A7A\u9879",mo+1),No.createElement(Te.Z,{flex:1},No.createElement(jt.Z,{align:"top",justify:"space-between",wrap:!1},No.createElement(Te.Z,null,No.createElement(Lt.default.Item,il(tt({},Kr),{name:[Fs,"answer_text"],noStyle:!0}),No.createElement(rl,null))),(Jt==null?void 0:Jt.getFieldValue(["sub_item_banks",...dt]))&&No.createElement(Te.Z,{flex:"224px"},No.createElement(Lt.default.Item,il(tt({},Kr),{name:[Fs,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ni.blankInputNumberWrapper}),No.createElement(Ve.Z,{className:Ni.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"\u6309\u7A7A\u7ED9\u5206\u8BF7\u8F93\u5165\u5206\u503C"})))),No.createElement(Lt.default.Item,il(tt({},Kr),{name:[Fs,"position"],noStyle:!0}),No.createElement(ut.default,{type:"hidden"}))))})))),No.createElement(jt.Z,{align:"middle"},No.createElement(Lt.default.Item,{name:[ze,"downcase"],valuePropName:"checked"},No.createElement(Ci.Z,null)),No.createElement(Te.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u5B57\u6BCD\u5927\u5C0F\u5199")),No.createElement(jt.Z,{align:"middle"},No.createElement(Lt.default.Item,{name:[ze,"no_space"],valuePropName:"checked"},No.createElement(Ci.Z,null)),No.createElement(Te.Z,{className:"ml10"},"\u5224\u5206\u65F6\u5FFD\u7565\u7B54\u6848\u4E2D\u7684\u7A7A\u683C")),(Fr==null?void 0:Fr.length)>1&&No.createElement(jt.Z,{align:"middle",className:(Fr==null?void 0:Fr.length)>1?"mb30":`${Ni.hide}`},No.createElement(Lt.default.Item,{name:tr},No.createElement(Il,null)),No.createElement(Te.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")),No.createElement("div",{onClick:()=>Vr(!0)},No.createElement(Lt.default.Item,{name:kr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},No.createElement(Qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Lr}))))};var Au=Object.defineProperty,Hu=Object.defineProperties,ws=Object.getOwnPropertyDescriptors,Js=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,no=Object.prototype.propertyIsEnumerable,na=(St,Jt,ze)=>Jt in St?Au(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Fn=(St,Jt)=>{for(var ze in Jt||(Jt={}))Xr.call(Jt,ze)&&na(St,ze,Jt[ze]);if(Js)for(var ze of Js(Jt))no.call(Jt,ze)&&na(St,ze,Jt[ze]);return St},Bo=(St,Jt)=>Hu(St,ws(Jt)),io=(St,Jt)=>{var ze={};for(var dt in St)Xr.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Js)for(var dt of Js(St))Jt.indexOf(dt)<0&&no.call(St,dt)&&(ze[dt]=St[dt]);return ze};const Ds={\u6B63\u786E:"T",\u9519\u8BEF:"F"},Ps=({value:St,onChange:Jt,form:ze,choiceKey:dt})=>{const lr=(St==null?void 0:St.is_answer)===!0,rr=St==null?void 0:St.choice_text,kr=()=>{var tr;const Yn=(tr=ze==null?void 0:ze.getFieldValue(["sub_item_banks",...dt]))==null?void 0:tr.map(Tr=>({choice_text:Tr==null?void 0:Tr.choice_text,is_answer:!1}));ze==null||ze.setFieldValue(["sub_item_banks",...dt],Yn),Jt(Bo(Fn({},St),{is_answer:!0}))};return le.createElement(jt.Z,{className:Ni.choiceWrap,align:"middle",wrap:!1},le.createElement(Te.Z,{onClick:kr,className:`${Ni.choiceIndex} ${Ni.judgementIndex} ${lr?Ni.activeAnswer:""}`},Ds[rr]),le.createElement(Te.Z,{flex:1,className:`${Ni.editorWrap} ml15`},le.createElement("div",{className:`${Ni.inputBorder} ${Ni.placeholder} ${lr?Ni.activeJudgementAnswer:""}`},rr)),le.createElement(Te.Z,{flex:"0 0 auto",className:"ml15"},le.createElement("div",{onClick:kr,className:`${Ni.setAnswerBtn} ${lr?Ni.activeAnswer:""}`},lr?"\u6B63\u786E\u7B54\u6848":"\u8BBE\u4E3A\u7B54\u6848")))},ol=({questionTitlePlaceholder:St,choiceKey:Jt="choices",form:ze,titleKey:dt="name",analysisKey:lr="analysis"})=>{const[rr,kr]=(0,le.useState)(!1);return le.createElement("div",{className:Ni.wrap},le.createElement("div",{className:Ni.questionTitleEditorWrap},le.createElement(Lt.default.Item,{label:"\u9898\u5E72",name:dt,labelCol:{span:24},rules:[{required:!0}]},le.createElement(as,{scrollId:"name",watch:!0,height:140,placeholder:St}))),le.createElement(Lt.default.Item,{label:"\u7B54\u6848\u9009\u9879",required:!0,labelCol:{span:24}},le.createElement(Lt.default.List,{name:Jt,rules:[{validator(tr,Yn){return Yn.some(Lr=>(Lr==null?void 0:Lr.is_answer)===!0)?Promise.resolve():Promise.reject(new Error("\u8BF7\u8BBE\u7F6E\u6B63\u786E\u7B54\u6848"))}}]},tr=>le.createElement("div",{id:"choices"},tr.map(Yn=>{var Tr=Yn,{key:Lr,name:Vr}=Tr,mr=io(Tr,["key","name"]);return le.createElement(Lt.default.Item,Bo(Fn({},mr),{key:Lr,name:Vr,noStyle:!0}),le.createElement(Ps,{form:ze,choiceKey:Jt}))})))),le.createElement("div",{onClick:()=>kr(!0)},le.createElement(Lt.default.Item,{name:lr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:rr}))))};var Al=Object.defineProperty,hu=Object.defineProperties,eu=Object.getOwnPropertyDescriptors,Eu=Object.getOwnPropertySymbols,Wu=Object.prototype.hasOwnProperty,ln=Object.prototype.propertyIsEnumerable,Gl=(St,Jt,ze)=>Jt in St?Al(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Uo=(St,Jt)=>{for(var ze in Jt||(Jt={}))Wu.call(Jt,ze)&&Gl(St,ze,Jt[ze]);if(Eu)for(var ze of Eu(Jt))ln.call(Jt,ze)&&Gl(St,ze,Jt[ze]);return St},Zu=(St,Jt)=>hu(St,eu(Jt)),al=(St,Jt)=>{var ze={};for(var dt in St)Wu.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&Eu)for(var dt of Eu(St))Jt.indexOf(dt)<0&&ln.call(St,dt)&&(ze[dt]=St[dt]);return ze};const Su=St=>{var Jt=St,{value:ze,onChange:dt}=Jt,lr=al(Jt,["value","onChange"]);const rr=kr=>{dt([kr])};return le.createElement(oi.Z,Zu(Uo({},lr),{defaultValue:ze==null?void 0:ze[0],onChange:rr}))},Jc=St=>{if(!St)return!1;let Jt=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 St==="|"?(xt.ZP.warning("\u5173\u952E\u8BCD\u4E0D\u80FD\u53EA\u8F93\u5165\u4E00\u4E2A\u201C|\u201D\u5B57\u7B26\uFF01"),!1):!0},Dc=({value:St=[],onClose:Jt})=>le.createElement(ii.default,{closable:!0,onClose:Jt,className:Ni.keywordTag},St==null?void 0:St.join(" \u6216 ")),Ws=({questionTitlePlaceholder:St,form:Jt,showKeywords:ze,isMustKeyWords:dt=ze,titleKey:lr="name",analysisKey:rr="analysis",answerTexts:kr="answer_texts",keywords:tr="keywords",useKeywords:Yn="use_keywords",indexs:Tr})=>{const[Lr,Vr]=(0,le.useState)(!1),[mr,zo]=(0,le.useState)(""),Ii=Lt.default.useWatch("sub_item_banks",Jt),{use_keywords:vi,score:Ai}=(Ii==null?void 0:Ii[Tr])||{};return console.log(vi,Ai,"itemValues"),le.createElement("div",{className:Ni.wrap},le.createElement("div",{className:Ni.questionTitleEditorWrap},le.createElement(Lt.default.Item,{label:"\u9898\u5E72",name:lr,labelCol:{span:24},rules:[{required:!0}]},le.createElement(as,{scrollId:"name",watch:!0,height:140,placeholder:St}))),le.createElement(Lt.default.Item,{label:"\u53C2\u8003\u7B54\u6848",name:kr,labelCol:{span:24}},le.createElement(Su,{watch:!0,height:140,placeholder:"\u8BF7\u7F16\u8F91\u53C2\u8003\u7B54\u6848\uFF08\u975E\u5FC5\u586B\uFF09"})),ze&&!dt&&le.createElement(Lt.default.Item,{hidden:!0,name:Yn,valuePropName:"checked"},le.createElement(Ci.Z,{defaultChecked:!0})),ze&&dt&&le.createElement(jt.Z,{align:"middle",className:"mb30"},le.createElement(Lt.default.Item,{name:Yn,valuePropName:"checked"},le.createElement(Ci.Z,null)),le.createElement(Te.Z,{className:"ml10"},"\u5F00\u542F\u5173\u952E\u8BCD\u81EA\u52A8\u5224\u5206"),le.createElement(Te.Z,null,le.createElement(At.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"},le.createElement(Ji.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})))),(vi||!dt)&&le.createElement(Lt.default.List,{name:tr,rules:[{validator(Or,Ur){return dt?Ur!=null&&Ur.length?(Ur==null?void 0:Ur.reduce((ko,yr)=>ko+yr.score,0))>parseFloat(Ai)?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()}}]},(Or,{add:Ur,remove:Fr})=>le.createElement(le.Fragment,null,le.createElement("div",{className:`${Ni.title} mb10`},dt?"\u5173\u952E\u8BCD":le.createElement("span",{style:{color:"#9096A3"}},"\u5224\u5206\u5173\u952E\u8BCD")),le.createElement(jt.Z,{align:"middle",className:"font14 mb30"},le.createElement(Te.Z,{flex:1},le.createElement(ut.default,{value:mr,onChange:ko=>{zo(ko.target.value)},maxLength:50,allowClear:!0,onPressEnter:ko=>{var yr,vo,Xi,Gr;const mo=`${(yr=ko.target)==null?void 0:yr.value}`,aa=(Xi=(vo=mo==null?void 0:mo.split("|"))==null?void 0:vo.filter(Kr=>!!Kr))==null?void 0:Xi.map(Kr=>Kr==null?void 0:Kr.trim()),ka=Jt.getFieldValue(["sub_item_banks",...tr]),Fs=((Gr=ka==null?void 0:ka.map(Kr=>Kr==null?void 0:Kr.keyword))==null?void 0:Gr.flat())||[];for(const Kr of aa)if(Fs.includes(Kr)){xt.ZP.error("\u4E3A\u907F\u514D\u5224\u5206\u9519\u8BEF\uFF0C\u8BF7\u52FF\u8BBE\u7F6E\u76F8\u540C\u7684\u5173\u952E\u8BCD");return}Jc(mo)&&(Ur({keyword:aa,score:1}),zo(""))},className:Ni.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"})),le.createElement(Te.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"}},"\u201C\u56DE\u8F66\u952E\u201D\u4FDD\u5B58\u5173\u952E\u8BCD")),Or.map(ko=>{var yr=ko,{key:vo,name:Xi}=yr,Gr=al(yr,["key","name"]);return le.createElement(jt.Z,{key:vo,className:"mb20",style:{marginRight:148}},le.createElement(Te.Z,{flex:1},le.createElement(jt.Z,{align:"middle",justify:"space-between"},le.createElement(Lt.default.Item,Zu(Uo({},Gr),{name:[Xi,"keyword"]}),le.createElement(Dc,{onClose:()=>Fr(Xi)})),dt&&le.createElement(Lt.default.Item,Zu(Uo({},Gr),{name:[Xi,"score"],label:"\u5206\u503C",rules:[{required:!0}],className:Ni.blankInputNumberWrapper}),le.createElement(Ve.Z,{className:Ni.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u5206\u6570"})))))}))),le.createElement("div",{onClick:()=>Vr(!0)},le.createElement(Lt.default.Item,{name:rr,label:"\u9898\u76EE\u89E3\u6790",labelCol:{span:24}},le.createElement(Qt,{placeholder:"\u8BF7\u7F16\u8F91\u9898\u76EE\u89E3\u6790\uFF08\u975E\u5FC5\u586B\uFF09",isEdit:Lr}))))};var Oa=be(67294),Pa=Object.defineProperty,Ga=Object.defineProperties,ts=Object.getOwnPropertyDescriptors,sl=Object.getOwnPropertySymbols,oo=Object.prototype.hasOwnProperty,$c=Object.prototype.propertyIsEnumerable,Hl=(St,Jt,ze)=>Jt in St?Pa(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,iu=(St,Jt)=>{for(var ze in Jt||(Jt={}))oo.call(Jt,ze)&&Hl(St,ze,Jt[ze]);if(sl)for(var ze of sl(Jt))$c.call(Jt,ze)&&Hl(St,ze,Jt[ze]);return St},Tc=(St,Jt)=>Ga(St,ts(Jt)),Pc=(St,Jt)=>{var ze={};for(var dt in St)oo.call(St,dt)&&Jt.indexOf(dt)<0&&(ze[dt]=St[dt]);if(St!=null&&sl)for(var dt of sl(St))Jt.indexOf(dt)<0&&$c.call(St,dt)&&(ze[dt]=St[dt]);return ze},fr=(St,Jt,ze)=>new Promise((dt,lr)=>{var rr=Yn=>{try{tr(ze.next(Yn))}catch(Tr){lr(Tr)}},kr=Yn=>{try{tr(ze.throw(Yn))}catch(Tr){lr(Tr)}},tr=Yn=>Yn.done?dt(Yn.value):Promise.resolve(Yn.value).then(rr,kr);tr((ze=ze.apply(St,Jt)).next())});const{Panel:El}=Zn.default,Fl=null,Qu=(St,Jt)=>{var ze=St,{globalSetting:dt,loading:lr,dispatch:rr,editData:kr,onRef:tr=()=>{},isEdit:Yn}=ze,Tr=Pc(ze,["globalSetting","loading","dispatch","editData","onRef","isEdit"]);const[Lr,Vr]=(0,le.useState)(""),[mr,zo]=(0,le.useState)([]),[Ii]=Lt.default.useForm();(0,le.useEffect)(()=>{!kr||!Yn||(Vr(kr==null?void 0:kr.name),zo(kr==null?void 0:kr.sub_item_banks),Ii.setFieldsValue(iu({},kr)))},[kr]),(0,le.useEffect)(()=>{zo(Ii.getFieldValue("sub_item_banks"))},[Lt.default.useWatch("sub_item_banks",Ii)]),(0,le.useImperativeHandle)(Jt,()=>({onSave:vi,Clear:Ai}));const vi=()=>fr(void 0,null,function*(){if(!Lr)return xt.ZP.info("\u8BF7\u60A8\u8F93\u5165\u9898\u5E72"),!1;try{yield Ii.validateFields()}catch(vo){return console.log(vo,"errInfo"),xt.ZP.error(vo.errorFields[0].errors[0]),!1}const yr=mr.map(vo=>iu({id:vo.id>1?vo.id:null},vo));return{name:Lr,sub_item_banks:yr}}),Ai=()=>{Vr(""),zo([])},Or={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"},Ur=({value:yr})=>Oa.createElement("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"}},yr),[Fr,ko]=(0,le.useState)();return Oa.createElement("section",{className:_t.wrap},Oa.createElement("p",{className:_t.titleWrap},Oa.createElement("span",{className:_t.required},"*"),Oa.createElement("span",{className:_t.title},"\u9898\u5E72\uFF1A")),Oa.createElement(oi.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"\u8BF7\u60A8\u8F93\u5165\u9898\u5E72",defaultValue:Lr,onChange:yr=>Vr(yr)}),Oa.createElement(Lt.default,{form:Ii,autoComplete:"off"},Oa.createElement(Lt.default.List,{name:"sub_item_banks",rules:[{validator(yr,vo){return vo?Promise.resolve():Promise.reject(new Error("\u8BF7\u6DFB\u52A0\u5C0F\u9898"))}}]},(yr,{add:vo,remove:Xi})=>{const Gr=Ii.getFieldValue("sub_item_banks");return Oa.createElement(Oa.Fragment,null,Oa.createElement(Zn.default,{className:yr.length>0?_t.collapseWrapper:"",bordered:!1,expandIcon:({isActive:mo})=>Oa.createElement("i",{className:`iconfont icon-weizhankai ${mo?_t.open:_t.close}`,style:{fontSize:14,transition:"all .2s"}})},yr.map((mo,aa)=>{var ka=mo,{key:Fs,name:Kr}=ka,Xl=Pc(ka,["key","name"]),Fo,Da,jo,yl,Ls,Rl,Oc,ad,Cc,bc,uo,gu;return Oa.createElement(El,{className:_t.panel,forceRender:!0,header:Oa.createElement("div",{className:_t.panelHeader},"\u7B2C",aa+1,"\u5C0F\u9898",Oa.createElement("span",null,"\uFF08",Or[(Fo=Gr==null?void 0:Gr[Kr])==null?void 0:Fo.item_type],"\uFF09")),extra:Oa.createElement(jt.Z,{align:"middle",onClick:Ye=>Ye.stopPropagation(),style:{display:"flex",alignItems:"center"}},((Da=Gr==null?void 0:Gr[Kr])==null?void 0:Da.item_type)=="completion"&&Oa.createElement(Lt.default.Item,Tc(iu({},Xl),{name:[Kr,"score"],className:_t.blankInputNumberWrapper,style:{marginBottom:0}}),((jo=Gr==null?void 0:Gr[Kr])==null?void 0:jo.item_type)=="completion"&&Oa.createElement("div",{style:{display:"flex",alignItems:"center",color:"#191919"}},"\u5171",Oa.createElement(Ur,{value:(yl=Gr==null?void 0:Gr[Kr])==null?void 0:yl.score}),"\u5206")),((Ls=Gr==null?void 0:Gr[Kr])==null?void 0:Ls.item_type)=="completion"&&Oa.createElement(Oa.Fragment,null,Oa.createElement(en.ZP.Group,{defaultValue:(Rl=Gr==null?void 0:Gr[Kr])==null?void 0:Rl.use_blank_score,className:_t.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"\u6309\u7A7A\u7ED9\u5206",value:!0},{label:"\u6309\u9898\u7ED9\u5206",value:!1}],onChange:Ye=>{var bt;console.log(Ii.getFieldsValue()),Ii==null||Ii.setFieldValue(["sub_item_banks",Kr,"use_blank_score"],(bt=Ye==null?void 0:Ye.target)==null?void 0:bt.value),ko(new Date)}}),Oa.createElement(At.Z,{overlayInnerStyle:{width:460},title:Oa.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",Oa.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")},Oa.createElement("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})))),key:Fs},Oa.createElement(Lt.default.Item,Tc(iu({},Xl),{name:Kr}),(((Oc=Gr==null?void 0:Gr[Kr])==null?void 0:Oc.item_type)=="single"||((ad=Gr==null?void 0:Gr[Kr])==null?void 0:ad.item_type)=="multiple")&&Oa.createElement(Sl,{questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9009\u62E9\u9898\u9898\u5E72\u5185\u5BB9",allowChangeMode:((Cc=Gr==null?void 0:Gr[Kr])==null?void 0:Cc.item_type)!="single",form:Ii,choiceKey:[Kr,"choices"],titleKey:[Kr,"name"],analysisKey:[Kr,"analysis"],choiceOptionsPath:["sub_item_banks",Kr,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),((bc=Gr==null?void 0:Gr[Kr])==null?void 0:bc.item_type)=="completion"&&Oa.createElement(Mu,{form:Ii,name:Kr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:[Kr,"use_blank_score"],titleKey:[Kr,"name"],analysisKey:[Kr,"analysis"],isOrdered:[Kr,"is_ordered"],answerKey:[Kr,"standard_answer"],key:Fr}),((uo=Gr==null?void 0:Gr[Kr])==null?void 0:uo.item_type)=="judgement"&&Oa.createElement(ol,{form:Ii,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u5224\u65AD\u9898\u9898\u5E72\u5185\u5BB9",titleKey:[Kr,"name"],analysisKey:[Kr,"analysis"],choiceKey:[Kr,"choices"]}),((gu=Gr==null?void 0:Gr[Kr])==null?void 0:gu.item_type)=="subjective"&&Oa.createElement(Ws,{showKeywords:!0,form:Ii,titleKey:[Kr,"name"],analysisKey:[Kr,"analysis"],answerTexts:[Kr,"answer_texts"],useKeywords:[Kr,"use_keywords"],keywords:[Kr,"keywords"],indexs:Kr,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u7B80\u7B54\u9898\u9898\u5E72\u5185\u5BB9"})))})))})))};var Ec=(0,lt.connect)(({loading:St,globalSetting:Jt})=>({globalSetting:Jt,loading:St.effects}),null,null,{forwardRef:!0})((0,le.forwardRef)(Qu)),_c=be(60580),pa=be(38089),qc=be(88044),Ju=be(57399),tn={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"},un=be(30001),Gn=be(99678),er=be(89779),Wi=be(9343),Bi=be(26194),ki=be(20670),pi=({open:St,onCancel:Jt,onOk:ze})=>{const dt=(0,Gn.g)(),[lr,rr,kr,tr]=(0,Wi.U)(er.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[Yn,Tr]=(0,le.useState)(!1);(0,le.useEffect)(()=>{St&&kr({page:1,limit:10,type:0},!0).then(Ii=>{(Ii==null?void 0:Ii.shixuns_count)===0&&Tr(!0)})},[St]);const[Lr,Vr]=(0,le.useState)([]),[mr,zo]=(0,le.useState)([]);return le.createElement(_e.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:St,width:948,centered:!0,closable:!0,onCancel:Jt,onOk:()=>ze(mr),destroyOnClose:!0},le.createElement(jt.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(Te.Z,null,le.createElement(pa.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:dt,onChange:Ii=>{kr({page:1,discipline_id:Ii==null?void 0:Ii[0],sub_discipline_id:Ii==null?void 0:Ii[1]})}}),le.createElement(qc.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:Ii=>kr({page:1,diff:Ii})}),le.createElement(qc.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:Ii=>kr({page:1,shixun_publish_status:Ii})})),le.createElement(un.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Ii=>{kr({keyword:Ii,page:1})}})),Yn?le.createElement("div",null,le.createElement(Bi.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,ht.xg)("/shixuns")})):le.createElement(Ju.default,{loading:rr,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Ii,vi)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:vi!=null&&vi.high_resources_consume?tn.title:"",title:Ii||"--"},le.createElement(We.Z,{key:1,showLines:1,showTextOnly:!0,value:Ii||"--"})),(vi==null?void 0:vi.high_resources_consume)&&le.createElement(ki.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Ii,vi,Ai)=>le.createElement("span",null,Ii||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(At.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(Ji.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Ii,vi,Ai)=>le.createElement("span",null,Ii||"- -")},{title:"\u64CD\u4F5C",render(Ii,vi){const{title:Ai,challenge_names:Or,author_name:Ur,identifier:Fr,author_school_name:ko,study_count:yr}=vi||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{_e.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(We.Z,{value:Ai,style:{marginBottom:18}}),le.createElement("div",{className:tn.challengeNameWrapper},Or.map((vo,Xi)=>le.createElement("div",{className:tn.challengeName,key:Xi},"\u7B2C",(0,ht.EM)(Xi+1),"\u9898\xA0",vo))),le.createElement(jt.Z,{className:tn.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(Te.Z,{className:tn.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:tn.shixunInfo},Ur.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:tn.shixunInfo},ko),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:tn.shixunInfo},yr)),le.createElement(wt.ZP,{type:"primary",className:tn.btnToDetail,onClick:()=>(0,ht.xg)(`/shixuns/${Fr}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(vi==null?void 0:vi.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${vi==null?void 0:vi.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:tr==null?void 0:tr.items,rowSelection:{type:"radio",selectedRowKeys:Lr,preserveSelectedRowKeys:!0,getCheckboxProps:Ii=>({disabled:Ii.shixun_tag_num===1}),onChange(Ii,vi){var Ai,Or,Ur;console.log(Ii),Vr(Ii);const Fr=[];for(const yr of mr)Ii.includes(yr.id)&&Fr.push(yr);const ko=Fr.map(yr=>yr.id);for(const yr of vi)yr&&Ii.includes(yr.id)&&!ko.includes(yr.id)&&Fr.push({id:yr.id,difficulty:yr.level,identifier:yr.identifier,name:yr.name,real_name:(Ai=yr==null?void 0:yr.author_name)==null?void 0:Ai.split("\u3001")[0],school_name:yr.author_school_name,challenge_names:yr.challenge_names,challenges:(Or=yr.challenge_names)==null?void 0:Or.map((vo,Xi)=>({subject:vo,id:Xi,score:5})),score:((Ur=yr.challenge_names)==null?void 0:Ur.length)*5,study_count:yr.study_count,challenges_count:yr.challenges_count});zo(Fr)}},pagination:{current:lr.page,pageSize:lr.limit,total:tr==null?void 0:tr.items_count,showTotal:Ii=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},Ii),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Ii,vi){kr({page:Ii,limit:vi})},size:"default"},scroll:{y:400}}))},ur=be(96332),_r=be(93686),da=(St,Jt,ze)=>new Promise((dt,lr)=>{var rr=Yn=>{try{tr(ze.next(Yn))}catch(Tr){lr(Tr)}},kr=Yn=>{try{tr(ze.throw(Yn))}catch(Tr){lr(Tr)}},tr=Yn=>Yn.done?dt(Yn.value):Promise.resolve(Yn.value).then(rr,kr);tr((ze=ze.apply(St,Jt)).next())}),Es=({visible:St,getdata:Jt,onCancel:ze,onRandomExchange:dt,selectFromProblemSet:lr,questionParams:rr})=>{const[kr,tr]=(0,le.useState)(!1),[Yn,Tr]=(0,le.useState)(!1),[Lr,Vr]=(0,le.useState)({}),mr=(0,lt.useParams)(),[zo,Ii]=(0,le.useState)(),vi=(Ai,Or)=>da(void 0,null,function*(){Tr(!0);const Ur=yield(0,nt.ZP)(`/api/exercises/${mr.categoryId}/toggle_random_question.json`,{method:"post",body:{question_id:rr.id,item_bank_id:Ai,shixuns_info:[{id:Ai,is_copy:Or!=1,is_use:Or!=1}]}});Tr(!1),Ur!=null&&Ur.status||(xt.ZP.info("\u6362\u9898\u6210\u529F"),ze(),Jt())});return le.createElement(_e.default,{title:"\u8BF7\u9009\u62E9\u66FF\u6362\u65B9\u5F0F",open:St,onCancel:ze,centered:!0,maskClosable:!0,footer:null},le.createElement(jt.Z,{justify:"center",className:"pb20"},le.createElement(_c.Z,{onClick:dt},"\u968F\u673A\u66F4\u6362"),(rr==null?void 0:rr.type)!=="PRACTICAL"&&le.createElement(wt.ZP,{style:{marginLeft:24},onClick:lr},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9"),(rr==null?void 0:rr.type)==="PRACTICAL"&&le.createElement(wt.ZP,{style:{marginLeft:24},onClick:()=>{tr(!0)}},"\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9")),le.createElement(pi,{open:kr,onCancel:()=>tr(!1),onOk:Ai=>da(void 0,null,function*(){if(console.log("----selectedRows",Ai,mr),(Ai==null?void 0:Ai.length)<=0){xt.ZP.info("\u8BF7\u9009\u62E9\u5B9E\u8BAD");return}let Or=Ai==null?void 0:Ai.map(Fr=>Fr==null?void 0:Fr.id),Ur=yield(0,_r.Tr)({id:[...Or],course_id:mr.coursesId,type:"shixun"});(Ur==null?void 0:Ur.student_count)===0?vi(Or==null?void 0:Or[0],1):(Ii(Or),Vr(Ur)),tr(!1)})}),le.createElement(ur.Z,{resdata:Lr,type:"shixun",okloading:Yn,oktext:(Lr==null?void 0:Lr.can_copy_num)===0?"\u786E\u5B9A":"\u4E00\u952E\u590D\u5236\u5E76\u66FF\u6362",onok:Ai=>da(void 0,null,function*(){vi(zo==null?void 0:zo[0],2)})}))},cs=be(30351),Do=be(19575),jr=be(2715),qi=be(48994),Va=be(52810),Ha=be(52262),Ts=Object.defineProperty,_s=Object.defineProperties,ha=Object.getOwnPropertyDescriptors,za=Object.getOwnPropertySymbols,Ho=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Ns=(St,Jt,ze)=>Jt in St?Ts(St,Jt,{enumerable:!0,configurable:!0,writable:!0,value:ze}):St[Jt]=ze,Aa=(St,Jt)=>{for(var ze in Jt||(Jt={}))Ho.call(Jt,ze)&&Ns(St,ze,Jt[ze]);if(za)for(var ze of za(Jt))zr.call(Jt,ze)&&Ns(St,ze,Jt[ze]);return St},Ia=(St,Jt)=>_s(St,ha(Jt)),Zs=(St,Jt,ze)=>new Promise((dt,lr)=>{var rr=Yn=>{try{tr(ze.next(Yn))}catch(Tr){lr(Tr)}},kr=Yn=>{try{tr(ze.throw(Yn))}catch(Tr){lr(Tr)}},tr=Yn=>Yn.done?dt(Yn.value):Promise.resolve(Yn.value).then(rr,kr);tr((ze=ze.apply(St,Jt)).next())});const Vu=({data:St,submit:Jt,goBack:ze,loading:dt,onTypeScore:lr,editPreview:rr=!1,onSkipExamination:kr,selectValue:tr,onExchange:Yn,getdata:Tr,handleMarkWrongQuestion:Lr,dispatch:Vr})=>{var mr,zo,Ii,vi,Ai,Or,Ur,Fr,ko,yr,vo;const Xi=(0,le.useRef)(),[Gr,mo]=(0,le.useState)(null),[aa,ka]=(0,le.useState)(!1),[Fs,Kr]=(0,le.useState)(!1),Xl=(0,le.useRef)(),[Fo]=Lt.default.useForm(),Da=(0,lt.useParams)(),[jo,yl]=(0,le.useState)(!1),[Ls,Rl]=(0,le.useState)([]);(0,le.useEffect)(()=>{ka(!0)},[]),(0,le.useEffect)(()=>{rr||(0,ht.Dk)("\u8BD5\u5377\u9884\u89C8")},[rr]),(0,le.useEffect)(()=>{var Ht;((Ht=St==null?void 0:St.questionList)==null?void 0:Ht.length)>0&&(St==null||St.questionList.forEach(ei=>{var bi;ei.type==="PRACTICAL"&&((bi=ei==null?void 0:ei.questions)==null||bi.forEach((Vi,ni)=>{var Sr;Ls[ni]=!((Sr=Vi==null?void 0:Vi.shixun)!=null&&Sr.ignore_prompt),Rl([...Ls])}))}))},[St]);const Oc=["\u5BB9\u6613","\u7B80\u5355","\u9002\u4E2D","\u56F0\u96BE"],ad={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"},Cc={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"},bc=Ht=>{var ei;const bi=[];return le.createElement(le.Fragment,null,le.createElement("aside",{className:Xe.single},(ei=Ht==null?void 0:Ht.choices)==null?void 0:ei.map((Vi,ni)=>(Vi.is_answer&&bi.push(Va.k4[ni]),le.createElement("ul",{key:ni},le.createElement("li",null,Va.k4[ni],"\u3001"),le.createElement("li",null,le.createElement(We.Z,{value:Vi.choice_text})))))),le.createElement("div",{className:Xe.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",bi.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Oc[Ht.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Ht.analysis?Ht.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Ht==null?void 0:Ht.tag_discipline_name)))))},uo=(Ht,ei)=>{var bi;const Vi=(bi=Ht==null?void 0:Ht.standard_answer)==null?void 0:bi.map((ni,Sr)=>{var xo;return le.createElement("div",{key:Sr},`\u7B54\u6848\uFF08\u586B\u7A7A${ni==null?void 0:ni.position}\uFF09\uFF1A${(xo=ni==null?void 0:ni.answer_text)==null?void 0:xo.join("\u3001")}`)});return le.createElement(le.Fragment,null,le.createElement("div",{className:Xe.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,Vi)),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Ht.analysis?Ht.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),ei?`${(ei==null?void 0:ei.discipline_name)||"--"}/${ei==null?void 0:ei.sub_discipline_name}`:`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:ei?ei==null?void 0:ei.tag_discipline_name:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ei?ei==null?void 0:ei.tag_discipline_name:Ht==null?void 0:Ht.tag_discipline_name)))))},gu=Ht=>{var ei;const bi=(ei=Ht==null?void 0:Ht.standard_answer)==null?void 0:ei.map((Vi,ni)=>le.createElement("div",{key:ni},`\u7B54\u6848\uFF08\u586B\u7A7A${(Vi==null?void 0:Vi.position)||(Vi==null?void 0:Vi.exercise_choice_id)}\uFF09\uFF1A${Vi==null?void 0:Vi.answer_text}`));return le.createElement(le.Fragment,null,le.createElement("div",{className:Xe.analysis},le.createElement("div",{style:{display:"flex"}},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A"),le.createElement("div",null,bi)),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Ht.analysis?Ht.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Ht==null?void 0:Ht.tag_discipline_name)))))},Ye=(Ht,ei)=>{var bi;return le.createElement("div",{className:Xe.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",(bi=Ht==null?void 0:Ht.answer_texts)==null?void 0:bi[0]),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Ht.analysis?Ht.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),ei?`${(ei==null?void 0:ei.discipline_name)||"--"}/${ei==null?void 0:ei.sub_discipline_name}`:`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:ei?ei==null?void 0:ei.tag_discipline_name:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),ei?ei==null?void 0:ei.tag_discipline_name:Ht==null?void 0:Ht.tag_discipline_name))))},bt=Ht=>{var ei,bi;return le.createElement("div",{className:Xe.analysis},le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u9884\u671F\u8F93\u51FA:"),le.createElement(We.Z,{value:(ei=Ht==null?void 0:Ht.program_attr)==null?void 0:ei.description})),le.createElement("div",{style:{marginTop:20}},"\u6B63\u786E\u7B54\u6848\uFF1A",((bi=Ht==null?void 0:Ht.program_attr)==null?void 0:bi.answer_text)||"--"),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Ht.analysis?Ht.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Ht==null?void 0:Ht.tag_discipline_name))))},Bt=(Ht,ei)=>{var bi;return le.createElement("div",null,(bi=Ht==null?void 0:Ht.sub_item_banks)==null?void 0:bi.map((Vi,ni)=>{var Sr,xo;const ho=[];return le.createElement(le.Fragment,null,le.createElement("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"}},ei+1+"."+(ni+1),"\uFF08",ad[Vi.item_type]||Cc[Vi.item_type],"\uFF09",Vi.name),(Vi.item_type=="SINGLE"||Vi.item_type=="MULTIPLE"||Vi.item_type=="JUDGMENT"||Vi.item_type=="single"||Vi.item_type=="multiple"||Vi.item_type=="judgement")&&le.createElement(le.Fragment,null,le.createElement("aside",{className:Xe.single},(Sr=Vi==null?void 0:Vi.choices)==null?void 0:Sr.map((Yr,$a)=>(Yr.is_answer&&ho.push(Va.k4[$a]),le.createElement("ul",{key:$a},le.createElement("li",null,Va.k4[$a],"\u3001"),le.createElement("li",null,le.createElement(We.Z,{value:Yr.choice_text})))))),le.createElement("div",{className:Xe.analysis},le.createElement("div",null,"\u6B63\u786E\u7B54\u6848\uFF1A",ho.join(""),le.createElement("span",{className:"ml30"},"\u96BE\u5EA6\uFF1A",Oc[Vi.difficulty])),le.createElement("aside",null,le.createElement("span",{className:Xe.text},"\u89E3\u6790:"),le.createElement(We.Z,{value:Vi.analysis?Vi.analysis:"\u6682\u65E0\u89E3\u6790"})),le.createElement("ul",null,le.createElement("li",null,le.createElement("span",{style:{color:"#007AFF",marginRight:10}},"\u65B9\u5411&\u8BFE\u7A0B:"),`${(Ht==null?void 0:Ht.discipline_name)||"--"}/${Ht==null?void 0:Ht.sub_discipline_name}`),le.createElement(At.Z,{title:Ht==null?void 0:Ht.tag_discipline_name},le.createElement("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},le.createElement("span",{style:{color:"#5AB891",marginRight:10}},"\u77E5\u8BC6\u70B9:"),Ht==null?void 0:Ht.tag_discipline_name))))),(Vi.item_type=="COMPLETION"||Vi.item_type=="completion")&&uo(Vi,Ht),(Vi.item_type=="SUBJECTIVE"||Vi.item_type=="subjective")&&Ye(Vi,Ht),((xo=St==null?void 0:St.exam)==null?void 0:xo.exercise_status)===3&&le.createElement("div",{className:"flex gap-20px mt20"},le.createElement(jr.Z,{state:Vi==null?void 0:Vi.is_wrong,onClick:()=>{Lr==null||Lr({value:Ia(Aa({},Vi),{question_id:Vi==null?void 0:Vi.id,question_score:Vi==null?void 0:Vi.score})})}}),Vi.item_type=="single"&&le.createElement(wt.ZP,{style:{color:"#3061D0"},onClick:()=>{Li({value:Vi})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848")))}))},Tt=Ht=>{var ei,bi,Vi;return le.createElement("div",{style:{marginTop:"12px"}},(bi=(ei=Ht==null?void 0:Ht.shixun)==null?void 0:ei.challenges)==null?void 0:bi.map((ni,Sr)=>le.createElement("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},le.createElement("div",null,le.createElement("span",{className:"mr5"},"\u7B2C",Sr+1,"\u5173"),le.createElement(At.Z,{key:Sr,title:ni==null?void 0:ni.challenge_name},le.createElement("span",null,(0,ht.Pq)(ni==null?void 0:ni.challenge_name,44)))),rr&&le.createElement("div",null,"\u5206\u503C\uFF1A",ni.score,"\u5206"))),le.createElement(lt.Link,{style:{float:"right"},target:"_blank",to:`/shixuns/${(Vi=Ht==null?void 0:Ht.shixun)==null?void 0:Vi.identifier}/challenges`},"\u5B9E\u8BAD\u8BE6\u60C5"),le.createElement("div",{style:{clear:"both"}}))},$t=Ht=>{let ei=Ht.questions_score/Ht.questions_count;_e.default.confirm({icon:null,centered:!0,title:"\u5206\u6570\u8BBE\u7F6E",content:le.createElement("div",{className:Xe.modalColumn},le.createElement("div",{className:Xe.modalRow,style:{justifyContent:"flex-start"}},le.createElement("sup",{className:Xe.sup},"*"),le.createElement("span",null,Ht==null?void 0:Ht.name,"\uFF1A"),le.createElement(Ve.Z,{min:0,precision:1,defaultValue:ei,onChange:bi=>{ei=bi}}),le.createElement("span",{className:"ml5"},"\u5206/\u9898"))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Zs(void 0,null,function*(){var bi;if(!ei)return xt.ZP.warning("\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A\u6216\u4E3A0"),Promise.reject();const Vi={type:Ht==null?void 0:Ht.type,score:ei,scoreTotal:Number((bi=ei*Ht.questions_count)==null?void 0:bi.toFixed(1))};lr(Vi)})})},hn=()=>{let Ht="";_e.default.confirm({icon:null,centered:!0,title:"\u4FDD\u5B58\u8BD5\u5377",content:le.createElement("div",{className:Xe.modalColumn},le.createElement("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20"},le.createElement("img",{style:{marginRight:5},src:bn.Z}),"\u4FDD\u5B58\u540E\u5355\u72EC\u751F\u6210\u4E00\u4EFD\u4EBA\u5DE5\u7EC4\u5377\u7C7B\u578B\u7684\u56FA\u5B9A\u8BD5\u5377\u3002"),le.createElement("div",{className:Xe.modalRow,style:{marginTop:20}},le.createElement("sup",{className:Xe.sup},"*"),le.createElement("span",{style:{flexShrink:0}},"\u8BD5\u5377\u540D\u79F0\uFF1A"),le.createElement(ut.default,{placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",min:0,maxLength:60,defaultValue:Ht,onChange:ei=>{Ht=ei.target.value}}))),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Zs(void 0,null,function*(){var ei;if(!Ht)return xt.ZP.warning("\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"),Promise.reject();const bi=[],Vi=[],ni=[],Sr=[];(ei=St==null?void 0:St.questionList)==null||ei.forEach(ho=>{var Yr;(Yr=ho.questions)==null||Yr.forEach($a=>{let Go=ho.questions_score/ho.questions_count;Go=Go&&Go.toFixed(1),ho.type==="COMBINATION"&&ni.push({id:$a.id,sub_item_bank_ids:$a.sub_item_banks.map(Qo=>Qo.id)}),ho.type==="PRACTICAL"?Sr.push($a.id):(bi.push($a.id),Vi.push(Go))})}),console.log("-----",ni),yield Jt({item_bank_ids:bi,item_bank_scores:Vi,name:Ht,combination_item_banks:ni,shixun_ids:Sr})})})},Pn=(Ht,ei,bi,Vi)=>{var ni;const Sr=`${location.pathname}${location.search}`,xo=(ni=Vi.questions)==null?void 0:ni.map(ho=>ho==null?void 0:ho.id);if(Sr.includes("exercise"))Xl.current={id:Ht,ids:xo,type:ei,index:bi},Kr(!0);else{let ho=_e.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:()=>Zs(void 0,null,function*(){ho.update({cancelButtonProps:{disabled:!0}}),yield Yn({single_question_id:Ht,seleted_item_bank_ids:xo},{type:ei,index:bi}),ho.update({cancelButtonProps:{disabled:!1}}),xt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u8BD5\u9898")})})}},Wn=Ht=>{var ei;const bi=(ei=Ht.questions)==null?void 0:ei.map(Sr=>Sr==null?void 0:Sr.id),Vi=Ht.name;let ni=_e.default.confirm({icon:null,centered:!0,title:"\u6E29\u99A8\u63D0\u793A",content:`\u786E\u8BA4\u66F4\u6362${Vi}\u4E2D\u7684\u6240\u6709\u8BD5\u9898\u5417\uFF1F`,cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>Zs(void 0,null,function*(){ni.update({cancelButtonProps:{disabled:!0}}),yield Yn({seleted_item_bank_ids:bi},{type:Ht.type}),ni.update({cancelButtonProps:{disabled:!1}}),xt.ZP.success(`\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210${Vi}\u8BD5\u9898`)})})},fi=()=>{let Ht=_e.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:()=>Zs(void 0,null,function*(){Ht.update({cancelButtonProps:{disabled:!0}}),yield Yn(),Ht.update({cancelButtonProps:{disabled:!1}}),xt.ZP.success("\u5DF2\u91CD\u65B0\u968F\u673A\u751F\u6210\u6574\u5F20\u8BD5\u9898")})})},ti=Ht=>{console.log(Ht,"key"),kr(Ht-1)},nr=(Ht,ei)=>{var bi,Vi;if(ei==="SINGLE")return le.createElement(le.Fragment,null,le.createElement(In,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="MULTIPLE")return le.createElement(le.Fragment,null,le.createElement(Dr,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="JUDGMENT")return le.createElement(le.Fragment,null,le.createElement(Fi,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="COMPLETION")return le.createElement(le.Fragment,null,le.createElement(qn,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="SUBJECTIVE")return le.createElement(le.Fragment,null,le.createElement(Ro,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="COMBINATION")return le.createElement(le.Fragment,null,le.createElement(Ec,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null));if(ei==="BPROGRAM")return le.createElement(le.Fragment,null,le.createElement(Lt.default,{form:Fo,style:{marginTop:20},onFinishFailed:ni=>{var Sr,xo;ni.errorFields[0].name.includes("standard_answers")?xt.ZP.error("\u586B\u7A7A\u9879\u7B54\u6848\u4E0D\u80FD\u4E3A\u7A7A"):xt.ZP.error(ni.errorFields[0].errors[0]),Fo.scrollToField((xo=(Sr=ni==null?void 0:ni.errorFields)==null?void 0:Sr[0])==null?void 0:xo.name,{behavior:"smooth",block:"center"})},onFinish:ni=>Zs(void 0,null,function*(){var Sr;let xo=Ia(Aa({question_score:Ht.score},ni),{question_type:8,hack:Ia(Aa({},ni.hack),{difficult:Ht.program_attr.difficult}),hack_codes:Ia(Aa({},ni.hack_codes),{code:Do.Base64.encode((Sr=ni.hack_codes)==null?void 0:Sr.code)})});jo&&(xo.is_cover=1);const ho=yield(0,nt.ZP)(`/api/exercise_questions/${Ht.id}.json`,{method:"put",body:xo});(ho==null?void 0:ho.status)===0&&(xt.ZP.success("\u7F16\u8F91\u6210\u529F"),ti(tr+1)),mo(null)})},le.createElement(cs.tc,{form:Fo,questionTitlePlaceholder:"\u8BF7\u7F16\u8F91\u9898\u5E72\u5E76\u8BBE\u7F6E\u586B\u7A7A\u9879",scoreByBlank:!1,hackidentifier:(bi=Ht==null?void 0:Ht.program_attr)==null?void 0:bi.identifier,answerKey:"standard_answers"}),le.createElement(pt.Z,null)));if(ei==="PROGRAM"&&lt.history.push(`/problems/${(Vi=Ht==null?void 0:Ht.program_attr)==null?void 0:Vi.identifier}/edit?type=exercises&express_id=${Da.categoryId}&question_id=${Ht==null?void 0:Ht.id}&score=${Ht==null?void 0:Ht.score}&callback_url=${location.pathname}&select=${tr}&exercise=true`),ei==="PRACTICAL")return le.createElement(le.Fragment,null,le.createElement(hr,{ref:Xi,editData:Ht,isEdit:!0}),le.createElement(pt.Z,null))},li=(Ht,ei)=>Zs(void 0,null,function*(){var bi,Vi,ni,Sr,xo,ho;const Yr=yield(bi=Xi.current)==null?void 0:bi.onSave();if(!Yr)return;const $a=ui=>{const wo=ui.map(ke=>ke.choice_text.trim().replace(/^\s+|\s+$/g,""));return new Set(wo).size!==wo.length},Go={question_score:ei.score,analysis:Yr.analysis};if(Ht==="SINGLE"||Ht==="MULTIPLE"||Ht==="JUDGMENT"){if(Ht!=="JUDGMENT"&&$a(Yr==null?void 0:Yr.choices)){xt.ZP.error("\u9009\u62E9\u9898\u9009\u9879\u5185\u5BB9\u4E0D\u80FD\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58");return}const ui=[],wo=[];Go.question_type=Ht==="JUDGMENT"?2:1,Go.question_title=Yr==null?void 0:Yr.name,(Vi=Yr==null?void 0:Yr.choices)==null||Vi.forEach((sa,ke)=>{ui.push(sa.choice_text),sa!=null&&sa.is_answer&&wo.push(ke+1)}),Go.question_choices=ui,Go.standard_answers=wo}if(Ht==="COMPLETION"){let ui=(ni=Yr==null?void 0:Yr.standard_answers)==null?void 0:ni.map((ke,Ie)=>(ke==null?void 0:ke.score)<=0?Ie+1:null).filter(ke=>ke!==null);if((ui==null?void 0:ui.length)>0)return xt.ZP.warning(`\u7B2C${ui.join("\u3001")}\u9879\u7684\u5206\u503C\u4E0D\u80FD\u4E3A\u7A7A`),!1;let wo=(Sr=Yr==null?void 0:Yr.standard_answers)==null?void 0:Sr.reduce((ke,Ie)=>ke+(Number(Ie==null?void 0:Ie.score)||0),0);if(parseFloat(wo.toFixed(2))!=(Go==null?void 0:Go.question_score))return xt.ZP.warning("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01"),!1;Go.is_ordered=Yr.is_ordered,Go.question_title=Yr==null?void 0:Yr.name,Go.use_blank_score=Yr==null?void 0:Yr.use_blank_score,Go.question_type=3;const sa=[];(xo=Yr==null?void 0:Yr.standard_answers)==null||xo.forEach((ke,Ie)=>{sa.push({choice_id:ke.position,answer_text:ke.answer_text,score:ke.score})}),Go.standard_answers=sa,Go.downcase=Yr==null?void 0:Yr.downcase,Go.no_space=Yr==null?void 0:Yr.no_space}if(Ht==="SUBJECTIVE"&&(console.log("editorData"),console.log(Yr),Go.question_title=Yr==null?void 0:Yr.name,Go.question_type=4,Go.answer_texts=Yr==null?void 0:Yr.answer_texts,Go.use_keywords=Yr==null?void 0:Yr.use_keywords,Go.keywords=Yr==null?void 0:Yr.keywords),Ht==="COMBINATION"){Go.question_title=Yr==null?void 0:Yr.name,Go.question_type=7;try{Go.sub_questions=(ho=Yr==null?void 0:Yr.sub_item_banks)==null?void 0:ho.map((ui,wo)=>{var sa,ke,Ie;if((ui==null?void 0:ui.item_type)=="single"||(ui==null?void 0:ui.item_type)=="multiple"){if($a(ui==null?void 0:ui.choices))throw new Error(`\u7B2C${wo+1}\u5C0F\u9898\u9009\u9879\u5185\u5BB9\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540E\u518D\u4FDD\u5B58`);const st=[],gt=[];return(sa=ui==null?void 0:ui.choices)==null||sa.forEach((Xt,vn)=>{st.push(Xt.choice_text),Xt!=null&&Xt.is_answer&&gt.push(vn+1)}),{id:ui.id,question_id:ui.id,question_title:ui.name,difficulty:ui.difficulty,question_type:(ui==null?void 0:ui.item_type)=="single"?0:(ui==null?void 0:ui.item_type)=="multiple"?1:2,question_choices:st,standard_answers:gt,analysis:ui.analysis,question_score:ui==null?void 0:ui.score}}else if((ui==null?void 0:ui.item_type)=="completion"){let st=(ke=ui==null?void 0:ui.standard_answer)==null?void 0:ke.reduce((Xt,vn)=>Xt+(Number(vn==null?void 0:vn.score)||0),0);if(parseFloat(st.toFixed(2))!=(ui==null?void 0:ui.score))throw new Error("\u5404\u586B\u7A7A\u9879\u5206\u503C\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E\u8BE5\u5C0F\u9898\u5206\u503C\uFF01");const gt=[];return(Ie=ui==null?void 0:ui.standard_answer)==null||Ie.forEach((Xt,vn)=>{gt.push({choice_id:Xt.position,answer_text:Xt.answer_text,score:Xt.score})}),{id:ui.id,question_id:ui.id,is_ordered:ui.is_ordered,question_title:ui.name,difficulty:ui.difficulty,question_type:3,standard_answers:gt,use_blank_score:ui.use_blank_score,analysis:ui.analysis,downcase:ui==null?void 0:ui.downcase,no_space:ui==null?void 0:ui.no_space,question_score:ui==null?void 0:ui.score}}else if((ui==null?void 0:ui.item_type)=="subjective")return{id:ui.id,question_id:ui.id,question_title:ui.name,question_type:4,difficulty:ui.difficulty,answer_texts:ui==null?void 0:ui.answer_texts,analysis:ui.analysis,question_score:ui==null?void 0:ui.score,use_keywords:ui.use_keywords,keywords:ui==null?void 0:ui.keywords}})}catch(ui){xt.ZP.warning(ui.message);return}delete Go.analysis}let Qo=!1;(ei==null?void 0:ei.is_my)===1&&(Qo=yield new Promise((wo,sa)=>{_e.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:()=>{wo(!0)},onCancel:()=>{wo(!1)}})})),Qo&&(Go.is_cover=1);const ma=Ht!=="PRACTICAL"?yield(0,nt.ZP)(`/api/exercise_questions/${ei.id}.json`,{method:"put",body:Go}):yield(0,nt.ZP)(`/api/exercise_questions/${ei.id}/update_shixun_score.json`,{method:"post",body:Aa({},Yr)});(ma==null?void 0:ma.status)===0&&(xt.ZP.success("\u7F16\u8F91\u6210\u529F"),ti(tr+1),mo(null))}),Zi=()=>Zs(void 0,null,function*(){(0,lt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u66F4\u65B0\u8BD5\u5377\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,nt.ZP)(`/api/exercises/${Da.categoryId}/sync_random_question.json`,{method:"post"})).status===0&&(yield kr(tr),xt.ZP.success("\u66F4\u65B0\u6210\u529F")),(0,lt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}})}),Li=({value:Ht}={})=>{var ei;const bi=[];let Vi=[];const ni=(ei=Ht==null?void 0:Ht.choices)==null?void 0:ei.map((xo,ho)=>{var Yr;const $a=ho+1;return xo!=null&&xo.is_answer&&(bi.push($a),Vi.push($a)),{value:$a,label:le.createElement(We.Z,{className:"c-black font14",value:`${(Yr=Va.k4)==null?void 0:Yr[ho]}. ${xo==null?void 0:xo.choice_text}`}),disabled:xo==null?void 0:xo.origin_standard_answer}}),Sr=_e.default.confirm({centered:!0,icon:null,title:"\u589E\u8BBE\u6B63\u786E\u7B54\u6848",width:800,content:le.createElement(le.Fragment,null,"\u5F53\u524D\u8BD5\u9898\u7684\u6B63\u786E\u7B54\u6848\u4E3A ",bi==null?void 0:bi.map(xo=>{var ho;return(ho=Va.k4)==null?void 0:ho[xo-1]}),"\uFF0C\u8BF7\u9009\u62E9\u9700\u8981\u589E\u8BBE\u4E3A\u6B63\u786E\u7B54\u6848\u7684\u9009\u9879\u3002",le.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",le.createElement("br",null),le.createElement(Rt.default.Group,{className:"flex-col mt20",options:ni,defaultValue:Vi,onChange:xo=>{Vi=xo}})),onOk:()=>Zs(void 0,null,function*(){const xo=yield(0,nt.ZP)(`/api/exercises/${Da.categoryId}/questions/${Ht==null?void 0:Ht.id}/add_standard_answers.json`,{method:"put",body:{standard_answer:Vi}});(xo==null?void 0:xo.status)===0&&(xt.ZP.success("\u4FEE\u6539\u6210\u529F"),ti(tr+1))})})},gr=(mr=St==null?void 0:St.questionList)==null?void 0:mr.reduce((Ht,ei)=>Ht+Number(ei.questions_score),0),Ir=rr&&((zo=St==null?void 0:St.exam)==null?void 0:zo.exercise_status)!==1,co=Ht=>Zs(void 0,null,function*(){const ei=yield(0,nt.ZP)(`/api/courses/${Da==null?void 0:Da.coursesId}/sync_shixuns.json`,{method:"post",body:{exercise_ids:[Da==null?void 0:Da.categoryId],exercise_question_id:Ht.id}});(ei==null?void 0:ei.status)===0&&(Vr({type:"classroomList/setActionTabs",payload:{}}),xt.ZP.info("\u5B9E\u8BAD\u540C\u6B65\u4E2D\uFF0C\u8BF7\u7A0D\u540E"))}),Wo=(Ht,ei)=>Zs(void 0,null,function*(){let bi=yield(0,nt.ZP)(`/api/courses/${Da==null?void 0:Da.coursesId}/ignore_prompt.json`,{method:"post",body:{container_type:"Exercise",container_id:Da==null?void 0:Da.categoryId,exercise_question_id:Ht==null?void 0:Ht.id}});(bi==null?void 0:bi.status)===0&&(Ls[ei]=!1,Rl([...Ls]))});return le.createElement("section",{className:Xe.wrap},le.createElement("div",{id:"id_left_preview",className:Xe.left,onMouseEnter:Ht=>{const ei=document.getElementById("id_left_preview");ei.style.overflowY="auto"},onMouseLeave:Ht=>{const ei=document.getElementById("id_left_preview");ei.style.overflowY="hidden"}},le.createElement("div",{className:Xe.title},le.createElement("div",{className:"body-overflow-initial"},le.createElement("b",null),le.createElement("span",null,"\u7B54\u9898\u5361"))),le.createElement("div",{className:Xe.total},le.createElement("div",null,le.createElement("img",{src:Nn}),le.createElement("span",null,"\u9898\u6570(\u9053)"),le.createElement("aside",null,St==null?void 0:St.all_questions_count)),le.createElement("div",{className:"mr30 ml30"},le.createElement("img",{src:kn}),le.createElement("span",null,"\u603B\u5206(\u5206)"),le.createElement("aside",null,gr&&gr.toFixed(1))),le.createElement("div",null,le.createElement("img",{src:Re}),le.createElement("span",null,"\u65F6\u957F(\u5206)"),le.createElement("aside",null,((Ii=St==null?void 0:St.exam)==null?void 0:Ii.time)===-1||((vi=St==null?void 0:St.exam)==null?void 0:vi.time)===null?"\u4E0D\u9650":(Ai=St==null?void 0:St.exam)==null?void 0:Ai.time))),(Or=St==null?void 0:St.questionList)==null?void 0:Or.map((Ht,ei)=>{var bi;return le.createElement("div",{className:Xe.list,key:ei},le.createElement("div",{className:Xe.name},le.createElement("b",null),le.createElement("span",null,Ht.name)),le.createElement("aside",null,le.createElement("div",null,"\u5171",le.createElement("span",{className:Xe.b},Ht.questions_count),"\u9898 ",le.createElement("span",{className:Xe.l},"|"),"\u5171",le.createElement("span",{className:Xe.r},Ht.questions_score),"\u5206"),le.createElement("div",{className:Xe.answerSheet},(bi=Ht==null?void 0:Ht.questions)==null?void 0:bi.map((Vi,ni)=>le.createElement("div",{onClick:()=>{const Sr=`Anchor_${Vi==null?void 0:Vi.id}`;let xo=document.getElementById(Sr);xo&&setTimeout(()=>xo.scrollIntoView({block:"center",behavior:"smooth"}))},key:Vi==null?void 0:Vi.id,className:Xe.tag},ni+1)))))})),le.createElement("div",{className:Xe.right},le.createElement("div",{className:Xe.examName,id:"examName"},le.createElement("div",{className:Xe.name},le.createElement(At.Z,{title:(Ur=St==null?void 0:St.exam)==null?void 0:Ur.name,getPopupContainer:Ht=>Ht.parentNode},le.createElement("span",{className:Xe.t},(Fr=St==null?void 0:St.exam)==null?void 0:Fr.name))),rr&&((ko=St==null?void 0:St.exam)==null?void 0:ko.exercise_status)===1&&le.createElement(un.op,{openLoading:!0,shape:"default",onClick:()=>{_e.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:()=>{Zi()}})},type:"primary"},"\u66F4\u65B0\u8BD5\u5377"),!rr&&le.createElement(wt.ZP,{onClick:fi,type:"primary"},"\u968F\u673A\u66F4\u6362")),le.createElement("div",{className:Xe.topWarp},(yr=St==null?void 0:St.questionList)==null?void 0:yr.map((Ht,ei)=>{var bi,Vi;return le.createElement(le.Fragment,{key:ei},le.createElement("div",{className:Xe.head,style:ei===0?{border:0,marginTop:-16}:{}},le.createElement("div",{className:Xe.name},le.createElement("b",null),le.createElement("span",null,Ht.name)),le.createElement("div",{className:Xe.so},"\u5171",le.createElement("span",{className:Xe.b},Ht.questions_count," "),"\u9898 ",Ht.type==="COMBINATION"&&`\uFF08\u5305\u542B${(bi=Ht==null?void 0:Ht.questions)==null?void 0:bi.map(ni=>{var Sr;return(Sr=ni==null?void 0:ni.sub_item_banks)==null?void 0:Sr.length}).reduce((ni,Sr)=>ni+Sr)}\u5C0F\u9898\uFF09`,le.createElement("span",{className:Xe.l},"|"),"\u5171",le.createElement("span",{className:Xe.r},Ht.questions_score),"\u5206"),!rr&&le.createElement("div",{className:Xe.btn},le.createElement(wt.ZP,{onClick:()=>{$t(Ht)},type:"primary",ghost:!0,className:"mr20"},"\u8BBE\u7F6E\u5F97\u5206"),le.createElement(wt.ZP,{onClick:()=>Wn(Ht),type:"primary",ghost:!0},"\u968F\u673A\u66F4\u6362"))),(Vi=Ht==null?void 0:Ht.questions)==null?void 0:Vi.map((ni,Sr)=>{var xo,ho,Yr,$a,Go;return Gr===(ni==null?void 0:ni.id)?le.createElement("div",{id:`Anchor_${ni==null?void 0:ni.id}`,className:Xe.content,style:{padding:0,marginTop:24},key:ni==null?void 0:ni.id},le.createElement("div",{style:{float:"right",marginTop:`${(Ht==null?void 0:Ht.type)==="PRACTICAL"?"-2px":"-6px"}`}},le.createElement(wt.ZP,{onClick:()=>mo(null),className:"mr20",type:"primary",ghost:!0},"\u53D6\u6D88"),le.createElement(wt.ZP,{onClick:()=>{li(Ht==null?void 0:Ht.type,ni)},type:"primary"},"\u4FDD\u5B58")),nr(ni,Ht.type)):le.createElement("div",{id:`Anchor_${ni==null?void 0:ni.id}`,className:Xe.content,key:ni==null?void 0:ni.id},le.createElement("div",{className:Xe.titleWrap},(ni==null?void 0:ni.item_type)==="bprogram"?le.createElement(We.Z,{style:{paddingRight:10},value:Sr+1+"\u3001"+((xo=ni==null?void 0:ni.program_attr)==null?void 0:xo.description)}):le.createElement(We.Z,{style:{paddingRight:10},className:Xe.titleHtml,value:Sr+1+`\u3001${(ni==null?void 0:ni.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":""}`+(ni==null?void 0:ni.name)}),(0,Ha.G5)()&&((ho=ni==null?void 0:ni.shixun)==null?void 0:ho.shixun_change)&&le.createElement(Ot.Z,{trigger:"click",open:Ls[Sr],onOpenChange:Qo=>{Ls[Sr]=!0,Rl([...Ls])},placement:"bottomLeft",autoAdjustOverflow:!1,title:null,content:le.createElement("div",{style:{width:"310px",color:"#000"}},le.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"),le.createElement("div",{className:Xe.btn_warp},le.createElement(wt.ZP,{size:"small",onClick:()=>Wo(ni,Sr)},"\u5FFD\u7565"),le.createElement(wt.ZP,{className:"ml20",size:"small",type:"primary",onClick:()=>{Ls[Sr]=!1,Rl([...Ls]),Vr({type:"classroomList/setActionTabs",payload:{key:"\u5B9E\u8BAD\u540C\u6B65\u786E\u8BA4",onOK:()=>co(ni)}})}},"\u786E\u8BA4\u540C\u6B65"),le.createElement(wt.ZP,{className:"ml20",size:"small",type:"primary",onClick:()=>(0,ht.xg)(`/shixuns/${ni==null?void 0:ni.forked_shixun_identifier}/challenges?exercise=true`)},"\u524D\u5F80\u67E5\u770B")))},le.createElement("i",{className:"iconfont icon-tongzhi1 pl10 current",style:{fontSize:"16px",color:"#F7B500"},onClick:Qo=>Qo.stopPropagation()})),rr&&le.createElement(wt.ZP,{onClick:()=>{var Qo,ma,ui;if(Gr){xt.ZP.warning("\u5148\u4FDD\u5B58\u6216\u53D6\u6D88\u5F53\u524D\u6B63\u5728\u7F16\u8F91\u7684\u8BD5\u9898");return}Fo.setFieldsValue({standard_answers:ni==null?void 0:ni.standard_answer,hack:Aa(Aa({},ni),ni==null?void 0:ni.program_attr),hack_codes:Ia(Aa({},ni==null?void 0:ni.program_attr),{code:Do.Base64.decode(((Qo=ni==null?void 0:ni.program_attr)==null?void 0:Qo.code)||"")}),hack_sets:Aa({},(ma=ni==null?void 0:ni.hack_sets)==null?void 0:ma[0])}),(ni==null?void 0:ni.item_type)=="program"?lt.history.push(`/problems/newedit/${(ui=ni==null?void 0:ni.program_attr)==null?void 0:ui.identifier}?type=exercises&express_id=${Da.categoryId}&question_id=${ni==null?void 0:ni.id}&score=${ni==null?void 0:ni.score}&exercise=true&callback_url=/classrooms/${Da.coursesId}/exercise/${Da.categoryId}/detail?random=true`):mo(ni==null?void 0:ni.id)},type:"primary",style:{marginLeft:"auto"},ghost:!0},"\u7F16\u8F91"),!Ir&&le.createElement(wt.ZP,{disabled:Ir,className:"ml20",onClick:()=>Pn(ni==null?void 0:ni.id,Ht.type,Sr,Ht),type:"primary",ghost:!0},"\u6362\u4E00\u9898")),(ni==null?void 0:ni.item_type)==="bprogram"&&le.createElement(We.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:Xe.titleHtml,value:Do.Base64.decode(((Yr=ni==null?void 0:ni.program_attr)==null?void 0:Yr.code)||"")}),(Ht.type==="SINGLE"||Ht.type==="JUDGMENT"||Ht.type==="MULTIPLE")&&bc(ni),Ht.type==="COMPLETION"&&uo(ni),Ht.type==="SUBJECTIVE"&&Ye(ni),Ht.type==="PROGRAM"&&bt(ni),Ht.type==="BPROGRAM"&&gu(ni),Ht.type==="COMBINATION"&&Bt(ni,Sr),Ht.type==="PRACTICAL"&&Tt(ni),le.createElement(jt.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20},(($a=St==null?void 0:St.exam)==null?void 0:$a.exercise_status)===3&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(Ht.type)&&le.createElement(Te.Z,null,le.createElement(jr.Z,{state:ni==null?void 0:ni.is_wrong,onClick:()=>{Lr==null||Lr({value:Ia(Aa({},ni),{question_id:ni==null?void 0:ni.id,question_score:ni==null?void 0:ni.score})})}})),["PROGRAM","BPROGRAM","PRACTICAL"].includes(Ht.type)&&(ni==null?void 0:ni.show_resubmit)&&le.createElement(Te.Z,null,le.createElement(qi.C,{dataSource:Ia(Aa({},ni),{question_id:ni==null?void 0:ni.id})})),((Go=St==null?void 0:St.exam)==null?void 0:Go.exercise_status)===3&&["SINGLE"].includes(Ht.type)&&le.createElement(Te.Z,null,le.createElement(wt.ZP,{style:{color:"#3061D0"},onClick:()=>{Li({value:ni})}},"\u589E\u8BBE\u6B63\u786E\u7B54\u6848"))))}))}))),rr?le.createElement(un.vr,null,le.createElement(ne.Z,{showTotal:ht.rU,total:(vo=St==null?void 0:St.exam)==null?void 0:vo.total_num,pageSize:1,current:tr+1,showSizeChanger:!1,onChange:ti,showQuickJumper:!1,hideOnSinglePage:!1})):le.createElement(un.vr,{LeftContent:le.createElement(un.op,{onClick:ze,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u8FD4\u56DE"),RightContent:le.createElement(jt.Z,{align:"middle"},le.createElement(Ot.Z,{color:"#55575D",overlayClassName:Xe.popover,open:aa,getPopupContainer:Ht=>Ht==null?void 0:Ht.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"},le.createElement(un.op,{onMouseEnter:()=>ka(!0),onMouseLeave:()=>ka(!1),onClick:()=>Zs(void 0,null,function*(){const Ht=Number(gr);[100,120,150].includes(Ht)||(yield new Promise((ei,bi)=>{_e.default.confirm({centered:!0,icon:null,okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:le.createElement("div",{className:"c-grey-333"},"\u5F53\u524D\u8BD5\u5377\u603B\u5206\u4E3A",le.createElement("span",{style:{color:"#FA6400",margin:"0 5px"}},Ht),"\u5206\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u8FDB\u884C\u4FDD\u5B58\uFF1F"),onOk:()=>Zs(void 0,null,function*(){ei("")}),onCancel:()=>{bi()}})})),hn()}),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"}},"\u4FDD\u5B58")),le.createElement(un.op,{shape:"default",type:"primary",onClick:()=>Zs(void 0,null,function*(){const Ht=Number(gr);[100,120,150].includes(Ht)||(yield new Promise((ei,bi)=>{_e.default.confirm({centered:!0,icon:null,okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:le.createElement("div",{className:"c-grey-333"},"\u5F53\u524D\u8BD5\u5377\u603B\u5206\u4E3A",le.createElement("span",{style:{color:"#FA6400",margin:"0 5px"}},Ht),"\u5206\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u8FDB\u884C\u4FDD\u5B58\uFF1F"),onOk:()=>Zs(void 0,null,function*(){ei("")}),onCancel:()=>{bi()}})})),Jt()}),style:{height:38,marginLeft:20}},"\u63D0\u4EA4"))}),le.createElement(Es,{visible:Fs,questionParams:Xl.current,getdata:Tr,onRandomExchange:()=>Zs(void 0,null,function*(){const Ht=Xl.current;yield Yn({single_question_id:Ht.id,seleted_item_bank_ids:Ht.ids},{type:Ht.type,index:Ht.index}),Kr(!1)}),selectFromProblemSet:()=>{const Ht=Xl.current,ei=`${location.pathname}${location.search}`;ei.includes("exercise")&&lt.history.push(`/paperlibrary/exchangequestion?type=exercise&qid=${Ht.id}&qtype=${Ht.type}&exerciseid=${Da.categoryId}&from=${ei}`)},onCancel:()=>{Kr(!1)}}))};var fu=(0,lt.connect)(({classroomList:St})=>({classroomList:St}))(Vu)},83292:function(Rn,$n,be){"use strict";be.r($n),be.d($n,{default:function(){return Ju}});var le=be(67294),Xe={wrapper:"wrapper___KtBVT",breadCrumbWrapper:"breadCrumbWrapper___k9tSB",baseInfo:"baseInfo____j5EY",radioBtnWrapper:"radioBtnWrapper___k9OCh",baseLineHeight:"baseLineHeight___O_QXK",radiogroup:"radiogroup___e2fW6",easy:"easy___WcUAp",medium:"medium___U_o3j",hard:"hard___dAXLS",formWrap:"formWrap___wt5tC",baseFormItem:"baseFormItem___zV64d",cascaderPopup:"cascaderPopup___qm63f",fixedBottom:"fixedBottom___liDZ4",cancelBtn:"cancelBtn___ZV9Mi",confirmBtn:"confirmBtn___DwH6m",previewBtn:"previewBtn___aLYCy",concat:"concat___ZuLMo"},Lt=be(2453),At=be(91773),wt=be(85673),_e=be(35973),Ve=be(40950),xt=be(74330),ut=be(28802),pt=be(38089),Rt=be(98813),Ot=be(71230),jt=be(37720),Te=be(85804),ne=be(33170),te=Object.defineProperty,ce=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ge=Object.prototype.propertyIsEnumerable,ye=(tn,un,Gn)=>un in tn?te(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,we=(tn,un)=>{for(var Gn in un||(un={}))se.call(un,Gn)&&ye(tn,Gn,un[Gn]);if(ce)for(var Gn of ce(un))ge.call(un,Gn)&&ye(tn,Gn,un[Gn]);return tn},Ce=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())});function Re(tn){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/examination_banks/${tn}/edit_random_exam_new.json`,{method:"get"})})}function We(tn,un){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/examination_banks/${tn}/update_random_exam.json`,{method:"post",body:un})})}function lt(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:tn})})}function ht(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/disciplines.json",{method:"get",params:tn})})}function nt(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:tn})})}function mt(tn,un){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/examination_banks/${tn}/set_item_type_score.json`,{method:"post",body:un})})}function at(tn,un){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/exercises/${tn}/set_item_type_score.json`,{method:"post",body:un})})}function Pt(tn,un){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/examination_banks/${tn}/delete_item_type.json`,{method:"post",body:un})})}function Nt(tn,un){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/exercises/${tn}/delete_item_type.json`,{method:"post",body:un})})}function Et(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:tn})})}function Ln(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:tn})})}function xn(tn){return Ce(this,null,function*(){return(0,ne.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:tn})})}function Nn(tn){return Ce(this,null,function*(){return(0,ne.ZP)(`/api/exercises/${tn.categoryId}/edit.json`,{method:"get",params:we({},tn)})})}var fn=(tn=>(tn.OnlyFileFolder="1",tn.OnlyKnowledge="2",tn.OnlyDifficulty="3",tn.FileFolderAndDiff="4",tn.FileFolderAndKnowledge="5",tn.KnowledgeAndDiff="6",tn.All="7",tn.Shixun="8",tn))(fn||{}),Qe=be(96486),Ke=Object.defineProperty,Je=Object.defineProperties,_n=Object.getOwnPropertyDescriptors,Xn=Object.getOwnPropertySymbols,zt=Object.prototype.hasOwnProperty,kn=Object.prototype.propertyIsEnumerable,bn=(tn,un,Gn)=>un in tn?Ke(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,oi=(tn,un)=>{for(var Gn in un||(un={}))zt.call(un,Gn)&&bn(tn,Gn,un[Gn]);if(Xn)for(var Gn of Xn(un))kn.call(un,Gn)&&bn(tn,Gn,un[Gn]);return tn},Yt=(tn,un)=>Je(tn,_n(un)),Mt=(tn=>(tn[tn.FileFolder=1]="FileFolder",tn[tn.Difficulty=2]="Difficulty",tn[tn.Knowledge=3]="Knowledge",tn))(Mt||{});const _t=(0,le.createContext)(null),mn={[fn.OnlyFileFolder]:[1],[fn.OnlyKnowledge]:[3],[fn.OnlyDifficulty]:[2],[fn.FileFolderAndDiff]:[1,2],[fn.FileFolderAndKnowledge]:[1,3],[fn.KnowledgeAndDiff]:[3,2],[fn.All]:[3,2,1]},rn=(tn,un)=>{if(tn.length!==un.length)return!1;for(const Gn of un)if(!tn.includes(Gn))return!1;return!0},He=tn=>{for(const[un,Gn]of Object.entries(mn))if(rn(tn,Gn))return un},Me={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",COMPLETION:"\u586B\u7A7A\u9898",JUDGMENT:"\u5224\u65AD\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PROGRAM:"\u7F16\u7A0B\u9898",BPROGRAM:"\u7A0B\u5E8F\u586B\u7A7A\u9898",COMBINATION:"\u7EC4\u5408\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898"},Fe={1:{label:"\u7B80\u5355",color:"#46B70E"},2:{label:"\u9002\u4E2D",color:"#165DFF"},3:{label:"\u56F0\u96BE",color:"#EE6F1A"}},Oe=tn=>tn&&parseFloat(tn.toFixed(1)),Ue=(tn,un)=>{var Gn,er,Wi;switch(un.type){case"init":return un.payload;case"updateBaseInfo":return Yt(oi({},tn),{examination_bank:un.payload});case"deleteQuestionType":{const{item_types:Bi}=tn,ki=Bi.filter(On=>On.item_type!==un.payload);return tn.examination_bank.question_count=Oe(ki.reduce((On,pi)=>On+pi.item_bank_count,0)),tn.examination_bank.total_score=Oe(ki.reduce((On,pi)=>On+pi.total_score,0)),Yt(oi({},tn),{item_types:ki})}case"setQuestionType":{const{item_types:Bi=[]}=tn,ki=Bi.map(pi=>pi.item_type),On=Bi.filter(pi=>un.payload.includes(pi.item_type));for(const pi of un.payload)ki.includes(pi)||(pi==="PRACTICAL"?On.push({item_type:pi,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:Me[pi],random_rule_type:fn.Shixun,score:0,total_score:0}):On.push({item_type:pi,contents:[],item_bank_count:0,item_type_text:Me[pi],score:0,total_score:0}));return Yt(oi({},tn),{item_types:On})}case"updateItemTypes":return Yt(oi({},tn),{item_types:un.payload});case"deleteRule":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(pi=>pi.item_type===un.payload.itemType),On=ki.contents.find(pi=>pi.id===un.payload.id&&pi.is_share==un.payload.is_share);return ki.contents=ki.contents.filter(pi=>pi!==On),((Gn=ki.contents)==null?void 0:Gn.length)===0&&(ki.random_rule_type=[]),ki.item_bank_count-=On==null?void 0:On.quanlity,Bi.examination_bank.question_count-=On==null?void 0:On.quanlity,ki.total_score-=(On==null?void 0:On.quanlity)*ki.score,Bi.examination_bank.total_score-=(On==null?void 0:On.quanlity)*ki.score,ki.total_score=Oe(ki.total_score),Bi.examination_bank.total_score=Oe(Bi.examination_bank.total_score),Bi.contents=ki.contents,Bi}case"changeQuestionNum":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(da=>da.item_type===un.payload.itemType),On=(er=ki==null?void 0:ki.contents)==null?void 0:er.find(da=>da.id===un.payload.id);if(un.payload.itemType==="PRACTICAL")return un.payload.num&&(Bi.examination_bank.question_count=Bi.examination_bank.question_count-ki.item_bank_count+un.payload.num,Bi.examination_bank.total_score=Oe(Bi.examination_bank.total_score-ki.total_score+un.payload.num*ki.score)),un.payload.score&&(Bi.examination_bank.total_score=Oe(Bi.examination_bank.total_score-ki.total_score+un.payload.num*ki.score)),ki.item_bank_count=un.payload.num,ki.total_score=Oe(ki.item_bank_count*ki.score),Bi;Bi.examination_bank.question_count=Bi.examination_bank.question_count-(On==null?void 0:On.quanlity)+un.payload.num;const pi=ki.contents.find(da=>da.id===un.payload.id&&da.teacher_group_id===un.payload.teacher_group_id);pi.quanlity=un.payload.num;let ur=0,_r=0;for(const da of ki.contents)ur+=da==null?void 0:da.quanlity,_r+=(da==null?void 0:da.quanlity)*ki.score;return Bi.examination_bank.total_score=Oe(Bi.examination_bank.total_score-ki.total_score+_r),ki.item_bank_count=ur,ki.total_score=Oe(_r),Bi}case"changeQuestionScore":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(On=>On.item_type===un.payload.itemType);return ki.score=un.payload.score,ki.total_score=Oe(ki.item_bank_count*ki.score),Bi.examination_bank.total_score=Oe(Bi.item_types.reduce((On,pi)=>On+pi.total_score,0)),Bi}case"editRule":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(On=>On.item_type===un.payload.itemType);return ki.contents=un.payload.tableData.map(On=>Yt(oi({},On),{item_type:un.payload.itemType,random_rule_type:un.payload.randomRuleType})),ki.random_rule_type=un.payload.randomRuleType,ki.item_bank_count=ki.contents.reduce((On,pi)=>On+(pi==null?void 0:pi.quanlity),0),ki.score=ki.score||1,ki.total_score=Oe(ki.item_bank_count*ki.score),Bi.examination_bank.question_count=Bi.item_types.reduce((On,pi)=>On+pi.item_bank_count,0),Bi.examination_bank.total_score=Oe(Bi.item_types.reduce((On,pi)=>On+pi.total_score,0)),Bi}case"addShixun":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(On=>On.item_type==="PRACTICAL");return ki.item_banks=un.payload.shixunList,Bi.examination_bank.question_count=Bi.examination_bank.question_count+1,ki.item_bank_num=ki.item_banks.length,ki.item_bank_count=ki.item_bank_count||1,ki.score=ki.score||1,ki.total_score=ki.total_score||ki.score*ki.item_bank_count,Bi.examination_bank.total_score=(Wi=Bi==null?void 0:Bi.item_types)==null?void 0:Wi.map(On=>On.total_score).reduce((On,pi)=>On+pi),Bi}case"deleteShixunQuestion":{const Bi=(0,Qe.cloneDeep)(tn),ki=Bi.item_types.find(On=>On.item_type==="PRACTICAL");return ki.item_banks=ki.item_banks.filter(On=>On.id!==un.payload.shixunId),ki.item_bank_num-=1,ki.item_bank_count>ki.item_bank_num&&(ki.item_bank_count-=1,ki.total_score-=ki.score,ki.total_score=Oe(ki.total_score)),Bi}}};var Be=be(99640),ot=Object.defineProperty,Cn=Object.defineProperties,ci=Object.getOwnPropertyDescriptors,si=Object.getOwnPropertySymbols,pn=Object.prototype.hasOwnProperty,qn=Object.prototype.propertyIsEnumerable,en=(tn,un,Gn)=>un in tn?ot(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,wi=(tn,un)=>{for(var Gn in un||(un={}))pn.call(un,Gn)&&en(tn,Gn,un[Gn]);if(si)for(var Gn of si(un))qn.call(un,Gn)&&en(tn,Gn,un[Gn]);return tn},Si=(tn,un)=>Cn(tn,ci(un)),Di=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())}),ro=({courseOptions:tn,setCurrentKey:un,loading:Gn,form:er})=>{const{data:Wi,disabled:Bi,dispatch:ki}=(0,le.useContext)(_t),On=(0,_e.useParams)(),pi=(0,le.useRef)(!0),[ur,_r]=(0,le.useState)(!1),da=(0,le.useMemo)(()=>{var ia,Es,cs,Do,jr;if(!tn.length||!Wi)return;const qi=(ia=Wi==null?void 0:Wi.examination_bank)==null?void 0:ia.sub_discipline_id,Va=((Es=Wi==null?void 0:Wi.examination_bank)==null?void 0:Es.time)===-1?void 0:pi.current?On.id?(cs=Wi==null?void 0:Wi.examination_bank)==null?void 0:cs.time:((Do=Wi==null?void 0:Wi.examination_bank)==null?void 0:Do.time)||60:(jr=Wi==null?void 0:Wi.examination_bank)==null?void 0:jr.time;pi.current=!1;let Ha=[];for(const Ts of tn)for(const _s of Ts.children)_s.value===qi&&(Ha=[Ts.value,_s.value]);return Si(wi({},Wi.examination_bank),{time:Va,course:Ha})},[Wi,tn]);return(0,le.useEffect)(()=>{er.setFieldsValue(wi({},da))},[da]),le.createElement(xt.Z,{spinning:Gn,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30"},le.createElement("div",{className:Xe.formWrap},le.createElement(At.default,{form:er,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:da||{difficulty:2,time:60},onValuesChange:(ia,Es)=>{const{course:cs=[]}=Es,Do=Si(wi({},Es),{sub_discipline_id:cs[1]||0});ki({type:"updateBaseInfo",payload:Do})}},le.createElement(At.default.Item,{name:"name",label:"\u8BD5\u5377\u540D\u79F0",className:Xe.baseLineHeight,rules:[{required:!0,validator:(ia,Es)=>{var cs;return((cs=Es==null?void 0:Es.replaceAll(" ",""))==null?void 0:cs.length)>0?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0")}}]},le.createElement(ut.default,{maxLength:60,className:Xe.baseFormItem,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u540D\u79F0",showCount:!0})),le.createElement(At.default.Item,{label:"\u65B9\u5411&\u8BFE\u7A0B",name:"course",className:Xe.baseLineHeight},le.createElement(pt.Z,{className:Xe.baseFormItem,disabled:Bi,size:"large",allowClear:!1,placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:tn,dropdownMenuColumnStyle:{padding:"8px 12px",fontSize:14}})),le.createElement("div",{className:Xe.concat},"\u6CA1\u6709\u5408\u9002\u7684\u65B9\u5411&\u8BFE\u7A0B\uFF1F",le.createElement("span",{onClick:()=>_r(!0)},"\u8054\u7CFB\u6559\u7814\u52A9\u7406")),le.createElement(At.default.Item,{label:"\u96BE\u5EA6",name:"difficulty",className:Xe.radioBtnWrapper,rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},le.createElement(Rt.ZP.Group,{disabled:Bi,className:Xe.radiogroup},le.createElement(Rt.ZP.Button,{className:Xe.easy,value:1},"\u7B80\u5355"),le.createElement(Rt.ZP.Button,{className:Xe.medium,value:2},"\u9002\u4E2D"),le.createElement(Rt.ZP.Button,{className:Xe.hard,value:3},"\u56F0\u96BE"))),le.createElement(At.default.Item,{label:"\u7B54\u9898\u65F6\u957F",className:Xe.baseLineHeight},le.createElement(Ot.Z,{align:"middle"},le.createElement(At.default.Item,{name:"time",noStyle:!0},le.createElement(jt.Z,{className:Xe.baseFormItem,min:1,disabled:Bi,size:"large",max:9999,style:{width:220},placeholder:"\u8BF7\u586B\u5199\u7B54\u9898\u65F6\u957F"})),le.createElement("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14}},"\u5206\u949F"))),le.createElement(At.default.Item,{label:"\u8BD5\u5377\u987B\u77E5",name:"exam_notes"},le.createElement(ut.default.TextArea,{rows:6,disabled:Bi,maxLength:65535,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u987B\u77E5"})))),le.createElement("div",{className:Xe.fixedBottom},le.createElement(Te.ZP,{className:`${Xe.cancelBtn} mr5`,onClick:()=>{On.id||window.location.href.indexOf("randompaper")>-1?_e.history.push("/paperlibrary"):_e.history.push(`/classrooms/${On.coursesId}/exercise`)}},"\u53D6\u6D88"),le.createElement(Te.ZP,{className:`${Xe.confirmBtn} ml15`,type:"primary",size:"large",onClick:()=>Di(void 0,null,function*(){if(yield er.validateFields(),!On.id&&!On.coursesId){const ia=yield lt(Wi);ia.status===0&&(_e.history.replace(`/randompaper/edit/${ia==null?void 0:ia.examination_bank_id}?type=settings`),un("settings"))}else un("settings")})},"\u4E0B\u4E00\u6B65")),le.createElement(Be.Z,{open:ur,onCancel:()=>{_r(!1)}}))},Zr=be(62844),Fi=be(15746),mi={flex_box_center:"flex_box_center___NXYwj",flex_space_between:"flex_space_between___Oy2UZ",flex_box_vertical_center:"flex_box_vertical_center___ybBar",flex_box_center_end:"flex_box_center_end___yyQPf",flex_box_column:"flex_box_column____kuXY",questionInfo:"questionInfo___U9mnu",label:"label___PP7Ng",content:"content___PUXFl",leftPart:"leftPart___uoQeo",rightPart:"rightPart___mCG7H",dragItem:"dragItem___djmPG",blackText:"blackText___KqEaU",greyText:"greyText___VamKm",iconWrapper:"iconWrapper___o1C0y",contentArea:"contentArea___Fj7D0",dragging:"dragging___mX3Il",hidden:"hidden___KWDLK",dragIcon:"dragIcon___yPuB3",deleteIcon:"deleteIcon___go29y",disabled:"disabled___uSK9k",challengeNameWrapper:"challengeNameWrapper___DFjRy",challengeName:"challengeName___m7v0x",shixunPreviewFooter:"shixunPreviewFooter___iaciG",shixunInfoWrapper:"shixunInfoWrapper___aSihg",shixunInfo:"shixunInfo___WYBm1",btnToDetail:"btnToDetail___WVmtj",fixedBottom:"fixedBottom___oeMSX",cancelBtn:"cancelBtn___ac73V",confirmBtn:"confirmBtn___sYh2O",previewBtn:"previewBtn___c2uQz",setScoreModalTable:"setScoreModalTable___kPddX",title:"title___lP1E2",tipcontent:"tipcontent___tV6uE",name:"name___YLyPW",tip:"tip___FYIzt",info:"info___rSdr9",img:"img___ft7eS"},Co=be(26194),jn=be(30001),yn=be(84567);const Jr=[{label:"\u5355\u9009\u9898",value:"SINGLE"},{label:"\u591A\u9009\u9898",value:"MULTIPLE"},{label:"\u586B\u7A7A\u9898",value:"COMPLETION"},{label:"\u5224\u65AD\u9898",value:"JUDGMENT"},{label:"\u7B80\u7B54\u9898",value:"SUBJECTIVE"},{label:"\u7F16\u7A0B\u9898",value:"PROGRAM"},{label:"\u7EC4\u5408\u9898",value:"COMBINATION"},{label:"\u5B9E\u8BAD\u9898",value:"PRACTICAL"},{label:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM"}];var hr=({open:tn,onCancel:un,onOk:Gn})=>{const{data:er,dispatch:Wi}=(0,le.useContext)(_t);(0,le.useEffect)(()=>{if(tn){const{item_types:On}=er||{};ki(On==null?void 0:On.map(pi=>pi.item_type))}},[tn,er]);const[Bi,ki]=(0,le.useState)([]);return le.createElement(Zr.default,{title:le.createElement("div",null,"\u9898\u578B\u8BBE\u7F6E",le.createElement("span",{className:"c-grey-333",style:{fontSize:14,fontWeight:400}},"\uFF08\u901A\u8FC7\u52FE\u9009\u53EF\u5BF9\u9898\u578B\u8FDB\u884C\u6DFB\u52A0/\u5220\u9664\uFF09")),closable:!0,centered:!0,open:tn,onCancel:un,onOk:()=>Gn(Bi)},le.createElement(yn.default.Group,{value:Bi,onChange:On=>ki(On)},le.createElement(Ot.Z,{gutter:[0,20]},Jr.map(On=>le.createElement(Fi.Z,{key:On.value,span:6},le.createElement(yn.default,{value:On.value},On.label))))))},Nr=be(57399),Xo=Object.defineProperty,ji=Object.getOwnPropertySymbols,Mi=Object.prototype.hasOwnProperty,Oi=Object.prototype.propertyIsEnumerable,vr=(tn,un,Gn)=>un in tn?Xo(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,Dr=(tn,un)=>{for(var Gn in un||(un={}))Mi.call(un,Gn)&&vr(tn,Gn,un[Gn]);if(ji)for(var Gn of ji(un))Oi.call(un,Gn)&&vr(tn,Gn,un[Gn]);return tn},En=({open:tn,onCancel:un,onOk:Gn})=>{const{data:er}=(0,le.useContext)(_t),[Wi,Bi]=(0,le.useState)();console.log("--xxx-",Wi),(0,le.useEffect)(()=>{tn&&Bi((0,Qe.cloneDeep)(er))},[tn,er]);const ki=(0,le.useMemo)(()=>{var On;let pi;return pi=(On=Wi==null?void 0:Wi.item_types)==null?void 0:On.map(ur=>ur.total_score).reduce((ur,_r)=>parseFloat(ur)+parseFloat(_r)),pi==null?void 0:pi.toFixed(1)},[Wi]);return tn?le.createElement(Zr.default,{title:"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C",open:tn,width:640,centered:!0,closable:!0,onCancel:un,onOk:()=>{Gn(Wi)}},le.createElement("div",{className:"c-black mb20"},"\u603B\u5206",le.createElement("span",{className:"ml10 c-light-primary"},ki)),le.createElement(Nr.default,{columns:[{title:"\u9898\u578B\u540D\u79F0",dataIndex:"item_type_text",width:130},{title:"\u5C0F\u9898\u603B\u6570",dataIndex:"item_bank_count",width:130},{title:"\u9898\u578B\u603B\u5206",dataIndex:"total_score",width:130},{title:"\u64CD\u4F5C",render(On,pi){const{score:ur,item_type:_r}=pi;return le.createElement("div",{style:{color:"#9096A3"}},"\u6BCF",((pi==null?void 0:pi.item_type)==="PRACTICAL","\u9898"),le.createElement(jt.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:(pi==null?void 0:pi.item_bank_count)===0,max:100,onChange:da=>{const ia=Wi,Es=ia.item_types.find(Do=>Do.item_type===_r);Es.score=Number(da);const cs=da*Es.item_bank_count;Es.total_score=cs&&Number(cs.toFixed(1)),ia.examination_bank.total_score=ia.item_types.reduce((Do,jr)=>Number(Do)+Number(jr.total_score),0),Bi(Dr({},ia))}}),"\u5206")}}],className:mi.setScoreModalTable,dataSource:Wi==null?void 0:Wi.item_types,rowKey:"item_type",pagination:!1})):null},Ee=be(55238),on=be(88044),gn=be(51380),Mn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAtFJREFUWEftWL9rU1EYPffFpCCKEEEJVUQHB10qAUHFHwguDg4ORRDq4uDg4CBIJ6GD0D/B3UEFJ5cugjbQChIqokWKClVrFDGIg2B8yZX3Xl/z/O5LzvfyKhTJXV7g/jrfOfc797sx1toCNnAzQ4A51RkymJNA/CcMvpoYhf0xDWtPwqICWEKM+QSYGgojt3Hw3mweFjmD9YlR+N8WAJSdjYwBrAWCb1oL+jzvMbzSFKoPBgLKAc6dugPbuRDtHzAXgGEMxmjjsXEAYr4MMOw2DcA8wcjWG6g+XOEAZ8c+wNpKtCXZMI+WMn6DJrbsOMQBPtrr9ySM4ZX9LEApkOfd5QBntvvhuhqFswKOz2/wDQWSZ9o0FADLfji5fBTYPwmUduYVMmV+IrLWF2DpFtCcizDTu3hmFeCBKaC4LR2cJpvjMZrwfn8HFm8qATan/bWslWckq6SuTyWcIfi5allrkmsY/DoZSZzanCwQo0REAwTIJf583e9txNIWic9p5E2OCQilZ7BxzY/8L60RSqRkcgnHqKXERgFw5eq/80EagIbB91cSPigilMabNWmYD6okXr7cZdABIAE7Gv6dpfIuZxJDI/G7S32ymJx6CoDP50ny5mIXIJPQ2Y8kEVVEw+DSeCKLWbkldlQA6JZwaZe9BuDr8xkAZjU6Pp5LvHiu9xmkWej6Wt8KXOK1VuGDL89272IaMLv6yAID3cUvzvS5SZyQyZOAZZl7hrnEz0/rjZoxzAhOyUEOcOFEH6MWhDGCWAApPs8B1o/p68GsANgbRVVRPzu8fvVg5gA0xcLTsV/wCtF/iKz6cABkfBfL+Z12m0tc2/cWXnFPODf3zZCxmOj4yxzg/O4qWv48LDwHIHOZrO/i5HoGHRQ3HeEAg0m1ShWtn/dh27tgUAilTqOUMcyqm7AfbZjCR5Q2j+N4o64DOMDhXq8pQ4B5mdzwDP4B5kHmZrL/eyAAAAAASUVORK5CYII=",In="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",ii="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",Ci="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABpxJREFUWAntWE2IHFUQrtfzk5nNbrKbRGPcRSU/oIEkmERjMAQhCBIjKBpFEBER9OZNL4IevOhFbyGHRA9BhKBeouJFIkTNwaxGg16ikN1k0WR3M5ndnf/ptr56r7p7+s1mkYCHkILpev1e1VdfVb3X0zNEt+Qmr4Dpl9+xs9FYq0XvR0SPUETriC9WYI6x72YML0T0By99Gxj68KWd5k/ndEPKiwRy7RadZSKrDEdDVGiRxfnZ9YjJM1MTUScydIwn371Roh7BD042P2Hg5xHRxRON+6R6WlE7m1wzGRjT4ZnTjNOFjQkYIbQ68UlGURhSYIIpTu7k6N7CkWeN6XoE3zoxP8WMuK22kemG6ngxel4CWQeubpw1AmQrkFpnyx9HVg/uy8MuLbPV5uJ7DuloUDhlA8hWSAxS8SSEZy6zi152V2pX3/YJzjVlH8EtYkTDUaAhOobuJ0vZL7XuJWzoKY9gtd6JY5eKAQ0PFOL7/2NQqbWp0eKNCjFmk0fQVsvQ2Opl9Pj2NZQPeGdnWpu5jbtu68zA2uV4QsIll+sAdPigfPXzNF2cafKBCo1HUFF2bRiikQEmx/If9042H49vdm9qTKsDenD9EE1O263mbaaDhy7FeWf3jBe5F5mXe5+b+gyFhiy17rWKK+NVcGQ5ppRjpheZW680/oQQSy5LAiSmGHGpPYKyB/WUZnurvFUDJD32eodFJQXjrGAN4nQ2Hq/4BGHsgtrHChKxAH38BT6+wED8LUCOt/CejSW6czhPF2badPqvJoUO2/o4ew0Y+yaE+xBkVwkEniBrd5KScEsOnwNo1TCjY5fQ6/uG6b51RXWlLWMNOvxdNaZD/J2GEKLF340dP+xZe0xjCPBxQTmIjqHtx67DRIiKDTuDUMb+3jsKPeQQYufdJRrjaiqezR/xgKGYVgM/5ItHEJZog22FHSuCEOZ1DQAbjPvZryz1gWYeQ2XMW0ahBOEYrPFhuFhjDDuvxWBtATi4GCUat7Ls5j0DVwW8tYyOeNBUa4Z0/nLbJQ8QJGu1XlMvd2LnoaQN4NQryBxi9YbbCrRpbYGa7Yh+mWzS7EKXxlbl6ZWHV9DalTn6+twC7V5f4q/LHE3Pd+nIqSrV2VYF1dfvd8xl97yts1o7/eLRf7B1RbSWCaSd5zdmem3vCtrFwVVanYjOTDTpgXuW0e9TLfr4hzmaWQhlew4WDc01JbwUfTF8zGtM4GLcp4JYSiRLDisHtg70kMNcMW+kWsfPzNOJX2uYEkELQQ6CVwCQcK8C8ThNGHYaE9ojCAPZu6xxOBEAGqLjvZvKdqLPFb7qn11WcjEhDNheW6b40BAsewR1EQYIJKApB8ytkJMIC1/WDuX8STfjYJIK4fWfA+BngIiOEdSJ9ywAAQAJmBvrhM5NzCbvjAqk+mKlI4kJDjuoRuI6hsYHotreKTNoe8I9grZmzkDqx4YwFgerPxtfYGAXwSLLFXMHdwzS09uXU6nAGFwe+ZpEmVJjzOm8aqwLpNM69vqx9ck337G8AML8BTsQQKHNL7CX50KavNqljbfnaYDfuiHnptr03jfX6O9qSAe2DNCjm8s034hocrbLEIa2jRVp22iRupxXpY7kBK1HG7wcY4a1EHerMqmXFz6aZW9bHWTBCbmHaTLGHATrq5YbarSJai2usbMt86+EJ7aW6bHNJZq61qU5JrplNPnp8OlPNfryHL8xS1/QFRsPsBg5eMH3WyzRYcJ5S0ZWy5grqho/cjG+WjdU51+/adsG3x8fb9AbX1TlEZMmx8D0zP1ld9A4TioeyTcvYoOWxfcJCrEcB0T3Edhqm5clvtg4TRLjGX4c/jblH6h8ztCawRwFjI1tBI0PyKoW4nzvPWZ03zE7tgGhRMf1tx2xPHt6wlNI2a0b/g/k/BV9hgiUXOq8HS5ei43iPSQJ8r6xiVocv4JBwJ79K5WtEOx0Tny0XdD8QfXPT0f0+dmWvKWAHfbqoe8b1MafGpKN0xiLn2r2z+X0GS6JyeW5o5VmPhfIW2b2y5xduDh44CABFqhUBa9nP1xGWw1dqoRUcy8M6JD6CF7mVLbDqOW1uF5vjpeK+YfEYQkCWYYZc4HQyxU+6Veqeme1Jpuc4t4CNFqdcY9g1yzbX2/WL+QCM9QLhzstl90/S1fUdg2FgWQT6EVLbNHpThjNhaa8Hz6e7DgcFVbPTxwNcrk9JgqH9bBkCWYDZPh7uNmWanuhVfhIVaIwOjUzeNfLZ141XPdbcpNX4F/ikyqlsA/6bwAAAABJRU5ErkJggg==",Ji={ruleCheckBox:"ruleCheckBox___Onj2f",folderAreaWrapper:"folderAreaWrapper___ut2mr",folderAreaHeader:"folderAreaHeader___fOIDA",folderWrapper:"folderWrapper___IpJ50",folderIcon:"folderIcon___zBoRM",shareFolderIcon:"shareFolderIcon____5s3p",treeNodeItem:"treeNodeItem___quqla",treeNodeDifficulty:"treeNodeDifficulty___en0gk"},Vt=be(38244),Zt=Object.defineProperty,It=Object.defineProperties,dn=Object.getOwnPropertyDescriptors,Ri=Object.getOwnPropertySymbols,hi=Object.prototype.hasOwnProperty,ri=Object.prototype.propertyIsEnumerable,Kt=(tn,un,Gn)=>un in tn?Zt(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,wn=(tn,un)=>{for(var Gn in un||(un={}))hi.call(un,Gn)&&Kt(tn,Gn,un[Gn]);if(Ri)for(var Gn of Ri(un))ri.call(un,Gn)&&Kt(tn,Gn,un[Gn]);return tn},Ki=(tn,un)=>It(tn,dn(un)),wr=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())});const Kn=(tn,un,Gn)=>tn.map(er=>er.key===un?wn(wn({},er),Gn):er.children?Ki(wn({},er),{children:Kn(er.children,un,Gn)}):er),Wt={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3},Yi=(tn,un,Gn)=>tn.map(er=>{var Wi;const Bi=er==null?void 0:er.tag_disciplines.map(On=>{const pi=On==null?void 0:On.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Wt[ur.name]}));return{title:He(un)===fn.All&&pi.length>0?le.createElement(Ot.Z,{justify:"space-between"},le.createElement(Fi.Z,null,`${On.name}\uFF08${On.child_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:pi})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"diffNum"],initialValue:On==null?void 0:On.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"extra"],initialValue:Ki(wn({},er),{type:Gn})},le.createElement("input",{type:"hidden"})))):`${On.name}\uFF08${On.child_count}\uFF09`,key:`${er.id}_${On.id}`,name:On.name,parentName:er.name,item_banks_count:On.child_count,icon:null,isLeaf:!0,checkable:He(un)===fn.FileFolderAndKnowledge,disableCheckbox:On.child_count===0}}),ki=er==null?void 0:er.difficulty_count.map(On=>({label:On==null?void 0:On.name,value:Wt[On.name]}));return{title:He(un)===fn.FileFolderAndDiff&&ki.length>0?le.createElement(Ot.Z,{justify:"space-between"},le.createElement(Fi.Z,null,`${er.name}\uFF08${er.item_banks_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:ki})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"diffNum"],initialValue:er==null?void 0:er.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"extra"],initialValue:Ki(wn({},er),{type:Gn})},le.createElement("input",{type:"hidden"})))):`${er.name}\uFF08${er.item_banks_count}\uFF09`,key:`${er.id}`,name:er.name,item_banks_count:er.item_banks_count,icon:On=>On.expanded?Gn==="0"?le.createElement("img",{src:In,className:Ji.folderIcon}):le.createElement("img",{src:ii,className:Ji.shareFolderIcon}):Gn==="0"?le.createElement("img",{src:Mn,className:Ji.folderIcon}):le.createElement("img",{src:Ci,className:Ji.shareFolderIcon}),isLeaf:!er.have_child&&!((Wi=er.tag_disciplines)!=null&&Wi.length),checkable:He(un)===fn.OnlyFileFolder,disableCheckbox:er.item_banks_count===0,children:er.children.length?He(un)===fn.All||He(un)===fn.FileFolderAndKnowledge?[...Yi(er.children,un,Gn),...Bi]:Yi(er.children,un,Gn):[]}}),pr=(tn,un,Gn)=>tn.map(er=>{var Wi;const Bi=er==null?void 0:er.tag_disciplines.map(On=>{console.log("tagItem:",On);const pi=On==null?void 0:On.difficulty_count.map(ur=>({label:ur==null?void 0:ur.name,value:Wt[ur.name]}));return{title:He(un)===fn.All&&pi.length>0?le.createElement(Ot.Z,{justify:"space-between"},le.createElement(Fi.Z,null,`${On.name}\uFF08${On.child_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:pi})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"diffNum"],initialValue:On==null?void 0:On.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}_${On.id}`,"extra"],initialValue:Ki(wn({},er),{type:Gn})},le.createElement("input",{type:"hidden"})))):`${On.name}\uFF08${On.child_count}\uFF09`,key:`${er.id}_${On.id}`,name:On.name,parentName:er.name,item_banks_count:On.child_count,icon:null,isLeaf:!0,checkable:He(un)===fn.FileFolderAndKnowledge,disableCheckbox:On.child_count===0}}),ki=er==null?void 0:er.difficulty_count.map(On=>({label:On==null?void 0:On.name,value:Wt[On.name]}));return{title:He(un)===fn.FileFolderAndDiff&&ki.length>0?le.createElement(Ot.Z,{justify:"space-between"},le.createElement(Fi.Z,null,`${er.name}\uFF08${er.item_banks_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:ki})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"diffNum"],initialValue:er==null?void 0:er.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:[`${er.id}`,"extra"],initialValue:Ki(wn({},er),{type:Gn})},le.createElement("input",{type:"hidden"})))):`${er.name}\uFF08${er.item_banks_count}\uFF09`,key:`${er.id}`,name:er.name,item_banks_count:er.item_banks_count,icon:On=>On.expanded?Gn==="0"?le.createElement("img",{src:In,className:Ji.folderIcon}):le.createElement("img",{src:ii,className:Ji.shareFolderIcon}):Gn==="0"?le.createElement("img",{src:Mn,className:Ji.folderIcon}):le.createElement("img",{src:Ci,className:Ji.shareFolderIcon}),isLeaf:!er.have_child&&!((Wi=er.tag_disciplines)!=null&&Wi.length),checkable:He(un)===fn.OnlyFileFolder,disableCheckbox:er.item_banks_count===0,children:[...pr(er.children,un,Gn),...Bi]}});var Zn=({ruleValue:tn,defaultData:un,setSelectData:Gn,currentItemType:er,selectData:Wi})=>{const[Bi,ki]=(0,le.useState)("1"),[On,pi]=(0,le.useState)(!0),[ur]=At.default.useForm(),[_r,da]=(0,le.useState)([]),[ia,Es]=(0,le.useState)("all"),cs=(dt,lr,rr)=>{const{checkedNodes:kr}=lr;console.log("type:",rr,kr,Wi),rr==="0"?(jr(dt),He(tn)===fn.OnlyFileFolder?(Gn(tr=>Ki(wn({},tr),{my:kr.map(Yn=>({id:Yn.key,group_id:Yn.key,group_name:Yn.name,item_bank_num:Yn.item_banks_count,folderType:"0",quanlity:1}))})),ze(kr.reduce((tr,Yn)=>tr+Yn.item_banks_count,0))):(console.log(kr),Gn(tr=>Ki(wn({},tr),{my:kr.map(Yn=>{const[Tr,Lr]=Yn.key.split("_");return{id:Yn.key,tag_discipline_name:Yn.name,group_id:Tr,tag_discipline_id:Lr,folderType:"0",group_name:Yn.parentName,item_bank_num:Yn.item_banks_count,quanlity:1}})})),ze(kr.reduce((tr,Yn)=>tr+Yn.item_banks_count,0)))):(Va(dt),He(tn)===fn.OnlyFileFolder?Gn(tr=>(console.log("pre:",tr),Ki(wn({},tr),{public:kr.map(Yn=>({id:Yn.key==="0"?"00":Yn.key,teacher_group_name:Yn.name,teacher_group_id:Yn.key,folderType:"3",item_bank_num:Yn.item_banks_count,quanlity:1}))}))):Gn(tr=>Ki(wn({},tr),{public:kr.map(Yn=>{const[Tr,Lr]=Yn.key.split("_");return{id:Yn.key==="0"?"00":Yn.key,tag_discipline_name:Yn.name,teacher_group_id:Tr,tag_discipline_id:Lr,folderType:"3",teacher_group_name:Yn.parentName,item_bank_num:Yn.item_banks_count,quanlity:1}})})),ze(kr.reduce((tr,Yn)=>tr+Yn.item_banks_count,0)))},[Do,jr]=(0,le.useState)([]),[qi,Va]=(0,le.useState)([]),[Ha,Ts]=(0,le.useState)([]),[_s,ha]=(0,le.useState)([]),[za,Ho]=(0,le.useState)([]),[zr,Ns]=(0,le.useState)([]),[Aa,Ia]=(0,le.useState)(!1),[Zs,Vu]=(0,le.useState)(!1);function fu(){return wr(this,null,function*(){let dt=yield(0,ne.ZP)("/api/teach_group_shares.json",{method:"get"});dt&&da(dt==null?void 0:dt.groups)})}(0,le.useEffect)(()=>{fu()},[]);const St=dt=>wr(void 0,null,function*(){var lr,rr,kr,tr,Yn,Tr,Lr,Vr,mr,zo,Ii,vi;dt.type==="0"?Ia(!0):Vu(!0);const Ai=yield(0,Vt.ex)(dt);dt.type==="0"?Ia(!1):Vu(!1),dt.type==="0"?Ho(Ai):Ns(Ai);const Or=(lr=Ai.navigation[0])==null?void 0:lr.difficulty_count.map(Fr=>({label:Fr==null?void 0:Fr.name,value:Wt[Fr.name]})),Ur=(rr=Ai.navigation[0])==null?void 0:rr.tag_disciplines.map(Fr=>{const ko=Fr==null?void 0:Fr.difficulty_count.map(yr=>({label:yr==null?void 0:yr.name,value:Wt[yr.name]}));return{title:He(tn)===fn.All&&ko.length>0?le.createElement(Ot.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(Fi.Z,null,`${Fr.name}\uFF08${Fr.child_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:ko})),le.createElement(At.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"diffNum"],initialValue:Fr==null?void 0:Fr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:[`0_${Fr.id}`,"extra"],initialValue:{tag_discipline_name:Fr.name,name:"\u6839\u76EE\u5F55",type:dt.type}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},Fr.name,"\uFF08",Fr.child_count,"\uFF09"),key:`0_${Fr.id}`,name:Fr.name,parentName:"\u6839\u76EE\u5F55",item_banks_count:Fr.child_count,icon:null,isLeaf:!0,checkable:He(tn)===fn.FileFolderAndKnowledge,disableCheckbox:Fr.child_count===0}});if(dt.type==="0"){const Fr=Yi(Ai.data,tn,"0"),ko=pr(Ai.data,tn,"0");console.log("normalChildren2:",ko),Ts([{title:He(tn)===fn.FileFolderAndDiff?le.createElement(Ot.Z,{justify:"space-between",style:{color:"#232B40"}},le.createElement(Fi.Z,null,`\u6839\u76EE\u5F55\uFF08${(kr=Ai.navigation[0])==null?void 0:kr.child_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[]},le.createElement(yn.default.Group,{style:{columnGap:12},options:Or})),le.createElement(At.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(tr=Ai.navigation[0])==null?void 0:tr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"0",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(Yn=Ai.navigation[0])==null?void 0:Yn.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Tr=Ai.navigation[0])==null?void 0:Tr.child_count,disabled:!(((Lr=Ai.navigation[0])==null?void 0:Lr.child_count)>0),checkable:He(tn)===fn.OnlyFileFolder,icon:yr=>yr.expanded?le.createElement("img",{src:In,className:Ji.folderIcon}):le.createElement("img",{src:Mn,className:Ji.folderIcon}),isLeaf:!1,children:He(tn)===fn.OnlyFileFolder||He(tn)===fn.FileFolderAndDiff?Fr:[...ko,...Ur]}])}else{const Fr=Yi(Ai.data,tn,"3");ha([{title:He(tn)===fn.FileFolderAndDiff?le.createElement(Ot.Z,{justify:"space-between"},le.createElement(Fi.Z,null,`\u6839\u76EE\u5F55\uFF08${(Vr=Ai.navigation[0])==null?void 0:Vr.child_count}\uFF09`),le.createElement(Fi.Z,null,le.createElement("span",{className:"mr15",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(At.default.Item,{noStyle:!0,name:["0","diffValue"]},le.createElement(yn.default.Group,{style:{columnGap:12},options:Or})),le.createElement(At.default.Item,{noStyle:!0,name:["0","diffNum"],initialValue:(mr=Ai.navigation[0])==null?void 0:mr.difficulty_count},le.createElement("input",{type:"hidden"})),le.createElement(At.default.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"3",group_id:"0",name:"\u6839\u76EE\u5F55"}},le.createElement("input",{type:"hidden"})))):le.createElement("span",{style:{color:"#232B40"}},`\u6839\u76EE\u5F55\uFF08${(zo=Ai.navigation[0])==null?void 0:zo.child_count}\uFF09`),key:"0",name:"\u6839\u76EE\u5F55",item_banks_count:(Ii=Ai.navigation[0])==null?void 0:Ii.child_count,checkable:He(tn)===fn.OnlyFileFolder,icon:ko=>ko.expanded?le.createElement("img",{src:ii,className:Ji.shareFolderIcon}):le.createElement("img",{src:Ci,className:Ji.shareFolderIcon}),isLeaf:!1,disabled:!(((vi=Ai.navigation[0])==null?void 0:vi.child_count)>0),children:He(tn)===fn.OnlyFileFolder||He(tn)===fn.FileFolderAndDiff?Fr:[...Fr,...Ur]}])}});(0,le.useEffect)(()=>{Bi==="1"?St({type:"0",group_id:0,item_type:er,show_children:!0}):Bi==="2"&&St({type:"3",except_mine:!0,item_type:er,show_children:!0,teach_group_id:ia==="all"?"":ia})},[tn,Bi,ia]),(0,le.useEffect)(()=>{var dt,lr,rr,kr,tr,Yn,Tr,Lr,Vr,mr,zo,Ii;console.log("selectData-active:",Wi,un,Bi),Bi==="1"?(jr((dt=Wi==null?void 0:Wi.my)==null?void 0:dt.map(vi=>vi.id)),ze(((rr=(lr=Wi==null?void 0:Wi.my)==null?void 0:lr.reduce)==null?void 0:rr.call(lr,(vi,Ai)=>vi+Ai.item_bank_num,0))||0)):Bi==="2"&&(Va((kr=Wi==null?void 0:Wi.public)==null?void 0:kr.map(vi=>vi.id)),ze(((Yn=(tr=Wi==null?void 0:Wi.public)==null?void 0:tr.reduce)==null?void 0:Yn.call(tr,(vi,Ai)=>vi+Ai.item_bank_num,0))||0)),He(tn)===fn.All&&(Bi==="1"?(jr((Tr=Wi==null?void 0:Wi.my)==null?void 0:Tr.map(vi=>vi.id)),ze((Wi==null?void 0:Wi.filter(vi=>!vi.is_share).reduce((vi,Ai)=>vi+Ai.item_bank_num,0))||0),(Lr=Wi==null?void 0:Wi.filter(vi=>!vi.is_share))==null||Lr.forEach(vi=>{const Ai=ur.getFieldValue([`${vi.group_id||0}_${vi.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Ai),Ai!=null&&Ai.includes[vi.difficulty]||ur.setFieldValue([`${vi.group_id||0}_${vi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ai,vi.difficulty])))})):Bi==="2"&&(Va((Vr=Wi==null?void 0:Wi.public)==null?void 0:Vr.map(vi=>vi.id)),ze((Wi==null?void 0:Wi.filter(vi=>!!vi.is_share).reduce((vi,Ai)=>vi+Ai.item_bank_num,0))||0),(mr=Wi==null?void 0:Wi.filter(vi=>!!vi.is_share))==null||mr.forEach(vi=>{const Ai=ur.getFieldValue([`${vi.teacher_group_id||0}_${vi.tag_discipline_id}`,"diffValue"])||[];Ai!=null&&Ai.includes[vi.difficulty]||ur.setFieldValue([`${vi.teacher_group_id||0}_${vi.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Ai,vi.difficulty])))}))),He(tn)===fn.FileFolderAndDiff&&(ur.resetFields(),setTimeout(()=>{Gn(Wi)},300),Bi==="1"?(ze((Wi==null?void 0:Wi.filter(vi=>!vi.is_share).reduce((vi,Ai)=>vi+Ai.item_bank_num,0))||0),(zo=Wi==null?void 0:Wi.filter(vi=>!vi.is_share))==null||zo.forEach(vi=>{const Ai=ur.getFieldValue([`${vi.group_id}`,"diffValue"])||[];console.log("prev:",Ai),Ai!=null&&Ai.includes[vi.difficulty]||ur.setFieldValue([`${vi.group_id}`,"diffValue"],Array.from(new Set([...Ai,vi.difficulty])))})):(ze((Wi==null?void 0:Wi.filter(vi=>!!vi.is_share).reduce((vi,Ai)=>vi+Ai.item_bank_num,0))||0),(Ii=Wi==null?void 0:Wi.filter(vi=>!!vi.is_share))==null||Ii.forEach(vi=>{const Ai=ur.getFieldValue([`${vi.teacher_group_id}`,"diffValue"])||[];Ai!=null&&Ai.includes[vi.difficulty]||ur.setFieldValue([`${vi.teacher_group_id}`,"diffValue"],Array.from(new Set([...Ai,vi.difficulty])))})))},[Bi]),console.log("1111111111:",Do,qi),(0,le.useEffect)(()=>{setTimeout(()=>{var dt,lr,rr,kr,tr;switch(He(tn)){case fn.OnlyFileFolder:{const Yn=[],Tr=[];for(const Lr of Wi.my||[])Yn.push(Lr);for(const Lr of Wi.public||[])Tr.push(Lr);jr(Yn.map(Lr=>`${Lr.group_id}`)),Va(Tr.map(Lr=>`${Lr.teacher_group_id}`)),ze(Bi==="1"?Yn.reduce((Lr,Vr)=>Lr+Vr.item_bank_num,0):Tr.reduce((Lr,Vr)=>Lr+Vr.item_bank_num,0));break}case fn.FileFolderAndKnowledge:{const Yn=[],Tr=[];for(const Lr of(Wi==null?void 0:Wi.my)||[])Yn.push(Lr);for(const Lr of(Wi==null?void 0:Wi.public)||[])Tr.push(Lr);ze((dt=Bi==="1"?Yn:Tr)==null?void 0:dt.reduce((Lr,Vr)=>Lr+Vr.item_bank_num,0)),jr(Yn.map(Lr=>`${Lr.group_id}_${Lr.tag_discipline_id}`)),Va(Tr.map(Lr=>`${Lr.teacher_group_id}_${Lr.tag_discipline_id}`));break}case fn.All:{Bi==="1"?(ze((Wi==null?void 0:Wi.filter(Yn=>!Yn.is_share).reduce((Yn,Tr)=>Yn+Tr.item_bank_num,0))||0),(lr=Wi==null?void 0:Wi.filter(Yn=>!Yn.is_share))==null||lr.forEach(Yn=>{const Tr=ur.getFieldValue([`${Yn.group_id||0}_${Yn.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Tr,Yn.difficulty,Yn),Tr!=null&&Tr.includes[Yn.difficulty]||ur.setFieldValue([`${Yn.group_id||0}_${Yn.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Tr,Yn.difficulty])))})):(ze((Wi==null?void 0:Wi.filter(Yn=>!!Yn.is_share).reduce((Yn,Tr)=>Yn+Tr.item_bank_num,0))||0),(rr=Wi==null?void 0:Wi.filter(Yn=>!!Yn.is_share))==null||rr.forEach(Yn=>{const Tr=ur.getFieldValue([`${Yn.group_id||0}_${Yn.tag_discipline_id}`,"diffValue"])||[];console.log("prev:",Tr,Yn.difficulty,Yn),Tr!=null&&Tr.includes[Yn.difficulty]||ur.setFieldValue([`${Yn.group_id||0}_${Yn.tag_discipline_id}`,"diffValue"],Array.from(new Set([...Tr,Yn.difficulty])))}));break}case fn.FileFolderAndDiff:{Bi==="1"?(ze((Wi==null?void 0:Wi.filter(Yn=>!Yn.is_share).reduce((Yn,Tr)=>Yn+Tr.item_bank_num,0))||0),(kr=Wi==null?void 0:Wi.filter(Yn=>!Yn.is_share))==null||kr.forEach(Yn=>{const Tr=ur.getFieldValue([`${Yn.group_id}`,"diffValue"])||[];console.log("prev:",Tr,Yn.difficulty),Tr!=null&&Tr.includes[Yn.difficulty]||ur.setFieldValue([`${Yn.group_id}`,"diffValue"],Array.from(new Set([...Tr,Yn.difficulty])))})):(ze((Wi==null?void 0:Wi.filter(Yn=>!!Yn.is_share).reduce((Yn,Tr)=>Yn+Tr.item_bank_num,0))||0),(tr=Wi==null?void 0:Wi.filter(Yn=>!!Yn.is_share))==null||tr.forEach(Yn=>{const Tr=ur.getFieldValue([`${Yn.group_id}`,"diffValue"])||[];Tr!=null&&Tr.includes[Yn.difficulty]||ur.setFieldValue([`${Yn.group_id}`,"diffValue"],Array.from(new Set([...Tr,Yn.difficulty])))}));break}}},800)},[un,tn,Ha,_s]);const[Jt,ze]=(0,le.useState)(0);return le.createElement(At.default,{form:ur,onValuesChange:(dt,lr)=>wr(void 0,null,function*(){var rr,kr,tr,Yn;console.log("onValuesChange:",lr,dt);let Tr=0;if(He(tn)===fn.FileFolderAndDiff){const Lr=yield ur.getFieldValue(),Vr=[],mr=[];for(const Ii of Object.keys(Lr))if((kr=(rr=Lr[Ii])==null?void 0:rr.diffValue)!=null&&kr.length&&Ii!=="null"&&Ii!==null){const vi=Lr[Ii];Vr.push(wn({id:Ii},vi))}const zo={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"};Vr.map(Ii=>{var vi,Ai,Or,Ur,Fr;Ii.id==0&&(Ii.diffNum=Bi==="1"?(Ai=(vi=za==null?void 0:za.navigation)==null?void 0:vi[0])==null?void 0:Ai.difficulty_count:(Ur=(Or=zr==null?void 0:zr.navigation)==null?void 0:Or[0])==null?void 0:Ur.difficulty_count),(Fr=Ii==null?void 0:Ii.diffValue)==null||Fr.map(ko=>{var yr,vo,Xi,Gr,mo;const aa={group_name:((yr=Ii.extra)==null?void 0:yr.name)||"",teacher_group_name:"",id:`${Ii.id}_${ko}`,group_id:Ii.id,difficulty:ko,item_bank_num:(Gr=(Xi=(vo=Ii.diffNum)==null?void 0:vo.filter(ka=>ka.name===zo[ko]))==null?void 0:Xi[0])==null?void 0:Gr.value};Bi==="2"&&(aa.is_share=!0,aa.teacher_group_id=Ii.id,aa.teacher_group_name=(mo=Ii.extra)==null?void 0:mo.name),mr.push(aa)})}),Tr=mr.reduce((Ii,vi)=>Ii+vi.item_bank_num,0),Gn([...mr,...Wi==null?void 0:Wi.filter(Ii=>Bi==="1"?Ii.is_share:!Ii.is_share)])}else if(He(tn)===fn.All){const Lr=[];for(const Vr of Object.keys(lr)){const{diffNum:mr=[],diffValue:zo=[],extra:Ii={}}=lr[Vr];console.log("---",Ii);const[vi,Ai]=Vr.split("_");let Or=(Yn=(tr=Ii.tag_disciplines)==null?void 0:tr.filter(Ur=>parseInt(Ur.id)===parseInt(Ai)))==null?void 0:Yn[0];zo.forEach(Ur=>{var Fr;const ko={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},yr=(Fr=mr==null?void 0:mr.find(Xi=>Xi.name===ko[Ur]))==null?void 0:Fr.value,vo={group_name:"",teacher_group_name:"",tag_discipline_name:(Or==null?void 0:Or.name)||Ii.tag_discipline_name,id:`${Vr}_${Ur}`,group_id:vi,is_share:!!(Or!=null&&Or.is_share||(Ii==null?void 0:Ii.type)==="3"),tag_discipline_id:Ai,difficulty:Ur,item_bank_num:yr};Tr+=yr,Ii.type==="0"?vo.group_name=Ii.name:vo.teacher_group_name=Ii.name,Bi==="2"&&(vo.is_share=!0,vo.teacher_group_id=Ii.id||0,vo.teacher_group_name=Ii.name),yr>0&&Lr.push(vo)})}Gn([...Lr,...Wi==null?void 0:Wi.filter(Vr=>Bi==="1"?Vr.is_share:!Vr.is_share)])}ze(Tr)})},le.createElement(Ee.default,{destroyInactiveTabPane:!0,activeKey:Bi,onChange:dt=>ki(dt),style:{minHeight:260},tabBarExtraContent:{right:Bi==="2"&&(_r==null?void 0:_r.length)>0&&le.createElement(on.default,{onChange:dt=>{Es(dt)},value:ia,style:{width:120}},le.createElement(on.default.Option,{key:"all",value:"all"},"\u5168\u90E8"),_r==null?void 0:_r.map(dt=>le.createElement(on.default.Option,{key:dt==null?void 0:dt.group_id,value:dt==null?void 0:dt.group_id},dt==null?void 0:dt.name)))},items:[{key:"1",label:"\u6211\u521B\u5EFA\u7684",children:(Ha==null?void 0:Ha.length)===0?le.createElement(xt.Z,{spinning:Aa},le.createElement(Co.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Ji.folderAreaWrapper},le.createElement(Ot.Z,{justify:"space-between",align:"middle",className:Ji.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Jt," "),"\u9898")),le.createElement(xt.Z,{spinning:Aa},le.createElement("div",{style:{minHeight:200}},Ha.length>0&&le.createElement(gn.default,{checkable:!0,className:Ji.folderWrapper,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:(dt,lr)=>cs(dt,lr,"0"),checkedKeys:Do,checkStrictly:!0,treeData:Ha,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))},{key:"2",label:"\u56E2\u961F\u5171\u4EAB",children:(_s==null?void 0:_s.length)===0?le.createElement(xt.Z,{spinning:Zs},le.createElement(Co.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")})):le.createElement("div",{className:Ji.folderAreaWrapper},le.createElement(Ot.Z,{justify:"space-between",align:"middle",className:Ji.folderAreaHeader},le.createElement("span",null,"\u6587\u4EF6\u5939"),le.createElement("span",{className:"mr20"},"\u5DF2\u9009",le.createElement("span",{style:{color:"#3061D0"}}," ",Jt||0," "),"\u9898")),le.createElement(xt.Z,{spinning:Zs},le.createElement("div",{style:{minHeight:200}},(_s==null?void 0:_s.length)>0&&le.createElement(gn.default,{checkable:!0,className:Ji.folderWrapper,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:(dt,lr)=>cs(dt,lr,"3"),checkedKeys:qi,checkStrictly:!0,treeData:_s,showIcon:!0,blockNode:!0,defaultExpandAll:!0}))))}]}))},Ni=be(53430),Pi=be(9343),xs=Object.defineProperty,qa=Object.defineProperties,Ar=Object.getOwnPropertyDescriptors,br=Object.getOwnPropertySymbols,Rr=Object.prototype.hasOwnProperty,xa=Object.prototype.propertyIsEnumerable,Ka=(tn,un,Gn)=>un in tn?xs(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,_i=(tn,un)=>{for(var Gn in un||(un={}))Rr.call(un,Gn)&&Ka(tn,Gn,un[Gn]);if(br)for(var Gn of br(un))xa.call(un,Gn)&&Ka(tn,Gn,un[Gn]);return tn},yo=(tn,un)=>qa(tn,Ar(un)),zl=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())});const ms={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var Qt=({ruleValue:tn,setSelectData:un,currentItemType:Gn,defaultData:er,isFirst:Wi})=>{const[Bi,ki]=(0,le.useState)([]),[On,pi,ur,_r]=(0,Pi.U)(ht,{source:"question",page:1,per_page:10,group_id:0,keyword:"",group_type:0,clazz:"ItemBanksGroup",sub_discipline_id:void 0,item_type:Gn,show_children:!0});(0,le.useEffect)(()=>{zl(void 0,null,function*(){const qi=yield ur({},!0);ki((0,Ni.L)(qi.disciplines))})},[]),console.log(er),(0,le.useEffect)(()=>{if(Wi)switch(He(tn)){case fn.OnlyKnowledge:{Do(er.map(qi=>qi.tag_discipline_id));break}case fn.KnowledgeAndDiff:{const qi=new Map;er.forEach(Va=>{Va&&(qi.has(Va.tag_discipline_id)?qi.set(Va.tag_discipline_id,[...qi.get(Va.tag_discipline_id),Va.difficulty]):qi.set(Va.tag_discipline_id,[Va.difficulty]))});for(const[Va,Ha]of qi.entries())da.setFieldValue([Va,"diff"],Ha);break}}},[er,tn,Wi]);const[da]=At.default.useForm(),ia=(0,le.useMemo)(()=>{const qi=[];let Va="",Ha="";const Ts={};for(const _s of(_r==null?void 0:_r.disciplines)||[]){Va=_s.name;for(const ha of _s.sub_disciplines){Ha=ha.name;for(const za of ha.tag_disciplines){const Ho={sub_discipline_name:`${Va}&${Ha}`,sub_discipline_id:ha.id,tag_discipline_name:za.name,id:za.id,item_bank_num:za.total_count,difficulty_count:za.difficulty_count,tag_discipline_id:za.id};qi.push(Ho)}}}return qi},[_r,er]),Es=[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",show:!0,render:(qi,Va)=>{const{item_bank_num:Ha}=Va;return le.createElement("div",null,qi,`(${Ha})`)}},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",ellipsis:!0,show:!0},{title:"\u96BE\u5EA6",width:"35%",show:tn.includes(Mt.Difficulty),render:(qi,Va)=>{const{id:Ha,difficulty_count:Ts,total_count:_s,sub_discipline_name:ha,tag_discipline_name:za}=Va;return le.createElement(le.Fragment,null,le.createElement(At.default.Item,{name:[Ha,"diff"],noStyle:!0},le.createElement(yn.default.Group,{style:{columnGap:12},options:Ts.map(Ho=>({label:Ho.name,value:ms[Ho.name]}))})),le.createElement(At.default.Item,{name:[Ha,"extra"],initialValue:{difficulty_count:Ts,total_count:_s,sub_discipline_name:ha,tag_discipline_name:za},noStyle:!0},le.createElement("input",{type:"hidden"})))}}].filter(qi=>qi.show),[cs,Do]=(0,le.useState)([]),jr=(0,le.useRef)(new Map);return le.createElement("div",{style:{marginTop:12}},le.createElement(Ot.Z,{className:"mb20",align:"middle",gutter:20},le.createElement(Fi.Z,null,le.createElement(pt.Z,{placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",size:"large",style:{width:240},options:Bi,onChange:qi=>{ur({sub_discipline_id:qi==null?void 0:qi[1]})}})),le.createElement(Fi.Z,null,le.createElement(jn.t7,{style:{width:300},placeholder:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9\u540D\u79F0\u8FDB\u884C\u641C\u7D22",value:On.keyword,onChange:qi=>ur({keyword:qi})}))),le.createElement(At.default,{form:da,onValuesChange:(qi,Va)=>{var Ha;console.log(Va),jr.current.clear();for(const Ts of Object.keys(Va)){const _s={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},ha=Va[Ts],{difficulty_count:za,total_count:Ho}=ha.extra||{};(Ha=ha==null?void 0:ha.diff)==null||Ha.forEach(zr=>{var Ns;const Aa=(Ns=za==null?void 0:za.find(Zs=>Zs.name===_s[zr]))==null?void 0:Ns.value,Ia=yo(_i({},ha.extra),{id:`${Ts}_${zr}`,difficulty:zr,item_bank_num:Aa,tag_discipline_id:Ts});Aa>0&&jr.current.set(`${Ts}_${zr}`,Ia)})}un([...jr.current.values()])}},(ia==null?void 0:ia.length)===0?le.createElement(Co.Z,{ButtonTwo:le.createElement("a",{target:"_blank",href:"/problemset"},"\u524D\u5F80\u9898\u5E93\uFF0C\u65B0\u589E\u66F4\u591A\u8BD5\u9898",">")}):le.createElement(Nr.default,{rowSelection:He(tn)===fn.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange(qi,Va){console.log("table-selectedRowKeys:",qi,Va),Do(qi),un(Va)},getCheckboxProps:qi=>({disabled:qi.item_bank_num===0}),selectedRowKeys:cs}:void 0,columns:Es,dataSource:ia,loading:pi,scroll:{y:480},rowKey:"id",pagination:!1})))},Br=Object.defineProperty,ba=Object.defineProperties,to=Object.getOwnPropertyDescriptors,vs=Object.getOwnPropertySymbols,La=Object.prototype.hasOwnProperty,Za=Object.prototype.propertyIsEnumerable,wa=(tn,un,Gn)=>un in tn?Br(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,ca=(tn,un)=>{for(var Gn in un||(un={}))La.call(un,Gn)&&wa(tn,Gn,un[Gn]);if(vs)for(var Gn of vs(un))Za.call(un,Gn)&&wa(tn,Gn,un[Gn]);return tn},Ya=(tn,un)=>ba(tn,to(un)),Un=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())});const js={\u7B80\u5355:1,\u9002\u4E2D:2,\u56F0\u96BE:3};var _a=({open:tn,onCancel:un,setVisibleModalType:Gn,currentItemType:er})=>{var Wi;const{data:Bi,dispatch:ki}=(0,le.useContext)(_t),[On,pi]=(0,le.useState)([]),[ur,_r]=(0,le.useState)(),da=(Wi=Bi==null?void 0:Bi.item_types)==null?void 0:Wi.find(Ha=>Ha.item_type===er);(0,le.useEffect)(()=>{var Ha,Ts,_s;if(tn){const ha=(Ha=Bi==null?void 0:Bi.item_types)==null?void 0:Ha.find(za=>za.item_type===er);if((ha==null?void 0:ha.random_rule_type)!==fn.Shixun){const za=mn[ha==null?void 0:ha.random_rule_type]||[];pi(za);const Ho=(_s=(Ts=Bi==null?void 0:Bi.item_types)==null?void 0:Ts.find(zr=>zr.item_type===er))==null?void 0:_s.contents;switch(console.log("----xxx",He(za)),He(za)){case fn.OnlyDifficulty:{Do(Ho.map(zr=>zr.difficulty));break}case fn.OnlyFileFolder:{Do({my:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)!=="NaN"&&!zr.teacher_group_id&&zr.teacher_group_id!==0),public:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)>=0)}),_r({my:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)!=="NaN"&&!zr.teacher_group_id&&zr.teacher_group_id!==0),public:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)>=0)});break}case fn.FileFolderAndKnowledge:{Do({my:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)!=="NaN"&&!zr.teacher_group_id&&zr.teacher_group_id!==0),public:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)>=0)}),_r({my:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)!=="NaN"&&!zr.teacher_group_id&&zr.teacher_group_id!==0),public:Ho==null?void 0:Ho.filter(zr=>parseInt(zr.teacher_group_id)>=0)});break}case fn.FileFolderAndDiff:{Do(Ho),_r(Ho);break}case fn.All:{Do(Ho),_r(Ho);break}default:Do(Ho)}}}},[tn]);const[ia,Es]=(0,le.useState)([]);(0,le.useEffect)(()=>{tn&&nt({item_type:er}).then(Ha=>{Ha.status===0&&Es(Ha.data)})},[tn]),(0,le.useEffect)(()=>{console.log("selectData",ur)},[ur]);const[cs,Do]=(0,le.useState)(),[jr,qi]=(0,le.useState)(!0);console.log("isFirst:",jr);const Va=Ha=>{pi(Ha),_r([]),Do([]),qi(!1)};return le.createElement(Zr.default,{title:"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219",width:948,closable:!0,centered:!0,open:tn,onCancel:un,destroyOnClose:!0,onOk:()=>Un(void 0,null,function*(){var Ha,Ts,_s,ha,za,Ho,zr;if(ur===void 0){Gn("");return}if(Object.prototype.toString.call(ur)==="[object Object]"&&!((Ha=ur.my)!=null&&Ha.length)&&!((Ts=ur.public)!=null&&Ts.length)){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if(!Object.keys(ur).length&&!(ur!=null&&ur.length)){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}const Ns=He(On);switch(Ns){case fn.OnlyFileFolder:{ki({type:"editRule",payload:{itemType:er,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Ns}});break}case fn.OnlyDifficulty:{const Aa=(ha=(_s=Bi==null?void 0:Bi.item_types)==null?void 0:_s.find(Zs=>Zs.item_type===er))==null?void 0:ha.contents;let Ia=[{},{value:(za=ia.find(Zs=>Zs.name==="\u7B80\u5355"))==null?void 0:za.value},{value:(Ho=ia.find(Zs=>Zs.name==="\u9002\u4E2D"))==null?void 0:Ho.value},{value:(zr=ia.find(Zs=>Zs.name==="\u56F0\u96BE"))==null?void 0:zr.value}];ki({type:"editRule",payload:{itemType:er,tableData:ur.map((Zs,Vu)=>{var fu,St,Jt,ze;return{difficulty:Zs,id:Vu,quanlity:((St=(fu=Aa==null?void 0:Aa.filter(dt=>dt.id===Vu))==null?void 0:fu[0])==null?void 0:St.quanlity)||1,item_bank_num:(ia==null?void 0:ia.length)===1?(Jt=ia[0])==null?void 0:Jt.value:(ze=Ia==null?void 0:Ia[Zs])==null?void 0:ze.value}}),randomRuleType:Ns}});break}case fn.OnlyKnowledge:{ki({type:"editRule",payload:{itemType:er,tableData:ur.map(Aa=>Ya(ca({},Aa),{quanlity:Aa.quanlity||1})),randomRuleType:Ns}});break}case fn.KnowledgeAndDiff:{ki({type:"editRule",payload:{itemType:er,tableData:ur.map(Aa=>Ya(ca({},Aa),{quanlity:Aa.quanlity||1})),randomRuleType:Ns}});break}case fn.FileFolderAndDiff:{ki({type:"editRule",payload:{itemType:er,tableData:ur.map(Aa=>Ya(ca({},Aa),{quanlity:Aa.quanlity||1})),randomRuleType:Ns}});break}case fn.FileFolderAndKnowledge:{ki({type:"editRule",payload:{itemType:er,tableData:[...ur.my||[],...ur.public||[]],randomRuleType:Ns}});break}case fn.All:{ki({type:"editRule",payload:{itemType:er,tableData:ur.map(Aa=>Ya(ca({},Aa),{quanlity:Aa.quanlity||1})),randomRuleType:Ns}});break}}Gn("")})},le.createElement(yn.default.Group,{className:`${Ji.ruleCheckBox}`,style:{marginBottom:8},value:On,onChange:Ha=>{var Ts;On!=null&&On.length&&((Ts=da==null?void 0:da.contents)==null?void 0:Ts.length)>0?Zr.default.confirm({title:"\u63D0\u793A",content:"\u5207\u6362\u89C4\u5219\u540E\uFF0C\u4E4B\u524D\u7684\u62BD\u9898\u914D\u7F6E\u5C06\u88AB\u6E05\u7A7A\uFF01",okText:"\u7ACB\u5373\u5207\u6362",cancelText:"\u6682\u4E0D\u5207\u6362",onOk:()=>Va(Ha)}):Va(Ha)},options:[{label:"\u6307\u5B9A\u6587\u4EF6\u5939\u62BD\u9898",value:Mt.FileFolder},{label:"\u6307\u5B9A\u96BE\u5EA6\u62BD\u9898",value:Mt.Difficulty},{label:"\u6307\u5B9A\u77E5\u8BC6\u70B9\u62BD\u9898",value:Mt.Knowledge}]}),On.includes(Mt.FileFolder)?le.createElement(Zn,{defaultData:cs,selectData:ur,ruleValue:On,setSelectData:_r,currentItemType:er}):On.includes(Mt.Knowledge)?le.createElement(Qt,{defaultData:cs,isFirst:jr,ruleValue:On,setSelectData:_r,currentItemType:er}):On.includes(Mt.Difficulty)?le.createElement("div",{style:{marginTop:12}},le.createElement("span",{className:"mr20",style:{color:"#666"}},"\u96BE\u5EA6"),le.createElement(yn.default.Group,{style:{columnGap:12},options:ia.map(Ha=>({label:Ha.name,value:js[Ha.name]})),value:ur||cs,onChange:Ha=>_r(Ha)})):null)},No=({open:tn,onCancel:un,setVisibleModalType:Gn,currentItemType:er})=>tn?le.createElement(_a,{open:tn,onCancel:un,setVisibleModalType:Gn,currentItemType:er}):null,kl=be(83062),bs=be(99678),ja=be(89779),es=be(65226),fl=be(28706),ps=be(17663),sr=be(20670),il=({open:tn,onCancel:un,onOk:Gn})=>{const{data:er}=(0,le.useContext)(_t),Wi=(0,bs.g)(),[Bi,ki,On,pi]=(0,Pi.U)(ja.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),[ur,_r]=(0,le.useState)(!1);(0,le.useEffect)(()=>{if(tn){On({page:1,limit:10,type:0},!0).then(jr=>{(jr==null?void 0:jr.shixuns_count)===0&&_r(!0)});const Do=er.item_types.find(jr=>jr.item_type==="PRACTICAL");ia(Do.item_banks.map(jr=>jr.id)),cs(Do.item_banks)}},[tn,er]);const[da,ia]=(0,le.useState)([]),[Es,cs]=(0,le.useState)([]);return le.createElement(Zr.default,{title:"\u9009\u62E9\u5B9E\u8BAD\u9898",open:tn,width:948,centered:!0,closable:!0,onCancel:un,onOk:()=>Gn(Es),destroyOnClose:!0},le.createElement(Ot.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650}},le.createElement(Fi.Z,null,le.createElement(pt.Z,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u65B9\u5411&\u8BFE\u7A0B",options:Wi,onChange:Do=>{On({page:1,discipline_id:Do==null?void 0:Do[0],sub_discipline_id:Do==null?void 0:Do[1]})}}),le.createElement(on.default,{className:"ml20",style:{width:118},size:"large",placeholder:"\u96BE\u5EA6",allowClear:!0,options:[{label:"\u7B80\u5355",value:1},{label:"\u9002\u4E2D",value:2},{label:"\u56F0\u96BE",value:3}],onChange:Do=>On({page:1,diff:Do})}),le.createElement(on.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:Do=>On({page:1,shixun_publish_status:Do})})),le.createElement(jn.t7,{placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",style:{width:290},onChange:Do=>{On({keyword:Do,page:1})}})),ur?le.createElement("div",null,le.createElement(Co.Z,{customText:"\u6682\u65E0\u6570\u636E",ButtonText:"\u524D\u5F80\u5B9E\u8DF5\u9879\u76EE\u5E93\uFF0C\u6DFB\u52A0\u66F4\u591A\u8BD5\u9898>",ButtonClick:()=>(0,fl.xg)("/shixuns")})):le.createElement(Nr.default,{loading:ki,rowKey:"id",columns:[{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:(Do,jr)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:jr!=null&&jr.high_resources_consume?mi.title:"",title:Do||"--"},le.createElement(es.Z,{key:1,showLines:1,showTextOnly:!0,value:Do||"--"})),(jr==null?void 0:jr.high_resources_consume)&&le.createElement(sr.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u96BE\u5EA6",dataIndex:"level"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(Do,jr,qi)=>le.createElement("span",null,Do||"- -")},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:le.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",le.createElement(kl.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},le.createElement(ps.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:(Do,jr,qi)=>le.createElement("span",null,Do||"- -")},{title:"\u64CD\u4F5C",render(Do,jr){const{title:qi,challenge_names:Va,author_name:Ha,identifier:Ts,author_school_name:_s,study_count:ha}=jr||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:()=>{Zr.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(es.Z,{value:qi,style:{marginBottom:18}}),le.createElement("div",{className:mi.challengeNameWrapper},Va.map((za,Ho)=>le.createElement("div",{className:mi.challengeName,key:Ho},"\u7B2C",(0,fl.EM)(Ho+1),"\u9898\xA0",za))),le.createElement(Ot.Z,{className:mi.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(Fi.Z,{className:mi.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:mi.shixunInfo},Ha.split("\u3001")[0]),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:mi.shixunInfo},_s),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:mi.shixunInfo},ha)),le.createElement(Te.ZP,{type:"primary",className:mi.btnToDetail,onClick:()=>(0,fl.xg)(`/shixuns/${Ts}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),(jr==null?void 0:jr.shixun_tag_num)===1&&le.createElement("a",{target:"_blank",href:`/shixuns/${jr==null?void 0:jr.identifier}/challenges`,style:{marginLeft:10}},"\u53BB\u53D1\u5E03"))}}],dataSource:pi==null?void 0:pi.items,rowSelection:{selectedRowKeys:da,preserveSelectedRowKeys:!0,getCheckboxProps:Do=>({disabled:Do.shixun_tag_num===1}),onChange(Do,jr){var qi,Va,Ha;console.log(Do),ia(Do);const Ts=[];for(const ha of Es)Do.includes(ha.id)&&Ts.push(ha);const _s=Ts.map(ha=>ha.id);for(const ha of jr)ha&&Do.includes(ha.id)&&!_s.includes(ha.id)&&Ts.push({id:ha.id,difficulty:ha.level,identifier:ha.identifier,name:ha.name,real_name:(qi=ha==null?void 0:ha.author_name)==null?void 0:qi.split("\u3001")[0],school_name:ha.author_school_name,challenge_names:ha.challenge_names,challenges:(Va=ha.challenge_names)==null?void 0:Va.map((za,Ho)=>({subject:za,id:Ho,score:5})),score:((Ha=ha.challenge_names)==null?void 0:Ha.length)*5,study_count:ha.study_count,challenges_count:ha.challenges_count});cs(Ts)}},pagination:{current:Bi.page,pageSize:Bi.limit,total:pi==null?void 0:pi.items_count,showTotal:Do=>le.createElement("span",null,"\u5171\xA0",le.createElement("span",{style:{color:"#165DFF"}},Do),"\xA0\u6761\u6570\u636E"),showQuickJumper:!0,onChange(Do,jr){On({page:Do,limit:jr})},size:"default"},scroll:{y:400}}))},ql=be(66012),rl=be(67294),Il=Object.defineProperty,nu=Object.defineProperties,Mu=Object.getOwnPropertyDescriptors,Au=Object.getOwnPropertySymbols,Hu=Object.prototype.hasOwnProperty,ws=Object.prototype.propertyIsEnumerable,Js=(tn,un,Gn)=>un in tn?Il(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,Xr=(tn,un)=>{for(var Gn in un||(un={}))Hu.call(un,Gn)&&Js(tn,Gn,un[Gn]);if(Au)for(var Gn of Au(un))ws.call(un,Gn)&&Js(tn,Gn,un[Gn]);return tn},no=(tn,un)=>nu(tn,Mu(un)),Fn=({onDelete:tn,list:un,onSelect:Gn})=>{const[er,Wi]=(0,le.useState)(!1),{dispatch:Bi,disabled:ki}=(0,le.useContext)(_t),On=(ia,Es,cs)=>{const Do=Array.from(ia),[jr]=Do.splice(Es,1);return Do.splice(cs,0,jr),Do},[pi,ur]=(0,le.useState)(null),[_r,da]=(0,le.useState)(!1);return rl.createElement(ql.Z5,{onDragStart:()=>{da(!0)},onDragEnd:ia=>{if(da(!1),!ia.destination)return;const Es=On(un,ia.source.index,ia.destination.index);Bi({type:"updateItemTypes",payload:Es})}},rl.createElement(ql.bK,{droppableId:"droppable"},(ia,Es)=>rl.createElement("div",no(Xr({},ia.droppableProps),{ref:ia.innerRef}),rl.createElement(xt.Z,{spinning:er},un.map((cs,Do)=>rl.createElement(ql._l,{key:Do,draggableId:Do.toString(),index:Do,isDragDisabled:pi!==cs.item_type},(jr,qi)=>rl.createElement(Ot.Z,no(Xr(Xr({align:"middle",wrap:!1,ref:jr.innerRef},jr.draggableProps),jr.dragHandleProps),{className:`${mi.dragItem} ${_r?mi.dragging:""}`}),rl.createElement(Fi.Z,{className:mi.contentArea,onClick:()=>{Gn(cs.item_type),(0,fl.k3)()}},rl.createElement("span",{className:mi.blackText},(0,fl.EM)(Do+1),"\u3001\u3010",cs.item_type_text,"\u3011"),rl.createElement(kl.Z,{title:`\uFF08${cs.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(cs.total_score).toFixed(1)}\u5206\uFF09`},rl.createElement("span",{className:mi.greyText},`\uFF08${cs.item_bank_count}\u5C0F\u9898\uFF0C\u5171${parseFloat(cs.total_score).toFixed(1)}\u5206\uFF09`))),!ki&&rl.createElement(rl.Fragment,null,rl.createElement(kl.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F",open:pi===cs.item_type&&!_r},rl.createElement("div",{style:{cursor:"grab"},className:`${mi.iconWrapper} ${_r?mi.hidden:""}`,onMouseEnter:()=>{ur(cs.item_type)},onMouseLeave:()=>ur(null)},rl.createElement("i",{className:`iconfont icon-tuodong1 ${mi.dragIcon}`}))),rl.createElement(kl.Z,{title:"\u5220\u9664"},rl.createElement("div",{className:`${mi.iconWrapper} ${_r?mi.hidden:""}`,style:{cursor:"pointer"},onClick:()=>tn(cs.item_type)},rl.createElement("i",{className:`iconfont icon-shanchu12 ${mi.deleteIcon}`})))))))),ia.placeholder)))},Bo=be(12845),io={flex_box_center:"flex_box_center___ppkzA",flex_space_between:"flex_space_between___Z1syx",flex_box_vertical_center:"flex_box_vertical_center___twJ9S",flex_box_center_end:"flex_box_center_end___uI0uW",flex_box_column:"flex_box_column___JRp7D",timelineWrapper:"timelineWrapper___LP9aM",title:"title___KUHj_",desc:"desc___ubc8E",titles:"titles___njkjf",questionDetailWrapper:"questionDetailWrapper___p4SFM",questionTitle:"questionTitle___JC9X6",questionScoreInfo:"questionScoreInfo___NgOJI",deleteIcon:"deleteIcon___oMVTN",deleteBtn:"deleteBtn___JUPEl",normalText:"normalText___FW9Y_",folderIcon:"folderIcon___gvacQ",challengeNameWrapper:"challengeNameWrapper___fG7Vv",challengeName:"challengeName___Ia1Xs",shixunPreviewFooter:"shixunPreviewFooter___rKsnN",shixunInfoWrapper:"shixunInfoWrapper___FEnDb",shixunInfo:"shixunInfo___TbrA2",btnToDetail:"btnToDetail___dqLQP",q_title:"q_title___qnv4p"},Ds=be(73631),Ps=be(31328);const ol=(tn,un,Gn,er)=>{const Wi={[fn.OnlyDifficulty]:[{title:"\u96BE\u5EA6",key:"difficulty",render(Bi,ki){const{difficulty:On}=ki;return le.createElement("span",{style:{color:Fe[On].color}},Fe[On].label)}}],[fn.OnlyKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u65B9\u5411&\u8BFE\u7A0B",dataIndex:"sub_discipline_name",width:180,ellipsis:{showTitle:!0},render(Bi,ki){return`${Bi}`}}],[fn.OnlyFileFolder]:[{title:"\u6587\u4EF6\u5939",render(Bi,ki,On){const{group_name:pi,teacher_group_name:ur}=ki,_r=pi||ur,da=ur?Ps:Ds;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:da,className:io.folderIcon})," ",le.createElement(kl.Z,{title:_r},le.createElement("span",{className:io.titles},_r)))}},{title:"\u7C7B\u578B",render(Bi,ki){const{teacher_group_name:On}=ki;return le.createElement("span",null,On?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[fn.KnowledgeAndDiff]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:{showTitle:!0}},{title:"\u65B9\u5411&\u8BFE\u7A0B",width:180,dataIndex:"sub_discipline_name",ellipsis:{showTitle:!0}},{title:"\u96BE\u5EA6",key:"difficulty",render(Bi,ki){const{difficulty:On}=ki;return le.createElement("span",{style:{color:Fe[On].color}},Fe[On].label)}}],[fn.FileFolderAndKnowledge]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Bi,ki){const{group_name:On,teacher_group_name:pi}=ki,ur=On||pi,_r=pi?Ps:Ds;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:_r,className:io.folderIcon})," ",le.createElement(kl.Z,{title:ur},le.createElement("span",{className:io.titles},ur)))}},{title:"\u7C7B\u578B",render(Bi,ki){const{teacher_group_name:On}=ki;return le.createElement("span",null,On?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}}],[fn.FileFolderAndDiff]:[{title:"\u6587\u4EF6\u5939",render(Bi,ki){const{group_name:On,teacher_group_name:pi}=ki,ur=On||pi,_r=pi?Ps:Ds;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:_r,className:io.folderIcon})," ",le.createElement(kl.Z,{title:ur},le.createElement("span",{className:io.titles},ur)))}},{title:"\u7C7B\u578B",render(Bi,ki){const{teacher_group_name:On}=ki;return le.createElement("span",null,On?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Bi,ki){const{difficulty:On}=ki;return le.createElement("span",{style:{color:Fe[On].color}},Fe[On].label)}}],[fn.All]:[{title:"\u77E5\u8BC6\u70B9",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"\u6587\u4EF6\u5939",render(Bi,ki){const{group_name:On,teacher_group_name:pi,teacher_group_id:ur}=ki,_r=On||pi,da=ur||ur===0?Ps:Ds;return le.createElement("div",{style:{display:"flex"}},le.createElement("img",{src:da,className:io.folderIcon})," ",le.createElement(kl.Z,{title:_r},le.createElement("span",{className:io.titles},_r)))}},{title:"\u7C7B\u578B",render(Bi,ki){const{teacher_group_id:On}=ki;return le.createElement("span",null,On||On===0?"\u56E2\u961F\u5171\u4EAB":"\u6211\u521B\u5EFA\u7684")}},{title:"\u96BE\u5EA6",key:"difficulty",render(Bi,ki){const{difficulty:On}=ki;return le.createElement("span",{style:{color:Fe[On].color}},Fe[On].label)}}],[fn.Shixun]:[]};for(const Bi of Object.values(Wi))Bi.push({title:"\u62BD\u9898\u6570\u91CF",key:"quanlity",render(ki,On){const{item_bank_num:pi,quanlity:ur,id:_r,teacher_group_id:da}=On||{};return le.createElement(Ot.Z,{align:"middle"},le.createElement(jt.Z,{disabled:er,min:1,max:pi,size:"large",precision:0,value:ur,onChange:ia=>{un({type:"changeQuestionNum",payload:{itemType:Gn,id:_r,num:ia,teacher_group_id:da}})}}),le.createElement("span",{className:"ml10 font14",style:{color:"#333333"}},"/",pi))}},{title:"\u64CD\u4F5C",key:"action",align:"right",render(ki,On){const{id:pi,is_share:ur}=On;return er?le.createElement("span",{className:"cursorNotAllowed c-grey-999"},"\u5220\u9664"):le.createElement("span",{className:io.deleteBtn,onClick:()=>{un({type:"deleteRule",payload:{itemType:Gn,id:pi,is_share:ur}})}},"\u5220\u9664")}});return Wi[tn]},Al=({setVisibleModalType:tn})=>{var un,Gn,er,Wi;const{data:Bi,dispatch:ki,disabled:On}=(0,le.useContext)(_t),pi=(un=Bi==null?void 0:Bi.item_types)==null?void 0:un.find(ur=>ur.item_type==="PRACTICAL");return le.createElement(Bo.Z,{className:io.timelineWrapper,items:[{children:le.createElement("div",{style:{transform:"translateY(-4px)"}},le.createElement(Ot.Z,{className:"mb20",align:"middle",justify:"space-between"},le.createElement(Fi.Z,null,le.createElement("span",{className:io.title},"\u9898\u5E93\u9009\u9898"),le.createElement("span",{className:io.desc},"\uFF08\u9700\u8981\u5148\u4ECE\u9898\u5E93\u4E2D\u9009\u62E9\u5B9E\u8BAD\u9898\uFF0C\u518D\u8BBE\u7F6E\u4ECE\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898\u7684\u6570\u91CF\uFF09")),!On&&le.createElement(jn.op,{style:{width:102},onClick:()=>tn("selectShixun")},"\u4ECE\u9898\u5E93\u9009\u62E9")),((Gn=pi==null?void 0:pi.item_banks)==null?void 0:Gn.length)===0?le.createElement(Co.Z,{customText:"\u6682\u65E0\u5F85\u62BD\u8BD5\u9898\uFF0C\u8BF7\u5148\u4ECE\u9898\u5E93\u8FDB\u884C\u9009\u62E9\uFF5E"}):le.createElement(Nr.default,{rowKey:"id",className:"mb10",columns:[{title:"\u5E8F\u53F7",width:60,render(ur,_r,da){return le.createElement("span",null,da+1)}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:(ur,_r)=>le.createElement("div",{style:{display:"flex",alignItems:"center"}},le.createElement("div",{className:_r!=null&&_r.high_resources_consume?io.q_title:"",title:ur||"--"},le.createElement(es.Z,{key:1,showLines:1,showTextOnly:!0,value:ur})),(_r==null?void 0:_r.high_resources_consume)&&le.createElement(sr.Z,{type:"shixun",style:{marginLeft:10}}))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"study_count"},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",render:(ur,_r,da)=>le.createElement("span",null,ur||"- -")},{title:"\u96BE\u5EA6",dataIndex:"difficulty"},{title:"\u64CD\u4F5C",align:"right",width:180,render(ur,_r,da){const{id:ia,identifier:Es,name:cs,challenge_names:Do=[],real_name:jr,school_name:qi,study_count:Va,challenges:Ha=[]}=_r||{};return le.createElement("div",null,le.createElement("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:()=>{Zr.default.confirm({title:"\u9898\u76EE\u8BE6\u60C5",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:le.createElement("div",null,le.createElement(es.Z,{value:cs,style:{marginBottom:18}}),le.createElement("div",{className:io.challengeNameWrapper},Ha==null?void 0:Ha.map((Ts,_s)=>le.createElement("div",{className:io.challengeName,key:_s},"\u7B2C",(0,fl.EM)(_s+1),"\u9898\xA0",Ts==null?void 0:Ts.subject))),le.createElement(Ot.Z,{className:io.shixunPreviewFooter,justify:"space-between",style:{alignItems:"center"}},le.createElement(Fi.Z,{className:io.shixunInfoWrapper},le.createElement("span",null,"\u521B\u5EFA\u8005"),le.createElement("span",{className:io.shixunInfo},jr),le.createElement("span",null,"\u6240\u5C5E\u5355\u4F4D"),le.createElement("span",{className:io.shixunInfo},qi),le.createElement("span",null,"\u5B66\u4E60\u4EBA\u6570"),le.createElement("span",{className:io.shixunInfo},Va)),le.createElement(Te.ZP,{type:"primary",className:io.btnToDetail,onClick:()=>(0,fl.xg)(`/shixuns/${Es}/challenges?exercise=true`)},le.createElement("i",{className:"iconfont icon-shixunkecheng"}),"\u5B9E\u8BAD\u8BE6\u60C5")))})}},"\u67E5\u770B"),!On&&le.createElement("span",{onClick:()=>{ki({type:"deleteShixunQuestion",payload:{shixunId:ia}})},className:`ml20 ${io.deleteBtn}`},"\u5220\u9664"))}}],dataSource:(pi==null?void 0:pi.item_banks)||[],pagination:!1}))},{children:le.createElement(Ot.Z,{style:{transform:(er=pi==null?void 0:pi.item_banks)!=null&&er.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between"},le.createElement("span",{className:io.title},"\u5DF2\u9009\u5B9E\u8BAD\u9898\u4E2D\u968F\u673A\u62BD\u9898"),!!((Wi=pi==null?void 0:pi.item_banks)!=null&&Wi.length)&&le.createElement(Fi.Z,null,le.createElement(Ot.Z,{align:"middle"},le.createElement("span",{className:io.normalText},"\u62BD\u9898\u6570\u91CF"),le.createElement(jt.Z,{min:0,disabled:On,max:pi==null?void 0:pi.item_bank_num,size:"large",className:"ml10 mr10",value:(pi==null?void 0:pi.item_bank_count)||1,onChange:ur=>ki({type:"changeQuestionNum",payload:{num:ur||1,itemType:"PRACTICAL"}})}),le.createElement("span",{className:`${io.normalText} mr30`},"/",pi==null?void 0:pi.item_bank_num),le.createElement("span",{className:io.normalText},"\u6BCF\u9898\u5206\u503C"),le.createElement(jt.Z,{disabled:On,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:pi==null?void 0:pi.score,onChange:ur=>ki({type:"changeQuestionScore",payload:{score:ur,itemType:"PRACTICAL"}})}),le.createElement("span",{className:io.normalText},"\u5206"))))}]})};var eu=({setVisibleModalType:tn,currentItemType:un,onDelete:Gn})=>{var er,Wi;const Bi=(0,_e.useParams)(),{data:ki,dispatch:On,disabled:pi}=(0,le.useContext)(_t),ur=((er=ki==null?void 0:ki.item_types)==null?void 0:er.findIndex(da=>da.item_type===un))+1,_r=(Wi=ki==null?void 0:ki.item_types)==null?void 0:Wi.find(da=>da.item_type===un);return le.createElement("div",{className:io.questionDetailWrapper},le.createElement(Ot.Z,{justify:"space-between",align:"middle",className:"mb30"},le.createElement(Fi.Z,null,le.createElement("span",{className:io.questionTitle},`${(0,fl.EM)(ur)}\u3001${_r==null?void 0:_r.item_type_text}`),le.createElement("span",{className:io.questionScoreInfo},"\uFF08",le.createElement("span",{style:{color:"#3061D0"}},_r==null?void 0:_r.item_bank_count),"\u5C0F\u9898 ",le.createElement("span",null,"\uFF0C\u5171",le.createElement("span",{style:{color:"#3061D0"}},_r==null?void 0:_r.total_score),"\u5206"),"\uFF09")),!pi&&le.createElement("i",{className:`iconfont icon-shanchutimu ${io.deleteIcon}`,onClick:()=>Gn(un)})),un==="PRACTICAL"?le.createElement(Al,{setVisibleModalType:tn}):le.createElement(le.Fragment,null,(_r==null?void 0:_r.contents.length)===0?le.createElement(Co.Z,{styles:{margin:"70px auto 100px auto"},customText:le.createElement("span",null,"\u6682\u65E0\u62BD\u9898\u89C4\u5219\uFF0C\u652F\u6301",le.createElement("span",{style:{color:"#EA9741"}},"\u6307\u5B9A\u6587\u4EF6\u5939\u3001\u96BE\u5EA6\u3001\u77E5\u8BC6\u70B9"),"\u8FDB\u884C\u62BD\u9898\uFF5E"),ButtonTwo:(Bi==null?void 0:Bi.id)&&le.createElement(Ot.Z,{justify:"center",className:"mt30"},le.createElement(jn.op,{style:{width:136,marginTop:-10},onClick:()=>tn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219"))}):le.createElement(le.Fragment,null,le.createElement(Ot.Z,{justify:"space-between",align:"middle",className:"mb20"},le.createElement(Fi.Z,null,le.createElement(Ot.Z,{align:"middle"},le.createElement("span",{className:`${io.normalText}`},"\u6BCF\u9898\u5206\u503C"),le.createElement(jt.Z,{disabled:pi,size:"large",className:"ml10 mr10",min:.1,max:100,value:_r==null?void 0:_r.score,precision:1,onChange:da=>On({type:"changeQuestionScore",payload:{score:da,itemType:un}})}),le.createElement("span",{className:io.normalText},"\u5206"))),(Bi==null?void 0:Bi.id)&&le.createElement(jn.op,{onClick:()=>tn("rule")},"\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219")),le.createElement(Nr.default,{columns:ol(_r==null?void 0:_r.random_rule_type,On,un,pi),dataSource:_r==null?void 0:_r.contents,pagination:!1,rowKey:"id"}))))},Eu=be(60580),Wu=be(15835),ln=be(52262),Gl=be(32637),Uo=be(67294),Zu=Object.defineProperty,al=Object.defineProperties,Su=Object.getOwnPropertyDescriptors,Jc=Object.getOwnPropertySymbols,Dc=Object.prototype.hasOwnProperty,Ws=Object.prototype.propertyIsEnumerable,Oa=(tn,un,Gn)=>un in tn?Zu(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,Pa=(tn,un)=>{for(var Gn in un||(un={}))Dc.call(un,Gn)&&Oa(tn,Gn,un[Gn]);if(Jc)for(var Gn of Jc(un))Ws.call(un,Gn)&&Oa(tn,Gn,un[Gn]);return tn},Ga=(tn,un)=>al(tn,Su(un)),ts=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())}),oo=({})=>{var tn,un,Gn,er,Wi,Bi,ki,On,pi,ur,_r,da,ia,Es,cs;const[Do]=(0,_e.useSearchParams)(),jr=(0,_e.useParams)(),{data:qi,dispatch:Va,setPreview:Ha,getData:Ts,handlePreview:_s,disabled:ha}=(0,le.useContext)(_t),[za,Ho]=(0,le.useState)(""),[zr,Ns]=(0,le.useState)((un=(tn=qi==null?void 0:qi.item_types)==null?void 0:tn[0])==null?void 0:un.item_type),[Aa,Ia]=(0,le.useState)(!0),[Zs,Vu]=(0,le.useState)(!1),fu=(dt,lr)=>ts(void 0,null,function*(){var rr,kr,tr,Yn,Tr,Lr,Vr;const mr=qi.item_types.map(Or=>Or.item_type_text),zo=(rr=qi==null?void 0:qi.item_types)==null?void 0:rr.filter(Or=>{var Ur,Fr;return((Ur=Or.contents)==null?void 0:Ur.length)>0||((Fr=Or==null?void 0:Or.item_banks)==null?void 0:Fr.length)>0});if(qi.sort_by_item_type=mr,!((kr=qi.item_types)!=null&&kr.length)){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((zo==null?void 0:zo.length)===0){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if(!dt){const Or=Number((tr=qi==null?void 0:qi.examination_bank)==null?void 0:tr.total_score);[100,120,150].includes(Or)||(yield new Promise((Ur,Fr)=>{Zr.default.confirm({centered:!0,icon:null,okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Uo.createElement("div",{className:"c-grey-333"},"\u5F53\u524D\u8BD5\u5377\u603B\u5206\u4E3A",Uo.createElement("span",{style:{color:"#FA6400",margin:"0 5px"}},Or),"\u5206\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u8FDB\u884C\u4FDD\u5B58\uFF1F"),onOk:()=>ts(void 0,null,function*(){Ur("")}),onCancel:()=>{Fr()}})}))}let Ii=()=>ts(void 0,null,function*(){const Or=(0,Qe.cloneDeep)(qi),{item_types:Ur}=Or||{};Or.item_types=Ur.filter(ko=>ko.item_type===zr),(yield We(jr.id||jr.categoryId,Or)).status===0&&(Ns(lr),Lt.ZP.success("\u4FDD\u5B58\u6210\u529F"),dt||_e.history.push("/paperlibrary"))}),vi=(Tr=(Yn=qi==null?void 0:qi.item_types)==null?void 0:Yn.filter(Or=>Or.item_type_text==="\u5B9E\u8BAD\u9898")[0])==null?void 0:Tr.item_banks,Ai=0;vi==null||vi.map(Or=>{Or.high_resources_consume&&(Ai=Ai+1)}),console.log(Ai),Ai>0?Zr.default.info({centered:!0,icon:null,width:600,okText:"\u6211\u77E5\u9053\u4E86",title:"\u63D0\u793A",content:Uo.createElement("div",null,Uo.createElement("div",{className:mi.tipcontent},Uo.createElement("div",null,Uo.createElement("div",{className:mi.name},"\u60A8\u597D\uFF01",(Lr=(0,ln.eY)())==null?void 0:Lr.username,"\uFF08",(Vr=(0,ln.eY)())==null?void 0:Vr.login,"\uFF09\uFF1A"),Uo.createElement("div",{className:mi.tip},"\u5F53\u524D\u8BD5\u5377\u5305\u542B\u9AD8\u6D88\u8017\u7C7B\u578B\u7684\u5B9E\u9A8C\u3002",Uo.createElement("br",null),"\u6839\u636E\u5E73\u53F0\u4F7F\u7528\u89C4\u5219\uFF0C\u9700\u8981\u6388\u6743\u624D\u80FD\u4F7F\u7528\u3002\u53D1\u5E03\u8003\u8BD5\u524D\uFF0C\u8BF7\u5148\u8054\u7CFB\u5E73\u53F0\u7BA1\u7406\u5458\u83B7\u53D6\u6388\u6743\u7801\u3002"),Uo.createElement("div",{className:mi.info},Uo.createElement("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),Uo.createElement("span",{className:"mr10",style:{color:"#6A7283"}},"\u9AD8\u6D88\u8017\u5B9E\u9A8C"),Uo.createElement("span",{style:{color:"#232B40"}},`${Ai}\u4E2A`))),Uo.createElement("div",null,Uo.createElement("div",{className:mi.img},Uo.createElement("img",{src:Gl,width:"124px",height:"124px"})),Uo.createElement("div",{className:"tc font14 mt10",style:{color:"#777A93"}},"\u626B\u4E00\u626B\uFF0C\u83B7\u53D6\u6388\u6743\u7801")))),onOk:()=>{Ii()}}):Ii()}),St=(dt,lr,rr,kr=!1)=>ts(void 0,null,function*(){console.log(qi);const tr=Ga(Pa(Pa({},qi.exercise),jr),{exerciseId:jr.categoryId,sort_by_item_type:qi.sort_by_item_type,difficulty:qi.examination_bank.difficulty,exam_notes:qi.examination_bank.exam_notes,exercise_name:qi.examination_bank.name,time:qi.examination_bank.time,changed_item_type:zr,item_types:qi.item_types,sub_discipline_id:qi.examination_bank.sub_discipline_id});(!dt||lr===1)&&(tr.is_reset=1);const Yn=yield(0,Wu.wy)(tr);return Yn.status===0&&(kr||Lt.ZP.success("\u4FEE\u6539\u6210\u529F "),Ns(rr),dt||_e.history.push(`/classrooms/${jr.coursesId}/exercise/${jr.categoryId}/detail?random=true`)),Yn}),Jt=dt=>{Zr.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,closable:!0,content:Uo.createElement("div",null,"\u786E\u8BA4\u5220\u9664\u8BE5\u9898\u578B\uFF1F"),onOk:()=>ts(void 0,null,function*(){var lr,rr,kr,tr;if(jr.id){if((yield Pt(jr.id,{item_type:[dt]})).status!==0)return}else{const Yn=yield Nt(jr.categoryId,{item_type:[dt]});if(Ts(),Yn.status!==0)return}if(Va({type:"deleteQuestionType",payload:dt}),dt===zr){const Yn=Ue(qi,{type:"deleteQuestionType",payload:dt});Ns(Yn.item_types.length?Yn.item_types[0].item_type:(rr=(lr=qi==null?void 0:qi.item_types)==null?void 0:lr[0])==null?void 0:rr.item_type)}else Ns((tr=(kr=qi==null?void 0:qi.item_types)==null?void 0:kr[0])==null?void 0:tr.item_type)})})};(0,le.useEffect)(()=>{var dt;(dt=qi==null?void 0:qi.examination_bank)!=null&&dt.name&&Ia(!1),(0,fl.Dk)("\u968F\u673A\u7EC4\u5377")},[(Gn=qi==null?void 0:qi.examination_bank)==null?void 0:Gn.name]);const ze=()=>ts(void 0,null,function*(){var dt;let lr=yield St(!0,1,zr,!0);if((lr==null?void 0:lr.status)===0){const rr=yield(0,ne.ZP)(`/api/exercises/${jr==null?void 0:jr.categoryId}/simulate_start_answer.json`,{method:"get",params:{coursesId:jr==null?void 0:jr.coursesId,categoryId:jr==null?void 0:jr.categoryId}});(rr==null?void 0:rr.status)!=-1&&window.open(`/classrooms/${jr.coursesId}/exercise/${jr.categoryId}/${(dt=(0,ln.eY)())==null?void 0:dt.login}/initate_answer`)}});return Uo.createElement("div",{className:mi.questionInfo},Uo.createElement("div",{className:"tc mb20"},Uo.createElement(Ve.VP,{defaultValue:(er=qi==null?void 0:qi.examination_bank)==null?void 0:er.name,onFinish:dt=>ts(void 0,null,function*(){return Va({type:"updateBaseInfo",payload:Ga(Pa({},qi.examination_bank),{name:dt})}),jr!=null&&jr.id?(0,Wu.se)({name:dt,exerciseId:(jr==null?void 0:jr.categoryId)||(jr==null?void 0:jr.id)}):(0,Wu.wy)({exercise_name:dt,exerciseId:(jr==null?void 0:jr.categoryId)||(jr==null?void 0:jr.id)}),!0})})),Uo.createElement(Ot.Z,{justify:"center",className:"mb20"},Uo.createElement(Fi.Z,{className:"mr30"},Uo.createElement("span",{className:mi.label},"\u7B54\u9898\u65F6\u957F"),Uo.createElement("span",null,((Wi=qi==null?void 0:qi.examination_bank)==null?void 0:Wi.time)===-1?"\u4E0D\u9650":((Bi=qi==null?void 0:qi.examination_bank)==null?void 0:Bi.time)||"\u4E0D\u9650")),Uo.createElement(Fi.Z,{className:"mr30"},Uo.createElement("span",{className:mi.label},"\u96BE\u5EA6"),Uo.createElement("span",null,(On=Fe[`${(ki=qi==null?void 0:qi.examination_bank)==null?void 0:ki.difficulty}`])==null?void 0:On.label)),Uo.createElement(Fi.Z,{className:"mr30"},Uo.createElement("span",{className:mi.label},"\u8BD5\u9898\u603B\u6570"),Uo.createElement("span",null,((pi=qi==null?void 0:qi.examination_bank)==null?void 0:pi.question_count)||0)),Uo.createElement(Fi.Z,null,Uo.createElement("span",{className:mi.label},"\u603B\u5206"),Uo.createElement("span",null,((_r=(ur=qi==null?void 0:qi.examination_bank)==null?void 0:ur.total_score)==null?void 0:_r.toFixed(1))||0))),Uo.createElement("div",{className:mi.content,style:{border:((da=qi==null?void 0:qi.item_types)==null?void 0:da.length)<=0&&"none"}},((ia=qi==null?void 0:qi.item_types)==null?void 0:ia.length)>0?Uo.createElement(Ot.Z,{wrap:!1},Uo.createElement(Fi.Z,{flex:"260px",className:mi.leftPart},!ha&&Uo.createElement(Ot.Z,{className:"mb20"},Uo.createElement(jn.op,{style:{margin:"0 15px",borderRadius:2},onClick:()=>Ho("setScore")},"\u6279\u91CF\u8BBE\u7F6E\u5206\u503C"),(jr==null?void 0:jr.id)&&Uo.createElement(jn.op,{shape:"default",onClick:()=>Ho("questionType")},"\u6DFB\u52A0\u9898\u578B")),Uo.createElement(Fn,{list:qi.item_types,onSelect:dt=>ts(void 0,null,function*(){if(dt===zr)return;Ia(!0);const lr=qi.item_types.find(rr=>rr.item_type===zr);if(zr!=="PRACTICAL"&&lr.contents.length>0&&(jr!=null&&jr.id)){const rr=(0,Qe.cloneDeep)(qi),{item_types:kr}=rr||{};rr.item_types=kr.filter(tr=>tr.item_type===zr);try{(yield We(jr.id||jr.categoryId,rr)).status===0&&Ns(dt)}catch(tr){}}else jr.categoryId?St(!0,2,dt):fu(!0,dt);Ia(!1)}),onDelete:Jt})),Uo.createElement(Fi.Z,{flex:1,className:mi.rightPart},Uo.createElement(xt.Z,{spinning:Aa},Uo.createElement(eu,{setVisibleModalType:Ho,currentItemType:zr,onDelete:Jt})))):Uo.createElement(Co.Z,{customText:"\u8BF7\u5148\u8BBE\u7F6E\u8BD5\u5377\u9898\u578B",styles:{margin:"70px auto"},ButtonTwo:Uo.createElement(Ot.Z,{justify:"center",className:"mt20"},(jr==null?void 0:jr.id)&&Uo.createElement(jn.op,{style:{width:88},onClick:()=>Ho("questionType")},"\u6DFB\u52A0\u9898\u578B"))})),!!(jr!=null&&jr.id)&&Uo.createElement("div",{className:mi.fixedBottom},Uo.createElement(Eu.Z,{className:`${mi.previewBtn} mr20`,onClick:()=>ts(void 0,null,function*(){var dt,lr;const rr=(dt=qi==null?void 0:qi.item_types)==null?void 0:dt.filter(kr=>{var tr,Yn;return((tr=kr.contents)==null?void 0:tr.length)>0||((Yn=kr==null?void 0:kr.item_banks)==null?void 0:Yn.length)>0});if(!((lr=qi.item_types)!=null&&lr.length)){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}if((rr==null?void 0:rr.length)===0){Lt.ZP.warning("\u8BD5\u9898\u603B\u6570=0\uFF0C\u8BF7\u5148\u8BBE\u7F6E\u62BD\u9898\u89C4\u5219");return}yield fu(!0,zr),_s()})},"\u8BD5\u5377\u9884\u89C8"),Uo.createElement(Eu.Z,{type:"primary",className:mi.confirmBtn,onClick:()=>fu()},Uo.createElement("i",{className:"iconfont icon-baocun1 mr5"}),"\u4FDD\u5B58\u8BD5\u5377")),!!(jr!=null&&jr.categoryId)&&Uo.createElement("div",{className:mi.fixedBottom,style:{justifyContent:((Es=qi==null?void 0:qi.exercise)==null?void 0:Es.exercise_status)!==1?"end":"center"}},Uo.createElement(Eu.Z,{className:`${mi.previewBtn} mr20`,onClick:()=>ts(void 0,null,function*(){var dt,lr;document.body.scrollIntoView(),_e.history.push(`/classrooms/${jr.coursesId}/exercise/${(dt=qi==null?void 0:qi.exercise)==null?void 0:dt.id}/detail?random=${(lr=qi==null?void 0:qi.exercise)==null?void 0:lr.is_random}`)})},"\u8FD4\u56DE"),((cs=qi==null?void 0:qi.exercise)==null?void 0:cs.exercise_status)===1&&Uo.createElement(Eu.Z,{className:`${mi.previewBtn} mr20`,onClick:ze},"\u6A21\u62DF\u8003\u8BD5"),(qi==null?void 0:qi.exercise.exercise_status)===1&&Uo.createElement(Eu.Z,{type:"primary",className:mi.confirmBtn,onClick:()=>ts(void 0,null,function*(){var dt;const lr=Number((dt=qi==null?void 0:qi.examination_bank)==null?void 0:dt.total_score);[100,120,150].includes(lr)||(yield new Promise((rr,kr)=>{Zr.default.confirm({centered:!0,icon:null,okText:"\u4FDD\u5B58",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Uo.createElement("div",{className:"c-grey-333"},"\u5F53\u524D\u8BD5\u5377\u603B\u5206\u4E3A",Uo.createElement("span",{style:{color:"#FA6400",margin:"0 5px"}},lr),"\u5206\uFF0C\u8BF7\u786E\u8BA4\u662F\u5426\u8FDB\u884C\u4FDD\u5B58\uFF1F"),onOk:()=>ts(void 0,null,function*(){rr("")}),onCancel:()=>{kr()}})})),St()})},"\u63D0\u4EA4")),Uo.createElement(hr,{open:za==="questionType",onCancel:()=>Ho(""),onOk:dt=>ts(void 0,null,function*(){var lr,rr;const kr=[],tr=Ue(qi,{type:"setQuestionType",payload:dt}),Yn=((lr=tr==null?void 0:tr.item_types)==null?void 0:lr.map(Tr=>Tr.item_type))||[];for(const Tr of((rr=qi==null?void 0:qi.item_types)==null?void 0:rr.map(Lr=>Lr.item_type))||[])Yn.includes(Tr)||kr.push(Tr);jr.id&&kr.length>0&&(yield Pt(jr.id,{item_type:kr})).status!==0||(Va({type:"setQuestionType",payload:dt}),Ns(zr||tr.item_types[0].item_type),Ho(""))})}),Uo.createElement(En,{open:za==="setScore",onCancel:()=>{Ho("")},onOk:dt=>ts(void 0,null,function*(){console.log("---newData",dt);const lr=dt.item_types.map(rr=>({item_type:rr.item_type,score:rr.score}));jr.id?(yield mt(jr.id,{score_settings:lr})).status===0&&Va({type:"init",payload:dt}):(yield at(jr.categoryId,{score_settings:lr})).status===0&&Va({type:"init",payload:dt}),Ho("")})}),Uo.createElement(No,{open:za==="rule",onCancel:()=>Ho(""),currentItemType:zr,setVisibleModalType:Ho}),Do.get("type")==="settings"&&Uo.createElement(il,{open:za==="selectShixun",onCancel:()=>Ho(""),onOk:dt=>{if(console.log(dt),(dt==null?void 0:dt.length)<=0){Lt.ZP.info("\u5B9E\u8BAD\u6570\u4E0D\u80FD\u4E3A0");return}Va({type:"addShixun",payload:{shixunList:[...dt]}}),Ho("")}}))},$c=be(38884),Hl=be(67294),iu=Object.defineProperty,Tc=Object.defineProperties,Pc=Object.getOwnPropertyDescriptors,fr=Object.getOwnPropertySymbols,El=Object.prototype.hasOwnProperty,Fl=Object.prototype.propertyIsEnumerable,Qu=(tn,un,Gn)=>un in tn?iu(tn,un,{enumerable:!0,configurable:!0,writable:!0,value:Gn}):tn[un]=Gn,Ec=(tn,un)=>{for(var Gn in un||(un={}))El.call(un,Gn)&&Qu(tn,Gn,un[Gn]);if(fr)for(var Gn of fr(un))Fl.call(un,Gn)&&Qu(tn,Gn,un[Gn]);return tn},_c=(tn,un)=>Tc(tn,Pc(un)),pa=(tn,un,Gn)=>new Promise((er,Wi)=>{var Bi=pi=>{try{On(Gn.next(pi))}catch(ur){Wi(ur)}},ki=pi=>{try{On(Gn.throw(pi))}catch(ur){Wi(ur)}},On=pi=>pi.done?er(pi.value):Promise.resolve(pi.value).then(Bi,ki);On((Gn=Gn.apply(tn,un)).next())}),Ju=()=>{var tn,un,Gn,er;const[Wi,Bi]=(0,le.useState)("baseInfo"),ki=(0,_e.useDispatch)();(0,le.useEffect)(()=>{ki({type:"globalSetting/footerToggle",payload:!1})},[]);const On=(0,_e.useParams)(),pi=!!(On.id||On.categoryId),[ur]=(0,_e.useSearchParams)();(0,le.useEffect)(()=>{ur.get("type")==="settings"&&Bi("settings")},[]);const[_r,da]=(0,le.useReducer)(Ue,null),[ia,Es]=(0,le.useState)(!1),cs=()=>pa(void 0,null,function*(){Es(!0);let zr;On.categoryId?zr=yield Nn(On):zr=yield Re(On.id),Es(!1),zr.status===0&&da({type:"init",payload:zr})});(0,le.useEffect)(()=>{pi?cs():da({type:"init",payload:{examination_bank:{difficulty:2}}})},[On]);const[Do,jr]=(0,le.useState)(""),qi=(zr,Ns)=>pa(void 0,null,function*(){var Aa,Ia,Zs,Vu;const fu=(Aa=_r==null?void 0:_r.item_types)==null?void 0:Aa.filter(ze=>{var dt;return((dt=ze==null?void 0:ze.item_type)==null?void 0:dt.toUpperCase())===(Ns==null?void 0:Ns.type)}),St={sort_by_item_type:_r.sort_by_item_type,difficulty:_r.examination_bank.difficulty,exam_notes:_r.examination_bank.exam_notes,name:_r.examination_bank.name,time:_r.examination_bank.time,item_types:_r.item_types};if(zr!==void 0&&!(zr!=null&&zr.single_question_id)){St.seleted_item_bank_ids=zr==null?void 0:zr.seleted_item_bank_ids,St.item_types=fu;const ze=yield Ln(St);if((ze==null?void 0:ze.status)===0){let dt=(0,Qe.cloneDeep)(ha.data);dt.questionList=(Ia=dt==null?void 0:dt.questionList)==null?void 0:Ia.map(lr=>{var rr;return lr.type===Ns.type?_c(Ec({},lr),{questions:((rr=ze==null?void 0:ze.questions)==null?void 0:rr.questions)||[]}):lr}),za({show:!0,data:dt})}return}if(zr!==void 0&&(zr!=null&&zr.single_question_id)){St.seleted_item_bank_ids=zr==null?void 0:zr.seleted_item_bank_ids,St.single_question_id=zr==null?void 0:zr.single_question_id,St.item_types=fu;const ze=yield Ln(St);if((ze==null?void 0:ze.status)===0){let dt=(0,Qe.cloneDeep)(ha.data);dt.questionList=(Zs=dt==null?void 0:dt.questionList)==null?void 0:Zs.map(lr=>{var rr,kr;if(lr.type===Ns.type){const tr=(0,Qe.cloneDeep)(lr==null?void 0:lr.questions);return tr.splice(Ns.index,1,(kr=(rr=ze==null?void 0:ze.questions)==null?void 0:rr.questions)==null?void 0:kr[0]),console.log(lr==null?void 0:lr.questions,tr,Ns.index,"new_questions"),_c(Ec({},lr),{questions:tr})}return lr}),za({show:!0,data:dt})}return}const Jt=yield Et(St);if((Jt==null?void 0:Jt.status)===0){const ze=(0,fl.ad)(Jt);let dt=[];(Vu=_r==null?void 0:_r.item_types)==null||Vu.forEach(lr=>{var rr;const kr=(rr=ze==null?void 0:ze.questionList)==null?void 0:rr.find(tr=>lr.item_type===tr.type);dt.push(kr)}),console.log(_r,"sortList"),dt=(0,Qe.compact)(dt),ze.questionList=dt,za({show:!0,data:ze}),jr(new Date)}}),Va=zr=>{var Ns;let Aa=(0,Qe.cloneDeep)(ha.data);Aa.questionList=(Ns=Aa==null?void 0:Aa.questionList)==null?void 0:Ns.map(Ia=>Ia.type===zr.type?_c(Ec({},Ia),{questions_score:zr.scoreTotal}):Ia),da({type:"changeQuestionScore",payload:{score:zr.score,itemType:zr.type}}),za({show:!0,data:Aa})},Ha=zr=>pa(void 0,null,function*(){const Ns={sort_by_item_type:_r.sort_by_item_type,difficulty:_r.examination_bank.difficulty,exam_notes:_r.examination_bank.exam_notes,name:_r.examination_bank.name,time:_r.examination_bank.time,item_types:_r.item_types,sub_discipline_id:_r.examination_bank.sub_discipline_id};if(zr){(yield xn(Ec(Ec({},Ns),zr))).status===0&&Lt.ZP.success("\u4FDD\u5B58\u6210\u529F");return}(yield We(On.id,Ns)).status===0&&(Lt.ZP.success("\u63D0\u4EA4\u6210\u529F"),_e.history.push("/paperlibrary?defaultActiveKey=0"))}),Ts=(0,bs.g)(),[_s]=At.default.useForm(),[ha,za]=(0,le.useState)({show:!1,data:{}}),Ho=!!((tn=_r==null?void 0:_r.exercise)!=null&&tn.exercise_status)&&((un=_r==null?void 0:_r.exercise)==null?void 0:un.exercise_status)!==1;return Hl.createElement(_t.Provider,{value:{data:_r,disabled:Ho,dispatch:da,setPreview:za,getData:cs,handlePreview:qi}},ha.show?Hl.createElement($c.Z,{key:Do,data:ha.data,onExchange:qi,onTypeScore:Va,submit:Ha,goBack:()=>za({show:!1,data:{}})}):Hl.createElement("div",{className:Xe.wrapper},Hl.createElement("div",{className:"edu-container"},Hl.createElement(wt.Z,{className:Xe.breadCrumbWrapper,separator:">",items:On!=null&&On.categoryId?[{title:Hl.createElement(_e.Link,{to:`/classrooms/${On.coursesId}/exercise`},(er=(Gn=(0,ln.eY)())==null?void 0:Gn.course)==null?void 0:er.course_name)},{title:Hl.createElement(_e.Link,{to:`/classrooms/${On.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")},{title:"\u7F16\u8F91\u8BD5\u5377"}]:[{title:Hl.createElement(_e.Link,{to:"/paperlibrary"},"\u8BD5\u5377\u5E93")},{title:"\u968F\u673A\u7EC4\u5377"}]}),Hl.createElement(Ve.d4,{activeKey:Wi,tabs:[{key:"baseInfo",label:"\u8BD5\u5377\u57FA\u7840\u4FE1\u606F"},{key:"settings",label:"\u7EC4\u5377\u914D\u7F6E"}],onChange:zr=>pa(void 0,null,function*(){if(zr==="settings"&&(yield _s.validateFields(),!pi)){const Ns=yield lt(_r);Ns.status===0&&_e.history.replace(`/randompaper/edit/${Ns==null?void 0:Ns.examination_bank_id}?type=settings`)}Bi(zr)})}),Wi==="baseInfo"&&Hl.createElement(ro,{courseOptions:Ts,setCurrentKey:Bi,loading:ia,form:_s}),Hl.createElement("div",{style:{display:Wi==="settings"?"block":"none"}},_r&&Hl.createElement(oo,null)))))}},99640:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return pt}});var le=be(62844),Xe={ul:"ul___TdfYY"},Lt=be(32637),At=be(67294),wt=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,Ve=Object.prototype.propertyIsEnumerable,xt=(Rt,Ot)=>{var jt={};for(var Te in Rt)_e.call(Rt,Te)&&Ot.indexOf(Te)<0&&(jt[Te]=Rt[Te]);if(Rt!=null&&wt)for(var Te of wt(Rt))Ot.indexOf(Te)<0&&Ve.call(Rt,Te)&&(jt[Te]=Rt[Te]);return jt},pt=Rt=>{var Ot=Rt,{open:jt,onCancel:Te}=Ot,ne=xt(Ot,["open","onCancel"]);return At.createElement(le.default,{centered:!0,open:jt,title:At.createElement("div",{style:{fontWeight:"bold"}},"\u8054\u7CFB\u6559\u7814\u52A9\u7406"),width:"696px",onCancel:Te,footer:null},At.createElement("div",null,At.createElement("div",{className:"tc"},At.createElement("img",{className:"mt10",src:Lt,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})),At.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10"},"\u514D\u8D39\u6559\u7814\u52A9\u7406"),At.createElement("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16"},"\u5FAE\u4FE1\u626B\u4E00\u626B\u6DFB\u52A0"),At.createElement("div",{style:{color:"#333"},className:"pt30 font14"},At.createElement("ul",{className:Xe.ul},At.createElement("li",null,"1\u3001\u89E3\u7B54\u8001\u5E08\u7591\u60D1\u3001\u5E2E\u52A9\u8001\u5E08\u66F4\u5FEB\u719F\u6089\u548C\u4F7F\u7528\u5E73\u53F0\u6559\u5B66\u3002"),At.createElement("li",null,"2\u3001\u534F\u52A9\u8001\u5E08\u521B\u5EFA\u8BFE\u5802\u3001\u8BFE\u7A0B\u8BBE\u8BA1\u3001\u505A\u597D\u6559\u5B66\u5DE5\u4F5C\u3002"),At.createElement("li",null,"3\u3001\u6839\u636E\u8001\u5E08\u6559\u5B66\u65B9\u5411\uFF0C\u5206\u4EAB\u5934\u6B4C\u5E73\u53F0C9\u9662\u6821\u3001985\u9AD8\u6821\u3001211\u9AD8\u6821\u3001\u53CC\u4E00\u6D41\u9AD8\u6821\u8001\u5E08\u7ECF\u5178\u5B9E\u8DF5\u6559\u5B66\u6848\u4F8B\u3002")))))}},99678:function(Rn,$n,be){"use strict";be.d($n,{g:function(){return wt}});var le=be(67294),Xe=be(56443),Lt=be(53430),At=(_e,Ve,xt)=>new Promise((ut,pt)=>{var Rt=Te=>{try{jt(xt.next(Te))}catch(ne){pt(ne)}},Ot=Te=>{try{jt(xt.throw(Te))}catch(ne){pt(ne)}},jt=Te=>Te.done?ut(Te.value):Promise.resolve(Te.value).then(Rt,Ot);jt((xt=xt.apply(_e,Ve)).next())});const wt=()=>{const[_e,Ve]=(0,le.useState)([]);return(0,le.useEffect)(()=>{At(void 0,null,function*(){const ut=yield(0,Xe.d1)({source:"question"});ut!=null&&ut.disciplines&&Ve((0,Lt.L)(ut==null?void 0:ut.disciplines))})},[]),_e}},9343:function(Rn,$n,be){"use strict";be.d($n,{U:function(){return ut}});var le=be(67294),Xe=Object.defineProperty,Lt=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,wt=Object.prototype.propertyIsEnumerable,_e=(pt,Rt,Ot)=>Rt in pt?Xe(pt,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Ot}):pt[Rt]=Ot,Ve=(pt,Rt)=>{for(var Ot in Rt||(Rt={}))At.call(Rt,Ot)&&_e(pt,Ot,Rt[Ot]);if(Lt)for(var Ot of Lt(Rt))wt.call(Rt,Ot)&&_e(pt,Ot,Rt[Ot]);return pt},xt=(pt,Rt,Ot)=>new Promise((jt,Te)=>{var ne=se=>{try{ce(Ot.next(se))}catch(ge){Te(ge)}},te=se=>{try{ce(Ot.throw(se))}catch(ge){Te(ge)}},ce=se=>se.done?jt(se.value):Promise.resolve(se.value).then(ne,te);ce((Ot=Ot.apply(pt,Rt)).next())});function ut(pt,Rt){const[Ot,jt]=(0,le.useState)(Rt),[Te,ne]=(0,le.useState)(!1),[te,ce]=(0,le.useState)();return[Ot,Te,(ge,ye=!1)=>xt(this,null,function*(){const we=ye?Rt:Ve(Ve({},Ot),ge);ne(!0),jt(we);const Ce=yield pt(we);return ne(!1),ce(Ce),Ce}),te,ce]}},51161:function(Rn,$n,be){"use strict";be.d($n,{AL:function(){return we},Iy:function(){return Rt},Qv:function(){return Te},ez:function(){return ye},jb:function(){return Ot}});var le=be(47084),Xe=be.n(le),Lt=be(90621),At=be.n(Lt);let wt=1;function _e(ht,nt){const mt=ht.match(/^(\s+)(?:```)/);if(mt===null)return nt;const at=mt[1];return nt.split(`
`).map(Pt=>{const Nt=Pt.match(/^\s+/);if(Nt===null)return Pt;const[Et]=Nt;return Et.length>=at.length?Pt.slice(at.length):Pt}).join(`
`)}let Ve=[],xt=["<ul>"];const ut=new(Xe()).Renderer,pt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Rt(){Ve.length=0,xt=["<ul>"]}const Ot={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function jt(ht,nt,mt,at){if(nt>=ht.length||ht[nt].level<=mt)return nt;var Pt=ht[nt];at.push("<li><a href='#"+wt+Pt.anchor+"'>"+Pt.text+"</a>"),nt++;var Nt=[];return nt=jt(ht,nt,Pt.level,Nt),Nt.length>0&&(at.push("<ul>"),Nt.forEach(function(Et){at.push(Et)}),at.push("</ul>")),at.push("</li>"),nt=jt(ht,nt,mt,at),nt}function Te(){return jt(Ve,0,0,xt),xt.push("</ul>"),xt.join("")}const ne={heading(ht){const nt=pt.exec(ht);if(wt+=1,nt)return{type:"heading",raw:nt[0],depth:nt[1].length,text:nt[2]}},fences(ht){const nt=this.rules.block.fences.exec(ht);if(nt){const mt=nt[0];let at=_e(mt,nt[3]||"");const Pt=nt[2]?nt[2].trim():nt[2];if(["latex","katex","math"].indexOf(Pt)>=0){const Nt=se(),Et=at;at=Nt,ge[Nt]={type:"block",expression:Et}}return{type:"code",raw:mt,lang:Pt,text:at}}}},te=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ce=0;const se=()=>`__special_katext_id_${ce++}__`;let ge={};function ye(){return ge}function we(){ce=0,ge={}}function Ce(ht){return ht=ht.replace(te,(nt,mt)=>{const at=se();return ge[at]={type:"inline",expression:mt},at}),ht}const Re=ut.listitem;ut.listitem=function(ht){return Re(Ce(ht))};const We=ut.paragraph;ut.paragraph=function(ht){return We(Ce(ht))};const lt=ut.tablecell;ut.tablecell=function(ht,nt){return lt(Ce(ht),nt)},ut.code=function(ht,nt,mt){const at=(nt||"").match(/\S*/)[0];return at?["latex","katex","math"].indexOf(at)>=0?`<p class='editormd-tex'>${ht}</p>`:`<pre class="prettyprint linenums"><code class="language-${nt}">${mt?ht:(0,Lt.escape)(ht,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(mt?ht:(0,Lt.escape)(ht,!0))+"</code></pre>"},ut.heading=function(ht,nt,mt){let at=this.options.headerPrefix+mt.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Ve.push({anchor:at,level:nt,text:ht}),"<h"+nt+' id="'+wt+at+'">'+ht+"</h"+nt+">"},Xe().setOptions({silent:!0,gfm:!0,pedantic:!1}),Xe().use({tokenizer:ne,renderer:ut}),$n.ZP=Xe()},12845:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return nt}});var le=be(67294),Xe=be(13144),Lt=be.n(Xe),At=be(53124),wt=be(35792),_e=be(16777),Ve=be(14747),xt=be(83559),ut=be(43259);const pt=mt=>{const{componentCls:at,calc:Pt}=mt;return{[at]:Object.assign(Object.assign({},(0,Ve.Wf)(mt)),{margin:0,padding:0,listStyle:"none",[`${at}-item`]:{position:"relative",margin:0,paddingBottom:mt.itemPaddingBottom,fontSize:mt.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:mt.itemHeadSize,insetInlineStart:Pt(Pt(mt.itemHeadSize).sub(mt.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,_e.unit)(mt.itemHeadSize)})`,borderInlineStart:`${(0,_e.unit)(mt.tailWidth)} ${mt.lineType} ${mt.tailColor}`},"&-pending":{[`${at}-item-head`]:{fontSize:mt.fontSizeSM,backgroundColor:"transparent"},[`${at}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:mt.itemHeadSize,height:mt.itemHeadSize,backgroundColor:mt.dotBg,border:`${(0,_e.unit)(mt.dotBorderWidth)} ${mt.lineType} transparent`,borderRadius:"50%","&-blue":{color:mt.colorPrimary,borderColor:mt.colorPrimary},"&-red":{color:mt.colorError,borderColor:mt.colorError},"&-green":{color:mt.colorSuccess,borderColor:mt.colorSuccess},"&-gray":{color:mt.colorTextDisabled,borderColor:mt.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:Pt(mt.itemHeadSize).div(2).equal(),insetInlineStart:Pt(mt.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:mt.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:Pt(Pt(mt.fontSize).mul(mt.lineHeight).sub(mt.fontSize)).mul(-1).add(mt.lineWidth).equal(),marginInlineStart:Pt(mt.margin).add(mt.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${at}-item-tail`]:{display:"none"},[`> ${at}-item-content`]:{minHeight:Pt(mt.controlHeightLG).mul(1.2).equal()}}},[`&${at}-alternate,
&${at}-right,
&${at}-label`]:{[`${at}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:Pt(mt.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:Pt(mt.tailWidth).div(2).equal()}},"&-left":{[`${at}-item-content`]:{insetInlineStart:`calc(50% - ${(0,_e.unit)(mt.marginXXS)})`,width:`calc(50% - ${(0,_e.unit)(mt.marginSM)})`,textAlign:"start"}},"&-right":{[`${at}-item-content`]:{width:`calc(50% - ${(0,_e.unit)(mt.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${at}-right`]:{[`${at}-item-right`]:{[`${at}-item-tail,
${at}-item-head,
${at}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,_e.unit)(Pt(Pt(mt.itemHeadSize).add(mt.tailWidth)).div(2).equal())})`},[`${at}-item-content`]:{width:`calc(100% - ${(0,_e.unit)(Pt(mt.itemHeadSize).add(mt.marginXS).equal())})`}}},[`&${at}-pending
${at}-item-last
${at}-item-tail`]:{display:"block",height:`calc(100% - ${(0,_e.unit)(mt.margin)})`,borderInlineStart:`${(0,_e.unit)(mt.tailWidth)} dotted ${mt.tailColor}`},[`&${at}-reverse
${at}-item-last
${at}-item-tail`]:{display:"none"},[`&${at}-reverse ${at}-item-pending`]:{[`${at}-item-tail`]:{insetBlockStart:mt.margin,display:"block",height:`calc(100% - ${(0,_e.unit)(mt.margin)})`,borderInlineStart:`${(0,_e.unit)(mt.tailWidth)} dotted ${mt.tailColor}`},[`${at}-item-content`]:{minHeight:Pt(mt.controlHeightLG).mul(1.2).equal()}},[`&${at}-label`]:{[`${at}-item-label`]:{position:"absolute",insetBlockStart:Pt(Pt(mt.fontSize).mul(mt.lineHeight).sub(mt.fontSize)).mul(-1).add(mt.tailWidth).equal(),width:`calc(50% - ${(0,_e.unit)(mt.marginSM)})`,textAlign:"end"},[`${at}-item-right`]:{[`${at}-item-label`]:{insetInlineStart:`calc(50% + ${(0,_e.unit)(mt.marginSM)})`,width:`calc(50% - ${(0,_e.unit)(mt.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${at}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}},Rt=mt=>({tailColor:mt.colorSplit,tailWidth:mt.lineWidthBold,dotBorderWidth:mt.wireframe?mt.lineWidthBold:mt.lineWidth*3,dotBg:mt.colorBgContainer,itemPaddingBottom:mt.padding*1.25});var Ot=(0,xt.I$)("Timeline",mt=>{const at=(0,ut.mergeToken)(mt,{itemHeadSize:10,customHeadPaddingVertical:mt.paddingXXS,paddingInlineEnd:2});return[pt(at)]},Rt),jt=function(mt,at){var Pt={};for(var Nt in mt)Object.prototype.hasOwnProperty.call(mt,Nt)&&at.indexOf(Nt)<0&&(Pt[Nt]=mt[Nt]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Nt=Object.getOwnPropertySymbols(mt);Et<Nt.length;Et++)at.indexOf(Nt[Et])<0&&Object.prototype.propertyIsEnumerable.call(mt,Nt[Et])&&(Pt[Nt[Et]]=mt[Nt[Et]]);return Pt},ne=mt=>{var{prefixCls:at,className:Pt,color:Nt="blue",dot:Et,pending:Ln=!1,position:xn,label:Nn,children:fn}=mt,Qe=jt(mt,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:Ke}=le.useContext(At.E_),Je=Ke("timeline",at),_n=Lt()(`${Je}-item`,{[`${Je}-item-pending`]:Ln},Pt),Xn=/blue|red|green|gray/.test(Nt||"")?void 0:Nt,zt=Lt()(`${Je}-item-head`,{[`${Je}-item-head-custom`]:!!Et,[`${Je}-item-head-${Nt}`]:!Xn});return le.createElement("li",Object.assign({},Qe,{className:_n}),Nn&&le.createElement("div",{className:`${Je}-item-label`},Nn),le.createElement("div",{className:`${Je}-item-tail`}),le.createElement("div",{className:zt,style:{borderColor:Xn,color:Xn}},Et),le.createElement("div",{className:`${Je}-item-content`},fn))},te=be(96641),ce=be(77322),se=function(mt,at){var Pt={};for(var Nt in mt)Object.prototype.hasOwnProperty.call(mt,Nt)&&at.indexOf(Nt)<0&&(Pt[Nt]=mt[Nt]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Nt=Object.getOwnPropertySymbols(mt);Et<Nt.length;Et++)at.indexOf(Nt[Et])<0&&Object.prototype.propertyIsEnumerable.call(mt,Nt[Et])&&(Pt[Nt[Et]]=mt[Nt[Et]]);return Pt},ye=mt=>{var{prefixCls:at,className:Pt,pending:Nt=!1,children:Et,items:Ln,rootClassName:xn,reverse:Nn=!1,direction:fn,hashId:Qe,pendingDot:Ke,mode:Je=""}=mt,_n=se(mt,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const Xn=(mn,rn)=>Je==="alternate"?mn==="right"?`${at}-item-right`:mn==="left"?`${at}-item-left`:rn%2===0?`${at}-item-left`:`${at}-item-right`:Je==="left"?`${at}-item-left`:Je==="right"?`${at}-item-right`:mn==="right"?`${at}-item-right`:"",zt=(0,te.Z)(Ln||[]),kn=typeof Nt=="boolean"?null:Nt;Nt&&zt.push({pending:!!Nt,dot:Ke||le.createElement(ce.Z,null),children:kn}),Nn&&zt.reverse();const bn=zt.length,oi=`${at}-item-last`,Yt=zt.filter(mn=>!!mn).map((mn,rn)=>{var He;const Me=rn===bn-2?oi:"",Fe=rn===bn-1?oi:"",{className:Oe}=mn,Ue=se(mn,["className"]);return le.createElement(ne,Object.assign({},Ue,{className:Lt()([Oe,!Nn&&Nt?Me:Fe,Xn((He=mn==null?void 0:mn.position)!==null&&He!==void 0?He:"",rn)]),key:(mn==null?void 0:mn.key)||rn}))}),Mt=zt.some(mn=>!!(mn!=null&&mn.label)),_t=Lt()(at,{[`${at}-pending`]:!!Nt,[`${at}-reverse`]:!!Nn,[`${at}-${Je}`]:!!Je&&!Mt,[`${at}-label`]:Mt,[`${at}-rtl`]:fn==="rtl"},Pt,xn,Qe);return le.createElement("ul",Object.assign({},_n,{className:_t}),Yt)},we=be(37419);function Ce(mt,at){return mt&&Array.isArray(mt)?mt:(0,we.Z)(at).map(Pt=>{var Nt,Et;return Object.assign({children:(Et=(Nt=Pt==null?void 0:Pt.props)===null||Nt===void 0?void 0:Nt.children)!==null&&Et!==void 0?Et:""},Pt.props)})}var Re=Ce,We=function(mt,at){var Pt={};for(var Nt in mt)Object.prototype.hasOwnProperty.call(mt,Nt)&&at.indexOf(Nt)<0&&(Pt[Nt]=mt[Nt]);if(mt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Et=0,Nt=Object.getOwnPropertySymbols(mt);Et<Nt.length;Et++)at.indexOf(Nt[Et])<0&&Object.prototype.propertyIsEnumerable.call(mt,Nt[Et])&&(Pt[Nt[Et]]=mt[Nt[Et]]);return Pt};const lt=mt=>{const{getPrefixCls:at,direction:Pt,timeline:Nt}=le.useContext(At.E_),{prefixCls:Et,children:Ln,items:xn,className:Nn,style:fn}=mt,Qe=We(mt,["prefixCls","children","items","className","style"]),Ke=at("timeline",Et),Je=(0,wt.Z)(Ke),[_n,Xn,zt]=Ot(Ke,Je),kn=Re(xn,Ln);return _n(le.createElement(ye,Object.assign({},Qe,{className:Lt()(Nt==null?void 0:Nt.className,Nn,zt,Je),style:Object.assign(Object.assign({},Nt==null?void 0:Nt.style),fn),prefixCls:Ke,direction:Pt,items:kn,hashId:Xn})))};lt.Item=ne;var ht=lt,nt=ht},88386:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){le.defineOption("placeholder","",function(xt,ut,pt){var Rt=pt&&pt!=le.Init;if(ut&&!Rt)xt.on("blur",wt),xt.on("change",_e),xt.on("swapDoc",_e),le.on(xt.getInputField(),"compositionupdate",xt.state.placeholderCompose=function(){At(xt)}),_e(xt);else if(!ut&&Rt){xt.off("blur",wt),xt.off("change",_e),xt.off("swapDoc",_e),le.off(xt.getInputField(),"compositionupdate",xt.state.placeholderCompose),Xe(xt);var Ot=xt.getWrapperElement();Ot.className=Ot.className.replace(" CodeMirror-empty","")}ut&&!xt.hasFocus()&&wt(xt)});function Xe(xt){xt.state.placeholder&&(xt.state.placeholder.parentNode.removeChild(xt.state.placeholder),xt.state.placeholder=null)}function Lt(xt){Xe(xt);var ut=xt.state.placeholder=document.createElement("pre");ut.style.cssText="height: 0; overflow: visible",ut.style.direction=xt.getOption("direction"),ut.className="CodeMirror-placeholder CodeMirror-line-like";var pt=xt.getOption("placeholder");typeof pt=="string"&&(pt=document.createTextNode(pt)),ut.appendChild(pt),xt.display.lineSpace.insertBefore(ut,xt.display.lineSpace.firstChild)}function At(xt){setTimeout(function(){var ut=!1,pt=xt.getInputField();pt.nodeName=="TEXTAREA"?ut=!pt.value:xt.lineCount()==1&&(ut=!/[^\u200b]/.test(pt.querySelector(".CodeMirror-line").textContent)),ut?Lt(xt):Xe(xt)},20)}function wt(xt){Ve(xt)&&Lt(xt)}function _e(xt){var ut=xt.getWrapperElement(),pt=Ve(xt);ut.className=ut.className.replace(" CodeMirror-empty","")+(pt?" CodeMirror-empty":""),pt?Lt(xt):Xe(xt)}function Ve(xt){return xt.lineCount()===1&&xt.getLine(0)===""}})},82801:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){var Xe={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Lt=le.Pos;le.defineOption("autoCloseBrackets",!1,function(ne,te,ce){ce&&ce!=le.Init&&(ne.removeKeyMap(wt),ne.state.closeBrackets=null),te&&(_e(At(te,"pairs")),ne.state.closeBrackets=te,ne.addKeyMap(wt))});function At(ne,te){return te=="pairs"&&typeof ne=="string"?ne:typeof ne=="object"&&ne[te]!=null?ne[te]:Xe[te]}var wt={Backspace:ut,Enter:pt};function _e(ne){for(var te=0;te<ne.length;te++){var ce=ne.charAt(te),se="'"+ce+"'";wt[se]||(wt[se]=Ve(ce))}}_e(Xe.pairs+"`");function Ve(ne){return function(te){return Ot(te,ne)}}function xt(ne){var te=ne.state.closeBrackets;if(!te||te.override)return te;var ce=ne.getModeAt(ne.getCursor());return ce.closeBrackets||te}function ut(ne){var te=xt(ne);if(!te||ne.getOption("disableInput"))return le.Pass;for(var ce=At(te,"pairs"),se=ne.listSelections(),ge=0;ge<se.length;ge++){if(!se[ge].empty())return le.Pass;var ye=jt(ne,se[ge].head);if(!ye||ce.indexOf(ye)%2!=0)return le.Pass}for(var ge=se.length-1;ge>=0;ge--){var we=se[ge].head;ne.replaceRange("",Lt(we.line,we.ch-1),Lt(we.line,we.ch+1),"+delete")}}function pt(ne){var te=xt(ne),ce=te&&At(te,"explode");if(!ce||ne.getOption("disableInput"))return le.Pass;for(var se=ne.listSelections(),ge=0;ge<se.length;ge++){if(!se[ge].empty())return le.Pass;var ye=jt(ne,se[ge].head);if(!ye||ce.indexOf(ye)%2!=0)return le.Pass}ne.operation(function(){var we=ne.lineSeparator()||`
`;ne.replaceSelection(we+we,null),ne.execCommand("goCharLeft"),se=ne.listSelections();for(var Ce=0;Ce<se.length;Ce++){var Re=se[Ce].head.line;ne.indentLine(Re,null,!0),ne.indentLine(Re+1,null,!0)}})}function Rt(ne){var te=le.cmpPos(ne.anchor,ne.head)>0;return{anchor:new Lt(ne.anchor.line,ne.anchor.ch+(te?-1:1)),head:new Lt(ne.head.line,ne.head.ch+(te?1:-1))}}function Ot(ne,te){var ce=xt(ne);if(!ce||ne.getOption("disableInput"))return le.Pass;var se=At(ce,"pairs"),ge=se.indexOf(te);if(ge==-1)return le.Pass;for(var ye=At(ce,"closeBefore"),we=At(ce,"triples"),Ce=se.charAt(ge+1)==te,Re=ne.listSelections(),We=ge%2==0,lt,ht=0;ht<Re.length;ht++){var nt=Re[ht],mt=nt.head,at,Pt=ne.getRange(mt,Lt(mt.line,mt.ch+1));if(We&&!nt.empty())at="surround";else if((Ce||!We)&&Pt==te)Ce&&Te(ne,mt)?at="both":we.indexOf(te)>=0&&ne.getRange(mt,Lt(mt.line,mt.ch+3))==te+te+te?at="skipThree":at="skip";else if(Ce&&mt.ch>1&&we.indexOf(te)>=0&&ne.getRange(Lt(mt.line,mt.ch-2),mt)==te+te){if(mt.ch>2&&/\bstring/.test(ne.getTokenTypeAt(Lt(mt.line,mt.ch-2))))return le.Pass;at="addFour"}else if(Ce){var Nt=mt.ch==0?" ":ne.getRange(Lt(mt.line,mt.ch-1),mt);if(!le.isWordChar(Pt)&&Nt!=te&&!le.isWordChar(Nt))at="both";else return le.Pass}else if(We&&(Pt.length===0||/\s/.test(Pt)||ye.indexOf(Pt)>-1))at="both";else return le.Pass;if(!lt)lt=at;else if(lt!=at)return le.Pass}var Et=ge%2?se.charAt(ge-1):te,Ln=ge%2?te:se.charAt(ge+1);ne.operation(function(){if(lt=="skip")ne.execCommand("goCharRight");else if(lt=="skipThree")for(var xn=0;xn<3;xn++)ne.execCommand("goCharRight");else if(lt=="surround"){for(var Nn=ne.getSelections(),xn=0;xn<Nn.length;xn++)Nn[xn]=Et+Nn[xn]+Ln;ne.replaceSelections(Nn,"around"),Nn=ne.listSelections().slice();for(var xn=0;xn<Nn.length;xn++)Nn[xn]=Rt(Nn[xn]);ne.setSelections(Nn)}else lt=="both"?(ne.replaceSelection(Et+Ln,null),ne.triggerElectric(Et+Ln),ne.execCommand("goCharLeft")):lt=="addFour"&&(ne.replaceSelection(Et+Et+Et+Et,"before"),ne.execCommand("goCharRight"))})}function jt(ne,te){var ce=ne.getRange(Lt(te.line,te.ch-1),Lt(te.line,te.ch+1));return ce.length==2?ce:null}function Te(ne,te){var ce=ne.getTokenAt(Lt(te.line,te.ch+1));return/\bstring/.test(ce.type)&&ce.start==te.ch&&(te.ch==0||!/\bstring/.test(ne.getTokenTypeAt(te)))}})},57341:function(Rn,$n,be){(function(le){le(be(4631),be(4786))})(function(le){le.defineOption("autoCloseTags",!1,function(ut,pt,Rt){if(Rt!=le.Init&&Rt&&ut.removeKeyMap("autoCloseTags"),!!pt){var Ot={name:"autoCloseTags"};(typeof pt!="object"||pt.whenClosing!==!1)&&(Ot["'/'"]=function(jt){return _e(jt)}),(typeof pt!="object"||pt.whenOpening!==!1)&&(Ot["'>'"]=function(jt){return At(jt)}),ut.addKeyMap(Ot)}});var Xe=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Lt=["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 At(ut){if(ut.getOption("disableInput"))return le.Pass;for(var pt=ut.listSelections(),Rt=[],Ot=ut.getOption("autoCloseTags"),jt=0;jt<pt.length;jt++){if(!pt[jt].empty())return le.Pass;var Te=pt[jt].head,ne=ut.getTokenAt(Te),te=le.innerMode(ut.getMode(),ne.state),ce=te.state,se=te.mode.xmlCurrentTag&&te.mode.xmlCurrentTag(ce),ge=se&&se.name;if(!ge)return le.Pass;var ye=te.mode.configuration=="html",we=typeof Ot=="object"&&Ot.dontCloseTags||ye&&Xe,Ce=typeof Ot=="object"&&Ot.indentTags||ye&&Lt;ne.end>Te.ch&&(ge=ge.slice(0,ge.length-ne.end+Te.ch));var Re=ge.toLowerCase();if(!ge||ne.type=="string"&&(ne.end!=Te.ch||!/[\"\']/.test(ne.string.charAt(ne.string.length-1))||ne.string.length==1)||ne.type=="tag"&&se.close||ne.string.indexOf("/")==Te.ch-ne.start-1||we&&Ve(we,Re)>-1||xt(ut,te.mode.xmlCurrentContext&&te.mode.xmlCurrentContext(ce)||[],ge,Te,!0))return le.Pass;var We=typeof Ot=="object"&&Ot.emptyTags;if(We&&Ve(We,ge)>-1){Rt[jt]={text:"/>",newPos:le.Pos(Te.line,Te.ch+2)};continue}var lt=Ce&&Ve(Ce,Re)>-1;Rt[jt]={indent:lt,text:">"+(lt?`
`:"")+"</"+ge+">",newPos:lt?le.Pos(Te.line+1,0):le.Pos(Te.line,Te.ch+1)}}for(var ht=typeof Ot=="object"&&Ot.dontIndentOnAutoClose,jt=pt.length-1;jt>=0;jt--){var nt=Rt[jt];ut.replaceRange(nt.text,pt[jt].head,pt[jt].anchor,"+insert");var mt=ut.listSelections().slice(0);mt[jt]={head:nt.newPos,anchor:nt.newPos},ut.setSelections(mt),!ht&&nt.indent&&(ut.indentLine(nt.newPos.line,null,!0),ut.indentLine(nt.newPos.line+1,null,!0))}}function wt(ut,pt){for(var Rt=ut.listSelections(),Ot=[],jt=pt?"/":"</",Te=ut.getOption("autoCloseTags"),ne=typeof Te=="object"&&Te.dontIndentOnSlash,te=0;te<Rt.length;te++){if(!Rt[te].empty())return le.Pass;var ce=Rt[te].head,se=ut.getTokenAt(ce),ge=le.innerMode(ut.getMode(),se.state),ye=ge.state;if(pt&&(se.type=="string"||se.string.charAt(0)!="<"||se.start!=ce.ch-1))return le.Pass;var we,Ce=ge.mode.name!="xml"&&ut.getMode().name=="htmlmixed";if(Ce&&ge.mode.name=="javascript")we=jt+"script";else if(Ce&&ge.mode.name=="css")we=jt+"style";else{var Re=ge.mode.xmlCurrentContext&&ge.mode.xmlCurrentContext(ye);if(!Re||Re.length&&xt(ut,Re,Re[Re.length-1],ce))return le.Pass;we=jt+Re[Re.length-1]}ut.getLine(ce.line).charAt(se.end)!=">"&&(we+=">"),Ot[te]=we}if(ut.replaceSelections(Ot),Rt=ut.listSelections(),!ne)for(var te=0;te<Rt.length;te++)(te==Rt.length-1||Rt[te].head.line<Rt[te+1].head.line)&&ut.indentLine(Rt[te].head.line)}function _e(ut){return ut.getOption("disableInput")?le.Pass:wt(ut,!0)}le.commands.closeTag=function(ut){return wt(ut)};function Ve(ut,pt){if(ut.indexOf)return ut.indexOf(pt);for(var Rt=0,Ot=ut.length;Rt<Ot;++Rt)if(ut[Rt]==pt)return Rt;return-1}function xt(ut,pt,Rt,Ot,jt){if(!le.scanForClosingTag)return!1;var Te=Math.min(ut.lastLine()+1,Ot.line+500),ne=le.scanForClosingTag(ut,Ot,null,Te);if(!ne||ne.tag!=Rt)return!1;for(var te=jt?1:0,ce=pt.length-1;ce>=0&&pt[ce]==Rt;ce--)++te;Ot=ne.to;for(var ce=1;ce<te;ce++){var se=le.scanForClosingTag(ut,Ot,null,Te);if(!se||se.tag!=Rt)return!1;Ot=se.to}return!0}})},4786:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){"use strict";var Xe=le.Pos;function Lt(ce,se){return ce.line-se.line||ce.ch-se.ch}var At="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",wt=At+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",_e=new RegExp("<(/?)(["+At+"]["+wt+"]*)","g");function Ve(ce,se,ge,ye){this.line=se,this.ch=ge,this.cm=ce,this.text=ce.getLine(se),this.min=ye?Math.max(ye.from,ce.firstLine()):ce.firstLine(),this.max=ye?Math.min(ye.to-1,ce.lastLine()):ce.lastLine()}function xt(ce,se){var ge=ce.cm.getTokenTypeAt(Xe(ce.line,se));return ge&&/\btag\b/.test(ge)}function ut(ce){if(!(ce.line>=ce.max))return ce.ch=0,ce.text=ce.cm.getLine(++ce.line),!0}function pt(ce){if(!(ce.line<=ce.min))return ce.text=ce.cm.getLine(--ce.line),ce.ch=ce.text.length,!0}function Rt(ce){for(;;){var se=ce.text.indexOf(">",ce.ch);if(se==-1){if(ut(ce))continue;return}if(!xt(ce,se+1)){ce.ch=se+1;continue}var ge=ce.text.lastIndexOf("/",se),ye=ge>-1&&!/\S/.test(ce.text.slice(ge+1,se));return ce.ch=se+1,ye?"selfClose":"regular"}}function Ot(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf("<",ce.ch-1):-1;if(se==-1){if(pt(ce))continue;return}if(!xt(ce,se+1)){ce.ch=se;continue}_e.lastIndex=se,ce.ch=se;var ge=_e.exec(ce.text);if(ge&&ge.index==se)return ge}}function jt(ce){for(;;){_e.lastIndex=ce.ch;var se=_e.exec(ce.text);if(!se){if(ut(ce))continue;return}if(!xt(ce,se.index+1)){ce.ch=se.index+1;continue}return ce.ch=se.index+se[0].length,se}}function Te(ce){for(;;){var se=ce.ch?ce.text.lastIndexOf(">",ce.ch-1):-1;if(se==-1){if(pt(ce))continue;return}if(!xt(ce,se+1)){ce.ch=se;continue}var ge=ce.text.lastIndexOf("/",se),ye=ge>-1&&!/\S/.test(ce.text.slice(ge+1,se));return ce.ch=se+1,ye?"selfClose":"regular"}}function ne(ce,se){for(var ge=[];;){var ye=jt(ce),we,Ce=ce.line,Re=ce.ch-(ye?ye[0].length:0);if(!ye||!(we=Rt(ce)))return;if(we!="selfClose")if(ye[1]){for(var We=ge.length-1;We>=0;--We)if(ge[We]==ye[2]){ge.length=We;break}if(We<0&&(!se||se==ye[2]))return{tag:ye[2],from:Xe(Ce,Re),to:Xe(ce.line,ce.ch)}}else ge.push(ye[2])}}function te(ce,se){for(var ge=[];;){var ye=Te(ce);if(!ye)return;if(ye=="selfClose"){Ot(ce);continue}var we=ce.line,Ce=ce.ch,Re=Ot(ce);if(!Re)return;if(Re[1])ge.push(Re[2]);else{for(var We=ge.length-1;We>=0;--We)if(ge[We]==Re[2]){ge.length=We;break}if(We<0&&(!se||se==Re[2]))return{tag:Re[2],from:Xe(ce.line,ce.ch),to:Xe(we,Ce)}}}}le.registerHelper("fold","xml",function(ce,se){for(var ge=new Ve(ce,se.line,0);;){var ye=jt(ge);if(!ye||ge.line!=se.line)return;var we=Rt(ge);if(!we)return;if(!ye[1]&&we!="selfClose"){var Ce=Xe(ge.line,ge.ch),Re=ne(ge,ye[2]);return Re&&Lt(Re.from,Ce)>0?{from:Ce,to:Re.from}:null}}}),le.findMatchingTag=function(ce,se,ge){var ye=new Ve(ce,se.line,se.ch,ge);if(!(ye.text.indexOf(">")==-1&&ye.text.indexOf("<")==-1)){var we=Rt(ye),Ce=we&&Xe(ye.line,ye.ch),Re=we&&Ot(ye);if(!(!we||!Re||Lt(ye,se)>0)){var We={from:Xe(ye.line,ye.ch),to:Ce,tag:Re[2]};return we=="selfClose"?{open:We,close:null,at:"open"}:Re[1]?{open:te(ye,Re[2]),close:We,at:"close"}:(ye=new Ve(ce,Ce.line,Ce.ch,ge),{open:We,close:ne(ye,Re[2]),at:"open"})}}},le.findEnclosingTag=function(ce,se,ge,ye){for(var we=new Ve(ce,se.line,se.ch,ge);;){var Ce=te(we,ye);if(!Ce)break;var Re=new Ve(ce,se.line,se.ch,ge),We=ne(Re,Ce.tag);if(We)return{open:Ce,close:We}}},le.scanForClosingTag=function(ce,se,ge,ye){var we=new Ve(ce,se.line,se.ch,ye?{from:0,to:ye}:null);return ne(we,ge)}})},4631:function(Rn){(function($n,be){Rn.exports=be()})(this,function(){"use strict";var $n=navigator.userAgent,be=navigator.platform,le=/gecko\/\d/i.test($n),Xe=/MSIE \d/.test($n),Lt=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec($n),At=/Edge\/(\d+)/.exec($n),wt=Xe||Lt||At,_e=wt&&(Xe?document.documentMode||6:+(At||Lt)[1]),Ve=!At&&/WebKit\//.test($n),xt=Ve&&/Qt\/\d+\.\d+/.test($n),ut=!At&&/Chrome\//.test($n),pt=/Opera\//.test($n),Rt=/Apple Computer/.test(navigator.vendor),Ot=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test($n),jt=/PhantomJS/.test($n),Te=!At&&/AppleWebKit/.test($n)&&/Mobile\/\w+/.test($n),ne=/Android/.test($n),te=Te||ne||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test($n),ce=Te||/Mac/.test(be),se=/\bCrOS\b/.test($n),ge=/win/i.test(be),ye=pt&&$n.match(/Version\/(\d*\.\d*)/);ye&&(ye=Number(ye[1])),ye&&ye>=15&&(pt=!1,Ve=!0);var we=ce&&(xt||pt&&(ye==null||ye<12.11)),Ce=le||wt&&_e>=9;function Re(ie){return new RegExp("(^|\\s)"+ie+"(?:$|\\s)\\s*")}var We=function(ie,ae){var fe=ie.className,he=Re(ae).exec(fe);if(he){var me=fe.slice(he.index+he[0].length);ie.className=fe.slice(0,he.index)+(me?he[1]+me:"")}};function lt(ie){for(var ae=ie.childNodes.length;ae>0;--ae)ie.removeChild(ie.firstChild);return ie}function ht(ie,ae){return lt(ie).appendChild(ae)}function nt(ie,ae,fe,he){var me=document.createElement(ie);if(fe&&(me.className=fe),he&&(me.style.cssText=he),typeof ae=="string")me.appendChild(document.createTextNode(ae));else if(ae)for(var Ne=0;Ne<ae.length;++Ne)me.appendChild(ae[Ne]);return me}function mt(ie,ae,fe,he){var me=nt(ie,ae,fe,he);return me.setAttribute("role","presentation"),me}var at;document.createRange?at=function(ie,ae,fe,he){var me=document.createRange();return me.setEnd(he||ie,fe),me.setStart(ie,ae),me}:at=function(ie,ae,fe){var he=document.body.createTextRange();try{he.moveToElementText(ie.parentNode)}catch(me){return he}return he.collapse(!0),he.moveEnd("character",fe),he.moveStart("character",ae),he};function Pt(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 Nt(){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 Et(ie,ae){var fe=ie.className;Re(ae).test(fe)||(ie.className+=(fe?" ":"")+ae)}function Ln(ie,ae){for(var fe=ie.split(" "),he=0;he<fe.length;he++)fe[he]&&!Re(fe[he]).test(ae)&&(ae+=" "+fe[he]);return ae}var xn=function(ie){ie.select()};Te?xn=function(ie){ie.selectionStart=0,ie.selectionEnd=ie.value.length}:wt&&(xn=function(ie){try{ie.select()}catch(ae){}});function Nn(ie){var ae=Array.prototype.slice.call(arguments,1);return function(){return ie.apply(null,ae)}}function fn(ie,ae,fe){ae||(ae={});for(var he in ie)ie.hasOwnProperty(he)&&(fe!==!1||!ae.hasOwnProperty(he))&&(ae[he]=ie[he]);return ae}function Qe(ie,ae,fe,he,me){ae==null&&(ae=ie.search(/[^\s\u00a0]/),ae==-1&&(ae=ie.length));for(var Ne=he||0,Ge=me||0;;){var et=ie.indexOf(" ",Ne);if(et<0||et>=ae)return Ge+(ae-Ne);Ge+=et-Ne,Ge+=fe-Ge%fe,Ne=et+1}}var Ke=function(){this.id=null,this.f=null,this.time=0,this.handler=Nn(this.onTimeout,this)};Ke.prototype.onTimeout=function(ie){ie.id=0,ie.time<=+new Date?ie.f():setTimeout(ie.handler,ie.time-+new Date)},Ke.prototype.set=function(ie,ae){this.f=ae;var fe=+new Date+ie;(!this.id||fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,ie),this.time=fe)};function Je(ie,ae){for(var fe=0;fe<ie.length;++fe)if(ie[fe]==ae)return fe;return-1}var _n=50,Xn={toString:function(){return"CodeMirror.Pass"}},zt={scroll:!1},kn={origin:"*mouse"},bn={origin:"+move"};function oi(ie,ae,fe){for(var he=0,me=0;;){var Ne=ie.indexOf(" ",he);Ne==-1&&(Ne=ie.length);var Ge=Ne-he;if(Ne==ie.length||me+Ge>=ae)return he+Math.min(Ge,ae-me);if(me+=Ne-he,me+=fe-me%fe,he=Ne+1,me>=ae)return he}}var Yt=[""];function Mt(ie){for(;Yt.length<=ie;)Yt.push(_t(Yt)+" ");return Yt[ie]}function _t(ie){return ie[ie.length-1]}function mn(ie,ae){for(var fe=[],he=0;he<ie.length;he++)fe[he]=ae(ie[he],he);return fe}function rn(ie,ae,fe){for(var he=0,me=fe(ae);he<ie.length&&fe(ie[he])<=me;)he++;ie.splice(he,0,ae)}function He(){}function Me(ie,ae){var fe;return Object.create?fe=Object.create(ie):(He.prototype=ie,fe=new He),ae&&fn(ae,fe),fe}var Fe=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Oe(ie){return/\w/.test(ie)||ie>"\x80"&&(ie.toUpperCase()!=ie.toLowerCase()||Fe.test(ie))}function Ue(ie,ae){return ae?ae.source.indexOf("\\w")>-1&&Oe(ie)?!0:ae.test(ie):Oe(ie)}function Be(ie){for(var ae in ie)if(ie.hasOwnProperty(ae)&&ie[ae])return!1;return!0}var ot=/[\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 Cn(ie){return ie.charCodeAt(0)>=768&&ot.test(ie)}function ci(ie,ae,fe){for(;(fe<0?ae>0:ae<ie.length)&&Cn(ie.charAt(ae));)ae+=fe;return ae}function si(ie,ae,fe){for(var he=ae>fe?-1:1;;){if(ae==fe)return ae;var me=(ae+fe)/2,Ne=he<0?Math.ceil(me):Math.floor(me);if(Ne==ae)return ie(Ne)?ae:fe;ie(Ne)?fe=Ne:ae=Ne+he}}function pn(ie,ae,fe,he){if(!ie)return he(ae,fe,"ltr",0);for(var me=!1,Ne=0;Ne<ie.length;++Ne){var Ge=ie[Ne];(Ge.from<fe&&Ge.to>ae||ae==fe&&Ge.to==ae)&&(he(Math.max(Ge.from,ae),Math.min(Ge.to,fe),Ge.level==1?"rtl":"ltr",Ne),me=!0)}me||he(ae,fe,"ltr")}var qn=null;function en(ie,ae,fe){var he;qn=null;for(var me=0;me<ie.length;++me){var Ne=ie[me];if(Ne.from<ae&&Ne.to>ae)return me;Ne.to==ae&&(Ne.from!=Ne.to&&fe=="before"?he=me:qn=me),Ne.from==ae&&(Ne.from!=Ne.to&&fe!="before"?he=me:qn=me)}return he!=null?he:qn}var wi=function(){var ie="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",ae="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function fe(Ct){return Ct<=247?ie.charAt(Ct):1424<=Ct&&Ct<=1524?"R":1536<=Ct&&Ct<=1785?ae.charAt(Ct-1536):1774<=Ct&&Ct<=2220?"r":8192<=Ct&&Ct<=8203?"w":Ct==8204?"b":"L"}var he=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,me=/[stwN]/,Ne=/[LRr]/,Ge=/[Lb1n]/,et=/[1n]/;function $e(Ct,sn,Dt){this.level=Ct,this.from=sn,this.to=Dt}return function(Ct,sn){var Dt=sn=="ltr"?"L":"R";if(Ct.length==0||sn=="ltr"&&!he.test(Ct))return!1;for(var Hn=Ct.length,Tn=[],ir=0;ir<Hn;++ir)Tn.push(fe(Ct.charCodeAt(ir)));for(var dr=0,Mr=Dt;dr<Hn;++dr){var ao=Tn[dr];ao=="m"?Tn[dr]=Mr:Mr=ao}for(var qo=0,Mo=Dt;qo<Hn;++qo){var ga=Tn[qo];ga=="1"&&Mo=="r"?Tn[qo]="n":Ne.test(ga)&&(Mo=ga,ga=="r"&&(Tn[qo]="R"))}for(var is=1,Ao=Tn[0];is<Hn-1;++is){var Rs=Tn[is];Rs=="+"&&Ao=="1"&&Tn[is+1]=="1"?Tn[is]="1":Rs==","&&Ao==Tn[is+1]&&(Ao=="1"||Ao=="n")&&(Tn[is]=Ao),Ao=Rs}for(var Ul=0;Ul<Hn;++Ul){var Xu=Tn[Ul];if(Xu==",")Tn[Ul]="N";else if(Xu=="%"){var su=void 0;for(su=Ul+1;su<Hn&&Tn[su]=="%";++su);for(var Hc=Ul&&Tn[Ul-1]=="!"||su<Hn&&Tn[su]=="1"?"1":"N",fc=Ul;fc<su;++fc)Tn[fc]=Hc;Ul=su-1}}for(var Ru=0,Wc=Dt;Ru<Hn;++Ru){var rc=Tn[Ru];Wc=="L"&&rc=="1"?Tn[Ru]="L":Ne.test(rc)&&(Wc=rc)}for(var ju=0;ju<Hn;++ju)if(me.test(Tn[ju])){var cl=void 0;for(cl=ju+1;cl<Hn&&me.test(Tn[cl]);++cl);for(var lu=(ju?Tn[ju-1]:Dt)=="L",ec=(cl<Hn?Tn[cl]:Dt)=="L",oc=lu==ec?lu?"L":"R":Dt,Cd=ju;Cd<cl;++Cd)Tn[Cd]=oc;ju=cl-1}for(var uu=[],sd,ve=0;ve<Hn;)if(Ge.test(Tn[ve])){var xe=ve;for(++ve;ve<Hn&&Ge.test(Tn[ve]);++ve);uu.push(new $e(0,xe,ve))}else{var Ae=ve,je=uu.length,rt=sn=="rtl"?1:0;for(++ve;ve<Hn&&Tn[ve]!="L";++ve);for(var it=Ae;it<ve;)if(et.test(Tn[it])){Ae<it&&(uu.splice(je,0,new $e(1,Ae,it)),je+=rt);var vt=it;for(++it;it<ve&&et.test(Tn[it]);++it);uu.splice(je,0,new $e(2,vt,it)),je+=rt,Ae=it}else++it;Ae<ve&&uu.splice(je,0,new $e(1,Ae,ve))}return sn=="ltr"&&(uu[0].level==1&&(sd=Ct.match(/^\s+/))&&(uu[0].from=sd[0].length,uu.unshift(new $e(0,0,sd[0].length))),_t(uu).level==1&&(sd=Ct.match(/\s+$/))&&(_t(uu).to-=sd[0].length,uu.push(new $e(0,Hn-sd[0].length,Hn)))),sn=="rtl"?uu.reverse():uu}}();function Si(ie,ae){var fe=ie.order;return fe==null&&(fe=ie.order=wi(ie.text,ae)),fe}var Di=[],Ti=function(ie,ae,fe){if(ie.addEventListener)ie.addEventListener(ae,fe,!1);else if(ie.attachEvent)ie.attachEvent("on"+ae,fe);else{var he=ie._handlers||(ie._handlers={});he[ae]=(he[ae]||Di).concat(fe)}};function ro(ie,ae){return ie._handlers&&ie._handlers[ae]||Di}function Zr(ie,ae,fe){if(ie.removeEventListener)ie.removeEventListener(ae,fe,!1);else if(ie.detachEvent)ie.detachEvent("on"+ae,fe);else{var he=ie._handlers,me=he&&he[ae];if(me){var Ne=Je(me,fe);Ne>-1&&(he[ae]=me.slice(0,Ne).concat(me.slice(Ne+1)))}}}function Fi(ie,ae){var fe=ro(ie,ae);if(fe.length)for(var he=Array.prototype.slice.call(arguments,2),me=0;me<fe.length;++me)fe[me].apply(null,he)}function mi(ie,ae,fe){return typeof ae=="string"&&(ae={type:ae,preventDefault:function(){this.defaultPrevented=!0}}),Fi(ie,fe||ae.type,ie,ae),hr(ae)||ae.codemirrorIgnore}function Co(ie){var ae=ie._handlers&&ie._handlers.cursorActivity;if(ae)for(var fe=ie.curOp.cursorActivityHandlers||(ie.curOp.cursorActivityHandlers=[]),he=0;he<ae.length;++he)Je(fe,ae[he])==-1&&fe.push(ae[he])}function jn(ie,ae){return ro(ie,ae).length>0}function yn(ie){ie.prototype.on=function(ae,fe){Ti(this,ae,fe)},ie.prototype.off=function(ae,fe){Zr(this,ae,fe)}}function Jr(ie){ie.preventDefault?ie.preventDefault():ie.returnValue=!1}function lo(ie){ie.stopPropagation?ie.stopPropagation():ie.cancelBubble=!0}function hr(ie){return ie.defaultPrevented!=null?ie.defaultPrevented:ie.returnValue==!1}function Nr(ie){Jr(ie),lo(ie)}function Xo(ie){return ie.target||ie.srcElement}function ji(ie){var ae=ie.which;return ae==null&&(ie.button&1?ae=1:ie.button&2?ae=3:ie.button&4&&(ae=2)),ce&&ie.ctrlKey&&ae==1&&(ae=3),ae}var Mi=function(){if(wt&&_e<9)return!1;var ie=nt("div");return"draggable"in ie||"dragDrop"in ie}(),Oi;function vr(ie){if(Oi==null){var ae=nt("span","\u200B");ht(ie,nt("span",[ae,document.createTextNode("x")])),ie.firstChild.offsetHeight!=0&&(Oi=ae.offsetWidth<=1&&ae.offsetHeight>2&&!(wt&&_e<8))}var fe=Oi?nt("span","\u200B"):nt("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return fe.setAttribute("cm-text",""),fe}var Dr;function Cr(ie){if(Dr!=null)return Dr;var ae=ht(ie,document.createTextNode("A\u062EA")),fe=at(ae,0,1).getBoundingClientRect(),he=at(ae,1,2).getBoundingClientRect();return lt(ie),!fe||fe.left==fe.right?!1:Dr=he.right-fe.right<3}var En=`
b`.split(/\n/).length!=3?function(ie){for(var ae=0,fe=[],he=ie.length;ae<=he;){var me=ie.indexOf(`
`,ae);me==-1&&(me=ie.length);var Ne=ie.slice(ae,ie.charAt(me-1)=="\r"?me-1:me),Ge=Ne.indexOf("\r");Ge!=-1?(fe.push(Ne.slice(0,Ge)),ae+=Ge+1):(fe.push(Ne),ae=me+1)}return fe}:function(ie){return ie.split(/\r\n?|\n/)},Ee=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(fe){}return!ae||ae.parentElement()!=ie?!1:ae.compareEndPoints("StartToEnd",ae)!=0},on=function(){var ie=nt("div");return"oncopy"in ie?!0:(ie.setAttribute("oncopy","return;"),typeof ie.oncopy=="function")}(),gn=null;function Mn(ie){if(gn!=null)return gn;var ae=ht(ie,nt("span","x")),fe=ae.getBoundingClientRect(),he=at(ae,0,1).getBoundingClientRect();return gn=Math.abs(fe.left-he.left)>1}var In={},ii={};function Ci(ie,ae){arguments.length>2&&(ae.dependencies=Array.prototype.slice.call(arguments,2)),In[ie]=ae}function Ji(ie,ae){ii[ie]=ae}function Vt(ie){if(typeof ie=="string"&&ii.hasOwnProperty(ie))ie=ii[ie];else if(ie&&typeof ie.name=="string"&&ii.hasOwnProperty(ie.name)){var ae=ii[ie.name];typeof ae=="string"&&(ae={name:ae}),ie=Me(ae,ie),ie.name=ae.name}else{if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(ie))return Vt("application/xml");if(typeof ie=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(ie))return Vt("application/json")}return typeof ie=="string"?{name:ie}:ie||{name:"null"}}function Zt(ie,ae){ae=Vt(ae);var fe=In[ae.name];if(!fe)return Zt(ie,"text/plain");var he=fe(ie,ae);if(It.hasOwnProperty(ae.name)){var me=It[ae.name];for(var Ne in me)me.hasOwnProperty(Ne)&&(he.hasOwnProperty(Ne)&&(he["_"+Ne]=he[Ne]),he[Ne]=me[Ne])}if(he.name=ae.name,ae.helperType&&(he.helperType=ae.helperType),ae.modeProps)for(var Ge in ae.modeProps)he[Ge]=ae.modeProps[Ge];return he}var It={};function dn(ie,ae){var fe=It.hasOwnProperty(ie)?It[ie]:It[ie]={};fn(ae,fe)}function Ri(ie,ae){if(ae===!0)return ae;if(ie.copyState)return ie.copyState(ae);var fe={};for(var he in ae){var me=ae[he];me instanceof Array&&(me=me.concat([])),fe[he]=me}return fe}function hi(ie,ae){for(var fe;ie.innerMode&&(fe=ie.innerMode(ae),!(!fe||fe.mode==ie));)ae=fe.state,ie=fe.mode;return fe||{mode:ie,state:ae}}function ri(ie,ae,fe){return ie.startState?ie.startState(ae,fe):!0}var Kt=function(ie,ae,fe){this.pos=this.start=0,this.string=ie,this.tabSize=ae||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=fe};Kt.prototype.eol=function(){return this.pos>=this.string.length},Kt.prototype.sol=function(){return this.pos==this.lineStart},Kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Kt.prototype.eat=function(ie){var ae=this.string.charAt(this.pos),fe;if(typeof ie=="string"?fe=ae==ie:fe=ae&&(ie.test?ie.test(ae):ie(ae)),fe)return++this.pos,ae},Kt.prototype.eatWhile=function(ie){for(var ae=this.pos;this.eat(ie););return this.pos>ae},Kt.prototype.eatSpace=function(){for(var ie=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>ie},Kt.prototype.skipToEnd=function(){this.pos=this.string.length},Kt.prototype.skipTo=function(ie){var ae=this.string.indexOf(ie,this.pos);if(ae>-1)return this.pos=ae,!0},Kt.prototype.backUp=function(ie){this.pos-=ie},Kt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Qe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},Kt.prototype.indentation=function(){return Qe(this.string,null,this.tabSize)-(this.lineStart?Qe(this.string,this.lineStart,this.tabSize):0)},Kt.prototype.match=function(ie,ae,fe){if(typeof ie=="string"){var he=function(Ge){return fe?Ge.toLowerCase():Ge},me=this.string.substr(this.pos,ie.length);if(he(me)==he(ie))return ae!==!1&&(this.pos+=ie.length),!0}else{var Ne=this.string.slice(this.pos).match(ie);return Ne&&Ne.index>0?null:(Ne&&ae!==!1&&(this.pos+=Ne[0].length),Ne)}},Kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Kt.prototype.hideFirstChars=function(ie,ae){this.lineStart+=ie;try{return ae()}finally{this.lineStart-=ie}},Kt.prototype.lookAhead=function(ie){var ae=this.lineOracle;return ae&&ae.lookAhead(ie)},Kt.prototype.baseToken=function(){var ie=this.lineOracle;return ie&&ie.baseToken(this.pos)};function wn(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 fe=ie;!fe.lines;)for(var he=0;;++he){var me=fe.children[he],Ne=me.chunkSize();if(ae<Ne){fe=me;break}ae-=Ne}return fe.lines[ae]}function Ki(ie,ae,fe){var he=[],me=ae.line;return ie.iter(ae.line,fe.line+1,function(Ne){var Ge=Ne.text;me==fe.line&&(Ge=Ge.slice(0,fe.ch)),me==ae.line&&(Ge=Ge.slice(ae.ch)),he.push(Ge),++me}),he}function wr(ie,ae,fe){var he=[];return ie.iter(ae,fe,function(me){he.push(me.text)}),he}function Kn(ie,ae){var fe=ae-ie.height;if(fe)for(var he=ie;he;he=he.parent)he.height+=fe}function Wt(ie){if(ie.parent==null)return null;for(var ae=ie.parent,fe=Je(ae.lines,ie),he=ae.parent;he;ae=he,he=he.parent)for(var me=0;he.children[me]!=ae;++me)fe+=he.children[me].chunkSize();return fe+ae.first}function Yi(ie,ae){var fe=ie.first;e:do{for(var he=0;he<ie.children.length;++he){var me=ie.children[he],Ne=me.height;if(ae<Ne){ie=me;continue e}ae-=Ne,fe+=me.chunkSize()}return fe}while(!ie.lines);for(var Ge=0;Ge<ie.lines.length;++Ge){var et=ie.lines[Ge],$e=et.height;if(ae<$e)break;ae-=$e}return fe+Ge}function pr(ie,ae){return ae>=ie.first&&ae<ie.first+ie.size}function Ro(ie,ae){return String(ie.lineNumberFormatter(ae+ie.firstLineNumber))}function Zn(ie,ae,fe){if(fe===void 0&&(fe=null),!(this instanceof Zn))return new Zn(ie,ae,fe);this.line=ie,this.ch=ae,this.sticky=fe}function Ni(ie,ae){return ie.line-ae.line||ie.ch-ae.ch}function Pi(ie,ae){return ie.sticky==ae.sticky&&Ni(ie,ae)==0}function xs(ie){return Zn(ie.line,ie.ch)}function qa(ie,ae){return Ni(ie,ae)<0?ae:ie}function Ar(ie,ae){return Ni(ie,ae)<0?ie:ae}function br(ie,ae){return Math.max(ie.first,Math.min(ae,ie.first+ie.size-1))}function Rr(ie,ae){if(ae.line<ie.first)return Zn(ie.first,0);var fe=ie.first+ie.size-1;return ae.line>fe?Zn(fe,wn(ie,fe).text.length):xa(ae,wn(ie,ae.line).text.length)}function xa(ie,ae){var fe=ie.ch;return fe==null||fe>ae?Zn(ie.line,ae):fe<0?Zn(ie.line,0):ie}function Ka(ie,ae){for(var fe=[],he=0;he<ae.length;he++)fe[he]=Rr(ie,ae[he]);return fe}var _i=function(ie,ae){this.state=ie,this.lookAhead=ae},yo=function(ie,ae,fe,he){this.state=ae,this.doc=ie,this.line=fe,this.maxLookAhead=he||0,this.baseTokens=null,this.baseTokenPos=1};yo.prototype.lookAhead=function(ie){var ae=this.doc.getLine(this.line+ie);return ae!=null&&ie>this.maxLookAhead&&(this.maxLookAhead=ie),ae},yo.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}},yo.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},yo.fromSaved=function(ie,ae,fe){return ae instanceof _i?new yo(ie,Ri(ie.mode,ae.state),fe,ae.lookAhead):new yo(ie,Ri(ie.mode,ae),fe)},yo.prototype.save=function(ie){var ae=ie!==!1?Ri(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new _i(ae,this.maxLookAhead):ae};function zl(ie,ae,fe,he){var me=[ie.state.modeGen],Ne={};Za(ie,ae.text,ie.doc.mode,fe,function(Ct,sn){return me.push(Ct,sn)},Ne,he);for(var Ge=fe.state,et=function(Ct){fe.baseTokens=me;var sn=ie.state.overlays[Ct],Dt=1,Hn=0;fe.state=!0,Za(ie,ae.text,sn.mode,fe,function(Tn,ir){for(var dr=Dt;Hn<Tn;){var Mr=me[Dt];Mr>Tn&&me.splice(Dt,1,Tn,me[Dt+1],Mr),Dt+=2,Hn=Math.min(Tn,Mr)}if(ir)if(sn.opaque)me.splice(dr,Dt-dr,Tn,"overlay "+ir),Dt=dr+2;else for(;dr<Dt;dr+=2){var ao=me[dr+1];me[dr+1]=(ao?ao+" ":"")+"overlay "+ir}},Ne),fe.state=Ge,fe.baseTokens=null,fe.baseTokenPos=1},$e=0;$e<ie.state.overlays.length;++$e)et($e);return{styles:me,classes:Ne.bgClass||Ne.textClass?Ne:null}}function ms(ie,ae,fe){if(!ae.styles||ae.styles[0]!=ie.state.modeGen){var he=as(ie,Wt(ae)),me=ae.text.length>ie.options.maxHighlightLength&&Ri(ie.doc.mode,he.state),Ne=zl(ie,ae,he);me&&(he.state=me),ae.stateAfter=he.save(!me),ae.styles=Ne.styles,Ne.classes?ae.styleClasses=Ne.classes:ae.styleClasses&&(ae.styleClasses=null),fe===ie.doc.highlightFrontier&&(ie.doc.modeFrontier=Math.max(ie.doc.modeFrontier,++ie.doc.highlightFrontier))}return ae.styles}function as(ie,ae,fe){var he=ie.doc,me=ie.display;if(!he.mode.startState)return new yo(he,!0,ae);var Ne=wa(ie,ae,fe),Ge=Ne>he.first&&wn(he,Ne-1).stateAfter,et=Ge?yo.fromSaved(he,Ge,Ne):new yo(he,ri(he.mode),Ne);return he.iter(Ne,ae,function($e){Qt(ie,$e.text,et);var Ct=et.line;$e.stateAfter=Ct==ae-1||Ct%5==0||Ct>=me.viewFrom&&Ct<me.viewTo?et.save():null,et.nextLine()}),fe&&(he.modeFrontier=et.line),et}function Qt(ie,ae,fe,he){var me=ie.doc.mode,Ne=new Kt(ae,ie.options.tabSize,fe);for(Ne.start=Ne.pos=he||0,ae==""&&Br(me,fe.state);!Ne.eol();)ba(me,Ne,fe.state),Ne.start=Ne.pos}function Br(ie,ae){if(ie.blankLine)return ie.blankLine(ae);if(ie.innerMode){var fe=hi(ie,ae);if(fe.mode.blankLine)return fe.mode.blankLine(fe.state)}}function ba(ie,ae,fe,he){for(var me=0;me<10;me++){he&&(he[0]=hi(ie,fe).mode);var Ne=ie.token(ae,fe);if(ae.pos>ae.start)return Ne}throw new Error("Mode "+ie.name+" failed to advance stream.")}var to=function(ie,ae,fe){this.start=ie.start,this.end=ie.pos,this.string=ie.current(),this.type=ae||null,this.state=fe};function vs(ie,ae,fe,he){var me=ie.doc,Ne=me.mode,Ge;ae=Rr(me,ae);var et=wn(me,ae.line),$e=as(ie,ae.line,fe),Ct=new Kt(et.text,ie.options.tabSize,$e),sn;for(he&&(sn=[]);(he||Ct.pos<ae.ch)&&!Ct.eol();)Ct.start=Ct.pos,Ge=ba(Ne,Ct,$e.state),he&&sn.push(new to(Ct,Ge,Ri(me.mode,$e.state)));return he?sn:new to(Ct,Ge,$e.state)}function La(ie,ae){if(ie)for(;;){var fe=ie.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fe)break;ie=ie.slice(0,fe.index)+ie.slice(fe.index+fe[0].length);var he=fe[1]?"bgClass":"textClass";ae[he]==null?ae[he]=fe[2]:new RegExp("(?:^|\\s)"+fe[2]+"(?:$|\\s)").test(ae[he])||(ae[he]+=" "+fe[2])}return ie}function Za(ie,ae,fe,he,me,Ne,Ge){var et=fe.flattenSpans;et==null&&(et=ie.options.flattenSpans);var $e=0,Ct=null,sn=new Kt(ae,ie.options.tabSize,he),Dt,Hn=ie.options.addModeClass&&[null];for(ae==""&&La(Br(fe,he.state),Ne);!sn.eol();){if(sn.pos>ie.options.maxHighlightLength?(et=!1,Ge&&Qt(ie,ae,he,sn.pos),sn.pos=ae.length,Dt=null):Dt=La(ba(fe,sn,he.state,Hn),Ne),Hn){var Tn=Hn[0].name;Tn&&(Dt="m-"+(Dt?Tn+" "+Dt:Tn))}if(!et||Ct!=Dt){for(;$e<sn.start;)$e=Math.min(sn.start,$e+5e3),me($e,Ct);Ct=Dt}sn.start=sn.pos}for(;$e<sn.pos;){var ir=Math.min(sn.pos,$e+5e3);me(ir,Ct),$e=ir}}function wa(ie,ae,fe){for(var he,me,Ne=ie.doc,Ge=fe?-1:ae-(ie.doc.mode.innerMode?1e3:100),et=ae;et>Ge;--et){if(et<=Ne.first)return Ne.first;var $e=wn(Ne,et-1),Ct=$e.stateAfter;if(Ct&&(!fe||et+(Ct instanceof _i?Ct.lookAhead:0)<=Ne.modeFrontier))return et;var sn=Qe($e.text,null,ie.options.tabSize);(me==null||he>sn)&&(me=et-1,he=sn)}return me}function ca(ie,ae){if(ie.modeFrontier=Math.min(ie.modeFrontier,ae),!(ie.highlightFrontier<ae-10)){for(var fe=ie.first,he=ae-1;he>fe;he--){var me=wn(ie,he).stateAfter;if(me&&(!(me instanceof _i)||he+me.lookAhead<ae)){fe=he+1;break}}ie.highlightFrontier=Math.min(ie.highlightFrontier,fe)}}var Ya=!1,Un=!1;function js(){Ya=!0}function zn(){Un=!0}function _a(ie,ae,fe){this.marker=ie,this.from=ae,this.to=fe}function Sl(ie,ae){if(ie)for(var fe=0;fe<ie.length;++fe){var he=ie[fe];if(he.marker==ae)return he}}function No(ie,ae){for(var fe,he=0;he<ie.length;++he)ie[he]!=ae&&(fe||(fe=[])).push(ie[he]);return fe}function kl(ie,ae){ie.markedSpans=ie.markedSpans?ie.markedSpans.concat([ae]):[ae],ae.marker.attachLine(ie)}function bs(ie,ae,fe){var he;if(ie)for(var me=0;me<ie.length;++me){var Ne=ie[me],Ge=Ne.marker,et=Ne.from==null||(Ge.inclusiveLeft?Ne.from<=ae:Ne.from<ae);if(et||Ne.from==ae&&Ge.type=="bookmark"&&(!fe||!Ne.marker.insertLeft)){var $e=Ne.to==null||(Ge.inclusiveRight?Ne.to>=ae:Ne.to>ae);(he||(he=[])).push(new _a(Ge,Ne.from,$e?null:Ne.to))}}return he}function ja(ie,ae,fe){var he;if(ie)for(var me=0;me<ie.length;++me){var Ne=ie[me],Ge=Ne.marker,et=Ne.to==null||(Ge.inclusiveRight?Ne.to>=ae:Ne.to>ae);if(et||Ne.from==ae&&Ge.type=="bookmark"&&(!fe||Ne.marker.insertLeft)){var $e=Ne.from==null||(Ge.inclusiveLeft?Ne.from<=ae:Ne.from<ae);(he||(he=[])).push(new _a(Ge,$e?null:Ne.from-ae,Ne.to==null?null:Ne.to-ae))}}return he}function es(ie,ae){if(ae.full)return null;var fe=pr(ie,ae.from.line)&&wn(ie,ae.from.line).markedSpans,he=pr(ie,ae.to.line)&&wn(ie,ae.to.line).markedSpans;if(!fe&&!he)return null;var me=ae.from.ch,Ne=ae.to.ch,Ge=Ni(ae.from,ae.to)==0,et=bs(fe,me,Ge),$e=ja(he,Ne,Ge),Ct=ae.text.length==1,sn=_t(ae.text).length+(Ct?me:0);if(et)for(var Dt=0;Dt<et.length;++Dt){var Hn=et[Dt];if(Hn.to==null){var Tn=Sl($e,Hn.marker);Tn?Ct&&(Hn.to=Tn.to==null?null:Tn.to+sn):Hn.to=me}}if($e)for(var ir=0;ir<$e.length;++ir){var dr=$e[ir];if(dr.to!=null&&(dr.to+=sn),dr.from==null){var Mr=Sl(et,dr.marker);Mr||(dr.from=sn,Ct&&(et||(et=[])).push(dr))}else dr.from+=sn,Ct&&(et||(et=[])).push(dr)}et&&(et=fl(et)),$e&&$e!=et&&($e=fl($e));var ao=[et];if(!Ct){var qo=ae.text.length-2,Mo;if(qo>0&&et)for(var ga=0;ga<et.length;++ga)et[ga].to==null&&(Mo||(Mo=[])).push(new _a(et[ga].marker,null,null));for(var is=0;is<qo;++is)ao.push(Mo);ao.push($e)}return ao}function fl(ie){for(var ae=0;ae<ie.length;++ae){var fe=ie[ae];fe.from!=null&&fe.from==fe.to&&fe.marker.clearWhenEmpty!==!1&&ie.splice(ae--,1)}return ie.length?ie:null}function ps(ie,ae,fe){var he=null;if(ie.iter(ae.line,fe.line+1,function(Tn){if(Tn.markedSpans)for(var ir=0;ir<Tn.markedSpans.length;++ir){var dr=Tn.markedSpans[ir].marker;dr.readOnly&&(!he||Je(he,dr)==-1)&&(he||(he=[])).push(dr)}}),!he)return null;for(var me=[{from:ae,to:fe}],Ne=0;Ne<he.length;++Ne)for(var Ge=he[Ne],et=Ge.find(0),$e=0;$e<me.length;++$e){var Ct=me[$e];if(!(Ni(Ct.to,et.from)<0||Ni(Ct.from,et.to)>0)){var sn=[$e,1],Dt=Ni(Ct.from,et.from),Hn=Ni(Ct.to,et.to);(Dt<0||!Ge.inclusiveLeft&&!Dt)&&sn.push({from:Ct.from,to:et.from}),(Hn>0||!Ge.inclusiveRight&&!Hn)&&sn.push({from:et.to,to:Ct.to}),me.splice.apply(me,sn),$e+=sn.length-3}}return me}function sr(ie){var ae=ie.markedSpans;if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.detachLine(ie);ie.markedSpans=null}}function tt(ie,ae){if(ae){for(var fe=0;fe<ae.length;++fe)ae[fe].marker.attachLine(ie);ie.markedSpans=ae}}function il(ie){return ie.inclusiveLeft?-1:0}function ql(ie){return ie.inclusiveRight?1:0}function rl(ie,ae){var fe=ie.lines.length-ae.lines.length;if(fe!=0)return fe;var he=ie.find(),me=ae.find(),Ne=Ni(he.from,me.from)||il(ie)-il(ae);if(Ne)return-Ne;var Ge=Ni(he.to,me.to)||ql(ie)-ql(ae);return Ge||ae.id-ie.id}function Il(ie,ae){var fe=Un&&ie.markedSpans,he;if(fe)for(var me=void 0,Ne=0;Ne<fe.length;++Ne)me=fe[Ne],me.marker.collapsed&&(ae?me.from:me.to)==null&&(!he||rl(he,me.marker)<0)&&(he=me.marker);return he}function nu(ie){return Il(ie,!0)}function Mu(ie){return Il(ie,!1)}function Au(ie,ae){var fe=Un&&ie.markedSpans,he;if(fe)for(var me=0;me<fe.length;++me){var Ne=fe[me];Ne.marker.collapsed&&(Ne.from==null||Ne.from<ae)&&(Ne.to==null||Ne.to>ae)&&(!he||rl(he,Ne.marker)<0)&&(he=Ne.marker)}return he}function Hu(ie,ae,fe,he,me){var Ne=wn(ie,ae),Ge=Un&&Ne.markedSpans;if(Ge)for(var et=0;et<Ge.length;++et){var $e=Ge[et];if($e.marker.collapsed){var Ct=$e.marker.find(0),sn=Ni(Ct.from,fe)||il($e.marker)-il(me),Dt=Ni(Ct.to,he)||ql($e.marker)-ql(me);if(!(sn>=0&&Dt<=0||sn<=0&&Dt>=0)&&(sn<=0&&($e.marker.inclusiveRight&&me.inclusiveLeft?Ni(Ct.to,fe)>=0:Ni(Ct.to,fe)>0)||sn>=0&&($e.marker.inclusiveRight&&me.inclusiveLeft?Ni(Ct.from,he)<=0:Ni(Ct.from,he)<0)))return!0}}}function ws(ie){for(var ae;ae=nu(ie);)ie=ae.find(-1,!0).line;return ie}function Js(ie){for(var ae;ae=Mu(ie);)ie=ae.find(1,!0).line;return ie}function Xr(ie){for(var ae,fe;ae=Mu(ie);)ie=ae.find(1,!0).line,(fe||(fe=[])).push(ie);return fe}function no(ie,ae){var fe=wn(ie,ae),he=ws(fe);return fe==he?ae:Wt(he)}function na(ie,ae){if(ae>ie.lastLine())return ae;var fe=wn(ie,ae),he;if(!Fn(ie,fe))return ae;for(;he=Mu(fe);)fe=he.find(1,!0).line;return Wt(fe)+1}function Fn(ie,ae){var fe=Un&&ae.markedSpans;if(fe){for(var he=void 0,me=0;me<fe.length;++me)if(he=fe[me],!!he.marker.collapsed){if(he.from==null)return!0;if(!he.marker.widgetNode&&he.from==0&&he.marker.inclusiveLeft&&Bo(ie,ae,he))return!0}}}function Bo(ie,ae,fe){if(fe.to==null){var he=fe.marker.find(1,!0);return Bo(ie,he.line,Sl(he.line.markedSpans,fe.marker))}if(fe.marker.inclusiveRight&&fe.to==ae.text.length)return!0;for(var me=void 0,Ne=0;Ne<ae.markedSpans.length;++Ne)if(me=ae.markedSpans[Ne],me.marker.collapsed&&!me.marker.widgetNode&&me.from==fe.to&&(me.to==null||me.to!=fe.from)&&(me.marker.inclusiveLeft||fe.marker.inclusiveRight)&&Bo(ie,ae,me))return!0}function io(ie){ie=ws(ie);for(var ae=0,fe=ie.parent,he=0;he<fe.lines.length;++he){var me=fe.lines[he];if(me==ie)break;ae+=me.height}for(var Ne=fe.parent;Ne;fe=Ne,Ne=fe.parent)for(var Ge=0;Ge<Ne.children.length;++Ge){var et=Ne.children[Ge];if(et==fe)break;ae+=et.height}return ae}function Ds(ie){if(ie.height==0)return 0;for(var ae=ie.text.length,fe,he=ie;fe=nu(he);){var me=fe.find(0,!0);he=me.from.line,ae+=me.from.ch-me.to.ch}for(he=ie;fe=Mu(he);){var Ne=fe.find(0,!0);ae-=he.text.length-Ne.from.ch,he=Ne.to.line,ae+=he.text.length-Ne.to.ch}return ae}function Ps(ie){var ae=ie.display,fe=ie.doc;ae.maxLine=wn(fe,fe.first),ae.maxLineLength=Ds(ae.maxLine),ae.maxLineChanged=!0,fe.iter(function(he){var me=Ds(he);me>ae.maxLineLength&&(ae.maxLineLength=me,ae.maxLine=he)})}var ol=function(ie,ae,fe){this.text=ie,tt(this,ae),this.height=fe?fe(this):1};ol.prototype.lineNo=function(){return Wt(this)},yn(ol);function Al(ie,ae,fe,he){ie.text=ae,ie.stateAfter&&(ie.stateAfter=null),ie.styles&&(ie.styles=null),ie.order!=null&&(ie.order=null),sr(ie),tt(ie,fe);var me=he?he(ie):1;me!=ie.height&&Kn(ie,me)}function hu(ie){ie.parent=null,sr(ie)}var eu={},Eu={};function Wu(ie,ae){if(!ie||/^\s*$/.test(ie))return null;var fe=ae.addModeClass?Eu:eu;return fe[ie]||(fe[ie]=ie.replace(/\S+/g,"cm-$&"))}function ln(ie,ae){var fe=mt("span",null,null,Ve?"padding-right: .1px":null),he={pre:mt("pre",[fe],"CodeMirror-line"),content:fe,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 Ne=me?ae.rest[me-1]:ae.line,Ge=void 0;he.pos=0,he.addToken=Uo,Cr(ie.display.measure)&&(Ge=Si(Ne,ie.doc.direction))&&(he.addToken=al(he.addToken,Ge)),he.map=[];var et=ae!=ie.display.externalMeasured&&Wt(Ne);Jc(Ne,he,ms(ie,Ne,et)),Ne.styleClasses&&(Ne.styleClasses.bgClass&&(he.bgClass=Ln(Ne.styleClasses.bgClass,he.bgClass||"")),Ne.styleClasses.textClass&&(he.textClass=Ln(Ne.styleClasses.textClass,he.textClass||""))),he.map.length==0&&he.map.push(0,0,he.content.appendChild(vr(ie.display.measure))),me==0?(ae.measure.map=he.map,ae.measure.cache={}):((ae.measure.maps||(ae.measure.maps=[])).push(he.map),(ae.measure.caches||(ae.measure.caches=[])).push({}))}if(Ve){var $e=he.content.lastChild;(/\bcm-tab\b/.test($e.className)||$e.querySelector&&$e.querySelector(".cm-tab"))&&(he.content.className="cm-tab-wrap-hack")}return Fi(ie,"renderLine",ie,ae.line,he.pre),he.pre.className&&(he.textClass=Ln(he.pre.className,he.textClass||"")),he}function Gl(ie){var ae=nt("span","\u2022","cm-invalidchar");return ae.title="\\u"+ie.charCodeAt(0).toString(16),ae.setAttribute("aria-label",ae.title),ae}function Uo(ie,ae,fe,he,me,Ne,Ge){if(ae){var et=ie.splitSpaces?Zu(ae,ie.trailingSpace):ae,$e=ie.cm.state.specialChars,Ct=!1,sn;if(!$e.test(ae))ie.col+=ae.length,sn=document.createTextNode(et),ie.map.push(ie.pos,ie.pos+ae.length,sn),wt&&_e<9&&(Ct=!0),ie.pos+=ae.length;else{sn=document.createDocumentFragment();for(var Dt=0;;){$e.lastIndex=Dt;var Hn=$e.exec(ae),Tn=Hn?Hn.index-Dt:ae.length-Dt;if(Tn){var ir=document.createTextNode(et.slice(Dt,Dt+Tn));wt&&_e<9?sn.appendChild(nt("span",[ir])):sn.appendChild(ir),ie.map.push(ie.pos,ie.pos+Tn,ir),ie.col+=Tn,ie.pos+=Tn}if(!Hn)break;Dt+=Tn+1;var dr=void 0;if(Hn[0]==" "){var Mr=ie.cm.options.tabSize,ao=Mr-ie.col%Mr;dr=sn.appendChild(nt("span",Mt(ao),"cm-tab")),dr.setAttribute("role","presentation"),dr.setAttribute("cm-text"," "),ie.col+=ao}else Hn[0]=="\r"||Hn[0]==`
`?(dr=sn.appendChild(nt("span",Hn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),dr.setAttribute("cm-text",Hn[0]),ie.col+=1):(dr=ie.cm.options.specialCharPlaceholder(Hn[0]),dr.setAttribute("cm-text",Hn[0]),wt&&_e<9?sn.appendChild(nt("span",[dr])):sn.appendChild(dr),ie.col+=1);ie.map.push(ie.pos,ie.pos+1,dr),ie.pos++}}if(ie.trailingSpace=et.charCodeAt(ae.length-1)==32,fe||he||me||Ct||Ne||Ge){var qo=fe||"";he&&(qo+=he),me&&(qo+=me);var Mo=nt("span",[sn],qo,Ne);if(Ge)for(var ga in Ge)Ge.hasOwnProperty(ga)&&ga!="style"&&ga!="class"&&Mo.setAttribute(ga,Ge[ga]);return ie.content.appendChild(Mo)}ie.content.appendChild(sn)}}function Zu(ie,ae){if(ie.length>1&&!/ /.test(ie))return ie;for(var fe=ae,he="",me=0;me<ie.length;me++){var Ne=ie.charAt(me);Ne==" "&&fe&&(me==ie.length-1||ie.charCodeAt(me+1)==32)&&(Ne="\xA0"),he+=Ne,fe=Ne==" "}return he}function al(ie,ae){return function(fe,he,me,Ne,Ge,et,$e){me=me?me+" cm-force-border":"cm-force-border";for(var Ct=fe.pos,sn=Ct+he.length;;){for(var Dt=void 0,Hn=0;Hn<ae.length&&(Dt=ae[Hn],!(Dt.to>Ct&&Dt.from<=Ct));Hn++);if(Dt.to>=sn)return ie(fe,he,me,Ne,Ge,et,$e);ie(fe,he.slice(0,Dt.to-Ct),me,Ne,null,et,$e),Ne=null,he=he.slice(Dt.to-Ct),Ct=Dt.to}}}function Su(ie,ae,fe,he){var me=!he&&fe.widgetNode;me&&ie.map.push(ie.pos,ie.pos+ae,me),!he&&ie.cm.display.input.needsContentAttribute&&(me||(me=ie.content.appendChild(document.createElement("span"))),me.setAttribute("cm-marker",fe.id)),me&&(ie.cm.display.input.setUneditable(me),ie.content.appendChild(me)),ie.pos+=ae,ie.trailingSpace=!1}function Jc(ie,ae,fe){var he=ie.markedSpans,me=ie.text,Ne=0;if(!he){for(var Ge=1;Ge<fe.length;Ge+=2)ae.addToken(ae,me.slice(Ne,Ne=fe[Ge]),Wu(fe[Ge+1],ae.cm.options));return}for(var et=me.length,$e=0,Ct=1,sn="",Dt,Hn,Tn=0,ir,dr,Mr,ao,qo;;){if(Tn==$e){ir=dr=Mr=Hn="",qo=null,ao=null,Tn=1/0;for(var Mo=[],ga=void 0,is=0;is<he.length;++is){var Ao=he[is],Rs=Ao.marker;if(Rs.type=="bookmark"&&Ao.from==$e&&Rs.widgetNode)Mo.push(Rs);else if(Ao.from<=$e&&(Ao.to==null||Ao.to>$e||Rs.collapsed&&Ao.to==$e&&Ao.from==$e)){if(Ao.to!=null&&Ao.to!=$e&&Tn>Ao.to&&(Tn=Ao.to,dr=""),Rs.className&&(ir+=" "+Rs.className),Rs.css&&(Hn=(Hn?Hn+";":"")+Rs.css),Rs.startStyle&&Ao.from==$e&&(Mr+=" "+Rs.startStyle),Rs.endStyle&&Ao.to==Tn&&(ga||(ga=[])).push(Rs.endStyle,Ao.to),Rs.title&&((qo||(qo={})).title=Rs.title),Rs.attributes)for(var Ul in Rs.attributes)(qo||(qo={}))[Ul]=Rs.attributes[Ul];Rs.collapsed&&(!ao||rl(ao.marker,Rs)<0)&&(ao=Ao)}else Ao.from>$e&&Tn>Ao.from&&(Tn=Ao.from)}if(ga)for(var Xu=0;Xu<ga.length;Xu+=2)ga[Xu+1]==Tn&&(dr+=" "+ga[Xu]);if(!ao||ao.from==$e)for(var su=0;su<Mo.length;++su)Su(ae,0,Mo[su]);if(ao&&(ao.from||0)==$e){if(Su(ae,(ao.to==null?et+1:ao.to)-$e,ao.marker,ao.from==null),ao.to==null)return;ao.to==$e&&(ao=!1)}}if($e>=et)break;for(var Hc=Math.min(et,Tn);;){if(sn){var fc=$e+sn.length;if(!ao){var Ru=fc>Hc?sn.slice(0,Hc-$e):sn;ae.addToken(ae,Ru,Dt?Dt+ir:ir,Mr,$e+Ru.length==Tn?dr:"",Hn,qo)}if(fc>=Hc){sn=sn.slice(Hc-$e),$e=Hc;break}$e=fc,Mr=""}sn=me.slice(Ne,Ne=fe[Ct++]),Dt=Wu(fe[Ct++],ae.cm.options)}}}function Dc(ie,ae,fe){this.line=ae,this.rest=Xr(ae),this.size=this.rest?Wt(_t(this.rest))-fe+1:1,this.node=this.text=null,this.hidden=Fn(ie,ae)}function Ws(ie,ae,fe){for(var he=[],me,Ne=ae;Ne<fe;Ne=me){var Ge=new Dc(ie.doc,wn(ie.doc,Ne),Ne);me=Ne+Ge.size,he.push(Ge)}return he}var Oa=null;function Pa(ie){Oa?Oa.ops.push(ie):ie.ownsGroup=Oa={ops:[ie],delayedCallbacks:[]}}function Ga(ie){var ae=ie.delayedCallbacks,fe=0;do{for(;fe<ae.length;fe++)ae[fe].call(null);for(var he=0;he<ie.ops.length;he++){var me=ie.ops[he];if(me.cursorActivityHandlers)for(;me.cursorActivityCalled<me.cursorActivityHandlers.length;)me.cursorActivityHandlers[me.cursorActivityCalled++].call(null,me.cm)}}while(fe<ae.length)}function ts(ie,ae){var fe=ie.ownsGroup;if(fe)try{Ga(fe)}finally{Oa=null,ae(fe)}}var sl=null;function oo(ie,ae){var fe=ro(ie,ae);if(fe.length){var he=Array.prototype.slice.call(arguments,2),me;Oa?me=Oa.delayedCallbacks:sl?me=sl:(me=sl=[],setTimeout($c,0));for(var Ne=function(et){me.push(function(){return fe[et].apply(null,he)})},Ge=0;Ge<fe.length;++Ge)Ne(Ge)}}function $c(){var ie=sl;sl=null;for(var ae=0;ae<ie.length;++ae)ie[ae]()}function Hl(ie,ae,fe,he){for(var me=0;me<ae.changes.length;me++){var Ne=ae.changes[me];Ne=="text"?fr(ie,ae):Ne=="gutter"?Fl(ie,ae,fe,he):Ne=="class"?El(ie,ae):Ne=="widget"&&Qu(ie,ae,he)}ae.changes=null}function iu(ie){return ie.node==ie.text&&(ie.node=nt("div",null,null,"position: relative"),ie.text.parentNode&&ie.text.parentNode.replaceChild(ie.node,ie.text),ie.node.appendChild(ie.text),wt&&_e<8&&(ie.node.style.zIndex=2)),ie.node}function Tc(ie,ae){var fe=ae.bgClass?ae.bgClass+" "+(ae.line.bgClass||""):ae.line.bgClass;if(fe&&(fe+=" CodeMirror-linebackground"),ae.background)fe?ae.background.className=fe:(ae.background.parentNode.removeChild(ae.background),ae.background=null);else if(fe){var he=iu(ae);ae.background=he.insertBefore(nt("div",null,fe),he.firstChild),ie.display.input.setUneditable(ae.background)}}function Pc(ie,ae){var fe=ie.display.externalMeasured;return fe&&fe.line==ae.line?(ie.display.externalMeasured=null,ae.measure=fe.measure,fe.built):ln(ie,ae)}function fr(ie,ae){var fe=ae.text.className,he=Pc(ie,ae);ae.text==ae.node&&(ae.node=he.pre),ae.text.parentNode.replaceChild(he.pre,ae.text),ae.text=he.pre,he.bgClass!=ae.bgClass||he.textClass!=ae.textClass?(ae.bgClass=he.bgClass,ae.textClass=he.textClass,El(ie,ae)):fe&&(ae.text.className=fe)}function El(ie,ae){Tc(ie,ae),ae.line.wrapClass?iu(ae).className=ae.line.wrapClass:ae.node!=ae.text&&(ae.node.className="");var fe=ae.textClass?ae.textClass+" "+(ae.line.textClass||""):ae.line.textClass;ae.text.className=fe||""}function Fl(ie,ae,fe,he){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=iu(ae);ae.gutterBackground=nt("div",null,"CodeMirror-gutter-background "+ae.line.gutterClass,"left: "+(ie.options.fixedGutter?he.fixedPos:-he.gutterTotalWidth)+"px; width: "+he.gutterTotalWidth+"px"),ie.display.input.setUneditable(ae.gutterBackground),me.insertBefore(ae.gutterBackground,ae.text)}var Ne=ae.line.gutterMarkers;if(ie.options.lineNumbers||Ne){var Ge=iu(ae),et=ae.gutter=nt("div",null,"CodeMirror-gutter-wrapper","left: "+(ie.options.fixedGutter?he.fixedPos:-he.gutterTotalWidth)+"px");if(ie.display.input.setUneditable(et),Ge.insertBefore(et,ae.text),ae.line.gutterClass&&(et.className+=" "+ae.line.gutterClass),ie.options.lineNumbers&&(!Ne||!Ne["CodeMirror-linenumbers"])&&(ae.lineNumber=et.appendChild(nt("div",Ro(ie.options,fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+he.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+ie.display.lineNumInnerWidth+"px"))),Ne)for(var $e=0;$e<ie.display.gutterSpecs.length;++$e){var Ct=ie.display.gutterSpecs[$e].className,sn=Ne.hasOwnProperty(Ct)&&Ne[Ct];sn&&et.appendChild(nt("div",[sn],"CodeMirror-gutter-elt","left: "+he.gutterLeft[Ct]+"px; width: "+he.gutterWidth[Ct]+"px"))}}}function Qu(ie,ae,fe){ae.alignable&&(ae.alignable=null);for(var he=Re("CodeMirror-linewidget"),me=ae.node.firstChild,Ne=void 0;me;me=Ne)Ne=me.nextSibling,he.test(me.className)&&ae.node.removeChild(me);_c(ie,ae,fe)}function Ec(ie,ae,fe,he){var me=Pc(ie,ae);return ae.text=ae.node=me.pre,me.bgClass&&(ae.bgClass=me.bgClass),me.textClass&&(ae.textClass=me.textClass),El(ie,ae),Fl(ie,ae,fe,he),_c(ie,ae,he),ae.node}function _c(ie,ae,fe){if(pa(ie,ae.line,ae,fe,!0),ae.rest)for(var he=0;he<ae.rest.length;he++)pa(ie,ae.rest[he],ae,fe,!1)}function pa(ie,ae,fe,he,me){if(ae.widgets)for(var Ne=iu(fe),Ge=0,et=ae.widgets;Ge<et.length;++Ge){var $e=et[Ge],Ct=nt("div",[$e.node],"CodeMirror-linewidget"+($e.className?" "+$e.className:""));$e.handleMouseEvents||Ct.setAttribute("cm-ignore-events","true"),qc($e,Ct,fe,he),ie.display.input.setUneditable(Ct),me&&$e.above?Ne.insertBefore(Ct,fe.gutter||fe.text):Ne.appendChild(Ct),oo($e,"redraw")}}function qc(ie,ae,fe,he){if(ie.noHScroll){(fe.alignable||(fe.alignable=[])).push(ae);var me=he.wrapperWidth;ae.style.left=he.fixedPos+"px",ie.coverGutter||(me-=he.gutterTotalWidth,ae.style.paddingLeft=he.gutterTotalWidth+"px"),ae.style.width=me+"px"}ie.coverGutter&&(ae.style.zIndex=5,ae.style.position="relative",ie.noHScroll||(ae.style.marginLeft=-he.gutterTotalWidth+"px"))}function Ju(ie){if(ie.height!=null)return ie.height;var ae=ie.doc.cm;if(!ae)return 0;if(!Pt(document.body,ie.node)){var fe="position: relative;";ie.coverGutter&&(fe+="margin-left: -"+ae.display.gutters.offsetWidth+"px;"),ie.noHScroll&&(fe+="width: "+ae.display.wrapper.clientWidth+"px;"),ht(ae.display.measure,nt("div",[ie.node],null,fe))}return ie.height=ie.node.parentNode.offsetHeight}function tn(ie,ae){for(var fe=Xo(ae);fe!=ie.wrapper;fe=fe.parentNode)if(!fe||fe.nodeType==1&&fe.getAttribute("cm-ignore-events")=="true"||fe.parentNode==ie.sizer&&fe!=ie.mover)return!0}function un(ie){return ie.lineSpace.offsetTop}function Gn(ie){return ie.mover.offsetHeight-ie.lineSpace.offsetHeight}function er(ie){if(ie.cachedPaddingH)return ie.cachedPaddingH;var ae=ht(ie.measure,nt("pre","x","CodeMirror-line-like")),fe=window.getComputedStyle?window.getComputedStyle(ae):ae.currentStyle,he={left:parseInt(fe.paddingLeft),right:parseInt(fe.paddingRight)};return!isNaN(he.left)&&!isNaN(he.right)&&(ie.cachedPaddingH=he),he}function Wi(ie){return _n-ie.display.nativeBarWidth}function Bi(ie){return ie.display.scroller.clientWidth-Wi(ie)-ie.display.barWidth}function ki(ie){return ie.display.scroller.clientHeight-Wi(ie)-ie.display.barHeight}function On(ie,ae,fe){var he=ie.options.lineWrapping,me=he&&Bi(ie);if(!ae.measure.heights||he&&ae.measure.width!=me){var Ne=ae.measure.heights=[];if(he){ae.measure.width=me;for(var Ge=ae.text.firstChild.getClientRects(),et=0;et<Ge.length-1;et++){var $e=Ge[et],Ct=Ge[et+1];Math.abs($e.bottom-Ct.bottom)>2&&Ne.push(($e.bottom+Ct.top)/2-fe.top)}}Ne.push(fe.bottom-fe.top)}}function pi(ie,ae,fe){if(ie.line==ae)return{map:ie.measure.map,cache:ie.measure.cache};for(var he=0;he<ie.rest.length;he++)if(ie.rest[he]==ae)return{map:ie.measure.maps[he],cache:ie.measure.caches[he]};for(var me=0;me<ie.rest.length;me++)if(Wt(ie.rest[me])>fe)return{map:ie.measure.maps[me],cache:ie.measure.caches[me],before:!0}}function ur(ie,ae){ae=ws(ae);var fe=Wt(ae),he=ie.display.externalMeasured=new Dc(ie.doc,ae,fe);he.lineN=fe;var me=he.built=ln(ie,he);return he.text=me.pre,ht(ie.display.lineMeasure,me.pre),he}function _r(ie,ae,fe,he){return Es(ie,ia(ie,ae),fe,he)}function da(ie,ae){if(ae>=ie.display.viewFrom&&ae<ie.display.viewTo)return ie.display.view[Ii(ie,ae)];var fe=ie.display.externalMeasured;if(fe&&ae>=fe.lineN&&ae<fe.lineN+fe.size)return fe}function ia(ie,ae){var fe=Wt(ae),he=da(ie,fe);he&&!he.text?he=null:he&&he.changes&&(Hl(ie,he,fe,Tr(ie)),ie.curOp.forceUpdate=!0),he||(he=ur(ie,ae));var me=pi(he,ae,fe);return{line:ae,view:he,rect:null,map:me.map,cache:me.cache,before:me.before,hasHeights:!1}}function Es(ie,ae,fe,he,me){ae.before&&(fe=-1);var Ne=fe+(he||""),Ge;return ae.cache.hasOwnProperty(Ne)?Ge=ae.cache[Ne]:(ae.rect||(ae.rect=ae.view.text.getBoundingClientRect()),ae.hasHeights||(On(ie,ae.view,ae.rect),ae.hasHeights=!0),Ge=qi(ie,ae,fe,he),Ge.bogus||(ae.cache[Ne]=Ge)),{left:Ge.left,right:Ge.right,top:me?Ge.rtop:Ge.top,bottom:me?Ge.rbottom:Ge.bottom}}var cs={left:0,right:0,top:0,bottom:0};function Do(ie,ae,fe){for(var he,me,Ne,Ge,et,$e,Ct=0;Ct<ie.length;Ct+=3)if(et=ie[Ct],$e=ie[Ct+1],ae<et?(me=0,Ne=1,Ge="left"):ae<$e?(me=ae-et,Ne=me+1):(Ct==ie.length-3||ae==$e&&ie[Ct+3]>ae)&&(Ne=$e-et,me=Ne-1,ae>=$e&&(Ge="right")),me!=null){if(he=ie[Ct+2],et==$e&&fe==(he.insertLeft?"left":"right")&&(Ge=fe),fe=="left"&&me==0)for(;Ct&&ie[Ct-2]==ie[Ct-3]&&ie[Ct-1].insertLeft;)he=ie[(Ct-=3)+2],Ge="left";if(fe=="right"&&me==$e-et)for(;Ct<ie.length-3&&ie[Ct+3]==ie[Ct+4]&&!ie[Ct+5].insertLeft;)he=ie[(Ct+=3)+2],Ge="right";break}return{node:he,start:me,end:Ne,collapse:Ge,coverStart:et,coverEnd:$e}}function jr(ie,ae){var fe=cs;if(ae=="left")for(var he=0;he<ie.length&&(fe=ie[he]).left==fe.right;he++);else for(var me=ie.length-1;me>=0&&(fe=ie[me]).left==fe.right;me--);return fe}function qi(ie,ae,fe,he){var me=Do(ae.map,fe,he),Ne=me.node,Ge=me.start,et=me.end,$e=me.collapse,Ct;if(Ne.nodeType==3){for(var sn=0;sn<4;sn++){for(;Ge&&Cn(ae.line.text.charAt(me.coverStart+Ge));)--Ge;for(;me.coverStart+et<me.coverEnd&&Cn(ae.line.text.charAt(me.coverStart+et));)++et;if(wt&&_e<9&&Ge==0&&et==me.coverEnd-me.coverStart?Ct=Ne.parentNode.getBoundingClientRect():Ct=jr(at(Ne,Ge,et).getClientRects(),he),Ct.left||Ct.right||Ge==0)break;et=Ge,Ge=Ge-1,$e="right"}wt&&_e<11&&(Ct=Va(ie.display.measure,Ct))}else{Ge>0&&($e=he="right");var Dt;ie.options.lineWrapping&&(Dt=Ne.getClientRects()).length>1?Ct=Dt[he=="right"?Dt.length-1:0]:Ct=Ne.getBoundingClientRect()}if(wt&&_e<9&&!Ge&&(!Ct||!Ct.left&&!Ct.right)){var Hn=Ne.parentNode.getClientRects()[0];Hn?Ct={left:Hn.left,right:Hn.left+Yn(ie.display),top:Hn.top,bottom:Hn.bottom}:Ct=cs}for(var Tn=Ct.top-ae.rect.top,ir=Ct.bottom-ae.rect.top,dr=(Tn+ir)/2,Mr=ae.view.measure.heights,ao=0;ao<Mr.length-1&&!(dr<Mr[ao]);ao++);var qo=ao?Mr[ao-1]:0,Mo=Mr[ao],ga={left:($e=="right"?Ct.right:Ct.left)-ae.rect.left,right:($e=="left"?Ct.left:Ct.right)-ae.rect.left,top:qo,bottom:Mo};return!Ct.left&&!Ct.right&&(ga.bogus=!0),ie.options.singleCursorHeightPerLine||(ga.rtop=Tn,ga.rbottom=ir),ga}function Va(ie,ae){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!Mn(ie))return ae;var fe=screen.logicalXDPI/screen.deviceXDPI,he=screen.logicalYDPI/screen.deviceYDPI;return{left:ae.left*fe,right:ae.right*fe,top:ae.top*he,bottom:ae.bottom*he}}function Ha(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 Ts(ie){ie.display.externalMeasure=null,lt(ie.display.lineMeasure);for(var ae=0;ae<ie.display.view.length;ae++)Ha(ie.display.view[ae])}function _s(ie){Ts(ie),ie.display.cachedCharWidth=ie.display.cachedTextHeight=ie.display.cachedPaddingH=null,ie.options.lineWrapping||(ie.display.maxLineChanged=!0),ie.display.lineNumChars=null}function ha(){return ut&&ne?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function za(){return ut&&ne?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Ho(ie){var ae=0;if(ie.widgets)for(var fe=0;fe<ie.widgets.length;++fe)ie.widgets[fe].above&&(ae+=Ju(ie.widgets[fe]));return ae}function zr(ie,ae,fe,he,me){if(!me){var Ne=Ho(ae);fe.top+=Ne,fe.bottom+=Ne}if(he=="line")return fe;he||(he="local");var Ge=io(ae);if(he=="local"?Ge+=un(ie.display):Ge-=ie.display.viewOffset,he=="page"||he=="window"){var et=ie.display.lineSpace.getBoundingClientRect();Ge+=et.top+(he=="window"?0:za());var $e=et.left+(he=="window"?0:ha());fe.left+=$e,fe.right+=$e}return fe.top+=Ge,fe.bottom+=Ge,fe}function Ns(ie,ae,fe){if(fe=="div")return ae;var he=ae.left,me=ae.top;if(fe=="page")he-=ha(),me-=za();else if(fe=="local"||!fe){var Ne=ie.display.sizer.getBoundingClientRect();he+=Ne.left,me+=Ne.top}var Ge=ie.display.lineSpace.getBoundingClientRect();return{left:he-Ge.left,top:me-Ge.top}}function Aa(ie,ae,fe,he,me){return he||(he=wn(ie.doc,ae.line)),zr(ie,he,_r(ie,he,ae.ch,me),fe)}function Ia(ie,ae,fe,he,me,Ne){he=he||wn(ie.doc,ae.line),me||(me=ia(ie,he));function Ge(ir,dr){var Mr=Es(ie,me,ir,dr?"right":"left",Ne);return dr?Mr.left=Mr.right:Mr.right=Mr.left,zr(ie,he,Mr,fe)}var et=Si(he,ie.doc.direction),$e=ae.ch,Ct=ae.sticky;if($e>=he.text.length?($e=he.text.length,Ct="before"):$e<=0&&($e=0,Ct="after"),!et)return Ge(Ct=="before"?$e-1:$e,Ct=="before");function sn(ir,dr,Mr){var ao=et[dr],qo=ao.level==1;return Ge(Mr?ir-1:ir,qo!=Mr)}var Dt=en(et,$e,Ct),Hn=qn,Tn=sn($e,Dt,Ct=="before");return Hn!=null&&(Tn.other=sn($e,Hn,Ct!="before")),Tn}function Zs(ie,ae){var fe=0;ae=Rr(ie.doc,ae),ie.options.lineWrapping||(fe=Yn(ie.display)*ae.ch);var he=wn(ie.doc,ae.line),me=io(he)+un(ie.display);return{left:fe,right:fe,top:me,bottom:me+he.height}}function Vu(ie,ae,fe,he,me){var Ne=Zn(ie,ae,fe);return Ne.xRel=me,he&&(Ne.outside=he),Ne}function fu(ie,ae,fe){var he=ie.doc;if(fe+=ie.display.viewOffset,fe<0)return Vu(he.first,0,null,-1,-1);var me=Yi(he,fe),Ne=he.first+he.size-1;if(me>Ne)return Vu(he.first+he.size-1,wn(he,Ne).text.length,null,1,1);ae<0&&(ae=0);for(var Ge=wn(he,me);;){var et=dt(ie,Ge,me,ae,fe),$e=Au(Ge,et.ch+(et.xRel>0||et.outside>0?1:0));if(!$e)return et;var Ct=$e.find(1);if(Ct.line==me)return Ct;Ge=wn(he,me=Ct.line)}}function St(ie,ae,fe,he){he-=Ho(ae);var me=ae.text.length,Ne=si(function(Ge){return Es(ie,fe,Ge-1).bottom<=he},me,0);return me=si(function(Ge){return Es(ie,fe,Ge).top>he},Ne,me),{begin:Ne,end:me}}function Jt(ie,ae,fe,he){fe||(fe=ia(ie,ae));var me=zr(ie,ae,Es(ie,fe,he),"line").top;return St(ie,ae,fe,me)}function ze(ie,ae,fe,he){return ie.bottom<=fe?!1:ie.top>fe?!0:(he?ie.left:ie.right)>ae}function dt(ie,ae,fe,he,me){me-=io(ae);var Ne=ia(ie,ae),Ge=Ho(ae),et=0,$e=ae.text.length,Ct=!0,sn=Si(ae,ie.doc.direction);if(sn){var Dt=(ie.options.lineWrapping?rr:lr)(ie,ae,fe,Ne,sn,he,me);Ct=Dt.level!=1,et=Ct?Dt.from:Dt.to-1,$e=Ct?Dt.to:Dt.from-1}var Hn=null,Tn=null,ir=si(function(is){var Ao=Es(ie,Ne,is);return Ao.top+=Ge,Ao.bottom+=Ge,ze(Ao,he,me,!1)?(Ao.top<=me&&Ao.left<=he&&(Hn=is,Tn=Ao),!0):!1},et,$e),dr,Mr,ao=!1;if(Tn){var qo=he-Tn.left<Tn.right-he,Mo=qo==Ct;ir=Hn+(Mo?0:1),Mr=Mo?"after":"before",dr=qo?Tn.left:Tn.right}else{!Ct&&(ir==$e||ir==et)&&ir++,Mr=ir==0?"after":ir==ae.text.length?"before":Es(ie,Ne,ir-(Ct?1:0)).bottom+Ge<=me==Ct?"after":"before";var ga=Ia(ie,Zn(fe,ir,Mr),"line",ae,Ne);dr=ga.left,ao=me<ga.top?-1:me>=ga.bottom?1:0}return ir=ci(ae.text,ir,1),Vu(fe,ir,Mr,ao,he-dr)}function lr(ie,ae,fe,he,me,Ne,Ge){var et=si(function(Dt){var Hn=me[Dt],Tn=Hn.level!=1;return ze(Ia(ie,Zn(fe,Tn?Hn.to:Hn.from,Tn?"before":"after"),"line",ae,he),Ne,Ge,!0)},0,me.length-1),$e=me[et];if(et>0){var Ct=$e.level!=1,sn=Ia(ie,Zn(fe,Ct?$e.from:$e.to,Ct?"after":"before"),"line",ae,he);ze(sn,Ne,Ge,!0)&&sn.top>Ge&&($e=me[et-1])}return $e}function rr(ie,ae,fe,he,me,Ne,Ge){var et=St(ie,ae,he,Ge),$e=et.begin,Ct=et.end;/\s/.test(ae.text.charAt(Ct-1))&&Ct--;for(var sn=null,Dt=null,Hn=0;Hn<me.length;Hn++){var Tn=me[Hn];if(!(Tn.from>=Ct||Tn.to<=$e)){var ir=Tn.level!=1,dr=Es(ie,he,ir?Math.min(Ct,Tn.to)-1:Math.max($e,Tn.from)).right,Mr=dr<Ne?Ne-dr+1e9:dr-Ne;(!sn||Dt>Mr)&&(sn=Tn,Dt=Mr)}}return sn||(sn=me[me.length-1]),sn.from<$e&&(sn={from:$e,to:sn.to,level:sn.level}),sn.to>Ct&&(sn={from:sn.from,to:Ct,level:sn.level}),sn}var kr;function tr(ie){if(ie.cachedTextHeight!=null)return ie.cachedTextHeight;if(kr==null){kr=nt("pre",null,"CodeMirror-line-like");for(var ae=0;ae<49;++ae)kr.appendChild(document.createTextNode("x")),kr.appendChild(nt("br"));kr.appendChild(document.createTextNode("x"))}ht(ie.measure,kr);var fe=kr.offsetHeight/50;return fe>3&&(ie.cachedTextHeight=fe),lt(ie.measure),fe||1}function Yn(ie){if(ie.cachedCharWidth!=null)return ie.cachedCharWidth;var ae=nt("span","xxxxxxxxxx"),fe=nt("pre",[ae],"CodeMirror-line-like");ht(ie.measure,fe);var he=ae.getBoundingClientRect(),me=(he.right-he.left)/10;return me>2&&(ie.cachedCharWidth=me),me||10}function Tr(ie){for(var ae=ie.display,fe={},he={},me=ae.gutters.clientLeft,Ne=ae.gutters.firstChild,Ge=0;Ne;Ne=Ne.nextSibling,++Ge){var et=ie.display.gutterSpecs[Ge].className;fe[et]=Ne.offsetLeft+Ne.clientLeft+me,he[et]=Ne.clientWidth}return{fixedPos:Lr(ae),gutterTotalWidth:ae.gutters.offsetWidth,gutterLeft:fe,gutterWidth:he,wrapperWidth:ae.wrapper.clientWidth}}function Lr(ie){return ie.scroller.getBoundingClientRect().left-ie.sizer.getBoundingClientRect().left}function Vr(ie){var ae=tr(ie.display),fe=ie.options.lineWrapping,he=fe&&Math.max(5,ie.display.scroller.clientWidth/Yn(ie.display)-3);return function(me){if(Fn(ie.doc,me))return 0;var Ne=0;if(me.widgets)for(var Ge=0;Ge<me.widgets.length;Ge++)me.widgets[Ge].height&&(Ne+=me.widgets[Ge].height);return fe?Ne+(Math.ceil(me.text.length/he)||1)*ae:Ne+ae}}function mr(ie){var ae=ie.doc,fe=Vr(ie);ae.iter(function(he){var me=fe(he);me!=he.height&&Kn(he,me)})}function zo(ie,ae,fe,he){var me=ie.display;if(!fe&&Xo(ae).getAttribute("cm-not-content")=="true")return null;var Ne,Ge,et=me.lineSpace.getBoundingClientRect();try{Ne=ae.clientX-et.left,Ge=ae.clientY-et.top}catch(Dt){return null}var $e=fu(ie,Ne,Ge),Ct;if(he&&$e.xRel>0&&(Ct=wn(ie.doc,$e.line).text).length==$e.ch){var sn=Qe(Ct,Ct.length,ie.options.tabSize)-Ct.length;$e=Zn($e.line,Math.max(0,Math.round((Ne-er(ie.display).left)/Yn(ie.display))-sn))}return $e}function Ii(ie,ae){if(ae>=ie.display.viewTo||(ae-=ie.display.viewFrom,ae<0))return null;for(var fe=ie.display.view,he=0;he<fe.length;he++)if(ae-=fe[he].size,ae<0)return he}function vi(ie,ae,fe,he){ae==null&&(ae=ie.doc.first),fe==null&&(fe=ie.doc.first+ie.doc.size),he||(he=0);var me=ie.display;if(he&&fe<me.viewTo&&(me.updateLineNumbers==null||me.updateLineNumbers>ae)&&(me.updateLineNumbers=ae),ie.curOp.viewChanged=!0,ae>=me.viewTo)Un&&no(ie.doc,ae)<me.viewTo&&Or(ie);else if(fe<=me.viewFrom)Un&&na(ie.doc,fe+he)>me.viewFrom?Or(ie):(me.viewFrom+=he,me.viewTo+=he);else if(ae<=me.viewFrom&&fe>=me.viewTo)Or(ie);else if(ae<=me.viewFrom){var Ne=Ur(ie,fe,fe+he,1);Ne?(me.view=me.view.slice(Ne.index),me.viewFrom=Ne.lineN,me.viewTo+=he):Or(ie)}else if(fe>=me.viewTo){var Ge=Ur(ie,ae,ae,-1);Ge?(me.view=me.view.slice(0,Ge.index),me.viewTo=Ge.lineN):Or(ie)}else{var et=Ur(ie,ae,ae,-1),$e=Ur(ie,fe,fe+he,1);et&&$e?(me.view=me.view.slice(0,et.index).concat(Ws(ie,et.lineN,$e.lineN)).concat(me.view.slice($e.index)),me.viewTo+=he):Or(ie)}var Ct=me.externalMeasured;Ct&&(fe<Ct.lineN?Ct.lineN+=he:ae<Ct.lineN+Ct.size&&(me.externalMeasured=null))}function Ai(ie,ae,fe){ie.curOp.viewChanged=!0;var he=ie.display,me=ie.display.externalMeasured;if(me&&ae>=me.lineN&&ae<me.lineN+me.size&&(he.externalMeasured=null),!(ae<he.viewFrom||ae>=he.viewTo)){var Ne=he.view[Ii(ie,ae)];if(Ne.node!=null){var Ge=Ne.changes||(Ne.changes=[]);Je(Ge,fe)==-1&&Ge.push(fe)}}}function Or(ie){ie.display.viewFrom=ie.display.viewTo=ie.doc.first,ie.display.view=[],ie.display.viewOffset=0}function Ur(ie,ae,fe,he){var me=Ii(ie,ae),Ne,Ge=ie.display.view;if(!Un||fe==ie.doc.first+ie.doc.size)return{index:me,lineN:fe};for(var et=ie.display.viewFrom,$e=0;$e<me;$e++)et+=Ge[$e].size;if(et!=ae){if(he>0){if(me==Ge.length-1)return null;Ne=et+Ge[me].size-ae,me++}else Ne=et-ae;ae+=Ne,fe+=Ne}for(;no(ie.doc,fe)!=fe;){if(me==(he<0?0:Ge.length-1))return null;fe+=he*Ge[me-(he<0?1:0)].size,me+=he}return{index:me,lineN:fe}}function Fr(ie,ae,fe){var he=ie.display,me=he.view;me.length==0||ae>=he.viewTo||fe<=he.viewFrom?(he.view=Ws(ie,ae,fe),he.viewFrom=ae):(he.viewFrom>ae?he.view=Ws(ie,ae,he.viewFrom).concat(he.view):he.viewFrom<ae&&(he.view=he.view.slice(Ii(ie,ae))),he.viewFrom=ae,he.viewTo<fe?he.view=he.view.concat(Ws(ie,he.viewTo,fe)):he.viewTo>fe&&(he.view=he.view.slice(0,Ii(ie,fe)))),he.viewTo=fe}function ko(ie){for(var ae=ie.display.view,fe=0,he=0;he<ae.length;he++){var me=ae[he];!me.hidden&&(!me.node||me.changes)&&++fe}return fe}function yr(ie){ie.display.input.showSelection(ie.display.input.prepareSelection())}function vo(ie,ae){ae===void 0&&(ae=!0);for(var fe=ie.doc,he={},me=he.cursors=document.createDocumentFragment(),Ne=he.selection=document.createDocumentFragment(),Ge=0;Ge<fe.sel.ranges.length;Ge++)if(!(!ae&&Ge==fe.sel.primIndex)){var et=fe.sel.ranges[Ge];if(!(et.from().line>=ie.display.viewTo||et.to().line<ie.display.viewFrom)){var $e=et.empty();($e||ie.options.showCursorWhenSelecting)&&Xi(ie,et.head,me),$e||mo(ie,et,Ne)}}return he}function Xi(ie,ae,fe){var he=Ia(ie,ae,"div",null,null,!ie.options.singleCursorHeightPerLine),me=fe.appendChild(nt("div","\xA0","CodeMirror-cursor"));if(me.style.left=he.left+"px",me.style.top=he.top+"px",me.style.height=Math.max(0,he.bottom-he.top)*ie.options.cursorHeight+"px",he.other){var Ne=fe.appendChild(nt("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Ne.style.display="",Ne.style.left=he.other.left+"px",Ne.style.top=he.other.top+"px",Ne.style.height=(he.other.bottom-he.other.top)*.85+"px"}}function Gr(ie,ae){return ie.top-ae.top||ie.left-ae.left}function mo(ie,ae,fe){var he=ie.display,me=ie.doc,Ne=document.createDocumentFragment(),Ge=er(ie.display),et=Ge.left,$e=Math.max(he.sizerWidth,Bi(ie)-he.sizer.offsetLeft)-Ge.right,Ct=me.direction=="ltr";function sn(Mo,ga,is,Ao){ga<0&&(ga=0),ga=Math.round(ga),Ao=Math.round(Ao),Ne.appendChild(nt("div",null,"CodeMirror-selected","position: absolute; left: "+Mo+`px;
top: `+ga+"px; width: "+(is==null?$e-Mo:is)+`px;
height: `+(Ao-ga)+"px"))}function Dt(Mo,ga,is){var Ao=wn(me,Mo),Rs=Ao.text.length,Ul,Xu;function su(Ru,Wc){return Aa(ie,Zn(Mo,Ru),"div",Ao,Wc)}function Hc(Ru,Wc,rc){var ju=Jt(ie,Ao,null,Ru),cl=Wc=="ltr"==(rc=="after")?"left":"right",lu=rc=="after"?ju.begin:ju.end-(/\s/.test(Ao.text.charAt(ju.end-1))?2:1);return su(lu,cl)[cl]}var fc=Si(Ao,me.direction);return pn(fc,ga||0,is==null?Rs:is,function(Ru,Wc,rc,ju){var cl=rc=="ltr",lu=su(Ru,cl?"left":"right"),ec=su(Wc-1,cl?"right":"left"),oc=ga==null&&Ru==0,Cd=is==null&&Wc==Rs,uu=ju==0,sd=!fc||ju==fc.length-1;if(ec.top-lu.top<=3){var ve=(Ct?oc:Cd)&&uu,xe=(Ct?Cd:oc)&&sd,Ae=ve?et:(cl?lu:ec).left,je=xe?$e:(cl?ec:lu).right;sn(Ae,lu.top,je-Ae,lu.bottom)}else{var rt,it,vt,Ft;cl?(rt=Ct&&oc&&uu?et:lu.left,it=Ct?$e:Hc(Ru,rc,"before"),vt=Ct?et:Hc(Wc,rc,"after"),Ft=Ct&&Cd&&sd?$e:ec.right):(rt=Ct?Hc(Ru,rc,"before"):et,it=!Ct&&oc&&uu?$e:lu.right,vt=!Ct&&Cd&&sd?et:ec.left,Ft=Ct?Hc(Wc,rc,"after"):$e),sn(rt,lu.top,it-rt,lu.bottom),lu.bottom<ec.top&&sn(et,lu.bottom,null,ec.top),sn(vt,ec.top,Ft-vt,ec.bottom)}(!Ul||Gr(lu,Ul)<0)&&(Ul=lu),Gr(ec,Ul)<0&&(Ul=ec),(!Xu||Gr(lu,Xu)<0)&&(Xu=lu),Gr(ec,Xu)<0&&(Xu=ec)}),{start:Ul,end:Xu}}var Hn=ae.from(),Tn=ae.to();if(Hn.line==Tn.line)Dt(Hn.line,Hn.ch,Tn.ch);else{var ir=wn(me,Hn.line),dr=wn(me,Tn.line),Mr=ws(ir)==ws(dr),ao=Dt(Hn.line,Hn.ch,Mr?ir.text.length+1:null).end,qo=Dt(Tn.line,Mr?0:null,Tn.ch).start;Mr&&(ao.top<qo.top-2?(sn(ao.right,ao.top,null,ao.bottom),sn(et,qo.top,qo.left,qo.bottom)):sn(ao.right,ao.top,qo.left-ao.right,ao.bottom)),ao.bottom<qo.top&&sn(et,ao.bottom,null,qo.top)}fe.appendChild(Ne)}function aa(ie){if(ie.state.focused){var ae=ie.display;clearInterval(ae.blinker);var fe=!0;ae.cursorDiv.style.visibility="",ie.options.cursorBlinkRate>0?ae.blinker=setInterval(function(){ie.hasFocus()||Xl(ie),ae.cursorDiv.style.visibility=(fe=!fe)?"":"hidden"},ie.options.cursorBlinkRate):ie.options.cursorBlinkRate<0&&(ae.cursorDiv.style.visibility="hidden")}}function ka(ie){ie.state.focused||(ie.display.input.focus(),Kr(ie))}function Fs(ie){ie.state.delayingBlurEvent=!0,setTimeout(function(){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1,Xl(ie))},100)}function Kr(ie,ae){ie.state.delayingBlurEvent&&(ie.state.delayingBlurEvent=!1),ie.options.readOnly!="nocursor"&&(ie.state.focused||(Fi(ie,"focus",ie,ae),ie.state.focused=!0,Et(ie.display.wrapper,"CodeMirror-focused"),!ie.curOp&&ie.display.selForContextMenu!=ie.doc.sel&&(ie.display.input.reset(),Ve&&setTimeout(function(){return ie.display.input.reset(!0)},20)),ie.display.input.receivedFocus()),aa(ie))}function Xl(ie,ae){ie.state.delayingBlurEvent||(ie.state.focused&&(Fi(ie,"blur",ie,ae),ie.state.focused=!1,We(ie.display.wrapper,"CodeMirror-focused")),clearInterval(ie.display.blinker),setTimeout(function(){ie.state.focused||(ie.display.shift=!1)},150))}function Fo(ie){for(var ae=ie.display,fe=ae.lineDiv.offsetTop,he=0;he<ae.view.length;he++){var me=ae.view[he],Ne=ie.options.lineWrapping,Ge=void 0,et=0;if(!me.hidden){if(wt&&_e<8){var $e=me.node.offsetTop+me.node.offsetHeight;Ge=$e-fe,fe=$e}else{var Ct=me.node.getBoundingClientRect();Ge=Ct.bottom-Ct.top,!Ne&&me.text.firstChild&&(et=me.text.firstChild.getBoundingClientRect().right-Ct.left-1)}var sn=me.line.height-Ge;if((sn>.005||sn<-.005)&&(Kn(me.line,Ge),Da(me.line),me.rest))for(var Dt=0;Dt<me.rest.length;Dt++)Da(me.rest[Dt]);if(et>ie.display.sizerWidth){var Hn=Math.ceil(et/Yn(ie.display));Hn>ie.display.maxLineLength&&(ie.display.maxLineLength=Hn,ie.display.maxLine=me.line,ie.display.maxLineChanged=!0)}}}}function Da(ie){if(ie.widgets)for(var ae=0;ae<ie.widgets.length;++ae){var fe=ie.widgets[ae],he=fe.node.parentNode;he&&(fe.height=he.offsetHeight)}}function jo(ie,ae,fe){var he=fe&&fe.top!=null?Math.max(0,fe.top):ie.scroller.scrollTop;he=Math.floor(he-un(ie));var me=fe&&fe.bottom!=null?fe.bottom:he+ie.wrapper.clientHeight,Ne=Yi(ae,he),Ge=Yi(ae,me);if(fe&&fe.ensure){var et=fe.ensure.from.line,$e=fe.ensure.to.line;et<Ne?(Ne=et,Ge=Yi(ae,io(wn(ae,et))+ie.wrapper.clientHeight)):Math.min($e,ae.lastLine())>=Ge&&(Ne=Yi(ae,io(wn(ae,$e))-ie.wrapper.clientHeight),Ge=$e)}return{from:Ne,to:Math.max(Ge,Ne+1)}}function yl(ie,ae){if(!mi(ie,"scrollCursorIntoView")){var fe=ie.display,he=fe.sizer.getBoundingClientRect(),me=null;if(ae.top+he.top<0?me=!0:ae.bottom+he.top>(window.innerHeight||document.documentElement.clientHeight)&&(me=!1),me!=null&&!jt){var Ne=nt("div","\u200B",null,`position: absolute;
top: `+(ae.top-fe.viewOffset-un(ie.display))+`px;
height: `+(ae.bottom-ae.top+Wi(ie)+fe.barHeight)+`px;
left: `+ae.left+"px; width: "+Math.max(2,ae.right-ae.left)+"px;");ie.display.lineSpace.appendChild(Ne),Ne.scrollIntoView(me),ie.display.lineSpace.removeChild(Ne)}}}function Ls(ie,ae,fe,he){he==null&&(he=0);var me;!ie.options.lineWrapping&&ae==fe&&(ae=ae.ch?Zn(ae.line,ae.sticky=="before"?ae.ch-1:ae.ch,"after"):ae,fe=ae.sticky=="before"?Zn(ae.line,ae.ch+1,"before"):ae);for(var Ne=0;Ne<5;Ne++){var Ge=!1,et=Ia(ie,ae),$e=!fe||fe==ae?et:Ia(ie,fe);me={left:Math.min(et.left,$e.left),top:Math.min(et.top,$e.top)-he,right:Math.max(et.left,$e.left),bottom:Math.max(et.bottom,$e.bottom)+he};var Ct=Oc(ie,me),sn=ie.doc.scrollTop,Dt=ie.doc.scrollLeft;if(Ct.scrollTop!=null&&(bt(ie,Ct.scrollTop),Math.abs(ie.doc.scrollTop-sn)>1&&(Ge=!0)),Ct.scrollLeft!=null&&(Tt(ie,Ct.scrollLeft),Math.abs(ie.doc.scrollLeft-Dt)>1&&(Ge=!0)),!Ge)break}return me}function Rl(ie,ae){var fe=Oc(ie,ae);fe.scrollTop!=null&&bt(ie,fe.scrollTop),fe.scrollLeft!=null&&Tt(ie,fe.scrollLeft)}function Oc(ie,ae){var fe=ie.display,he=tr(ie.display);ae.top<0&&(ae.top=0);var me=ie.curOp&&ie.curOp.scrollTop!=null?ie.curOp.scrollTop:fe.scroller.scrollTop,Ne=ki(ie),Ge={};ae.bottom-ae.top>Ne&&(ae.bottom=ae.top+Ne);var et=ie.doc.height+Gn(fe),$e=ae.top<he,Ct=ae.bottom>et-he;if(ae.top<me)Ge.scrollTop=$e?0:ae.top;else if(ae.bottom>me+Ne){var sn=Math.min(ae.top,(Ct?et:ae.bottom)-Ne);sn!=me&&(Ge.scrollTop=sn)}var Dt=ie.options.fixedGutter?0:fe.gutters.offsetWidth,Hn=ie.curOp&&ie.curOp.scrollLeft!=null?ie.curOp.scrollLeft:fe.scroller.scrollLeft-Dt,Tn=Bi(ie)-fe.gutters.offsetWidth,ir=ae.right-ae.left>Tn;return ir&&(ae.right=ae.left+Tn),ae.left<10?Ge.scrollLeft=0:ae.left<Hn?Ge.scrollLeft=Math.max(0,ae.left+Dt-(ir?0:10)):ae.right>Tn+Hn-3&&(Ge.scrollLeft=ae.right+(ir?0:10)-Tn),Ge}function ad(ie,ae){ae!=null&&(gu(ie),ie.curOp.scrollTop=(ie.curOp.scrollTop==null?ie.doc.scrollTop:ie.curOp.scrollTop)+ae)}function Cc(ie){gu(ie);var ae=ie.getCursor();ie.curOp.scrollToPos={from:ae,to:ae,margin:ie.options.cursorScrollMargin}}function bc(ie,ae,fe){(ae!=null||fe!=null)&&gu(ie),ae!=null&&(ie.curOp.scrollLeft=ae),fe!=null&&(ie.curOp.scrollTop=fe)}function uo(ie,ae){gu(ie),ie.curOp.scrollToPos=ae}function gu(ie){var ae=ie.curOp.scrollToPos;if(ae){ie.curOp.scrollToPos=null;var fe=Zs(ie,ae.from),he=Zs(ie,ae.to);Ye(ie,fe,he,ae.margin)}}function Ye(ie,ae,fe,he){var me=Oc(ie,{left:Math.min(ae.left,fe.left),top:Math.min(ae.top,fe.top)-he,right:Math.max(ae.right,fe.right),bottom:Math.max(ae.bottom,fe.bottom)+he});bc(ie,me.scrollLeft,me.scrollTop)}function bt(ie,ae){Math.abs(ie.doc.scrollTop-ae)<2||(le||wo(ie,{top:ae}),Bt(ie,ae,!0),le&&wo(ie),xo(ie,100))}function Bt(ie,ae,fe){ae=Math.max(0,Math.min(ie.display.scroller.scrollHeight-ie.display.scroller.clientHeight,ae)),!(ie.display.scroller.scrollTop==ae&&!fe)&&(ie.doc.scrollTop=ae,ie.display.scrollbars.setScrollTop(ae),ie.display.scroller.scrollTop!=ae&&(ie.display.scroller.scrollTop=ae))}function Tt(ie,ae,fe,he){ae=Math.max(0,Math.min(ae,ie.display.scroller.scrollWidth-ie.display.scroller.clientWidth)),!((fe?ae==ie.doc.scrollLeft:Math.abs(ie.doc.scrollLeft-ae)<2)&&!he)&&(ie.doc.scrollLeft=ae,st(ie),ie.display.scroller.scrollLeft!=ae&&(ie.display.scroller.scrollLeft=ae),ie.display.scrollbars.setScrollLeft(ae))}function $t(ie){var ae=ie.display,fe=ae.gutters.offsetWidth,he=Math.round(ie.doc.height+Gn(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?fe:0,docHeight:he,scrollHeight:he+Wi(ie)+ae.barHeight,nativeBarWidth:ae.nativeBarWidth,gutterWidth:fe}}var hn=function(ie,ae,fe){this.cm=fe;var he=this.vert=nt("div",[nt("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),me=this.horiz=nt("div",[nt("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");he.tabIndex=me.tabIndex=-1,ie(he),ie(me),Ti(he,"scroll",function(){he.clientHeight&&ae(he.scrollTop,"vertical")}),Ti(me,"scroll",function(){me.clientWidth&&ae(me.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,wt&&_e<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};hn.prototype.update=function(ie){var ae=ie.scrollWidth>ie.clientWidth+1,fe=ie.scrollHeight>ie.clientHeight+1,he=ie.nativeBarWidth;if(fe){this.vert.style.display="block",this.vert.style.bottom=ae?he+"px":"0";var me=ie.viewHeight-(ae?he: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=fe?he+"px":"0",this.horiz.style.left=ie.barLeft+"px";var Ne=ie.viewWidth-ie.barLeft-(fe?he:0);this.horiz.firstChild.style.width=Math.max(0,ie.scrollWidth-ie.clientWidth+Ne)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&ie.clientHeight>0&&(he==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:fe?he:0,bottom:ae?he:0}},hn.prototype.setScrollLeft=function(ie){this.horiz.scrollLeft!=ie&&(this.horiz.scrollLeft=ie),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},hn.prototype.setScrollTop=function(ie){this.vert.scrollTop!=ie&&(this.vert.scrollTop=ie),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},hn.prototype.zeroWidthHack=function(){var ie=ce&&!Ot?"12px":"18px";this.horiz.style.height=this.vert.style.width=ie,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new Ke,this.disableVert=new Ke},hn.prototype.enableZeroWidthBar=function(ie,ae,fe){ie.style.pointerEvents="auto";function he(){var me=ie.getBoundingClientRect(),Ne=fe=="vert"?document.elementFromPoint(me.right-1,(me.top+me.bottom)/2):document.elementFromPoint((me.right+me.left)/2,me.bottom-1);Ne!=ie?ie.style.pointerEvents="none":ae.set(1e3,he)}ae.set(1e3,he)},hn.prototype.clear=function(){var ie=this.horiz.parentNode;ie.removeChild(this.horiz),ie.removeChild(this.vert)};var Pn=function(){};Pn.prototype.update=function(){return{bottom:0,right:0}},Pn.prototype.setScrollLeft=function(){},Pn.prototype.setScrollTop=function(){},Pn.prototype.clear=function(){};function Wn(ie,ae){ae||(ae=$t(ie));var fe=ie.display.barWidth,he=ie.display.barHeight;fi(ie,ae);for(var me=0;me<4&&fe!=ie.display.barWidth||he!=ie.display.barHeight;me++)fe!=ie.display.barWidth&&ie.options.lineWrapping&&Fo(ie),fi(ie,$t(ie)),fe=ie.display.barWidth,he=ie.display.barHeight}function fi(ie,ae){var fe=ie.display,he=fe.scrollbars.update(ae);fe.sizer.style.paddingRight=(fe.barWidth=he.right)+"px",fe.sizer.style.paddingBottom=(fe.barHeight=he.bottom)+"px",fe.heightForcer.style.borderBottom=he.bottom+"px solid transparent",he.right&&he.bottom?(fe.scrollbarFiller.style.display="block",fe.scrollbarFiller.style.height=he.bottom+"px",fe.scrollbarFiller.style.width=he.right+"px"):fe.scrollbarFiller.style.display="",he.bottom&&ie.options.coverGutterNextToScrollbar&&ie.options.fixedGutter?(fe.gutterFiller.style.display="block",fe.gutterFiller.style.height=he.bottom+"px",fe.gutterFiller.style.width=ae.gutterWidth+"px"):fe.gutterFiller.style.display=""}var ti={native:hn,null:Pn};function nr(ie){ie.display.scrollbars&&(ie.display.scrollbars.clear(),ie.display.scrollbars.addClass&&We(ie.display.wrapper,ie.display.scrollbars.addClass)),ie.display.scrollbars=new ti[ie.options.scrollbarStyle](function(ae){ie.display.wrapper.insertBefore(ae,ie.display.scrollbarFiller),Ti(ae,"mousedown",function(){ie.state.focused&&setTimeout(function(){return ie.display.input.focus()},0)}),ae.setAttribute("cm-not-content","true")},function(ae,fe){fe=="horizontal"?Tt(ie,ae):bt(ie,ae)},ie),ie.display.scrollbars.addClass&&Et(ie.display.wrapper,ie.display.scrollbars.addClass)}var li=0;function Zi(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:++li},Pa(ie.curOp)}function Li(ie){var ae=ie.curOp;ae&&ts(ae,function(fe){for(var he=0;he<fe.ops.length;he++)fe.ops[he].cm.curOp=null;gr(fe)})}function gr(ie){for(var ae=ie.ops,fe=0;fe<ae.length;fe++)Ir(ae[fe]);for(var he=0;he<ae.length;he++)co(ae[he]);for(var me=0;me<ae.length;me++)Wo(ae[me]);for(var Ne=0;Ne<ae.length;Ne++)Ht(ae[Ne]);for(var Ge=0;Ge<ae.length;Ge++)ei(ae[Ge])}function Ir(ie){var ae=ie.cm,fe=ae.display;$a(ae),ie.updateMaxLine&&Ps(ae),ie.mustUpdate=ie.viewChanged||ie.forceUpdate||ie.scrollTop!=null||ie.scrollToPos&&(ie.scrollToPos.from.line<fe.viewFrom||ie.scrollToPos.to.line>=fe.viewTo)||fe.maxLineChanged&&ae.options.lineWrapping,ie.update=ie.mustUpdate&&new Yr(ae,ie.mustUpdate&&{top:ie.scrollTop,ensure:ie.scrollToPos},ie.forceUpdate)}function co(ie){ie.updatedDisplay=ie.mustUpdate&&ma(ie.cm,ie.update)}function Wo(ie){var ae=ie.cm,fe=ae.display;ie.updatedDisplay&&Fo(ae),ie.barMeasure=$t(ae),fe.maxLineChanged&&!ae.options.lineWrapping&&(ie.adjustWidthTo=_r(ae,fe.maxLine,fe.maxLine.text.length).left+3,ae.display.sizerWidth=ie.adjustWidthTo,ie.barMeasure.scrollWidth=Math.max(fe.scroller.clientWidth,fe.sizer.offsetLeft+ie.adjustWidthTo+Wi(ae)+ae.display.barWidth),ie.maxScrollLeft=Math.max(0,fe.sizer.offsetLeft+ie.adjustWidthTo-Bi(ae))),(ie.updatedDisplay||ie.selectionChanged)&&(ie.preparedSelection=fe.input.prepareSelection())}function Ht(ie){var ae=ie.cm;ie.adjustWidthTo!=null&&(ae.display.sizer.style.minWidth=ie.adjustWidthTo+"px",ie.maxScrollLeft<ae.doc.scrollLeft&&Tt(ae,Math.min(ae.display.scroller.scrollLeft,ie.maxScrollLeft),!0),ae.display.maxLineChanged=!1);var fe=ie.focus&&ie.focus==Nt();ie.preparedSelection&&ae.display.input.showSelection(ie.preparedSelection,fe),(ie.updatedDisplay||ie.startHeight!=ae.doc.height)&&Wn(ae,ie.barMeasure),ie.updatedDisplay&&Ie(ae,ie.barMeasure),ie.selectionChanged&&aa(ae),ae.state.focused&&ie.updateInput&&ae.display.input.reset(ie.typing),fe&&ka(ie.cm)}function ei(ie){var ae=ie.cm,fe=ae.display,he=ae.doc;if(ie.updatedDisplay&&ui(ae,ie.update),fe.wheelStartX!=null&&(ie.scrollTop!=null||ie.scrollLeft!=null||ie.scrollToPos)&&(fe.wheelStartX=fe.wheelStartY=null),ie.scrollTop!=null&&Bt(ae,ie.scrollTop,ie.forceScroll),ie.scrollLeft!=null&&Tt(ae,ie.scrollLeft,!0,!0),ie.scrollToPos){var me=Ls(ae,Rr(he,ie.scrollToPos.from),Rr(he,ie.scrollToPos.to),ie.scrollToPos.margin);yl(ae,me)}var Ne=ie.maybeHiddenMarkers,Ge=ie.maybeUnhiddenMarkers;if(Ne)for(var et=0;et<Ne.length;++et)Ne[et].lines.length||Fi(Ne[et],"hide");if(Ge)for(var $e=0;$e<Ge.length;++$e)Ge[$e].lines.length&&Fi(Ge[$e],"unhide");fe.wrapper.offsetHeight&&(he.scrollTop=ae.display.scroller.scrollTop),ie.changeObjs&&Fi(ae,"changes",ae,ie.changeObjs),ie.update&&ie.update.finish()}function bi(ie,ae){if(ie.curOp)return ae();Zi(ie);try{return ae()}finally{Li(ie)}}function Vi(ie,ae){return function(){if(ie.curOp)return ae.apply(ie,arguments);Zi(ie);try{return ae.apply(ie,arguments)}finally{Li(ie)}}}function ni(ie){return function(){if(this.curOp)return ie.apply(this,arguments);Zi(this);try{return ie.apply(this,arguments)}finally{Li(this)}}}function Sr(ie){return function(){var ae=this.cm;if(!ae||ae.curOp)return ie.apply(this,arguments);Zi(ae);try{return ie.apply(this,arguments)}finally{Li(ae)}}}function xo(ie,ae){ie.doc.highlightFrontier<ie.display.viewTo&&ie.state.highlight.set(ae,Nn(ho,ie))}function ho(ie){var ae=ie.doc;if(!(ae.highlightFrontier>=ie.display.viewTo)){var fe=+new Date+ie.options.workTime,he=as(ie,ae.highlightFrontier),me=[];ae.iter(he.line,Math.min(ae.first+ae.size,ie.display.viewTo+500),function(Ne){if(he.line>=ie.display.viewFrom){var Ge=Ne.styles,et=Ne.text.length>ie.options.maxHighlightLength?Ri(ae.mode,he.state):null,$e=zl(ie,Ne,he,!0);et&&(he.state=et),Ne.styles=$e.styles;var Ct=Ne.styleClasses,sn=$e.classes;sn?Ne.styleClasses=sn:Ct&&(Ne.styleClasses=null);for(var Dt=!Ge||Ge.length!=Ne.styles.length||Ct!=sn&&(!Ct||!sn||Ct.bgClass!=sn.bgClass||Ct.textClass!=sn.textClass),Hn=0;!Dt&&Hn<Ge.length;++Hn)Dt=Ge[Hn]!=Ne.styles[Hn];Dt&&me.push(he.line),Ne.stateAfter=he.save(),he.nextLine()}else Ne.text.length<=ie.options.maxHighlightLength&&Qt(ie,Ne.text,he),Ne.stateAfter=he.line%5==0?he.save():null,he.nextLine();if(+new Date>fe)return xo(ie,ie.options.workDelay),!0}),ae.highlightFrontier=he.line,ae.modeFrontier=Math.max(ae.modeFrontier,he.line),me.length&&bi(ie,function(){for(var Ne=0;Ne<me.length;Ne++)Ai(ie,me[Ne],"text")})}}var Yr=function(ie,ae,fe){var he=ie.display;this.viewport=ae,this.visible=jo(he,ie.doc,ae),this.editorIsHidden=!he.wrapper.offsetWidth,this.wrapperHeight=he.wrapper.clientHeight,this.wrapperWidth=he.wrapper.clientWidth,this.oldDisplayWidth=Bi(ie),this.force=fe,this.dims=Tr(ie),this.events=[]};Yr.prototype.signal=function(ie,ae){jn(ie,ae)&&this.events.push(arguments)},Yr.prototype.finish=function(){for(var ie=0;ie<this.events.length;ie++)Fi.apply(null,this.events[ie])};function $a(ie){var ae=ie.display;!ae.scrollbarsClipped&&ae.scroller.offsetWidth&&(ae.nativeBarWidth=ae.scroller.offsetWidth-ae.scroller.clientWidth,ae.heightForcer.style.height=Wi(ie)+"px",ae.sizer.style.marginBottom=-ae.nativeBarWidth+"px",ae.sizer.style.borderRightWidth=Wi(ie)+"px",ae.scrollbarsClipped=!0)}function Go(ie){if(ie.hasFocus())return null;var ae=Nt();if(!ae||!Pt(ie.display.lineDiv,ae))return null;var fe={activeElt:ae};if(window.getSelection){var he=window.getSelection();he.anchorNode&&he.extend&&Pt(ie.display.lineDiv,he.anchorNode)&&(fe.anchorNode=he.anchorNode,fe.anchorOffset=he.anchorOffset,fe.focusNode=he.focusNode,fe.focusOffset=he.focusOffset)}return fe}function Qo(ie){if(!(!ie||!ie.activeElt||ie.activeElt==Nt())&&(ie.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(ie.activeElt.nodeName)&&ie.anchorNode&&Pt(document.body,ie.anchorNode)&&Pt(document.body,ie.focusNode))){var ae=window.getSelection(),fe=document.createRange();fe.setEnd(ie.anchorNode,ie.anchorOffset),fe.collapse(!1),ae.removeAllRanges(),ae.addRange(fe),ae.extend(ie.focusNode,ie.focusOffset)}}function ma(ie,ae){var fe=ie.display,he=ie.doc;if(ae.editorIsHidden)return Or(ie),!1;if(!ae.force&&ae.visible.from>=fe.viewFrom&&ae.visible.to<=fe.viewTo&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo)&&fe.renderedView==fe.view&&ko(ie)==0)return!1;gt(ie)&&(Or(ie),ae.dims=Tr(ie));var me=he.first+he.size,Ne=Math.max(ae.visible.from-ie.options.viewportMargin,he.first),Ge=Math.min(me,ae.visible.to+ie.options.viewportMargin);fe.viewFrom<Ne&&Ne-fe.viewFrom<20&&(Ne=Math.max(he.first,fe.viewFrom)),fe.viewTo>Ge&&fe.viewTo-Ge<20&&(Ge=Math.min(me,fe.viewTo)),Un&&(Ne=no(ie.doc,Ne),Ge=na(ie.doc,Ge));var et=Ne!=fe.viewFrom||Ge!=fe.viewTo||fe.lastWrapHeight!=ae.wrapperHeight||fe.lastWrapWidth!=ae.wrapperWidth;Fr(ie,Ne,Ge),fe.viewOffset=io(wn(ie.doc,fe.viewFrom)),ie.display.mover.style.top=fe.viewOffset+"px";var $e=ko(ie);if(!et&&$e==0&&!ae.force&&fe.renderedView==fe.view&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo))return!1;var Ct=Go(ie);return $e>4&&(fe.lineDiv.style.display="none"),sa(ie,fe.updateLineNumbers,ae.dims),$e>4&&(fe.lineDiv.style.display=""),fe.renderedView=fe.view,Qo(Ct),lt(fe.cursorDiv),lt(fe.selectionDiv),fe.gutters.style.height=fe.sizer.style.minHeight=0,et&&(fe.lastWrapHeight=ae.wrapperHeight,fe.lastWrapWidth=ae.wrapperWidth,xo(ie,400)),fe.updateLineNumbers=null,!0}function ui(ie,ae){for(var fe=ae.viewport,he=!0;;he=!1){if(!he||!ie.options.lineWrapping||ae.oldDisplayWidth==Bi(ie)){if(fe&&fe.top!=null&&(fe={top:Math.min(ie.doc.height+Gn(ie.display)-ki(ie),fe.top)}),ae.visible=jo(ie.display,ie.doc,fe),ae.visible.from>=ie.display.viewFrom&&ae.visible.to<=ie.display.viewTo)break}else he&&(ae.visible=jo(ie.display,ie.doc,fe));if(!ma(ie,ae))break;Fo(ie);var me=$t(ie);yr(ie),Wn(ie,me),Ie(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 wo(ie,ae){var fe=new Yr(ie,ae);if(ma(ie,fe)){Fo(ie),ui(ie,fe);var he=$t(ie);yr(ie),Wn(ie,he),Ie(ie,he),fe.finish()}}function sa(ie,ae,fe){var he=ie.display,me=ie.options.lineNumbers,Ne=he.lineDiv,Ge=Ne.firstChild;function et(ir){var dr=ir.nextSibling;return Ve&&ce&&ie.display.currentWheelTarget==ir?ir.style.display="none":ir.parentNode.removeChild(ir),dr}for(var $e=he.view,Ct=he.viewFrom,sn=0;sn<$e.length;sn++){var Dt=$e[sn];if(!Dt.hidden)if(!Dt.node||Dt.node.parentNode!=Ne){var Hn=Ec(ie,Dt,Ct,fe);Ne.insertBefore(Hn,Ge)}else{for(;Ge!=Dt.node;)Ge=et(Ge);var Tn=me&&ae!=null&&ae<=Ct&&Dt.lineNumber;Dt.changes&&(Je(Dt.changes,"gutter")>-1&&(Tn=!1),Hl(ie,Dt,Ct,fe)),Tn&&(lt(Dt.lineNumber),Dt.lineNumber.appendChild(document.createTextNode(Ro(ie.options,Ct)))),Ge=Dt.node.nextSibling}Ct+=Dt.size}for(;Ge;)Ge=et(Ge)}function ke(ie){var ae=ie.gutters.offsetWidth;ie.sizer.style.marginLeft=ae+"px"}function Ie(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+Wi(ie)+"px"}function st(ie){var ae=ie.display,fe=ae.view;if(!(!ae.alignWidgets&&(!ae.gutters.firstChild||!ie.options.fixedGutter))){for(var he=Lr(ae)-ae.scroller.scrollLeft+ie.doc.scrollLeft,me=ae.gutters.offsetWidth,Ne=he+"px",Ge=0;Ge<fe.length;Ge++)if(!fe[Ge].hidden){ie.options.fixedGutter&&(fe[Ge].gutter&&(fe[Ge].gutter.style.left=Ne),fe[Ge].gutterBackground&&(fe[Ge].gutterBackground.style.left=Ne));var et=fe[Ge].alignable;if(et)for(var $e=0;$e<et.length;$e++)et[$e].style.left=Ne}ie.options.fixedGutter&&(ae.gutters.style.left=he+me+"px")}}function gt(ie){if(!ie.options.lineNumbers)return!1;var ae=ie.doc,fe=Ro(ie.options,ae.first+ae.size-1),he=ie.display;if(fe.length!=he.lineNumChars){var me=he.measure.appendChild(nt("div",[nt("div",fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Ne=me.firstChild.offsetWidth,Ge=me.offsetWidth-Ne;return he.lineGutter.style.width="",he.lineNumInnerWidth=Math.max(Ne,he.lineGutter.offsetWidth-Ge)+1,he.lineNumWidth=he.lineNumInnerWidth+Ge,he.lineNumChars=he.lineNumInnerWidth?fe.length:-1,he.lineGutter.style.width=he.lineNumWidth+"px",ke(ie.display),!0}return!1}function Xt(ie,ae){for(var fe=[],he=!1,me=0;me<ie.length;me++){var Ne=ie[me],Ge=null;if(typeof Ne!="string"&&(Ge=Ne.style,Ne=Ne.className),Ne=="CodeMirror-linenumbers")if(ae)he=!0;else continue;fe.push({className:Ne,style:Ge})}return ae&&!he&&fe.push({className:"CodeMirror-linenumbers",style:null}),fe}function vn(ie){var ae=ie.gutters,fe=ie.gutterSpecs;lt(ae),ie.lineGutter=null;for(var he=0;he<fe.length;++he){var me=fe[he],Ne=me.className,Ge=me.style,et=ae.appendChild(nt("div",null,"CodeMirror-gutter "+Ne));Ge&&(et.style.cssText=Ge),Ne=="CodeMirror-linenumbers"&&(ie.lineGutter=et,et.style.width=(ie.lineNumWidth||1)+"px")}ae.style.display=fe.length?"":"none",ke(ie)}function Dn(ie){vn(ie.display),vi(ie),st(ie)}function di(ie,ae,fe,he){var me=this;this.input=fe,me.scrollbarFiller=nt("div",null,"CodeMirror-scrollbar-filler"),me.scrollbarFiller.setAttribute("cm-not-content","true"),me.gutterFiller=nt("div",null,"CodeMirror-gutter-filler"),me.gutterFiller.setAttribute("cm-not-content","true"),me.lineDiv=mt("div",null,"CodeMirror-code"),me.selectionDiv=nt("div",null,null,"position: relative; z-index: 1"),me.cursorDiv=nt("div",null,"CodeMirror-cursors"),me.measure=nt("div",null,"CodeMirror-measure"),me.lineMeasure=nt("div",null,"CodeMirror-measure"),me.lineSpace=mt("div",[me.measure,me.lineMeasure,me.selectionDiv,me.cursorDiv,me.lineDiv],null,"position: relative; outline: none");var Ne=mt("div",[me.lineSpace],"CodeMirror-lines");me.mover=nt("div",[Ne],null,"position: relative"),me.sizer=nt("div",[me.mover],"CodeMirror-sizer"),me.sizerWidth=null,me.heightForcer=nt("div",null,null,"position: absolute; height: "+_n+"px; width: 1px;"),me.gutters=nt("div",null,"CodeMirror-gutters"),me.lineGutter=null,me.scroller=nt("div",[me.sizer,me.heightForcer,me.gutters],"CodeMirror-scroll"),me.scroller.setAttribute("tabIndex","-1"),me.wrapper=nt("div",[me.scrollbarFiller,me.gutterFiller,me.scroller],"CodeMirror"),wt&&_e<8&&(me.gutters.style.zIndex=-1,me.scroller.style.paddingRight=0),!Ve&&!(le&&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=Xt(he.gutters,he.lineNumbers),vn(me),fe.init(me)}var yi=0,ai=null;wt?ai=-.53:le?ai=15:ut?ai=-.7:Rt&&(ai=-1/3);function Hi(ie){var ae=ie.wheelDeltaX,fe=ie.wheelDeltaY;return ae==null&&ie.detail&&ie.axis==ie.HORIZONTAL_AXIS&&(ae=ie.detail),fe==null&&ie.detail&&ie.axis==ie.VERTICAL_AXIS?fe=ie.detail:fe==null&&(fe=ie.wheelDelta),{x:ae,y:fe}}function $i(ie){var ae=Hi(ie);return ae.x*=ai,ae.y*=ai,ae}function Pr(ie,ae){var fe=Hi(ae),he=fe.x,me=fe.y,Ne=ie.display,Ge=Ne.scroller,et=Ge.scrollWidth>Ge.clientWidth,$e=Ge.scrollHeight>Ge.clientHeight;if(he&&et||me&&$e){if(me&&ce&&Ve){e:for(var Ct=ae.target,sn=Ne.view;Ct!=Ge;Ct=Ct.parentNode)for(var Dt=0;Dt<sn.length;Dt++)if(sn[Dt].node==Ct){ie.display.currentWheelTarget=Ct;break e}}if(he&&!le&&!pt&&ai!=null){me&&$e&&bt(ie,Math.max(0,Ge.scrollTop+me*ai)),Tt(ie,Math.max(0,Ge.scrollLeft+he*ai)),(!me||me&&$e)&&Jr(ae),Ne.wheelStartX=null;return}if(me&&ai!=null){var Hn=me*ai,Tn=ie.doc.scrollTop,ir=Tn+Ne.wrapper.clientHeight;Hn<0?Tn=Math.max(0,Tn+Hn-50):ir=Math.min(ie.doc.height,ir+Hn+50),wo(ie,{top:Tn,bottom:ir})}yi<20&&(Ne.wheelStartX==null?(Ne.wheelStartX=Ge.scrollLeft,Ne.wheelStartY=Ge.scrollTop,Ne.wheelDX=he,Ne.wheelDY=me,setTimeout(function(){if(Ne.wheelStartX!=null){var dr=Ge.scrollLeft-Ne.wheelStartX,Mr=Ge.scrollTop-Ne.wheelStartY,ao=Mr&&Ne.wheelDY&&Mr/Ne.wheelDY||dr&&Ne.wheelDX&&dr/Ne.wheelDX;Ne.wheelStartX=Ne.wheelStartY=null,ao&&(ai=(ai*yi+ao)/(yi+1),++yi)}},200)):(Ne.wheelDX+=he,Ne.wheelDY+=me))}}var Ui=function(ie,ae){this.ranges=ie,this.primIndex=ae};Ui.prototype.primary=function(){return this.ranges[this.primIndex]},Ui.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 fe=this.ranges[ae],he=ie.ranges[ae];if(!Pi(fe.anchor,he.anchor)||!Pi(fe.head,he.head))return!1}return!0},Ui.prototype.deepCopy=function(){for(var ie=[],ae=0;ae<this.ranges.length;ae++)ie[ae]=new zi(xs(this.ranges[ae].anchor),xs(this.ranges[ae].head));return new Ui(ie,this.primIndex)},Ui.prototype.somethingSelected=function(){for(var ie=0;ie<this.ranges.length;ie++)if(!this.ranges[ie].empty())return!0;return!1},Ui.prototype.contains=function(ie,ae){ae||(ae=ie);for(var fe=0;fe<this.ranges.length;fe++){var he=this.ranges[fe];if(Ni(ae,he.from())>=0&&Ni(ie,he.to())<=0)return fe}return-1};var zi=function(ie,ae){this.anchor=ie,this.head=ae};zi.prototype.from=function(){return Ar(this.anchor,this.head)},zi.prototype.to=function(){return qa(this.anchor,this.head)},zi.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function cr(ie,ae,fe){var he=ie&&ie.options.selectionsMayTouch,me=ae[fe];ae.sort(function(Hn,Tn){return Ni(Hn.from(),Tn.from())}),fe=Je(ae,me);for(var Ne=1;Ne<ae.length;Ne++){var Ge=ae[Ne],et=ae[Ne-1],$e=Ni(et.to(),Ge.from());if(he&&!Ge.empty()?$e>0:$e>=0){var Ct=Ar(et.from(),Ge.from()),sn=qa(et.to(),Ge.to()),Dt=et.empty()?Ge.from()==Ge.head:et.from()==et.head;Ne<=fe&&--fe,ae.splice(--Ne,2,new zi(Dt?sn:Ct,Dt?Ct:sn))}}return new Ui(ae,fe)}function Er(ie,ae){return new Ui([new zi(ie,ae||ie)],0)}function To(ie){return ie.text?Zn(ie.from.line+ie.text.length-1,_t(ie.text).length+(ie.text.length==1?ie.from.ch:0)):ie.to}function ea(ie,ae){if(Ni(ie,ae.from)<0)return ie;if(Ni(ie,ae.to)<=0)return To(ae);var fe=ie.line+ae.text.length-(ae.to.line-ae.from.line)-1,he=ie.ch;return ie.line==ae.to.line&&(he+=To(ae).ch-ae.to.ch),Zn(fe,he)}function Eo(ie,ae){for(var fe=[],he=0;he<ie.sel.ranges.length;he++){var me=ie.sel.ranges[he];fe.push(new zi(ea(me.anchor,ae),ea(me.head,ae)))}return cr(ie.cm,fe,ie.sel.primIndex)}function Po(ie,ae,fe){return ie.line==ae.line?Zn(fe.line,ie.ch-ae.ch+fe.ch):Zn(fe.line+(ie.line-ae.line),ie.ch)}function Ma(ie,ae,fe){for(var he=[],me=Zn(ie.first,0),Ne=me,Ge=0;Ge<ae.length;Ge++){var et=ae[Ge],$e=Po(et.from,me,Ne),Ct=Po(To(et),me,Ne);if(me=et.to,Ne=Ct,fe=="around"){var sn=ie.sel.ranges[Ge],Dt=Ni(sn.head,sn.anchor)<0;he[Ge]=new zi(Dt?Ct:$e,Dt?$e:Ct)}else he[Ge]=new zi($e,$e)}return new Ui(he,ie.sel.primIndex)}function or(ie){ie.doc.mode=Zt(ie.options,ie.doc.modeOption),_o(ie)}function _o(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,xo(ie,100),ie.state.modeGen++,ie.curOp&&vi(ie)}function $r(ie,ae){return ae.from.ch==0&&ae.to.ch==0&&_t(ae.text)==""&&(!ie.cm||ie.cm.options.wholeLineUpdateBefore)}function Oo(ie,ae,fe,he){function me(qo){return fe?fe[qo]:null}function Ne(qo,Mo,ga){Al(qo,Mo,ga,he),oo(qo,"change",qo,ae)}function Ge(qo,Mo){for(var ga=[],is=qo;is<Mo;++is)ga.push(new ol(Ct[is],me(is),he));return ga}var et=ae.from,$e=ae.to,Ct=ae.text,sn=wn(ie,et.line),Dt=wn(ie,$e.line),Hn=_t(Ct),Tn=me(Ct.length-1),ir=$e.line-et.line;if(ae.full)ie.insert(0,Ge(0,Ct.length)),ie.remove(Ct.length,ie.size-Ct.length);else if($r(ie,ae)){var dr=Ge(0,Ct.length-1);Ne(Dt,Dt.text,Tn),ir&&ie.remove(et.line,ir),dr.length&&ie.insert(et.line,dr)}else if(sn==Dt)if(Ct.length==1)Ne(sn,sn.text.slice(0,et.ch)+Hn+sn.text.slice($e.ch),Tn);else{var Mr=Ge(1,Ct.length-1);Mr.push(new ol(Hn+sn.text.slice($e.ch),Tn,he)),Ne(sn,sn.text.slice(0,et.ch)+Ct[0],me(0)),ie.insert(et.line+1,Mr)}else if(Ct.length==1)Ne(sn,sn.text.slice(0,et.ch)+Ct[0]+Dt.text.slice($e.ch),me(0)),ie.remove(et.line+1,ir);else{Ne(sn,sn.text.slice(0,et.ch)+Ct[0],me(0)),Ne(Dt,Hn+Dt.text.slice($e.ch),Tn);var ao=Ge(1,Ct.length-1);ir>1&&ie.remove(et.line+1,ir-1),ie.insert(et.line+1,ao)}oo(ie,"change",ie,ae)}function fa(ie,ae,fe){function he(me,Ne,Ge){if(me.linked)for(var et=0;et<me.linked.length;++et){var $e=me.linked[et];if($e.doc!=Ne){var Ct=Ge&&$e.sharedHist;fe&&!Ct||(ae($e.doc,Ct),he($e.doc,me,Ct))}}}he(ie,null,!0)}function Qr(ie,ae){if(ae.cm)throw new Error("This document is already in use.");ie.doc=ae,ae.cm=ie,mr(ie),or(ie),Na(ie),ie.options.lineWrapping||Ps(ie),ie.options.mode=ae.modeOption,vi(ie)}function Na(ie){(ie.doc.direction=="rtl"?Et:We)(ie.display.lineDiv,"CodeMirror-rtl")}function ra(ie){bi(ie,function(){Na(ie),vi(ie)})}function ns(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 Jo(ie,ae){var fe={from:xs(ae.from),to:To(ae),text:Ki(ie,ae.from,ae.to)};return Cs(ie,fe,ae.from.line,ae.to.line+1),fa(ie,function(he){return Cs(he,fe,ae.from.line,ae.to.line+1)},!0),fe}function Wa(ie){for(;ie.length;){var ae=_t(ie);if(ae.ranges)ie.pop();else break}}function ds(ie,ae){if(ae)return Wa(ie.done),_t(ie.done);if(ie.done.length&&!_t(ie.done).ranges)return _t(ie.done);if(ie.done.length>1&&!ie.done[ie.done.length-2].ranges)return ie.done.pop(),_t(ie.done)}function ys(ie,ae,fe,he){var me=ie.history;me.undone.length=0;var Ne=+new Date,Ge,et;if((me.lastOp==he||me.lastOrigin==ae.origin&&ae.origin&&(ae.origin.charAt(0)=="+"&&me.lastModTime>Ne-(ie.cm?ie.cm.options.historyEventDelay:500)||ae.origin.charAt(0)=="*"))&&(Ge=ds(me,me.lastOp==he)))et=_t(Ge.changes),Ni(ae.from,ae.to)==0&&Ni(ae.from,et.to)==0?et.to=To(ae):Ge.changes.push(Jo(ie,ae));else{var $e=_t(me.done);for((!$e||!$e.ranges)&&Ea(ie.sel,me.done),Ge={changes:[Jo(ie,ae)],generation:me.generation},me.done.push(Ge);me.done.length>me.undoDepth;)me.done.shift(),me.done[0].ranges||me.done.shift()}me.done.push(fe),me.generation=++me.maxGeneration,me.lastModTime=me.lastSelTime=Ne,me.lastOp=me.lastSelOp=he,me.lastOrigin=me.lastSelOrigin=ae.origin,et||Fi(ie,"historyAdded")}function ls(ie,ae,fe,he){var me=ae.charAt(0);return me=="*"||me=="+"&&fe.ranges.length==he.ranges.length&&fe.somethingSelected()==he.somethingSelected()&&new Date-ie.history.lastSelTime<=(ie.cm?ie.cm.options.historyEventDelay:500)}function Lo(ie,ae,fe,he){var me=ie.history,Ne=he&&he.origin;fe==me.lastSelOp||Ne&&me.lastSelOrigin==Ne&&(me.lastModTime==me.lastSelTime&&me.lastOrigin==Ne||ls(ie,Ne,_t(me.done),ae))?me.done[me.done.length-1]=ae:Ea(ae,me.done),me.lastSelTime=+new Date,me.lastSelOrigin=Ne,me.lastSelOp=fe,he&&he.clearRedo!==!1&&Wa(me.undone)}function Ea(ie,ae){var fe=_t(ae);fe&&fe.ranges&&fe.equals(ie)||ae.push(ie)}function Cs(ie,ae,fe,he){var me=ae["spans_"+ie.id],Ne=0;ie.iter(Math.max(ie.first,fe),Math.min(ie.first+ie.size,he),function(Ge){Ge.markedSpans&&((me||(me=ae["spans_"+ie.id]={}))[Ne]=Ge.markedSpans),++Ne})}function hs(ie){if(!ie)return null;for(var ae,fe=0;fe<ie.length;++fe)ie[fe].marker.explicitlyCleared?ae||(ae=ie.slice(0,fe)):ae&&ae.push(ie[fe]);return ae?ae.length?ae:null:ie}function zs(ie,ae){var fe=ae["spans_"+ie.id];if(!fe)return null;for(var he=[],me=0;me<ae.text.length;++me)he.push(hs(fe[me]));return he}function Os(ie,ae){var fe=zs(ie,ae),he=es(ie,ae);if(!fe)return he;if(!he)return fe;for(var me=0;me<fe.length;++me){var Ne=fe[me],Ge=he[me];if(Ne&&Ge)e:for(var et=0;et<Ge.length;++et){for(var $e=Ge[et],Ct=0;Ct<Ne.length;++Ct)if(Ne[Ct].marker==$e.marker)continue e;Ne.push($e)}else Ge&&(fe[me]=Ge)}return fe}function Vs(ie,ae,fe){for(var he=[],me=0;me<ie.length;++me){var Ne=ie[me];if(Ne.ranges){he.push(fe?Ui.prototype.deepCopy.call(Ne):Ne);continue}var Ge=Ne.changes,et=[];he.push({changes:et});for(var $e=0;$e<Ge.length;++$e){var Ct=Ge[$e],sn=void 0;if(et.push({from:Ct.from,to:Ct.to,text:Ct.text}),ae)for(var Dt in Ct)(sn=Dt.match(/^spans_(\d+)$/))&&Je(ae,Number(sn[1]))>-1&&(_t(et)[Dt]=Ct[Dt],delete Ct[Dt])}}return he}function Gs(ie,ae,fe,he){if(he){var me=ie.anchor;if(fe){var Ne=Ni(ae,me)<0;Ne!=Ni(fe,me)<0?(me=ae,ae=fe):Ne!=Ni(ae,fe)<0&&(ae=fe)}return new zi(me,ae)}else return new zi(fe||ae,ae)}function nl(ie,ae,fe,he,me){me==null&&(me=ie.cm&&(ie.cm.display.shift||ie.extend)),qr(ie,new Ui([Gs(ie.sel.primary(),ae,fe,me)],0),he)}function Wl(ie,ae,fe){for(var he=[],me=ie.cm&&(ie.cm.display.shift||ie.extend),Ne=0;Ne<ie.sel.ranges.length;Ne++)he[Ne]=Gs(ie.sel.ranges[Ne],ae[Ne],null,me);var Ge=cr(ie.cm,he,ie.sel.primIndex);qr(ie,Ge,fe)}function el(ie,ae,fe,he){var me=ie.sel.ranges.slice(0);me[ae]=fe,qr(ie,cr(ie.cm,me,ie.sel.primIndex),he)}function $o(ie,ae,fe,he){qr(ie,Er(ae,fe),he)}function oa(ie,ae,fe){var he={ranges:ae.ranges,update:function(me){this.ranges=[];for(var Ne=0;Ne<me.length;Ne++)this.ranges[Ne]=new zi(Rr(ie,me[Ne].anchor),Rr(ie,me[Ne].head))},origin:fe&&fe.origin};return Fi(ie,"beforeSelectionChange",ie,he),ie.cm&&Fi(ie.cm,"beforeSelectionChange",ie.cm,he),he.ranges!=ae.ranges?cr(ie.cm,he.ranges,he.ranges.length-1):ae}function la(ie,ae,fe){var he=ie.history.done,me=_t(he);me&&me.ranges?(he[he.length-1]=ae,fo(ie,ae,fe)):qr(ie,ae,fe)}function qr(ie,ae,fe){fo(ie,ae,fe),Lo(ie,ie.sel,ie.cm?ie.cm.curOp.id:NaN,fe)}function fo(ie,ae,fe){(jn(ie,"beforeSelectionChange")||ie.cm&&jn(ie.cm,"beforeSelectionChange"))&&(ae=oa(ie,ae,fe));var he=fe&&fe.bias||(Ni(ae.primary().head,ie.sel.primary().head)<0?-1:1);Vo(ie,ss(ie,ae,he,!0)),!(fe&&fe.scroll===!1)&&ie.cm&&Cc(ie.cm)}function Vo(ie,ae){ae.equals(ie.sel)||(ie.sel=ae,ie.cm&&(ie.cm.curOp.updateInput=1,ie.cm.curOp.selectionChanged=!0,Co(ie.cm)),oo(ie,"cursorActivity",ie))}function Xa(ie){Vo(ie,ss(ie,ie.sel,null,!1))}function ss(ie,ae,fe,he){for(var me,Ne=0;Ne<ae.ranges.length;Ne++){var Ge=ae.ranges[Ne],et=ae.ranges.length==ie.sel.ranges.length&&ie.sel.ranges[Ne],$e=ll(ie,Ge.anchor,et&&et.anchor,fe,he),Ct=ll(ie,Ge.head,et&&et.head,fe,he);(me||$e!=Ge.anchor||Ct!=Ge.head)&&(me||(me=ae.ranges.slice(0,Ne)),me[Ne]=new zi($e,Ct))}return me?cr(ie.cm,me,ae.primIndex):ae}function va(ie,ae,fe,he,me){var Ne=wn(ie,ae.line);if(Ne.markedSpans)for(var Ge=0;Ge<Ne.markedSpans.length;++Ge){var et=Ne.markedSpans[Ge],$e=et.marker,Ct="selectLeft"in $e?!$e.selectLeft:$e.inclusiveLeft,sn="selectRight"in $e?!$e.selectRight:$e.inclusiveRight;if((et.from==null||(Ct?et.from<=ae.ch:et.from<ae.ch))&&(et.to==null||(sn?et.to>=ae.ch:et.to>ae.ch))){if(me&&(Fi($e,"beforeCursorEnter"),$e.explicitlyCleared))if(Ne.markedSpans){--Ge;continue}else break;if(!$e.atomic)continue;if(fe){var Dt=$e.find(he<0?1:-1),Hn=void 0;if((he<0?sn:Ct)&&(Dt=Nl(ie,Dt,-he,Dt&&Dt.line==ae.line?Ne:null)),Dt&&Dt.line==ae.line&&(Hn=Ni(Dt,fe))&&(he<0?Hn<0:Hn>0))return va(ie,Dt,ae,he,me)}var Tn=$e.find(he<0?-1:1);return(he<0?Ct:sn)&&(Tn=Nl(ie,Tn,he,Tn.line==ae.line?Ne:null)),Tn?va(ie,Tn,ae,he,me):null}}return ae}function ll(ie,ae,fe,he,me){var Ne=he||1,Ge=va(ie,ae,fe,Ne,me)||!me&&va(ie,ae,fe,Ne,!0)||va(ie,ae,fe,-Ne,me)||!me&&va(ie,ae,fe,-Ne,!0);return Ge||(ie.cantEdit=!0,Zn(ie.first,0))}function Nl(ie,ae,fe,he){return fe<0&&ae.ch==0?ae.line>ie.first?Rr(ie,Zn(ae.line-1)):null:fe>0&&ae.ch==(he||wn(ie,ae.line)).text.length?ae.line<ie.first+ie.size-1?Zn(ae.line+1,0):null:new Zn(ae.line,ae.ch+fe)}function Us(ie){ie.setSelection(Zn(ie.firstLine(),0),Zn(ie.lastLine()),zt)}function Zl(ie,ae,fe){var he={canceled:!1,from:ae.from,to:ae.to,text:ae.text,origin:ae.origin,cancel:function(){return he.canceled=!0}};return fe&&(he.update=function(me,Ne,Ge,et){me&&(he.from=Rr(ie,me)),Ne&&(he.to=Rr(ie,Ne)),Ge&&(he.text=Ge),et!==void 0&&(he.origin=et)}),Fi(ie,"beforeChange",ie,he),ie.cm&&Fi(ie.cm,"beforeChange",ie.cm,he),he.canceled?(ie.cm&&(ie.cm.curOp.updateInput=2),null):{from:he.from,to:he.to,text:he.text,origin:he.origin}}function $s(ie,ae,fe){if(ie.cm){if(!ie.cm.curOp)return Vi(ie.cm,$s)(ie,ae,fe);if(ie.cm.state.suppressEdits)return}if(!((jn(ie,"beforeChange")||ie.cm&&jn(ie.cm,"beforeChange"))&&(ae=Zl(ie,ae,!0),!ae))){var he=Ya&&!fe&&ps(ie,ae.from,ae.to);if(he)for(var me=he.length-1;me>=0;--me)pl(ie,{from:he[me].from,to:he[me].to,text:me?[""]:ae.text,origin:ae.origin});else pl(ie,ae)}}function pl(ie,ae){if(!(ae.text.length==1&&ae.text[0]==""&&Ni(ae.from,ae.to)==0)){var fe=Eo(ie,ae);ys(ie,ae,fe,ie.cm?ie.cm.curOp.id:NaN),Ll(ie,ae,fe,es(ie,ae));var he=[];fa(ie,function(me,Ne){!Ne&&Je(he,me.history)==-1&&(Cu(me.history,ae),he.push(me.history)),Ll(me,ae,null,es(me,ae))})}}function xl(ie,ae,fe){var he=ie.cm&&ie.cm.state.suppressEdits;if(!(he&&!fe)){for(var me=ie.history,Ne,Ge=ie.sel,et=ae=="undo"?me.done:me.undone,$e=ae=="undo"?me.undone:me.done,Ct=0;Ct<et.length&&(Ne=et[Ct],!(fe?Ne.ranges&&!Ne.equals(ie.sel):!Ne.ranges));Ct++);if(Ct!=et.length){for(me.lastOrigin=me.lastSelOrigin=null;;)if(Ne=et.pop(),Ne.ranges){if(Ea(Ne,$e),fe&&!Ne.equals(ie.sel)){qr(ie,Ne,{clearRedo:!1});return}Ge=Ne}else if(he){et.push(Ne);return}else break;var sn=[];Ea(Ge,$e),$e.push({changes:sn,generation:me.generation}),me.generation=Ne.generation||++me.maxGeneration;for(var Dt=jn(ie,"beforeChange")||ie.cm&&jn(ie.cm,"beforeChange"),Hn=function(dr){var Mr=Ne.changes[dr];if(Mr.origin=ae,Dt&&!Zl(ie,Mr,!1))return et.length=0,{};sn.push(Jo(ie,Mr));var ao=dr?Eo(ie,Mr):_t(et);Ll(ie,Mr,ao,Os(ie,Mr)),!dr&&ie.cm&&ie.cm.scrollIntoView({from:Mr.from,to:To(Mr)});var qo=[];fa(ie,function(Mo,ga){!ga&&Je(qo,Mo.history)==-1&&(Cu(Mo.history,Mr),qo.push(Mo.history)),Ll(Mo,Mr,null,Os(Mo,Mr))})},Tn=Ne.changes.length-1;Tn>=0;--Tn){var ir=Hn(Tn);if(ir)return ir.v}}}}function ru(ie,ae){if(ae!=0&&(ie.first+=ae,ie.sel=new Ui(mn(ie.sel.ranges,function(me){return new zi(Zn(me.anchor.line+ae,me.anchor.ch),Zn(me.head.line+ae,me.head.ch))}),ie.sel.primIndex),ie.cm)){vi(ie.cm,ie.first,ie.first-ae,ae);for(var fe=ie.cm.display,he=fe.viewFrom;he<fe.viewTo;he++)Ai(ie.cm,he,"gutter")}}function Ll(ie,ae,fe,he){if(ie.cm&&!ie.cm.curOp)return Vi(ie.cm,Ll)(ie,ae,fe,he);if(ae.to.line<ie.first){ru(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);ru(ie,me),ae={from:Zn(ie.first,0),to:Zn(ae.to.line+me,ae.to.ch),text:[_t(ae.text)],origin:ae.origin}}var Ne=ie.lastLine();ae.to.line>Ne&&(ae={from:ae.from,to:Zn(Ne,wn(ie,Ne).text.length),text:[ae.text[0]],origin:ae.origin}),ae.removed=Ki(ie,ae.from,ae.to),fe||(fe=Eo(ie,ae)),ie.cm?wl(ie.cm,ae,he):Oo(ie,ae,he),fo(ie,fe,zt),ie.cantEdit&&ll(ie,Zn(ie.firstLine(),0))&&(ie.cantEdit=!1)}}function wl(ie,ae,fe){var he=ie.doc,me=ie.display,Ne=ae.from,Ge=ae.to,et=!1,$e=Ne.line;ie.options.lineWrapping||($e=Wt(ws(wn(he,Ne.line))),he.iter($e,Ge.line+1,function(Tn){if(Tn==me.maxLine)return et=!0,!0})),he.sel.contains(ae.from,ae.to)>-1&&Co(ie),Oo(he,ae,fe,Vr(ie)),ie.options.lineWrapping||(he.iter($e,Ne.line+ae.text.length,function(Tn){var ir=Ds(Tn);ir>me.maxLineLength&&(me.maxLine=Tn,me.maxLineLength=ir,me.maxLineChanged=!0,et=!1)}),et&&(ie.curOp.updateMaxLine=!0)),ca(he,Ne.line),xo(ie,400);var Ct=ae.text.length-(Ge.line-Ne.line)-1;ae.full?vi(ie):Ne.line==Ge.line&&ae.text.length==1&&!$r(ie.doc,ae)?Ai(ie,Ne.line,"text"):vi(ie,Ne.line,Ge.line+1,Ct);var sn=jn(ie,"changes"),Dt=jn(ie,"change");if(Dt||sn){var Hn={from:Ne,to:Ge,text:ae.text,removed:ae.removed,origin:ae.origin};Dt&&oo(ie,"change",ie,Hn),sn&&(ie.curOp.changeObjs||(ie.curOp.changeObjs=[])).push(Hn)}ie.display.selForContextMenu=null}function Ks(ie,ae,fe,he,me){var Ne;he||(he=fe),Ni(he,fe)<0&&(Ne=[he,fe],fe=Ne[0],he=Ne[1]),typeof ae=="string"&&(ae=ie.splitLines(ae)),$s(ie,{from:fe,to:he,text:ae,origin:me})}function Pl(ie,ae,fe,he){fe<ie.line?ie.line+=he:ae<ie.line&&(ie.line=ae,ie.ch=0)}function xu(ie,ae,fe,he){for(var me=0;me<ie.length;++me){var Ne=ie[me],Ge=!0;if(Ne.ranges){Ne.copied||(Ne=ie[me]=Ne.deepCopy(),Ne.copied=!0);for(var et=0;et<Ne.ranges.length;et++)Pl(Ne.ranges[et].anchor,ae,fe,he),Pl(Ne.ranges[et].head,ae,fe,he);continue}for(var $e=0;$e<Ne.changes.length;++$e){var Ct=Ne.changes[$e];if(fe<Ct.from.line)Ct.from=Zn(Ct.from.line+he,Ct.from.ch),Ct.to=Zn(Ct.to.line+he,Ct.to.ch);else if(ae<=Ct.to.line){Ge=!1;break}}Ge||(ie.splice(0,me+1),me=0)}}function Cu(ie,ae){var fe=ae.from.line,he=ae.to.line,me=ae.text.length-(he-fe)-1;xu(ie.done,fe,he,me),xu(ie.undone,fe,he,me)}function ta(ie,ae,fe,he){var me=ae,Ne=ae;return typeof ae=="number"?Ne=wn(ie,br(ie,ae)):me=Wt(ae),me==null?null:(he(Ne,me)&&ie.cm&&Ai(ie.cm,me,fe),Ne)}function Io(ie){this.lines=ie,this.parent=null;for(var ae=0,fe=0;fe<ie.length;++fe)ie[fe].parent=this,ae+=ie[fe].height;this.height=ae}Io.prototype={chunkSize:function(){return this.lines.length},removeInner:function(ie,ae){for(var fe=ie,he=ie+ae;fe<he;++fe){var me=this.lines[fe];this.height-=me.height,hu(me),oo(me,"delete")}this.lines.splice(ie,ae)},collapse:function(ie){ie.push.apply(ie,this.lines)},insertInner:function(ie,ae,fe){this.height+=fe,this.lines=this.lines.slice(0,ie).concat(ae).concat(this.lines.slice(ie));for(var he=0;he<ae.length;++he)ae[he].parent=this},iterN:function(ie,ae,fe){for(var he=ie+ae;ie<he;++ie)if(fe(this.lines[ie]))return!0}};function Ko(ie){this.children=ie;for(var ae=0,fe=0,he=0;he<ie.length;++he){var me=ie[he];ae+=me.chunkSize(),fe+=me.height,me.parent=this}this.size=ae,this.height=fe,this.parent=null}Ko.prototype={chunkSize:function(){return this.size},removeInner:function(ie,ae){this.size-=ae;for(var fe=0;fe<this.children.length;++fe){var he=this.children[fe],me=he.chunkSize();if(ie<me){var Ne=Math.min(ae,me-ie),Ge=he.height;if(he.removeInner(ie,Ne),this.height-=Ge-he.height,me==Ne&&(this.children.splice(fe--,1),he.parent=null),(ae-=Ne)==0)break;ie=0}else ie-=me}if(this.size-ae<25&&(this.children.length>1||!(this.children[0]instanceof Io))){var et=[];this.collapse(et),this.children=[new Io(et)],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,fe){this.size+=ae.length,this.height+=fe;for(var he=0;he<this.children.length;++he){var me=this.children[he],Ne=me.chunkSize();if(ie<=Ne){if(me.insertInner(ie,ae,fe),me.lines&&me.lines.length>50){for(var Ge=me.lines.length%25+25,et=Ge;et<me.lines.length;){var $e=new Io(me.lines.slice(et,et+=25));me.height-=$e.height,this.children.splice(++he,0,$e),$e.parent=this}me.lines=me.lines.slice(0,Ge),this.maybeSpill()}break}ie-=Ne}},maybeSpill:function(){if(!(this.children.length<=10)){var ie=this;do{var ae=ie.children.splice(ie.children.length-5,5),fe=new Ko(ae);if(ie.parent){ie.size-=fe.size,ie.height-=fe.height;var me=Je(ie.parent.children,ie);ie.parent.children.splice(me+1,0,fe)}else{var he=new Ko(ie.children);he.parent=ie,ie.children=[he,fe],ie=he}fe.parent=ie.parent}while(ie.children.length>10);ie.parent.maybeSpill()}},iterN:function(ie,ae,fe){for(var he=0;he<this.children.length;++he){var me=this.children[he],Ne=me.chunkSize();if(ie<Ne){var Ge=Math.min(ae,Ne-ie);if(me.iterN(ie,Ge,fe))return!0;if((ae-=Ge)==0)break;ie=0}else ie-=Ne}}};var gs=function(ie,ae,fe){if(fe)for(var he in fe)fe.hasOwnProperty(he)&&(this[he]=fe[he]);this.doc=ie,this.node=ae};gs.prototype.clear=function(){var ie=this.doc.cm,ae=this.line.widgets,fe=this.line,he=Wt(fe);if(!(he==null||!ae)){for(var me=0;me<ae.length;++me)ae[me]==this&&ae.splice(me--,1);ae.length||(fe.widgets=null);var Ne=Ju(this);Kn(fe,Math.max(0,fe.height-Ne)),ie&&(bi(ie,function(){Ml(ie,fe,-Ne),Ai(ie,he,"widget")}),oo(ie,"lineWidgetCleared",ie,this,he))}},gs.prototype.changed=function(){var ie=this,ae=this.height,fe=this.doc.cm,he=this.line;this.height=null;var me=Ju(this)-ae;me&&(Fn(this.doc,he)||Kn(he,he.height+me),fe&&bi(fe,function(){fe.curOp.forceUpdate=!0,Ml(fe,he,me),oo(fe,"lineWidgetChanged",fe,ie,Wt(he))}))},yn(gs);function Ml(ie,ae,fe){io(ae)<(ie.curOp&&ie.curOp.scrollTop||ie.doc.scrollTop)&&ad(ie,fe)}function Vl(ie,ae,fe,he){var me=new gs(ie,fe,he),Ne=ie.cm;return Ne&&me.noHScroll&&(Ne.display.alignWidgets=!0),ta(ie,ae,"widget",function(Ge){var et=Ge.widgets||(Ge.widgets=[]);if(me.insertAt==null?et.push(me):et.splice(Math.min(et.length-1,Math.max(0,me.insertAt)),0,me),me.line=Ge,Ne&&!Fn(ie,Ge)){var $e=io(Ge)<ie.scrollTop;Kn(Ge,Ge.height+Ju(me)),$e&&ad(Ne,me.height),Ne.curOp.forceUpdate=!0}return!0}),Ne&&oo(Ne,"lineWidgetAdded",Ne,me,typeof ae=="number"?ae:Wt(ae)),me}var wu=0,Gt=function(ie,ae){this.lines=[],this.type=ae,this.doc=ie,this.id=++wu};Gt.prototype.clear=function(){if(!this.explicitlyCleared){var ie=this.doc.cm,ae=ie&&!ie.curOp;if(ae&&Zi(ie),jn(this,"clear")){var fe=this.find();fe&&oo(this,"clear",fe.from,fe.to)}for(var he=null,me=null,Ne=0;Ne<this.lines.length;++Ne){var Ge=this.lines[Ne],et=Sl(Ge.markedSpans,this);ie&&!this.collapsed?Ai(ie,Wt(Ge),"text"):ie&&(et.to!=null&&(me=Wt(Ge)),et.from!=null&&(he=Wt(Ge))),Ge.markedSpans=No(Ge.markedSpans,et),et.from==null&&this.collapsed&&!Fn(this.doc,Ge)&&ie&&Kn(Ge,tr(ie.display))}if(ie&&this.collapsed&&!ie.options.lineWrapping)for(var $e=0;$e<this.lines.length;++$e){var Ct=ws(this.lines[$e]),sn=Ds(Ct);sn>ie.display.maxLineLength&&(ie.display.maxLine=Ct,ie.display.maxLineLength=sn,ie.display.maxLineChanged=!0)}he!=null&&ie&&this.collapsed&&vi(ie,he,me+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,ie&&Xa(ie.doc)),ie&&oo(ie,"markerCleared",ie,this,he,me),ae&&Li(ie),this.parent&&this.parent.clear()}},Gt.prototype.find=function(ie,ae){ie==null&&this.type=="bookmark"&&(ie=1);for(var fe,he,me=0;me<this.lines.length;++me){var Ne=this.lines[me],Ge=Sl(Ne.markedSpans,this);if(Ge.from!=null&&(fe=Zn(ae?Ne:Wt(Ne),Ge.from),ie==-1))return fe;if(Ge.to!=null&&(he=Zn(ae?Ne:Wt(Ne),Ge.to),ie==1))return he}return fe&&{from:fe,to:he}},Gt.prototype.changed=function(){var ie=this,ae=this.find(-1,!0),fe=this,he=this.doc.cm;!ae||!he||bi(he,function(){var me=ae.line,Ne=Wt(ae.line),Ge=da(he,Ne);if(Ge&&(Ha(Ge),he.curOp.selectionChanged=he.curOp.forceUpdate=!0),he.curOp.updateMaxLine=!0,!Fn(fe.doc,me)&&fe.height!=null){var et=fe.height;fe.height=null;var $e=Ju(fe)-et;$e&&Kn(me,me.height+$e)}oo(he,"markerChanged",he,ie)})},Gt.prototype.attachLine=function(ie){if(!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(!ae.maybeHiddenMarkers||Je(ae.maybeHiddenMarkers,this)==-1)&&(ae.maybeUnhiddenMarkers||(ae.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(ie)},Gt.prototype.detachLine=function(ie){if(this.lines.splice(Je(this.lines,ie),1),!this.lines.length&&this.doc.cm){var ae=this.doc.cm.curOp;(ae.maybeHiddenMarkers||(ae.maybeHiddenMarkers=[])).push(this)}},yn(Gt);function Uu(ie,ae,fe,he,me){if(he&&he.shared)return $u(ie,ae,fe,he,me);if(ie.cm&&!ie.cm.curOp)return Vi(ie.cm,Uu)(ie,ae,fe,he,me);var Ne=new Gt(ie,me),Ge=Ni(ae,fe);if(he&&fn(he,Ne,!1),Ge>0||Ge==0&&Ne.clearWhenEmpty!==!1)return Ne;if(Ne.replacedWith&&(Ne.collapsed=!0,Ne.widgetNode=mt("span",[Ne.replacedWith],"CodeMirror-widget"),he.handleMouseEvents||Ne.widgetNode.setAttribute("cm-ignore-events","true"),he.insertLeft&&(Ne.widgetNode.insertLeft=!0)),Ne.collapsed){if(Hu(ie,ae.line,ae,fe,Ne)||ae.line!=fe.line&&Hu(ie,fe.line,ae,fe,Ne))throw new Error("Inserting collapsed marker partially overlapping an existing one");zn()}Ne.addToHistory&&ys(ie,{from:ae,to:fe,origin:"markText"},ie.sel,NaN);var et=ae.line,$e=ie.cm,Ct;if(ie.iter(et,fe.line+1,function(Dt){$e&&Ne.collapsed&&!$e.options.lineWrapping&&ws(Dt)==$e.display.maxLine&&(Ct=!0),Ne.collapsed&&et!=ae.line&&Kn(Dt,0),kl(Dt,new _a(Ne,et==ae.line?ae.ch:null,et==fe.line?fe.ch:null)),++et}),Ne.collapsed&&ie.iter(ae.line,fe.line+1,function(Dt){Fn(ie,Dt)&&Kn(Dt,0)}),Ne.clearOnEnter&&Ti(Ne,"beforeCursorEnter",function(){return Ne.clear()}),Ne.readOnly&&(js(),(ie.history.done.length||ie.history.undone.length)&&ie.clearHistory()),Ne.collapsed&&(Ne.id=++wu,Ne.atomic=!0),$e){if(Ct&&($e.curOp.updateMaxLine=!0),Ne.collapsed)vi($e,ae.line,fe.line+1);else if(Ne.className||Ne.startStyle||Ne.endStyle||Ne.css||Ne.attributes||Ne.title)for(var sn=ae.line;sn<=fe.line;sn++)Ai($e,sn,"text");Ne.atomic&&Xa($e.doc),oo($e,"markerAdded",$e,Ne)}return Ne}var Ql=function(ie,ae){this.markers=ie,this.primary=ae;for(var fe=0;fe<ie.length;++fe)ie[fe].parent=this};Ql.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var ie=0;ie<this.markers.length;++ie)this.markers[ie].clear();oo(this,"clear")}},Ql.prototype.find=function(ie,ae){return this.primary.find(ie,ae)},yn(Ql);function $u(ie,ae,fe,he,me){he=fn(he),he.shared=!1;var Ne=[Uu(ie,ae,fe,he,me)],Ge=Ne[0],et=he.widgetNode;return fa(ie,function($e){et&&(he.widgetNode=et.cloneNode(!0)),Ne.push(Uu($e,Rr($e,ae),Rr($e,fe),he,me));for(var Ct=0;Ct<$e.linked.length;++Ct)if($e.linked[Ct].isParent)return;Ge=_t(Ne)}),new Ql(Ne,Ge)}function Ic(ie){return ie.findMarks(Zn(ie.first,0),ie.clipPos(Zn(ie.lastLine())),function(ae){return ae.parent})}function tu(ie,ae){for(var fe=0;fe<ae.length;fe++){var he=ae[fe],me=he.find(),Ne=ie.clipPos(me.from),Ge=ie.clipPos(me.to);if(Ni(Ne,Ge)){var et=Uu(ie,Ne,Ge,he.primary,he.primary.type);he.markers.push(et),et.parent=he}}}function Ra(ie){for(var ae=function(he){var me=ie[he],Ne=[me.primary.doc];fa(me.primary.doc,function($e){return Ne.push($e)});for(var Ge=0;Ge<me.markers.length;Ge++){var et=me.markers[Ge];Je(Ne,et.doc)==-1&&(et.parent=null,me.markers.splice(Ge--,1))}},fe=0;fe<ie.length;fe++)ae(fe)}var Ys=0,Ba=function(ie,ae,fe,he,me){if(!(this instanceof Ba))return new Ba(ie,ae,fe,he,me);fe==null&&(fe=0),Ko.call(this,[new Io([new ol("",null)])]),this.first=fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=fe;var Ne=Zn(fe,0);this.sel=Er(Ne),this.history=new ns(null),this.id=++Ys,this.modeOption=ae,this.lineSep=he,this.direction=me=="rtl"?"rtl":"ltr",this.extend=!1,typeof ie=="string"&&(ie=this.splitLines(ie)),Oo(this,{from:Ne,to:Ne,text:ie}),qr(this,Er(Ne),zt)};Ba.prototype=Me(Ko.prototype,{constructor:Ba,iter:function(ie,ae,fe){fe?this.iterN(ie-this.first,ae-ie,fe):this.iterN(this.first,this.first+this.size,ie)},insert:function(ie,ae){for(var fe=0,he=0;he<ae.length;++he)fe+=ae[he].height;this.insertInner(ie-this.first,ae,fe)},remove:function(ie,ae){this.removeInner(ie-this.first,ae)},getValue:function(ie){var ae=wr(this,this.first,this.first+this.size);return ie===!1?ae:ae.join(ie||this.lineSeparator())},setValue:Sr(function(ie){var ae=Zn(this.first,0),fe=this.first+this.size-1;$s(this,{from:ae,to:Zn(fe,wn(this,fe).text.length),text:this.splitLines(ie),origin:"setValue",full:!0},!0),this.cm&&bc(this.cm,0,0),qr(this,Er(ae),zt)}),replaceRange:function(ie,ae,fe,he){ae=Rr(this,ae),fe=fe?Rr(this,fe):ae,Ks(this,ie,ae,fe,he)},getRange:function(ie,ae,fe){var he=Ki(this,Rr(this,ie),Rr(this,ae));return fe===!1?he:he.join(fe||this.lineSeparator())},getLine:function(ie){var ae=this.getLineHandle(ie);return ae&&ae.text},getLineHandle:function(ie){if(pr(this,ie))return wn(this,ie)},getLineNumber:function(ie){return Wt(ie)},getLineHandleVisualStart:function(ie){return typeof ie=="number"&&(ie=wn(this,ie)),ws(ie)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(ie){return Rr(this,ie)},getCursor:function(ie){var ae=this.sel.primary(),fe;return ie==null||ie=="head"?fe=ae.head:ie=="anchor"?fe=ae.anchor:ie=="end"||ie=="to"||ie===!1?fe=ae.to():fe=ae.from(),fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Sr(function(ie,ae,fe){$o(this,Rr(this,typeof ie=="number"?Zn(ie,ae||0):ie),null,fe)}),setSelection:Sr(function(ie,ae,fe){$o(this,Rr(this,ie),Rr(this,ae||ie),fe)}),extendSelection:Sr(function(ie,ae,fe){nl(this,Rr(this,ie),ae&&Rr(this,ae),fe)}),extendSelections:Sr(function(ie,ae){Wl(this,Ka(this,ie),ae)}),extendSelectionsBy:Sr(function(ie,ae){var fe=mn(this.sel.ranges,ie);Wl(this,Ka(this,fe),ae)}),setSelections:Sr(function(ie,ae,fe){if(ie.length){for(var he=[],me=0;me<ie.length;me++)he[me]=new zi(Rr(this,ie[me].anchor),Rr(this,ie[me].head));ae==null&&(ae=Math.min(ie.length-1,this.sel.primIndex)),qr(this,cr(this.cm,he,ae),fe)}}),addSelection:Sr(function(ie,ae,fe){var he=this.sel.ranges.slice(0);he.push(new zi(Rr(this,ie),Rr(this,ae||ie))),qr(this,cr(this.cm,he,he.length-1),fe)}),getSelection:function(ie){for(var ae=this.sel.ranges,fe,he=0;he<ae.length;he++){var me=Ki(this,ae[he].from(),ae[he].to());fe=fe?fe.concat(me):me}return ie===!1?fe:fe.join(ie||this.lineSeparator())},getSelections:function(ie){for(var ae=[],fe=this.sel.ranges,he=0;he<fe.length;he++){var me=Ki(this,fe[he].from(),fe[he].to());ie!==!1&&(me=me.join(ie||this.lineSeparator())),ae[he]=me}return ae},replaceSelection:function(ie,ae,fe){for(var he=[],me=0;me<this.sel.ranges.length;me++)he[me]=ie;this.replaceSelections(he,ae,fe||"+input")},replaceSelections:Sr(function(ie,ae,fe){for(var he=[],me=this.sel,Ne=0;Ne<me.ranges.length;Ne++){var Ge=me.ranges[Ne];he[Ne]={from:Ge.from(),to:Ge.to(),text:this.splitLines(ie[Ne]),origin:fe}}for(var et=ae&&ae!="end"&&Ma(this,he,ae),$e=he.length-1;$e>=0;$e--)$s(this,he[$e]);et?la(this,et):this.cm&&Cc(this.cm)}),undo:Sr(function(){xl(this,"undo")}),redo:Sr(function(){xl(this,"redo")}),undoSelection:Sr(function(){xl(this,"undo",!0)}),redoSelection:Sr(function(){xl(this,"redo",!0)}),setExtending:function(ie){this.extend=ie},getExtending:function(){return this.extend},historySize:function(){for(var ie=this.history,ae=0,fe=0,he=0;he<ie.done.length;he++)ie.done[he].ranges||++ae;for(var me=0;me<ie.undone.length;me++)ie.undone[me].ranges||++fe;return{undo:ae,redo:fe}},clearHistory:function(){var ie=this;this.history=new ns(this.history.maxGeneration),fa(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:Vs(this.history.done),undone:Vs(this.history.undone)}},setHistory:function(ie){var ae=this.history=new ns(this.history.maxGeneration);ae.done=Vs(ie.done.slice(0),null,!0),ae.undone=Vs(ie.undone.slice(0),null,!0)},setGutterMarker:Sr(function(ie,ae,fe){return ta(this,ie,"gutter",function(he){var me=he.gutterMarkers||(he.gutterMarkers={});return me[ae]=fe,!fe&&Be(me)&&(he.gutterMarkers=null),!0})}),clearGutter:Sr(function(ie){var ae=this;this.iter(function(fe){fe.gutterMarkers&&fe.gutterMarkers[ie]&&ta(ae,fe,"gutter",function(){return fe.gutterMarkers[ie]=null,Be(fe.gutterMarkers)&&(fe.gutterMarkers=null),!0})})}),lineInfo:function(ie){var ae;if(typeof ie=="number"){if(!pr(this,ie)||(ae=ie,ie=wn(this,ie),!ie))return null}else if(ae=Wt(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:Sr(function(ie,ae,fe){return ta(this,ie,ae=="gutter"?"gutter":"class",function(he){var me=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass";if(!he[me])he[me]=fe;else{if(Re(fe).test(he[me]))return!1;he[me]+=" "+fe}return!0})}),removeLineClass:Sr(function(ie,ae,fe){return ta(this,ie,ae=="gutter"?"gutter":"class",function(he){var me=ae=="text"?"textClass":ae=="background"?"bgClass":ae=="gutter"?"gutterClass":"wrapClass",Ne=he[me];if(Ne)if(fe==null)he[me]=null;else{var Ge=Ne.match(Re(fe));if(!Ge)return!1;var et=Ge.index+Ge[0].length;he[me]=Ne.slice(0,Ge.index)+(!Ge.index||et==Ne.length?"":" ")+Ne.slice(et)||null}else return!1;return!0})}),addLineWidget:Sr(function(ie,ae,fe){return Vl(this,ie,ae,fe)}),removeLineWidget:function(ie){ie.clear()},markText:function(ie,ae,fe){return Uu(this,Rr(this,ie),Rr(this,ae),fe,fe&&fe.type||"range")},setBookmark:function(ie,ae){var fe={replacedWith:ae&&(ae.nodeType==null?ae.widget:ae),insertLeft:ae&&ae.insertLeft,clearWhenEmpty:!1,shared:ae&&ae.shared,handleMouseEvents:ae&&ae.handleMouseEvents};return ie=Rr(this,ie),Uu(this,ie,ie,fe,"bookmark")},findMarksAt:function(ie){ie=Rr(this,ie);var ae=[],fe=wn(this,ie.line).markedSpans;if(fe)for(var he=0;he<fe.length;++he){var me=fe[he];(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,fe){ie=Rr(this,ie),ae=Rr(this,ae);var he=[],me=ie.line;return this.iter(ie.line,ae.line+1,function(Ne){var Ge=Ne.markedSpans;if(Ge)for(var et=0;et<Ge.length;et++){var $e=Ge[et];!($e.to!=null&&me==ie.line&&ie.ch>=$e.to||$e.from==null&&me!=ie.line||$e.from!=null&&me==ae.line&&$e.from>=ae.ch)&&(!fe||fe($e.marker))&&he.push($e.marker.parent||$e.marker)}++me}),he},getAllMarks:function(){var ie=[];return this.iter(function(ae){var fe=ae.markedSpans;if(fe)for(var he=0;he<fe.length;++he)fe[he].from!=null&&ie.push(fe[he].marker)}),ie},posFromIndex:function(ie){var ae,fe=this.first,he=this.lineSeparator().length;return this.iter(function(me){var Ne=me.text.length+he;if(Ne>ie)return ae=ie,!0;ie-=Ne,++fe}),Rr(this,Zn(fe,ae))},indexFromPos:function(ie){ie=Rr(this,ie);var ae=ie.ch;if(ie.line<this.first||ie.ch<0)return 0;var fe=this.lineSeparator().length;return this.iter(this.first,ie.line,function(he){ae+=he.text.length+fe}),ae},copy:function(ie){var ae=new Ba(wr(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,fe=this.first+this.size;ie.from!=null&&ie.from>ae&&(ae=ie.from),ie.to!=null&&ie.to<fe&&(fe=ie.to);var he=new Ba(wr(this,ae,fe),ie.mode||this.modeOption,ae,this.lineSep,this.direction);return ie.sharedHist&&(he.history=this.history),(this.linked||(this.linked=[])).push({doc:he,sharedHist:ie.sharedHist}),he.linked=[{doc:this,isParent:!0,sharedHist:ie.sharedHist}],tu(he,Ic(this)),he},unlinkDoc:function(ie){if(ie instanceof ul&&(ie=ie.doc),this.linked)for(var ae=0;ae<this.linked.length;++ae){var fe=this.linked[ae];if(fe.doc==ie){this.linked.splice(ae,1),ie.unlinkDoc(this),Ra(Ic(this));break}}if(ie.history==this.history){var he=[ie.id];fa(ie,function(me){return he.push(me.id)},!0),ie.history=new ns(null),ie.history.done=Vs(this.history.done,he),ie.history.undone=Vs(this.history.undone,he)}},iterLinkedDocs:function(ie){fa(this,ie)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(ie){return this.lineSep?ie.split(this.lineSep):En(ie)},lineSeparator:function(){return this.lineSep||`
`},setDirection:Sr(function(ie){ie!="rtl"&&(ie="ltr"),ie!=this.direction&&(this.direction=ie,this.iter(function(ae){return ae.order=null}),this.cm&&ra(this.cm))})}),Ba.prototype.eachLine=Ba.prototype.iter;var ou=0;function Nu(ie){var ae=this;if(us(ae),!(mi(ae,ie)||tn(ae.display,ie))){Jr(ie),wt&&(ou=+new Date);var fe=zo(ae,ie,!0),he=ie.dataTransfer.files;if(!(!fe||ae.isReadOnly()))if(he&&he.length&&window.FileReader&&window.File)for(var me=he.length,Ne=Array(me),Ge=0,et=function(){++Ge==me&&Vi(ae,function(){fe=Rr(ae.doc,fe);var Tn={from:fe,to:fe,text:ae.doc.splitLines(Ne.filter(function(ir){return ir!=null}).join(ae.doc.lineSeparator())),origin:"paste"};$s(ae.doc,Tn),la(ae.doc,Er(Rr(ae.doc,fe),Rr(ae.doc,To(Tn))))})()},$e=function(Tn,ir){if(ae.options.allowDropFileTypes&&Je(ae.options.allowDropFileTypes,Tn.type)==-1){et();return}var dr=new FileReader;dr.onerror=function(){return et()},dr.onload=function(){var Mr=dr.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Mr)){et();return}Ne[ir]=Mr,et()},dr.readAsText(Tn)},Ct=0;Ct<he.length;Ct++)$e(he[Ct],Ct);else{if(ae.state.draggingText&&ae.doc.sel.contains(fe)>-1){ae.state.draggingText(ie),setTimeout(function(){return ae.display.input.focus()},20);return}try{var sn=ie.dataTransfer.getData("Text");if(sn){var Dt;if(ae.state.draggingText&&!ae.state.draggingText.copy&&(Dt=ae.listSelections()),fo(ae.doc,Er(fe,fe)),Dt)for(var Hn=0;Hn<Dt.length;++Hn)Ks(ae.doc,"",Dt[Hn].anchor,Dt[Hn].head,"drag");ae.replaceSelection(sn,"around","paste"),ae.display.input.focus()}}catch(Tn){}}}}function Ua(ie,ae){if(wt&&(!ie.state.draggingText||+new Date-ou<100)){Nr(ae);return}if(!(mi(ie,ae)||tn(ie.display,ae))&&(ae.dataTransfer.setData("Text",ie.getSelection()),ae.dataTransfer.effectAllowed="copyMove",ae.dataTransfer.setDragImage&&!Rt)){var fe=nt("img",null,null,"position: fixed; left: 0; top: 0;");fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",pt&&(fe.width=fe.height=1,ie.display.wrapper.appendChild(fe),fe._top=fe.offsetTop),ae.dataTransfer.setDragImage(fe,0,0),pt&&fe.parentNode.removeChild(fe)}}function Ms(ie,ae){var fe=zo(ie,ae);if(fe){var he=document.createDocumentFragment();Xi(ie,fe,he),ie.display.dragCursor||(ie.display.dragCursor=nt("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),ie.display.lineSpace.insertBefore(ie.display.dragCursor,ie.display.cursorDiv)),ht(ie.display.dragCursor,he)}}function us(ie){ie.display.dragCursor&&(ie.display.lineSpace.removeChild(ie.display.dragCursor),ie.display.dragCursor=null)}function fs(ie){if(document.getElementsByClassName){for(var ae=document.getElementsByClassName("CodeMirror"),fe=[],he=0;he<ae.length;he++){var me=ae[he].CodeMirror;me&&fe.push(me)}fe.length&&fe[0].operation(function(){for(var Ne=0;Ne<fe.length;Ne++)ie(fe[Ne])})}}var gl=!1;function tl(){gl||(nc(),gl=!0)}function nc(){var ie;Ti(window,"resize",function(){ie==null&&(ie=setTimeout(function(){ie=null,fs(Rc)},100))}),Ti(window,"blur",function(){return fs(Xl)})}function Rc(ie){var ae=ie.display;ae.cachedCharWidth=ae.cachedTextHeight=ae.cachedPaddingH=null,ae.scrollbarsClipped=!1,ie.setSize()}for(var _u={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"},au=0;au<10;au++)_u[au+48]=_u[au+96]=String(au);for(var jc=65;jc<=90;jc++)_u[jc]=String.fromCharCode(jc);for(var Fc=1;Fc<=12;Fc++)_u[Fc+111]=_u[Fc+63235]="F"+Fc;var Ou={};Ou.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"},Ou.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"},Ou.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"},Ou.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"]},Ou.default=ce?Ou.macDefault:Ou.pcDefault;function kd(ie){var ae=ie.split(/-(?!$)/);ie=ae[ae.length-1];for(var fe,he,me,Ne,Ge=0;Ge<ae.length-1;Ge++){var et=ae[Ge];if(/^(cmd|meta|m)$/i.test(et))Ne=!0;else if(/^a(lt)?$/i.test(et))fe=!0;else if(/^(c|ctrl|control)$/i.test(et))he=!0;else if(/^s(hift)?$/i.test(et))me=!0;else throw new Error("Unrecognized modifier name: "+et)}return fe&&(ie="Alt-"+ie),he&&(ie="Ctrl-"+ie),Ne&&(ie="Cmd-"+ie),me&&(ie="Shift-"+ie),ie}function Is(ie){var ae={};for(var fe in ie)if(ie.hasOwnProperty(fe)){var he=ie[fe];if(/^(name|fallthrough|(de|at)tach)$/.test(fe))continue;if(he=="..."){delete ie[fe];continue}for(var me=mn(fe.split(" "),kd),Ne=0;Ne<me.length;Ne++){var Ge=void 0,et=void 0;Ne==me.length-1?(et=me.join(" "),Ge=he):(et=me.slice(0,Ne+1).join(" "),Ge="...");var $e=ae[et];if(!$e)ae[et]=Ge;else if($e!=Ge)throw new Error("Inconsistent bindings for "+et)}delete ie[fe]}for(var Ct in ae)ie[Ct]=ae[Ct];return ie}function Qa(ie,ae,fe,he){ae=Ku(ae);var me=ae.call?ae.call(ie,he):ae[ie];if(me===!1)return"nothing";if(me==="...")return"multi";if(me!=null&&fe(me))return"handled";if(ae.fallthrough){if(Object.prototype.toString.call(ae.fallthrough)!="[object Array]")return Qa(ie,ae.fallthrough,fe,he);for(var Ne=0;Ne<ae.fallthrough.length;Ne++){var Ge=Qa(ie,ae.fallthrough[Ne],fe,he);if(Ge)return Ge}}}function jl(ie){var ae=typeof ie=="string"?ie:_u[ie.keyCode];return ae=="Ctrl"||ae=="Alt"||ae=="Shift"||ae=="Mod"}function ic(ie,ae,fe){var he=ie;return ae.altKey&&he!="Alt"&&(ie="Alt-"+ie),(we?ae.metaKey:ae.ctrlKey)&&he!="Ctrl"&&(ie="Ctrl-"+ie),(we?ae.ctrlKey:ae.metaKey)&&he!="Mod"&&(ie="Cmd-"+ie),!fe&&ae.shiftKey&&he!="Shift"&&(ie="Shift-"+ie),ie}function Bu(ie,ae){if(pt&&ie.keyCode==34&&ie.char)return!1;var fe=_u[ie.keyCode];return fe==null||ie.altGraphKey?!1:(ie.keyCode==3&&ie.code&&(fe=ie.code),ic(fe,ie,ae))}function Ku(ie){return typeof ie=="string"?Ou[ie]:ie}function pu(ie,ae){for(var fe=ie.doc.sel.ranges,he=[],me=0;me<fe.length;me++){for(var Ne=ae(fe[me]);he.length&&Ni(Ne.from,_t(he).to)<=0;){var Ge=he.pop();if(Ni(Ge.from,Ne.from)<0){Ne.from=Ge.from;break}}he.push(Ne)}bi(ie,function(){for(var et=he.length-1;et>=0;et--)Ks(ie.doc,"",he[et].from,he[et].to,"+delete");Cc(ie)})}function fd(ie,ae,fe){var he=ci(ie.text,ae+fe,fe);return he<0||he>ie.text.length?null:he}function Dl(ie,ae,fe){var he=fd(ie,ae.ch,fe);return he==null?null:new Zn(ae.line,he,fe<0?"after":"before")}function zc(ie,ae,fe,he,me){if(ie){ae.doc.direction=="rtl"&&(me=-me);var Ne=Si(fe,ae.doc.direction);if(Ne){var Ge=me<0?_t(Ne):Ne[0],et=me<0==(Ge.level==1),$e=et?"after":"before",Ct;if(Ge.level>0||ae.doc.direction=="rtl"){var sn=ia(ae,fe);Ct=me<0?fe.text.length-1:0;var Dt=Es(ae,sn,Ct).top;Ct=si(function(Hn){return Es(ae,sn,Hn).top==Dt},me<0==(Ge.level==1)?Ge.from:Ge.to-1,Ct),$e=="before"&&(Ct=fd(fe,Ct,1))}else Ct=me<0?Ge.to:Ge.from;return new Zn(he,Ct,$e)}}return new Zn(he,me<0?fe.text.length:0,me<0?"before":"after")}function qh(ie,ae,fe,he){var me=Si(ae,ie.doc.direction);if(!me)return Dl(ae,fe,he);fe.ch>=ae.text.length?(fe.ch=ae.text.length,fe.sticky="before"):fe.ch<=0&&(fe.ch=0,fe.sticky="after");var Ne=en(me,fe.ch,fe.sticky),Ge=me[Ne];if(ie.doc.direction=="ltr"&&Ge.level%2==0&&(he>0?Ge.to>fe.ch:Ge.from<fe.ch))return Dl(ae,fe,he);var et=function(ao,qo){return fd(ae,ao instanceof Zn?ao.ch:ao,qo)},$e,Ct=function(ao){return ie.options.lineWrapping?($e=$e||ia(ie,ae),Jt(ie,ae,$e,ao)):{begin:0,end:ae.text.length}},sn=Ct(fe.sticky=="before"?et(fe,-1):fe.ch);if(ie.doc.direction=="rtl"||Ge.level==1){var Dt=Ge.level==1==he<0,Hn=et(fe,Dt?1:-1);if(Hn!=null&&(Dt?Hn<=Ge.to&&Hn<=sn.end:Hn>=Ge.from&&Hn>=sn.begin)){var Tn=Dt?"before":"after";return new Zn(fe.line,Hn,Tn)}}var ir=function(ao,qo,Mo){for(var ga=function(Ul,Xu){return Xu?new Zn(fe.line,et(Ul,1),"before"):new Zn(fe.line,Ul,"after")};ao>=0&&ao<me.length;ao+=qo){var is=me[ao],Ao=qo>0==(is.level!=1),Rs=Ao?Mo.begin:et(Mo.end,-1);if(is.from<=Rs&&Rs<is.to||(Rs=Ao?is.from:et(is.to,-1),Mo.begin<=Rs&&Rs<Mo.end))return ga(Rs,Ao)}},dr=ir(Ne+he,he,sn);if(dr)return dr;var Mr=he>0?sn.end:et(sn.begin,-1);return Mr!=null&&!(he>0&&Mr==ae.text.length)&&(dr=ir(he>0?0:me.length-1,he,Ct(Mr)),dr)?dr:null}var Dd={selectAll:Us,singleSelection:function(ie){return ie.setSelection(ie.getCursor("anchor"),ie.getCursor("head"),zt)},killLine:function(ie){return pu(ie,function(ae){if(ae.empty()){var fe=wn(ie.doc,ae.head.line).text.length;return ae.head.ch==fe&&ae.head.line<ie.lastLine()?{from:ae.head,to:Zn(ae.head.line+1,0)}:{from:ae.head,to:Zn(ae.head.line,fe)}}else return{from:ae.from(),to:ae.to()}})},deleteLine:function(ie){return pu(ie,function(ae){return{from:Zn(ae.from().line,0),to:Rr(ie.doc,Zn(ae.to().line+1,0))}})},delLineLeft:function(ie){return pu(ie,function(ae){return{from:Zn(ae.from().line,0),to:ae.from()}})},delWrappedLineLeft:function(ie){return pu(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,he=ie.coordsChar({left:0,top:fe},"div");return{from:he,to:ae.from()}})},delWrappedLineRight:function(ie){return pu(ie,function(ae){var fe=ie.charCoords(ae.head,"div").top+5,he=ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"div");return{from:ae.from(),to:he}})},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(Zn(ie.firstLine(),0))},goDocEnd:function(ie){return ie.extendSelection(Zn(ie.lastLine()))},goLineStart:function(ie){return ie.extendSelectionsBy(function(ae){return gh(ie,ae.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(ie){return ie.extendSelectionsBy(function(ae){return ph(ie,ae.head)},{origin:"+move",bias:1})},goLineEnd:function(ie){return ie.extendSelectionsBy(function(ae){return rh(ie,ae.head.line)},{origin:"+move",bias:-1})},goLineRight:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:ie.display.lineDiv.offsetWidth+100,top:fe},"div")},bn)},goLineLeft:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5;return ie.coordsChar({left:0,top:fe},"div")},bn)},goLineLeftSmart:function(ie){return ie.extendSelectionsBy(function(ae){var fe=ie.cursorCoords(ae.head,"div").top+5,he=ie.coordsChar({left:0,top:fe},"div");return he.ch<ie.getLine(he.line).search(/\S/)?ph(ie,ae.head):he},bn)},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=[],fe=ie.listSelections(),he=ie.options.tabSize,me=0;me<fe.length;me++){var Ne=fe[me].from(),Ge=Qe(ie.getLine(Ne.line),Ne.ch,he);ae.push(Mt(he-Ge%he))}ie.replaceSelections(ae)},defaultTab:function(ie){ie.somethingSelected()?ie.indentSelection("add"):ie.execCommand("insertTab")},transposeChars:function(ie){return bi(ie,function(){for(var ae=ie.listSelections(),fe=[],he=0;he<ae.length;he++)if(ae[he].empty()){var me=ae[he].head,Ne=wn(ie.doc,me.line).text;if(Ne){if(me.ch==Ne.length&&(me=new Zn(me.line,me.ch-1)),me.ch>0)me=new Zn(me.line,me.ch+1),ie.replaceRange(Ne.charAt(me.ch-1)+Ne.charAt(me.ch-2),Zn(me.line,me.ch-2),me,"+transpose");else if(me.line>ie.doc.first){var Ge=wn(ie.doc,me.line-1).text;Ge&&(me=new Zn(me.line,1),ie.replaceRange(Ne.charAt(0)+ie.doc.lineSeparator()+Ge.charAt(Ge.length-1),Zn(me.line-1,Ge.length-1),me,"+transpose"))}}fe.push(new zi(me,me))}ie.setSelections(fe)})},newlineAndIndent:function(ie){return bi(ie,function(){for(var ae=ie.listSelections(),fe=ae.length-1;fe>=0;fe--)ie.replaceRange(ie.doc.lineSeparator(),ae[fe].anchor,ae[fe].head,"+input");ae=ie.listSelections();for(var he=0;he<ae.length;he++)ie.indentLine(ae[he].from().line,null,!0);Cc(ie)})},openLine:function(ie){return ie.replaceSelection(`
`,"start")},toggleOverwrite:function(ie){return ie.toggleOverwrite()}};function gh(ie,ae){var fe=wn(ie.doc,ae),he=ws(fe);return he!=fe&&(ae=Wt(he)),zc(!0,ie,he,ae,1)}function rh(ie,ae){var fe=wn(ie.doc,ae),he=Js(fe);return he!=fe&&(ae=Wt(he)),zc(!0,ie,fe,ae,-1)}function ph(ie,ae){var fe=gh(ie,ae.line),he=wn(ie.doc,fe.line),me=Si(he,ie.doc.direction);if(!me||me[0].level==0){var Ne=Math.max(fe.ch,he.text.search(/\S/)),Ge=ae.line==fe.line&&ae.ch<=Ne&&ae.ch;return Zn(fe.line,Ge?0:Ne,fe.sticky)}return fe}function mh(ie,ae,fe){if(typeof ae=="string"&&(ae=Dd[ae],!ae))return!1;ie.display.input.ensurePolled();var he=ie.display.shift,me=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),fe&&(ie.display.shift=!1),me=ae(ie)!=Xn}finally{ie.display.shift=he,ie.state.suppressEdits=!1}return me}function ef(ie,ae,fe){for(var he=0;he<ie.state.keyMaps.length;he++){var me=Qa(ae,ie.state.keyMaps[he],fe,ie);if(me)return me}return ie.options.extraKeys&&Qa(ae,ie.options.extraKeys,fe,ie)||Qa(ae,ie.options.keyMap,fe,ie)}var wd=new Ke;function oh(ie,ae,fe,he){var me=ie.state.keySeq;if(me){if(jl(ae))return"handled";if(/\'$/.test(ae)?ie.state.keySeq=null:wd.set(50,function(){ie.state.keySeq==me&&(ie.state.keySeq=null,ie.display.input.reset())}),tf(ie,me+" "+ae,fe,he))return!0}return tf(ie,ae,fe,he)}function tf(ie,ae,fe,he){var me=ef(ie,ae,he);return me=="multi"&&(ie.state.keySeq=ae),me=="handled"&&oo(ie,"keyHandled",ie,ae,fe),(me=="handled"||me=="multi")&&(Jr(fe),aa(ie)),!!me}function nf(ie,ae){var fe=Bu(ae,!0);return fe?ae.shiftKey&&!ie.state.keySeq?oh(ie,"Shift-"+fe,ae,function(he){return mh(ie,he,!0)})||oh(ie,fe,ae,function(he){if(typeof he=="string"?/^go[A-Z]/.test(he):he.motion)return mh(ie,he)}):oh(ie,fe,ae,function(he){return mh(ie,he)}):!1}function _h(ie,ae,fe){return oh(ie,"'"+fe+"'",ae,function(he){return mh(ie,he,!0)})}var Pd=null;function ml(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&(ae.curOp.focus=Nt(),!mi(ae,ie))){wt&&_e<11&&ie.keyCode==27&&(ie.returnValue=!1);var fe=ie.keyCode;ae.display.shift=fe==16||ie.shiftKey;var he=nf(ae,ie);pt&&(Pd=he?fe:null,!he&&fe==88&&!on&&(ce?ie.metaKey:ie.ctrlKey)&&ae.replaceSelection("",null,"cut")),le&&!ce&&!he&&fe==46&&ie.shiftKey&&!ie.ctrlKey&&document.execCommand&&document.execCommand("cut"),fe==18&&!/\bCodeMirror-crosshair\b/.test(ae.display.lineDiv.className)&&Xs(ae)}}function Xs(ie){var ae=ie.display.lineDiv;Et(ae,"CodeMirror-crosshair");function fe(he){(he.keyCode==18||!he.altKey)&&(We(ae,"CodeMirror-crosshair"),Zr(document,"keyup",fe),Zr(document,"mouseover",fe))}Ti(document,"keyup",fe),Ti(document,"mouseover",fe)}function cc(ie){ie.keyCode==16&&(this.doc.sel.shift=!1),mi(this,ie)}function mu(ie){var ae=this;if(!(ie.target&&ie.target!=ae.display.input.getField())&&!(tn(ae.display,ie)||mi(ae,ie)||ie.ctrlKey&&!ie.altKey||ce&&ie.metaKey)){var fe=ie.keyCode,he=ie.charCode;if(pt&&fe==Pd){Pd=null,Jr(ie);return}if(!(pt&&(!ie.which||ie.which<10)&&nf(ae,ie))){var me=String.fromCharCode(he==null?fe:he);me!="\b"&&(_h(ae,ie,me)||ae.display.input.onKeyPress(ie))}}}var ku=400,qu=function(ie,ae,fe){this.time=ie,this.pos=ae,this.button=fe};qu.prototype.compare=function(ie,ae,fe){return this.time+ku>ie&&Ni(ae,this.pos)==0&&fe==this.button};var Gc,dc;function Td(ie,ae){var fe=+new Date;return dc&&dc.compare(fe,ie,ae)?(Gc=dc=null,"triple"):Gc&&Gc.compare(fe,ie,ae)?(dc=new qu(fe,ie,ae),Gc=null,"double"):(Gc=new qu(fe,ie,ae),dc=null,"single")}function hc(ie){var ae=this,fe=ae.display;if(!(mi(ae,ie)||fe.activeTouch&&fe.input.supportsTouch())){if(fe.input.ensurePolled(),fe.shift=ie.shiftKey,tn(fe,ie)){Ve||(fe.scroller.draggable=!1,setTimeout(function(){return fe.scroller.draggable=!0},100));return}if(!tg(ae,ie)){var he=zo(ae,ie),me=ji(ie),Ne=he?Td(he,me):"single";window.focus(),me==1&&ae.state.selectingText&&ae.state.selectingText(ie),!(he&&_d(ae,me,he,Ne,ie))&&(me==1?he?vh(ae,he,Ne,ie):Xo(ie)==fe.scroller&&Jr(ie):me==2?(he&&nl(ae.doc,he),setTimeout(function(){return fe.input.focus()},20)):me==3&&(Ce?ae.display.input.onContextMenu(ie):Fs(ae)))}}}function _d(ie,ae,fe,he,me){var Ne="Click";return he=="double"?Ne="Double"+Ne:he=="triple"&&(Ne="Triple"+Ne),Ne=(ae==1?"Left":ae==2?"Middle":"Right")+Ne,oh(ie,ic(Ne,me),me,function(Ge){if(typeof Ge=="string"&&(Ge=Dd[Ge]),!Ge)return!1;var et=!1;try{ie.isReadOnly()&&(ie.state.suppressEdits=!0),et=Ge(ie,fe)!=Xn}finally{ie.state.suppressEdits=!1}return et})}function Ed(ie,ae,fe){var he=ie.getOption("configureMouse"),me=he?he(ie,ae,fe):{};if(me.unit==null){var Ne=se?fe.shiftKey&&fe.metaKey:fe.altKey;me.unit=Ne?"rectangle":ae=="single"?"char":ae=="double"?"word":"line"}return(me.extend==null||ie.doc.extend)&&(me.extend=ie.doc.extend||fe.shiftKey),me.addNew==null&&(me.addNew=ce?fe.metaKey:fe.ctrlKey),me.moveOnDrag==null&&(me.moveOnDrag=!(ce?fe.altKey:fe.ctrlKey)),me}function vh(ie,ae,fe,he){wt?setTimeout(Nn(ka,ie),0):ie.curOp.focus=Nt();var me=Ed(ie,fe,he),Ne=ie.doc.sel,Ge;ie.options.dragDrop&&Mi&&!ie.isReadOnly()&&fe=="single"&&(Ge=Ne.contains(ae))>-1&&(Ni((Ge=Ne.ranges[Ge]).from(),ae)<0||ae.xRel>0)&&(Ni(Ge.to(),ae)>0||ae.xRel<0)?wg(ie,he,ae,me):Hp(ie,he,ae,me)}function wg(ie,ae,fe,he){var me=ie.display,Ne=!1,Ge=Vi(ie,function(Ct){Ve&&(me.scroller.draggable=!1),ie.state.draggingText=!1,Zr(me.wrapper.ownerDocument,"mouseup",Ge),Zr(me.wrapper.ownerDocument,"mousemove",et),Zr(me.scroller,"dragstart",$e),Zr(me.scroller,"drop",Ge),Ne||(Jr(Ct),he.addNew||nl(ie.doc,fe,null,null,he.extend),Ve&&!Rt||wt&&_e==9?setTimeout(function(){me.wrapper.ownerDocument.body.focus({preventScroll:!0}),me.input.focus()},20):me.input.focus())}),et=function(Ct){Ne=Ne||Math.abs(ae.clientX-Ct.clientX)+Math.abs(ae.clientY-Ct.clientY)>=10},$e=function(){return Ne=!0};Ve&&(me.scroller.draggable=!0),ie.state.draggingText=Ge,Ge.copy=!he.moveOnDrag,me.scroller.dragDrop&&me.scroller.dragDrop(),Ti(me.wrapper.ownerDocument,"mouseup",Ge),Ti(me.wrapper.ownerDocument,"mousemove",et),Ti(me.scroller,"dragstart",$e),Ti(me.scroller,"drop",Ge),Fs(ie),setTimeout(function(){return me.input.focus()},20)}function Pg(ie,ae,fe){if(fe=="char")return new zi(ae,ae);if(fe=="word")return ie.findWordAt(ae);if(fe=="line")return new zi(Zn(ae.line,0),Rr(ie.doc,Zn(ae.line+1,0)));var he=fe(ie,ae);return new zi(he.from,he.to)}function Hp(ie,ae,fe,he){var me=ie.display,Ne=ie.doc;Jr(ae);var Ge,et,$e=Ne.sel,Ct=$e.ranges;if(he.addNew&&!he.extend?(et=Ne.sel.contains(fe),et>-1?Ge=Ct[et]:Ge=new zi(fe,fe)):(Ge=Ne.sel.primary(),et=Ne.sel.primIndex),he.unit=="rectangle")he.addNew||(Ge=new zi(fe,fe)),fe=zo(ie,ae,!0,!0),et=-1;else{var sn=Pg(ie,fe,he.unit);he.extend?Ge=Gs(Ge,sn.anchor,sn.head,he.extend):Ge=sn}he.addNew?et==-1?(et=Ct.length,qr(Ne,cr(ie,Ct.concat([Ge]),et),{scroll:!1,origin:"*mouse"})):Ct.length>1&&Ct[et].empty()&&he.unit=="char"&&!he.extend?(qr(Ne,cr(ie,Ct.slice(0,et).concat(Ct.slice(et+1)),0),{scroll:!1,origin:"*mouse"}),$e=Ne.sel):el(Ne,et,Ge,kn):(et=0,qr(Ne,new Ui([Ge],0),kn),$e=Ne.sel);var Dt=fe;function Hn(Mo){if(Ni(Dt,Mo)!=0)if(Dt=Mo,he.unit=="rectangle"){for(var ga=[],is=ie.options.tabSize,Ao=Qe(wn(Ne,fe.line).text,fe.ch,is),Rs=Qe(wn(Ne,Mo.line).text,Mo.ch,is),Ul=Math.min(Ao,Rs),Xu=Math.max(Ao,Rs),su=Math.min(fe.line,Mo.line),Hc=Math.min(ie.lastLine(),Math.max(fe.line,Mo.line));su<=Hc;su++){var fc=wn(Ne,su).text,Ru=oi(fc,Ul,is);Ul==Xu?ga.push(new zi(Zn(su,Ru),Zn(su,Ru))):fc.length>Ru&&ga.push(new zi(Zn(su,Ru),Zn(su,oi(fc,Xu,is))))}ga.length||ga.push(new zi(fe,fe)),qr(Ne,cr(ie,$e.ranges.slice(0,et).concat(ga),et),{origin:"*mouse",scroll:!1}),ie.scrollIntoView(Mo)}else{var Wc=Ge,rc=Pg(ie,Mo,he.unit),ju=Wc.anchor,cl;Ni(rc.anchor,ju)>0?(cl=rc.head,ju=Ar(Wc.from(),rc.anchor)):(cl=rc.anchor,ju=qa(Wc.to(),rc.head));var lu=$e.ranges.slice(0);lu[et]=qg(ie,new zi(Rr(Ne,ju),cl)),qr(Ne,cr(ie,lu,et),kn)}}var Tn=me.wrapper.getBoundingClientRect(),ir=0;function dr(Mo){var ga=++ir,is=zo(ie,Mo,!0,he.unit=="rectangle");if(is)if(Ni(is,Dt)!=0){ie.curOp.focus=Nt(),Hn(is);var Ao=jo(me,Ne);(is.line>=Ao.to||is.line<Ao.from)&&setTimeout(Vi(ie,function(){ir==ga&&dr(Mo)}),150)}else{var Rs=Mo.clientY<Tn.top?-20:Mo.clientY>Tn.bottom?20:0;Rs&&setTimeout(Vi(ie,function(){ir==ga&&(me.scroller.scrollTop+=Rs,dr(Mo))}),50)}}function Mr(Mo){ie.state.selectingText=!1,ir=1/0,Mo&&(Jr(Mo),me.input.focus()),Zr(me.wrapper.ownerDocument,"mousemove",ao),Zr(me.wrapper.ownerDocument,"mouseup",qo),Ne.history.lastSelOrigin=null}var ao=Vi(ie,function(Mo){Mo.buttons===0||!ji(Mo)?Mr(Mo):dr(Mo)}),qo=Vi(ie,Mr);ie.state.selectingText=qo,Ti(me.wrapper.ownerDocument,"mousemove",ao),Ti(me.wrapper.ownerDocument,"mouseup",qo)}function qg(ie,ae){var fe=ae.anchor,he=ae.head,me=wn(ie.doc,fe.line);if(Ni(fe,he)==0&&fe.sticky==he.sticky)return ae;var Ne=Si(me);if(!Ne)return ae;var Ge=en(Ne,fe.ch,fe.sticky),et=Ne[Ge];if(et.from!=fe.ch&&et.to!=fe.ch)return ae;var $e=Ge+(et.from==fe.ch==(et.level!=1)?0:1);if($e==0||$e==Ne.length)return ae;var Ct;if(he.line!=fe.line)Ct=(he.line-fe.line)*(ie.doc.direction=="ltr"?1:-1)>0;else{var sn=en(Ne,he.ch,he.sticky),Dt=sn-Ge||(he.ch-fe.ch)*(et.level==1?-1:1);sn==$e-1||sn==$e?Ct=Dt<0:Ct=Dt>0}var Hn=Ne[$e+(Ct?-1:0)],Tn=Ct==(Hn.level==1),ir=Tn?Hn.from:Hn.to,dr=Tn?"after":"before";return fe.ch==ir&&fe.sticky==dr?ae:new zi(new Zn(fe.line,ir,dr),he)}function yh(ie,ae,fe,he){var me,Ne;if(ae.touches)me=ae.touches[0].clientX,Ne=ae.touches[0].clientY;else try{me=ae.clientX,Ne=ae.clientY}catch(Hn){return!1}if(me>=Math.floor(ie.display.gutters.getBoundingClientRect().right))return!1;he&&Jr(ae);var Ge=ie.display,et=Ge.lineDiv.getBoundingClientRect();if(Ne>et.bottom||!jn(ie,fe))return hr(ae);Ne-=et.top-Ge.viewOffset;for(var $e=0;$e<ie.display.gutterSpecs.length;++$e){var Ct=Ge.gutters.childNodes[$e];if(Ct&&Ct.getBoundingClientRect().right>=me){var sn=Yi(ie.doc,Ne),Dt=ie.display.gutterSpecs[$e];return Fi(ie,fe,ie,sn,Dt.className,ae),hr(ae)}}}function tg(ie,ae){return yh(ie,ae,"gutterClick",!0)}function Lf(ie,ae){tn(ie.display,ae)||ep(ie,ae)||mi(ie,ae,"contextmenu")||Ce||ie.display.input.onContextMenu(ae)}function ep(ie,ae){return jn(ie,"gutterContextMenu")?yh(ie,ae,"gutterContextMenu",!1):!1}function ng(ie){ie.display.wrapper.className=ie.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+ie.options.theme.replace(/(^|\s)\s*/g," cm-s-"),_s(ie)}var Oh={toString:function(){return"CodeMirror.Init"}},Eg={},Ih={};function tp(ie){var ae=ie.optionHandlers;function fe(he,me,Ne,Ge){ie.defaults[he]=me,Ne&&(ae[he]=Ge?function(et,$e,Ct){Ct!=Oh&&Ne(et,$e,Ct)}:Ne)}ie.defineOption=fe,ie.Init=Oh,fe("value","",function(he,me){return he.setValue(me)},!0),fe("mode",null,function(he,me){he.doc.modeOption=me,or(he)},!0),fe("indentUnit",2,or,!0),fe("indentWithTabs",!1),fe("smartIndent",!0),fe("tabSize",4,function(he){_o(he),_s(he),vi(he)},!0),fe("lineSeparator",null,function(he,me){if(he.doc.lineSep=me,!!me){var Ne=[],Ge=he.doc.first;he.doc.iter(function($e){for(var Ct=0;;){var sn=$e.text.indexOf(me,Ct);if(sn==-1)break;Ct=sn+me.length,Ne.push(Zn(Ge,sn))}Ge++});for(var et=Ne.length-1;et>=0;et--)Ks(he.doc,me,Ne[et],Zn(Ne[et].line,Ne[et].ch+me.length))}}),fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(he,me,Ne){he.state.specialChars=new RegExp(me.source+(me.test(" ")?"":"| "),"g"),Ne!=Oh&&he.refresh()}),fe("specialCharPlaceholder",Gl,function(he){return he.refresh()},!0),fe("electricChars",!0),fe("inputStyle",te?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),fe("spellcheck",!1,function(he,me){return he.getInputField().spellcheck=me},!0),fe("autocorrect",!1,function(he,me){return he.getInputField().autocorrect=me},!0),fe("autocapitalize",!1,function(he,me){return he.getInputField().autocapitalize=me},!0),fe("rtlMoveVisually",!ge),fe("wholeLineUpdateBefore",!0),fe("theme","default",function(he){ng(he),Dn(he)},!0),fe("keyMap","default",function(he,me,Ne){var Ge=Ku(me),et=Ne!=Oh&&Ku(Ne);et&&et.detach&&et.detach(he,Ge),Ge.attach&&Ge.attach(he,et||null)}),fe("extraKeys",null),fe("configureMouse",null),fe("lineWrapping",!1,np,!0),fe("gutters",[],function(he,me){he.display.gutterSpecs=Xt(me,he.options.lineNumbers),Dn(he)},!0),fe("fixedGutter",!0,function(he,me){he.display.gutters.style.left=me?Lr(he.display)+"px":"0",he.refresh()},!0),fe("coverGutterNextToScrollbar",!1,function(he){return Wn(he)},!0),fe("scrollbarStyle","native",function(he){nr(he),Wn(he),he.display.scrollbars.setScrollTop(he.doc.scrollTop),he.display.scrollbars.setScrollLeft(he.doc.scrollLeft)},!0),fe("lineNumbers",!1,function(he,me){he.display.gutterSpecs=Xt(he.options.gutters,me),Dn(he)},!0),fe("firstLineNumber",1,Dn,!0),fe("lineNumberFormatter",function(he){return he},Dn,!0),fe("showCursorWhenSelecting",!1,yr,!0),fe("resetSelectionOnContextMenu",!0),fe("lineWiseCopyCut",!0),fe("pasteLinesPerSelection",!0),fe("selectionsMayTouch",!1),fe("readOnly",!1,function(he,me){me=="nocursor"&&(Xl(he),he.display.input.blur()),he.display.input.readOnlyChanged(me)}),fe("screenReaderLabel",null,function(he,me){me=me===""?null:me,he.display.input.screenReaderLabelChanged(me)}),fe("disableInput",!1,function(he,me){me||he.display.input.reset()},!0),fe("dragDrop",!0,ig),fe("allowDropFileTypes",null),fe("cursorBlinkRate",530),fe("cursorScrollMargin",0),fe("cursorHeight",1,yr,!0),fe("singleCursorHeightPerLine",!0,yr,!0),fe("workTime",100),fe("workDelay",100),fe("flattenSpans",!0,_o,!0),fe("addModeClass",!1,_o,!0),fe("pollInterval",100),fe("undoDepth",200,function(he,me){return he.doc.history.undoDepth=me}),fe("historyEventDelay",1250),fe("viewportMargin",10,function(he){return he.refresh()},!0),fe("maxHighlightLength",1e4,_o,!0),fe("moveInputWithCursor",!0,function(he,me){me||he.display.input.resetPosition()}),fe("tabindex",null,function(he,me){return he.display.input.getField().tabIndex=me||""}),fe("autofocus",null),fe("direction","ltr",function(he,me){return he.doc.setDirection(me)},!0),fe("phrases",null)}function ig(ie,ae,fe){var he=fe&&fe!=Oh;if(!ae!=!he){var me=ie.display.dragFunctions,Ne=ae?Ti:Zr;Ne(ie.display.scroller,"dragstart",me.start),Ne(ie.display.scroller,"dragenter",me.enter),Ne(ie.display.scroller,"dragover",me.over),Ne(ie.display.scroller,"dragleave",me.leave),Ne(ie.display.scroller,"drop",me.drop)}}function np(ie){ie.options.lineWrapping?(Et(ie.display.wrapper,"CodeMirror-wrap"),ie.display.sizer.style.minWidth="",ie.display.sizerWidth=null):(We(ie.display.wrapper,"CodeMirror-wrap"),Ps(ie)),mr(ie),vi(ie),_s(ie),setTimeout(function(){return Wn(ie)},100)}function ul(ie,ae){var fe=this;if(!(this instanceof ul))return new ul(ie,ae);this.options=ae=ae?fn(ae):{},fn(Eg,ae,!1);var he=ae.value;typeof he=="string"?he=new Ba(he,ae.mode,null,ae.lineSeparator,ae.direction):ae.mode&&(he.modeOption=ae.mode),this.doc=he;var me=new ul.inputStyles[ae.inputStyle](this),Ne=this.display=new di(ie,he,me,ae);Ne.wrapper.CodeMirror=this,ng(this),ae.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),nr(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 Ke,keySeq:null,specialChars:null},ae.autofocus&&!te&&Ne.input.focus(),wt&&_e<11&&setTimeout(function(){return fe.display.input.reset(!0)},20),rf(this),tl(),Zi(this),this.curOp.forceUpdate=!0,Qr(this,he),ae.autofocus&&!te||this.hasFocus()?setTimeout(function(){fe.hasFocus()&&!fe.state.focused&&Kr(fe)},20):Xl(this);for(var Ge in Ih)Ih.hasOwnProperty(Ge)&&Ih[Ge](this,ae[Ge],Oh);gt(this),ae.finishInit&&ae.finishInit(this);for(var et=0;et<Sh.length;++et)Sh[et](this);Li(this),Ve&&ae.lineWrapping&&getComputedStyle(Ne.lineDiv).textRendering=="optimizelegibility"&&(Ne.lineDiv.style.textRendering="auto")}ul.defaults=Eg,ul.optionHandlers=Ih;function rf(ie){var ae=ie.display;Ti(ae.scroller,"mousedown",Vi(ie,hc)),wt&&_e<11?Ti(ae.scroller,"dblclick",Vi(ie,function($e){if(!mi(ie,$e)){var Ct=zo(ie,$e);if(!(!Ct||tg(ie,$e)||tn(ie.display,$e))){Jr($e);var sn=ie.findWordAt(Ct);nl(ie.doc,sn.anchor,sn.head)}}})):Ti(ae.scroller,"dblclick",function($e){return mi(ie,$e)||Jr($e)}),Ti(ae.scroller,"contextmenu",function($e){return Lf(ie,$e)}),Ti(ae.input.getField(),"contextmenu",function($e){ae.scroller.contains($e.target)||Lf(ie,$e)});var fe,he={end:0};function me(){ae.activeTouch&&(fe=setTimeout(function(){return ae.activeTouch=null},1e3),he=ae.activeTouch,he.end=+new Date)}function Ne($e){if($e.touches.length!=1)return!1;var Ct=$e.touches[0];return Ct.radiusX<=1&&Ct.radiusY<=1}function Ge($e,Ct){if(Ct.left==null)return!0;var sn=Ct.left-$e.left,Dt=Ct.top-$e.top;return sn*sn+Dt*Dt>20*20}Ti(ae.scroller,"touchstart",function($e){if(!mi(ie,$e)&&!Ne($e)&&!tg(ie,$e)){ae.input.ensurePolled(),clearTimeout(fe);var Ct=+new Date;ae.activeTouch={start:Ct,moved:!1,prev:Ct-he.end<=300?he:null},$e.touches.length==1&&(ae.activeTouch.left=$e.touches[0].pageX,ae.activeTouch.top=$e.touches[0].pageY)}}),Ti(ae.scroller,"touchmove",function(){ae.activeTouch&&(ae.activeTouch.moved=!0)}),Ti(ae.scroller,"touchend",function($e){var Ct=ae.activeTouch;if(Ct&&!tn(ae,$e)&&Ct.left!=null&&!Ct.moved&&new Date-Ct.start<300){var sn=ie.coordsChar(ae.activeTouch,"page"),Dt;!Ct.prev||Ge(Ct,Ct.prev)?Dt=new zi(sn,sn):!Ct.prev.prev||Ge(Ct,Ct.prev.prev)?Dt=ie.findWordAt(sn):Dt=new zi(Zn(sn.line,0),Rr(ie.doc,Zn(sn.line+1,0))),ie.setSelection(Dt.anchor,Dt.head),ie.focus(),Jr($e)}me()}),Ti(ae.scroller,"touchcancel",me),Ti(ae.scroller,"scroll",function(){ae.scroller.clientHeight&&(bt(ie,ae.scroller.scrollTop),Tt(ie,ae.scroller.scrollLeft,!0),Fi(ie,"scroll",ie))}),Ti(ae.scroller,"mousewheel",function($e){return Pr(ie,$e)}),Ti(ae.scroller,"DOMMouseScroll",function($e){return Pr(ie,$e)}),Ti(ae.wrapper,"scroll",function(){return ae.wrapper.scrollTop=ae.wrapper.scrollLeft=0}),ae.dragFunctions={enter:function($e){mi(ie,$e)||Nr($e)},over:function($e){mi(ie,$e)||(Ms(ie,$e),Nr($e))},start:function($e){return Ua(ie,$e)},drop:Vi(ie,Nu),leave:function($e){mi(ie,$e)||us(ie)}};var et=ae.input.getField();Ti(et,"keyup",function($e){return cc.call(ie,$e)}),Ti(et,"keydown",Vi(ie,ml)),Ti(et,"keypress",Vi(ie,mu)),Ti(et,"focus",function($e){return Kr(ie,$e)}),Ti(et,"blur",function($e){return Xl(ie,$e)})}var Sh=[];ul.defineInitHook=function(ie){return Sh.push(ie)};function Yu(ie,ae,fe,he){var me=ie.doc,Ne;fe==null&&(fe="add"),fe=="smart"&&(me.mode.indent?Ne=as(ie,ae).state:fe="prev");var Ge=ie.options.tabSize,et=wn(me,ae),$e=Qe(et.text,null,Ge);et.stateAfter&&(et.stateAfter=null);var Ct=et.text.match(/^\s*/)[0],sn;if(!he&&!/\S/.test(et.text))sn=0,fe="not";else if(fe=="smart"&&(sn=me.mode.indent(Ne,et.text.slice(Ct.length),et.text),sn==Xn||sn>150)){if(!he)return;fe="prev"}fe=="prev"?ae>me.first?sn=Qe(wn(me,ae-1).text,null,Ge):sn=0:fe=="add"?sn=$e+ie.options.indentUnit:fe=="subtract"?sn=$e-ie.options.indentUnit:typeof fe=="number"&&(sn=$e+fe),sn=Math.max(0,sn);var Dt="",Hn=0;if(ie.options.indentWithTabs)for(var Tn=Math.floor(sn/Ge);Tn;--Tn)Hn+=Ge,Dt+=" ";if(Hn<sn&&(Dt+=Mt(sn-Hn)),Dt!=Ct)return Ks(me,Dt,Zn(ae,0),Zn(ae,Ct.length),"+input"),et.stateAfter=null,!0;for(var ir=0;ir<me.sel.ranges.length;ir++){var dr=me.sel.ranges[ir];if(dr.head.line==ae&&dr.head.ch<Ct.length){var Mr=Zn(ae,Ct.length);el(me,ir,new zi(Mr,Mr));break}}}var Lc=null;function of(ie){Lc=ie}function Rh(ie,ae,fe,he,me){var Ne=ie.doc;ie.display.shift=!1,he||(he=Ne.sel);var Ge=+new Date-200,et=me=="paste"||ie.state.pasteIncoming>Ge,$e=En(ae),Ct=null;if(et&&he.ranges.length>1)if(Lc&&Lc.text.join(`
`)==ae){if(he.ranges.length%Lc.text.length==0){Ct=[];for(var sn=0;sn<Lc.text.length;sn++)Ct.push(Ne.splitLines(Lc.text[sn]))}}else $e.length==he.ranges.length&&ie.options.pasteLinesPerSelection&&(Ct=mn($e,function(ao){return[ao]}));for(var Dt=ie.curOp.updateInput,Hn=he.ranges.length-1;Hn>=0;Hn--){var Tn=he.ranges[Hn],ir=Tn.from(),dr=Tn.to();Tn.empty()&&(fe&&fe>0?ir=Zn(ir.line,ir.ch-fe):ie.state.overwrite&&!et?dr=Zn(dr.line,Math.min(wn(Ne,dr.line).text.length,dr.ch+_t($e).length)):et&&Lc&&Lc.lineWise&&Lc.text.join(`
`)==$e.join(`
`)&&(ir=dr=Zn(ir.line,0)));var Mr={from:ir,to:dr,text:Ct?Ct[Hn%Ct.length]:$e,origin:me||(et?"paste":ie.state.cutIncoming>Ge?"cut":"+input")};$s(ie.doc,Mr),oo(ie,"inputRead",ie,Mr)}ae&&!et&&bg(ie,ae),Cc(ie),ie.curOp.updateInput<2&&(ie.curOp.updateInput=Dt),ie.curOp.typing=!0,ie.state.pasteIncoming=ie.state.cutIncoming=-1}function Cg(ie,ae){var fe=ie.clipboardData&&ie.clipboardData.getData("Text");if(fe)return ie.preventDefault(),!ae.isReadOnly()&&!ae.options.disableInput&&bi(ae,function(){return Rh(ae,fe,0,null,"paste")}),!0}function bg(ie,ae){if(!(!ie.options.electricChars||!ie.options.smartIndent))for(var fe=ie.doc.sel,he=fe.ranges.length-1;he>=0;he--){var me=fe.ranges[he];if(!(me.head.ch>100||he&&fe.ranges[he-1].head.line==me.head.line)){var Ne=ie.getModeAt(me.head),Ge=!1;if(Ne.electricChars){for(var et=0;et<Ne.electricChars.length;et++)if(ae.indexOf(Ne.electricChars.charAt(et))>-1){Ge=Yu(ie,me.head.line,"smart");break}}else Ne.electricInput&&Ne.electricInput.test(wn(ie.doc,me.head.line).text.slice(0,me.head.ch))&&(Ge=Yu(ie,me.head.line,"smart"));Ge&&oo(ie,"electricInput",ie,me.head.line)}}}function Fg(ie){for(var ae=[],fe=[],he=0;he<ie.doc.sel.ranges.length;he++){var me=ie.doc.sel.ranges[he].head.line,Ne={anchor:Zn(me,0),head:Zn(me+1,0)};fe.push(Ne),ae.push(ie.getRange(Ne.anchor,Ne.head))}return{text:ae,ranges:fe}}function Lg(ie,ae,fe,he){ie.setAttribute("autocorrect",fe?"":"off"),ie.setAttribute("autocapitalize",he?"":"off"),ie.setAttribute("spellcheck",!!ae)}function Mg(){var ie=nt("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),ae=nt("div",[ie],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return Ve?ie.style.width="1000px":ie.setAttribute("wrap","off"),Te&&(ie.style.border="1px solid black"),Lg(ie),ae}function xh(ie){var ae=ie.optionHandlers,fe=ie.helpers={};ie.prototype={constructor:ie,focus:function(){window.focus(),this.display.input.focus()},setOption:function(he,me){var Ne=this.options,Ge=Ne[he];Ne[he]==me&&he!="mode"||(Ne[he]=me,ae.hasOwnProperty(he)&&Vi(this,ae[he])(this,me,Ge),Fi(this,"optionChange",this,he))},getOption:function(he){return this.options[he]},getDoc:function(){return this.doc},addKeyMap:function(he,me){this.state.keyMaps[me?"push":"unshift"](Ku(he))},removeKeyMap:function(he){for(var me=this.state.keyMaps,Ne=0;Ne<me.length;++Ne)if(me[Ne]==he||me[Ne].name==he)return me.splice(Ne,1),!0},addOverlay:ni(function(he,me){var Ne=he.token?he:ie.getMode(this.options,he);if(Ne.startState)throw new Error("Overlays may not be stateful.");rn(this.state.overlays,{mode:Ne,modeSpec:he,opaque:me&&me.opaque,priority:me&&me.priority||0},function(Ge){return Ge.priority}),this.state.modeGen++,vi(this)}),removeOverlay:ni(function(he){for(var me=this.state.overlays,Ne=0;Ne<me.length;++Ne){var Ge=me[Ne].modeSpec;if(Ge==he||typeof he=="string"&&Ge.name==he){me.splice(Ne,1),this.state.modeGen++,vi(this);return}}}),indentLine:ni(function(he,me,Ne){typeof me!="string"&&typeof me!="number"&&(me==null?me=this.options.smartIndent?"smart":"prev":me=me?"add":"subtract"),pr(this.doc,he)&&Yu(this,he,me,Ne)}),indentSelection:ni(function(he){for(var me=this.doc.sel.ranges,Ne=-1,Ge=0;Ge<me.length;Ge++){var et=me[Ge];if(et.empty())et.head.line>Ne&&(Yu(this,et.head.line,he,!0),Ne=et.head.line,Ge==this.doc.sel.primIndex&&Cc(this));else{var $e=et.from(),Ct=et.to(),sn=Math.max(Ne,$e.line);Ne=Math.min(this.lastLine(),Ct.line-(Ct.ch?0:1))+1;for(var Dt=sn;Dt<Ne;++Dt)Yu(this,Dt,he);var Hn=this.doc.sel.ranges;$e.ch==0&&me.length==Hn.length&&Hn[Ge].from().ch>0&&el(this.doc,Ge,new zi($e,Hn[Ge].to()),zt)}}}),getTokenAt:function(he,me){return vs(this,he,me)},getLineTokens:function(he,me){return vs(this,Zn(he),me,!0)},getTokenTypeAt:function(he){he=Rr(this.doc,he);var me=ms(this,wn(this.doc,he.line)),Ne=0,Ge=(me.length-1)/2,et=he.ch,$e;if(et==0)$e=me[2];else for(;;){var Ct=Ne+Ge>>1;if((Ct?me[Ct*2-1]:0)>=et)Ge=Ct;else if(me[Ct*2+1]<et)Ne=Ct+1;else{$e=me[Ct*2+2];break}}var sn=$e?$e.indexOf("overlay "):-1;return sn<0?$e:sn==0?null:$e.slice(0,sn-1)},getModeAt:function(he){var me=this.doc.mode;return me.innerMode?ie.innerMode(me,this.getTokenAt(he).state).mode:me},getHelper:function(he,me){return this.getHelpers(he,me)[0]},getHelpers:function(he,me){var Ne=[];if(!fe.hasOwnProperty(me))return Ne;var Ge=fe[me],et=this.getModeAt(he);if(typeof et[me]=="string")Ge[et[me]]&&Ne.push(Ge[et[me]]);else if(et[me])for(var $e=0;$e<et[me].length;$e++){var Ct=Ge[et[me][$e]];Ct&&Ne.push(Ct)}else et.helperType&&Ge[et.helperType]?Ne.push(Ge[et.helperType]):Ge[et.name]&&Ne.push(Ge[et.name]);for(var sn=0;sn<Ge._global.length;sn++){var Dt=Ge._global[sn];Dt.pred(et,this)&&Je(Ne,Dt.val)==-1&&Ne.push(Dt.val)}return Ne},getStateAfter:function(he,me){var Ne=this.doc;return he=br(Ne,he==null?Ne.first+Ne.size-1:he),as(this,he+1,me).state},cursorCoords:function(he,me){var Ne,Ge=this.doc.sel.primary();return he==null?Ne=Ge.head:typeof he=="object"?Ne=Rr(this.doc,he):Ne=he?Ge.from():Ge.to(),Ia(this,Ne,me||"page")},charCoords:function(he,me){return Aa(this,Rr(this.doc,he),me||"page")},coordsChar:function(he,me){return he=Ns(this,he,me||"page"),fu(this,he.left,he.top)},lineAtHeight:function(he,me){return he=Ns(this,{top:he,left:0},me||"page").top,Yi(this.doc,he+this.display.viewOffset)},heightAtLine:function(he,me,Ne){var Ge=!1,et;if(typeof he=="number"){var $e=this.doc.first+this.doc.size-1;he<this.doc.first?he=this.doc.first:he>$e&&(he=$e,Ge=!0),et=wn(this.doc,he)}else et=he;return zr(this,et,{top:0,left:0},me||"page",Ne||Ge).top+(Ge?this.doc.height-io(et):0)},defaultTextHeight:function(){return tr(this.display)},defaultCharWidth:function(){return Yn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(he,me,Ne,Ge,et){var $e=this.display;he=Ia(this,Rr(this.doc,he));var Ct=he.bottom,sn=he.left;if(me.style.position="absolute",me.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(me),$e.sizer.appendChild(me),Ge=="over")Ct=he.top;else if(Ge=="above"||Ge=="near"){var Dt=Math.max($e.wrapper.clientHeight,this.doc.height),Hn=Math.max($e.sizer.clientWidth,$e.lineSpace.clientWidth);(Ge=="above"||he.bottom+me.offsetHeight>Dt)&&he.top>me.offsetHeight?Ct=he.top-me.offsetHeight:he.bottom+me.offsetHeight<=Dt&&(Ct=he.bottom),sn+me.offsetWidth>Hn&&(sn=Hn-me.offsetWidth)}me.style.top=Ct+"px",me.style.left=me.style.right="",et=="right"?(sn=$e.sizer.clientWidth-me.offsetWidth,me.style.right="0px"):(et=="left"?sn=0:et=="middle"&&(sn=($e.sizer.clientWidth-me.offsetWidth)/2),me.style.left=sn+"px"),Ne&&Rl(this,{left:sn,top:Ct,right:sn+me.offsetWidth,bottom:Ct+me.offsetHeight})},triggerOnKeyDown:ni(ml),triggerOnKeyPress:ni(mu),triggerOnKeyUp:cc,triggerOnMouseDown:ni(hc),execCommand:function(he){if(Dd.hasOwnProperty(he))return Dd[he].call(null,this)},triggerElectric:ni(function(he){bg(this,he)}),findPosH:function(he,me,Ne,Ge){var et=1;me<0&&(et=-1,me=-me);for(var $e=Rr(this.doc,he),Ct=0;Ct<me&&($e=Mf(this.doc,$e,et,Ne,Ge),!$e.hitSide);++Ct);return $e},moveH:ni(function(he,me){var Ne=this;this.extendSelectionsBy(function(Ge){return Ne.display.shift||Ne.doc.extend||Ge.empty()?Mf(Ne.doc,Ge.head,he,me,Ne.options.rtlMoveVisually):he<0?Ge.from():Ge.to()},bn)}),deleteH:ni(function(he,me){var Ne=this.doc.sel,Ge=this.doc;Ne.somethingSelected()?Ge.replaceSelection("",null,"+delete"):pu(this,function(et){var $e=Mf(Ge,et.head,he,me,!1);return he<0?{from:$e,to:et.head}:{from:et.head,to:$e}})}),findPosV:function(he,me,Ne,Ge){var et=1,$e=Ge;me<0&&(et=-1,me=-me);for(var Ct=Rr(this.doc,he),sn=0;sn<me;++sn){var Dt=Ia(this,Ct,"div");if($e==null?$e=Dt.left:Dt.left=$e,Ct=ah(this,Dt,et,Ne),Ct.hitSide)break}return Ct},moveV:ni(function(he,me){var Ne=this,Ge=this.doc,et=[],$e=!this.display.shift&&!Ge.extend&&Ge.sel.somethingSelected();if(Ge.extendSelectionsBy(function(sn){if($e)return he<0?sn.from():sn.to();var Dt=Ia(Ne,sn.head,"div");sn.goalColumn!=null&&(Dt.left=sn.goalColumn),et.push(Dt.left);var Hn=ah(Ne,Dt,he,me);return me=="page"&&sn==Ge.sel.primary()&&ad(Ne,Aa(Ne,Hn,"div").top-Dt.top),Hn},bn),et.length)for(var Ct=0;Ct<Ge.sel.ranges.length;Ct++)Ge.sel.ranges[Ct].goalColumn=et[Ct]}),findWordAt:function(he){var me=this.doc,Ne=wn(me,he.line).text,Ge=he.ch,et=he.ch;if(Ne){var $e=this.getHelper(he,"wordChars");(he.sticky=="before"||et==Ne.length)&&Ge?--Ge:++et;for(var Ct=Ne.charAt(Ge),sn=Ue(Ct,$e)?function(Dt){return Ue(Dt,$e)}:/\s/.test(Ct)?function(Dt){return/\s/.test(Dt)}:function(Dt){return!/\s/.test(Dt)&&!Ue(Dt)};Ge>0&&sn(Ne.charAt(Ge-1));)--Ge;for(;et<Ne.length&&sn(Ne.charAt(et));)++et}return new zi(Zn(he.line,Ge),Zn(he.line,et))},toggleOverwrite:function(he){he!=null&&he==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?Et(this.display.cursorDiv,"CodeMirror-overwrite"):We(this.display.cursorDiv,"CodeMirror-overwrite"),Fi(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Nt()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:ni(function(he,me){bc(this,he,me)}),getScrollInfo:function(){var he=this.display.scroller;return{left:he.scrollLeft,top:he.scrollTop,height:he.scrollHeight-Wi(this)-this.display.barHeight,width:he.scrollWidth-Wi(this)-this.display.barWidth,clientHeight:ki(this),clientWidth:Bi(this)}},scrollIntoView:ni(function(he,me){he==null?(he={from:this.doc.sel.primary().head,to:null},me==null&&(me=this.options.cursorScrollMargin)):typeof he=="number"?he={from:Zn(he,0),to:null}:he.from==null&&(he={from:he,to:null}),he.to||(he.to=he.from),he.margin=me||0,he.from.line!=null?uo(this,he):Ye(this,he.from,he.to,he.margin)}),setSize:ni(function(he,me){var Ne=this,Ge=function($e){return typeof $e=="number"||/^\d+$/.test(String($e))?$e+"px":$e};he!=null&&(this.display.wrapper.style.width=Ge(he)),me!=null&&(this.display.wrapper.style.height=Ge(me)),this.options.lineWrapping&&Ts(this);var et=this.display.viewFrom;this.doc.iter(et,this.display.viewTo,function($e){if($e.widgets){for(var Ct=0;Ct<$e.widgets.length;Ct++)if($e.widgets[Ct].noHScroll){Ai(Ne,et,"widget");break}}++et}),this.curOp.forceUpdate=!0,Fi(this,"refresh",this)}),operation:function(he){return bi(this,he)},startOperation:function(){return Zi(this)},endOperation:function(){return Li(this)},refresh:ni(function(){var he=this.display.cachedTextHeight;vi(this),this.curOp.forceUpdate=!0,_s(this),bc(this,this.doc.scrollLeft,this.doc.scrollTop),ke(this.display),(he==null||Math.abs(he-tr(this.display))>.5||this.options.lineWrapping)&&mr(this),Fi(this,"refresh",this)}),swapDoc:ni(function(he){var me=this.doc;return me.cm=null,this.state.selectingText&&this.state.selectingText(),Qr(this,he),_s(this),this.display.input.reset(),bc(this,he.scrollLeft,he.scrollTop),this.curOp.forceScroll=!0,oo(this,"swapDoc",this,me),me}),phrase:function(he){var me=this.options.phrases;return me&&Object.prototype.hasOwnProperty.call(me,he)?me[he]:he},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}},yn(ie),ie.registerHelper=function(he,me,Ne){fe.hasOwnProperty(he)||(fe[he]=ie[he]={_global:[]}),fe[he][me]=Ne},ie.registerGlobalHelper=function(he,me,Ne,Ge){ie.registerHelper(he,me,Ge),fe[he]._global.push({pred:Ne,val:Ge})}}function Mf(ie,ae,fe,he,me){var Ne=ae,Ge=fe,et=wn(ie,ae.line),$e=me&&ie.direction=="rtl"?-fe:fe;function Ct(){var qo=ae.line+$e;return qo<ie.first||qo>=ie.first+ie.size?!1:(ae=new Zn(qo,ae.ch,ae.sticky),et=wn(ie,qo))}function sn(qo){var Mo;if(he=="codepoint"){var ga=et.text.charCodeAt(ae.ch+(he>0?0:-1));isNaN(ga)?Mo=null:Mo=new Zn(ae.line,Math.max(0,Math.min(et.text.length,ae.ch+fe*(ga>=55296&&ga<56320?2:1))),-fe)}else me?Mo=qh(ie.cm,et,ae,fe):Mo=Dl(et,ae,fe);if(Mo==null)if(!qo&&Ct())ae=zc(me,ie.cm,et,ae.line,$e);else return!1;else ae=Mo;return!0}if(he=="char"||he=="codepoint")sn();else if(he=="column")sn(!0);else if(he=="word"||he=="group")for(var Dt=null,Hn=he=="group",Tn=ie.cm&&ie.cm.getHelper(ae,"wordChars"),ir=!0;!(fe<0&&!sn(!ir));ir=!1){var dr=et.text.charAt(ae.ch)||`
`,Mr=Ue(dr,Tn)?"w":Hn&&dr==`
`?"n":!Hn||/\s/.test(dr)?null:"p";if(Hn&&!ir&&!Mr&&(Mr="s"),Dt&&Dt!=Mr){fe<0&&(fe=1,sn(),ae.sticky="after");break}if(Mr&&(Dt=Mr),fe>0&&!sn(!ir))break}var ao=ll(ie,ae,Ne,Ge,!0);return Pi(Ne,ao)&&(ao.hitSide=!0),ao}function ah(ie,ae,fe,he){var me=ie.doc,Ne=ae.left,Ge;if(he=="page"){var et=Math.min(ie.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),$e=Math.max(et-.5*tr(ie.display),3);Ge=(fe>0?ae.bottom:ae.top)+fe*$e}else he=="line"&&(Ge=fe>0?ae.bottom+3:ae.top-3);for(var Ct;Ct=fu(ie,Ne,Ge),!!Ct.outside;){if(fe<0?Ge<=0:Ge>=me.height){Ct.hitSide=!0;break}Ge+=fe*5}return Ct}var Cl=function(ie){this.cm=ie,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new Ke,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Cl.prototype.init=function(ie){var ae=this,fe=this,he=fe.cm,me=fe.div=ie.lineDiv;Lg(me,he.options.spellcheck,he.options.autocorrect,he.options.autocapitalize);function Ne(et){for(var $e=et.target;$e;$e=$e.parentNode){if($e==me)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test($e.className))break}return!1}Ti(me,"paste",function(et){!Ne(et)||mi(he,et)||Cg(et,he)||_e<=11&&setTimeout(Vi(he,function(){return ae.updateFromDOM()}),20)}),Ti(me,"compositionstart",function(et){ae.composing={data:et.data,done:!1}}),Ti(me,"compositionupdate",function(et){ae.composing||(ae.composing={data:et.data,done:!1})}),Ti(me,"compositionend",function(et){ae.composing&&(et.data!=ae.composing.data&&ae.readFromDOMSoon(),ae.composing.done=!0)}),Ti(me,"touchstart",function(){return fe.forceCompositionEnd()}),Ti(me,"input",function(){ae.composing||ae.readFromDOMSoon()});function Ge(et){if(!(!Ne(et)||mi(he,et))){if(he.somethingSelected())of({lineWise:!1,text:he.getSelections()}),et.type=="cut"&&he.replaceSelection("",null,"cut");else if(he.options.lineWiseCopyCut){var $e=Fg(he);of({lineWise:!0,text:$e.text}),et.type=="cut"&&he.operation(function(){he.setSelections($e.ranges,0,zt),he.replaceSelection("",null,"cut")})}else return;if(et.clipboardData){et.clipboardData.clearData();var Ct=Lc.text.join(`
`);if(et.clipboardData.setData("Text",Ct),et.clipboardData.getData("Text")==Ct){et.preventDefault();return}}var sn=Mg(),Dt=sn.firstChild;he.display.lineSpace.insertBefore(sn,he.display.lineSpace.firstChild),Dt.value=Lc.text.join(`
`);var Hn=document.activeElement;xn(Dt),setTimeout(function(){he.display.lineSpace.removeChild(sn),Hn.focus(),Hn==me&&fe.showPrimarySelection()},50)}}Ti(me,"copy",Ge),Ti(me,"cut",Ge)},Cl.prototype.screenReaderLabelChanged=function(ie){ie?this.div.setAttribute("aria-label",ie):this.div.removeAttribute("aria-label")},Cl.prototype.prepareSelection=function(){var ie=vo(this.cm,!1);return ie.focus=document.activeElement==this.div,ie},Cl.prototype.showSelection=function(ie,ae){!ie||!this.cm.display.view.length||((ie.focus||ae)&&this.showPrimarySelection(),this.showMultipleSelections(ie))},Cl.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Cl.prototype.showPrimarySelection=function(){var ie=this.getSelection(),ae=this.cm,fe=ae.doc.sel.primary(),he=fe.from(),me=fe.to();if(ae.display.viewTo==ae.display.viewFrom||he.line>=ae.display.viewTo||me.line<ae.display.viewFrom){ie.removeAllRanges();return}var Ne=Af(ae,ie.anchorNode,ie.anchorOffset),Ge=Af(ae,ie.focusNode,ie.focusOffset);if(!(Ne&&!Ne.bad&&Ge&&!Ge.bad&&Ni(Ar(Ne,Ge),he)==0&&Ni(qa(Ne,Ge),me)==0)){var et=ae.display.view,$e=he.line>=ae.display.viewFrom&&jh(ae,he)||{node:et[0].measure.map[2],offset:0},Ct=me.line<ae.display.viewTo&&jh(ae,me);if(!Ct){var sn=et[et.length-1].measure,Dt=sn.maps?sn.maps[sn.maps.length-1]:sn.map;Ct={node:Dt[Dt.length-1],offset:Dt[Dt.length-2]-Dt[Dt.length-3]}}if(!$e||!Ct){ie.removeAllRanges();return}var Hn=ie.rangeCount&&ie.getRangeAt(0),Tn;try{Tn=at($e.node,$e.offset,Ct.offset,Ct.node)}catch(ir){}Tn&&(!le&&ae.state.focused?(ie.collapse($e.node,$e.offset),Tn.collapsed||(ie.removeAllRanges(),ie.addRange(Tn))):(ie.removeAllRanges(),ie.addRange(Tn)),Hn&&ie.anchorNode==null?ie.addRange(Hn):le&&this.startGracePeriod()),this.rememberSelection()}},Cl.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)},Cl.prototype.showMultipleSelections=function(ie){ht(this.cm.display.cursorDiv,ie.cursors),ht(this.cm.display.selectionDiv,ie.selection)},Cl.prototype.rememberSelection=function(){var ie=this.getSelection();this.lastAnchorNode=ie.anchorNode,this.lastAnchorOffset=ie.anchorOffset,this.lastFocusNode=ie.focusNode,this.lastFocusOffset=ie.focusOffset},Cl.prototype.selectionInEditor=function(){var ie=this.getSelection();if(!ie.rangeCount)return!1;var ae=ie.getRangeAt(0).commonAncestorContainer;return Pt(this.div,ae)},Cl.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Cl.prototype.blur=function(){this.div.blur()},Cl.prototype.getField=function(){return this.div},Cl.prototype.supportsTouch=function(){return!0},Cl.prototype.receivedFocus=function(){var ie=this;this.selectionInEditor()?this.pollSelection():bi(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)},Cl.prototype.selectionChanged=function(){var ie=this.getSelection();return ie.anchorNode!=this.lastAnchorNode||ie.anchorOffset!=this.lastAnchorOffset||ie.focusNode!=this.lastFocusNode||ie.focusOffset!=this.lastFocusOffset},Cl.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var ie=this.getSelection(),ae=this.cm;if(ne&&ut&&this.cm.display.gutterSpecs.length&&Ag(ie.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var fe=Af(ae,ie.anchorNode,ie.anchorOffset),he=Af(ae,ie.focusNode,ie.focusOffset);fe&&he&&bi(ae,function(){qr(ae.doc,Er(fe,he),zt),(fe.bad||he.bad)&&(ae.curOp.selectionChanged=!0)})}}},Cl.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var ie=this.cm,ae=ie.display,fe=ie.doc.sel.primary(),he=fe.from(),me=fe.to();if(he.ch==0&&he.line>ie.firstLine()&&(he=Zn(he.line-1,wn(ie.doc,he.line-1).length)),me.ch==wn(ie.doc,me.line).text.length&&me.line<ie.lastLine()&&(me=Zn(me.line+1,0)),he.line<ae.viewFrom||me.line>ae.viewTo-1)return!1;var Ne,Ge,et;he.line==ae.viewFrom||(Ne=Ii(ie,he.line))==0?(Ge=Wt(ae.view[0].line),et=ae.view[0].node):(Ge=Wt(ae.view[Ne].line),et=ae.view[Ne-1].node.nextSibling);var $e=Ii(ie,me.line),Ct,sn;if($e==ae.view.length-1?(Ct=ae.viewTo-1,sn=ae.lineDiv.lastChild):(Ct=Wt(ae.view[$e+1].line)-1,sn=ae.view[$e+1].node.previousSibling),!et)return!1;for(var Dt=ie.doc.splitLines(zh(ie,et,sn,Ge,Ct)),Hn=Ki(ie.doc,Zn(Ge,0),Zn(Ct,wn(ie.doc,Ct).text.length));Dt.length>1&&Hn.length>1;)if(_t(Dt)==_t(Hn))Dt.pop(),Hn.pop(),Ct--;else if(Dt[0]==Hn[0])Dt.shift(),Hn.shift(),Ge++;else break;for(var Tn=0,ir=0,dr=Dt[0],Mr=Hn[0],ao=Math.min(dr.length,Mr.length);Tn<ao&&dr.charCodeAt(Tn)==Mr.charCodeAt(Tn);)++Tn;for(var qo=_t(Dt),Mo=_t(Hn),ga=Math.min(qo.length-(Dt.length==1?Tn:0),Mo.length-(Hn.length==1?Tn:0));ir<ga&&qo.charCodeAt(qo.length-ir-1)==Mo.charCodeAt(Mo.length-ir-1);)++ir;if(Dt.length==1&&Hn.length==1&&Ge==he.line)for(;Tn&&Tn>he.ch&&qo.charCodeAt(qo.length-ir-1)==Mo.charCodeAt(Mo.length-ir-1);)Tn--,ir++;Dt[Dt.length-1]=qo.slice(0,qo.length-ir).replace(/^\u200b+/,""),Dt[0]=Dt[0].slice(Tn).replace(/\u200b+$/,"");var is=Zn(Ge,Tn),Ao=Zn(Ct,Hn.length?_t(Hn).length-ir:0);if(Dt.length>1||Dt[0]||Ni(is,Ao))return Ks(ie.doc,Dt,is,Ao,"+input"),!0},Cl.prototype.ensurePolled=function(){this.forceCompositionEnd()},Cl.prototype.reset=function(){this.forceCompositionEnd()},Cl.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Cl.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))},Cl.prototype.updateFromDOM=function(){var ie=this;(this.cm.isReadOnly()||!this.pollContent())&&bi(this.cm,function(){return vi(ie.cm)})},Cl.prototype.setUneditable=function(ie){ie.contentEditable="false"},Cl.prototype.onKeyPress=function(ie){ie.charCode==0||this.composing||(ie.preventDefault(),this.cm.isReadOnly()||Vi(this.cm,Rh)(this.cm,String.fromCharCode(ie.charCode==null?ie.keyCode:ie.charCode),0))},Cl.prototype.readOnlyChanged=function(ie){this.div.contentEditable=String(ie!="nocursor")},Cl.prototype.onContextMenu=function(){},Cl.prototype.resetPosition=function(){},Cl.prototype.needsContentAttribute=!0;function jh(ie,ae){var fe=da(ie,ae.line);if(!fe||fe.hidden)return null;var he=wn(ie.doc,ae.line),me=pi(fe,he,ae.line),Ne=Si(he,ie.doc.direction),Ge="left";if(Ne){var et=en(Ne,ae.ch);Ge=et%2?"right":"left"}var $e=Do(me.map,ae.ch,Ge);return $e.offset=$e.collapse=="right"?$e.end:$e.start,$e}function Ag(ie){for(var ae=ie;ae;ae=ae.parentNode)if(/CodeMirror-gutter-wrapper/.test(ae.className))return!0;return!1}function wh(ie,ae){return ae&&(ie.bad=!0),ie}function zh(ie,ae,fe,he,me){var Ne="",Ge=!1,et=ie.doc.lineSeparator(),$e=!1;function Ct(Tn){return function(ir){return ir.id==Tn}}function sn(){Ge&&(Ne+=et,$e&&(Ne+=et),Ge=$e=!1)}function Dt(Tn){Tn&&(sn(),Ne+=Tn)}function Hn(Tn){if(Tn.nodeType==1){var ir=Tn.getAttribute("cm-text");if(ir){Dt(ir);return}var dr=Tn.getAttribute("cm-marker"),Mr;if(dr){var ao=ie.findMarks(Zn(he,0),Zn(me+1,0),Ct(+dr));ao.length&&(Mr=ao[0].find(0))&&Dt(Ki(ie.doc,Mr.from,Mr.to).join(et));return}if(Tn.getAttribute("contenteditable")=="false")return;var qo=/^(pre|div|p|li|table|br)$/i.test(Tn.nodeName);if(!/^br$/i.test(Tn.nodeName)&&Tn.textContent.length==0)return;qo&&sn();for(var Mo=0;Mo<Tn.childNodes.length;Mo++)Hn(Tn.childNodes[Mo]);/^(pre|p)$/i.test(Tn.nodeName)&&($e=!0),qo&&(Ge=!0)}else Tn.nodeType==3&&Dt(Tn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;Hn(ae),ae!=fe;)ae=ae.nextSibling,$e=!1;return Ne}function Af(ie,ae,fe){var he;if(ae==ie.display.lineDiv){if(he=ie.display.lineDiv.childNodes[fe],!he)return wh(ie.clipPos(Zn(ie.display.viewTo-1)),!0);ae=null,fe=0}else for(he=ae;;he=he.parentNode){if(!he||he==ie.display.lineDiv)return null;if(he.parentNode&&he.parentNode==ie.display.lineDiv)break}for(var me=0;me<ie.display.view.length;me++){var Ne=ie.display.view[me];if(Ne.node==he)return ip(Ne,ae,fe)}}function ip(ie,ae,fe){var he=ie.text.firstChild,me=!1;if(!ae||!Pt(he,ae))return wh(Zn(Wt(ie.line),0),!0);if(ae==he&&(me=!0,ae=he.childNodes[fe],fe=0,!ae)){var Ne=ie.rest?_t(ie.rest):ie.line;return wh(Zn(Wt(Ne),Ne.text.length),me)}var Ge=ae.nodeType==3?ae:null,et=ae;for(!Ge&&ae.childNodes.length==1&&ae.firstChild.nodeType==3&&(Ge=ae.firstChild,fe&&(fe=Ge.nodeValue.length));et.parentNode!=he;)et=et.parentNode;var $e=ie.measure,Ct=$e.maps;function sn(Mr,ao,qo){for(var Mo=-1;Mo<(Ct?Ct.length:0);Mo++)for(var ga=Mo<0?$e.map:Ct[Mo],is=0;is<ga.length;is+=3){var Ao=ga[is+2];if(Ao==Mr||Ao==ao){var Rs=Wt(Mo<0?ie.line:ie.rest[Mo]),Ul=ga[is]+qo;return(qo<0||Ao!=Mr)&&(Ul=ga[is+(qo?1:0)]),Zn(Rs,Ul)}}}var Dt=sn(Ge,et,fe);if(Dt)return wh(Dt,me);for(var Hn=et.nextSibling,Tn=Ge?Ge.nodeValue.length-fe:0;Hn;Hn=Hn.nextSibling){if(Dt=sn(Hn,Hn.firstChild,0),Dt)return wh(Zn(Dt.line,Dt.ch-Tn),me);Tn+=Hn.textContent.length}for(var ir=et.previousSibling,dr=fe;ir;ir=ir.previousSibling){if(Dt=sn(ir,ir.firstChild,-1),Dt)return wh(Zn(Dt.line,Dt.ch+dr),me);dr+=ir.textContent.length}}var Iu=function(ie){this.cm=ie,this.prevInput="",this.pollingFast=!1,this.polling=new Ke,this.hasSelection=!1,this.composing=null};Iu.prototype.init=function(ie){var ae=this,fe=this,he=this.cm;this.createField(ie);var me=this.textarea;ie.wrapper.insertBefore(this.wrapper,ie.wrapper.firstChild),Te&&(me.style.width="0px"),Ti(me,"input",function(){wt&&_e>=9&&ae.hasSelection&&(ae.hasSelection=null),fe.poll()}),Ti(me,"paste",function(Ge){mi(he,Ge)||Cg(Ge,he)||(he.state.pasteIncoming=+new Date,fe.fastPoll())});function Ne(Ge){if(!mi(he,Ge)){if(he.somethingSelected())of({lineWise:!1,text:he.getSelections()});else if(he.options.lineWiseCopyCut){var et=Fg(he);of({lineWise:!0,text:et.text}),Ge.type=="cut"?he.setSelections(et.ranges,null,zt):(fe.prevInput="",me.value=et.text.join(`
`),xn(me))}else return;Ge.type=="cut"&&(he.state.cutIncoming=+new Date)}}Ti(me,"cut",Ne),Ti(me,"copy",Ne),Ti(ie.scroller,"paste",function(Ge){if(!(tn(ie,Ge)||mi(he,Ge))){if(!me.dispatchEvent){he.state.pasteIncoming=+new Date,fe.focus();return}var et=new Event("paste");et.clipboardData=Ge.clipboardData,me.dispatchEvent(et)}}),Ti(ie.lineSpace,"selectstart",function(Ge){tn(ie,Ge)||Jr(Ge)}),Ti(me,"compositionstart",function(){var Ge=he.getCursor("from");fe.composing&&fe.composing.range.clear(),fe.composing={start:Ge,range:he.markText(Ge,he.getCursor("to"),{className:"CodeMirror-composing"})}}),Ti(me,"compositionend",function(){fe.composing&&(fe.poll(),fe.composing.range.clear(),fe.composing=null)})},Iu.prototype.createField=function(ie){this.wrapper=Mg(),this.textarea=this.wrapper.firstChild},Iu.prototype.screenReaderLabelChanged=function(ie){ie?this.textarea.setAttribute("aria-label",ie):this.textarea.removeAttribute("aria-label")},Iu.prototype.prepareSelection=function(){var ie=this.cm,ae=ie.display,fe=ie.doc,he=vo(ie);if(ie.options.moveInputWithCursor){var me=Ia(ie,fe.sel.primary().head,"div"),Ne=ae.wrapper.getBoundingClientRect(),Ge=ae.lineDiv.getBoundingClientRect();he.teTop=Math.max(0,Math.min(ae.wrapper.clientHeight-10,me.top+Ge.top-Ne.top)),he.teLeft=Math.max(0,Math.min(ae.wrapper.clientWidth-10,me.left+Ge.left-Ne.left))}return he},Iu.prototype.showSelection=function(ie){var ae=this.cm,fe=ae.display;ht(fe.cursorDiv,ie.cursors),ht(fe.selectionDiv,ie.selection),ie.teTop!=null&&(this.wrapper.style.top=ie.teTop+"px",this.wrapper.style.left=ie.teLeft+"px")},Iu.prototype.reset=function(ie){if(!(this.contextMenuPending||this.composing)){var ae=this.cm;if(ae.somethingSelected()){this.prevInput="";var fe=ae.getSelection();this.textarea.value=fe,ae.state.focused&&xn(this.textarea),wt&&_e>=9&&(this.hasSelection=fe)}else ie||(this.prevInput=this.textarea.value="",wt&&_e>=9&&(this.hasSelection=null))}},Iu.prototype.getField=function(){return this.textarea},Iu.prototype.supportsTouch=function(){return!1},Iu.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!te||Nt()!=this.textarea))try{this.textarea.focus()}catch(ie){}},Iu.prototype.blur=function(){this.textarea.blur()},Iu.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Iu.prototype.receivedFocus=function(){this.slowPoll()},Iu.prototype.slowPoll=function(){var ie=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){ie.poll(),ie.cm.state.focused&&ie.slowPoll()})},Iu.prototype.fastPoll=function(){var ie=!1,ae=this;ae.pollingFast=!0;function fe(){var he=ae.poll();!he&&!ie?(ie=!0,ae.polling.set(60,fe)):(ae.pollingFast=!1,ae.slowPoll())}ae.polling.set(20,fe)},Iu.prototype.poll=function(){var ie=this,ae=this.cm,fe=this.textarea,he=this.prevInput;if(this.contextMenuPending||!ae.state.focused||Ee(fe)&&!he&&!this.composing||ae.isReadOnly()||ae.options.disableInput||ae.state.keySeq)return!1;var me=fe.value;if(me==he&&!ae.somethingSelected())return!1;if(wt&&_e>=9&&this.hasSelection===me||ce&&/[\uf700-\uf7ff]/.test(me))return ae.display.input.reset(),!1;if(ae.doc.sel==ae.display.selForContextMenu){var Ne=me.charCodeAt(0);if(Ne==8203&&!he&&(he="\u200B"),Ne==8666)return this.reset(),this.cm.execCommand("undo")}for(var Ge=0,et=Math.min(he.length,me.length);Ge<et&&he.charCodeAt(Ge)==me.charCodeAt(Ge);)++Ge;return bi(ae,function(){Rh(ae,me.slice(Ge),he.length-Ge,null,ie.composing?"*compose":null),me.length>1e3||me.indexOf(`
`)>-1?fe.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},Iu.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Iu.prototype.onKeyPress=function(){wt&&_e>=9&&(this.hasSelection=null),this.fastPoll()},Iu.prototype.onContextMenu=function(ie){var ae=this,fe=ae.cm,he=fe.display,me=ae.textarea;ae.contextMenuPending&&ae.contextMenuPending();var Ne=zo(fe,ie),Ge=he.scroller.scrollTop;if(!Ne||pt)return;var et=fe.options.resetSelectionOnContextMenu;et&&fe.doc.sel.contains(Ne)==-1&&Vi(fe,qr)(fe.doc,Er(Ne),zt);var $e=me.style.cssText,Ct=ae.wrapper.style.cssText,sn=ae.wrapper.offsetParent.getBoundingClientRect();ae.wrapper.style.cssText="position: static",me.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(ie.clientY-sn.top-5)+"px; left: "+(ie.clientX-sn.left-5)+`px;
z-index: 1000; background: `+(wt?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Dt;Ve&&(Dt=window.scrollY),he.input.focus(),Ve&&window.scrollTo(null,Dt),he.input.reset(),fe.somethingSelected()||(me.value=ae.prevInput=" "),ae.contextMenuPending=Tn,he.selForContextMenu=fe.doc.sel,clearTimeout(he.detectingSelectAll);function Hn(){if(me.selectionStart!=null){var dr=fe.somethingSelected(),Mr="\u200B"+(dr?me.value:"");me.value="\u21DA",me.value=Mr,ae.prevInput=dr?"":"\u200B",me.selectionStart=1,me.selectionEnd=Mr.length,he.selForContextMenu=fe.doc.sel}}function Tn(){if(ae.contextMenuPending==Tn&&(ae.contextMenuPending=!1,ae.wrapper.style.cssText=Ct,me.style.cssText=$e,wt&&_e<9&&he.scrollbars.setScrollTop(he.scroller.scrollTop=Ge),me.selectionStart!=null)){(!wt||wt&&_e<9)&&Hn();var dr=0,Mr=function(){he.selForContextMenu==fe.doc.sel&&me.selectionStart==0&&me.selectionEnd>0&&ae.prevInput=="\u200B"?Vi(fe,Us)(fe):dr++<10?he.detectingSelectAll=setTimeout(Mr,500):(he.selForContextMenu=null,he.input.reset())};he.detectingSelectAll=setTimeout(Mr,200)}}if(wt&&_e>=9&&Hn(),Ce){Nr(ie);var ir=function(){Zr(window,"mouseup",ir),setTimeout(Tn,20)};Ti(window,"mouseup",ir)}else setTimeout(Tn,50)},Iu.prototype.readOnlyChanged=function(ie){ie||this.reset(),this.textarea.disabled=ie=="nocursor",this.textarea.readOnly=!!ie},Iu.prototype.setUneditable=function(){},Iu.prototype.needsContentAttribute=!1;function rp(ie,ae){if(ae=ae?fn(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 fe=Nt();ae.autofocus=fe==ie||ie.getAttribute("autofocus")!=null&&fe==document.body}function he(){ie.value=et.getValue()}var me;if(ie.form&&(Ti(ie.form,"submit",he),!ae.leaveSubmitMethodAlone)){var Ne=ie.form;me=Ne.submit;try{var Ge=Ne.submit=function(){he(),Ne.submit=me,Ne.submit(),Ne.submit=Ge}}catch($e){}}ae.finishInit=function($e){$e.save=he,$e.getTextArea=function(){return ie},$e.toTextArea=function(){$e.toTextArea=isNaN,he(),ie.parentNode.removeChild($e.getWrapperElement()),ie.style.display="",ie.form&&(Zr(ie.form,"submit",he),!ae.leaveSubmitMethodAlone&&typeof ie.form.submit=="function"&&(ie.form.submit=me))}},ie.style.display="none";var et=ul(function($e){return ie.parentNode.insertBefore($e,ie.nextSibling)},ae);return et}function Ph(ie){ie.off=Zr,ie.on=Ti,ie.wheelEventPixels=$i,ie.Doc=Ba,ie.splitLines=En,ie.countColumn=Qe,ie.findColumn=oi,ie.isWordChar=Oe,ie.Pass=Xn,ie.signal=Fi,ie.Line=ol,ie.changeEnd=To,ie.scrollbarModel=ti,ie.Pos=Zn,ie.cmpPos=Ni,ie.modes=In,ie.mimeModes=ii,ie.resolveMode=Vt,ie.getMode=Zt,ie.modeExtensions=It,ie.extendMode=dn,ie.copyState=Ri,ie.startState=ri,ie.innerMode=hi,ie.commands=Dd,ie.keyMap=Ou,ie.keyName=Bu,ie.isModifierKey=jl,ie.lookupKey=Qa,ie.normalizeKeyMap=Is,ie.StringStream=Kt,ie.SharedTextMarker=Ql,ie.TextMarker=Gt,ie.LineWidget=gs,ie.e_preventDefault=Jr,ie.e_stopPropagation=lo,ie.e_stop=Nr,ie.addClass=Et,ie.contains=Pt,ie.rmClass=We,ie.keyNames=_u}tp(ul),xh(ul);var Zd="iter insert remove copy getEditor constructor".split(" ");for(var Gh in Ba.prototype)Ba.prototype.hasOwnProperty(Gh)&&Je(Zd,Gh)<0&&(ul.prototype[Gh]=function(ie){return function(){return ie.apply(this.doc,arguments)}}(Ba.prototype[Gh]));return yn(Ba),ul.inputStyles={textarea:Iu,contenteditable:Cl},ul.defineMode=function(ie){!ul.defaults.mode&&ie!="null"&&(ul.defaults.mode=ie),Ci.apply(this,arguments)},ul.defineMIME=Ji,ul.defineMode("null",function(){return{token:function(ie){return ie.skipToEnd()}}}),ul.defineMIME("text/plain","null"),ul.defineExtension=function(ie,ae){ul.prototype[ie]=ae},ul.defineDocExtension=function(ie,ae){Ba.prototype[ie]=ae},ul.fromTextArea=rp,Ph(ul),ul.version="5.58.2",ul})},49047:function(Rn,$n,be){(function(le){le(be(4631),be(29589),be(52539))})(function(le){"use strict";le.defineMode("markdown",function(Xe,Lt){var At=le.getMode(Xe,"text/html"),wt=At.name=="null";function _e(Qe){if(le.findModeByName){var Ke=le.findModeByName(Qe);Ke&&(Qe=Ke.mime||Ke.mimes[0])}var Je=le.getMode(Xe,Qe);return Je.name=="null"?null:Je}Lt.highlightFormatting===void 0&&(Lt.highlightFormatting=!1),Lt.maxBlockquoteDepth===void 0&&(Lt.maxBlockquoteDepth=0),Lt.taskLists===void 0&&(Lt.taskLists=!1),Lt.strikethrough===void 0&&(Lt.strikethrough=!1),Lt.emoji===void 0&&(Lt.emoji=!1),Lt.fencedCodeBlockHighlighting===void 0&&(Lt.fencedCodeBlockHighlighting=!0),Lt.fencedCodeBlockDefaultMode===void 0&&(Lt.fencedCodeBlockDefaultMode="text/plain"),Lt.xml===void 0&&(Lt.xml=!0),Lt.tokenTypeOverrides===void 0&&(Lt.tokenTypeOverrides={});var Ve={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 xt in Ve)Ve.hasOwnProperty(xt)&&Lt.tokenTypeOverrides[xt]&&(Ve[xt]=Lt.tokenTypeOverrides[xt]);var ut=/^([*\-_])(?:\s*\1){2,}\s*$/,pt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Rt=/^\[(x| )\](?=\s)/i,Ot=Lt.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,jt=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Te=/^[^#!\[\]*_\\<>` "'(~:]+/,ne=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,te=/^\s*\[[^\]]+?\]:.*$/,ce=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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 ge(Qe,Ke,Je){return Ke.f=Ke.inline=Je,Je(Qe,Ke)}function ye(Qe,Ke,Je){return Ke.f=Ke.block=Je,Je(Qe,Ke)}function we(Qe){return!Qe||!/\S/.test(Qe.string)}function Ce(Qe){if(Qe.linkTitle=!1,Qe.linkHref=!1,Qe.linkText=!1,Qe.em=!1,Qe.strong=!1,Qe.strikethrough=!1,Qe.quote=0,Qe.indentedCode=!1,Qe.f==We){var Ke=wt;if(!Ke){var Je=le.innerMode(At,Qe.htmlState);Ke=Je.mode.name=="xml"&&Je.state.tagStart===null&&!Je.state.context&&Je.state.tokenize.isInText}Ke&&(Qe.f=mt,Qe.block=Re,Qe.htmlState=null)}return Qe.trailingSpace=0,Qe.trailingSpaceNewLine=!1,Qe.prevLine=Qe.thisLine,Qe.thisLine={stream:null},null}function Re(Qe,Ke){var Je=Qe.column()===Ke.indentation,_n=we(Ke.prevLine.stream),Xn=Ke.indentedCode,zt=Ke.prevLine.hr,kn=Ke.list!==!1,bn=(Ke.listStack[Ke.listStack.length-1]||0)+3;Ke.indentedCode=!1;var oi=Ke.indentation;if(Ke.indentationDiff===null&&(Ke.indentationDiff=Ke.indentation,kn)){for(Ke.list=null;oi<Ke.listStack[Ke.listStack.length-1];)Ke.listStack.pop(),Ke.listStack.length?Ke.indentation=Ke.listStack[Ke.listStack.length-1]:Ke.list=!1;Ke.list!==!1&&(Ke.indentationDiff=oi-Ke.listStack[Ke.listStack.length-1])}var Yt=!_n&&!zt&&!Ke.prevLine.header&&(!kn||!Xn)&&!Ke.prevLine.fencedCodeEnd,Mt=(Ke.list===!1||zt||_n)&&Ke.indentation<=bn&&Qe.match(ut),_t=null;if(Ke.indentationDiff>=4&&(Xn||Ke.prevLine.fencedCodeEnd||Ke.prevLine.header||_n))return Qe.skipToEnd(),Ke.indentedCode=!0,Ve.code;if(Qe.eatSpace())return null;if(Je&&Ke.indentation<=bn&&(_t=Qe.match(Ot))&&_t[1].length<=6)return Ke.quote=0,Ke.header=_t[1].length,Ke.thisLine.header=!0,Lt.highlightFormatting&&(Ke.formatting="header"),Ke.f=Ke.inline,ht(Ke);if(Ke.indentation<=bn&&Qe.eat(">"))return Ke.quote=Je?1:Ke.quote+1,Lt.highlightFormatting&&(Ke.formatting="quote"),Qe.eatSpace(),ht(Ke);if(!Mt&&!Ke.setext&&Je&&Ke.indentation<=bn&&(_t=Qe.match(pt))){var mn=_t[1]?"ol":"ul";return Ke.indentation=oi+Qe.current().length,Ke.list=!0,Ke.quote=0,Ke.listStack.push(Ke.indentation),Ke.em=!1,Ke.strong=!1,Ke.code=!1,Ke.strikethrough=!1,Lt.taskLists&&Qe.match(Rt,!1)&&(Ke.taskList=!0),Ke.f=Ke.inline,Lt.highlightFormatting&&(Ke.formatting=["list","list-"+mn]),ht(Ke)}else{if(Je&&Ke.indentation<=bn&&(_t=Qe.match(ne,!0)))return Ke.quote=0,Ke.fencedEndRE=new RegExp(_t[1]+"+ *$"),Ke.localMode=Lt.fencedCodeBlockHighlighting&&_e(_t[2]||Lt.fencedCodeBlockDefaultMode),Ke.localMode&&(Ke.localState=le.startState(Ke.localMode)),Ke.f=Ke.block=lt,Lt.highlightFormatting&&(Ke.formatting="code-block"),Ke.code=-1,ht(Ke);if(Ke.setext||(!Yt||!kn)&&!Ke.quote&&Ke.list===!1&&!Ke.code&&!Mt&&!te.test(Qe.string)&&(_t=Qe.lookAhead(1))&&(_t=_t.match(jt)))return Ke.setext?(Ke.header=Ke.setext,Ke.setext=0,Qe.skipToEnd(),Lt.highlightFormatting&&(Ke.formatting="header")):(Ke.header=_t[0].charAt(0)=="="?1:2,Ke.setext=Ke.header),Ke.thisLine.header=!0,Ke.f=Ke.inline,ht(Ke);if(Mt)return Qe.skipToEnd(),Ke.hr=!0,Ke.thisLine.hr=!0,Ve.hr;if(Qe.peek()==="[")return ge(Qe,Ke,Ln)}return ge(Qe,Ke,Ke.inline)}function We(Qe,Ke){var Je=At.token(Qe,Ke.htmlState);if(!wt){var _n=le.innerMode(At,Ke.htmlState);(_n.mode.name=="xml"&&_n.state.tagStart===null&&!_n.state.context&&_n.state.tokenize.isInText||Ke.md_inside&&Qe.current().indexOf(">")>-1)&&(Ke.f=mt,Ke.block=Re,Ke.htmlState=null)}return Je}function lt(Qe,Ke){var Je=Ke.listStack[Ke.listStack.length-1]||0,_n=Ke.indentation<Je,Xn=Je+3;if(Ke.fencedEndRE&&Ke.indentation<=Xn&&(_n||Qe.match(Ke.fencedEndRE))){Lt.highlightFormatting&&(Ke.formatting="code-block");var zt;return _n||(zt=ht(Ke)),Ke.localMode=Ke.localState=null,Ke.block=Re,Ke.f=mt,Ke.fencedEndRE=null,Ke.code=0,Ke.thisLine.fencedCodeEnd=!0,_n?ye(Qe,Ke,Ke.block):zt}else return Ke.localMode?Ke.localMode.token(Qe,Ke.localState):(Qe.skipToEnd(),Ve.code)}function ht(Qe){var Ke=[];if(Qe.formatting){Ke.push(Ve.formatting),typeof Qe.formatting=="string"&&(Qe.formatting=[Qe.formatting]);for(var Je=0;Je<Qe.formatting.length;Je++)Ke.push(Ve.formatting+"-"+Qe.formatting[Je]),Qe.formatting[Je]==="header"&&Ke.push(Ve.formatting+"-"+Qe.formatting[Je]+"-"+Qe.header),Qe.formatting[Je]==="quote"&&(!Lt.maxBlockquoteDepth||Lt.maxBlockquoteDepth>=Qe.quote?Ke.push(Ve.formatting+"-"+Qe.formatting[Je]+"-"+Qe.quote):Ke.push("error"))}if(Qe.taskOpen)return Ke.push("meta"),Ke.length?Ke.join(" "):null;if(Qe.taskClosed)return Ke.push("property"),Ke.length?Ke.join(" "):null;if(Qe.linkHref?Ke.push(Ve.linkHref,"url"):(Qe.strong&&Ke.push(Ve.strong),Qe.em&&Ke.push(Ve.em),Qe.strikethrough&&Ke.push(Ve.strikethrough),Qe.emoji&&Ke.push(Ve.emoji),Qe.linkText&&Ke.push(Ve.linkText),Qe.code&&Ke.push(Ve.code),Qe.image&&Ke.push(Ve.image),Qe.imageAltText&&Ke.push(Ve.imageAltText,"link"),Qe.imageMarker&&Ke.push(Ve.imageMarker)),Qe.header&&Ke.push(Ve.header,Ve.header+"-"+Qe.header),Qe.quote&&(Ke.push(Ve.quote),!Lt.maxBlockquoteDepth||Lt.maxBlockquoteDepth>=Qe.quote?Ke.push(Ve.quote+"-"+Qe.quote):Ke.push(Ve.quote+"-"+Lt.maxBlockquoteDepth)),Qe.list!==!1){var _n=(Qe.listStack.length-1)%3;_n?_n===1?Ke.push(Ve.list2):Ke.push(Ve.list3):Ke.push(Ve.list1)}return Qe.trailingSpaceNewLine?Ke.push("trailing-space-new-line"):Qe.trailingSpace&&Ke.push("trailing-space-"+(Qe.trailingSpace%2?"a":"b")),Ke.length?Ke.join(" "):null}function nt(Qe,Ke){if(Qe.match(Te,!0))return ht(Ke)}function mt(Qe,Ke){var Je=Ke.text(Qe,Ke);if(typeof Je!="undefined")return Je;if(Ke.list)return Ke.list=null,ht(Ke);if(Ke.taskList){var _n=Qe.match(Rt,!0)[1]===" ";return _n?Ke.taskOpen=!0:Ke.taskClosed=!0,Lt.highlightFormatting&&(Ke.formatting="task"),Ke.taskList=!1,ht(Ke)}if(Ke.taskOpen=!1,Ke.taskClosed=!1,Ke.header&&Qe.match(/^#+$/,!0))return Lt.highlightFormatting&&(Ke.formatting="header"),ht(Ke);var Xn=Qe.next();if(Ke.linkTitle){Ke.linkTitle=!1;var zt=Xn;Xn==="("&&(zt=")"),zt=(zt+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var kn="^\\s*(?:[^"+zt+"\\\\]+|\\\\\\\\|\\\\.)"+zt;if(Qe.match(new RegExp(kn),!0))return Ve.linkHref}if(Xn==="`"){var bn=Ke.formatting;Lt.highlightFormatting&&(Ke.formatting="code"),Qe.eatWhile("`");var oi=Qe.current().length;if(Ke.code==0&&(!Ke.quote||oi==1))return Ke.code=oi,ht(Ke);if(oi==Ke.code){var Yt=ht(Ke);return Ke.code=0,Yt}else return Ke.formatting=bn,ht(Ke)}else if(Ke.code)return ht(Ke);if(Xn==="\\"&&(Qe.next(),Lt.highlightFormatting)){var Mt=ht(Ke),_t=Ve.formatting+"-escape";return Mt?Mt+" "+_t:_t}if(Xn==="!"&&Qe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return Ke.imageMarker=!0,Ke.image=!0,Lt.highlightFormatting&&(Ke.formatting="image"),ht(Ke);if(Xn==="["&&Ke.imageMarker&&Qe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return Ke.imageMarker=!1,Ke.imageAltText=!0,Lt.highlightFormatting&&(Ke.formatting="image"),ht(Ke);if(Xn==="]"&&Ke.imageAltText){Lt.highlightFormatting&&(Ke.formatting="image");var Mt=ht(Ke);return Ke.imageAltText=!1,Ke.image=!1,Ke.inline=Ke.f=Pt,Mt}if(Xn==="["&&!Ke.image)return Ke.linkText&&Qe.match(/^.*?\]/)||(Ke.linkText=!0,Lt.highlightFormatting&&(Ke.formatting="link")),ht(Ke);if(Xn==="]"&&Ke.linkText){Lt.highlightFormatting&&(Ke.formatting="link");var Mt=ht(Ke);return Ke.linkText=!1,Ke.inline=Ke.f=Qe.match(/\(.*?\)| ?\[.*?\]/,!1)?Pt:mt,Mt}if(Xn==="<"&&Qe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=at,Lt.highlightFormatting&&(Ke.formatting="link");var Mt=ht(Ke);return Mt?Mt+=" ":Mt="",Mt+Ve.linkInline}if(Xn==="<"&&Qe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){Ke.f=Ke.inline=at,Lt.highlightFormatting&&(Ke.formatting="link");var Mt=ht(Ke);return Mt?Mt+=" ":Mt="",Mt+Ve.linkEmail}if(Lt.xml&&Xn==="<"&&Qe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var mn=Qe.string.indexOf(">",Qe.pos);if(mn!=-1){var rn=Qe.string.substring(Qe.start,mn);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(rn)&&(Ke.md_inside=!0)}return Qe.backUp(1),Ke.htmlState=le.startState(At),ye(Qe,Ke,We)}if(Lt.xml&&Xn==="<"&&Qe.match(/^\/\w*?>/))return Ke.md_inside=!1,"tag";if(Xn==="*"||Xn==="_"){for(var He=1,Me=Qe.pos==1?" ":Qe.string.charAt(Qe.pos-2);He<3&&Qe.eat(Xn);)He++;var Fe=Qe.peek()||" ",Oe=!/\s/.test(Fe)&&(!ce.test(Fe)||/\s/.test(Me)||ce.test(Me)),Ue=!/\s/.test(Me)&&(!ce.test(Me)||/\s/.test(Fe)||ce.test(Fe)),Be=null,ot=null;if(He%2&&(!Ke.em&&Oe&&(Xn==="*"||!Ue||ce.test(Me))?Be=!0:Ke.em==Xn&&Ue&&(Xn==="*"||!Oe||ce.test(Fe))&&(Be=!1)),He>1&&(!Ke.strong&&Oe&&(Xn==="*"||!Ue||ce.test(Me))?ot=!0:Ke.strong==Xn&&Ue&&(Xn==="*"||!Oe||ce.test(Fe))&&(ot=!1)),ot!=null||Be!=null){Lt.highlightFormatting&&(Ke.formatting=Be==null?"strong":ot==null?"em":"strong em"),Be===!0&&(Ke.em=Xn),ot===!0&&(Ke.strong=Xn);var Yt=ht(Ke);return Be===!1&&(Ke.em=!1),ot===!1&&(Ke.strong=!1),Yt}}else if(Xn===" "&&(Qe.eat("*")||Qe.eat("_"))){if(Qe.peek()===" ")return ht(Ke);Qe.backUp(1)}if(Lt.strikethrough){if(Xn==="~"&&Qe.eatWhile(Xn)){if(Ke.strikethrough){Lt.highlightFormatting&&(Ke.formatting="strikethrough");var Yt=ht(Ke);return Ke.strikethrough=!1,Yt}else if(Qe.match(/^[^\s]/,!1))return Ke.strikethrough=!0,Lt.highlightFormatting&&(Ke.formatting="strikethrough"),ht(Ke)}else if(Xn===" "&&Qe.match(/^~~/,!0)){if(Qe.peek()===" ")return ht(Ke);Qe.backUp(2)}}if(Lt.emoji&&Xn===":"&&Qe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){Ke.emoji=!0,Lt.highlightFormatting&&(Ke.formatting="emoji");var Cn=ht(Ke);return Ke.emoji=!1,Cn}return Xn===" "&&(Qe.match(/^ +$/,!1)?Ke.trailingSpace++:Ke.trailingSpace&&(Ke.trailingSpaceNewLine=!0)),ht(Ke)}function at(Qe,Ke){var Je=Qe.next();if(Je===">"){Ke.f=Ke.inline=mt,Lt.highlightFormatting&&(Ke.formatting="link");var _n=ht(Ke);return _n?_n+=" ":_n="",_n+Ve.linkInline}return Qe.match(/^[^>]+/,!0),Ve.linkInline}function Pt(Qe,Ke){if(Qe.eatSpace())return null;var Je=Qe.next();return Je==="("||Je==="["?(Ke.f=Ke.inline=Et(Je==="("?")":"]"),Lt.highlightFormatting&&(Ke.formatting="link-string"),Ke.linkHref=!0,ht(Ke)):"error"}var Nt={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function Et(Qe){return function(Ke,Je){var _n=Ke.next();if(_n===Qe){Je.f=Je.inline=mt,Lt.highlightFormatting&&(Je.formatting="link-string");var Xn=ht(Je);return Je.linkHref=!1,Xn}return Ke.match(Nt[Qe]),Je.linkHref=!0,ht(Je)}}function Ln(Qe,Ke){return Qe.match(/^([^\]\\]|\\.)*\]:/,!1)?(Ke.f=xn,Qe.next(),Lt.highlightFormatting&&(Ke.formatting="link"),Ke.linkText=!0,ht(Ke)):ge(Qe,Ke,mt)}function xn(Qe,Ke){if(Qe.match(/^\]:/,!0)){Ke.f=Ke.inline=Nn,Lt.highlightFormatting&&(Ke.formatting="link");var Je=ht(Ke);return Ke.linkText=!1,Je}return Qe.match(/^([^\]\\]|\\.)+/,!0),Ve.linkText}function Nn(Qe,Ke){return Qe.eatSpace()?null:(Qe.match(/^[^\s]+/,!0),Qe.peek()===void 0?Ke.linkTitle=!0:Qe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),Ke.f=Ke.inline=mt,Ve.linkHref+" url")}var fn={startState:function(){return{f:Re,prevLine:{stream:null},thisLine:{stream:null},block:Re,htmlState:null,indentation:0,inline:mt,text:nt,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(Qe){return{f:Qe.f,prevLine:Qe.prevLine,thisLine:Qe.thisLine,block:Qe.block,htmlState:Qe.htmlState&&le.copyState(At,Qe.htmlState),indentation:Qe.indentation,localMode:Qe.localMode,localState:Qe.localMode?le.copyState(Qe.localMode,Qe.localState):null,inline:Qe.inline,text:Qe.text,formatting:!1,linkText:Qe.linkText,linkTitle:Qe.linkTitle,linkHref:Qe.linkHref,code:Qe.code,em:Qe.em,strong:Qe.strong,strikethrough:Qe.strikethrough,emoji:Qe.emoji,header:Qe.header,setext:Qe.setext,hr:Qe.hr,taskList:Qe.taskList,list:Qe.list,listStack:Qe.listStack.slice(0),quote:Qe.quote,indentedCode:Qe.indentedCode,trailingSpace:Qe.trailingSpace,trailingSpaceNewLine:Qe.trailingSpaceNewLine,md_inside:Qe.md_inside,fencedEndRE:Qe.fencedEndRE}},token:function(Qe,Ke){if(Ke.formatting=!1,Qe!=Ke.thisLine.stream){if(Ke.header=0,Ke.hr=!1,Qe.match(/^\s*$/,!0))return Ce(Ke),null;if(Ke.prevLine=Ke.thisLine,Ke.thisLine={stream:Qe},Ke.taskList=!1,Ke.trailingSpace=0,Ke.trailingSpaceNewLine=!1,!Ke.localState&&(Ke.f=Ke.block,Ke.f!=We)){var Je=Qe.match(/^\s*/,!0)[0].replace(/\t/g,se).length;if(Ke.indentation=Je,Ke.indentationDiff=null,Je>0)return null}}return Ke.f(Qe,Ke)},innerMode:function(Qe){return Qe.block==We?{state:Qe.htmlState,mode:At}:Qe.localState?{state:Qe.localState,mode:Qe.localMode}:{state:Qe,mode:fn}},indent:function(Qe,Ke,Je){return Qe.block==We&&At.indent?At.indent(Qe.htmlState,Ke,Je):Qe.localState&&Qe.localMode.indent?Qe.localMode.indent(Qe.localState,Ke,Je):le.Pass},blankLine:Ce,getType:ht,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return fn},"xml"),le.defineMIME("text/markdown","markdown"),le.defineMIME("text/x-markdown","markdown")})},52539:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){"use strict";le.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var Xe=0;Xe<le.modeInfo.length;Xe++){var Lt=le.modeInfo[Xe];Lt.mimes&&(Lt.mime=Lt.mimes[0])}le.findModeByMIME=function(At){At=At.toLowerCase();for(var wt=0;wt<le.modeInfo.length;wt++){var _e=le.modeInfo[wt];if(_e.mime==At)return _e;if(_e.mimes){for(var Ve=0;Ve<_e.mimes.length;Ve++)if(_e.mimes[Ve]==At)return _e}}if(/\+xml$/.test(At))return le.findModeByMIME("application/xml");if(/\+json$/.test(At))return le.findModeByMIME("application/json")},le.findModeByExtension=function(At){At=At.toLowerCase();for(var wt=0;wt<le.modeInfo.length;wt++){var _e=le.modeInfo[wt];if(_e.ext){for(var Ve=0;Ve<_e.ext.length;Ve++)if(_e.ext[Ve]==At)return _e}}},le.findModeByFileName=function(At){for(var wt=0;wt<le.modeInfo.length;wt++){var _e=le.modeInfo[wt];if(_e.file&&_e.file.test(At))return _e}var Ve=At.lastIndexOf("."),xt=Ve>-1&&At.substring(Ve+1,At.length);if(xt)return le.findModeByExtension(xt)},le.findModeByName=function(At){At=At.toLowerCase();for(var wt=0;wt<le.modeInfo.length;wt++){var _e=le.modeInfo[wt];if(_e.name.toLowerCase()==At)return _e;if(_e.alias){for(var Ve=0;Ve<_e.alias.length;Ve++)if(_e.alias[Ve].toLowerCase()==At)return _e}}}})},80785:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){"use strict";le.defineMode("stex",function(Xe,Lt){"use strict";function At(Te,ne){Te.cmdState.push(ne)}function wt(Te){return Te.cmdState.length>0?Te.cmdState[Te.cmdState.length-1]:null}function _e(Te){var ne=Te.cmdState.pop();ne&&ne.closeBracket()}function Ve(Te){for(var ne=Te.cmdState,te=ne.length-1;te>=0;te--){var ce=ne[te];if(ce.name!="DEFAULT")return ce}return{styleIdentifier:function(){return null}}}function xt(Te,ne,te){return function(){this.name=Te,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 ut={};ut.importmodule=xt("importmodule","tag",["string","builtin"]),ut.documentclass=xt("documentclass","tag",["","atom"]),ut.usepackage=xt("usepackage","tag",["atom"]),ut.begin=xt("begin","tag",["atom"]),ut.end=xt("end","tag",["atom"]),ut.label=xt("label","tag",["atom"]),ut.ref=xt("ref","tag",["atom"]),ut.eqref=xt("eqref","tag",["atom"]),ut.cite=xt("cite","tag",["atom"]),ut.bibitem=xt("bibitem","tag",["atom"]),ut.Bibitem=xt("Bibitem","tag",["atom"]),ut.RBibitem=xt("RBibitem","tag",["atom"]),ut.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function pt(Te,ne){Te.f=ne}function Rt(Te,ne){var te;if(Te.match(/^\\[a-zA-Z@]+/)){var ce=Te.current().slice(1);return te=ut.hasOwnProperty(ce)?ut[ce]:ut.DEFAULT,te=new te,At(ne,te),pt(ne,jt),te.style}if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/\\]/))return"tag";if(Te.match("\\["))return pt(ne,function(ge,ye){return Ot(ge,ye,"\\]")}),"keyword";if(Te.match("\\("))return pt(ne,function(ge,ye){return Ot(ge,ye,"\\)")}),"keyword";if(Te.match("$$"))return pt(ne,function(ge,ye){return Ot(ge,ye,"$$")}),"keyword";if(Te.match("$"))return pt(ne,function(ge,ye){return Ot(ge,ye,"$")}),"keyword";var se=Te.next();if(se=="%")return Te.skipToEnd(),"comment";if(se=="}"||se=="]"){if(te=wt(ne),te)te.closeBracket(se),pt(ne,jt);else return"error";return"bracket"}else return se=="{"||se=="["?(te=ut.DEFAULT,te=new te,At(ne,te),"bracket"):/\d/.test(se)?(Te.eatWhile(/[\w.%]/),"atom"):(Te.eatWhile(/[\w\-_]/),te=Ve(ne),te.name=="begin"&&(te.argument=Te.current()),te.styleIdentifier())}function Ot(Te,ne,te){if(Te.eatSpace())return null;if(te&&Te.match(te))return pt(ne,Rt),"keyword";if(Te.match(/^\\[a-zA-Z@]+/))return"tag";if(Te.match(/^[a-zA-Z]+/))return"variable-2";if(Te.match(/^\\[$&%#{}_]/)||Te.match(/^\\[,;!\/]/)||Te.match(/^[\^_&]/))return"tag";if(Te.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Te.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ce=Te.next();return ce=="{"||ce=="}"||ce=="["||ce=="]"||ce=="("||ce==")"?"bracket":ce=="%"?(Te.skipToEnd(),"comment"):"error"}function jt(Te,ne){var te=Te.peek(),ce;return te=="{"||te=="["?(ce=wt(ne),ce.openBracket(te),Te.eat(te),pt(ne,Rt),"bracket"):/[ \t\r]/.test(te)?(Te.eat(te),null):(pt(ne,Rt),_e(ne),Rt(Te,ne))}return{startState:function(){var Te=Lt.inMathMode?function(ne,te){return Ot(ne,te)}:Rt;return{cmdState:[],f:Te}},copyState:function(Te){return{cmdState:Te.cmdState.slice(),f:Te.f}},token:function(Te,ne){return ne.f(Te,ne)},blankLine:function(Te){Te.f=Rt,Te.cmdState.length=0},lineComment:"%"}}),le.defineMIME("text/x-stex","stex"),le.defineMIME("text/x-latex","stex")})},29589:function(Rn,$n,be){(function(le){le(be(4631))})(function(le){"use strict";var Xe={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},Lt={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};le.defineMode("xml",function(At,wt){var _e=At.indentUnit,Ve={},xt=wt.htmlMode?Xe:Lt;for(var ut in xt)Ve[ut]=xt[ut];for(var ut in wt)Ve[ut]=wt[ut];var pt,Rt;function Ot(at,Pt){function Nt(xn){return Pt.tokenize=xn,xn(at,Pt)}var Et=at.next();if(Et=="<")return at.eat("!")?at.eat("[")?at.match("CDATA[")?Nt(ne("atom","]]>")):null:at.match("--")?Nt(ne("comment","-->")):at.match("DOCTYPE",!0,!0)?(at.eatWhile(/[\w\._\-]/),Nt(te(1))):null:at.eat("?")?(at.eatWhile(/[\w\._\-]/),Pt.tokenize=ne("meta","?>"),"meta"):(pt=at.eat("/")?"closeTag":"openTag",Pt.tokenize=jt,"tag bracket");if(Et=="&"){var Ln;return at.eat("#")?at.eat("x")?Ln=at.eatWhile(/[a-fA-F\d]/)&&at.eat(";"):Ln=at.eatWhile(/[\d]/)&&at.eat(";"):Ln=at.eatWhile(/[\w\.\-:]/)&&at.eat(";"),Ln?"atom":"error"}else return at.eatWhile(/[^&<]/),null}Ot.isInText=!0;function jt(at,Pt){var Nt=at.next();if(Nt==">"||Nt=="/"&&at.eat(">"))return Pt.tokenize=Ot,pt=Nt==">"?"endTag":"selfcloseTag","tag bracket";if(Nt=="=")return pt="equals",null;if(Nt=="<"){Pt.tokenize=Ot,Pt.state=ye,Pt.tagName=Pt.tagStart=null;var Et=Pt.tokenize(at,Pt);return Et?Et+" tag error":"tag error"}else return/[\'\"]/.test(Nt)?(Pt.tokenize=Te(Nt),Pt.stringStartCol=at.column(),Pt.tokenize(at,Pt)):(at.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Te(at){var Pt=function(Nt,Et){for(;!Nt.eol();)if(Nt.next()==at){Et.tokenize=jt;break}return"string"};return Pt.isInAttribute=!0,Pt}function ne(at,Pt){return function(Nt,Et){for(;!Nt.eol();){if(Nt.match(Pt)){Et.tokenize=Ot;break}Nt.next()}return at}}function te(at){return function(Pt,Nt){for(var Et;(Et=Pt.next())!=null;){if(Et=="<")return Nt.tokenize=te(at+1),Nt.tokenize(Pt,Nt);if(Et==">")if(at==1){Nt.tokenize=Ot;break}else return Nt.tokenize=te(at-1),Nt.tokenize(Pt,Nt)}return"meta"}}function ce(at,Pt,Nt){this.prev=at.context,this.tagName=Pt,this.indent=at.indented,this.startOfLine=Nt,(Ve.doNotIndent.hasOwnProperty(Pt)||at.context&&at.context.noIndent)&&(this.noIndent=!0)}function se(at){at.context&&(at.context=at.context.prev)}function ge(at,Pt){for(var Nt;;){if(!at.context||(Nt=at.context.tagName,!Ve.contextGrabbers.hasOwnProperty(Nt)||!Ve.contextGrabbers[Nt].hasOwnProperty(Pt)))return;se(at)}}function ye(at,Pt,Nt){return at=="openTag"?(Nt.tagStart=Pt.column(),we):at=="closeTag"?Ce:ye}function we(at,Pt,Nt){return at=="word"?(Nt.tagName=Pt.current(),Rt="tag",lt):Ve.allowMissingTagName&&at=="endTag"?(Rt="tag bracket",lt(at,Pt,Nt)):(Rt="error",we)}function Ce(at,Pt,Nt){if(at=="word"){var Et=Pt.current();return Nt.context&&Nt.context.tagName!=Et&&Ve.implicitlyClosed.hasOwnProperty(Nt.context.tagName)&&se(Nt),Nt.context&&Nt.context.tagName==Et||Ve.matchClosing===!1?(Rt="tag",Re):(Rt="tag error",We)}else return Ve.allowMissingTagName&&at=="endTag"?(Rt="tag bracket",Re(at,Pt,Nt)):(Rt="error",We)}function Re(at,Pt,Nt){return at!="endTag"?(Rt="error",Re):(se(Nt),ye)}function We(at,Pt,Nt){return Rt="error",Re(at,Pt,Nt)}function lt(at,Pt,Nt){if(at=="word")return Rt="attribute",ht;if(at=="endTag"||at=="selfcloseTag"){var Et=Nt.tagName,Ln=Nt.tagStart;return Nt.tagName=Nt.tagStart=null,at=="selfcloseTag"||Ve.autoSelfClosers.hasOwnProperty(Et)?ge(Nt,Et):(ge(Nt,Et),Nt.context=new ce(Nt,Et,Ln==Nt.indented)),ye}return Rt="error",lt}function ht(at,Pt,Nt){return at=="equals"?nt:(Ve.allowMissing||(Rt="error"),lt(at,Pt,Nt))}function nt(at,Pt,Nt){return at=="string"?mt:at=="word"&&Ve.allowUnquoted?(Rt="string",lt):(Rt="error",lt(at,Pt,Nt))}function mt(at,Pt,Nt){return at=="string"?mt:lt(at,Pt,Nt)}return{startState:function(at){var Pt={tokenize:Ot,state:ye,indented:at||0,tagName:null,tagStart:null,context:null};return at!=null&&(Pt.baseIndent=at),Pt},token:function(at,Pt){if(!Pt.tagName&&at.sol()&&(Pt.indented=at.indentation()),at.eatSpace())return null;pt=null;var Nt=Pt.tokenize(at,Pt);return(Nt||pt)&&Nt!="comment"&&(Rt=null,Pt.state=Pt.state(pt||Nt,at,Pt),Rt&&(Nt=Rt=="error"?Nt+" error":Rt)),Nt},indent:function(at,Pt,Nt){var Et=at.context;if(at.tokenize.isInAttribute)return at.tagStart==at.indented?at.stringStartCol+1:at.indented+_e;if(Et&&Et.noIndent)return le.Pass;if(at.tokenize!=jt&&at.tokenize!=Ot)return Nt?Nt.match(/^(\s*)/)[0].length:0;if(at.tagName)return Ve.multilineTagIndentPastTag!==!1?at.tagStart+at.tagName.length+2:at.tagStart+_e*(Ve.multilineTagIndentFactor||1);if(Ve.alignCDATA&&/<!\[CDATA\[/.test(Pt))return 0;var Ln=Pt&&/^<(\/)?([\w_:\.-]*)/.exec(Pt);if(Ln&&Ln[1])for(;Et;)if(Et.tagName==Ln[2]){Et=Et.prev;break}else if(Ve.implicitlyClosed.hasOwnProperty(Et.tagName))Et=Et.prev;else break;else if(Ln)for(;Et;){var xn=Ve.contextGrabbers[Et.tagName];if(xn&&xn.hasOwnProperty(Ln[2]))Et=Et.prev;else break}for(;Et&&Et.prev&&!Et.startOfLine;)Et=Et.prev;return Et?Et.indent+_e:at.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:Ve.htmlMode?"html":"xml",helperType:Ve.htmlMode?"html":"xml",skipAttribute:function(at){at.state==nt&&(at.state=lt)},xmlCurrentTag:function(at){return at.tagName?{name:at.tagName,close:at.type=="closeTag"}:null},xmlCurrentContext:function(at){for(var Pt=[],Nt=at.context;Nt;Nt=Nt.prev)Nt.tagName&&Pt.push(Nt.tagName);return Pt.reverse()}}}),le.defineMIME("text/xml","xml"),le.defineMIME("application/xml","xml"),le.mimeModes.hasOwnProperty("text/html")||le.defineMIME("text/html",{name:"xml",htmlMode:!0})})},23495:function(Rn,$n,be){"use strict";be.d($n,{$u:function(){return ut},BD:function(){return He},E9:function(){return xt},FF:function(){return Oi},FJ:function(){return ye},Hn:function(){return ge},KX:function(){return Ce},NB:function(){return pn},S0:function(){return _t},UL:function(){return pt},Vk:function(){return se},Vm:function(){return en},YI:function(){return mn},ZA:function(){return Lt},Zt:function(){return Rt},al:function(){return Be},bn:function(){return Ue},bx:function(){return Me},g2:function(){return rn},h1:function(){return nt},hD:function(){return yn},l4:function(){return _e},rU:function(){return qn},s_:function(){return Fe},uz:function(){return si},z6:function(){return Ot}}),Rn=be.hmd(Rn),function(){var Ee;function on(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function gn(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:on(a)}}function Mn(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var In=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},ii;if(typeof Object.setPrototypeOf=="function")ii=Object.setPrototypeOf;else{var Ci;e:{var Ji={a:!0},Vt={};try{Vt.__proto__=Ji,Ci=Vt.a;break e}catch(a){}Ci=!1}ii=Ci?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var Zt=ii;function It(a,y){if(a.prototype=In(y.prototype),a.prototype.constructor=a,Zt)Zt(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 dn=typeof be.g!="undefined"&&be.g!=null?be.g:self,Ri=typeof Object.assign=="function"?Object.assign:function(a,y){for(var x=1;x<arguments.length;x++){var E=arguments[x];if(E)for(var b in E)Object.prototype.hasOwnProperty.call(E,b)&&(a[b]=E[b])}return a},hi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function ri(a,y){if(y){var x=dn;a=a.split(".");for(var E=0;E<a.length-1;E++){var b=a[E];b in x||(x[b]={}),x=x[b]}a=a[a.length-1],E=x[a],y=y(E),y!=E&&y!=null&&hi(x,a,{writable:!0,value:y})}}ri("Object.assign",function(a){return a||Ri}),ri("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 Kt=typeof globalThis=="object"&&globalThis||typeof be.g=="object"&&be.g.global===be.g&&be.g||typeof self=="object"&&self.self===self&&self||{};Kt.requestAnimationFrame===void 0&&(Kt.setImmediate===void 0?Kt.requestAnimationFrame=function(a){Kt.setTimeout(a,0)}:Kt.requestAnimationFrame=Kt.setImmediate);function wn(){}function Ki(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&Kt.clearTimeout(x),x=wr(function(){x=-1,a.apply(E,b)},y)}}function wr(a,y){return Kt.setTimeout(a,y)}function Kn(a){return Kt.document.createElement(a)}function Wt(a){throw Error(a)}function Yi(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),Wt(a)}function pr(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),Wt(x+" is not in the range "+y+": "+a)}function Ro(a){Kt.console&&Kt.console.log(a)}function Zn(a){return typeof a=="object"&&a!==null}function Ni(a){return Array.isArray(a)||Kt.NodeList&&a instanceof Kt.NodeList||Kt.HTMLCollection&&a instanceof Kt.HTMLCollection}function Pi(a){return Array.prototype.slice.call(a)}function xs(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):Wt("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function qa(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):Wt("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function Ar(){var a=as.pop();return a===void 0?[]:a}function br(a){a.length=0,as.push(a)}function Rr(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(Zn(a)&&a.constructor)return Rr(a.constructor);return typeof a}function xa(a){var y=a;return Zn(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 Ka(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 _i(a,y,x){Object.defineProperty(jo.prototype,a,{get:y,set:x})}function yo(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 zl=Kt.navigator!==void 0&&0<Kt.navigator.userAgent.indexOf("Trident/7"),ms=Kt.navigator!==void 0&&Kt.navigator.platform!==void 0&&Kt.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,as=[];Object.freeze([]),wn.className="Util",wn.Dx="32ab5ff3b26f42dc0ed90f21472913b5",wn.adym="gojs.net",wn.vfo="28e645fdb266",wn.className="Util";function Qt(a,y,x){_a(this),this.j=a,this.xa=y,this.o=x}Qt.prototype.toString=function(){return"EnumValue."+this.xa};function Br(a,y){return y==null||y===""?null:a[y]}dn.Object.defineProperties(Qt.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Qt.className="EnumValue";function ba(){this.ew=[]}ba.prototype.toString=function(){return this.ew.join("")},ba.prototype.add=function(a){a!==""&&this.ew.push(a)},ba.className="StringBuilder";function to(){}to.className="PropertyCollection";var vs={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){Kt.console&&Kt.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 La(){}La.prototype.reset=function(){},La.prototype.next=function(){return!1},La.prototype.Ad=function(){return!1},La.prototype.first=function(){return null},La.prototype.any=function(){return!1},La.prototype.all=function(){return!0},La.prototype.each=function(){return this},La.prototype.map=function(){return this},La.prototype.filter=function(){return this},La.prototype.de=function(){},La.prototype.toString=function(){return"EmptyIterator"},dn.Object.defineProperties(La.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),La.prototype.first=La.prototype.first,La.prototype.hasNext=La.prototype.Ad,La.prototype.next=La.prototype.next,La.prototype.reset=La.prototype.reset;var Za=null;La.className="EmptyIterator",Za=new La;function wa(a){this.key=-1,this.value=a}wa.prototype.reset=function(){this.key=-1},wa.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},wa.prototype.Ad=function(){return this.next()},wa.prototype.first=function(){return this.key=0,this.value},wa.prototype.any=function(a){return this.key=-1,a(this.value)},wa.prototype.all=function(a){return this.key=-1,a(this.value)},wa.prototype.each=function(a){return this.key=-1,a(this.value),this},wa.prototype.map=function(a){return new wa(a(this.value))},wa.prototype.filter=function(a){return a(this.value)?new wa(this.value):Za},wa.prototype.de=function(){this.value=null},wa.prototype.toString=function(){return"SingletonIterator("+this.value+")"},dn.Object.defineProperties(wa.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),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="SingletonIterator";function ca(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ca.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ca.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},ca.prototype.Ad=function(){return this.next()},ca.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},ca.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},ca.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},ca.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},ca.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 Un,a.s=x,a.xb(),a.iterator},ca.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 Un,a.s=x,a.xb(),a.iterator},ca.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ca.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},dn.Object.defineProperties(ca.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}}}),ca.prototype.first=ca.prototype.first,ca.prototype.hasNext=ca.prototype.Ad,ca.prototype.next=ca.prototype.next,ca.prototype.reset=ca.prototype.reset,ca.className="ListIterator";function Ya(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}Ya.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},Ya.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)},Ya.prototype.Ad=function(){return this.next()},Ya.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},Ya.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},Ya.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},Ya.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},Ya.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 Un,a.s=x,a.xb(),a.iterator},Ya.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 Un,a.s=x,a.xb(),a.iterator},Ya.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},Ya.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},dn.Object.defineProperties(Ya.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),Ya.prototype.first=Ya.prototype.first,Ya.prototype.hasNext=Ya.prototype.Ad,Ya.prototype.next=Ya.prototype.next,Ya.prototype.reset=Ya.prototype.reset,Ya.className="ListIteratorBackwards";function Un(a){_a(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=Un.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.toString=function(){return"List()#"+No(this)},Ee.add=function(a){return a===null?this:(this._isFrozen&&Yi(this,a),this.s.push(a),this.xb(),this)},Ee.push=function(a){this.add(a)},Ee.addAll=function(a){if(a===null)return this;this._isFrozen&&Yi(this);var y=this.s;if(Ni(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},Ee.clear=function(){this._isFrozen&&Yi(this),this.s.length=0,this.xb()},Ee.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},Ee.has=function(a){return this.contains(a)},Ee.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},Ee.M=function(a){var y=this.s;return(0>a||a>=y.length)&&pr(a,"0 <= i < length",Un,"elt:i"),y[a]},Ee.get=function(a){return this.M(a)},Ee.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&pr(a,"0 <= i < length",Un,"setElt:i"),this._isFrozen&&Yi(this,a),x[a]=y},Ee.set=function(a,y){this.cd(a,y)},Ee.first=function(){var a=this.s;return a.length===0?null:a[0]},Ee.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},Ee.pop=function(){this._isFrozen&&Yi(this);var a=this.s;return 0<a.length?a.pop():null},Un.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},Un.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},Un.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},Un.prototype.map=function(a){for(var y=new Un,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},Un.prototype.filter=function(a){for(var y=new Un,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},Ee=Un.prototype,Ee.Gb=function(a,y){0>a&&pr(a,">= 0",Un,"insertAt:i"),this._isFrozen&&Yi(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},Ee.remove=function(a){if(a===null)return!1;this._isFrozen&&Yi(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)},Ee.delete=function(a){return this.remove(a)},Ee.mb=function(a){var y=this.s;(0>a||a>=y.length)&&pr(a,"0 <= i < length",Un,"removeAt:i"),this._isFrozen&&Yi(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},Ee.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&&Yi(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},Un.prototype.copy=function(){var a=new Un,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},Ee=Un.prototype,Ee.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},Ee.Iv=function(){for(var a=new zn,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},Ee.sort=function(a){return this._isFrozen&&Yi(this),this.s.sort(a),this.xb(),this},Ee.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&Yi(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&pr(y,"0 <= from < length",Un,"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},Ee.reverse=function(){return this._isFrozen&&Yi(this),this.s.reverse(),this.xb(),this},dn.Object.defineProperties(Un.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 Za;var a=this.Sa;return a!==null?(a.reset(),a):new ca(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Za;var a=this.Hg;return a!==null?(a.reset(),a):new Ya(this)}}}),Un.prototype.reverse=Un.prototype.reverse,Un.prototype.sortRange=Un.prototype.zi,Un.prototype.sort=Un.prototype.sort,Un.prototype.toSet=Un.prototype.Iv,Un.prototype.toArray=Un.prototype.Fa,Un.prototype.removeRange=Un.prototype.removeRange,Un.prototype.removeAt=Un.prototype.mb,Un.prototype.delete=Un.prototype.delete,Un.prototype.remove=Un.prototype.remove,Un.prototype.insertAt=Un.prototype.Gb,Un.prototype.pop=Un.prototype.pop,Un.prototype.last=Un.prototype.jc,Un.prototype.first=Un.prototype.first,Un.prototype.set=Un.prototype.set,Un.prototype.setElt=Un.prototype.cd,Un.prototype.get=Un.prototype.get,Un.prototype.elt=Un.prototype.M,Un.prototype.indexOf=Un.prototype.indexOf,Un.prototype.has=Un.prototype.has,Un.prototype.contains=Un.prototype.contains,Un.prototype.clear=Un.prototype.clear,Un.prototype.addAll=Un.prototype.addAll,Un.prototype.push=Un.prototype.push,Un.prototype.add=Un.prototype.add,Un.prototype.thaw=Un.prototype.ka,Un.prototype.freeze=Un.prototype.freeze,Un.className="List";function js(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}js.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},js.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)},js.prototype.Ad=function(){return this.next()},js.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},js.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},js.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},js.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},js.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},js.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},js.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},js.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},dn.Object.defineProperties(js.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),js.prototype.first=js.prototype.first,js.prototype.hasNext=js.prototype.Ad,js.prototype.next=js.prototype.next,js.prototype.reset=js.prototype.reset,js.className="SetIterator";function zn(a){_a(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=zn.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.toString=function(){return"Set()#"+No(this)},Ee.add=function(a){if(a===null)return this;this._isFrozen&&Yi(this,a);var y=a;return Zn(a)&&(y=Sl(a)),this.Tb[y]===void 0&&(this.Sb++,a=new fl(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},Ee.addAll=function(a){if(a===null)return this;if(this._isFrozen&&Yi(this),Ni(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},Ee.contains=function(a){if(a===null)return!1;var y=a;return Zn(a)&&(y=No(a),y===void 0)?!1:this.Tb[y]!==void 0},Ee.has=function(a){return this.contains(a)},Ee.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},Ee.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},Ee.first=function(){var a=this.ea;return a===null?null:a.value},zn.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},zn.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},zn.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},zn.prototype.map=function(a){for(var y=new zn,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},zn.prototype.filter=function(a){for(var y=new zn,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},Ee=zn.prototype,Ee.remove=function(a){if(a===null)return!1;this._isFrozen&&Yi(this,a);var y=a;if(Zn(a)&&(y=No(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},Ee.delete=function(a){return this.remove(a)},Ee.hp=function(a){if(a===null)return this;if(this._isFrozen&&Yi(this),Ni(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},Ee.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&Yi(this);var y=new zn;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},Ee.clear=function(){this._isFrozen&&Yi(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},zn.prototype.copy=function(){var a=new zn,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},zn.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},zn.prototype.Hv=function(){var a=new Un,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function _a(a){a.__gohashid=kl++}function Sl(a){var y=a.__gohashid;return y===void 0&&(y=kl++,a.__gohashid=y),y}function No(a){return a.__gohashid}dn.Object.defineProperties(zn.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Za;var a=this.Sa;return a!==null?(a.reset(),a):new js(this)}}}),zn.prototype.toList=zn.prototype.Hv,zn.prototype.toArray=zn.prototype.Fa,zn.prototype.clear=zn.prototype.clear,zn.prototype.retainAll=zn.prototype.pA,zn.prototype.removeAll=zn.prototype.hp,zn.prototype.delete=zn.prototype.delete,zn.prototype.remove=zn.prototype.remove,zn.prototype.first=zn.prototype.first,zn.prototype.containsAny=zn.prototype.Ty,zn.prototype.containsAll=zn.prototype.Sy,zn.prototype.has=zn.prototype.has,zn.prototype.contains=zn.prototype.contains,zn.prototype.addAll=zn.prototype.addAll,zn.prototype.add=zn.prototype.add,zn.prototype.thaw=zn.prototype.ka,zn.prototype.freeze=zn.prototype.freeze;var kl=1;zn.className="Set",zn.uniqueHash=_a,zn.hashIdUnique=Sl,zn.hashId=No;function bs(a){this.ma=a,this.qa=a.Ja,this.sa=null}bs.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},bs.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)},bs.prototype.Ad=function(){return this.next()},bs.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},bs.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},bs.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},bs.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},bs.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},bs.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},bs.prototype.de=function(){this.value=this.key=null,this.qa=-1},bs.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},dn.Object.defineProperties(bs.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),bs.prototype.first=bs.prototype.first,bs.prototype.hasNext=bs.prototype.Ad,bs.prototype.next=bs.prototype.next,bs.prototype.reset=bs.prototype.reset,bs.className="MapKeySetIterator";function ja(a){zn.call(this),_a(this),this._isFrozen=!0,this.ma=a}It(ja,zn),Ee=ja.prototype,Ee.freeze=function(){return this},Ee.ka=function(){return this},Ee.toString=function(){return"MapKeySet("+this.ma.toString()+")"},Ee.add=function(){Wt("This Set is read-only: "+this.toString())},Ee.contains=function(a){return this.ma.contains(a)},Ee.has=function(a){return this.contains(a)},Ee.remove=function(){Wt("This Set is read-only: "+this.toString())},Ee.delete=function(a){return this.remove(a)},Ee.clear=function(){Wt("This Set is read-only: "+this.toString())},Ee.first=function(){var a=this.ma.ea;return a!==null?a.key:null},ja.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},ja.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},ja.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},ja.prototype.map=function(a){for(var y=new zn,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},ja.prototype.filter=function(a){for(var y=new zn,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},ja.prototype.copy=function(){return new ja(this.ma)},ja.prototype.Iv=function(){var a=new zn,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},ja.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},ja.prototype.Hv=function(){var a=new Un,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},dn.Object.defineProperties(ja.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Za:new bs(this.ma)}}}),ja.prototype.toList=ja.prototype.Hv,ja.prototype.toArray=ja.prototype.Fa,ja.prototype.toSet=ja.prototype.Iv,ja.prototype.first=ja.prototype.first,ja.prototype.clear=ja.prototype.clear,ja.prototype.delete=ja.prototype.delete,ja.prototype.remove=ja.prototype.remove,ja.prototype.has=ja.prototype.has,ja.prototype.contains=ja.prototype.contains,ja.prototype.add=ja.prototype.add,ja.prototype.thaw=ja.prototype.ka,ja.prototype.freeze=ja.prototype.freeze,ja.className="MapKeySet";function es(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}es.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},es.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)},es.prototype.Ad=function(){return this.next()},es.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},es.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},es.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},es.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},es.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},es.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new Un;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},es.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},es.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},dn.Object.defineProperties(es.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),es.prototype.first=es.prototype.first,es.prototype.hasNext=es.prototype.Ad,es.prototype.next=es.prototype.next,es.prototype.reset=es.prototype.reset,es.className="MapValueSetIterator";function fl(a,y){this.key=a,this.value=y,this.ll=this.va=null}fl.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},fl.className="KeyValuePair";function ps(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}ps.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},ps.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)},ps.prototype.Ad=function(){return this.next()},ps.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},ps.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},ps.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},ps.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},ps.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},ps.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new Un;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},ps.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},ps.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},dn.Object.defineProperties(ps.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),ps.prototype.first=ps.prototype.first,ps.prototype.hasNext=ps.prototype.Ad,ps.prototype.next=ps.prototype.next,ps.prototype.reset=ps.prototype.reset,ps.className="MapIterator";function sr(a){_a(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"&&Wt("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}Ee=sr.prototype,Ee.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.toString=function(){return"Map()#"+No(this)},Ee.add=function(a,y){this._isFrozen&&Yi(this,a);var x=a;Zn(a)&&(x=Sl(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new fl(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},Ee.set=function(a,y){return this.add(a,y)},Ee.addAll=function(a){if(a===null)return this;if(Ni(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 sr)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},Ee.first=function(){return this.ea},sr.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},sr.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},sr.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},sr.prototype.map=function(a){for(var y=new sr,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},sr.prototype.filter=function(a){for(var y=new sr,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},Ee=sr.prototype,Ee.contains=function(a){var y=a;return Zn(a)&&(y=No(a),y===void 0)?!1:this.Tb[y]!==void 0},Ee.has=function(a){return this.contains(a)},Ee.I=function(a){var y=a;return Zn(a)&&(y=No(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},Ee.get=function(a){return this.I(a)},Ee.remove=function(a){if(a===null)return!1;this._isFrozen&&Yi(this,a);var y=a;if(Zn(a)&&(y=No(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},Ee.delete=function(a){return this.remove(a)},Ee.clear=function(){this._isFrozen&&Yi(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()},sr.prototype.copy=function(){var a=new sr,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},sr.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 fl(b.key,b.value),x++}return y},sr.prototype.Lf=function(){return new ja(this)},dn.Object.defineProperties(sr.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Za;var a=this.Sa;return a!==null?(a.reset(),a):new ps(this)}},iteratorKeys:{get:function(){return 0>=this.count?Za:new bs(this)}},iteratorValues:{get:function(){if(0>=this.count)return Za;var a=this.jf;return a!==null?(a.reset(),a):new es(this)}}}),sr.prototype.toKeySet=sr.prototype.Lf,sr.prototype.toArray=sr.prototype.Fa,sr.prototype.clear=sr.prototype.clear,sr.prototype.delete=sr.prototype.delete,sr.prototype.remove=sr.prototype.remove,sr.prototype.get=sr.prototype.get,sr.prototype.getValue=sr.prototype.I,sr.prototype.has=sr.prototype.has,sr.prototype.contains=sr.prototype.contains,sr.prototype.first=sr.prototype.first,sr.prototype.addAll=sr.prototype.addAll,sr.prototype.set=sr.prototype.set,sr.prototype.add=sr.prototype.add,sr.prototype.thaw=sr.prototype.ka,sr.prototype.freeze=sr.prototype.freeze,sr.className="Map";function tt(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):Wt("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var il,ql,rl,Il,nu;tt.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.h=function(a,y){return this.x=a,this.y=y,this},tt.prototype.sg=function(a,y){return this.x=a,this.y=y,this},tt.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},tt.prototype.copy=function(){var a=new tt;return a.x=this.x,a.y=this.y,a},Ee=tt.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Mu(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 tt(x,b)}return new tt}function Au(a){return a.x.toString()+" "+a.y.toString()}Ee.toString=function(){return"Point("+this.x+","+this.y+")"},Ee.D=function(a){return a instanceof tt?this.x===a.x&&this.y===a.y:!1},Ee.hi=function(a,y){return this.x===a&&this.y===y},Ee.Xa=function(a){return ze.B(this.x,a.x)&&ze.B(this.y,a.y)},Ee.add=function(a){return this.x+=a.x,this.y+=a.y,this},Ee.re=function(a){return this.x-=a.x,this.y-=a.y,this},Ee.offset=function(a,y){return this.x+=a,this.y+=y,this},tt.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},Ee=tt.prototype,Ee.scale=function(a,y){return this.x*=a,this.y*=y,this},Ee.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},Ee.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},Ee.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},Ee.ab=function(a){return Hu(a.x-this.x,a.y-this.y)},Ee.direction=function(a,y){return Hu(a-this.x,y-this.y)};function Hu(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}Ee.Ry=function(a,y){return ze.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},Ee.fA=function(a,y,x,E){return ze.qh(a,y,x,E,this.x,this.y,this),this},Ee.gA=function(a,y){return ze.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},Ee.uA=function(a,y,x,E){return ze.No(this.x,this.y,a,y,x,E,this),this},Ee.vA=function(a,y){return ze.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},Ee.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},Ee.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},Ee.transform=function(a){return a.Ga(this),this};function ws(a,y){return y.Cd(a),a}function Js(a,y,x,E,b,z){var ee=b-x,re=z-E,oe=ee*ee+re*re;x-=a,E-=y;var ue=-x*ee-E*re;return 0>=ue||ue>=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 Xr(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function no(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)}Ee.w=function(){return isFinite(this.x)&&isFinite(this.y)},tt.alloc=function(){var a=na.pop();return a===void 0?new tt:a},tt.allocAt=function(a,y){var x=na.pop();return x===void 0?new tt(a,y):(x.x=a,x.y=y,x)},tt.free=function(a){na.push(a)},tt.prototype.isReal=tt.prototype.w,tt.prototype.setSpot=tt.prototype.yi,tt.prototype.setRectSpot=tt.prototype.xi,tt.prototype.snapToGridPoint=tt.prototype.vA,tt.prototype.snapToGrid=tt.prototype.uA,tt.prototype.projectOntoLineSegmentPoint=tt.prototype.gA,tt.prototype.projectOntoLineSegment=tt.prototype.fA,tt.intersectingLineSegments=function(a,y,x,E,b,z,ee,re){return ze.Rl(a,y,x,E,b,z,ee,re)},tt.prototype.compareWithLineSegmentPoint=tt.prototype.Ry,tt.compareWithLineSegment=function(a,y,x,E,b,z){return ze.Fl(a,y,x,E,b,z)},tt.prototype.direction=tt.prototype.direction,tt.prototype.directionPoint=tt.prototype.ab,tt.prototype.normalize=tt.prototype.normalize,tt.prototype.distanceSquared=tt.prototype.zd,tt.prototype.distanceSquaredPoint=tt.prototype.Bf,tt.prototype.scale=tt.prototype.scale,tt.prototype.rotate=tt.prototype.rotate,tt.prototype.offset=tt.prototype.offset,tt.prototype.subtract=tt.prototype.re,tt.prototype.add=tt.prototype.add,tt.prototype.equalsApprox=tt.prototype.Xa,tt.prototype.equalTo=tt.prototype.hi,tt.prototype.equals=tt.prototype.D,tt.prototype.set=tt.prototype.set,tt.prototype.setTo=tt.prototype.sg;var na=[];tt.className="Point",tt.parse=Mu,tt.stringify=Au,tt.distanceLineSegmentSquared=Js,tt.distanceSquared=Xr,tt.direction=no,tt.Origin=il=new tt(0,0).ja(),tt.InfiniteTopLeft=ql=new tt(-1/0,-1/0).ja(),tt.InfiniteBottomRight=rl=new tt(1/0,1/0).ja(),tt.SixPoint=Il=new tt(6,6).ja(),tt.NoPoint=nu=new tt(NaN,NaN).ja(),tt.parse=Mu,tt.stringify=Au,tt.distanceLineSegmentSquared=Js,tt.distanceSquared=Xr,tt.direction=no;function Fn(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):Wt("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var Bo,io,Ds,Ps,ol,Al,hu;Fn.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},Fn.prototype.h=function(a,y){return this.width=a,this.height=y,this},Fn.prototype.sg=function(a,y){return this.width=a,this.height=y,this},Fn.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},Fn.prototype.copy=function(){var a=new Fn;return a.width=this.width,a.height=this.height,a},Ee=Fn.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function eu(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 Fn(x,b)}return new Fn}function Eu(a){return a.width.toString()+" "+a.height.toString()}Ee.toString=function(){return"Size("+this.width+","+this.height+")"},Ee.D=function(a){return a instanceof Fn?this.width===a.width&&this.height===a.height:!1},Ee.hi=function(a,y){return this.width===a&&this.height===y},Ee.Xa=function(a){return ze.B(this.width,a.width)&&ze.B(this.height,a.height)},Ee.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},Ee.w=function(){return isFinite(this.width)&&isFinite(this.height)},Fn.alloc=function(){var a=Wu.pop();return a===void 0?new Fn:a},Fn.free=function(a){Wu.push(a)},Fn.prototype.isReal=Fn.prototype.w,Fn.prototype.inflate=Fn.prototype.Bc,Fn.prototype.equalsApprox=Fn.prototype.Xa,Fn.prototype.equalTo=Fn.prototype.hi,Fn.prototype.equals=Fn.prototype.D,Fn.prototype.set=Fn.prototype.set,Fn.prototype.setTo=Fn.prototype.sg;var Wu=[];Fn.className="Size",Fn.parse=eu,Fn.stringify=Eu,Fn.ZeroSize=Bo=new Fn(0,0).ja(),Fn.OneSize=io=new Fn(1,1).ja(),Fn.SixSize=Ds=new Fn(6,6).ja(),Fn.EightSize=Ps=new Fn(8,8).ja(),Fn.TenSize=ol=new Fn(10,10).ja(),Fn.InfiniteSize=Al=new Fn(1/0,1/0).ja(),Fn.NoSize=hu=new Fn(NaN,NaN).ja(),Fn.parse=eu,Fn.stringify=Eu;function ln(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 tt?(x=a.x,a=a.y,y instanceof tt?(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 Fn?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):Wt("Incorrect second argument supplied to Rect constructor "+y)):Wt("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}Ee=ln.prototype,Ee.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ee.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Gl(a,y,x){a.width=y,a.height=x}Ee.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},Ee.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},Ee.dd=function(a){return this.x=a.x,this.y=a.y,this},Ee.tA=function(a){return this.width=a.width,this.height=a.height,this},ln.prototype.copy=function(){var a=new ln;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},Ee=ln.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Uo(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 ln(x,b,z,ee)}return new ln}function Zu(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}Ee.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},Ee.D=function(a){return a instanceof ln?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},Ee.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},Ee.Xa=function(a){return ze.B(this.x,a.x)&&ze.B(this.y,a.y)&&ze.B(this.width,a.width)&&ze.B(this.height,a.height)};function al(a,y){return ze.$(a.x,y.x)&&ze.$(a.y,y.y)&&ze.$(a.width,y.width)&&ze.$(a.height,y.height)}Ee.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},Ee.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},Ee.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},Ee.offset=function(a,y){return this.x+=a,this.y+=y,this},Ee.Bc=function(a,y){return Su(this,y,a,y,a)},Ee.Co=function(a){return Su(this,a.top,a.right,a.bottom,a.left)},Ee.Fv=function(a){return Su(this,-a.top,-a.right,-a.bottom,-a.left)},Ee.Hz=function(a,y,x,E){return Su(this,a,y,x,E)};function Su(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}Ee.Ex=function(a){return Jc(this,a.x,a.y,a.width,a.height)},Ee.Uu=function(a,y,x,E){return Jc(this,a,y,x,E)};function Jc(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}Ee.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},Ee.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 Dc(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))}Ee.Ye=function(a){return Ws(this,a.x,a.y,0,0)},Ee.ed=function(a){return Ws(this,a.x,a.y,a.width,a.height)},Ee.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Ws(this,a,y,x,E)};function Ws(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}Ee.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 Oa(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 Pa(a,y,x,E,b,z,ee,re){return a>ee+b||b>x+a?!1:!(y>re+z||z>E+y)}Ee.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Ee.Mz=function(){return this.width===0&&this.height===0},ln.alloc=function(){var a=sl.pop();return a===void 0?new ln:a},ln.allocAt=function(a,y,x,E){var b=sl.pop();return b===void 0?new ln(a,y,x,E):b.h(a,y,x,E)},ln.free=function(a){sl.push(a)},dn.Object.defineProperties(ln.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 tt(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new Fn(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new tt(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}}}),ln.prototype.isEmpty=ln.prototype.Mz,ln.prototype.isReal=ln.prototype.w,ln.intersectsLineSegment=function(a,y,x,E,b,z,ee,re){return ze.Fx(a,y,x,E,b,z,ee,re)},ln.prototype.setSpot=ln.prototype.yi,ln.prototype.union=ln.prototype.Kv,ln.prototype.unionRect=ln.prototype.ed,ln.prototype.unionPoint=ln.prototype.Ye,ln.prototype.intersects=ln.prototype.Vu,ln.prototype.intersectsRect=ln.prototype.Yc,ln.prototype.intersect=ln.prototype.Uu,ln.prototype.intersectRect=ln.prototype.Ex,ln.prototype.grow=ln.prototype.Hz,ln.prototype.subtractMargin=ln.prototype.Fv,ln.prototype.addMargin=ln.prototype.Co,ln.prototype.inflate=ln.prototype.Bc,ln.prototype.offset=ln.prototype.offset,ln.prototype.contains=ln.prototype.contains,ln.prototype.containsRect=ln.prototype.Re,ln.prototype.containsPoint=ln.prototype.ca,ln.prototype.equalsApprox=ln.prototype.Xa,ln.prototype.equalTo=ln.prototype.hi,ln.prototype.equals=ln.prototype.D,ln.prototype.setSize=ln.prototype.tA,ln.prototype.setPoint=ln.prototype.dd,ln.prototype.set=ln.prototype.set,ln.prototype.setTo=ln.prototype.sg;var Ga=null,ts=null,sl=[];ln.className="Rect",ln.parse=Uo,ln.stringify=Zu,ln.contains=Oa,ln.intersects=Pa,ln.ZeroRect=Ga=new ln(0,0,0,0).ja(),ln.NoRect=ts=new ln(NaN,NaN,NaN,NaN).ja(),ln.parse=Uo,ln.stringify=Zu,ln.contains=Oa,ln.intersects=Pa;function oo(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):Wt("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}oo.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},oo.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},oo.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},oo.prototype.copy=function(){var a=new oo;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},Ee=oo.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function $c(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 oo;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new oo(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new oo(x,b);for(var ee=NaN;a[y]==="";)y++;return(E=a[y++])&&(ee=parseFloat(E)),isNaN(ee)?new oo(x,b):new oo(x,b,z,ee)}return new oo}function Hl(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}Ee.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},Ee.D=function(a){return a instanceof oo?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},Ee.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},Ee.Xa=function(a){return ze.B(this.top,a.top)&&ze.B(this.right,a.right)&&ze.B(this.bottom,a.bottom)&&ze.B(this.left,a.left)},Ee.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},oo.alloc=function(){var a=Pc.pop();return a===void 0?new oo:a},oo.free=function(a){Pc.push(a)},oo.prototype.isReal=oo.prototype.w,oo.prototype.equalsApprox=oo.prototype.Xa,oo.prototype.equalTo=oo.prototype.hi,oo.prototype.equals=oo.prototype.D,oo.prototype.set=oo.prototype.set,oo.prototype.setTo=oo.prototype.sg;var iu=null,Tc=null,Pc=[];oo.className="Margin",oo.parse=$c,oo.stringify=Hl,oo.ZeroMargin=iu=new oo(0,0,0,0).ja(),oo.TwoMargin=Tc=new oo(2,2,2,2).ja(),oo.parse=$c,oo.stringify=Hl;function fr(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 El,Fl,Qu,Ec,_c,pa,qc,Ju,tn,un,Gn,er,Wi,Bi,ki,On,pi,ur,_r,da,ia,Es,cs,Do,jr,qi,Va,Ha,Ts,_s,ha,za,Ho,zr,Ns,Aa;fr.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},fr.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},fr.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},fr.prototype.copy=function(){var a=new fr;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},Ee=fr.prototype,Ee.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},Ee.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ia(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Zs(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return El;if(a==="TopLeft")return Fl;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return Qu;if(a==="TopRight")return Ec;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return _c;if(a==="Center")return pa;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return qc;if(a==="BottomLeft")return Ju;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return tn;if(a==="BottomRight")return un;if(a==="TopSide")return Gn;if(a==="LeftSide")return er;if(a==="RightSide")return Wi;if(a==="BottomSide")return Bi;if(a==="TopBottomSides")return ki;if(a==="LeftRightSides")return On;if(a==="TopLeftSides")return pi;if(a==="TopRightSides")return ur;if(a==="BottomLeftSides")return _r;if(a==="BottomRightSides")return da;if(a==="NotTopSide")return ia;if(a==="NotLeftSide")return Es;if(a==="NotRightSide")return cs;if(a==="NotBottomSide")return Do;if(a==="AllSides")return jr;if(a==="Default")return qi;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 fr(x,b,z,ee)}return new fr}function Vu(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}Ee.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(El)?"None":this.D(Fl)?"TopLeft":this.D(Qu)?"Top":this.D(Ec)?"TopRight":this.D(_c)?"Left":this.D(pa)?"Center":this.D(qc)?"Right":this.D(Ju)?"BottomLeft":this.D(tn)?"Bottom":this.D(un)?"BottomRight":this.D(Gn)?"TopSide":this.D(er)?"LeftSide":this.D(Wi)?"RightSide":this.D(Bi)?"BottomSide":this.D(ki)?"TopBottomSides":this.D(On)?"LeftRightSides":this.D(pi)?"TopLeftSides":this.D(ur)?"TopRightSides":this.D(_r)?"BottomLeftSides":this.D(da)?"BottomRightSides":this.D(ia)?"NotTopSide":this.D(Es)?"NotLeftSide":this.D(cs)?"NotRightSide":this.D(Do)?"NotBottomSide":this.D(jr)?"AllSides":this.D(qi)?"Default":"None"},Ee.D=function(a){return a instanceof fr?(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},Ee.gv=function(){return new fr(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},Ee.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(Va))a=er;else if(a.D(Ha))a=Wi;else if(a.D(Ts))a=Gn;else if(a.D(_s))a=Bi;else return!1;return a=a.offsetY,(this.offsetY&a)===a},Ee.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},Ee.Mc=function(){return isNaN(this.x)||isNaN(this.y)},Ee.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},Ee.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},Ee.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},fr.alloc=function(){var a=fu.pop();return a===void 0?new fr:a},fr.free=function(a){fu.push(a)},fr.prototype.isDefault=fr.prototype.Xb,fr.prototype.isNone=fr.prototype.ys,fr.prototype.isSide=fr.prototype.$c,fr.prototype.isNoSpot=fr.prototype.Mc,fr.prototype.isSpot=fr.prototype.sb,fr.prototype.includesSide=fr.prototype.Hf,fr.prototype.opposite=fr.prototype.gv,fr.prototype.equals=fr.prototype.D,fr.prototype.set=fr.prototype.set,fr.prototype.setTo=fr.prototype.sg;var fu=[];fr.className="Spot",fr.parse=Zs,fr.stringify=Vu,fr.None=El=Ia(new fr(0,0,0,0),0).ja(),fr.Default=qi=Ia(new fr(0,0,-1,0),-1).ja(),fr.TopLeft=Fl=new fr(0,0,0,0).ja(),fr.TopCenter=Qu=new fr(.5,0,0,0).ja(),fr.TopRight=Ec=new fr(1,0,0,0).ja(),fr.LeftCenter=_c=new fr(0,.5,0,0).ja(),fr.Center=pa=new fr(.5,.5,0,0).ja(),fr.RightCenter=qc=new fr(1,.5,0,0).ja(),fr.BottomLeft=Ju=new fr(0,1,0,0).ja(),fr.BottomCenter=tn=new fr(.5,1,0,0).ja(),fr.BottomRight=un=new fr(1,1,0,0).ja(),fr.MiddleTop=ha=Qu,fr.MiddleLeft=za=_c,fr.MiddleRight=Ho=qc,fr.MiddleBottom=zr=tn,fr.Top=Ts=Qu,fr.Left=Va=_c,fr.Right=Ha=qc,fr.Bottom=_s=tn,fr.TopSide=Gn=Ia(new fr(0,0,1,1),1).ja(),fr.LeftSide=er=Ia(new fr(0,0,1,2),1).ja(),fr.RightSide=Wi=Ia(new fr(0,0,1,4),1).ja(),fr.BottomSide=Bi=Ia(new fr(0,0,1,8),1).ja(),fr.TopBottomSides=ki=Ia(new fr(0,0,1,9),1).ja(),fr.LeftRightSides=On=Ia(new fr(0,0,1,6),1).ja(),fr.TopLeftSides=pi=Ia(new fr(0,0,1,3),1).ja(),fr.TopRightSides=ur=Ia(new fr(0,0,1,5),1).ja(),fr.BottomLeftSides=_r=Ia(new fr(0,0,1,10),1).ja(),fr.BottomRightSides=da=Ia(new fr(0,0,1,12),1).ja(),fr.NotTopSide=ia=Ia(new fr(0,0,1,14),1).ja(),fr.NotLeftSide=Es=Ia(new fr(0,0,1,13),1).ja(),fr.NotRightSide=cs=Ia(new fr(0,0,1,11),1).ja(),fr.NotBottomSide=Do=Ia(new fr(0,0,1,7),1).ja(),fr.AllSides=jr=Ia(new fr(0,0,1,15),1).ja(),Ns=new fr(.156,.156).ja(),Aa=new fr(.844,.844).ja(),fr.parse=Zs,fr.stringify=Vu;function St(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}St.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},St.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},St.prototype.copy=function(){var a=new St;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},St.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},St.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},St.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},St.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},St.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},St.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},St.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},St.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},Ee=St.prototype,Ee.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},Ee.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},Ee.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)},Ee.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))},Ee.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))},Ee.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,ue=this.dx,de=this.dy,pe=y*z+x*re+ue,Se=y*ee+x*oe+de,Pe=E*z+x*re+ue,Le=E*ee+x*oe+de;return x=y*z+b*re+ue,y=y*ee+b*oe+de,z=E*z+b*re+ue,E=E*ee+b*oe+de,b=Math.min(pe,Pe),pe=Math.max(pe,Pe),Pe=Math.min(Se,Le),Se=Math.max(Se,Le),b=Math.min(b,x),pe=Math.max(pe,x),Pe=Math.min(Pe,y),Se=Math.max(Se,y),b=Math.min(b,z),pe=Math.max(pe,z),Pe=Math.min(Pe,E),Se=Math.max(Se,E),a.h(b,Pe,pe-b,Se-Pe),a},St.alloc=function(){var a=Jt.pop();return a===void 0?new St:a},St.free=function(a){Jt.push(a)},St.prototype.transformRect=St.prototype.pp,St.prototype.transformPoint=St.prototype.Ga,St.prototype.scale=St.prototype.scale,St.prototype.translate=St.prototype.translate,St.prototype.rotate=St.prototype.rotate,St.prototype.invert=St.prototype.Vj,St.prototype.multiplyInverted=St.prototype.bv,St.prototype.multiply=St.prototype.multiply,St.prototype.reset=St.prototype.reset,St.prototype.isIdentity=St.prototype.ws,St.prototype.equals=St.prototype.D,St.prototype.setTransform=St.prototype.setTransform,St.prototype.set=St.prototype.set;var Jt=[];St.className="Transform",St.xF="54a702f3e53909c447824c6706603faf4c";var ze={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=ze.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);ze.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 ue=y,de=E;else ue=E,de=y;if(a===x)return ue<=ee&&ee<=de&&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&&(de+=b,ue-=b,ue<=ee&&ee<=de))if(oe-re>de-ue)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,ue,de,pe){if(ze.Yb(a,y,ee,re,pe,x,E)&&ze.Yb(a,y,ee,re,pe,b,z))return ze.Yb(a,y,ee,re,pe,ue,de);var Se=(a+x)/2,Pe=(y+E)/2,Le=(x+b)/2,De=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Se+Le)/2,x=(Pe+De)/2,Le=(Le+b)/2,De=(De+z)/2;var qe=(E+Le)/2,Ze=(x+De)/2;return ze.cs(a,y,Se,Pe,E,x,qe,Ze,oe,ue,de,pe)||ze.cs(qe,Ze,Le,De,b,z,ee,re,oe,ue,de,pe)},ax:function(a,y,x,E,b,z,ee,re,oe){var ue=(x+b)/2,de=(E+z)/2;return oe.h((((a+x)/2+ue)/2+(ue+(b+ee)/2)/2)/2,(((y+E)/2+de)/2+(de+(z+re)/2)/2)/2),oe},My:function(a,y,x,E,b,z,ee,re){var oe=(x+b)/2,ue=(E+z)/2;return no(((a+x)/2+oe)/2,((y+E)/2+ue)/2,(oe+(b+ee)/2)/2,(ue+(z+re)/2)/2)},Dl:function(a,y,x,E,b,z,ee,re,oe,ue){if(ze.Yb(a,y,ee,re,oe,x,E)&&ze.Yb(a,y,ee,re,oe,b,z))Ws(ue,a,y,0,0),Ws(ue,ee,re,0,0);else{var de=(a+x)/2,pe=(y+E)/2,Se=(x+b)/2,Pe=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(de+Se)/2,x=(pe+Pe)/2,Se=(Se+b)/2,Pe=(Pe+z)/2;var Le=(E+Se)/2,De=(x+Pe)/2;ze.Dl(a,y,de,pe,E,x,Le,De,oe,ue),ze.Dl(Le,De,Se,Pe,b,z,ee,re,oe,ue)}return ue},Qe:function(a,y,x,E,b,z,ee,re,oe,ue){if(ze.Yb(a,y,ee,re,oe,x,E)&&ze.Yb(a,y,ee,re,oe,b,z))ue.length===0&&(ue.push(a),ue.push(y)),ue.push(ee),ue.push(re);else{var de=(a+x)/2,pe=(y+E)/2,Se=(x+b)/2,Pe=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(de+Se)/2,x=(pe+Pe)/2,Se=(Se+b)/2,Pe=(Pe+z)/2;var Le=(E+Se)/2,De=(x+Pe)/2;ze.Qe(a,y,de,pe,E,x,Le,De,oe,ue),ze.Qe(Le,De,Se,Pe,b,z,ee,re,oe,ue)}return ue},jv:function(a,y,x,E,b,z,ee,re,oe,ue){if(ze.Yb(a,y,b,z,ue,x,E))return ze.Yb(a,y,b,z,ue,re,oe);var de=(a+x)/2,pe=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var Se=(de+x)/2,Pe=(pe+E)/2;return ze.jv(a,y,de,pe,Se,Pe,ee,re,oe,ue)||ze.jv(Se,Pe,x,E,b,z,ee,re,oe,ue)},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(ze.Yb(a,y,b,z,ee,x,E))Ws(re,a,y,0,0),Ws(re,b,z,0,0);else{var oe=(a+x)/2,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var de=(oe+x)/2,pe=(ue+E)/2;ze.iv(a,y,oe,ue,de,pe,ee,re),ze.iv(de,pe,x,E,b,z,ee,re)}return re},ep:function(a,y,x,E,b,z,ee,re){if(ze.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,ue=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var de=(oe+x)/2,pe=(ue+E)/2;ze.ep(a,y,oe,ue,de,pe,ee,re),ze.ep(de,pe,x,E,b,z,ee,re)}return re},Eo:function(a,y,x,E,b,z,ee,re,oe,ue,de,pe,Se,Pe){if(ze.Yb(a,y,ee,re,Se,x,E)&&ze.Yb(a,y,ee,re,Se,b,z))return!ze.Rl(a,y,ee,re,oe,ue,de,pe)||(Se=(a-ee)*(ue-pe)-(y-re)*(oe-de),Se===0)?!1:(Pe.h(((a*re-y*ee)*(oe-de)-(a-ee)*(oe*pe-ue*de))/Se,((a*re-y*ee)*(ue-pe)-(y-re)*(oe*pe-ue*de))/Se),!0);var Le=(a+x)/2,De=(y+E)/2,qe=(x+b)/2,Ze=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Le+qe)/2,x=(De+Ze)/2,qe=(qe+b)/2,Ze=(Ze+z)/2;var ct=(E+qe)/2,ft=(x+Ze)/2,yt=1/0,kt=!1,Ut=0,gi=0;return ze.Eo(a,y,Le,De,E,x,ct,ft,oe,ue,de,pe,Se,Pe)&&(a=(Pe.x-oe)*(Pe.x-oe)+(Pe.y-ue)*(Pe.y-ue),a<yt&&(yt=a,kt=!0,Ut=Pe.x,gi=Pe.y)),ze.Eo(ct,ft,qe,Ze,b,z,ee,re,oe,ue,de,pe,Se,Pe)&&(Pe.x-oe)*(Pe.x-oe)+(Pe.y-ue)*(Pe.y-ue)<yt&&(kt=!0,Ut=Pe.x,gi=Pe.y),kt&&(Pe.x=Ut,Pe.y=gi),kt},Fo:function(a,y,x,E,b,z,ee,re,oe,ue,de,pe,Se){var Pe=0;if(ze.Yb(a,y,ee,re,Se,x,E)&&ze.Yb(a,y,ee,re,Se,b,z)){if(Se=(a-ee)*(ue-pe)-(y-re)*(oe-de),Se===0)return Pe;var Le=((a*re-y*ee)*(oe-de)-(a-ee)*(oe*pe-ue*de))/Se,De=((a*re-y*ee)*(ue-pe)-(y-re)*(oe*pe-ue*de))/Se;if(Le>=de)return Pe;if((oe>de?oe-de:de-oe)<(ue>pe?ue-pe:pe-ue)){if(y<re?(oe=y,a=re):(oe=re,a=y),De<oe||De>a)return Pe}else if(a<ee?(oe=a,a=ee):oe=ee,Le<oe||Le>a)return Pe;0<Se?Pe++:0>Se&&Pe--}else{Le=(a+x)/2,De=(y+E)/2;var qe=(x+b)/2,Ze=(E+z)/2;b=(b+ee)/2,z=(z+re)/2,E=(Le+qe)/2,x=(De+Ze)/2,qe=(qe+b)/2,Ze=(Ze+z)/2;var ct=(E+qe)/2,ft=(x+Ze)/2;Pe+=ze.Fo(a,y,Le,De,E,x,ct,ft,oe,ue,de,pe,Se),Pe+=ze.Fo(ct,ft,qe,Ze,b,z,ee,re,oe,ue,de,pe,Se)}return Pe},qh:function(a,y,x,E,b,z,ee){return ze.$(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)):ze.$(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 ze.B(a,x)&&ze.B(y,E)?(oe.h(a,y),!1):ze.$(b,ee)?ze.$(a,x)?(ze.qh(a,y,x,E,b,z,oe),!1):ze.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,oe):(re=(re-z)/(ee-b),ze.$(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),ze.$(re,ee)?(ze.qh(a,y,x,E,b,z,oe),!1):(b=(ee*a-re*b+z-y)/(ee-re),ze.$(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)):ze.qh(a,y,x,E,b,ee*(b-a)+y,oe))))},MA:function(a,y,x,E,b){return ze.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,ue){function de(qe,Ze){var ct=(qe-a)*(qe-a)+(Ze-y)*(Ze-y);ct<pe&&(pe=ct,oe.h(qe,Ze))}var pe=1/0;de(oe.x,oe.y);var Se=0,Pe=0,Le=0,De=0;if(b<ee?(Se=b,Pe=ee):(Se=ee,Pe=b),z<re?(Le=b,De=ee):(Le=ee,De=b),Se=(Pe-Se)/2+ue,ue=(De-Le)/2+ue,b=(b+ee)/2,z=(z+re)/2,Se===0||ue===0)return oe;if(.5>(x>a?x-a:a-x)){if(Se=1-(x-b)*(x-b)/(Se*Se),0>Se)return oe;Se=Math.sqrt(Se),E=-ue*Se+z,de(x,ue*Se+z),de(x,E)}else{if(x=(E-y)/(x-a),E=1/(Se*Se)+x*x/(ue*ue),re=2*x*(y-x*a)/(ue*ue)-2*x*z/(ue*ue)-2*b/(Se*Se),Se=re*re-4*E*(2*x*a*z/(ue*ue)-2*y*z/(ue*ue)+z*z/(ue*ue)+b*b/(Se*Se)-1+(y-x*a)*(y-x*a)/(ue*ue)),0>Se)return oe;Se=Math.sqrt(Se),ue=(-re+Se)/(2*E),de(ue,x*ue-x*a+y),Se=(-re-Se)/(2*E),de(Se,x*Se-x*a+y)}return oe},Ff:function(a,y,x,E,b,z,ee,re,oe){var ue=1e21,de=a,pe=y;if(ze.Ve(a,y,a,E,b,z,ee,re,oe)){var Se=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z);Se<ue&&(ue=Se,de=oe.x,pe=oe.y)}return ze.Ve(x,y,x,E,b,z,ee,re,oe)&&(Se=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),Se<ue&&(ue=Se,de=oe.x,pe=oe.y)),ze.Ve(a,y,x,y,b,z,ee,re,oe)&&(y=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),y<ue&&(ue=y,de=oe.x,pe=oe.y)),ze.Ve(a,E,x,E,b,z,ee,re,oe)&&(a=(oe.x-b)*(oe.x-b)+(oe.y-z)*(oe.y-z),a<ue&&(ue=a,de=oe.x,pe=oe.y)),oe.h(de,pe),1e21>ue},us:function(a,y,x){return ze.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,ue=y+E;return b===ee?(z<re?(ee=z,z=re):ee=re,a<=b&&b<=oe&&ee<=ue&&z>=y):z===re?(b<ee?(re=b,b=ee):re=ee,y<=z&&z<=ue&&re<=oe&&b>=a):!!(Oa(a,y,x,E,b,z)||Oa(a,y,x,E,ee,re)||ze.Rl(a,y,oe,y,b,z,ee,re)||ze.Rl(oe,y,oe,ue,b,z,ee,re)||ze.Rl(oe,ue,a,ue,b,z,ee,re)||ze.Rl(a,ue,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>=ze.Fl(a,y,x,E,b,z)*ze.Fl(a,y,x,E,ee,re)&&0>=ze.Fl(b,z,ee,re,a,y)*ze.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,ue=E;if(E=Math.min(2*ee,Math.abs(b-E)),1e-5>E)return oe=ue+re*Math.min(E,oe),re=a+x*Math.cos(ue),ue=y+x*Math.sin(ue),a+=x*Math.cos(oe),y+=x*Math.sin(oe),x=(re+a)/2,oe=(ue+y)/2,z.push([re,ue,x,oe,x,oe,a,y]),z;for(;1e-5<E;)b=ue+re*Math.min(E,oe),z.push(ze.Vy(x,ue,b,a,y)),E-=Math.abs(b-ue),ue=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,ue=ee*ee+oe*oe,de=ue+ee*ee+oe*re;return ue=4/3*(Math.sqrt(2*ue*de)-de)/(ee*re-oe*ee),re=ee-ue*oe,ee=oe+ue*ee,oe=-ee,ue=z+y,z=Math.cos(ue),ue=Math.sin(ue),[E+a*Math.cos(y),b+a*Math.sin(y),E+re*z-ee*ue,b+re*ue+ee*z,E+re*z-oe*ue,b+re*ue+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,ue=ee===0?x:E;return(ee===0?b:z)&&(ue=-ue),ee=re,x=ee===0?x:E,(ee===0?b:z)&&(x=-x),ze.az(oe,ee===0?a:y,ue,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 ue=0;9999999999>ue&&(y=.5*(re+oe),!(y===re||y===oe));++ue){var de=a/(y+b),pe=ee/(y+z);if(de=de*de+pe*pe-1,0<de)re=y;else if(0>de)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 to,um:new to,Mf:new to,Nf:0,vm:100};ze.za=ze.AA;function dt(a){_a(this),this.l=2,a===void 0&&(a=dt.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===dt.o?this.ee=new Un:(dt.V===null&&(dt.V=new Un().freeze()),this.ee=dt.V),this.aq=this.ee.Ja,this.Ip=new ln().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Fl,this.gg=un,this.Rk=this.Sk=NaN,this.Uf=Hn}dt.prototype.copy=function(){var a=new dt;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===dt.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},dt.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},dt.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==dt.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},dt.prototype.ka=function(){if(Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==dt.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},dt.prototype.Xa=function(a){if(!(a instanceof dt))return!1;if(this.type!==a.type)return this.type===dt.j&&a.type===dt.o?lr(this,a):a.type===dt.j&&this.type===dt.o?lr(a,this):!1;if(this.type===dt.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 ze.B(this.startX,a.startX)&&ze.B(this.startY,a.startY)&&ze.B(this.endX,a.endX)&&ze.B(this.endY,a.endY)};function lr(a,y){return a.type!==dt.j||y.type!==dt.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&ze.B(a.startX,y.startX)&&ze.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===Ai&&ze.B(a.endX,y.endX)&&ze.B(a.endY,y.endY))))}dt.ia=function(a){return a.toString()},dt.prototype.qb=function(a){a.classType===dt&&(this.type=a)},dt.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case dt.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 dt.u:var y=new ln(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 dt.F:if(y=new ln(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 dt.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()}},dt.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},dt.parse=function(a,y){function x(){return De>=yt-1?!0:ue[De+1].match(kt)!==null}function E(){return De++,ue[De]}function b(so){var Wr=parseFloat(E()),Ta=parseFloat(E());qe===qe.toLowerCase()&&(Wr=ft.x+Wr,Ta=ft.y+Ta),so.h(Wr,Ta)}function z(){return b(ft),ft}function ee(){return b(ct),ct}function re(){var so=Ze.toLowerCase();return so!=="c"&&so!=="s"&&so!=="q"&&so!=="t"?ft:new tt(2*ft.x-ct.x,2*ft.y-ct.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 ue=a.split(" ");for(a=0;a<ue.length;a++){var de=ue[a];if(de.match(/(\.[0-9]*)(\.)/gm)!==null){oe=Ar();for(var pe="",Se=!1,Pe=0;Pe<de.length;Pe++){var Le=de[Pe];Le!=="."||Se?Le==="."?(oe.push(pe),pe="."):pe+=Le:(Se=!0,pe+=Le)}for(oe.push(pe),ue.splice(a,1),de=0;de<oe.length;de++)ue.splice(a+de,0,oe[de]);a+=oe.length-1,br(oe)}}var De=-1,qe="",Ze="";oe=new tt(0,0);var ct=new tt(0,0),ft=new tt(0,0),yt=ue.length;a=B1(null),Se=pe=de=!1,Pe=!0,Le=null;for(var kt=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(De>=yt-1);)if(Ze=qe,qe=E(),qe!=="")switch(qe.toUpperCase()){case"X":Pe=!0,pe=de=!1;break;case"M":for(Le=z(),a.mc===null||Pe===!0?(pp(a,Le.x,Le.y,de,!pe,Se),Pe=!1):a.moveTo(Le.x,Le.y),oe.assign(ft);!x();)Le=z(),a.lineTo(Le.x,Le.y);break;case"L":for(;!x();)Le=z(),a.lineTo(Le.x,Le.y);break;case"H":for(;!x();)ft=new tt((qe===qe.toLowerCase()?ft.x:0)+parseFloat(E()),ft.y),a.lineTo(ft.x,ft.y);break;case"V":for(;!x();)ft=new tt(ft.x,(qe===qe.toLowerCase()?ft.y:0)+parseFloat(E())),a.lineTo(ft.x,ft.y);break;case"C":for(;!x();){Le=new tt,b(Le);var Ut=ee(),gi=z();uf(a,Le.x,Le.y,Ut.x,Ut.y,gi.x,gi.y)}break;case"S":for(;!x();)Le=re(),Ut=ee(),gi=z(),uf(a,Le.x,Le.y,Ut.x,Ut.y,gi.x,gi.y);break;case"Q":for(;!x();)Le=ee(),Ut=z(),u0(a,Le.x,Le.y,Ut.x,Ut.y);break;case"T":for(;!x();)ct=Le=re(),Ut=z(),u0(a,Le.x,Le.y,Ut.x,Ut.y);break;case"B":for(;!x();){Le=parseFloat(E()),Ut=parseFloat(E()),gi=parseFloat(E());var Qi=parseFloat(E()),Gi=parseFloat(E()),Qn=Gi,An=!1;x()||(Qn=parseFloat(E()),x()||(An=parseFloat(E())!==0)),qe===qe.toLowerCase()&&(gi+=ft.x,Qi+=ft.y),a.arcTo(Le,Ut,gi,Qi,Gi,Qn,An)}break;case"A":for(;!x();)Le=Math.abs(parseFloat(E())),Ut=Math.abs(parseFloat(E())),gi=parseFloat(E()),Gi=Qi=!1,An=Qn=0,Qn=E(),Qn.length===1?(Qi=!!parseFloat(Qn),Gi=!!parseFloat(E()),Qn=parseFloat(E())):Qn.length===2?(Qi=!!parseFloat(Qn[0]),Gi=!!parseFloat(Qn[1]),Qn=parseFloat(E())):(Qi=!!parseFloat(Qn[0]),Gi=!!parseFloat(Qn[1]),Qn=parseFloat(Qn.slice(2))),An=parseFloat(E()),qe===qe.toLowerCase()&&(Qn=ft.x+Qn,An=ft.y+An),ft.h(Qn,An),Px(a,Le,Ut,gi,Qi,Gi,Qn,An);break;case"Z":wx(a),ft.assign(oe);break;case"F":for(Le="",Ut=1;ue[De+Ut];)if(ue[De+Ut]==="0")Se=!0,Ut++;else if(ue[De+Ut].match(/[Uu]/)!==null)Ut++;else if(ue[De+Ut].match(kt)===null)Ut++;else{Le=ue[De+Ut];break}Le.match(/[Mm]/)?de=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Le="",Ut=1;ue[De+Ut];)if(ue[De+Ut].match(/[Ff]/)!==null)Ut++;else if(ue[De+Ut].match(kt)===null)Ut++;else{Le=ue[De+Ut];break}Le.match(/[Mm]/)?pe=!0:a.mc.isShadowed=!1}if(oe=a.os,c0=a,y)for(y=oe.figures.iterator;y.next();)y.value.isFilled=!0;return oe},dt.Ha=function(a,y){for(var x=a.length,E=tt.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}tt.free(E)},dt.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===dt.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},dt.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===dt.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),rr(this,a,!1),Ws(a,0,0,0,0),a.freeze()},dt.prototype.ix=function(){var a=new ln;return rr(this,a,!0),a};function rr(a,y,x){switch(a.type){case dt.j:case dt.u:case dt.F:x?y.h(a.od,a.pd,0,0):Ws(y,a.od,a.pd,0,0),Ws(y,a.Dc,a.Ec,0,0);break;case dt.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):Ws(y,z.startX,z.startY,0,0);for(var ee=z.segments.s,re=ee.length,oe=z.startX,ue=z.startY,de=0;de<re;de++){var pe=ee[de];switch(pe.type){case Ai:case vi:oe=pe.endX,ue=pe.endY,Ws(y,oe,ue,0,0);break;case Or:ze.Dl(oe,ue,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.5,y),oe=pe.endX,ue=pe.endY;break;case Ur:ze.iv(oe,ue,pe.point1X,pe.point1Y,pe.endX,pe.endY,.5,y),oe=pe.endX,ue=pe.endY;break;case Fr:case ko:var Se=pe.type===Fr?zo(pe,z):Ii(pe,z,oe,ue),Pe=Se.length;if(Pe===0){oe=pe.type===Fr?pe.centerX:pe.endX,ue=pe.type===Fr?pe.centerY:pe.endY,Ws(y,oe,ue,0,0);break}pe=null;for(var Le=0;Le<Pe;Le++)pe=Se[Le],ze.Dl(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.5,y);pe!==null&&(oe=pe[6],ue=pe[7]);break;default:Wt("Unknown Segment type: "+pe.type)}}}break;default:Wt("Unknown Geometry type: "+a.type)}}dt.prototype.normalize=function(){this._isFrozen&&Yi(this);var a=this.ix();return this.offset(-a.x,-a.y),new tt(-a.x,-a.y)},dt.prototype.offset=function(a,y){return this._isFrozen&&Yi(this),this.transform(1,0,0,1,a,y),this},dt.prototype.scale=function(a,y){return this._isFrozen&&Yi(this),this.transform(a,0,0,y,0,0),this},dt.prototype.rotate=function(a,y,x){this._isFrozen&&Yi(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=St.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),St.free(E),this},Ee=dt.prototype,Ee.transform=function(a,y,x,E,b,z){switch(this.type){case dt.j:case dt.u:case dt.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 dt.o:for(var oe=this.figures.s,ue=oe.length,de=0;de<ue;de++){var pe=oe[de];ee=pe.startX,re=pe.startY,pe.startX=ee*a+re*x+b,pe.startY=ee*y+re*E+z,pe=pe.segments.s;for(var Se=pe.length,Pe=0;Pe<Se;Pe++){var Le=pe[Pe];switch(Le.type){case Ai:case vi:ee=Le.endX,re=Le.endY,Le.endX=ee*a+re*x+b,Le.endY=ee*y+re*E+z;break;case Or:ee=Le.point1X,re=Le.point1Y,Le.point1X=ee*a+re*x+b,Le.point1Y=ee*y+re*E+z,ee=Le.point2X,re=Le.point2Y,Le.point2X=ee*a+re*x+b,Le.point2Y=ee*y+re*E+z,ee=Le.endX,re=Le.endY,Le.endX=ee*a+re*x+b,Le.endY=ee*y+re*E+z;break;case Ur:ee=Le.point1X,re=Le.point1Y,Le.point1X=ee*a+re*x+b,Le.point1Y=ee*y+re*E+z,ee=Le.endX,re=Le.endY,Le.endX=ee*a+re*x+b,Le.endY=ee*y+re*E+z;break;case Fr:ee=Le.centerX,re=Le.centerY,Le.centerX=ee*a+re*x+b,Le.centerY=ee*y+re*E+z,y!==0&&(ee=180*Math.atan2(y,a)/Math.PI,0>ee&&(ee+=360),Le.startAngle+=ee),0>a&&(Le.startAngle=180-Le.startAngle,Le.sweepAngle=-Le.sweepAngle),0>E&&(Le.startAngle=-Le.startAngle,Le.sweepAngle=-Le.sweepAngle),Le.radiusX*=Math.sqrt(a*a+x*x),Le.radiusY!==void 0&&(Le.radiusY*=Math.sqrt(y*y+E*E));break;case ko:if(ee=Le.endX,re=Le.endY,Le.endX=ee*a+re*x+b,Le.endY=ee*y+re*E+z,Le.radiusX===0||Le.radiusY===0)break;y!==0&&(ee=180*Math.atan2(y,a)/Math.PI,0>ee&&(ee+=360),Le.xAxisRotation+=ee),0>a&&(Le.xAxisRotation=180-Le.xAxisRotation,Le.isClockwiseArc=!Le.isClockwiseArc),0>E&&(Le.xAxisRotation=-Le.xAxisRotation,Le.isClockwiseArc=!Le.isClockwiseArc),Le.radiusX*=Math.sqrt(a*a+x*x),Le.radiusY*=Math.sqrt(y*y+E*E);break;default:Wt("Unknown Segment type: "+Le.type)}}}}return this._isInvalidBounds=!0,this},Ee.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 dt.j:return ze.Yb(x,E,b,z,y,a.x,a.y);case dt.u:var ee=ln.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),ln.free(ee),a;case dt.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 dt.o:return kr(this,a,y,!0,!1);default:return!1}};function kr(a,y,x,E,b){var z=y.x;y=y.y;for(var ee=a.bounds.x-20,re=0,oe,ue,de,pe,Se=a.figures.s,Pe=Se.length,Le=0;Le<Pe;Le++){var De=Se[Le],qe=!De.isEvenOdd;if(De.isFilled){if(E&&De.ca(z,y,x))return!0;var Ze=De.segments;oe=De.startX,ue=De.startY;for(var ct=oe,ft=ue,yt=Ze.s,kt=0;kt<=Ze.length;kt++){var Ut=void 0;if(kt!==Ze.length){Ut=yt[kt];var gi=Ut.type;a=Ut.endX,pe=Ut.endY}else gi=Ai,a=ct,pe=ft;switch(gi){case vi:if(ct=tr(z,y,ee,y,oe,ue,ct,ft),isNaN(ct))return!0;re+=ct,ct=a,ft=pe;break;case Ai:if(oe=tr(z,y,ee,y,oe,ue,a,pe),isNaN(oe))return!0;re+=oe;break;case Or:de=ze.Fo(oe,ue,Ut.point1X,Ut.point1Y,Ut.point2X,Ut.point2Y,a,pe,ee,y,z,y,.5),re+=de;break;case Ur:de=ze.Fo(oe,ue,(oe+2*Ut.point1X)/3,(ue+2*Ut.point1Y)/3,(2*Ut.point1X+a)/3,(2*Ut.point1Y+pe)/3,a,pe,ee,y,z,y,.5),re+=de;break;case Fr:case ko:gi=Ut.type===Fr?zo(Ut,De):Ii(Ut,De,oe,ue);var Qi=gi.length;if(Qi===0){if(oe=tr(z,y,ee,y,oe,ue,Ut.type===Fr?Ut.centerX:Ut.endX,Ut.type===Fr?Ut.centerY:Ut.endY),isNaN(oe))return!0;re+=oe;break}Ut=null;for(var Gi=0;Gi<Qi;Gi++){if(Ut=gi[Gi],Gi===0){if(de=tr(z,y,ee,y,oe,ue,Ut[0],Ut[1]),isNaN(de))return!0;re+=de}de=ze.Fo(Ut[0],Ut[1],Ut[2],Ut[3],Ut[4],Ut[5],Ut[6],Ut[7],ee,y,z,y,.5),re+=de}Ut!==null&&(a=Ut[6],pe=Ut[7]);break;default:Wt("Unknown Segment type: "+Ut.type)}oe=a,ue=pe}if(qe){if(re!==0)return!0}else if(re%2!==0)return!0;re=0}else if(De.ca(z,y,b?x:x+2))return!0}return!1}function tr(a,y,x,E,b,z,ee,re){if(ze.Yb(b,z,ee,re,.05,a,y))return NaN;var oe=(a-x)*(z-re);if(oe===0)return 0;var ue=((a*E-y*x)*(b-ee)-(a-x)*(b*re-z*ee))/oe;if(y=(a*E-y*x)*(z-re)/oe,ue>=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(ue<b||ue>ee)return 0}else if(ue<ee||ue>b)return 0;return 0<oe?1:-1}function Yn(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}Ee.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new tt),this.type===dt.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],ue=oe.length;for(a=0;a<ue;a++){var de=oe[a];if(ee+de>=z)return E=z-ee,E=de===0?0:E/de,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+=de}}return y},Ee.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===dt.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 ue=re[a];if(z+ue>=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+=ue}}return NaN},Ee.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===dt.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],ue=oe.length;for(a=0;a<ue;a++){var de=oe[a];if(ee+de>=z)return E=z-ee,E=de===0?0:E/de,de=x[re],x=de[2*a],re=de[2*a+1],b=de[2*a+2],a=de[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+=de}}return y},Ee.xx=function(a){if(this.type===dt.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=tt.alloc();return ze.qh(y,x,E,b,z,a,re),a=re.x,z=re.y,tt.free(re),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/ee)}}else if(this.type===dt.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 ue=Math.min(ee,oe,re,b);if(ue===re)return E/z;if(ue===oe)return(y+a)/z;if(ue===b)return(2*y+x-E)/z;if(ue===ee)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=tt.alloc(),b=1/0,re=ee=0,oe=y.length;for(var de=ue=0,pe=0;pe<oe;pe++)for(var Se=y[pe],Pe=x[pe],Le=Se.length,De=0;De<Le;De+=2){var qe=Se[De],Ze=Se[De+1];if(De!==0){ze.qh(ue,de,qe,Ze,a.x,a.y,E);var ct=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);ct<b&&(b=ct,ee=re,ee+=Math.sqrt((E.x-ue)*(E.x-ue)+(E.y-de)*(E.y-de))),re+=Pe[(De-2)/2]}ue=qe,de=Ze}return tt.free(E),a=ee/z,0>a?0:1<a?1:a}return 0};function Tr(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===dt.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===dt.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===dt.F){var z=new Vr;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var ee=new mr(Fr);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=zo(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];ze.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(Lr(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 ue=b.segments.s,de=ue.length,pe=0;pe<de;pe++){var Se=ue[pe];switch(Se.type){case vi:4<=E.length&&(y.push(E),x.push(Lr(E))),E=[],E.push(Se.endX),E.push(Se.endY),ee=Se.endX,z=Se.endY,re=ee,oe=z;break;case Ai:E.push(Se.endX),E.push(Se.endY),ee=Se.endX,z=Se.endY;break;case Or:ze.Qe(ee,z,Se.point1X,Se.point1Y,Se.point2X,Se.point2Y,Se.endX,Se.endY,.5,E),ee=Se.endX,z=Se.endY;break;case Ur:ze.ep(ee,z,Se.point1X,Se.point1Y,Se.endX,Se.endY,.5,E),ee=Se.endX,z=Se.endY;break;case Fr:var Pe=zo(Se,b),Le=Pe.length;if(Le===0){E.push(Se.centerX),E.push(Se.centerY),ee=Se.centerX,z=Se.centerY;break}for(var De=0;De<Le;De++){var qe=Pe[De];ze.Qe(ee,z,qe[2],qe[3],qe[4],qe[5],qe[6],qe[7],.5,E),ee=qe[6],z=qe[7]}break;case ko:if(Pe=Ii(Se,b,ee,z),Le=Pe.length,De=Se.endX,qe=Se.endY,Le===0){E.push(De),E.push(qe),ee=De,z=qe;break}for(De=0;De<Le;De++)qe=Pe[De],ze.Qe(ee,z,qe[2],qe[3],qe[4],qe[5],qe[6],qe[7],.5,E),ee=qe[6],z=qe[7];break;default:Wt("Segment not of valid type: "+Se.type)}Se.isClosed&&(E.push(re),E.push(oe))}4<=E.length&&(y.push(E),x.push(Lr(E)))}}}function Lr(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(Xr(x,E,ee,re))),x=ee,E=re}return y}Ee.add=function(a){return this.ee.add(a),this},Ee.pm=function(a,y,x,E,b,z,ee,re){return this._isFrozen&&Yi(this),this.fg=new fr(a,y,b,z).freeze(),this.gg=new fr(x,E,ee,re).freeze(),this},dn.Object.defineProperties(dt.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 Tr(this),this.tk}},flattenedLengths:{get:function(){return Tr(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===dt.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===dt.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&&Yi(this,a),this.na=a,a===dt.o?this.ee=new Un:(dt.V===null&&(dt.V=new Un().freeze()),this.ee=dt.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&Yi(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&Yi(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&Yi(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&Yi(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&Yi(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&Yi(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&Yi(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&Yi(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),dt.prototype.setSpots=dt.prototype.pm,dt.prototype.add=dt.prototype.add,dt.prototype.getFractionForPoint=dt.prototype.xx,dt.prototype.getPointAndAngleAlongPath=dt.prototype.Qu,dt.prototype.getAngleAlongPath=dt.prototype.wx,dt.prototype.getPointAlongPath=dt.prototype.Pu,dt.prototype.containsPoint=dt.prototype.ca,dt.prototype.transform=dt.prototype.transform,dt.prototype.rotate=dt.prototype.rotate,dt.prototype.scale=dt.prototype.scale,dt.prototype.offset=dt.prototype.offset,dt.prototype.normalize=dt.prototype.normalize,dt.prototype.computeBoundsWithoutOrigin=dt.prototype.ix,dt.prototype.equalsApprox=dt.prototype.Xa,dt.className="Geometry",dt.j=new Qt(dt,"Line",0),dt.u=new Qt(dt,"Rectangle",1),dt.F=new Qt(dt,"Ellipse",2),dt.o=new Qt(dt,"Path",3),dt.V=null,dt.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",dt.className="Geometry",dt.stringify=dt.ia,dt.fillPath=dt.nb,dt.parse=dt.parse,dt.Line=dt.j,dt.Rectangle=dt.u,dt.Ellipse=dt.F,dt.Path=dt.o;function Vr(a,y,x,E,b){_a(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 Un,this.sr=this.pl.Ja,this.fw=null}Vr.prototype.copy=function(){var a=new Vr;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},Ee=Vr.prototype,Ee.Xa=function(a){if(!(a instanceof Vr&&ze.B(this.startX,a.startX)&&ze.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},Ee.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},Ee.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},Ee.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},Ee.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},Ee.add=function(a){return this.pl.add(a),this},Ee.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,ee=b,re=this.segments.s,oe=re.length,ue=0;ue<oe;ue++){var de=re[ue];switch(de.type){case vi:z=de.endX,ee=de.endY,E=de.endX,b=de.endY;break;case Ai:if(ze.Yb(E,b,de.endX,de.endY,x,a,y))return!0;E=de.endX,b=de.endY;break;case Or:if(ze.cs(E,b,de.point1X,de.point1Y,de.point2X,de.point2Y,de.endX,de.endY,.5,a,y,x))return!0;E=de.endX,b=de.endY;break;case Ur:if(ze.jv(E,b,de.point1X,de.point1Y,de.endX,de.endY,.5,a,y,x))return!0;E=de.endX,b=de.endY;break;case Fr:case ko:var pe=de.type===Fr?zo(de,this):Ii(de,this,E,b),Se=pe.length,Pe=de.type===Fr?de.centerX:de.endX,Le=de.type===Fr?de.centerY:de.endY;if(Se===0){if(ze.Yb(E,b,Pe,Le,x,a,y))return!0;E=Pe,b=Le;break}for(Pe=null,Le=0;Le<Se;Le++)if(Pe=pe[Le],Le===0&&ze.Yb(E,b,Pe[0],Pe[1],x,a,y)||ze.cs(Pe[0],Pe[1],Pe[2],Pe[3],Pe[4],Pe[5],Pe[6],Pe[7],.5,a,y,x))return!0;Pe!==null&&(E=Pe[6],b=Pe[7]);break;default:Wt("Unknown Segment type: "+de.type)}if(de.isClosed&&(E!==z||b!==ee)&&ze.Yb(E,b,z,ee,x,a,y))return!0}return!1},dn.Object.defineProperties(Vr.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&&Yi(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&Yi(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&Yi(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&Yi(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&Yi(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&Yi(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Vr.prototype.add=Vr.prototype.add,Vr.prototype.equalsApprox=Vr.prototype.Xa,Vr.className="PathFigure";function mr(a,y,x,E,b,z,ee,re){_a(this),a===void 0&&(a=Ai),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===ko?(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===Fr&&(z=Math.max(z,0)),this.Wh=z,typeof ee=="number"?(a===Fr&&(ee=Math.max(ee,0)),this.Pg=ee):this.Pg=0),this.ae=null}mr.prototype.copy=function(){var a=new mr;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},Ee=mr.prototype,Ee.Xa=function(a){if(!(a instanceof mr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case vi:case Ai:return ze.B(this.endX,a.endX)&&ze.B(this.endY,a.endY);case Or:return ze.B(this.endX,a.endX)&&ze.B(this.endY,a.endY)&&ze.B(this.point1X,a.point1X)&&ze.B(this.point1Y,a.point1Y)&&ze.B(this.point2X,a.point2X)&&ze.B(this.point2Y,a.point2Y);case Ur:return ze.B(this.endX,a.endX)&&ze.B(this.endY,a.endY)&&ze.B(this.point1X,a.point1X)&&ze.B(this.point1Y,a.point1Y);case Fr:return ze.B(this.startAngle,a.startAngle)&&ze.B(this.sweepAngle,a.sweepAngle)&&ze.B(this.centerX,a.centerX)&&ze.B(this.centerY,a.centerY)&&ze.B(this.radiusX,a.radiusX)&&ze.B(this.radiusY,a.radiusY);case ko:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&ze.B(this.xAxisRotation,a.xAxisRotation)&&ze.B(this.endX,a.endX)&&ze.B(this.endY,a.endY)&&ze.B(this.radiusX,a.radiusX)&&ze.B(this.radiusY,a.radiusY);default:return!1}},Ee.qb=function(a){a.classType===mr&&(this.type=a)},Ee.toString=function(a){switch(a===void 0&&(a=-1),this.type){case vi:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Ai:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Or: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 Ur: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 Fr: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 ko: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":"")},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.close=function(){return this.isClosed=!0,this};function zo(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=ze.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var ee=St.alloc();ee.reset(),x<E?ee.scale(1,E/x):ee.scale(x/E,1),dt.Ha(z,ee),St.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 Ii(a,y,x,E){function b(De,qe,Ze,ct){return(De*ct<qe*Ze?-1:1)*Math.acos((De*Ze+qe*ct)/(Math.sqrt(De*De+qe*qe)*Math.sqrt(Ze*Ze+ct*ct)))}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,ue=a.Dc,de=a.Ec,pe=Math.cos(ee),Se=Math.sin(ee),Pe=pe*(x-ue)/2+Se*(E-de)/2;ee=-Se*(x-ue)/2+pe*(E-de)/2;var Le=Pe*Pe/(y*y)+ee*ee/(z*z);return 1<Le&&(y*=Math.sqrt(Le),z*=Math.sqrt(Le)),Le=(re===oe?-1:1)*Math.sqrt((y*y*z*z-y*y*ee*ee-z*z*Pe*Pe)/(y*y*ee*ee+z*z*Pe*Pe)),isNaN(Le)&&(Le=0),re=Le*y*ee/z,Le=Le*-z*Pe/y,isNaN(re)&&(re=0),isNaN(Le)&&(Le=0),x=(x+ue)/2+pe*re-Se*Le,E=(E+de)/2+Se*re+pe*Le,de=b(1,0,(Pe-re)/y,(ee-Le)/z),pe=(Pe-re)/y,ue=(ee-Le)/z,Pe=(-Pe-re)/y,re=(-ee-Le)/z,ee=b(pe,ue,Pe,re),Pe=(pe*Pe+ue*re)/(Math.sqrt(pe*pe+ue*ue)*Math.sqrt(Pe*Pe+re*re)),-1>=Pe?ee=Math.PI:1<=Pe&&(ee=0),!oe&&0<ee&&(ee-=2*Math.PI),oe&&0>ee&&(ee+=2*Math.PI),oe=y>z?1:y/z,Pe=y>z?z/y:1,y=ze.jx(0,0,y>z?y:z,de,de+ee,!0),z=St.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(oe,Pe),dt.Ha(y,z),St.free(z),a.ae=y,a.ae}dn.Object.defineProperties(mr.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&&Yi(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Yi(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&Yi(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Yi(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Yi(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&Yi(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&Yi(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&Yi(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&Yi(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&pr(a,">= zero",mr,"radiusX"),this._isFrozen&&Yi(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&pr(a,">= zero",mr,"radiusY"),this._isFrozen&&Yi(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&Yi(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&&Yi(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&&Yi(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&&Yi(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&&Yi(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),mr.prototype.equalsApprox=mr.prototype.Xa;var vi=new Qt(mr,"Move",0),Ai=new Qt(mr,"Line",1),Or=new Qt(mr,"Bezier",2),Ur=new Qt(mr,"QuadraticBezier",3),Fr=new Qt(mr,"Arc",4),ko=new Qt(mr,"SvgArc",4);mr.className="PathSegment",mr.Move=vi,mr.Line=Ai,mr.Bezier=Or,mr.QuadraticBezier=Ur,mr.Arc=Fr,mr.SvgArc=ko;function yr(){this.H=null,this.xu=new tt(0,0).freeze(),this.mt=new tt(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}yr.prototype.copy=function(){var a=new yr;return this.clone(a)},yr.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},yr.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},yr.prototype.So=function(a,y){var x=this.diagram;return x===null||ic(x,a,y),y},yr.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(ic(x,a,y),y.assign(x.Ps(y))),y},dn.Object.defineProperties(yr.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}}}),yr.prototype.getMultiTouchDocumentPoint=yr.prototype.Bz,yr.prototype.getMultiTouchViewPoint=yr.prototype.So,yr.className="InputEvent";function vo(){this.H=null,this.xa="",this.ar=this.Lr=null}vo.prototype.copy=function(){var a=new vo;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},vo.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},dn.Object.defineProperties(vo.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}}}),vo.className="DiagramEvent";function Xi(){this.Fm=mo,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=Zn(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Zn(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Zn(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Zn(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===Gr?a+"* ":this.change===mo?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===Gr?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=xa(this.object)),this.oldValue!==null&&(a+=" old: "+xa(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+xa(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))},dn.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===Gr&&(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 Gr=new Qt(Xi,"Transaction",-1),mo=new Qt(Xi,"Property",0),aa=new Qt(Xi,"Insert",1),ka=new Qt(Xi,"Remove",2);Xi.className="ChangedEvent",Xi.Transaction=Gr,Xi.Property=mo,Xi.Insert=aa,Xi.Remove=ka;function Fs(){this.o=new Un().freeze(),this.xa="",this.j=!1}Fs.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},Fs.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()},Fs.prototype.canUndo=function(){return this.isComplete},Fs.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()}},Fs.prototype.canRedo=function(){return this.isComplete},Fs.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()}},Fs.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new sr,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===mo&&E.object){var b=y.get(E.object);b||(b=new sr,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()}},dn.Object.defineProperties(Fs.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}}}),Fs.prototype.optimize=Fs.prototype.ak,Fs.prototype.redo=Fs.prototype.redo,Fs.prototype.canRedo=Fs.prototype.canRedo,Fs.prototype.undo=Fs.prototype.undo,Fs.prototype.canUndo=Fs.prototype.canUndo,Fs.prototype.clear=Fs.prototype.clear,Fs.className="Transaction";function Kr(){this.Pt=new zn,this.Jd=!1,this.u=new Un().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new Un().freeze(),this.hl=new Un,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Kr.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},Kr.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},Kr.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},Ee=Kr.prototype,Ee.Xw=function(a){this.Pt.add(a)},Ee.Rx=function(a){this.Pt.remove(a)},Ee.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},Ee.eb=function(a){return a===void 0&&(a=""),Xl(this,!0,a)},Ee.Kf=function(){return Xl(this,!1,"")};function Xl(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Ro("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}Ee.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()}},Kr.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Kr.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){Ro("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Kr.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Kr.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){Ro("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Kr.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Xi;for(E.change=Gr,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Kr.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Fs);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||Ro("Change not within a transaction: "+x.toString()))}},Kr.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},dn.Object.defineProperties(Kr.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}}}),Kr.prototype.handleChanged=Kr.prototype.Tu,Kr.prototype.redo=Kr.prototype.redo,Kr.prototype.undo=Kr.prototype.undo,Kr.prototype.canUndo=Kr.prototype.canUndo,Kr.prototype.discardHistoryAfterIndex=Kr.prototype.lx,Kr.prototype.rollbackTransaction=Kr.prototype.Kf,Kr.prototype.commitTransaction=Kr.prototype.eb,Kr.prototype.startTransaction=Kr.prototype.Ea,Kr.prototype.removeModel=Kr.prototype.Rx,Kr.prototype.addModel=Kr.prototype.Xw,Kr.prototype.clear=Kr.prototype.clear,Kr.className="UndoManager";function Fo(){_a(this),this.H=Ql,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new yr,this.Zr=-1}Fo.prototype.toString=function(){return this.name!==""?this.name+" Tool":Rr(this.constructor)},Fo.prototype.updateAdornments=function(){},Fo.prototype.canStart=function(){return this.isEnabled},Fo.prototype.doStart=function(){},Fo.prototype.doActivate=function(){this.isActive=!0},Fo.prototype.doDeactivate=function(){this.isActive=!1},Fo.prototype.doStop=function(){},Fo.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Fo.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Fo.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Fo.prototype.doMouseMove=function(){},Fo.prototype.doMouseUp=function(){this.stopTool()},Fo.prototype.doMouseWheel=function(){},Fo.prototype.canStartMultiTouch=function(){return!0},Fo.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.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}tt.free(x),tt.free(E)},Fo.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,tt.allocAt(NaN,NaN)),E=y.So(1,tt.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 tt((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}tt.free(x),tt.free(E)},Fo.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Fo.prototype.doKeyUp=function(){},Fo.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Fo.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Fo.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(ms?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||(ms?y.meta:y.control)||y.shift||a.clearSelection()}},Fo.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,Da(a,E,x),E.handled};function Da(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)}}}Fo.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}},Fo.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Fo.prototype.doCurrentObjectChanged=function(){},Fo.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===Rl&&!y.shift||b===Ls&&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===Rl&&y.shift||b===Ls&&!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)}}},Fo.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Fo.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=wr(function(){x.doWaitAfter(E)},a)},Fo.prototype.cancelWaitAfter=function(){this.Zr!==-1&&Kt.clearTimeout(this.Zr),this.Zr=-1},Fo.prototype.doWaitAfter=function(){},Fo.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof Fa);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Fo.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},dn.Object.defineProperties(Fo.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Gt&&(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}}}),Fo.prototype.startTransaction=Fo.prototype.Ea,Fo.className="Tool";function jo(){Fo.call(this),this.name="ToolManager",this.hb=new Un,this.ob=new Un,this.Hb=new Un,this.F=this.V=850,this.o=new Fn(2,2).ja(),this.Ha=5e3,this.ia=Ls,this.u=ad,this.Mp=this.j=null,this.zj=-1}It(jo,Fo),jo.prototype.initializeStandardTools=function(){},jo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof Fa&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},jo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===Cc&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===bc){y.bubbles=!0;return}if(this.gestureBehavior===Cc)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===Ls?this.mouseWheelBehavior=Rl:this.mouseWheelBehavior===Rl&&(this.mouseWheelBehavior=Ls)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},jo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===bc){y.bubbles=!0;return}if(this.gestureBehavior===Cc)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}}yl(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function yl(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}jo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof Fa&&(y===a||y.rg(a))||this.hideToolTip()},jo.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()))},jo.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)},jo.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 Fa)||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()},jo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof Fa){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 Hi&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(Kt.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=wr(function(){b.hideToolTip()},a)}},jo.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}},jo.prototype.hideToolTip=function(){this.zj!==-1&&(Kt.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof Fa?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Hi&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},jo.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()},jo.prototype.doMouseWheel=function(){this.standardMouseWheel()},jo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},jo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},jo.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},jo.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},jo.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)},dn.Object.defineProperties(jo.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 Fa?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}}}),jo.prototype.replaceStandardTool=jo.prototype.gb;var Ls=new Qt(jo,"WheelScroll",0),Rl=new Qt(jo,"WheelZoom",1),Oc=new Qt(jo,"WheelNone",2),ad=new Qt(jo,"GestureZoom",3),Cc=new Qt(jo,"GestureCancel",4),bc=new Qt(jo,"GestureNone",5);jo.className="ToolManager",jo.WheelScroll=Ls,jo.WheelZoom=Rl,jo.WheelNone=Oc,jo.GestureZoom=ad,jo.GestureCancel=Cc,jo.GestureNone=bc;function uo(){Fo.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 tt(NaN,NaN),this.Fr=new tt,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new zn().freeze(),this.ia=new ae,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var gu;It(uo,Fo),uo.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},uo.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},uo.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,(ms?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},uo.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),Ht=null,this.isActive=!0,this.tl.set(a.position),Ye(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&&Ba(a),_h(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Ht=this,ei=this.diagram,this.doSimulatedDragOut()))};function Ye(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Jn?(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 Qo,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}uo.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},uo.prototype.Pd=function(a){return a===void 0?new Zd(il):this.isGridSnapEnabled?new Zd(new tt(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new Zd(a.copy())},uo.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),bt(this),Pd(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<gu.count){for(var y=gu,x=y.length,E=0;E<x;E++){var b=y.M(E);hn(b),$t(b),bt(b),b.diagram.ug()}y.clear()}hn(this),this.tl.h(NaN,NaN),ei!==null&&(ei.currentCursor=""),Ht=ei=null,$t(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),ou(a,!0)},uo.prototype.stopTransaction=function(){var a=this.diagram,y=Fo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function bt(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,ti(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function Bt(){var a=Ht;$t(a),Wn(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}uo.prototype.doCancel=function(){$t(this),Wn(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},uo.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},uo.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Tt(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 sr,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 Jn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,Ye(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,hf(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function $t(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 Jn&&(x.value.point=new tt(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function hn(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 Pn(a,y,x){var E=a.diagram,b=a.startPoint,z=tt.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),tt.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Ba(E),E.hk())}uo.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&oh(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 Jn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),hf(E,-b.x,-b.y)}y.bd()}}function fi(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),Zi(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=ti(a,b,E),!a.isActive&&Ht===null)return;var re=E!==null?E.part:null;if(re===null||x.handlesDragDropForTopLevelParts&&re.isTopLevel&&!(re instanceof po)){var oe=x.mouseDragOver;oe!==null&&(oe(b),ee=!0)}if(!a.isActive&&Ht===null||(a.doDragOver(y,E),!a.isActive&&Ht===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)}uo.prototype.findDragOverObject=function(a){var y=this;return _u(this.diagram,a,null,function(x){return x===null?x=!0:(x=x.part,x=!!(x===null||x instanceof Fa||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},uo.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 ti(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&&Ht===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=nr(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 nr(a){var y=a.panel;return y!==null?y:a instanceof xr&&!(a instanceof po)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function li(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(ue){return E.findValidLinkablePort(ue,x)});a=tt.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(pa,a);oe=y.Bf(oe),oe<z&&(ee=re,z=oe)}}return tt.free(a),ee}function Zi(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=li(a,x.i(0),!1),z!==null&&(ee=z.part));var re=null,oe=null;x.toNode===null&&(re=li(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)):ma(b,ee,z,oe,re):ma(b,null,null,null,null)}}}}uo.prototype.doDragOver=function(){};function Li(a,y){var x=a.diagram;a.dragsLink&&Zi(a,!0),bt(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;gr(a,b,z),z=nr(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Ht!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof xi&&z.linksConnected.each(function(re){re.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Ht!==null){for(a=ln.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof xi&&Ir(x,E,a);ln.free(a)}}}function gr(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof po||(x=a.mouseDrop,x!==null&&x(y))}function Ir(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 Jn},!0,function(b){return b instanceof Jn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}uo.prototype.doDropOnto=function(){},uo.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()?(Tt(this,!1),_h(a,this.copiedParts),Pn(this,this.copiedParts,!1),Pd(a,this.copiedParts)):this.mayMove()?($t(this),Pn(this,this.draggedParts,!0)):this.mayDragOut()?(Tt(this,!1),Pn(this,this.copiedParts,!1)):$t(this),fi(this,a.lastInput.documentPoint))}},uo.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?($t(this),Tt(this,!0),_h(a,this.copiedParts),Pn(this,this.copiedParts,!1),Pd(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,$t(this),this.mayMove()&&(Pn(this,this.draggedParts,!0),fi(this,a.lastInput.documentPoint))),this.Ym=!0,Li(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&co(this),a.Ya(),Pd(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},uo.prototype.simulatedMouseMove=function(a,y,x){if(Ht===null)return!1;var E=Ht.diagram;x instanceof Gt||(x=null);var b=ei;return x!==b&&(b!==null&&b!==E&&(b.ug(),Ht.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),ei=x,x!==null&&x!==E&&(Bt(),b=x.toolManager.findTool("Dragging"),b!==null&&(gu.contains(b)||gu.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)},uo.prototype.simulatedMouseUp=function(a,y,x){if(Ht===null)return!1;var E=ei,b=Ht.diagram;if(x===null)return Ht.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Ht.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;ei=x,E=x.toolManager.findTool("Dragging"),E!==null&&(Bt(),gu.contains(E)||gu.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 tt),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=Ht,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function co(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof xi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}uo.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(ms?!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())},uo.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())},uo.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())},uo.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},uo.prototype.Az=function(){return Ht},uo.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Ht;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},uo.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),pu(a),a.animationManager.Cc(),a=Ht,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},uo.prototype.doSimulatedDragLeave=function(){var a=Ht;a!==null&&a.doSimulatedDragOut(),this.doCancel()},uo.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Ht;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;Wo(this,y.draggedParts.Lf(),!1,a.firstInput),Pn(this,this.copiedParts,!1),fi(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},uo.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Ht;if(y!==null){var x=y.diagram;if(y.Ym=!0,$t(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),Wo(this,y.draggedParts.Lf(),!0,a.lastInput),Pn(this,this.copiedParts,!1);var E=new zn;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),Li(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 Wo(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=ln.alloc();b=E=1/0;for(var ee=-1/0,re=-1/0,oe=y.iterator;oe.next();){var ue=oe.value;if(ue.isVisible()){var de=ue.location;ue=de.x,de=de.y,isNaN(ue)||isNaN(de)||(ue<E&&(E=ue),de<b&&(b=de),ue>ee&&(ee=ue),de>re&&(re=de))}}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,ln.free(z),z=a.Fr,ee=new sr,re=tt.alloc(),oe=y.iterator;oe.next();)ue=oe.value,ue instanceof Jn&&ue.canCopy()&&(de=x.I(ue),de!==null&&(de.points=ue.points,hf(de,z.x-E,z.y-b),de.suspendsRouting=!0,ee.add(de,a.Pd())));for(y=y.iterator;y.next();)ue=y.value,ue.Zc()&&ue.canCopy()&&(oe=x.I(ue),oe!==null&&(ue=ue.location,re.h(z.x-(E-ue.x),z.y-(b-ue.y)),oe.location=re,oe.Va(),ee.add(oe,a.Pd(re))));tt.free(re),a.copiedParts=ee,Ye(a,ee.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,hf(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}uo.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},uo.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new tt},dn.Object.defineProperties(uo.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}}}),uo.prototype.getDraggingSource=uo.prototype.Az;var Ht=null,ei=null;uo.className="DraggingTool",gu=new Un,_i("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),jo.prototype.doCancel=function(){Ht!==null&&Ht.doCancel(),Fo.prototype.doCancel.call(this)};function bi(){Fo.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Jn,y=new bo;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new bo,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new xi,y=new bo,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 xi,y=new bo,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 sr,this.Of=this.gj=this.Pf=null}It(bi,Fo),bi.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},bi.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),ee=Fn.alloc();ee.width=y.naturalBounds.width*z,ee.height=y.naturalBounds.height*z,E.desiredSize=ee,Fn.free(ee),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=pa,z=tt.alloc(),x.location=y.ga(pa,z),tt.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},bi.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=io,y.fromSpot=El,y.toSpot=El),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},bi.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},bi.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof xi){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)}},bi.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof xi))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof xi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},bi.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(pe){return b.findValidLinkablePort(pe,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var ee=z.value,re=ee.part;if(re instanceof xi){var oe=ee.ga(pa,tt.alloc()),ue=x.x-oe.x,de=x.y-oe.y;tt.free(oe),oe=ue*ue+de*de,oe<E&&(ue=this.validPortsCache.I(ee),ue!==null?ue&&(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 xi&&(x.layer===null||x.layer.allowLink))?y:null},bi.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},bi.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},bi.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},bi.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof xi))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof xi))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},bi.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)},bi.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 zn;return E.add(a),Vi(this,x,y,E)};function Vi(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),Vi(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),Vi(a,y.labeledLink,x,E))))}bi.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!==Rh){if(E===Lg){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!ni(this,a,y,x,!0)}if(E===Mg){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!ni(this,a,y,x,!0)}if(E===Cg)return a===y?a=!0:(E=new zn,E.add(y),a=Sr(this,E,a,y,x)),!a;if(E===bg)return!ni(this,a,y,x,!1);if(E===Fg)return a===y?a=!0:(E=new zn,E.add(y),a=xo(this,E,a,y,x)),!a}return!0};function ni(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&&ni(a,ee,x,E,b)))return!0}return!1}function Sr(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&&Sr(a,y,ee,E,b)))return!0}return!1}function xo(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&&xo(a,y,re,E,b))return!0}}return!1}dn.Object.defineProperties(bi.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}}}),bi.className="LinkingBaseTool";function ho(){bi.call(this),this.name="Linking",this.V={},this.F=null,this.K=Yr,this.Xd=null}It(ho,bi),ho.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},ho.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 xi)))return null;var x=this.direction;if(x===Yr||x===$a){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===Yr||x===Go)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ho.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 xi&&(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 xi&&(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)},ho.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()},ho.prototype.doStop=function(){bi.prototype.doStop.call(this),this.startObject=null},ho.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 xi&&(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)}}},ho.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Jn)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)},ho.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ho.prototype.doNoLink=function(){},dn.Object.defineProperties(ho.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 Yr=new Qt(ho,"Either",0),$a=new Qt(ho,"ForwardsOnly",0),Go=new Qt(ho,"BackwardsOnly",0);ho.className="LinkingTool",ho.Either=Yr,ho.ForwardsOnly=$a,ho.BackwardsOnly=Go;function Qo(){bi.call(this),this.name="Relinking";var a=new bo;a.figure="Diamond",a.desiredSize=Ps,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new bo,a.figure="Diamond",a.desiredSize=Ps,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new ln}It(Qo,bi),Qo.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Jn){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)}},Qo.prototype.makeAdornment=function(a,y){var x=new Fa;return x.type=Vn.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},Qo.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},Qo.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 Fa&&x.adornedPart instanceof Jn))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=Bo),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=Bo),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},Qo.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===yp||x===ff)&&(x=pc),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}},Qo.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()},Qo.prototype.doStop=function(){bi.prototype.doStop.call(this),this.handle=null},Qo.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 xi&&(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()}}},Qo.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},Qo.prototype.doNoRelink=function(){};function ma(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)}dn.Object.defineProperties(Qo.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 Fa))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),Qo.className="RelinkingTool",_i("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),_i("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function ui(){Fo.call(this),this.name="LinkReshaping";var a=new bo;a.figure="Rectangle",a.desiredSize=Ds,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new bo,a.figure="Diamond",a.desiredSize=Ps,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new tt,this.Yq=new Un}It(ui,Fo),ui.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:sa},ui.prototype.om=function(a,y){a.reshapingBehavior=y},ui.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Jn){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)}},ui.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new Fa,b.type=Vn.Link,x=y.firstPickIndex;var z=y.lastPickIndex,ee=E?1:0;if(y.resegmentable&&y.computeCurve()!==cd)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 ue=y.i(x+1);ze.B(oe.x,ue.x)&&ze.B(oe.y,ue.y)&&(ue=y.i(x-1)),ze.B(oe.x,ue.x)?(this.om(re,Ie),re.cursor="n-resize"):ze.B(oe.y,ue.y)&&(this.om(re,ke),re.cursor="w-resize")}else ee===z-1&&E?(oe=y.i(z-1),ue=y.i(z),ze.B(oe.x,ue.x)&&ze.B(oe.y,ue.y)&&(oe=y.i(z+1)),ze.B(oe.x,ue.x)?(this.om(re,Ie),re.cursor="n-resize"):ze.B(oe.y,ue.y)&&(this.om(re,ke),re.cursor="w-resize")):ee!==z&&(this.om(re,st),re.cursor="move");b.add(re)}b.adornedObject=a}return b},ui.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},ui.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},ui.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},ui.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 Jn){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}}},ui.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},ui.prototype.stopTransaction=function(){var a=this.diagram,y=Fo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ui.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},ui.prototype.getResegmentingPoint=function(){return this.handle.ga(pa)},ui.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},ui.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&&(wo(this,ee,E,b,z,!0)||wo(this,ee,E,b,z,!1))){var re=y.points.copy();wo(this,ee,E,b,z,!0)?(re.cd(x-2,new tt(ee.x,(z.y+ee.y)/2)),re.cd(x+1,new tt(z.x,(z.y+ee.y)/2))):(re.cd(x-2,new tt((z.x+ee.x)/2,ee.y)),re.cd(x+1,new tt((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&&(wo(this,E,b,z,ee,!0)||wo(this,E,b,z,ee,!1))&&(re=y.points.copy(),wo(this,E,b,z,ee,!0)?(re.cd(x-1,new tt(E.x,(E.y+ee.y)/2)),re.cd(x+2,new tt(ee.x,(E.y+ee.y)/2))):(re.cd(x-1,new tt((E.x+ee.x)/2,E.y)),re.cd(x+2,new tt((E.x+ee.x)/2,ee.y))),re.mb(x+1),re.mb(x),y.points=re,y.Wb())}}else ee=tt.alloc(),ze.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()),tt.free(ee)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function wo(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}ui.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===Ie?(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===Ie?(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);ze.B(z.x,b.x)&&ze.B(b.y,ee.y)?(ze.B(z.x,y.i(E-2).x)&&!ze.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),ze.B(ee.y,y.i(E+2).y)&&!ze.B(ee.x,y.i(E+2).x)?y.m(E+1,ee.x,a.y):y.L(E+1,ee.x,a.y)):ze.B(z.y,b.y)&&ze.B(b.x,ee.x)?(ze.B(z.y,y.i(E-2).y)&&!ze.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),ze.B(ee.x,y.i(E+2).x)&&!ze.B(ee.y,y.i(E+2).y)?y.m(E+1,a.x,ee.y):y.L(E+1,a.x,ee.y)):ze.B(z.x,b.x)&&ze.B(b.x,ee.x)?(ze.B(z.x,y.i(E-2).x)&&!ze.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),ze.B(ee.x,y.i(E+2).x)&&!ze.B(ee.y,y.i(E+2).y)?y.m(E+1,a.x,ee.y):y.L(E+1,a.x,ee.y)):ze.B(z.y,b.y)&&ze.B(b.y,ee.y)&&(ze.B(z.y,y.i(E-2).y)&&!ze.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),ze.B(ee.y,y.i(E+2).y)&&!ze.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(pa,tt.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,tt.alloc()),y.L(0,E.x,E.y),tt.free(z),tt.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(pa,tt.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,tt.alloc()),y.L(y.pointsCount-1,a.x,a.y),tt.free(x),tt.free(a));y.zf()},ui.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case st:return a;case Ie:return new tt(y.i(x).x,a.y);case ke:return new tt(a.x,y.i(x).y);default:case sa:return y.i(x)}},dn.Object.defineProperties(ui.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 Fa))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}}}),ui.prototype.setReshapingBehavior=ui.prototype.om,ui.prototype.getReshapingBehavior=ui.prototype.Ru;var sa=new Qt(ui,"None",0),ke=new Qt(ui,"Horizontal",1),Ie=new Qt(ui,"Vertical",2),st=new Qt(ui,"All",3);ui.className="LinkReshapingTool",ui.None=sa,ui.Horizontal=ke,ui.Vertical=Ie,ui.All=st,_i("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function gt(){Fo.call(this),this.name="Resizing",this.o=new Fn(1,1).freeze(),this.j=new Fn(9999,9999).freeze(),this.yg=new Fn(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new bo;a.alignmentFocus=pa,a.figure="Rectangle",a.desiredSize=Ds,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new tt,this.Dw=new Fn,this.Tn=new tt,this.rt=new Fn(0,0),this.qt=new Fn(1/0,1/0),this.pt=new Fn(1,1)}It(gt,Fo),gt.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Jn)){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(),_f(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},gt.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new Fa,y.type=Vn.Spot,y.locationSpot=pa;var x=new gc;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Fl)),y.add(this.makeHandle(a,Ec)),y.add(this.makeHandle(a,un)),y.add(this.makeHandle(a,Ju)),y.add(this.makeHandle(a,ha)),y.add(this.makeHandle(a,Ho)),y.add(this.makeHandle(a,zr)),y.add(this.makeHandle(a,za))}else if(Fd(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},gt.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},gt.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=pa),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 Vn)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},gt.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},gt.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))},gt.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},gt.prototype.stopTransaction=function(){var a=this.diagram,y=Fo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},gt.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},gt.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,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),tt.free(b)}},gt.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,tt.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),tt.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},gt.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 po){var E=new Un;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()}},gt.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=pa);var ee=this.adornedObject.naturalBounds,re=ee.x,oe=ee.y,ue=ee.x+ee.width,de=ee.y+ee.height,pe=1;if(!z){pe=ee.width;var Se=ee.height;0>=pe&&(pe=1),0>=Se&&(Se=1),pe=Se/pe}return Se=tt.alloc(),ze.No(a.x,a.y,re,oe,b.width,b.height,Se),a=ee.copy(),0>=y.x?0>=y.y?(a.x=Math.max(Se.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.y=Math.max(Se.y,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=Math.max(de-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=ue-a.width,a.y=de-a.height)):1<=y.y?(a.x=Math.max(Se.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=Math.max(ue-a.x,x.width),a.height=Math.max(Math.min(Se.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.x=ue-a.width)):(a.x=Math.max(Se.x,ue-E.width),a.x=Math.min(a.x,ue-x.width),a.width=ue-a.x,z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(de-oe-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),a.y=Math.max(Se.y,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=Math.max(de-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width),a.y=de-a.height)):1<=y.y?(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),a.height=Math.max(Math.min(Se.y-oe,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe):(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width))):(a.width=Math.max(Math.min(Se.x-re,E.width),x.width),z||(a.height=Math.max(Math.min(pe*a.width,E.height),x.height),a.width=a.height/pe,a.y=oe+.5*(de-oe-a.height))):0>=y.y?(a.y=Math.max(Se.y,de-E.height),a.y=Math.min(a.y,de-x.height),a.height=de-a.y,z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(ue-re-a.width))):1<=y.y&&(a.height=Math.max(Math.min(Se.y-oe,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/pe,E.width),x.width),a.height=pe*a.width,a.x=re+.5*(ue-re-a.width))),tt.free(Se),a},gt.prototype.computeReshape=function(){var a=Tn;return this.adornedObject instanceof bo&&(a=Tv(this.adornedObject)),!(a===ir||this.diagram.lastInput.shift)},gt.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},gt.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},gt.prototype.computeCellSize=function(){var a=new Fn(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},dn.Object.defineProperties(gt.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 Fa))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 Fa)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}}}),gt.className="ResizingTool",_i("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function Xt(){Fo.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new tt,this.ue=null;var a=new bo;a.figure="Ellipse",a.desiredSize=Ps,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new tt(NaN,NaN),this.u=0,this.F=50}It(Xt,Fo),Xt.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)}},Xt.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new Fa,y.type=Vn.Position,y.locationSpot=pa;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(Fd(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},Xt.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},Xt.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)},Xt.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(pa)},Xt.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)},Xt.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new tt(NaN,NaN),this.isActive=a.isMouseCaptured=!1},Xt.prototype.stopTransaction=function(){var a=this.diagram,y=Fo.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},Xt.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},Xt.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},Xt.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()},Xt.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()}},Xt.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},dn.Object.defineProperties(Xt.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 Fa))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 Fa)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}}}),Xt.className="RotatingTool",_i("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function vn(){Fo.call(this),this.name="ClickSelecting"}It(vn,Fo),vn.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},vn.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},vn.className="ClickSelectingTool";function Dn(){Fo.call(this),this.name="Action",this.pk=null}It(Dn,Fo),Dn.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},Dn.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()},Dn.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))}},Dn.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()},Dn.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())},Dn.prototype.doStop=function(){this.pk=null},Dn.className="ActionTool";function di(){Fo.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new tt(0,0)}It(di,Fo),di.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)},di.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},di.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 xr)x.Zc()&&(Fd(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Zn(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=tt.allocAt(a.x,a.y);this.isGridSnapEnabled&&nf(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),tt.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},dn.Object.defineProperties(di.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}}}),di.className="ClickCreatingTool";function yi(){Fo.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new xr;a.layerName="Tool",a.selectable=!1;var y=new bo;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}It(yi,Fo),yi.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))},yi.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},yi.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},yi.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=Fn.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),Fn.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},yi.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()},yi.prototype.computeBoxBounds=function(){var a=this.diagram;return new ln(a.firstInput.documentPoint,a.lastInput.documentPoint)},yi.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),ms?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 Un,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)}},dn.Object.defineProperties(yi.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}}}),yi.className="DragSelectingTool";function ai(){Fo.call(this),this.name="Panning",this.Xt=new tt,this.xy=new tt,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(Kt.document,"scroll",a.Kw,!1),a.stopTool()}}It(ai,Fo),ai.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())},ai.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(Kt.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},ai.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},ai.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},ai.prototype.doMouseMove=function(){this.move()},ai.prototype.doMouseUp=function(){this.move(),this.stopTool()},ai.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)}},dn.Object.defineProperties(ai.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),ai.className="PanningTool",_i("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),_i("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),_i("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),_i("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),_i("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Hi(){this.F=this.u=this.j=this.o=null}dn.Object.defineProperties(Hi.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}}}),Hi.className="HTMLInfo";function $i(a,y,x){this.text=a,this.hx=y,this.visible=x}$i.className="ContextMenuButtonInfo";function Pr(){Fo.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new tt,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}It(Pr,Fo);function Ui(a){var y=new Hi;y.show=function(b,z,ee){ee.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},ea=y,a.tu=function(){a.stopTool()},y=Kn("div");var x=Kn("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=Kn("style");Kt.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",zi,!1),E.addEventListener(y,"selectstart",zi,!1),E.addEventListener(x,"contextmenu",zi,!1)),y.className="goCXforeground",x.className="goCXbackground",Kt.document.body&&(Kt.document.body.appendChild(y),Kt.document.body.appendChild(x)),Ma=y,Po=x,Eo=!0}function zi(a){return a.preventDefault(),!1}Pr.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)},Pr.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Pr.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Pr.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Gt||(a instanceof Dt?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},Pr.prototype.doActivate=function(){},Pr.prototype.doMouseDown=function(){if(Fo.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof Fa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&cr(this)},Pr.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof Fa){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}cr(this)};function cr(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Hi||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(Er(a,!0),a.isActive||a.stopTool())}Pr.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function Er(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=ea,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Dt?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof Fa&&!a.currentContextMenu.visible&&a.stopTool()}}Pr.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Pr.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof Fa){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 Hi&&a.show(y,x,this);this.currentContextMenu=a},Pr.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}},Pr.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof Fa?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Hi&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function To(a){var y=new Un;return y.add(new $i("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new $i("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new $i("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new $i("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new $i("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new $i("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new $i("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new $i("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new $i("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new $i("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new $i("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new $i("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new $i("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Pr.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=To(this)),Ma.innerHTML="",Po.addEventListener("pointerdown",this.tu,!1);var y=this,x=Kn("ul");x.className="goCXul",Ma.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=Kn("li"),z.className="goCXli";var ee=Kn("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)}}Ma.style.display="block",Po.style.display="block"},Pr.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===ea){Ma.style.display="none",Po.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Po,"pointerdown",this.tu,!1),this.currentContextMenu=null}},dn.Object.defineProperties(Pr.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof Fa?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Eo===!1&&ea===null&&ul&&Ui(this),ea},set:function(a){a===null&&(Eo=!0),ea=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var ea=null,Eo=!1,Po=null,Ma=null;Pr.className="ContextMenuTool",_i("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function or(){Fo.call(this),this.name="TextEditing",this.Zh=new Bs,this.ia=null,this.V=ns,this.vj=null,this.qa=Wa,this.u=1,this.F=!0,this.o=null,this.j=new Hi,this.kt=null,_o(this,this.j)}It(or,Fo);function _o(a,y){if(ul){var x=Kn("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(Na)):b==="Tab"?(a.acceptText(Qr),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Wa){var E=a.kt;a.qa===ds&&(a.qa=ys),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Wa){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 Bs&&z instanceof or)if(z.state===Lo)x.style.border="3px solid red",x.focus();else{var ee=E.ga(pa),re=b.position,oe=b.scale,ue=E.Df()*oe;ue<z.minimumEditorScale&&(ue=z.minimumEditorScale);var de=E.naturalBounds.width*ue+6,pe=E.naturalBounds.height*ue+2,Se=(ee.x-re.x)*oe;ee=(ee.y-re.y)*oe,re=E.verticalAlignment,oe=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*ue,pe=re.y*pe-re.y*oe+re.offsetY-(.5*pe-.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*ue+"%",x.style.lineHeight="normal",x.style.width=de+"px",x.style.left=(Se-de/2|0)-1+"px",x.style.top=(ee+pe|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=ue,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)}}}or.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||Cs&&Cs!==this&&(Cs.acceptText(fa),Cs&&Cs!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Bs&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===ns&&!y.isSelected||this.starting===Jo&&2>a.lastInput.clickCount)):!1},or.prototype.doStart=function(){Cs=this,this.textBlock!==null&&this.doActivate()},or.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 Bs&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=ds;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new ln(this.textBlock.ga(Fl),this.textBlock.ga(un));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},or.prototype.doCancel=function(){this.stopTool()},or.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},or.prototype.doMouseDown=function(){this.isActive&&this.acceptText(fa)},or.prototype.acceptText=function(a){switch(a){case fa:this.qa===Ea?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===ds||this.qa===Lo||this.qa===ys)&&(this.qa=ls,$r(this));break;case Oo:case Na:case Qr:(Na!==a||this.textBlock.isMultiline!==!0)&&(this.qa===ds||this.qa===Lo||this.qa===ys)&&(this.qa=ls,$r(this))}};function $r(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=Ea,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=Lo,a.doError(b,z))}}or.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)},or.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},or.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Wa,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},or.prototype.doStop=function(){Cs=null},or.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)))},or.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},dn.Object.defineProperties(or.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)}}}),or.prototype.measureTemporaryTextBlock=or.prototype.Lx;var Oo=new Qt(or,"LostFocus",0),fa=new Qt(or,"MouseDown",1),Qr=new Qt(or,"Tab",2),Na=new Qt(or,"Enter",3),ra=new Qt(or,"SingleClick",0),ns=new Qt(or,"SingleClickSelected",1),Jo=new Qt(or,"DoubleClick",2),Wa=new Qt(or,"StateNone",0),ds=new Qt(or,"StateActive",1),ys=new Qt(or,"StateEditing",2),ls=new Qt(or,"StateValidating",3),Lo=new Qt(or,"StateInvalid",4),Ea=new Qt(or,"StateValidated",5),Cs=null;or.className="TextEditingTool",or.LostFocus=Oo,or.MouseDown=fa,or.Tab=Qr,or.Enter=Na,or.SingleClick=ra,or.SingleClickSelected=ns,or.DoubleClick=Jo,or.StateNone=Wa,or.StateActive=ds,or.StateEditing=ys,or.StateValidating=ls,or.StateInvalid=Lo,or.StateValidated=Ea,_i("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function hs(a){ss||(Vo(),ss=!0),this.H=Ql,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=va,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new zn,this.ce=new Us,this.ce.Yd=this,this.Ei=new zn,this.pu=new zn,this.Sr=new zn,this.pr=new zn,a&&Object.assign(this,a)}hs.prototype.Xe=function(a){this.H=a},hs.prototype.canStart=function(){return!0};function zs(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),Dl(a.H),a.zb=!0)}function Os(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===va?(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===Nl&&y.vc.clear(),a.Qw=!!(a.Pk===ll&&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(),Zl(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==Yu&&E!==null&&(delete E.start.scale,delete E.end.scale),Kt.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Ba(x),Nu(x),a.zb=!1,y.start(),y.bc&&(el(a),x.Ya(),ru(y,0),pu(x,!0),$o(a),x.R("AnimationStarting",a)))}))}}function Vs(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function Gs(a,y,x,E){a.isTicking||Vs(a)||y instanceof Jn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}Ee=hs.prototype,Ee.fv=function(a){return this.ce.fv(a)},Ee.Xu=function(a){return this.ce.Xu(a)};function nl(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 Dt&&oe.diagram!==null||oe instanceof Gt){re=!0;break e}}re=!1}re?xl(ee,!1):ee.Xk=!0}}b.pu.clear(),b.bc!==!1&&(el(b),pu(b.H),$o(b)),Kt.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),Kt.requestAnimationFrame(function(){x()}))}function Wl(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function el(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 $o(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}Ee.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(),Zl(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),Zl(y,this.H)},Ee.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))},Ee.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),qr(this,a))},Ee.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),$s(this.ce,y,"position",y.position,y.position),qr(this,a))};function oa(a,y,x){!a.zb||y.D(x)||Vs(a)||(a.H.pi||(y=x.copy()),$s(a.ce,a.H,"position",y,x))}function la(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function qr(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function fo(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],ue=y[1],de=y[2];return y=y[3],re===0||re===100?(z=oe,ee=ue):(de===0||de===100)&&(oe=z,ue=ee),180<Math.abs(oe-z)&&(oe>z?z+=360:oe+=360),z=b(x,z,oe-z,E)%360,ee=b(x,ee,ue-ee,E),re=b(x,re,de-re,E),x=b(x,a,y-a,E),"hsla("+z+", "+ee+"%, "+re+"%, "+x+")"}function Vo(){function a(x,E,b,z,ee,re){x.position=new tt(z(ee,E.x,b.x-E.x,re),z(ee,E.y,b.y-E.y,re))}var y=new sr;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 tt(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 tt(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 tt(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,ue=b.actualBounds;b=ue.x+ue.width/2-oe.width/2,oe=ue.y+ue.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 tt(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 ln(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=fo(E,b,ee,re,z)}),y.add("stroke",function(x,E,b,z,ee,re){x.stroke=fo(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=fo(E,b,ee,re,z)}),y.add("areaBackground",function(x,E,b,z,ee,re){x.areaBackground=fo(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)}),Xa=y}dn.Object.defineProperties(hs.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&&pr(a,">= 1",hs,"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}}}),hs.prototype.stopAnimation=hs.prototype.Cc;var Xa=null,ss=!1,va=new Qt(hs,"Default",1),ll=new Qt(hs,"AnimateLocations",2),Nl=new Qt(hs,"None",3);hs.className="AnimationManager",hs.defineAnimationEffect=function(a,y){ss||(Vo(),ss=!0),Xa.add(a,y)},hs.Default=va,hs.AnimateLocations=ll,hs.None=Nl;function Us(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=Ll,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=il,this.vc=new sr,this.Tt=new sr,this.yl=new zn,this.Ut=new zn,this.dw=xh,a&&Object.assign(this,a)}Us.prototype.suspend=function(){this.Xk=!0},Us.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,xl(this,!0),el(this.Yd),pu(this.H),$o(this.Yd),this.H.redraw()};function Zl(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}Ee=Us.prototype,Ee.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 Gt?a=x:x instanceof Dt&&(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===va&&this===y.defaultAnimation&&(this.Lp=wl,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=Mf),el(y),this.yl.each(function(E){E.data=null,a.add(E)}),$o(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,nl(y,this),this)},Ee.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},Ee.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Gt?this.H=a:a instanceof Dt&&a.diagram!==null&&(this.H=a.diagram)),a instanceof xr){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return $s(this,a,y,x,E,b),this};function $s(a,y,x,E,b,z){var ee=a.vc;if(y instanceof Gt&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(ud(E),rg(),E=[Vc.j,Vc.u,Vc.o,Vc.F],ud(b),rg(),b=[Vc.j,Vc.u,Vc.o,Vc.F]),ee.contains(y)){var re=ee.I(y),oe=re.start,ue=re.end;oe[x]===void 0&&(oe[x]=pl(E)),ue[x]=pl(b)}else oe={},ue={},oe[x]=pl(E),ue[x]=pl(b),re=oe.position,y instanceof Dt&&re instanceof tt&&!re.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&re.assign(ue.position),re=new Ks(oe,ue,z),ee.add(y,re);ee=oe[x],ee instanceof tt&&!ee.w()&&ee.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof xr?re.Ku.location=pl(y.location):z&&(re.Ku[x]=pl(E))}function pl(a){return a instanceof tt||a instanceof Fn?a.copy():a}Ee.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},Ee.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function xl(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),el(x),ru(a,b),pu(a.H,!0),$o(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 ru(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Dt&&z.diagram===null)){var ee=E.value,re=b?ee.end:ee.start;ee=b?ee.start:ee.end;var oe=Xa,ue;for(ue in ee)ue==="position"&&(ee["position:placeholder"]||ee["position:nodeCollapse"])||oe.get(ue)===null||oe.get(ue)(z,re[ue],ee[ue],a.Lp,y,x,a)}}}Ee.stop=function(){return this.bc?(this.Ml(!0),this):this},Ee.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,el(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=Xa;E.next();){var ee=E.key,re=E.value,oe=b?re.end:re.start,ue=b?re.start:re.end,de=re.Ku,pe;for(pe in ue)if(z.get(pe)!==null){var Se=pe;!re.Hu||Se!=="position:nodeCollapse"&&Se!=="position:placeholder"||(Se="position"),z.get(Se)(ee,oe[pe],de[pe]!==void 0?de[pe]:re.Hu?oe[pe]:ue[pe],this.Lp,this.Gd,this.Gd,this)}re.Hu&&de.location!==void 0&&ee instanceof xr&&(ee.location=de.location),re.nv&&ee instanceof xr&&ee.Zb(!1)}if(y.As.clear(),ou(y,!1),y.Ya(),y.N(),pu(y,!0),x.defaultAnimation===this){for(pe=x.pr.iterator;pe.next();)b=pe.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}pu(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),$o(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),Zl(this,null),x.Ml(this),y.$b())}},Ee.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof po&&(E=y.placeholder),E!==null?(x=E.ga(Fl),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new tt(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof po)for(a=a.memberParts;a.next();)E=a.value,E instanceof xi&&this.Cj(E,y)},Ee.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof po&&(x=y.placeholder),x!==null){var E=x.ga(Fl);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 po)for(a=a.memberParts;a.next();)E=a.value,E instanceof xi&&this.Aj(E,y)}},Ee.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},dn.Object.defineProperties(Us.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&pr(a,">= 1",Us,"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:Wt("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}}}),Us.prototype.getTemporaryState=Us.prototype.Ez,Us.prototype.stop=Us.prototype.stop,Us.prototype.add=Us.prototype.add,Us.prototype.addTemporaryPart=Us.prototype.Iy;function Ll(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function wl(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}Us.className="Animation",Us.EaseLinear=function(a,y,x,E){return x*a/E+y},Us.EaseInOutQuad=Ll,Us.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},Us.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},Us.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},Us.EaseOutExpo=wl;function Ks(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}Ks.className="AnimationState";function Pl(a,y,x){this.xd=null,this.rf=a,this.so=x||Cu,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=ta))}Pl.prototype.copy=function(){var a=new Pl(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 xu(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))}dn.Object.defineProperties(Pl.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 Cu=new Qt(Pl,"Default",1),ta=new Qt(Pl,"Immediate",2),Io=new Qt(Pl,"Bundled",3);Pl.className="AnimationTrigger",Pl.Default=Cu,Pl.Immediate=ta,Pl.Bundled=Io;function Ko(a){_a(this),this.H=null,this.Pa=new Un,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)}Ee=Ko.prototype,Ee.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,ju(x)}a.clear(),this.Zq.length=0},Ee.Xe=function(a){this.H=a},Ee.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 po?b++:oe instanceof xi?E++:oe instanceof Jn?z++:oe instanceof Fa?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&&No(E)&&(re+=" #"+No(E)),x instanceof xi?re+=" "+xa(E):x instanceof Jn&&(re+=" "+xa(x.fromNode)+" "+xa(x.toNode));return y+" "+this.Pa.count+": "+re},Ee.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=tt.alloc(),z=this.Pa.s,ee=z.length;ee--;){var re=z[ee];if((E!==!0||_f(re)!==!1)&&re.isVisible()&&(b.assign(a),ws(b,re.oe),re=re.ic(b,y,x),re!==null&&(y!==null&&(re=y(re)),re!==null&&(x===null||x(re)))))return tt.free(b),re}return tt.free(b),null},Ee.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Un||E instanceof zn||(E=new zn),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=tt.alloc(),ee=this.Pa.s,re=ee.length;re--;){var oe=ee[re];if((b!==!0||_f(oe)!==!1)&&oe.isVisible()){z.assign(a),ws(z,oe.oe);var ue=oe;oe.ji(z,y,x,E)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||E.add(ue))}}return tt.free(z),E},Ee.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 Un||b instanceof zn||(b=new zn),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||_f(oe)!==!1)&&oe.isVisible()){var ue=oe;oe.Cf(a,y,x,E,b)&&(y!==null&&(ue=y(ue)),ue===null||x!==null&&!x(ue)||b.add(ue))}}return b},Ee.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 ue=re[oe];if((ee!==!0||_f(ue)!==!1)&&z(ue)&&ue.isVisible()){var de=ue;ue.Cf(a,y,x,E,b)&&(y!==null&&(de=y(de)),de===null||x!==null&&!x(de)||b.add(de))}}return b},Ee.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 Un||b instanceof zn)&&(z=b),b=!0),z instanceof Un||z instanceof zn||(z=new zn),this.Uh===!1)return z;var ee=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(ee=!0);for(var re=tt.alloc(),oe=tt.alloc(),ue=this.Pa.s,de=ue.length;de--;){var pe=ue[de];if((ee!==!0||_f(pe)!==!1)&&pe.isVisible()){re.assign(a),ws(re,pe.oe),oe.h(a.x+y,a.y),ws(oe,pe.oe);var Se=pe;pe.og(re,oe,x,E,b,z)&&(x!==null&&(Se=x(Se)),Se===null||E!==null&&!E(Se)||z.add(Se))}}return tt.free(re),tt.free(oe),z},Ee.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=Ar();for(var b=Ar(),z=0;z<E;z++){var ee=x[z];if(ee.vw=z,ee instanceof Jn){if(ee.fd===!1)continue}else if(ee instanceof Fa&&ee.adornedPart!==null)continue;var re=ee.actualBounds;ee.isVisible()&&Dc(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],Vv(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++)Vv(b[y]);br(a),br(b)}}};function gs(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}Ee.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=gs(this,a);var z=this.Zq;z.length=0;for(var ee=y.scale,re=ln.alloc(),oe=0;oe<E;oe++)this.Oj(a,x[oe],y,z,ee,re,!0);if(ln.free(re),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function Ml(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=gs(a,y),re=a.Zq;re.length=0;for(var oe=x.scale,ue=ln.alloc(),de=0;de<z;de++){var pe=b[de];E.contains(pe)&&a.Oj(y,pe,x,re,oe,ue,!1)}ln.free(ue),y.globalAlpha=ee}}}Ee.Oj=function(a,y,x,E,b,z,ee){if(ee&&!_f(y))a.Hs(y);else{if(E!==null&&y instanceof Jn&&(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 Ja?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&&(cl(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(cl(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),cl(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))}},Ee.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(mo,a,this,y,x,E,b)},Ee.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&ju(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)),Vl(this,a,y),a},Ee.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,ju(y),a};function Vl(a,y,x){if(y=wu(a,y,x),x instanceof po&&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&&Vl(a,-1,y)}x.svg!==null&&x.svg.remove()}function wu(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}dn.Object.defineProperties(Ko.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===""&&Wt("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&Wt("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)&&pr(a,"0 <= value <= 1",Ko,"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))}}}),Ko.prototype.findObjectsNear=Ko.prototype.og,Ko.prototype.findObjectsIn=Ko.prototype.Cf,Ko.prototype.findObjectsAt=Ko.prototype.ji,Ko.prototype.findObjectAt=Ko.prototype.ic,Ko.className="Layer";function Gt(a,y){if(ip||(Iu(),ip=!0),_a(this),Ql=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,ul){var x=this,E=function(){x.removeEventListener(Kt.document,"DOMContentLoaded",E,!1),x.setRTL()};Kt.document.body!==null?this.setRTL():x.addEventListener(Kt.document,"DOMContentLoaded",E,!1)}this.ol=null,ig.add("Model",rs);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===mo&&ee.updateDataBindings(z.object,z.propertyName)}finally{ee.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,$u(this),this.model=xy(),this.Wg=!0,Ua(this),this.layout=new qs,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 rp,a!==void 0&&(typeof a=="string"||Kt.Element&&a instanceof Element?Ra(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var Uu,Ql;function $u(a){a.Yd=new hs,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new Un,a.pj=new sr,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new tt(NaN,NaN).freeze(),a.du=new tt(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new tt(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new St,a.zu=new tt(NaN,NaN).freeze(),a.ut=new ln(NaN,NaN,NaN,NaN).freeze(),a.rj=new oo(0,0,0,0).freeze(),a.sj=xh,a.nu=!1,a.Zt=null,a.fu=null,a.yh=Yu,a.zk=qi,a.Fg=Yu,a.pq=qi,a.yt=Fl,a.Bt=Fl,a.Fc=!0,a.pn=!1,a.De=new zn,a.Eh=new sr,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new oo(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new yr,a.bq.diagram=a,a.Qg=new yr,a.Qg.diagram=a,a.cj=new yr,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,Hp(a),a.ai=new zn,a.Ht=!0,a.uu=ah,a.pw=!1,a.wu=Rh,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 sr,a.Xn=new Un,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 oo(5).freeze(),a.Hw=new zn().freeze(),a.Nt=999999999,a.nw=new zn().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 zn,a.ow=new zn,a.Xh=null,a.aw=new Fn(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new tt,bounds:new ln,Py:new Fn,bA:new Fn,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new ln(NaN,NaN,NaN,NaN).freeze(),a.wo=new Fn(NaN,NaN).freeze(),a.Sp=new ln(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new sr;var y=new xi,x=new Bs;x.bind(new Tl("text","",xa)),y.add(x),a.ny=y,a.Lg.add("",y),y=new xi,x=new Bs,x.stroke="brown",x.bind(new Tl("text","",xa)),y.add(x),a.Lg.add("Comment",y),y=new xi,y.selectable=!1,y.avoidable=!1,x=new bo,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new Fn(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new sr,y=new po,y.selectionObjectName="GROUPPANEL",y.type=Vn.Vertical,x=new Bs,x.font="bold 12pt sans-serif",x.bind(new Tl("text","",xa)),y.add(x),x=new Vn(Vn.Auto),x.name="GROUPPANEL";var E=new bo;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new gc,E.padding=new oo(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new sr,y=new Jn,x=new bo,x.isPanelMain=!0,y.add(x),x=new bo,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Jn,x=new bo,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new Fa,y.type=Vn.Auto,x=new bo,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new gc,x.margin=new oo(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new Fa,y.type=Vn.Link,x=new bo,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 rs,a.toolManager=new jo,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=tu(),a.eq=null,a.fq=nu,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 tt,a.zy=500,a.wp=new tt,a.wq=!1}Gt.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),rf=null,Sh="",Ic(this,!1),this.Xn.clear(),fp(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Ic(a,y){a.animationManager.Cc(!0),a.Hw=new zn().freeze(),a.nw=new zn().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(),fp(),a.Og.clear(),as=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function tu(){return null}Gt.prototype.reset=function(){this.clear(),this.vb=!0,$u(this),hc(this),this.Wg=!0,Ua(this),this.layout=new qs,this.Wg=!1,this.model=xy(),this.model.undoManager=new Kr,this.vb=this.rn=!1,this.N()},Gt.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=Kt.document.body);var y=Kn("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},Gt.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=Kt.document.body);var y=0;if(ul){var x=np;y=Uu,x===null&&(x=np=Kn("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=Uu=Kn("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||ms||(y=11)}this.Db=y,this.Gw=!0},Gt.prototype.qb=function(a){a.classType===Gt&&(this.autoScale=a)},Gt.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 Ra(a,y){if(ul){if(y!=null||Wt("Diagram setup requires an argument DIV."),a.Ka!==null&&Wt("Diagram has already completed setup."),typeof y=="string"?a.Ka=Kt.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:Wt("No DIV or DIV id supplied: "+y),a.Ka===null&&Wt("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&Wt("Invalid div id; div already has a Diagram associated with it."),!a.ol&&Kt.ResizeObserver){var x=Ki(function(){a.$b()},250);a.ol=new Kt.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}Kt.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=Kt.go;var b=new Tu(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",Kt.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),ph(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Tu(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,ul){b=Kn("div");var z=Kn("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=us,b.addEventListener("pointerdown",fs),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Ki(function(){a.Yh=null,a.N()},300),a.Ov=Ki(function(){Nu(a)},250),a.preventDefault=function(ee){return ee.preventDefault(),!1},a.$j=function(ee){if(a.isEnabled){var re=Ou(a,ee,!0);re.bubbles=!0;var oe=0,ue=0;re.delta=0,ee.deltaX!==void 0?(ee.deltaX!==0&&(oe=0<ee.deltaX?1:-1),ee.deltaY!==0&&(ue=0<ee.deltaY?1:-1),re.delta=Math.abs(ee.deltaX)>Math.abs(ee.deltaY)?-oe:-ue):ee.wheelDeltaX!==void 0?(ee.wheelDeltaX!==0&&(oe=0<ee.wheelDeltaX?-1:1),ee.wheelDeltaY!==0&&(ue=0<ee.wheelDeltaY?-1:1),re.delta=Math.abs(ee.wheelDeltaX)>Math.abs(ee.wheelDeltaY)?-oe:-ue):ee.wheelDelta!==void 0&&ee.wheelDelta!==0&&(re.delta=0<ee.wheelDelta?1:-1),a.doMouseWheel(),Qa(re,ee)}},a.aA=function(ee){a.isEnabled&&(a.Vk=!1,Ou(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 ue=oe;oe=Is(a,ee,!0,!1,!0,ue),jl(a,ee,oe),oe.targetDiagram=kd(ee,ee.target),oe.targetObject=null,ue||oe.clone(a.bq),ue=a.uw,re=re?25:10,ee.timeStamp-a.tw<a.zy&&!(Math.abs(ue.x-ee.screenX)>re||Math.abs(ue.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():Qa(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=Is(a,ee,!1,!1,!1,re[1]!==null);var oe=Kt.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 ue=a,de=ee;oe&&oe.H&&(de=ee,ue=oe.H),re.targetDiagram=ue,jl(a,de,re),re.targetObject=null,a.doMouseMove(),Qa(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=Is(a,ee,!1,!0,!0,!1);var ue=Kt.document.elementFromPoint(ee.clientX,ee.clientY)||null;ue!==null&&ue.shadowRoot!==void 0&&ue.shadowRoot!==null&&(ue=ue.shadowRoot.elementFromPoint(ee.clientX,ee.clientY)),ue!==null&&ue.H instanceof Gt&&ue.H!==a&&jl(ue.H,ee,oe),ue===null&&(ue=ee.target),jl(a,ee,oe),oe.clickCount=a.yq,oe.targetDiagram=kd(ee,ue),oe.targetObject=null,a.doMouseUp(),Qa(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"+Gh[1]+Gh[2]+"wI"+zh.slice(1,5)]["b"+kx.slice(1,y)](E.Z,Af,y,y),E.Vc(!0),Ys(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Gt.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Gt.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function Ys(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(Kt,"resize",a.Ov,!1)}function Ba(a){30<a.Sq&&(a.Yh=1)}function ou(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),vs&&vs.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Gt.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:Kt.devicePixelRatio||1},Gt.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Gt.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Gt.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Gt.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Gt.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Gt.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Gt.prototype.doFocus=function(){this.focus()},Gt.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=Kt.scrollX||Kt.pageXOffset,y=Kt.scrollY||Kt.pageYOffset;this.ta.focus(),Kt.scrollTo(a,y)}},Gt.prototype.Oy=function(){this.H.R("GainedFocus")},Gt.prototype.Ny=function(){this.H.R("LostFocus")};function Nu(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===Yu&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Ua(a){var y=new Ko;y.name="Background",a.Al(y),y=new Ko,y.name="",a.Al(y),y=new Ko,y.name="Foreground",a.Al(y),y=new Ko,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Ko,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Ko,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function Ms(a){var y=new Vn(Vn.Grid);y.name="GRID";var x=new bo;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new bo,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new bo,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new bo,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new bo,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new bo,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new xr,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 us(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):mh(this.H)}function fs(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):mh(this.H)}Gt.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,ue=E.height+z.top+z.bottom,de=E.right+z.right;z=E.bottom+z.bottom;var pe=b.x;E=b.y;var Se=b.width,Pe=b.height,Le=b.right,De=b.bottom;b=this.scale;var qe=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":qe=qe+a.scrollWidth-a.clientWidth;break;case"reverse":qe=a.scrollWidth-qe-a.clientWidth}var Ze=qe;Se<oe||Pe<ue?(qe=tt.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Ze&&(qe.x=Ze/b+ee,this.ju=Ze),this.allowVerticalScroll&&this.lu!==a.scrollTop&&(qe.y=a.scrollTop/b+re,this.lu=a.scrollTop),this.position=qe,tt.free(qe),this.Ee=this.qr=!1):(qe=tt.alloc(),a.uy&&this.allowHorizontalScroll&&(ee<pe&&(this.position=qe.h(Ze+ee,this.position.y)),de>Le&&(this.position=qe.h(-(y.scrollWidth-this.Aa)+Ze-this.Aa/b+de,this.position.y))),a.vy&&this.allowVerticalScroll&&(re<E&&(this.position=qe.h(this.position.x,a.scrollTop+re)),z>De&&(this.position=qe.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),tt.free(qe),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,de=E.right,Le=b.right,z=E.bottom,De=b.bottom,ee=E.x,pe=b.x,re=E.y,E=b.y,Se>=oe&&ee>=pe&&de<=Le&&(x.style.width="1px"),Pe>=ue&&re>=E&&z<=De&&(x.style.height="1px"))}},Gt.prototype.computeBounds=function(a){return a===void 0&&(a=new ln),Dl(this),gl(this,a)};function gl(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 ue=ee[oe];ue.isInDocumentBounds&&ue.isVisible()&&(ue=ue.actualBounds,ue.w()&&(x?(x=!1,y.assign(ue)):y.ed(ue)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Gt.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Ni(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Jn||(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 Jn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new ln(NaN,NaN,0,0):x};function tl(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=tt.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=ln.allocAt(0,0,E.width,E.height);var b=tt.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,ln.free(E),tt.free(b),tt.free(x)}x=a.yh,y&&a.Fg!==Yu&&(x=a.Fg);var z=x!==Yu?nc(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()?pa:oe),Rc(a,a.documentBounds,b,ee,re,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,ze.B(z.x,x)&&ze.B(z.y,E)&&ze.B(z.width,b)&&ze.B(z.height,ee)||a.onViewportBoundsChanged(new ln(x,E,b,ee),z,y,!1)}}function nc(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===Lc?(y=Math.min(oe,re),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===of?(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}Gt.prototype.zoomToFit=function(){var a=this.sj;this.sj=xh,this.scale=nc(this,Lc),a!==xh&&(tl(this,!1),Rc(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},Ee=Gt.prototype,Ee.BA=function(a,y){y===void 0&&(y=Lc);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===Lc||y===of)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===of?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 tt(a.x,a.y)}},Ee.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new tt(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))},Ee.zz=function(a){if(a instanceof Dt){this.eq=a;var y=tt.alloc();this.fq=this.op(a.ga(Fl,y)),tt.free(y)}else this.eq=null,this.fq=nu};function Rc(a,y,x,E,b,z){var ee=tt.allocAt(a.pa.x,a.pa.y),re=ee.x,oe=ee.y;if(a.eq!==null){var ue=tt.alloc();ue=a.eq.ga(Fl,ue),re=ue.x-a.fq.x/a.scale,oe=ue.y-a.fq.y/a.scale,b=El,tt.free(ue)}(z||a.scrollMode===xh)&&(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),oa(a.Yd,a.pa,ee),a.pa.h(ee.x,ee.y),hc(a),tt.free(ee)}Ee.Ol=function(a,y){if(y===void 0&&(y=!0),y){if(a=_u(this,a,function(x){return x.part},function(x){return x.canSelect()}),a instanceof xr)return a}else if(a=_u(this,a,function(x){return x.part}),a instanceof xr)return a;return null},Ee.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),Dl(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 _u(a,y,x,E){for(x===void 0&&(x=null),E===void 0&&(E=null),Dl(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}Ee.lz=function(a,y,x){return y===void 0&&(y=!0),au(this,a,function(E){return E.part},y?function(E){return E instanceof xr&&E.canSelect()}:null,x)};function au(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof Un||b instanceof zn||(b=new zn),Dl(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}Ee.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof Un||E instanceof zn||(E=new zn),Dl(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},Ee.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),jc(this,a,function(b){return b instanceof xr&&(!x||b.canSelect())},y,E)},Ee.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof Un||b instanceof zn||(b=new zn),Dl(this);for(var z=this.Wa.iteratorBackwards;z.next();){var ee=z.value;ee.visible&&ee.Cf(a,y,x,E,b)}return b},Ee.Nu=function(a,y,x,E,b,z){var ee=new zn;Dl(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 jc(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 Un||b instanceof zn||(b=new zn),Dl(a),a=a.Wa.iteratorBackwards;a.next();){var ee=a.value;ee.visible&&!ee.isTemporary&&ee.Cf(y,z,x,E,b)}return b}Ee.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Fc(this,a,y,function(z){return z instanceof xr&&(!E||z.canSelect())},x,b)},Ee.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 Un||b instanceof zn)&&(z=b),b=!0),z instanceof Un||z instanceof zn||(z=new zn),Dl(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 Fc(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 Un||b instanceof zn)&&(z=b),b=!0),z instanceof Un||z instanceof zn||(z=new zn),Dl(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}Gt.prototype.acceptEvent=function(a){return Ou(this,a,a instanceof MouseEvent)};function Ou(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?jl(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),ms&&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=kd(y,y.target),E.targetObject=null,E}function kd(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 Is(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,ms&&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 Qa(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Gt.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Ou(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(),Qa(x,a)},Gt.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ou(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(),Qa(x,a)},Gt.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ou(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Qa(x,a)},Gt.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Ou(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Qa(x,a)},Gt.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new tt(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?ws(new tt(y,a),this.Ab):new tt(y,a)};function jl(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=tt.allocAt(ee,re),a.Ab.Cd(y),x.documentPoint.assign(y),tt.free(y)):x.documentPoint.h(ee,re)}function ic(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))}}Gt.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Bu(a){a.ld||Dl(a),a.Va()}Gt.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},Ee=Gt.prototype,Ee.Pz=function(){return this.kg},Ee.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,pu(this),this.hf=!1,this.du=new tt(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&wr(function(){E.ld=!1,zs(y,"Model"),a(E)},1)},Ee.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;Kt.requestAnimationFrame(function(){y.kg&&y.bd()})}},Ee.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),pu(this))};function Ku(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||mh(a)||(y&&Dl(a),x&&tl(a,!1))}function pu(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];it(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||Nu(a),Ku(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(mu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),Dl(a),z=!1,(!a.hf||a.xh)&&(a.hf?wg(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),wg(a,!1)),z=!0),a.Jk=!1,Dl(a),a.ou||Bu(a),Ku(a,!0,!1),ee=!1,z?(x=ln.alloc(),x.assign(a.viewportBounds),a.hf||(ee=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,fd(a)),a.R("LayoutCompleted"),Ku(a,!0,!1),ln.free(x)):x.Ok&&x.Qw&&(a.Fg!==Yu?a.scale=nc(a,a.Fg):a.yh!==Yu?a.scale=nc(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),tl(a,!0)),z&&ee&&a.eb("Initial Layout"),Dl(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function fd(a){if(a.Fg!==Yu)a.scale=nc(a,a.Fg);else if(a.yh!==Yu)a.scale=nc(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}tl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),mu(a)}function Dl(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 zn,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof po&&E.U&65536&&(E.U=E.U^65536)})}}Ee.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof po||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof po&&x.isVisible()&&zc(this,x);for(a.reset();a.next();)x=a.value,x instanceof Jn&&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 Fa&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function zc(a,y){for(var x=Ar(),E=Ar(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof po?(rt(z)||vt(z)||Tf(z))&&zc(a,z):z instanceof Jn?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(br(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();br(E)}Ee.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},Ee.gc=function(a){if(this.Ka!==null){if(this.ta===null&&Wt("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){rh(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,Hs(a,re.m11,re.m12,re.m21,re.m22,re.dx,re.dy),this.pb!==1&&(a.globalAlpha=this.pb),Dd(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?Ph(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(St.prototype.Cd=St.prototype.Eu),this.Fc=this.vd=!1}}}}else e:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,rh(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,ue=Math.round(re.x*oe)/oe,de=Math.round(re.y*oe)/oe;for(oe!==1&&z.scale(oe),re.x===0&&re.y===0||z.translate(-ue,-de),a.setTransform(ee,0,0,ee,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),Dd(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?Ph(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(St.prototype.Cd=St.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=vs&&vs.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 qh(a,y,x,E,b,z,ee,re,oe,ue){if(a.Ka!==null){a.ta===null&&Wt("No canvas specified"),ee===void 0&&(ee=null),re===void 0&&(re=null),oe===void 0&&(oe=!1),ue===void 0&&(ue=!1),rh(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var de=a.Ca;a.Ca=b;var pe=a.Wa.s,Se=pe.length;try{var Pe=new ln(z.x,z.y,E.width/b,E.height/b),Le=Pe.copy();Le.Co(x),mu(a,Le),Dl(a),a.Fd(pe,Se,a,Pe),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 De=a.Mb;y.scale(De,De);var qe=St.alloc();qe.reset(),qe.translate(x.left,x.top),qe.scale(b),z.x===0&&z.y===0||qe.translate(-z.x,-z.y),y.setTransform(qe.m11,qe.m12,qe.m21,qe.m22,qe.dx,qe.dy),y.yc(),y instanceof Ja&&Hs(y,qe.m11,qe.m12,qe.m21,qe.m22,qe.dx,qe.dy),St.free(qe),Dd(a,y),y.globalAlpha=a.pb;var Ze=a.Qj("Grid");if(ee){var ct=new zn,ft=ee.iterator;for(ft.reset();ft.next();){var yt=ft.value;yt instanceof xr&&(ue||yt.layer!==Ze)&&(yt.Gj(),ct.add(yt))}for(ue=0;ue<Se;ue++)Ml(pe[ue],y,a,ct,oe);ct.each(function(Ut){return Ut.Gj()})}else for(ct=0;ct<Se;ct++){var kt=pe[ct];kt===Ze?ue&&kt.gc(y,a,!0):kt.gc(y,a,oe)}a.$i=!1,a.Yf&&Ph(a.Yf,a)&&a.Vp()}finally{a.Ca=de,a.ib.Vc(!0),a.vd=!0,a.Fd(pe,Se,a,a.viewportBounds),mu(a),a.ib instanceof Ja&&(a.ib.Nj.PA(),a.redraw())}}}Ee.Gf=function(a){return this.Rg[a]},Ee.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},Ee.Tx=function(){this.Rg=new to,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(ms||zl),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function Dd(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}Ee.Ql=function(a){return this.on[a]},Ee.sA=function(a,y){this.on[a]=y},Ee.Sx=function(){this.on=new to,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},Ee.set=function(a){return Object.assign(this,a),this},Ee.Du=function(a){return this.nm(a)},Ee.nm=function(a){return gh(this,a),this};function gh(a,y){var x=a instanceof Vn,E=a instanceof Gt,b;for(b in y){b===""&&Wt("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])),Zn(z)?ee=b.substr(re+1):Wt("Unable to find object named: "+oe+" in "+a.toString()+" when trying to set property: "+b)}}if(ee[0]!=="_"&&!Ka(z,ee))if(E&&ee==="ModelChanged"){a.Yw(y[ee]);continue}else if(E&&ee==="Changed"){a.Pe(y[ee]);continue}else if(E&&Ka(a.toolManager,ee))z=a.toolManager;else if(E&&qg(a,ee)){a.Bj(ee,y[ee]);continue}else if(a instanceof ar&&ee==="Changed"){a.Pe(y[ee]);continue}else Wt('Trying to set undefined property "'+ee+'" on object: '+z.toString());z[ee]=y[b],ee[0]==="_"&&z instanceof Dt&&z.Vw(ee)}}Ee.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new sr,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},Ee.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")},Gt.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!==Mf&&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=ln.alloc(),_d(this,this.computeBounds(E)),ln.free(E)),E=this.ta,E===null||E instanceof ua)))){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 ue=70*ee,de=Math.max(z,0),pe=Math.max(y,0),Se=Math.floor(b-de),Pe=Math.floor(re-pe);a.drawImage(E.Oa,de,pe,Se,Pe,0,0,Se,Pe),Ph(this.Yf,this)&&a.clearRect(0,0,oe,ue),E=Ar(),a=Ar(),Pe=Math.abs(z),Se=Math.abs(y);var Le=de===0?0:b-Pe;de=tt.allocAt(Le,0),Pe=tt.allocAt(Pe+Le,re),a.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y)));var De=this.Ab;if(De.reset(),De.scale(ee,ee),this.Ca!==1&&De.scale(this.Ca),ee=this.pa,(ee.x!==0||ee.y!==0)&&isFinite(ee.x)&&isFinite(ee.y)&&De.translate(-ee.x,-ee.y),ws(de,De),ws(Pe,De),E.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y))),Le=pe===0?0:re-Se,de.h(0,Le),Pe.h(b,Se+Le),a.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y))),ws(de,De),ws(Pe,De),E.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y))),Ph(this.Yf,this)&&(b=0<z?0:-z,re=0<y?0:-y,de.h(b,re),Pe.h(oe+b,ue+re),a.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y))),ws(de,De),ws(Pe,De),E.push(new ln(Math.min(de.x,Pe.x),Math.min(de.y,Pe.y),Math.abs(de.x-Pe.x),Math.abs(de.y-Pe.y)))),tt.free(de),tt.free(Pe),Ku(this,!1,!0),this.Ka===null&&Wt("No div specified"),this.ta===null&&Wt("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(rh(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,ue=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,-ue),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),Dd(this,b),b.globalAlpha=this.pb,re=0;re<z;re++)if(ee=y[re],oe=E,ee.visible&&ee.pb!==0){ue=gs(ee,b),pe=ee.Zq,pe.length=0,de=this.scale,Se=ln.alloc(),Pe=ee.Pa.s,De=Pe.length,Le=oe.length;for(var qe=0;qe<De;qe++){var Ze=Pe[qe],ct=ug(Ze,Ze.actualBounds);e:{for(var ft=2/de,yt=4/de,kt=0;kt<Le;kt++){var Ut=oe[kt];if(Ut.width!==0&&Ut.height!==0&&ct.Vu(Ut.x-ft,Ut.y-ft,Ut.width+yt,Ut.height+yt)){ct=!0;break e}}ct=!1}ct&&ee.Oj(b,Ze,this,pe,de,Se,!0)}ln.free(Se),b.globalAlpha=ue}b.restore(),b.Vc(!0),this.Yf&&Ph(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}br(E),br(a),this.ld=!1}}else this.bd();x&&(Ba(this),this.bd(),ou(this,!0))}else x?(Ba(this),this.bd(),ou(this,!0)):this.bd()}};function rh(a){a.pn!==!1&&(a.pn=!1,ph(a,a.Aa,a.ya))}function ph(a,y,x){hc(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function mh(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,ue=b.clientHeight||E+re,de=a.viewportBounds;b=de.x;var pe=de.y,Se=de.width,Pe=de.height;if((oe!==x+ee||ue!==E+re)&&(a.gf=!1,a.Be=!1,re=ee=0,a.Aa=oe,a.ya=ue,z=a.pn=!0,hc(a)),!a.hf||!a.viewportBounds.w())return!0;var Le=a.ku,De=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var qe=a.documentBounds,Ze=0,ct=0,ft=0,yt=0,kt=de.width,Ut=de.height,gi=a.rj;a.contentAlignment.sb()?(qe.width>kt&&(Ze=gi.left,ct=gi.right),qe.height>Ut&&(ft=gi.top,yt=gi.bottom)):(Ze=gi.left,ct=gi.right,ft=gi.top,yt=gi.bottom);var Qi=qe.width+Ze+ct,Gi=qe.height+ft+yt;gi=a.scale;var Qn=Qi>oe/gi,An=Gi>ue/gi;if(!(z||a.gf||a.Be||Qn||An))return!0;Ze=qe.x-Ze,oe=de.x,ct=qe.right+ct,ue=de.right+ee,ft=qe.y-ft;var so=de.y;qe=qe.bottom+yt,de=de.bottom+re;var Wr="1px";if(yt="1px",a.scrollMode===xh&&(Qn||An)&&(Qn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Qn=1,Ze+1<oe&&(Qn=Math.max((oe-Ze)*gi+a.Aa,Qn)),ct>ue+1&&(Qn=Math.max((ct-ue)*gi+a.Aa,Qn)),kt+ee+1<Qi&&(Qn=Math.max((Qi-kt)*gi+a.Aa,Qn)),Wr=Qn.toString()+"px"),An&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Qn=1,ft+1<so&&(Qn=Math.max((so-ft)*gi+a.ya,Qn)),qe>de+1&&(Qn=Math.max((qe-de)*gi+a.ya,Qn)),Ut+re+1<Gi&&(Qn=Math.max((Gi-Ut)*gi+a.ya,Qn)),yt=Qn.toString()+"px")),Qn=Wr!=="1px",An=yt!=="1px",Qn&&An||!Qn&&!An||(An&&(ue-=a.Db),Qn&&(de-=a.Db),Qi<kt+ee||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(ee=1,Ze+1<oe&&(ee=Math.max((oe-Ze)*gi+a.Aa,ee)),ct>ue+1&&(ee=Math.max((ct-ue)*gi+a.Aa,ee)),kt+1<Qi&&(ee=Math.max((Qi-kt)*gi+a.Aa,ee)),Wr=ee.toString()+"px"),Qn=Wr!=="1px",ee=a.ya,Qn!==a.Be&&(ee=Qn?a.ya-a.Db:a.ya+a.Db),Gi<Ut+re||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(re=1,ft+1<so&&(re=Math.max((so-ft)*gi+ee,re)),qe>de+1&&(re=Math.max((qe-de)*gi+ee,re)),Ut+1<Gi&&(re=Math.max((Gi-Ut)*gi+ee,re)),yt=re.toString()+"px"),An=yt!=="1px"),a.qr&&Qn===a.Be&&An===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Qn!==a.Be&&(Wr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Qn,De.style.width=Wr,An!==a.gf&&(yt==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(re=tt.alloc(),An?(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)),tt.free(re))),z&&hc(a),a.gf=An,De.style.height=yt,a.gu=!0,z&&(a.pn=!0),y=Le.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(kt+1<Qi?y=(a.position.x-Ze)*gi:Ze+1<oe?y=Le.scrollWidth-Le.clientWidth:ct>ue+1&&(y=a.position.x*gi)),a.tn)switch(a.bu){case"negative":y=-(Le.scrollWidth-y-Le.clientWidth);break;case"reverse":y=Le.scrollWidth-y-Le.clientWidth}return Le.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Ut+1<Gi?Le.scrollTop=(a.position.y-ft)*gi:ft+1<so?Le.scrollTop=Le.scrollHeight-Le.clientHeight:qe>de+1&&(Le.scrollTop=a.position.y*gi)),oe=a.Aa,ue=a.ya,Le.style.width=oe+(a.gf?a.Db:0)+"px",Le.style.height=ue+(a.Be?a.Db:0)+"px",x!==oe||E!==ue||a.animationManager.zb?(x=ln.allocAt(b,pe,Se,Pe),a.onViewportBoundsChanged(x,a.viewportBounds,gi,z),ln.free(x),!1):!0}Ee=Gt.prototype,Ee.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&Wt("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&&Wt('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(aa,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},Ee.oi=function(a){this.partManager.oi(a);var y=this;ag(a,function(x){Gc(y,x)}),(a instanceof Fa||a instanceof po&&a.placeholder!==null)&&a.v(),a.data!==null&&ag(a,function(x){vy(y.partManager,x)}),vt(a)!==!0&&Tf(a)!==!0||this.De.add(a),R1(a,!0,this),z1(a)?(a.actualBounds.w()&&this.N(ug(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(ug(a,a.actualBounds)),this.$b()},Ee.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&ag(a,function(x){yy(y.partManager,x,y)}),this.De.remove(a),z1(a)?(a.actualBounds.w()&&this.N(ug(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(ug(a,a.actualBounds)),this.$b()},Ee.remove=function(a){ef(this,a,!0)};function ef(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(ka,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}Ee.Is=function(a,y){if(y===void 0&&(y=!1),Ni(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 zn,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},Ee.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Gt.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=tf(this)),this.toolManager!==null){var b=new sr;if(a!==null)if(Ni(a))for(var z=0;z<a.length;z++)wd(this,b,a[z],x,E);else for(a=a.iterator;a.next();)wd(this,b,a.value,x,E);else{for(a=this.parts;a.next();)wd(this,b,a.value,x,E);for(a=this.nodes;a.next();)wd(this,b,a.value,x,E);for(a=this.links;a.next();)wd(this,b,a.value,x,E)}oh(this,b,y,E,x)}};function wd(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=tf(a)),x instanceof xi){if(y.add(x,a.Pd(b,x,x.location)),x instanceof po&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)wd(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)&&wd(a,y,ee,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)wd(a,y,x.value,E,b)}else if(x instanceof Jn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)wd(a,y,x.value,E,b);else x instanceof Fa||y.add(x,a.Pd(b,x,x.location))}function oh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=tt.alloc(),ee=tt.alloc();ee.assign(x),isNaN(ee.x)&&(ee.x=0),isNaN(ee.y)&&(ee.y=0),(x=a.Mr)||_h(a,y);for(var re=Ar(),oe=Ar(),ue=y.iterator,de=tt.alloc();ue.next();){var pe=ue.key,Se=ue.value;if(pe.Zc()){var Pe=ml(a,pe,y);Pe!==null?re.push(new ie(pe,Se,Pe)):(!b||pe.canMove())&&(Pe=Se.point,z.assign(Pe),a.computeMove(pe,z.add(ee),E,de),pe.location=de,Se.shifted===void 0&&(Se.shifted=new tt),Se.shifted.assign(de.re(Pe)))}else ue.key instanceof Jn&&oe.push(ue.sa)}for(tt.free(de),b=re.length,ue=0;ue<b;ue++)pe=re[ue],z.assign(pe.info.point),pe.Su.shifted===void 0&&(pe.Su.shifted=new tt),pe.node.location=z.add(pe.Su.shifted);for(b=tt.alloc(),ue=tt.alloc(),pe=oe.length,Se=0;Se<pe;Se++){var Le=oe[Se];if(Pe=Le.key,Pe instanceof Jn)if(Pe.suspendsRouting){Pe.Tg=null,de=Pe.fromNode;var De=Pe.toNode;if(a.draggedLink!==null&&E.dragsLink)if(De=Le.value.point,Pe.dragComputation===null)y.add(Pe,a.Pd(E,Pe,ee)),hf(Pe,ee.x-De.x,ee.y-De.y);else{Le=tt.allocAt(0,0),(de=Pe.i(0))&&de.w()&&Le.assign(de);var qe=de=tt.alloc().assign(Le).add(ee);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&(qe=tt.alloc(),nf(a,Pe,de,qe,E)),de.assign(Pe.dragComputation(Pe,de,qe)).re(Le),y.add(Pe,a.Pd(E,Pe,de)),hf(Pe,de.x-De.x,de.y-De.y),tt.free(Le),tt.free(de),qe!==de&&tt.free(qe)}else de!==null&&(b.assign(de.location),qe=y.I(de),qe!==null&&b.re(qe.point)),De!==null&&(ue.assign(De.location),qe=y.I(De),qe!==null&&ue.re(qe.point)),de!==null&&De!==null?b.Xa(ue)?(de=Le.value.point,De=z,De.assign(b),De.re(de),y.add(Pe,a.Pd(E,Pe,b)),hf(Pe,De.x,De.y)):(Pe.suspendsRouting=!1,Pe.bb()):(Le=Le.value.point,de=de!==null?b:De!==null?ue:ee,y.add(Pe,a.Pd(E,Pe,de)),hf(Pe,de.x-Le.x,de.y-Le.y))}else(Pe.fromNode===null||Pe.toNode===null)&&(de=Le.value.point,y.add(Pe,a.Pd(E,Pe,ee)),hf(Pe,ee.x-de.x,ee.y-de.y))}tt.free(z),tt.free(ee),tt.free(b),tt.free(ue),br(re),br(oe),x||(Dl(a),Pd(a,y))}}Gt.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new tt),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=tt.alloc(),nf(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,ue=oe.x;return isNaN(ue)&&(ue=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,ue)),Math.max(ee,Math.min(x.y,oe))),b!==y&&tt.free(b),E};function tf(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function nf(a,y,x,E,b){if(b===void 0&&(b=tf(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=tt.allocAt(0,0),z.yi(0,0,a,y,b),ze.No(x.x,x.y,re+z.x,ee+z.y,a,y,E),tt.free(z)}}function _h(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Jn&&(y.suspendsRouting=!0)}function Pd(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Jn&&(x.suspendsRouting=!1,iy(x)&&x.bb())}a.Mr=!1}}function ml(a,y,x){return y=y.containingGroup,y!==null&&(a=ml(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}Ee=Gt.prototype,Ee.Pd=function(a,y,x){if(x===void 0)return new Zd(il);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new Zd(new tt(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new Zd(x.copy())};function Xs(a,y,x){if(y.diagram!==null&&y.diagram!==a&&Wt("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&Wt("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&Wt("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&Wt("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&&Wt("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}Ee.Al=function(a){Xs(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(aa,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},Ee.Ww=function(a,y){Xs(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ka,"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(aa,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},Ee.Cy=function(a,y){Xs(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ka,"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(aa,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},Ee.kA=function(a){if(a.diagram!==this&&Wt("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(ka,"layers",this,a,null,x,null),this.N(),this.Ya()}}},Ee.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},Ee.Yw=function(a){return this.pf===null&&(this.pf=new Un),this.pf.add(a),this.model.Pe(a),this},Ee.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},Ee.Pe=function(a){return this.zg===null&&(this.zg=new Un),this.zg.add(a),this},Ee.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},Ee.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==Gr&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},Ee.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)},Ee.g=function(a,y,x,E,b){this.cb(mo,a,this,y,x,E,b)},Gt.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===mo){var b=a.object;if(Qs(b,a.propertyName,a.I(y)),b instanceof Dt){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===aa){var ee=a.object,re=a.newParam,oe=a.newValue;if(ee instanceof Vn)if(typeof re=="number"&&oe instanceof Dt){y?ee.pc(re):ee.Gb(re,oe);var ue=ee.part;ue!==null&&ue.Wb()}else typeof re=="number"&&oe instanceof Kl&&(oe.isRow?d1(ee,re,y?void 0:oe):h1(ee,re,y?void 0:oe));else if(ee instanceof Ko){var de=a.oldParam===!0;typeof re=="number"&&oe instanceof xr&&(y?(oe.isSelected=!1,oe.isHighlighted=!1,oe.Wb(),ee.pc(de?re:-1,oe,de)):ee.oi(re,oe,de))}else ee instanceof Gt?typeof re=="number"&&oe instanceof Ko&&(y?this.Wa.mb(re):(oe.Xe(this),this.Wa.Gb(re,oe))):Wt("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ka){var pe=a.object,Se=a.oldParam,Pe=a.oldValue;if(pe instanceof Vn)typeof Se=="number"&&Pe instanceof Dt?y?pe.Gb(Se,Pe):pe.pc(Se):typeof Se=="number"&&Pe instanceof Kl&&(Pe.isRow?d1(pe,Se,y?Pe:void 0):h1(pe,Se,y?Pe:void 0));else if(pe instanceof Ko){var Le=a.newParam===!0;typeof Se=="number"&&Pe instanceof xr&&(y?0>pe.Pa.indexOf(Pe)&&pe.oi(Se,Pe,Le):(Pe.isSelected=!1,Pe.isHighlighted=!1,Pe.Wb(),pe.pc(Le?Se:-1,Pe,Le)))}else pe instanceof Gt?typeof Se=="number"&&Pe instanceof Ko&&(y?(Pe.Xe(this),this.Wa.Gb(Se,Pe)):this.Wa.mb(Se)):Wt("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==Gr&&Wt("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Gt.prototype.Ea=function(a){return this.undoManager.Ea(a)},Gt.prototype.eb=function(a){return this.undoManager.eb(a)},Gt.prototype.Kf=function(){return this.undoManager.Kf()},Gt.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}},Gt.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Gt.prototype.rp=function(){this.partManager.rp()};function cc(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,hc(a),a.N(),a.Ee=!0,E.zb&&(Vs(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,hc(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,ee=a.ya,re=a.zoomPoint.x,oe=a.zoomPoint.y,ue=a.contentAlignment;isNaN(re)&&(ue.$c()?ue.Hf(er)?re=0:ue.Hf(Wi)&&(re=z-1):re=ue.sb()?ue.x*(z-1):z/2),isNaN(oe)&&(ue.$c()?ue.Hf(Gn)?oe=0:ue.Hf(Bi)&&(oe=ee-1):oe=ue.sb()?ue.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=tt.allocAt(a.pa.x+re/y-re/x,a.pa.y+oe/y-oe/x),a.position=z,tt.free(z),a.Ca=x,hc(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),tl(a,!1),E.zb&&(Vs(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Gt.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!==Yu||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof jo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),yl(b,this)),this.vb||this.invalidateViewport(a,y),mu(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 mu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=Fn.alloc(),b=1,z=1,ee=x.O.s,re=ee.length,oe=0;oe<re;oe++){var ue=ee[oe],de=Math.abs(ue.interval);2>de||(bv(ue.figure)?z=z*de/ze.vx(z,de):b=b*de/ze.vx(b,de))}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=ln.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){ln.free(y);return}b=y.width,z=y.height,a=y.x,ee=y.y,ln.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=tt.alloc(),ze.No(a,ee,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),Fn.free(E),x.part.location=y,tt.free(y)}}Gt.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)}},Gt.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))},Gt.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Ni(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof xr||Wt("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 xr||Wt("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Gt.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()}},Ee=Gt.prototype,Ee.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},Ee.Jz=function(a){a=new zn().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 xr||Wt("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},Ee.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=tt.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)),tt.free(z);return}Wt("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):Wt("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),tt.free(z)},Ee.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)},Ee.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},Ee.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)},Ee.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,ue=y.m22,de=y.dx,pe=y.dy,Se=x*ee+E*oe+de;y=x*re+E*ue+pe;var Pe=b*ee+E*oe+de;return a=b*re+E*ue+pe,E=x*ee+z*oe+de,x=x*re+z*ue+pe,ee=b*ee+z*oe+de,b=b*re+z*ue+pe,z=Math.min(Se,Pe),Se=Math.max(Se,Pe),Pe=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),Se=Math.max(Se,E),Pe=Math.min(Pe,x),y=Math.max(y,x),z=Math.min(z,ee),Se=Math.max(Se,ee),Pe=Math.min(Pe,b),y=Math.max(y,b),new ln(z,Pe,Se-z,y-Pe)},Ee.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),ws(a.copy(),this.Ab)};function ku(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function qu(a){return a=ig.get(a),a!==null?new a:new rs}Gt.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===Gr&&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===Gr){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),Dl(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||Os(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&&(ku(this),this.As.clear(),Wl(this.animationManager)),!this.Rt&&ee&&this.lastInput.targetDiagram){this.Rt=!0;var re=this;wr(function(){re.currentTool.standardMouseOver(),re.Rt=!1},10)}}}finally{this.aa=!0}}}};function Gc(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)dc(a,y[E])}function dc(a,y){if(y instanceof Nc){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof zn&&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 Td(a,y){if(y instanceof Nc){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 zn&&x.Bg.remove(a),fp(E));break}}}}}Gt.prototype.Wd=function(){this.partManager.Wd()},Gt.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Gt.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Gt.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Gt.prototype.Vb=function(a){return this.partManager.Vb(a)},Gt.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},Ee=Gt.prototype,Ee.Lc=function(a){return this.partManager.Lc(a)},Ee.ii=function(a){return this.partManager.ii(a)},Ee.Kc=function(a){return this.partManager.Kc(a)},Ee.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:Mn(gn(y)))},Ee.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:Mn(gn(y)))};function hc(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 _d(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),tl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}Ee.Va=function(){if(this.Zi){var a=ln.alloc();_d(this,this.computeBounds(a)),ln.free(a)}},Ee.rz=function(){for(var a=new zn,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},Ee.qz=function(){return this.ai.iterator},Ee.Uz=function(a){Dl(this),a&&Ed(this,!0),this.ld?wg(this,!1):(this.Jk=!0,pu(this))};function Ed(a,y){for(var x=a.ai.iterator;x.next();)vh(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function vh(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)vh(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function wg(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||zs(z,"Layout")),a.xh=!1;for(var ee=a.ai.iterator;ee.next();)Pg(a,ee.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),Dl(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||Os(z),a.aa=x}}}function Pg(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)Pg(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),zc(a,y),b.isValidLayout=!0):a.xh=!0)}}Ee.yz=function(){for(var a=new Un,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function Hp(a){function y(b){var z=b.toLowerCase(),ee=new Un;x.add(b,ee),x.add(z,ee),E.add(b,b),E.add(z,b)}var x=new sr,E=new sr;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 qg(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function yh(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;Wt("Unknown DiagramEvent name: "+y)}Ee.Bj=function(a,y){return a=yh(this,a),a!==null&&a.add(y),this},Ee.am=function(a,y){a=yh(this,a),a!==null&&a.remove(y)},Ee.R=function(a,y,x){var E=yh(this,a),b=new vo;if(b.diagram=this,a=qg(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 tg(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}Ee.Yj=function(a,y){return Lf(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Gt.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?gl(this,a):a.assign(this.documentBounds)};function Lf(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new lm(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=ep(a,x)),x===null){y=ln.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&&ng(a,ee,E,y)}ln.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=ln.alloc(),z=x.memberParts;z.next();)ee=z.value,ee instanceof xi&&ng(a,ee,E,y);ln.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&oS(b);return b}function ep(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?ep(a,y.containingGroup):null}function ng(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(Sp(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(gf,x,y+1);else for(var ee=x;ee<=y;ee++)z[ee]=gf}else if(y instanceof po)for(y=y.memberParts;y.next();)b=y.value,b instanceof xi&&ng(a,b,x,E)}}function Oh(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Gt.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():Eg(this)};function Eg(a){a.vk===-1&&(a.vk=wr(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=ln.alloc(),a.computeBounds(y),y.ed(a.documentBounds),_d(a,y),ln.free(y),a.Fc=!0,a.bd(),Eg(a))}},a.vp))}Gt.prototype.ug=function(){this.vk!==-1&&(Kt.clearTimeout(this.vk),this.vk=-1)},Gt.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=ln.allocAt(0,0,E.width*b,E.height*b);var z=tt.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(il)||(y=new tt(y.x+z.x/b,y.y+z.y/b)),ln.free(E),tt.free(z),y},Ee=Gt.prototype,Ee.Cs=function(){return null},Ee.av=function(){return null},Ee.bs=function(a,y){this.pj.add(a,y)},Ee.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof po&&(y.$p=null)})};function Ih(a,y,x){function E(){var de=+new Date;for(z=!0,ee.reset();ee.next();)if(!ee.value[0].al){z=!1;break}z||de-ue>oe?y(x,b,re):Kt.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,ue=+new Date;return Kt.requestAnimationFrame(function(){E()}),null}Ee.Wz=function(a){return ul?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},Ee.Jx=function(a){return a===void 0&&(a={}),Ih(this,this.Xz,a)},Ee.Xz=function(a,y,x){var E=tp(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 zh+"data":b=E.getImageData(0,0,x.width,x.height);break;case zh:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&Wt('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 tp(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&Wt("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 Fn(1/0,1/0):new Fn(2e3,2e3));var re=y.position||null,oe=y.parts||null,ue=y.padding===void 0?1:y.padding,de=y.background||null,pe=y.omitTemporary;pe===void 0&&(pe=!0);var Se=y.document||document,Pe=y.elementFinished||null,Le=y.showTemporary;Le===void 0&&(Le=!pe),y=y.showGrid,y===void 0&&(y=Le),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof ue=="number"?ue=new oo(ue):ue instanceof oo||Wt("MakeImage padding must be a Margin or a number."),ue.left=Math.max(ue.left,0),ue.right=Math.max(ue.right,0),ue.top=Math.max(ue.top,0),ue.bottom=Math.max(ue.bottom,0),a.ib.Vc(!0),pe=new Tu(null,Se,void 0,!0);var De=pe.context;if(!(b||z||oe||re))return pe.width=a.Aa+Math.ceil(ue.left+ue.right),pe.height=a.ya+Math.ceil(ue.top+ue.bottom),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=Se,E.hs=Pe,qh(a,E.context,ue,new Fn(pe.width,pe.height),a.Ca,a.pa,oe,de,Le,y),E.context):(a.Xm=!1,qh(a,De,ue,new Fn(pe.width,pe.height),a.Ca,a.pa,oe,de,Le,y),a.Xm=!0,pe.context);var qe=a.Pp,Ze=a.documentBounds.copy();if(Ze.Fv(a.yb),Le)for(var ct=a.Wa.s,ft=ct.length,yt=0;yt<ft;yt++){var kt=ct[yt];if(kt.visible&&kt.isTemporary){kt=kt.Pa.s;for(var Ut=kt.length,gi=0;gi<Ut;gi++){var Qi=kt[gi];Qi.isInDocumentBounds&&Qi.isVisible()&&(Qi=Qi.actualBounds,Qi.w()&&Ze.ed(Qi))}}}if(ct=new tt(Ze.x,Ze.y),oe!==null){for(ft=new ln(0,0,0,0),yt=!0,kt=oe.iterator,kt.reset();kt.next();)Ut=kt.value,Ut instanceof xr&&(gi=Ut.layer,gi!==null&&!gi.visible||gi!==null&&!Le&&gi.isTemporary||!Ut.isVisible()||(Ut=Ut.actualBounds,Ut.w()&&(yt?(yt=!1,ft.assign(Ut)):ft.ed(Ut))));Ze.width=ft.width,Ze.height=ft.height,ct.x=ft.x,ct.y=ft.y}return re!==null&&re.w()&&(ct=re,z||(z=qe)),ft=re=0,ue!==null&&(re=ue.left+ue.right,ft=ue.top+ue.bottom),yt=kt=0,b!==null&&(kt=b.width,yt=b.height,isFinite(kt)&&(kt=Math.max(0,kt-re)),isFinite(yt)&&(yt=Math.max(0,yt-ft))),b!==null&&z!==null?(z==="NaN"&&(z=qe),b.w()?(b=kt,Ze=yt):isNaN(yt)?(b=kt,Ze=Ze.height*z):(b=Ze.width*z,Ze=yt)):b!==null?b.w()?(z=Math.min(kt/Ze.width,yt/Ze.height),b=kt,Ze=yt):isNaN(yt)?(z=kt/Ze.width,b=kt,Ze=Ze.height*z):(z=yt/Ze.height,b=Ze.width*z,Ze=yt):z!==null?z==="NaN"&&ee.w()?(z=Math.min((ee.width-re)/Ze.width,(ee.height-ft)/Ze.height),z>qe?(z=qe,b=Ze.width,Ze=Ze.height):(b=ee.width,Ze=ee.height)):(b=Ze.width*z,Ze=Ze.height*z):(z=qe,b=Ze.width,Ze=Ze.height),ue!==null?(b+=re,Ze+=ft):ue=new oo(0),ee!==null&&(qe=ee.width,ee=ee.height,isNaN(qe)&&(qe=2e3),isNaN(ee)&&(ee=2e3),isFinite(qe)&&(b=Math.min(b,qe)),isFinite(ee)&&(Ze=Math.min(Ze,ee))),pe.width=Math.ceil(b),pe.height=Math.ceil(Ze),x==="SVG"?E===null?null:(E.resize(pe.width,pe.height,pe.width,pe.height),E.ownerDocument=Se,E.hs=Pe,qh(a,E.context,ue,new Fn(Math.ceil(b),Math.ceil(Ze)),z,ct,oe,de,Le,y),E.context):(a.Xm=!1,qh(a,De,ue,new Fn(Math.ceil(b),Math.ceil(Ze)),z,ct,oe,de,Le,y),a.Xm=!0,pe.context)}dn.Object.defineProperties(Gt.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 ua(this,Kt.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 ua(this,Kt.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(Kt,"resize",this.Ov,!1),this.removeEventListener(Kt,"wheel",this.$j,!0),Ql===this&&(Ql=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Ra(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)&&pr(a,"0 <= value <= 1",Gt,"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),tl(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),tl(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),tl(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),tl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&pr(a,">= 0",Gt,"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&&pr(a,">= 0",Gt,"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 pr(a,">= 0",Gt,"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||ku(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&&Wt("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Ic(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,zs(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=qu(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(Kt,"pointermove",this.dk,!0),this.addEventListener(Kt,"pointerdown",this.ui,!0),this.addEventListener(Kt,"pointerup",this.fk,!0),this.addEventListener(Kt,"pointerout",this.ek,!0),this.addEventListener(Kt,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(Kt,"wheel",this.$j,!0),this.addEventListener(Kt,"selectstart",this.preventDefault,!1)):(this.removeEventListener(Kt,"pointermove",this.dk,!0),this.removeEventListener(Kt,"pointerdown",this.ui,!0),this.removeEventListener(Kt,"pointerup",this.fk,!0),this.removeEventListener(Kt,"pointerout",this.ek,!0),this.removeEventListener(Kt,"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(Kt,"wheel",this.$j,!0),this.removeEventListener(Kt,"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=tt.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),oa(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?hc(this):(this.vb=!0,a=this.scale,Rc(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)}tt.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=Ms(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=Ms(this)),a.type!==Vn.Grid&&Wt("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),mu(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),hc(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||Wt("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 oo(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===xh&&tl(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,tl(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,cc(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&&cc(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!==Yu&&tl(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()||Wt("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()||Wt("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)):pr(a,"> 0",Gt,"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)):pr(a,"> 0",Gt,"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),tl(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 oo(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&&Wt("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();)$p(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==ah&&a!==Cl&&a!==jh&&Wt("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 Fn(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 oo(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),dn.Object.defineProperties(Gt,{licenseKey:{get:function(){return Ag.jc()},set:function(a){Ag.add(a.replace(/\s/g,""))}},version:{get:function(){return wh}}}),Gt.prototype.makeImageData=Gt.prototype.Jx,Gt.prototype.makeImage=Gt.prototype.Wz,Gt.prototype.cacheGroupExternalLinks=Gt.prototype.Fu,Gt.prototype.addRenderer=Gt.prototype.bs,Gt.prototype.makeSVG=Gt.prototype.av,Gt.prototype.makeSvg=Gt.prototype.Cs,Gt.prototype.stopAutoScroll=Gt.prototype.ug,Gt.prototype.doAutoScroll=Gt.prototype.gs,Gt.prototype.isUnoccupied=Gt.prototype.Yj,Gt.prototype.raiseDiagramEvent=Gt.prototype.R,Gt.prototype.removeDiagramListener=Gt.prototype.am,Gt.prototype.addDiagramListener=Gt.prototype.Bj,Gt.prototype.findTreeRoots=Gt.prototype.yz,Gt.prototype.layoutDiagram=Gt.prototype.Uz,Gt.prototype.findTopLevelGroups=Gt.prototype.qz,Gt.prototype.findTopLevelNodesAndLinks=Gt.prototype.rz,Gt.prototype.ensureBounds=Gt.prototype.Va,Gt.prototype.findLinksByExample=Gt.prototype.ls,Gt.prototype.findNodesByExample=Gt.prototype.ms,Gt.prototype.findLinkForData=Gt.prototype.Kc,Gt.prototype.findNodeForData=Gt.prototype.ii,Gt.prototype.findPartForData=Gt.prototype.Lc,Gt.prototype.findLinkForKey=Gt.prototype.findLinkForKey,Gt.prototype.findNodeForKey=Gt.prototype.Vb,Gt.prototype.findPartForKey=Gt.prototype.findPartForKey,Gt.prototype.rebuildParts=Gt.prototype.Wd,Gt.prototype.transformViewToDoc=Gt.prototype.Ps,Gt.prototype.transformRectDocToView=Gt.prototype.zA,Gt.prototype.transformDocToView=Gt.prototype.op,Gt.prototype.centerRect=Gt.prototype.es,Gt.prototype.scrollToRect=Gt.prototype.tv,Gt.prototype.scroll=Gt.prototype.scroll,Gt.prototype.highlightCollection=Gt.prototype.Jz,Gt.prototype.highlight=Gt.prototype.Iz,Gt.prototype.selectCollection=Gt.prototype.rA,Gt.prototype.select=Gt.prototype.select,Gt.prototype.updateAllRelationshipsFromData=Gt.prototype.rp,Gt.prototype.updateAllTargetBindings=Gt.prototype.updateAllTargetBindings,Gt.prototype.commit=Gt.prototype.commit,Gt.prototype.rollbackTransaction=Gt.prototype.Kf,Gt.prototype.commitTransaction=Gt.prototype.eb,Gt.prototype.startTransaction=Gt.prototype.Ea,Gt.prototype.raiseChanged=Gt.prototype.g,Gt.prototype.raiseChangedEvent=Gt.prototype.cb,Gt.prototype.removeChangedListener=Gt.prototype.ik,Gt.prototype.addChangedListener=Gt.prototype.Pe,Gt.prototype.removeModelChangedListener=Gt.prototype.mA,Gt.prototype.addModelChangedListener=Gt.prototype.Yw,Gt.prototype.findLayer=Gt.prototype.Qj,Gt.prototype.removeLayer=Gt.prototype.kA,Gt.prototype.addLayerAfter=Gt.prototype.Cy,Gt.prototype.addLayerBefore=Gt.prototype.Ww,Gt.prototype.addLayer=Gt.prototype.Al,Gt.prototype.moveParts=Gt.prototype.moveParts,Gt.prototype.copyParts=Gt.prototype.Kj,Gt.prototype.removeParts=Gt.prototype.Is,Gt.prototype.remove=Gt.prototype.remove,Gt.prototype.add=Gt.prototype.add,Gt.prototype.clearDelayedGeometries=Gt.prototype.bx,Gt.prototype.setProperties=Gt.prototype.nm,Gt.prototype.attach=Gt.prototype.Du,Gt.prototype.set=Gt.prototype.set,Gt.prototype.resetInputOptions=Gt.prototype.Sx,Gt.prototype.setInputOption=Gt.prototype.sA,Gt.prototype.getInputOption=Gt.prototype.Ql,Gt.prototype.resetRenderingHints=Gt.prototype.Tx,Gt.prototype.setRenderingHint=Gt.prototype.Xx,Gt.prototype.getRenderingHint=Gt.prototype.Gf,Gt.prototype.maybeUpdate=Gt.prototype.bd,Gt.prototype.requestUpdate=Gt.prototype.$b,Gt.prototype.delayInitialization=Gt.prototype.Xy,Gt.prototype.isUpdateRequested=Gt.prototype.Pz,Gt.prototype.invalidateDocumentBounds=Gt.prototype.Ya,Gt.prototype.findObjectsNear=Gt.prototype.og,Gt.prototype.findPartsNear=Gt.prototype.mz,Gt.prototype.findObjectsIn=Gt.prototype.Cf,Gt.prototype.findPartsIn=Gt.prototype.ux,Gt.prototype.findObjectsAt=Gt.prototype.ji,Gt.prototype.findPartsAt=Gt.prototype.lz,Gt.prototype.findObjectAt=Gt.prototype.ic,Gt.prototype.findPartAt=Gt.prototype.Ol,Gt.prototype.focusObject=Gt.prototype.zz,Gt.prototype.alignDocument=Gt.prototype.Jy,Gt.prototype.zoomToRect=Gt.prototype.BA,Gt.prototype.zoomToFit=Gt.prototype.zoomToFit,Gt.prototype.diagramScroll=Gt.prototype.kx,Gt.prototype.focus=Gt.prototype.focus;var ig=new sr,np=null,ul=Kt.document!==void 0,rf=null,Sh="",Yu=new Qt(Gt,"None",0),Lc=new Qt(Gt,"Uniform",1),of=new Qt(Gt,"UniformToFill",2),Rh=new Qt(Gt,"CycleAll",10),Cg=new Qt(Gt,"CycleNotDirected",11),bg=new Qt(Gt,"CycleNotDirectedFast",12),Fg=new Qt(Gt,"CycleNotUndirected",13),Lg=new Qt(Gt,"CycleDestinationTree",14),Mg=new Qt(Gt,"CycleSourceTree",15),xh=new Qt(Gt,"DocumentScroll",1),Mf=new Qt(Gt,"InfiniteScroll",2),ah=new Qt(Gt,"TreeParentCollapsed",21),Cl=new Qt(Gt,"AllParentsCollapsed",22),jh=new Qt(Gt,"AnyParentsCollapsed",23),Ag=new Un,wh="2.3.10",zh="image",Af=null,ip=!1;function Iu(){if(ul){var a=Kt.document.createElement("canvas"),y=a.getContext("2d"),x=yo("7ca11abfd022028846");y[x]=yo("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",wn.Dx+"4ae6247590da4bb21c324ba3a84e385776",St.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",ze.za],b=1;5>b;b++)y[yo("7ca11abfd7330390")](yo(E[b-1]),10,15*b);for(y[x]=yo("39f046ebb36e4b"),x=1;5>x;x++)y[yo("7ca11abfd7330390")](yo(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(St.prototype.Cd=St.prototype.Eu),Af=a}}Gt.className="Diagram",Gt.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=Kt.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Gt?y.H:null},Gt.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},Gt.useDOM=function(a){ul=a?Kt.document!==void 0:!1},Gt.isUsingDOM=function(){return ul},Gt.None=Yu,Gt.Uniform=Lc,Gt.UniformToFill=of,Gt.CycleAll=Rh,Gt.CycleNotDirected=Cg,Gt.CycleNotDirectedFast=bg,Gt.CycleNotUndirected=Fg,Gt.CycleDestinationTree=Lg,Gt.CycleSourceTree=Mg,Gt.DocumentScroll=xh,Gt.InfiniteScroll=Mf,Gt.TreeParentCollapsed=ah,Gt.AllParentsCollapsed=Cl,Gt.AnyParentsCollapsed=jh;function rp(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Ph(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=Kt[yo("76a715b2f73f148a")][yo("72ba13b5")]||"";if(a.Rc=!0,ul){var E=Gt[yo("76a115b6ed251eaf4692")];if(E)for(var b=Ag.iterator;b.next()&&(E=b.value,E=yo(E).split(yo("39e9")),!(6>E.length));){var z=yo(E[1]).split(".");if(E[4]!=="7da71ca0")break;var ee=yo(wn[yo("6cae19")]).split(".");if(z[0]>ee[0]||z[0]===ee[0]&&z[1]>=ee[1]){var re=Kt[yo("74a900bae4370f8b51")][yo("6fbb13a1c2311e8a57")].toLowerCase();if(ee=re[yo("73a612b6fb191d")](yo("3aad1ab6e022098b4dc4")),z=yo(E[2]),-1<ee&&(re=re[yo("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<re&&re<ee),!a.Rc))break;for(ee=x[yo("76ad18b4f73e")],re=x[yo("73a612b6fb191d")](yo("35e7"))+2;re<ee;re++)y+=x[re];if(ee=y[yo("73a612b6fb191d")](z),0>ee&&z!==yo("7da71ca0ad381e90")&&(ee=y[yo("73a612b6fb191d")](yo("76a715b2ef3e149757"))),0>ee&&(ee=y[yo("73a612b6fb191d")](yo("76a715b2ef3e149757"))),0>ee&&(ee=y[yo("73a612b6fb191d")](yo("2bfa41fdb3784bca12"))),0>ee&&(ee=x[yo("73a612b6fb191d")](yo("7baa19a6f76c1988428554"))),a.Rc=!(0<=ee&&ee<y[yo("73a612b6fb191d")](yo("35"))||y[yo("73a612b6fb191d")](yo("35"))===-1),!a.Rc||x[yo("73a612b6fb191d")](yo("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[yo("73a612b6fb191d")](z)),!a.Rc)||(ee=Kt[yo("76a715b2f73f148a")][yo("69ad17a1e03e")],re=ee[yo("73a612b6fb191d")](yo("7fb002b6ed25128b4da25b2e")),-1<re&&(a.Rc=!(ee[yo("73a612b6fb191d")](z)>re),!a.Rc)))break;if(z[0]==="#"){ee=Kt.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[yo("79a417a0f0181a8946")]=E,Kt.document[yo("78a712aa")]){Kt.document[yo("78a712aa")][yo("7bb806b6ed32388c4a875b")](ee),oe=Kt.getComputedStyle(ee).getPropertyValue(yo("78a704b7e62456904c9b12701b6532a8"));var ue=Kt.getComputedStyle(ee).getPropertyValue(yo("75b817b0ea2202"));if(Kt.document[yo("78a712aa")][yo("68ad1bbcf533388c4a875b")](ee),oe){if(ee=Kt[yo("77a902b0eb1b1e804a8a")],ue==="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(yo("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){ee=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var de in ee)if(E===ee[de].selectorText){a.Rc=!1;break e}}}}else a.Rc=null,a.Rc=!1}}}else{for(de=x[yo("76ad18b4f73e")],b=x[yo("73a612b6fb191d")](yo("35e7"))+2;b<de;b++)y+=x[b];x=y[yo("73a612b6fb191d")](yo("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[yo("73a612b6fb191d")](yo("35")))}}}return 0<a.Rc&&a!==a.wy}rp.className="DiagramHelper";function Zd(a){this.j=a===void 0?new tt:a,this.o=new tt}dn.Object.defineProperties(Zd.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 Gh="DraggingInfo";Zd.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 Fn(NaN,NaN).freeze(),this.gridSnapCellSpot=Fl,this.gridSnapOrigin=new tt(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},ae.className="DraggingOptions";function fe(a,y){if(typeof a=="string"||Kt.Element&&a instanceof Element)var x=Gt.call(this,a)||this;else x=Gt.call(this)||this,y=a;return he(x),y&&x.nm(y),x}It(fe,Gt);function he(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=Qu,a.layout=new Fu}fe.prototype.reset=function(){Gt.prototype.reset.call(this),he(this)},fe.className="Palette";function me(a,y){if(typeof a=="string"||Kt.Element&&a instanceof Element)var x=Gt.call(this,a)||this;else x=Gt.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 xr;var b=new bo;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 oo(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new et,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var ee=z.viewportBounds,re=E.lastInput.documentPoint;z.position=new tt(re.x-ee.width/2,re.y-ee.height/2)}},x.Pf=function(){E.Ya(),Ge(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&&Ge(E)},x.autoScale=Lc,x.vb=!1,y&&Object.assign(x,y),x}It(me,Gt),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(rh(this),this.ql===null){var x=new Tu(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),Ne(this)}finally{this.ta=a,this.ib=y}}}Gt.prototype.redraw.call(this)},me.prototype.gc=function(){if(this.Ka===null&&Wt("No div specified"),this.ta===null&&Wt("No canvas specified"),!(this.ta instanceof ua)&&(Vv(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){rh(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?Ne(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 Ne(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=ln.alloc().assign(a.viewportBounds).ed(y.viewportBounds),mu(y,b),ln.free(b),Dl(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 ue=re.diagram.grid.part;if(!x&&re.isTemporary)E&&ue.layer===re&&(re=gs(re,b),ue.gc(b,oe),b.globalAlpha=re);else{for(var de=gs(re,b),pe=oe.scale,Se=ln.alloc(),Pe=re.Pa.s,Le=Pe.length,De=0;De<Le;De++){var qe=Pe[De];(E||qe!==ue)&&re.Oj(b,qe,oe,null,pe,Se,!1)}ln.free(Se),b.globalAlpha=de}}}}}function Ge(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=Fn.alloc();b.h(x.width,x.height),E.desiredSize=b,Fn.free(b),a=2/a.scale,E instanceof bo&&(E.strokeWidth=a),y.location=new tt(x.x-a/2,x.y-a/2),y.isSelected=!0}}}me.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Ga;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(),Ge(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))},dn.Object.defineProperties(me.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof me&&Wt("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),Ge(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),Ge(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 et(){uo.call(this),this.j=null}It(et,uo),et.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 tt(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)),!0)},et.prototype.doActivate=function(){this.j=null,uo.prototype.doActivate.call(this)},et.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},et.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 tt(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new tt(a.x-this.j.x,a.y-this.j.y)}}},et.className="OverviewDraggingTool";function $e(){_a(this),this.H=Ql,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=Ga,this.hb=!0,this.cg=null,this.ob=200}$e.prototype.toString=function(){return"CommandHandler"},$e.prototype.Xe=function(a){this.H=a},$e.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=ms?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()},$e.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},$e.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof jo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},$e.prototype.canStopCommand=function(){return!0},$e.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=""}},$e.prototype.canSelectAll=function(){return this.diagram.allowSelect},$e.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 zn,x=a.selection.iterator;x.next();)Of(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=""}},$e.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},$e.prototype.copySelection=function(){var a=this.diagram,y=new zn;for(a=a.selection.iterator;a.next();)Of(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},$e.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},$e.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},$e.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},$e.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)rf=null,Sh="";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 Un,x.addAll(z),rf=x,Sh=y.model.dataFormat}}y.R("ClipboardChanged",x)},$e.prototype.pasteFromClipboard=function(){var a=new zn,y=rf;if(y===null)return a;var x=this.diagram;if(Sh!==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},$e.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);oh(y,z,new tt(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=""}},$e.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||rf===null||rf.count===0||Sh!==a.model.dataFormat)},$e.prototype.undo=function(){this.diagram.undoManager.undo()},$e.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},$e.prototype.redo=function(){this.diagram.undoManager.redo()},$e.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},$e.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===Yu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},$e.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==Yu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},$e.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===Yu&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},$e.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==Yu?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},$e.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},$e.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},$e.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;zs(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=Ga):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),Os(y)},$e.prototype.canZoomToFit=function(){return this.diagram.allowZoom},$e.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;zs(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=Ct(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 xi&&oe.isTreeExpanded&&(!(oe instanceof po)||oe.isSubGraphExpanded);)oe=b.pop();0<b.length?(oe instanceof xr&&y.tv(oe.actualBounds),oe instanceof xi&&!oe.isTreeExpanded&&(oe.isTreeExpanded=!0),oe instanceof po&&!oe.isSubGraphExpanded&&(oe.isSubGraphExpanded=!0)):(oe instanceof xr&&y.es(oe.actualBounds),y.am("LayoutCompleted",ee)),y.eb("Scroll To Part")},ee=function(){wr(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 Ct(a,y,x){if(y.isVisible())return x;if(y instanceof Fa)Ct(a,y.adornedPart,x);else if(y instanceof Jn){var E=y.fromNode;E!==null&&Ct(a,E,x),y=y.toNode,y!==null&&Ct(a,y,x)}else y instanceof xi&&(E=y.labeledLink,E!==null&&Ct(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),Ct(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),Ct(a,y,x));return x}$e.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof xr)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},$e.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),zs(y.animationManager,"Collapse Tree");var x=new Un;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 xi&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},$e.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof xi&&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 xi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},$e.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),zs(y.animationManager,"Expand Tree");var x=new Un;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 xi&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},$e.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof xi)||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 xi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},$e.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 Un,z=a.selection.iterator;z.next();){var ee=z.value;ee.Zc()&&ee.canGroup()&&b.add(ee)}for(var re=new Un,oe=b.iterator;oe.next();){var ue=oe.value;z=!1;for(var de=b.iterator;de.next();)if(ue.Td(de.value)){z=!0;break}z||re.add(ue)}if(0<re.count){var pe=re.first().containingGroup;if(pe!==null)for(;pe!==null;){b=!1;for(var Se=re.iterator;Se.next();)if(!Se.value.Td(pe)){b=!0;break}if(b)pe=pe.containingGroup;else break}if(x instanceof po)Fd(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Pe=y.copyNodeData(x);Zn(Pe)&&(y.xf(Pe),E=a.ii(Pe))}if(E!==null){pe!==null&&this.isValidMember(pe,E)&&(E.containingGroup=pe);for(var Le=re.iterator;Le.next();){var De=Le.value;this.isValidMember(E,De)&&(De.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},$e.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 sn(a){var y=Ar();for(a=a.iterator;a.next();){var x=a.value;x instanceof Jn||y.push(x)}a=new zn,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 br(y),a}$e.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Jn)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},$e.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 Un;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof po&&z.canUngroup()&&E.add(z)}var ee=new Un;if(0<E.count){y.clearSelection(!0);for(var re=E.iterator;re.next();){var oe=re.value;oe.expandSubGraph();var ue=oe.containingGroup,de=ue!==null&&ue.data!==null?x.wa(ue.data):void 0;ee.addAll(oe.memberParts);for(var pe=ee.iterator;pe.next();){var Se=pe.value;if(Se.isSelected=!0,!(Se instanceof Jn)){var Pe=Se.data;Pe!==null?x.mp(Pe,de):Se.containingGroup=ue}}y.remove(oe)}}y.R("SelectionUngrouped",E,ee)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},$e.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 po))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&y.canUngroup())return!0;return!1},$e.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=sn(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},$e.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),zs(y.animationManager,"Collapse SubGraph");var x=new Un;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 po&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},$e.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof po&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&y.isSubGraphExpanded)return!0;return!1},$e.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),zs(y.animationManager,"Expand SubGraph");var x=new Un;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 po&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},$e.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof po&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof po&&!y.isSubGraphExpanded)return!0;return!1},$e.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 Bs&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},$e.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 Bs))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 Bs&&x.editable}),a!==null))return!0;return!1},$e.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 Dt?b=a.ga(pa):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new tt(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,Er(x,!1,a)}},$e.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)},$e.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 sr,a===null)return E;for(var z=a.iterator;z.next();)wd(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 Jn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},dn.Object.defineProperties($e.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||Wt("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}}}),$e.className="CommandHandler",tu=function(){return new $e};function Dt(){_a(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new tt(NaN,NaN).freeze(),this.jd=hu,this.Ab=new St,this.wh=new St,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=iu,this.uc=new ln(NaN,NaN,NaN,NaN).freeze(),this.Ib=new ln(NaN,NaN,NaN,NaN).freeze(),this.dc=new ln(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=qi,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 Hn,Tn,ir,dr,Mr,ao,qo,Mo,ga,is;Dt.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=Pi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Dt.prototype.Vw=function(a){var y=this.Dh;if(Ni(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Dt.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Dt.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},Dt.prototype.copy=function(){return this.clone()},Ee=Dt.prototype,Ee.qb=function(a){a.classType===Jn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:Wt("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Dt&&(this.stretch=a)},Ee.toString=function(){return Rr(this.constructor)+"#"+No(this)},Ee.th=function(){this.A!==null&&(this.A.nc=!0)};function Ao(a){a.A===null?a.A=new Hr:a.A.nc&&(a.A=a.A.copy())}Ee.Xc=function(){if(this.ba===null){var a=new So;a.Xi=El,a.yj=El,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},Ee.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===mo&&ve(this)&&Rs(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 sr),ee=z.undoManager.transactionLevel===0,a.startCondition===ta?ee=!0:a.startCondition===Io&&(ee=!1),ee?(z=new Us,xu(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()):(zs(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof Vn&&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 Vn&&ag(re,function(oe){oe.data!==null&&oe.l&16777216&&oe.La(y)})};function Rs(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))}}Ee.ks=function(a){return this.bindingId===a?this:null},Ee.g=function(a,y,x){this.cb(mo,a,this,y,x)},Ee.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 St);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function Ul(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}Ee.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Js(a.x,a.y,0,0,0,E.height)<=y||Js(a.x,a.y,0,E.height,E.width,E.height)<=y||Js(a.x,a.y,E.width,E.height,E.width,0)<=y||Js(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},Ee.se=function(){return!0},Ee.ca=function(a){var y=tt.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return tt.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=Oa(x.x-ee*oe,x.y-ee*oe,x.width+z*oe,x.height+z*oe,y.x,y.y),tt.free(y),a}return b=!1,(this instanceof Fa||this instanceof bo?Oa(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)),tt.free(y),b},Ee.gh=function(a){var y=this.naturalBounds;return Oa(0,0,y.width,y.height,a.x,a.y)},Ee.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=ln.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=tt.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)))),tt.free(b),ln.free(y),E},Ee.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=tt.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)))),tt.free(b),E},Ee.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=tt.allocAt(0,0),b=tt.allocAt(0,x.height),z=tt.allocAt(x.width,x.height),ee=tt.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=ln.allocAt(0,0,x.width,x.height);var oe=tt.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)))),tt.free(oe),ln.free(x),!re&&(ze.us(a,E,b)||ze.us(a,b,z)||ze.us(a,z,ee)||ze.us(a,ee,E))&&(re=!0)}return tt.free(E),tt.free(b),tt.free(z),tt.free(ee),re},Ee.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof fr){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},Ee.mi=function(a){a===void 0&&(a=new ln);var y=this.naturalBounds,x=this.oe,E=tt.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Ws(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Ws(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Ws(a,E.x,E.y,0,0),tt.free(E),a},Ee.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},Ee.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},Ee.qs=function(a,y){return y===void 0&&(y=new tt),y.assign(a),this.oe.Cd(y),y},Ee.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ee.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,ue=-z.m21*ee,de=z.m11*ee,pe=ee*(z.m21*z.dy-z.m22*z.dx),Se=ee*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,ze.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(ee=a*re+y*ue+pe,a=a*oe+y*de+Se,y=x*re+E*ue+pe,x=x*oe+E*de+Se,b.h(0,0),E=this.naturalBounds,x=ze.Ff(0,0,E.width,E.height,ee,a,y,x,b),b.transform(z),x)},Dt.prototype.measure=function(a,y,x,E){if(rt(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 Vn;switch(oc(this,!0)){case Tn:ee=b=0,re&&(y=a=1/0);break;case Hn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(ee=y);break;case dr:isFinite(a)&&a>x&&(b=a),ee=0,re&&(y=1/0);break;case Mr: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()||Wt("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),it(this,!1)}},Dt.prototype.Wl=function(){},Dt.prototype.Dd=function(){return!1},Dt.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=ln.alloc();z.assign(this.Ib),this.Ib.ka(),vt(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&&lf(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 Bs&&(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()||Wt("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),Ft(this,!1),ln.free(z)},Ee=Dt.prototype,Ee.eh=function(){};function Xu(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=oc(a,!0),x===E&&z===b&&(y=Tn),y){case Tn:(x>E||z>b)&&(it(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case Hn:it(a,!0),a.measure(E,b,0,0);break;case dr:it(a,!0),a.measure(E,z,0,0);break;case Mr:it(a,!0),a.measure(x,b,0,0)}}}Ee.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||Yv(x,!0),this.N(),al(a,y)||(x.oh(),this.Pn(x)))},Ee.Pn=function(a){this.portId!==null&&(Yv(a,!0),a instanceof xi&&Z1(a,this))},Ee.gc=function(a,y){if(!Wc(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 Vn&&lf(this),ee=this.Ib;if(z){var re=this.Ib,oe=this.dc,ue=this.areaBackground,de=this.Ma;ue===null&&de===null||a.yc(),ue!==null&&(cl(this,a,ue,!0,!0,oe,re),ue instanceof Ca&&ue.type===pd?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(ue)):a.fillRect(re.x,re.y,re.width,re.height)),de!==null&&(cl(this,a,de,!0,!1,oe,re),de instanceof Ca&&de.type===pd?(a.beginPath(),a.rect(re.x,re.y,re.width,re.height),a.ng(de)):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&&lu(this),ue=this.part,oe=!1;var pe=0;ue&&y.Gf("drawShadows")&&(oe=ue.isShadowed)&&(de=ue.shadowOffset,pe=Math.max(de.y,de.x)*y.scale*y.Mb),de=this.Dd();var Se;if(!(Se=y.$i||!de)){var Pe=this.naturalBounds;Se=this.wh;var Le=Se.m11,De=Se.m21,qe=Se.dx,Ze=Se.m12,ct=Se.m22,ft=Se.dy,yt,kt=yt=0;Se=yt*Le+kt*De+qe;var Ut=yt*Ze+kt*ct+ft;yt=Pe.width+pe,kt=0;var gi=yt*Le+kt*De+qe;yt=yt*Ze+kt*ct+ft,kt=Math.min(Se,gi);var Qi=Math.min(Ut,yt),Gi=Math.max(Se+0,gi)-kt,Qn=Math.max(Ut+0,yt)-Qi;Se=kt,Ut=Qi,yt=Pe.width+pe,kt=Pe.height+pe,gi=yt*Le+kt*De+qe,yt=yt*Ze+kt*ct+ft,kt=Math.min(Se,gi),Qi=Math.min(Ut,yt),Gi=Math.max(Se+Gi,gi)-kt,Qn=Math.max(Ut+Qn,yt)-Qi,Se=kt,Ut=Qi,yt=0,kt=Pe.height+pe,gi=yt*Le+kt*De+qe,yt=yt*Ze+kt*ct+ft,kt=Math.min(Se,gi),Qi=Math.min(Ut,yt),Gi=Math.max(Se+Gi,gi)-kt,Qn=Math.max(Ut+Qn,yt)-Qi,Se=kt,Ut=Qi,pe=y.viewportBounds,Pe=pe.x,Le=pe.y,Se=!(Se>pe.width+Pe||Pe>Gi+Se||Ut>pe.height+Le||Le>Qn+Ut)}if(Se){if(Se=(this.l&256)!==0,a.clipInsteadOfFill&&(Se=!1),this instanceof Bs&&(a.font=this.font),Se){if(Ut=re.se()?re.naturalBounds:re.actualBounds,Gi=Math.max(ee.x,Ut.x),Qn=Math.max(ee.y,Ut.y),pe=Math.min(ee.right,Ut.right)-Gi,Pe=Math.min(ee.bottom,Ut.bottom)-Qn,Le=this.tb,Le!==null&&(Gi=Le.x,Qn=Le.y,pe=Le.width,Pe=Le.height),Gi>ee.width+ee.x||ee.x>Ut.width+Ut.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(Gi,Qn,pe,Pe),a.clip()}if(de){if(!ue.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}oe&&(Ut=ue.shadowOffset,a.Ev(Ut.x*y.scale*this.scale*y.Mb,Ut.y*y.scale*this.scale*y.Mb,ue.shadowBlur),Pu(a),a.shadowColor=ue.shadowColor)}oe&&this.shadowVisible===!0?Pu(a):oe&&this.shadowVisible===!1&&ac(a),ue=this.naturalBounds,this.areaBackground!==null&&(a.yc(),Hc(this,a,ue,ee)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),oe&&su(this,re)&&this.shadowVisible===null&&ac(a),this.Ma!==null&&(a.yc(),fc(this,a,ue,ee)),oe&&(this.Ma!==null||this.areaBackground!==null||su(this,re))?(sd(this,!0),this.shadowVisible===null&&ac(a)):sd(this,!1),this.hh(a,y),oe&&this.l&512&&Pu(a),de&&oe&&ac(a),Se&&(a.restore(),a.Vc(this instanceof Vn)),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 su(a,y){return y===null?!1:(lf(y)&&(y=y.panel),(y.l&512)!==0||(y.type===Vn.Auto||y.type===Vn.Spot)&&y.Pb()!==a)}Ee.Dv=function(){};function Hc(a,y,x,E){cl(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof Ca&&a.areaBackground.type===pd?(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 fc(a,y,x,E){var b=a.kq(),z=x.x,ee=x.y,re=x.width+b,oe=x.height+b;cl(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof Ca&&a.Ma.type===pd?(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 Ru(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===Vn.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 Wc(a,y,x){if(!(y instanceof Ja))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&&Ru(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),Pu(y),y.shadowColor=a.shadowColor}a instanceof Bs&&(y.font=a.font),y.yd=null;var ee=a.transform;z=a instanceof Vn;var re=a instanceof Vn?lf(a):!1;a.l&4096&&lu(a);var oe=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&re?(gd(y,1,0,0,1,0,0),a.svg=y.ad):z?(gd(y,ee.m11,ee.m12,ee.m21,ee.m22,ee.dx,ee.dy),a.svg=y.ad):gd(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var ue=ee.copy().Vj();y.rb.ha=[ue.m11,ue.m12,ue.m21,ue.m22,ue.dx,ue.dy],Hc(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]),fc(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],fc(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&&Pu(y),re&&a.shadowVisible===!0?Pu(y):re&&a.shadowVisible===!1&&ac(y),b=a.panel,re&&su(a,b)&&a.shadowVisible===null&&ac(y),y.Il&&(ue=x.computePixelRatio(),ue="drop-shadow("+y.shadowOffsetX/ue+"px "+y.shadowOffsetY/ue+"px "+y.shadowBlur/ue/2+"px "+y.shadowColor+")",a.background!==null&&ee.Ma.setAttributeNS(null,"filter",ue),a.areaBackground!==null&&ee.gd.setAttributeNS(null,"filter",ue)),re&&(a.Ma!==null||a.areaBackground!==null||su(a,b))?(sd(a,!0),a.shadowVisible===null&&ac(y)):sd(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,ue=a.svg,!z&&ue!==null&&re!==ue&&ue.parentNode===a.panel.svg?(a.svg.replaceWith(re),a.svg=re,re!==null&&a.$o(y,E,oe,re),rc(y,ue),!0):(a.svg=re,ee!==null&&re===null&&(ld(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&&Pu(y),a.Dd()&&ac(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&&Ru(a,E,re),ee!==null&&ee(a,re)),!0)}Ee.$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"+kl++,re=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:ee,height:x}),this instanceof Vn&&(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"),rc(a,E)};function rc(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function ju(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=gn(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()}}Ee.hh=function(){},Ee.lv=function(){this.Uc=!0},Ee.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 Vn?lf(this):!1;if(!(this instanceof Vn&&b))if(this instanceof Nc){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&vl(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",zu(a)):y.setAttributeNS(null,"transform",zu(a))}else if(!x||this instanceof Vn)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof bo){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],Hc(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&&sh(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(sh(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof Vn))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),fc(this,a,this.naturalBounds,this.actualBounds),y.Ma?(sh(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&&sh(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},Ee.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 cl(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===sf)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var ue=a.kq();if(re=z.width,oe=z.height,b?(re=ee.width,oe=ee.height):E||(re+=ue,oe+=ue),(z=y instanceof Ud)&&x.xe&&(x.type===lp||x.yk===re&&x.ft===oe))var de=x.xe;else{var pe=0,Se=0,Pe=0,Le=0,De=0,qe=0;if(qe=De=0,b?(De=ee.x,qe=ee.y):E||(De-=ue/2,qe-=ue/2),pe=x.start.x*re+x.start.offsetX,Se=x.start.y*oe+x.start.offsetY,Pe=x.end.x*re+x.end.offsetX,Le=x.end.y*oe+x.end.offsetY,pe+=De,Pe+=De,Se+=qe,Le+=qe,x.type===Wh)de=y.createLinearGradient(pe,Se,Pe,Le);else if(x.type===pd)qe=isNaN(x.endRadius)?Math.max(re,oe)/2:x.endRadius,isNaN(x.startRadius)?(De=0,qe=Math.max(re,oe)/2):De=x.startRadius,de=y.createRadialGradient(pe,Se,De,Pe,Le,qe);else if(x.type===lp)try{de=y.createPattern(x.pattern,"repeat")}catch(ct){de=null}if(x.type!==lp&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)de.addColorStop(b.key,b.value);if(z&&(x.xe=de,de!==null&&(x.yk=re,x.ft=oe),de===null&&x.type===lp&&x.yk!==-1)){x.yk=-1;var Ze=a.diagram;Ze!==null&&x.yk===-1&&wr(function(){Ze.redraw()},600)}}E?y.fillStyle=de:y.strokeStyle=de}}}Ee.rg=function(a){if(a instanceof Vn)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},Ee.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},Ee.If=function(){for(var a=this instanceof Vn?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function lu(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Ae(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)}Ae(a,!1),je(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,je(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,je(a,!1)))}Ee.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=tt.alloc();z.yi(y,x,E,b,pa),a.rotate(this.Kb,z.x,z.y),tt.free(z)}},Ee.v=function(a){if(!rt(this)){a===void 0&&(a=!1),it(this,!0),Ft(this,!0);var y=this.panel;y===null||a||y.v()}},Ee.Uj=function(){rt(this)||(it(this,!0),Ft(this,!0))};function ec(a){if(!vt(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof xi&&a.Bd(),y.$b())),Ft(a,!0)}}Ee.Uk=function(){!(this.l&2048)&&(Ae(this,!0),je(this,!0))},Ee.Wu=function(){je(this,!0)},Ee.N=function(){var a=this.part;a!==null&&a.N()};function oc(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===Vn.Table?Cd(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===Vn.Auto&&E.Pb()===a?uu(a,Hn,y):x===ao?E!==null?E.type===Vn.Spot&&E.Pb()===a?uu(a,Hn,y):(x=E.defaultStretch,x===ao?uu(a,Tn,y):uu(a,x,y)):uu(a,Tn,y):uu(a,x,y)}function Cd(a,y,x,E){var b=a.stretch;if(b!==ao)return uu(a,b,E);var z=b=null;switch(y.stretch){case Mr:z=!0;break;case Hn:z=!0}switch(x.stretch){case dr:b=!0;break;case Hn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===dr||y===Hn),z===null&&(z=y===Mr||y===Hn),b===!0&&z===!0?uu(a,Hn,E):b===!0?uu(a,dr,E):z===!0?uu(a,Mr,E):uu(a,Tn,E)}function uu(a,y,x){if(x)return y;if(y===Tn||(x=a.desiredSize,x.w()))return Tn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===dr)return Tn;if(y===Hn)return Mr}else{if(y===Mr)return Tn;if(y===Hn)return dr}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Mr)return Tn;if(y===Hn)return dr}else{if(y===dr)return Tn;if(y===Hn)return Mr}return y}function sd(a,y){a.l=y?a.l|512:a.l&-513}function ve(a){return(a.l&1024)!==0}function xe(a,y){a.l=y?a.l|1024:a.l&-1025}function Ae(a,y){a.l=y?a.l|2048:a.l&-2049}function je(a,y){a.l=y?a.l|4096:a.l&-4097}function rt(a){return(a.l&8192)!==0}function it(a,y){a.l=y?a.l|8192:a.l&-8193}function vt(a){return(a.l&16384)!==0}function Ft(a,y){a.l=y?a.l|16384:a.l&-16385}Ee.Gj=function(){this.svg=null},Ee.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},Ee.Av=function(){},Ee.zv=function(a){return this.pa=a,ec(this),!0},Ee.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},Ee.kq=function(){return 0};function qt(a){var y=a.part;if(y instanceof xi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Z1(y,a)}}function Sn(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof Vn?a instanceof xi?a.Bd():a.qm(a,function(x){qt(x)}):qt(a))}Ee.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Tl(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&f1(a)&&Wt("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new Un),this.localBindings.add(b),this},Ee.set=function(a){return Object.assign(this,a),this},Ee.Du=function(a){return an(this,a),this},Ee.apply=function(a){return a(this),this},Ee.nm=function(a){return gh(this,a),this},Ee.pz=function(){return this.ih()},Ee.ih=function(){for(var a=this instanceof Vn?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},Ee.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new sr),this.animationTriggers.add(a.propertyName,a),this};function cn(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=Ei.I(a);typeof z=="function"?(x=Pi(arguments),E=z(x),Zn(E)||Wt('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=Kt.go[a]}if(E===null&&(b!=null&&b.constructor||Wt("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 Gt&&1<x.length){z=E;var ee=x[1];(typeof ee=="string"||ee instanceof HTMLDivElement)&&(Ra(z,ee),b++)}for(;b<x.length;b++)z=x[b],z===void 0?Wt("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):an(E,z);return E}function an(a,y){if(typeof y=="string")if(a instanceof Bs)a.text=y;else if(a instanceof bo)a.figure=y;else if(a instanceof Nc)a.source=y;else if(a instanceof Vn)y=Od.I(y),y!==null&&(a.type=y);else if(a instanceof Ca){var x=Br(Ca,y);x!==null?a.type=x:Wt("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof dt?(y=Br(dt,y),y!==null&&(a.type=y)):a instanceof mr&&(y=Br(mr,y),y!==null&&(a.type=y));else if(y instanceof Dt)a instanceof Vn||Wt("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Kl){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 Kl?$m(E,y):Wt("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Qt)typeof a.qb=="function"&&a.qb(y);else if(y instanceof Jl)a.type=y;else if(y instanceof Tl)a instanceof Dt||a instanceof Kl?a.bind(y):Wt("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof Pl)a instanceof Dt?a.Jv(y):Wt("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Vr)a instanceof dt&&a.type===dt.o?a.figures.add(y):Wt("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof mr)a instanceof Vr?a.segments.add(y):Wt("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof qs)a instanceof Gt||a instanceof po?a.layout=y:Wt("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++)an(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof Ca){x=new to;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);gh(a,x)}else if(a instanceof Kl){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&Wt("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)&&Wt("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new to;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);gh(a,b)}else gh(a,y);else Wt('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function nn(a,y){Ei.add(a,y)}function Bn(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}dn.Object.defineProperties(Dt.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new Hr),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 Hr),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 Hr),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Ao(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&&(Ao(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:pc},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new eo),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===pc&&(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 eo),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 eo),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:il},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new eo),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:ao},set:function(a){var y=this.stretch;y!==a&&(Ao(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&&(Ao(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)&&pr(a,"0 <= value <= 1",Dt,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(ug(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(ug(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(),Sn(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&&Bf(a,"GraphObject.areaBackground"),a instanceof Ca&&a.freeze(),Ao(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&&Bf(a,"GraphObject.background"),a instanceof Ca&&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 xr)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 tt(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&&Wt("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,Sn(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 bo&&this.qc(),this.g("desiredSize",E,a),ve(this)&&(a=this.part,a!==null&&(Rs(this,a,"width"),Rs(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 Fn(a,this.jd.height).freeze(),this.v(),this instanceof bo&&this.qc(),this.g("desiredSize",y,a),ve(this)&&(a=this.part,a!==null&&Rs(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 Fn(this.jd.width,a).freeze(),this.v(),this instanceof bo&&this.qc(),this.g("desiredSize",y,a),ve(this)&&(a=this.part,a!==null&&Rs(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:Bo},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(),Ao(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:Al},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(),Ao(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 oo(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&&lu(this),this.Ab}},oe:{get:function(){return this.l&4096&&lu(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Ao(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Tn},set:function(a){this.reshapingBehavior!==a&&(Ao(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()&&Wt("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),ec(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&&pr(a,">= 0",Dt,"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&&pr(a,">= 1",Dt,"columnSpan"),Ao(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&&pr(a,">= 0",Dt,"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&&pr(a,">= 1",Dt,"rowSpan"),Ao(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&&(Ao(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 xi||Wt("Cannot set portID on a Link: "+a),y!==null&&x!==null&&$v(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:El},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),qt(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&pr(a,">= 0",Dt,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),qt(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),qt(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&&pr(a,">= 0",Dt,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:El},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),qt(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&pr(a,">= 0",Dt,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),qt(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),qt(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&&pr(a,">= 0",Dt,"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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(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&&(Ao(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Dt.prototype.trigger=Dt.prototype.Jv,Dt.prototype.findBindingPanel=Dt.prototype.ih,Dt.prototype.findTemplateBinder=Dt.prototype.pz,Dt.prototype.setProperties=Dt.prototype.nm,Dt.prototype.apply=Dt.prototype.apply,Dt.prototype.attach=Dt.prototype.Du,Dt.prototype.set=Dt.prototype.set,Dt.prototype.isEnabledObject=Dt.prototype.If,Dt.prototype.isVisibleObject=Dt.prototype.Ed,Dt.prototype.isContainedBy=Dt.prototype.rg,Dt.prototype.getNearestIntersectionPoint=Dt.prototype.rs,Dt.prototype.getLocalPoint=Dt.prototype.qs,Dt.prototype.getDocumentScale=Dt.prototype.Df,Dt.prototype.getDocumentAngle=Dt.prototype.li,Dt.prototype.getDocumentBounds=Dt.prototype.mi,Dt.prototype.getDocumentPoint=Dt.prototype.ga,Dt.prototype.intersectsRect=Dt.prototype.Yc,Dt.prototype.containedInRect=Dt.prototype.fh,Dt.prototype.containsRect=Dt.prototype.Re,Dt.prototype.containsPoint=Dt.prototype.ca,Dt.prototype.raiseChanged=Dt.prototype.g,Dt.prototype.raiseChangedEvent=Dt.prototype.cb,Dt.prototype.addCopyProperty=Dt.prototype.Vw;var Ei=null;Dt.className="GraphObject",Ei=new sr,nn("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=cn(Vn,Vn.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof Vn){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"},cn(bo,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new fr(0,0,2.76142374915397,2.761423749153969),spot2:new fr(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 Vn&&(x=E.fb("ButtonBorder"),x instanceof bo)){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 Vn&&(x=E.fb("ButtonBorder"),x instanceof bo&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof Vn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof bo){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 Vn&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof bo){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 Vn&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof bo){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 Vn&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof bo))){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}),nn("TreeExpanderButton",function(){var a=cn("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},cn(bo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ps},new Tl("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Tl("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof Fa&&(x=x.adornedPart),x instanceof xi){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}),nn("SubGraphExpanderButton",function(){var a=cn("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},cn(bo,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Ps},new Tl("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 Fa&&(x=x.adornedPart),x instanceof po){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}),nn("ToolTip",function(){return cn(Fa,Vn.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},cn(bo,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new fr(0,0,4,6),spot2:new fr(1,1,-4,-4)}))}),nn("ContextMenu",function(){return cn(Fa,Vn.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new tt(0,3),shadowBlur:5},new Tl("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),nn("ContextMenuButton",function(){var a=cn("Button");a.stretch=dr;var y=a.fb("ButtonBorder");return y instanceof bo&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new fr(0,0,2,3),y.spot2=new fr(1,1,-2,-2)),a}),nn("PanelExpanderButton",function(a){var y=Bn(a,"COLLAPSIBLE"),x=cn("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},cn(bo,{name:"ButtonIcon",strokeWidth:2},new Tl("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof bo&&(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}),nn("CheckBoxButton",function(a){var y=Bn(a);return a=cn("Button",{desiredSize:new Fn(14,14)},cn(bo,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:Hn,geometryStretch:ir,visible:!1},y!==""?new Tl("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof Vn){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}),nn("CheckBox",function(a){a=Bn(a),a=cn("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new oo(0,1,0,0)});var y=cn(Vn,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new oo(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}),Dt.None=Tn=new Qt(Dt,"None",0),Dt.Default=ao=new Qt(Dt,"Default",0),Dt.Vertical=Mr=new Qt(Dt,"Vertical",4),Dt.Horizontal=dr=new Qt(Dt,"Horizontal",5),Dt.Fill=Hn=new Qt(Dt,"Fill",3),Dt.Uniform=ir=new Qt(Dt,"Uniform",1),Dt.UniformToFill=qo=new Qt(Dt,"UniformToFill",2),Dt.FlipVertical=Mo=new Qt(Dt,"FlipVertical",1),Dt.FlipHorizontal=ga=new Qt(Dt,"FlipHorizontal",2),Dt.FlipBoth=is=new Qt(Dt,"FlipBoth",3),Dt.make=cn,Dt.getBuilders=function(){var a=new sr,y;for(y in Ei)if(y!==y.toLowerCase()){var x=Ei.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Dt.defineBuilder=nn,Dt.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Ei.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Dt))return y&&E.set(y),E;Wt('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Dt.takeBuilderArgument=Bn;function Hr(){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=Bo,this.o=Al,this.hg=ao,this.ob=this.Bi=1,this.Pf=Tn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}Hr.prototype.copy=function(){var a=new Hr;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 eo(){this.u=-1/0,this.o=0,this.F=il,this.rr=pc,this.j=this.V="None"}eo.prototype.copy=function(){var a=new eo;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},eo.className="LinkElementSettings";function So(){this.yj=this.Xi=qi,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}So.prototype.copy=function(){var a=new So;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},So.className="LinkSettings";function Zo(){this.ha=[1,0,0,1,0,0]}Zo.prototype.copy=function(){var a=new Zo;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},Zo.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},Zo.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},Zo.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)}},Zo.className="STransform";function ya(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}ya.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},ya.className="SGradient";function ua(a,y,x){this.ownerDocument=a=y===void 0?Kt.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 Ja(this,x)}ua.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},ua.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Zn(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},ua.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},ua.prototype.focus=function(){this.Oa.focus()},ua.prototype.mx=function(){this.ownerDocument=null},dn.Object.defineProperties(ua.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}}}),ua.className="SVGSurface";function Ja(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 Zo,this.j=ld(this),this.Nj=ld(this,"gojs-diagram"),this.Hl=this.ti=null;var x=kl++,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 Hs(a,y,x,E,b,z,ee){a.Nj===void 0?gd(a,y,x,E,b,z,ee):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+ee+")")}Ee=Ja.prototype,Ee.arc=function(a,y,x,E,b,z,ee,re){var oe=2*Math.PI,ue=oe-1e-6,de=x*Math.cos(E),pe=x*Math.sin(E),Se=a+de,Pe=y+pe,Le=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(ee-Se)||1e-6<Math.abs(re-Pe))&&this.path.push(["L",Se,+Pe]),0>E&&(E=E%oe+oe),E>ue?(this.path.push(["A",x,x,0,1,Le,a-de,y-pe]),this.path.push(["A",x,x,0,1,Le,Se,Pe])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Le,a+x*Math.cos(b),y+x*Math.sin(b)])},Ee.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},Ee.Se=function(a){this.addPath(this.path,this.rb,a||0)},Ee.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},Ee.clearRect=function(){},Ee.clip=function(){this.Yl.clipPath=!0},Ee.closePath=function(){this.path.push(["z"])},Ee.createLinearGradient=function(a,y,x,E){var b=new ya("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},Ee.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"+kl++,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(zh,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},Ee.createRadialGradient=function(a,y,x,E,b,z){var ee=new ya("radial");return ee.x1=a,ee.y1=y,ee.r1=x,ee.x2=E,ee.y2=b,ee.r2=z,ee};function vl(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)}Ee.drawImage=function(a,y,x,E,b,z,ee,re,oe){var ue="";a instanceof HTMLCanvasElement&&(ue=a.toDataURL()),a instanceof HTMLImageElement&&(ue=a.getAttribute("src"));var de=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,ee=x,re=E=de,oe=b=a),E=E||0,b=b||0,re=re||0,oe=oe||0,vl(this,y,x,E,b,z||0,ee||0,re,oe),z={x:0,y:0,width:de||E,height:a||b,href:ue},ze.$(E,re)&&ze.$(b,oe)?ue.toLowerCase().indexOf(".svg")===-1&&ue.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==de||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),dl(this,zh,z,this.rb),this.addElement(zh,z)},Ee.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),Du(this,this.Yl)},Ee.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},Ee.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},dl(this,"fill",a,this.rb),this.addElement("rect",a)},Ee.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},dl(this,"fill",a,this.rb),Du(this,a),this.svg.prepend(this.Ud("rect",a))},Ee.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},dl(this,"fill",y,this.rb),this.addElement("text",y,a[0])},Ee.lineTo=function(a,y){this.path.push(["L",a,y])},Ee.moveTo=function(a,y){this.path.push(["M",a,y])},Ee.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},Ee.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"])},Ee.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},Ee.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())},Ee.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||gd(this,a,y,x,E,b,z)};function zu(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}Ee.scale=function(a,y){this.rb.scale(a,y)},Ee.translate=function(a,y){this.rb.translate(a,y)},Ee.transform=function(){},Ee.yc=function(){},Ee.stroke=function(){Zc(this,this.Yl)},Ee.jk=function(){this.clipInsteadOfFill||this.stroke()},Ee.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},Ee.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 dl(a,y,x,E){y==="fill"?Du(a,x):y==="stroke"&&Zc(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function Du(a,y){a.fillStyle instanceof ya?y.fill=Vd(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 Mc(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof ya?y.setAttributeNS(null,"fill",Vd(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 Zc(a,y){if(a.strokeStyle instanceof ya)y.stroke=Vd(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 Vd(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"+kl++,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(ue,de){return ue.offset>de.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}Ee.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=Pi(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,dl(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 gd(a,y,x,E,b,z,ee){var re=new Zo;re.ha=[y,x,E,b,z,ee],y={},dl(a,"g",y,re),re=a.addElement("g",y),a.nh.push(re)}function ld(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}Ee.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function ac(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function Pu(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}Ee.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},Ee.fs=function(){this.Ct=!1},Ee.Vc=function(){},Ee.Wx=function(){},Ja.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Ja.prototype.getImageData=function(){return null},Ja.prototype.measureText=function(){return null};function sh(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()))}Ja.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Ja.className="SVGContext",Gt.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new ua(this,Kt.document));var y=new ua(this,Kt.document,!0);a===void 0&&(a=new to);var x=this;return Ih(this,function(E,b){return E=tp(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Gt.prototype.makeSvg=Gt.prototype.Cs,Gt.prototype.av=function(a){return this.Cs(a)},Gt.prototype.makeSVG=Gt.prototype.av;function Tu(a,y,x,E){this.ownerDocument=y=y===void 0?Kt.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new Ud(y,x,E),y.H=a}Tu.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},Tu.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Tu.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Tu.prototype.focus=function(){this.Oa.focus()},Tu.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},dn.Object.defineProperties(Tu.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}}}),Tu.className="CanvasSurface";function Ud(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&Wt("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 St,this.isTemporary=!!x}Ee=Ud.prototype,Ee.Wx=function(a){this.Z.imageSmoothingEnabled=a},Ee.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},Ee.beginPath=function(){this.Z.beginPath()},Ee.Se=function(){},Ee.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},Ee.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},Ee.clip=function(){this.Z.clip()},Ee.closePath=function(){this.Z.closePath()},Ee.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},Ee.createPattern=function(a,y){return this.Z.createPattern(a,y)},Ee.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},Ee.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)},Ee.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},Ee.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ee.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},Ee.fillText=function(a,y,x){this.Z.fillText(a,y,x)},Ee.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},Ee.lineTo=function(a,y){this.Z.lineTo(a,y)},Ee.measureText=function(a){return this.Z.measureText(a)},Ee.moveTo=function(a,y){this.Z.moveTo(a,y)},Ee.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},Ee.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},Ee.restore=function(){this.Z.restore()},Ee.save=function(){this.yc(),this.Z.save()},Ud.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},Ee=Ud.prototype,Ee.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},Ee.scale=function(a,y){this.El.scale(a,y)},Ee.translate=function(a,y){this.El.translate(a,y)},Ee.stroke=function(){this.Z.stroke()},Ee.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}},Ee.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},Ee.ng=function(a,y){if(a instanceof Ca&&a.type===pd){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)},Ee.jk=function(){this.Hm||this.stroke()},Ee.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},Ee.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},Ee.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Nf),a.lineDashOffset=0)},Ee.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},Ee.Hs=function(){},dn.Object.defineProperties(Ud.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 Nf=Object.freeze([]);Ud.className="CanvasSurfaceContext";function Kd(){this.F=this.o=this.u=this.j=0}Kd.className="ColorNumbers";function Ca(a,y){sp||(ap(),sp=!0),_a(this),this._isFrozen=!1,a===void 0?(this.na=sf,this.xk="black"):typeof a=="string"?(this.na=sf,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===Wh?(this.Qd=Qu,this.Lk=tn):this.Lk=a===pd?this.Qd=pa:this.Qd=El,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}Ca.prototype.copy=function(){var a=new Ca;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},Ee=Ca.prototype,Ee.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},Ee.ka=function(){return Object.isFrozen(this)&&Wt("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},Ee.qb=function(a){a.classType===Ca&&(this.type=a)},Ee.toString=function(){var a="Brush(";if(this.type===sf)a+=this.color;else if(a=this.type===Wh?a+"Linear ":this.type===pd?a+"Radial ":this.type===lp?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+")"},Ee.addColorStop=function(a,y){return this._isFrozen&&Yi(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&pr(a,"0 <= loc <= 1",Ca,"addColorStop:loc"),this.we===null&&(this.we=new sr),this.we.add(a,y),this.na===sf&&(this.type=Wh),this.xe=null,this},Ee.Vz=function(a,y){if(this._isFrozen&&Yi(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===sf)ud(this.color),this.color=Hh(a,y);else if((this.type===Wh||this.type===pd)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)ud(x.value),this.addColorStop(x.key,Hh(a,y));return this};function af(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,ud(a),Hh(y,x)}Ee.Wy=function(a,y){if(this._isFrozen&&Yi(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?up:y,this.type===sf)ud(this.color),this.color=Hh(-a,y);else if((this.type===Wh||this.type===pd)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)ud(x.value),this.addColorStop(x.key,Hh(-a,y));return this};function Ng(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?up:x,ud(a),Hh(-y,x)}function Yd(a,y,x){ud(a),a=Ss.j;var E=Ss.u,b=Ss.o,z=Ss.F;return ud(y),x===void 0&&(x=.5),"rgba("+Math.round((Ss.j-a)*x+a)+", "+Math.round((Ss.u-E)*x+E)+", "+Math.round((Ss.o-b)*x+b)+", "+Math.round((Ss.F-z)*x+z)+")"}Ee.Gx=function(){if(this.type===sf)return Eh(this.color);if((this.type===Wh||this.type===pd)&&this.colorStops!==null){var a=this.colorStops;if(this.type===pd)return Eh(a.first().value);if(a.get(.5)!==null)return Eh(a.get(.5));if(a.count===2)return a=a.Fa(),Eh(Yd(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,Eh(Yd(a.get(x),a.get(E),1-z/b))}return!1};function Eh(a){return a?a instanceof Ca?a.Gx():(ud(a),128>(299*Ss.j+587*Ss.u+114*Ss.o)/1e3):!1}function Hh(a,y){switch(y){case up:y=100*og(Ss.j);var x=100*og(Ss.u),E=100*og(Ss.o);return bu.j=.4124564*y+.3575761*x+.1804375*E,bu.u=.2126729*y+.7151522*x+.072175*E,bu.o=.0193339*y+.119192*x+.9503041*E,bu.F=Ss.F,y=Wp(bu.j/Df[0]),x=Wp(bu.u/Df[1]),E=Wp(bu.o/Df[2]),bd.j=116*x-16,bd.u=500*(y-x),bd.o=200*(x-E),bd.F=bu.F,bd.j=Math.min(100,Math.max(0,bd.j+100*a)),a=(bd.j+16)/116,y=a-bd.o/200,bu.j=Df[0]*Bg(bd.u/500+a),bu.u=Df[1]*(bd.j>kf*kg?Math.pow(a,3):bd.j/kf),bu.o=Df[2]*Bg(y),bu.F=bd.F,a=-.969266*bu.j+1.8760108*bu.u+.041556*bu.o,y=.0556434*bu.j+-.2040259*bu.u+1.0572252*bu.o,Ss.j=255*op((3.2404542*bu.j+-1.5371385*bu.u+-.4985314*bu.o)/100),Ss.u=255*op(a/100),Ss.o=255*op(y/100),Ss.F=bu.F,Ss.j=Math.round(Ss.j),255<Ss.j?Ss.j=255:0>Ss.j&&(Ss.j=0),Ss.u=Math.round(Ss.u),255<Ss.u?Ss.u=255:0>Ss.u&&(Ss.u=0),Ss.o=Math.round(Ss.o),255<Ss.o?Ss.o=255:0>Ss.o&&(Ss.o=0),"rgba("+Ss.j+", "+Ss.u+", "+Ss.o+", "+Ss.F+")";case i1:return rg(),Vc.o=Math.min(100,Math.max(0,Vc.o+100*a)),"hsla("+Vc.j+", "+Vc.u+"%, "+Vc.o+"%, "+Vc.F+")";default:Wt("Unknown color space: "+y)}}function ud(a){sp||(ap(),sp=!0);var y=Dg;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,Ss.j=a[0],Ss.u=a[1],Ss.o=a[2],Ss.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Ss.j=0,Ss.u=0,Ss.o=0,Ss.F=1)}}function rg(){var a=Ss.j/255,y=Ss.u/255,x=Ss.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))}Vc.j=Math.round(ee),Vc.u=Math.round(100*a),Vc.o=Math.round(100*b),Vc.F=Ss.F}function og(a){return a/=255,.04045>=a?a/12.92:Math.pow((a+.055)/1.055,2.4)}function op(a){return .0031308>=a?12.92*a:1.055*Math.pow(a,1/2.4)-.055}function Wp(a){return a>kg?Math.pow(a,1/3):(kf*a+16)/116}function Bg(a){var y=a*a*a;return y>kg?y:(116*a-16)/kf}function Bf(a,y){typeof a!="string"&&(a instanceof Ca||Wt("Value for "+y+" must be a color string or a Brush, not "+a))}function ap(){Dg=ul?new Tu(null,void 0,{willReadFrequently:!0}).context:null}dn.Object.defineProperties(Ca.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&Yi(this,a),this.na=a,this.start.Mc()&&(a===Wh?this.start=Qu:a===pd&&(this.start=pa)),this.end.Mc()&&(a===Wh?this.end=tn:a===pd&&(this.end=pa)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&Yi(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&Yi(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&Yi(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&Yi(this,a),0>a&&pr(a,">= zero",Ca,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&Yi(this,a),0>a&&pr(a,">= zero",Ca,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&Yi(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&Yi(this,a),this.cr=a,this.xe=null}}}),Ca.prototype.isDark=Ca.prototype.Gx,Ca.prototype.darkenBy=Ca.prototype.Wy,Ca.prototype.lightenBy=Ca.prototype.Vz,Ca.prototype.addColorStop=Ca.prototype.addColorStop;var kg=216/24389,kf=24389/27,Df=[95.047,100,108.883],Dg=null,Ss=new Kd,Vc=new Kd,bu=new Kd,bd=new Kd,sp=!1;Ca.className="Brush";var sf;Ca.Solid=sf=new Qt(Ca,"Solid",0);var Wh;Ca.Linear=Wh=new Qt(Ca,"Linear",1);var pd;Ca.Radial=pd=new Qt(Ca,"Radial",2);var lp;Ca.Pattern=lp=new Qt(Ca,"Pattern",4);var up;Ca.Lab=up=new Qt(Ca,"Lab",5);var i1;Ca.HSL=i1=new Qt(Ca,"HSL",6),Ca.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},Ca.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;sp||(ap(),sp=!0);var y=Dg;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)},Ca.lighten=function(a){return af(a)},Ca.lightenBy=af,Ca.darken=function(a){return Ng(a)},Ca.darkenBy=Ng,Ca.mix=Yd,Ca.isDark=Eh;function Jl(){this.xa="Base"}Jl.prototype.measure=function(){},Jl.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},Jl.prototype.arrange=function(){},Jl.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},Jl.prototype.iA=function(a){a.Uj()},Jl.prototype.gc=function(){},dn.Object.defineProperties(Jl.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return Vn}}}),Jl.prototype.remeasureObject=Jl.prototype.iA,Jl.prototype.arrangeElement=Jl.prototype.Ly,Jl.prototype.measureElement=Jl.prototype.Yz,Jl.className="PanelLayout";function Rm(){this.xa="Base"}It(Rm,Jl),Rm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length;a=Zh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===a){var de=ue.margin,pe=de.right+de.left;de=de.top+de.bottom,ue.measure(y,x,z,ee);var Se=ue.measuredBounds;pe=Math.max(Se.width+pe,0),de=Math.max(Se.height+de,0),Se=ue.position.x;var Pe=ue.position.y;isFinite(Se)||(Se=0),isFinite(Pe)||(Pe=0),ue instanceof bo&&ue.isGeometryPositioned&&(ue=ue.strokeWidth/2,Se-=ue,Pe-=ue),Ws(b,Se,Pe,pe,de)}}},Rm.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,ue=z.position.y;if(oe=isNaN(oe)?-a:oe-a,ue=isNaN(ue)?-x:ue-x,z instanceof bo&&z.isGeometryPositioned){var de=z.strokeWidth/2;oe-=de,ue-=de}z.visible&&z.arrange(oe+re.left,ue+re.top,ee.width,ee.height)}};function jm(){this.xa="Base"}It(jm,Jl),jm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length;y=Ar(),z=Zh(a);for(var oe=0;oe<re;oe++){var ue=E[oe];if(ue.visible||ue===z){var de=oc(ue,!1);if(de!==Tn&&de!==dr)y.push(ue);else{ue.measure(1/0,x,0,ee),de=ue.margin,ue=ue.measuredBounds;var pe=Math.max(ue.height+de.top+de.bottom,0);b.width+=Math.max(ue.width+de.right+de.left,0),b.height=Math.max(b.height,pe)}}}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)&&(de=oe.margin,re=de.right+de.left,de=de.top+de.bottom,oe.measure(1/0,x,0,ee),oe=oe.measuredBounds,de=Math.max(oe.height+de,0),b.width+=Math.max(oe.width+re,0),b.height=Math.max(b.height,de));br(y)},jm.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 ue=z,de=y[oe];if(de.visible){var pe=de.measuredBounds,Se=de.margin,Pe=Se.top+Se.bottom,Le=z+b.bottom,De=pe.height,qe=oc(de,!1);(isNaN(de.desiredSize.height)&&qe===Hn||qe===Mr)&&(De=Math.max(x.height-Pe-Le,0)),Pe=De+Pe+Le,Le=de.alignment,Le.Xb()&&(Le=a.defaultAlignment),Le.sb()||(Le=pa),ee&&(re-=pe.width+Se.left+Se.right),de.arrange(re+Le.offsetX+Se.left,ue+Le.offsetY+Se.top+(x.height*Le.y-Pe*Le.y),pe.width,De),ee||(re+=pe.width+Se.left+Se.right)}}};function zm(){this.xa="Base"}It(zm,Jl),zm.prototype.measure=function(a,y,x,E,b,z){var ee=E.length;x=Ar();for(var re=Zh(a),oe=0;oe<ee;oe++){var ue=E[oe];if(ue.visible||ue===re){var de=oc(ue,!1);if(de!==Tn&&de!==Mr)x.push(ue);else{var pe=ue.margin;de=pe.right+pe.left,pe=pe.top+pe.bottom,ue.measure(y,1/0,z,0),ue=ue.measuredBounds,Gl(b,Math.max(b.width,Math.max(ue.width+de,0)),b.height+Math.max(ue.height+pe,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)&&(ue=oe.margin,ee=ue.right+ue.left,ue=ue.top+ue.bottom,oe.measure(y,1/0,z,0),oe=oe.measuredBounds,ue=Math.max(oe.height+ue,0),b.width=Math.max(b.width,Math.max(oe.width+ee,0)),b.height+=ue);br(x)}},zm.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 ue=z,de=y[oe];if(de.visible){var pe=de.measuredBounds,Se=de.margin,Pe=Se.left+Se.right,Le=z+b.right,De=pe.width,qe=oc(de,!1);(isNaN(de.desiredSize.width)&&qe===Hn||qe===dr)&&(De=Math.max(x.width-Pe-Le,0)),Pe=De+Pe+Le,Le=de.alignment,Le.Xb()&&(Le=a.defaultAlignment),Le.sb()||(Le=pa),ee&&(re-=pe.height+Se.bottom+Se.top),de.arrange(ue+Le.offsetX+Se.left+(x.width*Le.x-Pe*Le.x),re+Le.offsetY+Se.top,De,pe.height),ee||(re+=pe.height+Se.bottom+Se.top)}}};function Gm(){this.xa="Base"}It(Gm,Jl),Gm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length,oe=a.Pb(),ue=oe.margin,de=ue.right+ue.left,pe=ue.top+ue.bottom;oe.measure(y,x,z,ee);var Se=oe.measuredBounds;z=Se.width,ee=Se.height;var Pe=Math.max(z+de,0),Le=Math.max(ee+pe,0),De=a.isClipping,qe=ln.allocAt(-ue.left,-ue.top,Pe,Le),Ze=ln.allocAt(0,0,z,ee);Ev(oe,Ze,!0),z=Ze.width,ee=Ze.height;for(var ct=!0,ft=Zh(a),yt=0;yt<re;yt++){var kt=E[yt];Se=y;var Ut=x;if(kt!==oe&&(kt.visible||kt===ft)){ue=kt.margin;var gi=ue.left,Qi=ue.top;switch(Pe=ue.right+ue.left,Le=ue.top+ue.bottom,ue=oc(kt,!1),ue){case Hn:Se=z,Ut=ee,Qi=gi=Le=Pe=0;break;case dr:Se=z,gi=Pe=0;break;case Mr:Ut=ee,Qi=Le=0}kt.measure(Se,Ut,0,0),Se=kt.measuredBounds,Pe=Math.max(Se.width+Pe,0),Le=Math.max(Se.height+Le,0),ue=kt.alignment,ue.Xb()&&(ue=a.defaultAlignment),ue.sb()||(ue=pa);var Gi=kt.alignmentFocus;if(Gi.Xb()&&(Gi=pa),Ut=null,kt instanceof Vn&&kt.$e!==""&&(Ut=kt.fb(kt.$e),Ut===kt&&(Ut=null)),gi=Ze.x-gi,Qi=Ze.y-Qi,Ut!==null){for(kt.arrange(0,0,Se.width,Se.height),Se=Ut.actualBounds,Se=tt.allocAt(Se.x+(Gi.x*Se.width-Gi.offsetX),Se.y+(Gi.y*Se.height-Gi.offsetY)),Ut=Ut.panel;Ut!==kt;)Ut.transform.Ga(Se),Ut=Ut.panel;gi+=ue.x*z+ue.offsetX-Se.x,Qi+=ue.y*ee+ue.offsetY-Se.y,tt.free(Se)}else gi+=ue.x*z+ue.offsetX-(Gi.x*Se.width+Gi.offsetX),Qi+=ue.y*ee+ue.offsetY-(Gi.y*Se.height+Gi.offsetY);ct?(ct=!1,b.h(gi,Qi,Pe,Le)):Ws(b,gi,Qi,Pe,Le)}}switch(ct?b.assign(qe):De?b.Uu(Ze.x,Ze.y,Ze.width,Ze.height):Ws(b,qe.x,qe.y,qe.width,qe.height),ln.free(qe),ln.free(Ze),ue=oe.stretch,ue===ao&&(ue=oc(oe,!1)),ue){case Tn:return;case Hn:if(!isFinite(y)&&!isFinite(x))return;break;case dr:if(!isFinite(y))return;break;case Mr:if(!isFinite(x))return}for(Se=oe.measuredBounds,z=Se.width,ee=Se.height,Pe=Math.max(z+de,0),Le=Math.max(ee+pe,0),ue=oe.margin,Ze=ln.allocAt(-ue.left,-ue.top,Pe,Le),Ev(oe,Ze,!0),z=Ze.width,ee=Ze.height,y=0;y<re;y++)x=E[y],x===oe||!x.visible&&x!==ft||(ue=x.margin,Pe=ue.right+ue.left,Le=ue.top+ue.bottom,Se=x.measuredBounds,Pe=Math.max(Se.width+Pe,0),Le=Math.max(Se.height+Le,0),de=x.alignment,de.Xb()&&(de=a.defaultAlignment),de.sb()||(de=pa),x=x.alignmentFocus,x.Xb()&&(x=pa),ct?(ct=!1,b.h(de.x*z+de.offsetX-(x.x*Se.width+x.offsetX)-ue.left,de.y*ee+de.offsetY-(x.y*Se.height+x.offsetY)-ue.top,Pe,Le)):Ws(b,de.x*z+de.offsetX-(x.x*Se.width+x.offsetX)-ue.left,de.y*ee+de.offsetY-(x.y*Se.height+x.offsetY)-ue.top,Pe,Le));ct?b.assign(qe):De?b.Uu(Ze.x,Ze.y,Ze.width,Ze.height):Ws(b,qe.x,qe.y,qe.width,qe.height),ln.free(Ze)},Gm.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 ue=z-x.x,de=oe-x.y;for(b.arrange(ue,de,ee,re),ee=ln.allocAt(0,0,ee,re),Ev(b,ee,!1),re=0;re<E;re++){var pe=y[re];if(pe!==b){ue=pe.measuredBounds;var Se=ue.width,Pe=ue.height;de=pe.alignment,de.Xb()&&(de=a.defaultAlignment),de.sb()||(de=pa);var Le=pe.alignmentFocus;if(Le.Xb()&&(Le=pa),ue=null,pe instanceof Vn&&pe.$e!==""&&(ue=pe.fb(pe.$e),ue===pe&&(ue=null)),ue!==null){var De=ue.actualBounds;for(Le=tt.allocAt(De.x+(Le.x*De.width-Le.offsetX),De.y+(Le.y*De.height-Le.offsetY)),ue=ue.panel;ue!==pe;)ue.transform.Ga(Le),ue=ue.panel;ue=de.x*ee.width+de.offsetX-Le.x,de=de.y*ee.height+de.offsetY-Le.y,tt.free(Le)}else ue=de.x*ee.width+de.offsetX-(Le.x*Se+Le.offsetX),de=de.y*ee.height+de.offsetY-(Le.y*Pe+Le.offsetY);ue+=ee.x-x.x,de+=ee.y-x.y,pe.visible&&pe.arrange(z+ue,oe+de,Se,Pe)}}ln.free(ee)};function Ev(a,y,x){var E=null;if(a instanceof Vn&&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 Hm(){this.xa="Base"}It(Hm,Jl),Hm.prototype.measure=function(a,y,x,E,b,z,ee){var re=E.length,oe=a.Pb(),ue=oe.margin,de=y,pe=x,Se=ue.right+ue.left,Pe=ue.top+ue.bottom;oe.measure(y,x,z,ee),ue=oe.measuredBounds;var Le=0,De=null;oe instanceof bo&&(De=oe,Le=De.strokeWidth*De.scale);var qe=Math.max(ue.width+Se,0);ue=Math.max(ue.height+Pe,0);var Ze=Lv(oe),ct=Ze.x*qe+Ze.offsetX;Ze=Ze.y*ue+Ze.offsetY;var ft=Mv(oe),yt=ft.x*qe+ft.offsetX;for(ft=ft.y*ue+ft.offsetY,isFinite(y)&&(de=Math.max(Math.abs(ct-yt)-Le,0)),isFinite(x)&&(pe=Math.max(Math.abs(Ze-ft)-Le,0)),Le=Fn.alloc(),Le.h(0,0),a=Zh(a),ft=0;ft<re;ft++)Ze=E[ft],Ze===oe||!Ze.visible&&Ze!==a||(ue=Ze.margin,qe=ue.right+ue.left,ct=ue.top+ue.bottom,Ze.measure(de,pe,0,0),ue=Ze.measuredBounds,qe=Math.max(ue.width+qe,0),ue=Math.max(ue.height+ct,0),Le.h(Math.max(qe,Le.width),Math.max(ue,Le.height)));if(re===1)b.width=qe,b.height=ue,Fn.free(Le);else{switch(Ze=Lv(oe),ft=Mv(oe),re=E=0,ft.x!==Ze.x&&ft.y!==Ze.y&&(E=Le.width/Math.abs(ft.x-Ze.x),re=Le.height/Math.abs(ft.y-Ze.y)),Fn.free(Le),Le=0,De!==null&&(Le=De.strokeWidth*De.scale,Tv(De)===ir&&(E=re=Math.max(E,re))),E+=Math.abs(Ze.offsetX)+Math.abs(ft.offsetX)+Le,re+=Math.abs(Ze.offsetY)+Math.abs(ft.offsetY)+Le,De=oe.stretch,De===ao&&(De=oc(oe,!1)),De){case Tn:ee=z=0;break;case Hn:isFinite(y)&&(E=y),isFinite(x)&&(re=x);break;case dr:isFinite(y)&&(E=y),ee=0;break;case Mr:z=0,isFinite(x)&&(re=x)}oe.Uj(),oe.measure(E,re,z,ee),b.width=oe.measuredBounds.width+Se,b.height=oe.measuredBounds.height+Pe}},Hm.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=ln.alloc();z.h(0,0,1,1);var ee=E.margin,re=ee.left;ee=ee.top;var oe=a.padding,ue=oe.left;oe=oe.top,E.arrange(ue+re,oe+ee,b.width,b.height);var de=Lv(E),pe=Mv(E),Se=de.y*b.height+de.offsetY,Pe=pe.x*b.width+pe.offsetX;for(pe=pe.y*b.height+pe.offsetY,z.x=de.x*b.width+de.offsetX,z.y=Se,Ws(z,Pe,pe,0,0),z.x+=re+ue,z.y+=ee+oe,b=0;b<x;b++)re=y[b],re!==E&&(ue=re.measuredBounds,ee=re.margin,oe=Math.max(ue.width+ee.right+ee.left,0),de=Math.max(ue.height+ee.top+ee.bottom,0),Se=re.alignment,Se.Xb()&&(Se=a.defaultAlignment),Se.sb()||(Se=pa),oe=z.width*Se.x+Se.offsetX-oe*Se.x+ee.left+z.x,ee=z.height*Se.y+Se.offsetY-de*Se.y+ee.top+z.y,re.visible&&(Oa(z.x,z.y,z.width,z.height,oe,ee,ue.width,ue.height)?re.arrange(oe,ee,ue.width,ue.height):re.arrange(oe,ee,ue.width,ue.height,new ln(z.x,z.y,z.width,z.height))));ln.free(z)};function Wm(){this.xa="Base",this.name="Table"}It(Wm,Jl),Wm.prototype.measure=function(a,y,x,E,b){for(var z=E.length,ee=Ar(),re=Ar(),oe=0;oe<z;oe++){var ue=E[oe],de=ue instanceof Vn?ue:null;if(de!==null&&lf(de)&&ue.visible){re.push(de);for(var pe=de.O.s,Se=pe.length,Pe=0;Pe<Se;Pe++){var Le=pe[Pe];de.type===Vn.TableRow?Le.row=ue.row:de.type===Vn.TableColumn&&(Le.column=ue.column),ee.push(Le)}}else ee.push(ue)}z=ee.length,z===0&&(a.Fb(0),a.Eb(0));for(var De=[],qe=0;qe<z;qe++){var Ze=ee[qe];Ze.visible&&(it(Ze,!0),Ft(Ze,!0),De[Ze.row]||(De[Ze.row]=[]),De[Ze.row][Ze.column]||(De[Ze.row][Ze.column]=[]),De[Ze.row][Ze.column].push(Ze))}br(ee);var ct=Ar(),ft=Ar(),yt=Ar(),kt={count:0},Ut={count:0},gi=y,Qi=x,Gi=a.rowDefs,Qn=a.colDefs,An=null;z=Gi.length;for(var so=0;so<z;so++)An=Gi[so],An!==void 0&&(An.actual=0);z=Qn.length;for(var Wr=0;Wr<z;Wr++)An=Qn[Wr],An!==void 0&&(An.actual=0);for(var Ta=De.length,As=0,cu=0;cu<Ta;cu++)De[cu]&&(As=Math.max(As,De[cu].length));var yu=Math.min(a.topIndex,Ta-1),sc=Math.min(a.leftIndex,As-1),du=0;Ta=De.length;for(var yf=Zh(a),_l=0;_l<Ta;_l++)if(De[_l]){As=De[_l].length;var qd=a.Fb(_l);qd.actual=0;for(var lc=qd.oc=0;lc<As;lc++)if(De[_l][lc]){var Sf=a.Eb(lc);ct[lc]===void 0&&(Sf.actual=0,Sf.oc=0,ct[lc]=!0);for(var hd=De[_l][lc],Ad=hd.length,nd=0;nd<Ad;nd++){var Kc=hd[nd];if(Kc.visible||Kc===yf){var Kf=1<Kc.rowSpan||1<Kc.columnSpan;Kf&&(_l<yu||lc<sc||ft.push(Kc));var eh=Kc.margin,kp=eh.right+eh.left,id=eh.top+eh.bottom,uc=Cd(Kc,qd,Sf,!1),Nm=Kc.desiredSize,Vg=!isNaN(Nm.height),ch=!isNaN(Nm.width)&&Vg;if(Kf||uc===Tn||ch||_l<yu||lc<sc||(kt[lc]!==void 0||uc!==Hn&&uc!==dr||(kt[lc]=-1,kt.count++),Ut[_l]!==void 0||uc!==Hn&&uc!==Mr||(Ut[_l]=-1,Ut.count++),yt.push(Kc)),Kc.measure(1/0,1/0,0,0),!(_l<yu||lc<sc)){var Yc=Kc.measuredBounds,gg=Math.max(Yc.width+kp,0),rd=Math.max(Yc.height+id,0);if(Kc.rowSpan===1&&(uc===Tn||uc===dr)){An=a.Fb(_l);var Yf=An.Wc();du=Math.max(rd-An.actual,0),du+Yf>Qi&&(du=Math.max(Qi-Yf,0));var hv=An.oa===0;An.oc=An.oc+du,An.actual=An.oa+du,Qi=Math.max(Qi-(du+(hv?Yf:0)),0)}if(Kc.columnSpan===1&&(uc===Tn||uc===Mr)){An=a.Eb(lc);var Bm=An.Wc();du=Math.max(gg-An.actual,0),du+Bm>gi&&(du=Math.max(gi-Bm,0));var Qy=An.oa===0;An.oc=An.oc+du,An.actual=An.oa+du,gi=Math.max(gi-(du+(Qy?Bm:0)),0)}Kf&&Kc.Uj()}}}}}br(ct);var kh=0,Kh=0;z=a.columnCount;for(var Ug=0;Ug<z;Ug++){var Xf=Qn[Ug];Xf!==void 0&&(kh+=isNaN(Xf.Hc)?Xf.oc:Xf.Hc,Xf.oc!==0&&(kh+=Xf.Wc()))}z=a.rowCount;for(var Dp=0;Dp<z;Dp++){var Qf=Gi[Dp];Qf!==void 0&&(Kh+=isNaN(Qf.Hc)?Qf.oc:Qf.Hc,Qf.oc!==0&&(Kh+=Qf.Wc()))}gi=Math.max(y-kh,0);var Dh=Qi=Math.max(x-Kh,0),xf=gi;z=yt.length;for(var Xc=0;Xc<z;Xc++){var dh=yt[Xc],fv=a.Fb(dh.row),Yh=a.Eb(dh.column),Tp=dh.measuredBounds,th=dh.margin,pg=th.right+th.left,hh=th.top+th.bottom;kt[dh.column]=Yh.oc===0&&kt[dh.column]!==void 0?Math.max(Tp.width+pg,kt[dh.column]):null,Ut[dh.row]=fv.oc===0&&Ut[dh.row]!==void 0?Math.max(Tp.height+hh,Ut[dh.row]):null}var Kg=0,_p=0,Hd;for(Hd in Ut)Hd!=="count"&&(Kg+=Ut[Hd]);for(Hd in kt)Hd!=="count"&&(_p+=kt[Hd]);for(var Lu=Fn.alloc(),km=0;km<z;km++){var xc=yt[km];if(xc.visible||xc===yf){var Ol=a.Fb(xc.row),wc=a.Eb(xc.column),Xh=0;isFinite(wc.width)?Xh=wc.width:(isFinite(gi)&&kt[xc.column]!==null?_p===0?Xh=wc.actual+gi:Xh=kt[xc.column]/_p*xf:kt[xc.column]!==null?Xh=gi:Xh=wc.actual||gi,Xh=Math.max(0,Xh-wc.Wc()));var wf=0;switch(isFinite(Ol.height)?wf=Ol.height:(isFinite(Qi)&&Ut[xc.row]!==null?Kg===0?wf=Ol.actual+Qi:wf=Ut[xc.row]/Kg*Dh:Ut[xc.row]!==null?wf=Qi:wf=Ol.actual||Qi,wf=Math.max(0,wf-Ol.Wc())),Lu.h(Math.max(wc.minimum,Math.min(Xh,wc.maximum)),Math.max(Ol.minimum,Math.min(wf,Ol.maximum))),uc=Cd(xc,Ol,wc,!1),uc){case dr:Lu.height=Math.max(Lu.height,Ol.actual+Qi);break;case Mr:Lu.width=Math.max(Lu.width,wc.actual+gi)}var mg=xc.margin,Jy=mg.right+mg.left,gv=mg.top+mg.bottom;xc.Uj(),xc.measure(Lu.width,Lu.height,wc.minimum,Ol.minimum);var Op=xc.measuredBounds,vg=Math.max(Op.width+Jy,0),Yg=Math.max(Op.height+gv,0);isFinite(gi)&&(vg=Math.min(vg,Lu.width)),isFinite(Qi)&&(Yg=Math.min(Yg,Lu.height));var Qc=0;Qc=Ol.actual,Ol.actual=Math.max(Ol.actual,Yg),Ol.oc=Math.max(Ol.oc,Yg),du=Ol.actual-Qc,Qi=Math.max(Qi-du,0),Ut[xc.row]===null&&(Dh=Math.max(Dh-du,0)),Qc=wc.actual,wc.actual=Math.max(wc.actual,vg),wc.oc=Math.max(wc.oc,vg),du=wc.actual-Qc,gi=Math.max(gi-du,0),kt[xc.column]===null&&(xf=Math.max(xf-du,0))}}br(yt);var Qh=Fn.alloc(),nh=Ar(),xd=Ar();if(z=ft.length,z!==0){for(var Jf=0;Jf<Ta;Jf++)if(De[Jf]){As=De[Jf].length;var Ip=a.Fb(Jf);nh[Jf]=Ip.actual;for(var $f=0;$f<As;$f++)if(De[Jf][$f]){var pv=a.Eb($f);xd[$f]=pv.actual}}}for(var Rp=0;Rp<z;Rp++){var bl=ft[Rp];if(bl.visible||bl===yf){var Wd=a.Fb(bl.row),Nd=a.Eb(bl.column);switch(Lu.h(Math.max(Nd.minimum,Math.min(y,Nd.maximum)),Math.max(Wd.minimum,Math.min(x,Wd.maximum))),uc=Cd(bl,Wd,Nd,!1),uc){case Hn:xd[Nd.index]!==0&&(Lu.width=Math.min(Lu.width,xd[Nd.index])),nh[Wd.index]!==0&&(Lu.height=Math.min(Lu.height,nh[Wd.index]));break;case dr:xd[Nd.index]!==0&&(Lu.width=Math.min(Lu.width,xd[Nd.index]));break;case Mr:nh[Wd.index]!==0&&(Lu.height=Math.min(Lu.height,nh[Wd.index]))}isFinite(Nd.width)&&(Lu.width=Nd.width),isFinite(Wd.height)&&(Lu.height=Wd.height),Qh.h(0,0);for(var mv=Nd.minimum,od=Wd.minimum,Pf=1;Pf<bl.rowSpan&&!(bl.row+Pf>=a.rowCount);Pf++)An=a.Fb(bl.row+Pf),du=0,du=uc===Hn||uc===Mr?Math.max(An.minimum,nh[bl.row+Pf]===0?An.maximum:Math.min(nh[bl.row+Pf],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),Qh.height+=du,od+=An.minimum;for(var Bd=1;Bd<bl.columnSpan&&!(bl.column+Bd>=a.columnCount);Bd++)An=a.Eb(bl.column+Bd),du=0,du=uc===Hn||uc===dr?Math.max(An.minimum,xd[bl.column+Bd]===0?An.maximum:Math.min(xd[bl.column+Bd],An.maximum)):Math.max(An.minimum,isNaN(An.Hc)?An.maximum:Math.min(An.Hc,An.maximum)),Qh.width+=du,mv+=An.minimum;Lu.width+=Qh.width,Lu.height+=Qh.height;var jp=bl.margin,qf=jp.right+jp.left,Dm=jp.top+jp.bottom;bl.measure(Lu.width,Lu.height,mv,od);for(var zp=bl.measuredBounds,fh=Math.max(zp.width+qf,0),yg=Math.max(zp.height+Dm,0),eg=0,Gp=0;Gp<bl.rowSpan&&!(bl.row+Gp>=a.rowCount);Gp++)An=a.Fb(bl.row+Gp),eg+=An.total||0;if(eg<yg){var Ef=yg-eg,Th=yg-eg;if(bl.spanAllocation!==null)for(var Cf=bl.spanAllocation,Jh=0;Jh<bl.rowSpan&&!(0>=Ef)&&!(bl.row+Jh>=a.rowCount);Jh++){An=a.Fb(bl.row+Jh);var bf=An.oa||0,Sg=Cf(bl,An,Th);An.actual=Math.min(An.maximum,bf+Sg),An.oa!==bf&&(Ef-=An.oa-bf)}for(;0<Ef;){var ih=An.oa||0;if(isNaN(An.height)&&An.maximum>ih&&(An.actual=Math.min(An.maximum,ih+Ef),An.oa!==ih&&(Ef-=An.oa-ih)),An.index===0)break;An=a.Fb(An.index-1)}}for(var Xg=0,Ff=0;Ff<bl.columnSpan&&!(bl.column+Ff>=a.columnCount);Ff++)An=a.Eb(bl.column+Ff),Xg+=An.total||0;if(Xg<fh){var Qg=fh-Xg,$y=fh-Xg;if(bl.spanAllocation!==null)for(var $h=bl.spanAllocation,xg=0;xg<bl.columnSpan&&!(0>=Qg)&&!(bl.column+xg>=a.columnCount);xg++){An=a.Eb(bl.column+xg);var Tm=An.oa||0,qy=$h(bl,An,$y);An.actual=Math.min(An.maximum,Tm+qy),An.oa!==Tm&&(Qg-=An.oa-Tm)}for(;0<Qg;){var vv=An.oa||0;if(isNaN(An.width)&&An.maximum>vv&&(An.actual=Math.min(An.maximum,vv+Qg),An.oa!==vv&&(Qg-=An.oa-vv)),An.index===0)break;An=a.Eb(An.index-1)}}}}br(ft),Fn.free(Qh),Fn.free(Lu),nh!==void 0&&br(nh),xd!==void 0&&br(xd);var Jg=0,$g=0,yv=a.desiredSize,px=a.maxSize;uc=oc(a,!0);var _m=Kh=kh=0,Om=0;z=a.columnCount;for(var Sv=0;Sv<z;Sv++)Qn[Sv]!==void 0&&(An=a.Eb(Sv),isFinite(An.width)?(_m+=An.width,_m+=An.Wc()):qm(An)===Kp?(_m+=An.oa,_m+=An.Wc()):An.oa!==0&&(kh+=An.oa,kh+=An.Wc()));isFinite(yv.width)?Jg=Math.min(yv.width,px.width):Jg=uc!==Tn&&isFinite(y)?y:kh,Jg=Math.max(Jg,a.minSize.width),Jg=Math.max(Jg-_m,0);for(var Jx=kh===0?1:Math.max(Jg/kh,1),xv=0;xv<z;xv++)Qn[xv]!==void 0&&(An=a.Eb(xv),isFinite(An.width)||qm(An)===Kp||(An.actual=An.oa*Jx),An.position=b.width,An.oa!==0&&(b.width+=An.oa,b.width+=An.Wc()));z=a.rowCount;for(var wv=0;wv<z;wv++)Gi[wv]!==void 0&&(An=a.Fb(wv),isFinite(An.height)?(Om+=An.height,Om+=An.Wc()):qm(An)===Kp?(Om+=An.oa,Om+=An.Wc()):An.oa!==0&&(Kh+=An.oa,Kh+=An.Wc()));isFinite(yv.height)?$g=Math.min(yv.height,px.height):$g=uc!==Tn&&isFinite(x)?x:Kh,$g=Math.max($g,a.minSize.height),$g=Math.max($g-Om,0);for(var $x=Kh===0?1:Math.max($g/Kh,1),Pv=0;Pv<z;Pv++)Gi[Pv]!==void 0&&(An=a.Fb(Pv),isFinite(An.height)||qm(An)===Kp||(An.actual=An.oa*$x),An.position=b.height,An.oa!==0&&(b.height+=An.oa,b.height+=An.Wc()));z=re.length;for(var e1=0;e1<z;e1++){var Im=re[e1],t1=0,n1=0;Im.type===Vn.TableRow?(t1=b.width,An=a.Fb(Im.row),n1=An.actual):(An=a.Eb(Im.column),t1=An.actual,n1=b.height),Im.measuredBounds.h(0,0,t1,n1),it(Im,!1)}br(re),a.inRowsCols=De},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,ue=ee.length,de=0,pe=0;pe<ue;pe++)ee[pe]&&(de=Math.max(de,ee[pe].length));oe=a.rowDefs,re=a.colDefs;var Se=pe=0,Pe=Math.min(a.topIndex,ue-1);if(0<oe.length){for(;Pe!==ue&&(oe[Pe]===void 0||oe[Pe].oa===0);)Pe++;Pe=Math.max(Math.min(Pe,ue-1),0),pe=-oe[Pe].position}var Le=Math.min(a.leftIndex,de-1);if(0<re.length){for(;Le!==de&&(re[Le]===void 0||re[Le].oa===0);)Le++;Le=Math.max(Math.min(Le,de-1),0),Se=-re[Le].position}for(var De=0,qe=0;De!==ue&&oe[De]===void 0;)De++;for(;qe!==ue&&re[qe]===void 0;)qe++;de=a.part,a.Fb(De),a.Eb(qe);for(var Ze=0;Ze<y.length;Ze++){var ct=y[Ze];if(ct instanceof Vn&&ct.visible&&lf(ct)){if(ct.type===Vn.TableRow){re=a.Fb(ct.row);var ft=a.Eb(qe)}else re=a.Fb(De),ft=a.Eb(ct.column);oe=re.position+pe+b,re.oa!==0&&(oe+=re.Io(Math.max(De,Pe))),re=ft.position+Se+z,ft.oa!==0&&(re+=ft.Io(Math.max(qe,Le))),ft=ct.measuredBounds,ct.Uk(),ct.actualBounds.ka();var yt=ct.actualBounds,kt=ln.allocAt(yt.x,yt.y,yt.width,yt.height);yt.x=ct.type===Vn.TableRow?z:re,yt.y=ct.type===Vn.TableColumn?b:oe,yt.width=ft.width,yt.height=ft.height,ct.actualBounds.freeze(),Ft(ct,!1),al(kt,yt)||de===null||(de.oh(),ct.Pn(de)),ln.free(kt)}}for(Ze=Fn.alloc(),ct=0;ct<ue;ct++)if(ee[ct]){for(de=ee[ct].length,ft=a.Fb(ct),oe=ft.position+pe+b,ft.oa!==0&&(oe+=ft.Io(Math.max(De,Pe))),yt=0;yt<de;yt++)if(ee[ct][yt]){kt=a.Eb(yt),re=kt.position+Se+z,kt.oa!==0&&(re+=kt.Io(Math.max(qe,Le)));for(var Ut=ee[ct][yt],gi=Ut.length,Qi=0;Qi<gi;Qi++){var Gi=Ut[Qi],Qn=Gi.measuredBounds;Ze.h(0,0);for(var An=1;An<Gi.rowSpan&&!(ct+An>=a.rowCount);An++){var so=a.Fb(ct+An);so.oa!==0&&(Ze.height+=so.total)}for(An=1;An<Gi.columnSpan&&!(yt+An>=a.columnCount);An++)so=a.Eb(yt+An),so.oa!==0&&(Ze.width+=so.total);var Wr=kt.oa+Ze.width,Ta=ft.oa+Ze.height;An=re,so=oe;var As=Wr,cu=Ta,yu=re,sc=oe,du=Wr,yf=Ta;re+Wr>x.width&&(du=Math.max(x.width-re,0)),oe+Ta>x.height&&(yf=Math.max(x.height-oe,0));var _l=Gi.alignment;if(_l.Xb()){_l=a.defaultAlignment,_l.sb()||(_l=pa);var qd=_l.x,lc=_l.y,Sf=_l.offsetX;_l=_l.offsetY;var hd=kt.alignment,Ad=ft.alignment;hd.sb()&&(qd=hd.x,Sf=hd.offsetX),Ad.sb()&&(lc=Ad.y,_l=Ad.offsetY)}else qd=_l.x,lc=_l.y,Sf=_l.offsetX,_l=_l.offsetY;(isNaN(qd)||isNaN(lc))&&(lc=qd=.5,_l=Sf=0),hd=Qn.width,Ad=Qn.height;var nd=Gi.margin,Kc=nd.left+nd.right,Kf=nd.top+nd.bottom,eh=Cd(Gi,ft,kt,!1);!isNaN(Gi.desiredSize.width)||eh!==Hn&&eh!==dr||(hd=Math.max(Wr-Kc,0)),!isNaN(Gi.desiredSize.height)||eh!==Hn&&eh!==Mr||(Ad=Math.max(Ta-Kf,0)),Wr=Gi.maxSize,Ta=Gi.minSize,hd=Math.min(Wr.width,hd),Ad=Math.min(Wr.height,Ad),hd=Math.max(Ta.width,hd),Ad=Math.max(Ta.height,Ad),Wr=Ad+Kf,An+=As*qd-(hd+Kc)*qd+Sf+nd.left,so+=cu*lc-Wr*lc+_l+nd.top,Gi.visible&&(Oa(yu,sc,du,yf,An,so,Qn.width,Qn.height)?Gi.arrange(An,so,hd,Ad):Gi.arrange(An,so,hd,Ad,new ln(yu,sc,du,yf)))}}}for(Fn.free(Ze),a=0;a<E;a++)x=y[a],z=x instanceof Vn?x:null,z!==null&&lf(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Zm(){this.xa="Base"}It(Zm,Jl),Zm.prototype.measure=function(){},Zm.prototype.arrange=function(){};function Vm(){this.xa="Base"}It(Vm,Jl),Vm.prototype.measure=function(){},Vm.prototype.arrange=function(){};function Um(){this.xa="Base"}It(Um,Jl),Um.prototype.measure=function(a,y,x,E,b,z,ee){1<E.length&&Wt("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,ue=oe.right+oe.left;if(oe=oe.top+oe.bottom,isFinite(y)||isFinite(x)){var de=E.scale,pe=re.width;re=re.height;var Se=Math.max(y-ue,0),Pe=Math.max(x-oe,0),Le=1;a.viewboxStretch===ir?pe!==0&&re!==0&&(Le=Math.min(Se/pe,Pe/re)):pe!==0&&re!==0&&(Le=Math.max(Se/pe,Pe/re)),Le===0&&(Le=1e-4),E.Ca*=Le,de!==E.scale&&(it(E,!0),E.measure(1/0,1/0,z,ee))}re=E.measuredBounds,b.width=isFinite(y)?y:Math.max(re.width+ue,0),b.height=isFinite(x)?x:Math.max(re.height+oe,0)},Um.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=pa),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 Zp(){this.xa="Base"}It(Zp,Jl),Zp.prototype.measure=function(){},Zp.prototype.arrange=function(){},Zp.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,ue=Math.ceil(re/b),de=Math.ceil(oe/E),pe=a.gridOrigin,Se=pe.x;pe=pe.y,y.save(),y.beginPath(),y.rect(0,0,re,oe),y.clip(),y.Se();for(var Pe=[],Le=a.O.s,De=Le.length,qe=0;qe<De;qe++){var Ze=Le[qe],ct=[];if(Pe.push(ct),Ze.visible){var ft=Ze.interval;if(!(0>ft)){Ze=bv(Ze.figure);for(var yt=0;yt<De;yt++)if(yt!==qe){var kt=Le[yt];kt.visible&&bv(kt.figure)===Ze&&(kt=kt.interval,kt>ft&&ct.push(kt))}}}}for(Le=a.O.s,De=Le.length,qe=0;qe<De;qe++){var Ut=Le[qe];if(Ut.visible&&(ct=Ut.interval||1,Ze=Math.abs(ct),!(2>b*Ze*x))){if(ft=Ut.segmentIndex,(!isFinite(ft)||isNaN(ft))&&(ft=0),0>ft&&(ft=Ze-Math.min(-ft,Ze)),ft=Math.round(ft%Ze),Ze=Ut.opacity,yt=1,Ze!==1){if(Ze===0)continue;yt=y.globalAlpha,y.globalAlpha=yt*Ze}kt=Pe[qe];var gi=!1,Qi=Ut.strokeDashArray;if(Qi!==null&&(gi=!0,y.js(Qi,Ut.strokeDashOffset)),Ut.figure==="LineV"&&Ut.stroke!==null&&0<Ut.strokeWidth){for(y.lineWidth=Ut.strokeWidth,cl(a,y,Ut.stroke,!1,!1,z,ee),y.beginPath(),Qi=Ut=Math.floor((Se-b)/b);Qi<=Ut+ue;Qi++){var Gi=Qi*b+Se;0<=Gi&&Gi<=re&&Km(Qi,ct,ft,kt)&&(y.moveTo(Gi,0),y.lineTo(Gi,oe))}y.stroke(),y.Se()}else if(Ut.figure==="LineH"&&Ut.stroke!==null&&0<Ut.strokeWidth){for(y.lineWidth=Ut.strokeWidth,cl(a,y,Ut.stroke,!1,!1,z,ee),y.beginPath(),Qi=Ut=Math.floor((pe-E)/E);Qi<=Ut+de;Qi++)Gi=Qi*E+pe,0<=Gi&&Gi<=oe&&Km(Qi,ct,ft,kt)&&(y.moveTo(0,Gi),y.lineTo(re,Gi));y.stroke(),y.Se()}else if(Ut.figure==="BarV"&&Ut.fill!==null)for(cl(a,y,Ut.fill,!0,!1,z,ee),Ut=Ut.width,isNaN(Ut)&&(Ut=b),Gi=Qi=Math.floor((Se-b)/b);Gi<=Qi+ue;Gi++){var Qn=Gi*b+Se;0<=Qn+Ut&&Qn<=re&&Km(Gi,ct,ft,kt)&&y.fillRect(Qn,0,Ut,oe)}else if(Ut.figure==="BarH"&&Ut.fill!==null)for(cl(a,y,Ut.fill,!0,!1,z,ee),Ut=Ut.height,isNaN(Ut)&&(Ut=E),Gi=Qi=Math.floor((pe-E)/E);Gi<=Qi+de;Gi++)Qn=Gi*E+pe,0<=Qn+Ut&&Qn<=oe&&Km(Gi,ct,ft,kt)&&y.fillRect(0,Qn,re,Ut);gi&&y.fs(),Ze!==1&&(y.globalAlpha=yt)}}y.restore(),y.Vc(!1)};function Km(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 Ym(){this.xa="Base"}It(Ym,Jl),Ym.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof Fa||a instanceof Jn){var ee=null,re=null;if(a instanceof Jn&&(ee=a),a instanceof Fa&&(re=a,ee=re.adornedPart,a.j===null&&(a.j=[])),ee instanceof Jn){var oe=ee;if(z===0)Gl(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var ue=a instanceof Fa?null:ee.path;y=ee.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var de=oe.points,pe=ee.pointsCount;re!==null?re.Ul(!1):ee!==null&&ee.Ul(!1),re=y.width;var Se=y.height,Pe=a.j;if(Pe.length=0,ue!==null){r1(a,re,Se,ue);var Le=ue.measuredBounds;x.ed(Le),Pe.push(Le)}Le=St.alloc();for(var De=tt.alloc(),qe=tt.alloc(),Ze=0;Ze<z;Ze++){var ct=E[Ze];if(ct!==ue)if(ct.isPanelMain&&ct instanceof bo){r1(a,re,Se,ct);var ft=ct.measuredBounds;x.ed(ft),Pe.push(ft)}else if(2>pe)ct.measure(1/0,1/0,0,0),ft=ct.measuredBounds,x.ed(ft),Pe.push(ft);else{var yt=ct.segmentIndex,kt=ct.segmentFraction,Ut=ct.alignmentFocus;Ut.Mc()&&(Ut=pa);var gi=ct.segmentOrientation,Qi=ct.segmentOffset;if(isNaN(yt)){var Gi=oe.ua;ft=Ar(),Gi.Qu(kt,ft);var Qn=tt.allocAt(ft[0],ft[1]);if(Qn.add(oe.i(0)),Gi.type===dt.j?Qn.offset(-Gi.startX,-Gi.startY):(Gi=Gi.figures.first(),Gi!==null&&Qn.offset(-Gi.startX,-Gi.startY)),Gi=ft[2],gi!==pc){var An=oe.computeAngle(ct,gi,Gi);ct.Kb=An}An=Qn.x-y.x;var so=Qn.y-y.y;tt.free(Qn),br(ft)}else if(yt<-pe||yt>=pe)ft=tt.alloc(),oe.vg(),oe.computeMidPoint(ft),Gi=oe.midAngle,gi!==pc&&(An=oe.computeAngle(ct,gi,Gi),ct.Kb=An),An=ft.x-y.x,so=ft.y-y.y,tt.free(ft);else{if(An=0,0<=yt?(so=de.M(yt),ft=yt<pe-1?de.M(yt+1):so):(An=pe+yt,so=de.M(An),ft=0<An?de.M(An-1):so),so.Xa(ft)){0<=yt?(Gi=0<yt?de.M(yt-1):so,An=yt<pe-2?de.M(yt+2):ft):(Gi=An<pe-1?de.M(An+1):so,An=1<An?de.M(An-2):ft),Qn=Gi.Bf(so);var Wr=ft.Bf(An);Gi=Qn>Wr+10?0<=yt?Gi.ab(so):so.ab(Gi):Wr>Qn+10?0<=yt?ft.ab(An):An.ab(ft):0<=yt?Gi.ab(An):An.ab(Gi)}else Gi=0<=yt?so.ab(ft):ft.ab(so);gi!==pc&&(An=oe.computeAngle(ct,gi,Gi),ct.Kb=An),An=so.x+(ft.x-so.x)*kt-y.x,so=so.y+(ft.y-so.y)*kt-y.y}ct.measure(1/0,1/0,0,0),ft=ct.measuredBounds,Qn=ct.naturalBounds;var Ta=0;ct instanceof bo&&(Ta=ct.strokeWidth),Wr=Qn.width+Ta;var As=Qn.height+Ta;Le.reset(),Le.translate(-ft.x,-ft.y),Le.scale(ct.scale,ct.scale),Le.rotate(gi===pc?ct.angle:Gi,Wr/2,As/2),gi!==im&&gi!==om||Le.rotate(90,Wr/2,As/2),gi!==rm&&gi!==am||Le.rotate(-90,Wr/2,As/2),gi===C0&&(45<Gi&&135>Gi||225<Gi&&315>Gi)&&Le.rotate(-Gi,Wr/2,As/2),Qn=new ln(0,0,Wr,As),De.xi(Qn,Ut),Le.Ga(De),Ut=-De.x+Ta/2*ct.scale,ct=-De.y+Ta/2*ct.scale,qe.assign(Qi),Ta=isNaN(Qi.x);var cu=isNaN(Qi.y);if(Ta||cu){Wr=Wr/2+3,As=As/2+3;var yu=45<=Gi&&135>=Gi,sc=225<=Gi&&315>=Gi;gi===pc&&(yu||sc)?(qe.x=cu?Wr:Qi.y,qe.y=Ta?As:Qi.x,yu?0<=yt||isNaN(yt)&&.5>kt||!Ta||(qe.y=-As):sc&&((0<=yt||isNaN(yt)&&.5>kt)&&Ta&&(qe.y=-As),cu&&(qe.x=-Wr))):(Ta&&(qe.x=0<=yt||isNaN(yt)&&.5>kt?Wr:-Wr),cu&&(qe.y=-As),qe.rotate(Gi))}else qe.rotate(Gi);An+=qe.x,so+=qe.y,Qn.set(ft),Qn.h(An+Ut,so+ct,ft.width,ft.height),Pe.push(Qn),x.ed(Qn)}}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),Gl(b,x.width||0,x.height||0),St.free(Le),tt.free(De),tt.free(qe)}}}},Ym.prototype.arrange=function(a,y){var x=y.length;if(a instanceof Fa||a instanceof Jn){var E=a,b=null;a instanceof Fa&&(b=a,E=b.adornedPart);var z=a instanceof Fa?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 ue=y[oe];if(ue!==z&&re<ee.length){var de=ee[re];re++,ue.arrange(de.x-a.jg.x,de.y-a.jg.y,de.width,de.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Jn)for(z=a.labelNodes;z.next();){var pe=a;ee=z.value,re=ee.segmentIndex,oe=ee.segmentFraction;var Se=ee.alignmentFocus;if(ue=ee.segmentOrientation,de=ee.segmentOffset,isNaN(re)){var Pe=pe.ua,Le=Ar();Pe.Qu(oe,Le);var De=tt.allocAt(Le[0],Le[1]);De.add(pe.i(0)),Pe.type===dt.j||(Pe=Pe.figures.first()),De.offset(-Pe.startX,-Pe.startY),Pe=Le[2],ue!==pc&&(pe=pe.computeAngle(ee,ue,Pe),ee.angle=pe),pe=De.x;var qe=De.y;tt.free(De),br(Le)}else if(re<-x||re>=x)Le=tt.alloc(),Pe=pe,qe=Le,Pe.vg(),Pe.computeMidPoint(qe),Pe=pe.midAngle,ue!==pc&&(pe=pe.computeAngle(ee,ue,Pe),ee.angle=pe),pe=Le.x,qe=Le.y,tt.free(Le);else{if(De=0,0<=re?(Le=y.s[re],qe=re<x-1?y.s[re+1]:Le):(De=x+re,Le=y.s[De],qe=0<De?y.s[De-1]:Le),Le.Xa(qe)){0<=re?(Pe=0<re?y.s[re-1]:Le,De=re<x-2?y.s[re+2]:qe):(Pe=De<x-1?y.s[De+1]:Le,De=1<De?y.s[De-2]:qe);var Ze=Pe.Bf(Le),ct=qe.Bf(De);Pe=Ze>ct+10?0<=re?Pe.ab(Le):Le.ab(Pe):ct>Ze+10?0<=re?qe.ab(De):De.ab(qe):0<=re?Pe.ab(De):De.ab(Pe)}else Pe=0<=re?Le.ab(qe):qe.ab(Le);ue!==pc&&(pe=pe.computeAngle(ee,ue,Pe),ee.angle=pe),pe=Le.x+(qe.x-Le.x)*oe,qe=Le.y+(qe.y-Le.y)*oe}if(Se.ys())ee.location=new tt(pe,qe);else{Se.Mc()&&(Se=pa),Le=St.alloc(),Le.reset(),Le.scale(ee.scale,ee.scale),Le.rotate(ee.angle,0,0);var ft=ee.naturalBounds;De=ln.allocAt(0,0,ft.width,ft.height),Ze=tt.alloc(),Ze.xi(De,Se),Le.Ga(Ze),Se=-Ze.x,ct=-Ze.y;var yt=ft.width,kt=ft.height;ft=tt.alloc(),ft.assign(de);var Ut=isNaN(de.x),gi=isNaN(de.y);if(Ut||gi){yt=yt/2+3,kt=kt/2+3;var Qi=45<=Pe&&135>=Pe,Gi=225<=Pe&&315>=Pe;ue===pc&&(Qi||Gi)?(ft.x=gi?yt:de.y,ft.y=Ut?kt:de.x,Qi?0<=re||isNaN(re)&&.5>oe||!Ut||(ft.y=-kt):Gi&&((0<=re||isNaN(re)&&.5>oe)&&Ut&&(ft.y=-kt),gi&&(ft.x=-yt))):(Ut&&(ft.x=0<=re||isNaN(re)&&.5>oe?yt:-yt),gi&&(ft.y=-kt),ft.rotate(Pe))}else ft.rotate(Pe);pe+=ft.x,qe+=ft.y,Le.pp(De),Se+=De.x,ct+=De.y,re=tt.allocAt(pe+Se,qe+ct),ee.move(re),tt.free(re),tt.free(ft),tt.free(Ze),ln.free(De),St.free(Le)}}b!==null?b.Ul(!1):E.Ul(!1),E=D1(a),a.location.h(a.position.x+E.x,a.position.y+E.y),tt.free(E)}};function r1(a,y,x,E){if(rt(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof Fa&&a.type===Vn.Link&&a.adornedObject instanceof bo&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Jn&&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 Fa&&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),it(E,!1)}}function Vp(){this.xa="Base"}It(Vp,Jl),Vp.prototype.measure=function(a,y,x,E,b,z,ee){var re=a.Pb();a.graduatedBounds=[];var oe=re.margin,ue=oe.right+oe.left,de=oe.top+oe.bottom;re.measure(y,x,z,ee);var pe=re.measuredBounds,Se=new ln(-oe.left,-oe.top,Math.max(pe.width+ue,0),Math.max(pe.height+de,0));a.graduatedBounds.push(Se),b.assign(Se);for(var Pe=re.geometry,Le=re.strokeWidth,De=Pe.flattenedSegments,qe=Pe.flattenedLengths,Ze=Pe.flattenedTotalLength,ct=De.length,ft=0,yt=0,kt=Ar(),Ut=0;Ut<ct;Ut++){var gi=De[Ut],Qi=[];yt=ft=0;for(var Gi=gi.length,Qn=0;Qn<Gi;Qn+=2){var An=gi[Qn],so=gi[Qn+1];if(Qn!==0){var Wr=180*Math.atan2(so-yt,An-ft)/Math.PI;0>Wr&&(Wr+=360),Qi.push(Wr)}ft=An,yt=so}kt.push(Qi)}if(a.graduatedIntervals===null){for(var Ta=[],As=a.O.s,cu=As.length,yu=0;yu<cu;yu++){var sc=As[yu],du=[];if(Ta.push(du),sc.visible){var yf=sc.interval;if(!(0>yf)){for(var _l=0;_l<cu;_l++)if(_l!==yu){var qd=As[_l];if(qd.visible&&sc.constructor===qd.constructor){var lc=qd.interval;lc>yf&&du.push(lc)}}}}}a.graduatedIntervals=Ta}var Sf=a.graduatedIntervals,hd=a.O.s,Ad=hd.length,nd=0,Kc=0,Kf=Ze;a.graduatedMarks=[];for(var eh,kp=0;kp<Ad;kp++){var id=hd[kp];if(eh=[],id.visible&&id!==re){var uc=Math.abs(id.interval),Nm=a.graduatedTickUnit;if(!(2>Nm*uc*Ze/a.graduatedRange&&id.graduatedSkip===null)){var Vg=qe[0][0],ch=0,Yc=0;Kc=Ze*id.graduatedStart-1e-4,Kf=Ze*id.graduatedEnd+1e-4;var gg=Nm*uc,rd=a.graduatedTickBase;if(rd<a.graduatedMin){var Yf=(a.graduatedMin-rd)/gg;Yf=Yf%1===0?Yf:Math.floor(Yf+1),rd+=Yf*gg}else rd>a.graduatedMin+gg&&(rd-=Math.floor((rd-a.graduatedMin)/gg)*gg);for(var hv=Sf[kp],Bm=rd,Qy=1e-6*a.graduatedMax,kh=1;rd<=a.graduatedMax+Qy;kh++){e:{for(var Kh=hv.length,Ug=0;Ug<Kh;Ug++){var Xf=(rd-a.graduatedTickBase)%(hv[Ug]*a.graduatedTickUnit),Dp=1e-6*a.graduatedTickUnit;if(Xf<Dp&&Xf>-Dp){var Qf=!1;break e}}Qf=!0}if(Qf&&(rd>a.graduatedMax&&(rd=a.graduatedMax),id.graduatedSkip===null||id instanceof Bs&&!id.graduatedSkip(rd,id)||id instanceof bo&&!id.graduatedSkip(rd,id))&&(nd=(rd-a.graduatedMin)*Ze/a.graduatedRange,nd>Ze&&(nd=Ze),Kc<=nd&&nd<=Kf)){for(var Dh=kt[ch][Yc],xf=qe[ch][Yc];ch<qe.length;){for(;nd>Vg&&Yc<qe[ch].length-1;)Yc++,Dh=kt[ch][Yc],xf=qe[ch][Yc],Vg+=xf;if(nd<=Vg)break;ch++,Yc=0,Dh=kt[ch][Yc],xf=qe[ch][Yc],Vg+=xf}var Xc=De[ch],dh=Xc[2*Yc],fv=Xc[2*Yc+1],Yh=(nd-(Vg-xf))/xf,Tp=new tt(dh+(Xc[2*Yc+2]-dh)*Yh+Le/2-Pe.bounds.x,fv+(Xc[2*Yc+3]-fv)*Yh+Le/2-Pe.bounds.y);Tp.scale(re.scale,re.scale);e:{var th=Dh,pg=kt[ch];if(!(.5005>Yh&&.4995<Yh)){var hh=th;if(.5>Yh?0<Yc?hh=pg[Yc-1]:ze.$(Xc[0],Xc[Xc.length-2])&&ze.$(Xc[1],Xc[Xc.length-1])&&(hh=pg[pg.length-1]):.5<Yh&&(Yc+1<pg.length?hh=pg[Yc+1]:ze.$(Xc[0],Xc[Xc.length-2])&&ze.$(Xc[1],Xc[Xc.length-1])&&(hh=pg[0])),th!==hh){var Kg=Math.abs(th-hh);if(180<Kg&&(th<hh?th+=360:hh+=360,Kg=Math.abs(th-hh)),5e-4>Yh||.9995<Yh){Dh=(th+hh)/2%360;break e}if(10>Kg){var _p=1-Math.abs(.5-Yh);Dh=(th*_p+hh*(1-_p))%360;break e}}}Dh=th}if(id instanceof Bs){var Hd="";id.graduatedFunction!==null?(Hd=id.graduatedFunction(rd,id),Hd=Hd!=null?Hd.toString():""):Hd=(+rd.toFixed(2)).toString(),Hd!==""&&eh.push({$l:Tp,angle:Dh,text:Hd})}else eh.push({$l:Tp,angle:Dh})}rd=Bm+kh*gg}}}a.graduatedMarks.push(eh)}br(kt);var Lu=a.graduatedMarks;if(Lu!==null)for(var km=E.length,xc=0;xc<km;xc++){var Ol=E[xc],wc=Lu[xc];if(Ol.visible&&Ol!==re&&wc.length!==0){if(Ol instanceof bo){var Xh=a,wf=b,mg=Ol.alignmentFocus;mg.Mc()&&(mg=Qu);var Jy=Ol.angle;Ol.Kb=0,Ol.measure(1/0,1/0,0,0),Ol.Kb=Jy;var gv=Ol.measuredBounds,Op=gv.width,vg=gv.height,Yg=ln.allocAt(0,0,Op,vg),Qc=tt.alloc();Qc.xi(Yg,mg),ln.free(Yg);for(var Qh=-Qc.x,nh=-Qc.y,xd=new ln,Jf=wc.length,Ip=0;Ip<Jf;Ip++)for(var $f=wc[Ip],pv=$f.$l.x,Rp=$f.$l.y,bl=$f.angle,Wd=0;4>Wd;Wd++){switch(Wd){case 0:Qc.h(Qh,nh);break;case 1:Qc.h(Qh+Op,nh);break;case 2:Qc.h(Qh,nh+vg);break;case 3:Qc.h(Qh+Op,nh+vg)}Qc.rotate(bl+Ol.angle),Qc.offset(pv,Rp),Ip===0&&Wd===0?xd.h(Qc.x,Qc.y,0,0):xd.Ye(Qc),Qc.offset(-pv,-Rp),Qc.rotate(-bl-Ol.angle)}tt.free(Qc),Xh.graduatedBounds!==null&&Xh.graduatedBounds.push(xd),Ws(wf,xd.x,xd.y,xd.width,xd.height)}else if(Ol instanceof Bs){var Nd=a,mv=b;Nd.temporaryTextBlock===null&&(Nd.temporaryTextBlock=new Bs);var od=Nd.temporaryTextBlock;S1(od,Ol);var Pf=Ol.alignmentFocus;Pf.Mc()&&(Pf=Qu);for(var Bd=Ol.segmentOrientation,jp=Ol.segmentOffset,qf=new ln,Dm=0,zp=0,fh=0,yg=0,eg=0,Gp=wc.length,Ef=0;Ef<Gp;Ef++){var Th=wc[Ef];Dm=Th.$l.x,zp=Th.$l.y,fh=Th.angle,eg=yg=Ol.angle,Bd!==pc&&(eg=Bd===nm||Bd===E0?fh+Ol.angle:fh,yg=Jn.computeAngle(Bd,eg)),od.Kb=yg,od.text=Th.text||"",od.measure(1/0,1/0,0,0);var Cf=od.measuredBounds,Jh=od.naturalBounds,bf=Jh.width,Sg=Jh.height,ih=St.alloc();ih.reset(),ih.translate(-Cf.x,-Cf.y),ih.scale(od.scale,od.scale),ih.rotate(eg,bf/2,Sg/2),Bd!==im&&Bd!==om||ih.rotate(90,bf/2,Sg/2),Bd!==rm&&Bd!==am||ih.rotate(-90,bf/2,Sg/2),Bd===C0&&(45<fh&&135>fh||225<fh&&315>fh)&&ih.rotate(-fh,bf/2,Sg/2);var Xg=ln.allocAt(0,0,bf,Sg),Ff=tt.alloc();Ff.xi(Xg,Pf),ih.Ga(Ff);var Qg=-Ff.x,$y=-Ff.y,$h=tt.alloc();$h.assign(jp),isNaN($h.x)&&($h.x=bf/2+3),isNaN($h.y)&&($h.y=-(Sg/2+3)),$h.rotate(fh),Dm+=$h.x+Qg,zp+=$h.y+$y;var xg=new ln(Dm,zp,Cf.width,Cf.height),Tm=new ln(Cf.x,Cf.y,Cf.width,Cf.height),qy=new ln(Jh.x,Jh.y,Jh.width,Jh.height);Th.Sz=yg,Th.lineCount=od.lineCount,Th.lines=[od.Cb,od.Ih,od.df,od.Le,od.Qc,od.Qb,od.ze],Th.actualBounds=xg,Th.measuredBounds=Tm,Th.naturalBounds=qy,Ef===0?qf.assign(xg):qf.ed(xg),tt.free($h),tt.free(Ff),ln.free(Xg),St.free(ih)}Nd.graduatedBounds!==null&&Nd.graduatedBounds.push(qf),Ws(mv,qf.x,qf.y,qf.width,qf.height)}it(Ol,!1)}}},Vp.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,ue=0;ue<oe;ue++){var de=y[ue];re=b[ue],de.visible&&de!==E&&re.length!==0&&(re=z[ee],ee++,de.arrange(re.x-x.x,re.y-x.y,re.width,re.height))}a.graduatedBounds=null}}},Vp.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 Ja,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,ue=a.graduatedMarks,de=oe.length,pe=0;pe<de;pe++){var Se=oe[pe],Pe=ue[pe],Le=Pe.length;if(Se.visible&&Se!==z&&Pe.length!==0){if(Se instanceof bo){if(!(2>a.graduatedTickUnit*Se.interval*z.geometry.flattenedTotalLength/a.graduatedRange*ee&&Se.graduatedSkip===null)){var De=Se.measuredBounds,qe=Se.strokeWidth*Se.scale,Ze=Se.alignmentFocus;Ze.Mc()&&(Ze=Qu);for(var ct=0;ct<Le;ct++){var ft=Pe[ct].$l,yt=Pe[ct].angle,kt=Ze,Ut=Se.Ab;Ut.reset(),Ut.translate(ft.x+re.x,ft.y+re.y),Ut.rotate(yt+Se.angle,0,0),Ut.translate(-De.width*kt.x+kt.offsetX+qe/2,-De.height*kt.y+kt.offsetY+qe/2),Ut.scale(Se.scale,Se.scale),Ae(Se,!1),Se.wh.set(Se.Ab),Se.Kk=Se.scale,je(Se,!1),Se.gc(y,x),b&&(a.svg.appendChild(Se.svg),Se.svg=null),Se.Ab.reset()}}}else if(Se instanceof Bs)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Bs),De=a.temporaryTextBlock,S1(De,Se),qe=0;qe<Le;qe++)Ze=Pe[qe],Ze.actualBounds&&Ze.measuredBounds&&Ze.naturalBounds&&(De.ec=Ze.text||"",De.Kb=Ze.Sz||0,De.Gc=Ze.lineCount||0,ct=Ze.lines,ct!==void 0&&(De.Cb=ct[0],De.Ih=ct[1],De.df=ct[2],De.Le=ct[3],De.Qc=ct[4],De.Qb=ct[5],De.ze=ct[6]),Ze.naturalBounds&&(De.dc=Ze.naturalBounds),Ze.actualBounds&&(ct=Ze.actualBounds,De.arrange(ct.x,ct.y,ct.width,ct.height)),ct=Ze.actualBounds,De.arrange(ct.x,ct.y,ct.width,ct.height),ft=Ze.measuredBounds,Ze=Ze.naturalBounds,yt=De.Ab,yt.reset(),yt.translate(ct.x+re.x,ct.y+re.y),yt.translate(-ft.x,-ft.y),De.no(yt,Ze.x,Ze.y,Ze.width,Ze.height),Ae(De,!1),De.wh.set(De.Ab),De.Kk=De.scale,je(De,!1),De.Ng=Se.part,De.Me=Se.panel,De.gc(y,x),De.Me=null,De.Ng=null,b&&(a.svg.appendChild(De.svg),De.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function Vn(a,y){if(Dt.call(this),this.na=null,a===void 0)this.na=Vn.Position;else if(typeof a=="string"){var x=Od.I(a);x!==null&&(this.na=x)}else a instanceof Jl?this.na=a:a&&(this.na=Vn.Position,y=a);this.na===null&&Wt("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===Vn.Grid?1048576:0),this.O=new Un,this.yb=iu,this.Tm=qi,this.Uf=ao,this.$g=null,this.$e="",this.jg=new ln(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=ir,this.jn=ol,this.kn=il,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}It(Vn,Dt),Vn.prototype.cloneProtected=function(a){Dt.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},Vn.prototype.Af=function(a){Dt.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},Vn.prototype.copy=function(){var a=Dt.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 xi&&(z.Te=!0);var re=a.diagram;re!==null&&re.undoManager.isUndoingRedoing||z.cb(aa,"elements",a,null,b,null,ee)}}return a}return null},Ee=Vn.prototype,Ee.toString=function(){return"Panel("+this.type.name+")#"+No(this)},Ee.Pn=function(a){Dt.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},Ee.hh=function(a,y){if(this.na===Vn.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===Vn.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===Vn.Table)if(a.yc(),a instanceof Ja){var x=a.yd;a.yd=ld(a,"gojs-ts"),Cv(this,a),a.nh.pop(),a.yd=x}else Cv(this,a);(x=this.isClipping&&this.na===Vn.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 Cv(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&Xm(a,y,!0,x,!0),E!==null&&Xm(a,y,!1,E,!0),x!==null&&o1(a,y,!0,x),E!==null&&o1(a,y,!1,E),x!==null&&Xm(a,y,!0,x,!1),E!==null&&Xm(a,y,!1,E,!1)}function o1(a,y,x,E){for(var b=E.length,z=a.actualBounds,ee=a.naturalBounds,re=!0,oe=0;oe<b;oe++){var ue=E[oe];if(ue!==void 0&&ue.actual!==0)if(re)re=!1;else{if(x){if(ue.position>ee.height)continue}else if(ue.position>ee.width)continue;var de=ue.separatorStrokeWidth;isNaN(de)&&(de=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var pe=ue.separatorStroke;if(pe===null&&(pe=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),de!==0&&pe!==null){cl(a,y,pe,!1,!1,ee,z),pe=!1;var Se=ue.separatorDashArray;Se===null&&(Se=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),Se!==null&&(pe=!0,y.js(Se,0)),y.beginPath(),Se=ue.position+de,x?Se>ee.height&&(de-=Se-ee.height):Se>ee.width&&(de-=Se-ee.width),ue=ue.position+de/2,y.lineWidth=de,de=a.yb,x?(ue+=de.top,Se=ee.width-de.right,y.moveTo(de.left,ue),y.lineTo(Se,ue)):(ue+=de.left,Se=ee.height-de.bottom,y.moveTo(ue,de.top),y.lineTo(ue,Se)),y.stroke(),y.Se(),pe&&y.fs()}}}}function Xm(a,y,x,E,b){for(var z=E.length,ee=a.actualBounds,re=a.naturalBounds,oe=a1(a,!0),ue=a1(a,!1),de=0;de<z;de++){var pe=E[de];if(pe!==void 0&&pe.background!==null&&pe.coversSeparators!==b&&pe.actual!==0){var Se=x?ee.height:ee.width;if(!(pe.position>Se)){var Pe=pe.Wc(),Le=pe.separatorStrokeWidth;isNaN(Le)&&(Le=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var De=pe.separatorStroke;De===null&&(De=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(De===null||pe.index===(x?oe:ue))&&(Le=0),Pe-=Le,Le=pe.position+Le,Pe+=pe.actual,Le+Pe>Se&&(Pe=Se-Le),0>=Pe||(Se=a.yb,cl(a,y,pe.background,!0,!1,re,ee),x?y.fillRect(Se.left,Le+Se.top,ee.width-(Se.left+Se.right),Pe):y.fillRect(Le+Se.left,Se.top,Pe,ee.height-(Se.top+Se.bottom)))}}}}function a1(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 bv(a){return a==="LineV"||a==="BarV"}Ee.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},Ee.kk=function(a,y,x){if(!Dt.prototype.kk.call(this,a,y,x))return!1;if(this.type===Vn.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,Cv(this,a),a.yd=null;else if(this.na===Vn.Grid||this.na===Vn.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},Ee.nk=function(){return!0},Ee.$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 Dt.prototype.$o.call(this,a,y,x,E)},Ee.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,ue=-ee.m12*re,de=-ee.m21*re,pe=ee.m11*re,Se=re*(ee.m21*ee.dy-ee.m22*ee.dx),Pe=re*(ee.m12*ee.dx-ee.m11*ee.dy);if(this.areaBackground!==null)return ee=this.actualBounds,ze.Ff(ee.left,ee.top,ee.right,ee.bottom,a,y,x,E,b);if(this.background!==null)return z=a*oe+y*de+Se,re=a*ue+y*pe+Pe,a=x*oe+E*de+Se,oe=x*ue+E*pe+Pe,b.h(0,0),x=this.naturalBounds,z=ze.Ff(0,0,x.width,x.height,z,re,a,oe,b),b.transform(ee),z;z||(oe=1,de=ue=0,pe=1,Pe=Se=0),re=a*oe+y*de+Se,a=a*ue+y*pe+Pe,oe=x*oe+E*de+Se,x=x*ue+E*pe+Pe,b.h(oe,x),E=(oe-re)*(oe-re)+(x-a)*(x-a),ue=!1,pe=this.O.s,Pe=pe.length,de=tt.alloc(),Se=null,y=1/0;var Le=null,De=this.isClipping&&this.na===Vn.Spot;De&&(Le=tt.alloc(),Se=this.Pb(),(ue=Se.Sj(re,a,oe,x,Le))&&(y=(re-Le.x)*(re-Le.x)+(a-Le.y)*(a-Le.y)));for(var qe=0;qe<Pe;qe++){var Ze=pe[qe];Ze.visible&&Ze!==Se&&Ze.Sj(re,a,oe,x,de)&&(ue=!0,Ze=(re-de.x)*(re-de.x)+(a-de.y)*(a-de.y),Ze<E&&(E=Ze,b.set(de)))}return De&&(y>E&&b.set(Le),tt.free(Le)),tt.free(de),z&&b.transform(ee),ue},Ee.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Dt.prototype.Gj.call(this)},Ee.v=function(a){if(!rt(this)){Dt.prototype.v.call(this,a),a=null,(this.na===Vn.Auto||this.na===Vn.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=oc(b,!1);(b instanceof gc||b instanceof Vn||b instanceof Bs||z!==Tn)&&b.v(!0)}}}},Ee.Uj=function(){if(!rt(this)){it(this,!0),Ft(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},Ee.Uk=function(){if(!(this.l&2048)){Ae(this,!0),je(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},Ee.Wu=function(){je(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},Ee.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 ue=this.O.s;ue.length!==0&&this.na.measure(this,a,y,ue,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),Gl(b,a,oe),Gl(this.naturalBounds,a,oe),this.Ge(0,0,a,oe)},Ee.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 Zh(a){return a.part!==null?a.part.locationObject:null}Ee.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=oc(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=Tn),a){case Tn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case Hn:this.v(!0),this.measure(x+re,E+ee,0,0);break;case dr:this.v(!0),this.measure(x+re,z+ee,0,0);break;case Mr:this.v(!0),this.measure(y+re,E+ee,0,0)}}this.na.arrange(this,b,this.jg)}},Ee.gh=function(a){var y=this.naturalBounds,x=Zh(this);if(Oa(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=tt.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(ws(b.set(a),z.transform),z.ca(b)))return tt.free(b),!0}return tt.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},Ee.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},Ee.qm=function(a,y){if(y(this,a),a instanceof Vn){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function ag(a,y){s1(a,a,y)}function s1(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 Vn&&s1(a,z,x)}}function vx(a,y){l1(a,a,y)}function l1(a,y,x){if(x(y),y instanceof Vn){y=y.O.s;for(var E=y.length,b=0;b<E;b++)l1(a,y[b],x)}}Ee.Nl=function(a){return u1(this,this,a)};function u1(a,y,x){if(x(y))return y;if(y instanceof Vn){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=u1(a,y[b],x);if(z!==null)return z}}return null}Ee.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=Up(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof Vn){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function c1(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof Vn?x=Math.max(x,c1(b)):b instanceof bo&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}Ee.se=function(){return!(this.type===Vn.TableRow||this.type===Vn.TableColumn)};function lf(a){return a.type===Vn.TableRow||a.type===Vn.TableColumn}Ee.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),vt(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),ee=z?a:ws(tt.allocAt(a.x,a.y),this.transform),re=this.diagram,oe=10,ue=5;if(re!==null&&(oe=re.Ql("extraTouchArea"),ue=oe/2),Oa(-(ue*b),-(ue*b),E.width+oe*b,E.height+oe*b,ee.x,ee.y)){if(!this.isAtomic){b=this.O.s;var de=b.length;if(re=tt.alloc(),ue=(oe=this.isClipping&&this.na===Vn.Spot)?this.Pb():null,oe&&(ue.se()?ws(re.set(a),ue.transform):re.set(a),!ue.ca(re)))return tt.free(re),z||tt.free(ee),null;for(var pe=Zh(this);de--;){var Se=b[de];if((Se.visible||Se===pe)&&(Se.se()?ws(re.set(a),Se.transform):re.set(a),!oe||Se!==ue)){var Pe=null;if(Se instanceof Vn?Pe=Se.ic(re,y,x):Se.pickable===!0&&Se.ca(re)&&(Pe=Se),Pe!==null&&(y!==null&&(Pe=y(Pe)),Pe!==null&&(x===null||x(Pe))))return tt.free(re),z||tt.free(ee),Pe}}tt.free(re)}return this.background===null&&this.areaBackground===null?(z||tt.free(ee),null):(a=Oa(0,0,E.width,E.height,ee.x,ee.y)?this:null,z||tt.free(ee),a)}return z||tt.free(ee),null},Ee.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:ws(tt.allocAt(a.x,a.y),this.transform);if(b=Oa(0,0,b.width,b.height,ee.x,ee.y),lf(this)||b){if(!this.isAtomic){for(var re=this.O.s,oe=re.length,ue=tt.alloc(),de=Zh(this);oe--;){var pe=re[oe];if(pe.visible||pe===de){pe.se()?ws(ue.set(a),pe.transform):ue.set(a);var Se=pe;pe=pe instanceof Vn?pe:null,(pe!==null?pe.ji(ue,y,x,E):Se.ca(ue))&&Se.pickable!==!1&&(y!==null&&(Se=y(Se)),Se===null||x!==null&&!x(Se)||E.add(Se))}}tt.free(ue)}return z||tt.free(ee),b&&(this.background!==null||this.areaBackground!==null)}return z||tt.free(ee),!1},Ee.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=St.alloc(),ee.reset()),ee.multiply(this.transform),this.fh(a,ee))return Fv(this,y,x,b),z===void 0&&St.free(ee),!0;if(this.Yc(a,ee)){if(!this.isAtomic)for(var re=Zh(this),oe=this.O.s,ue=oe.length;ue--;){var de=oe[ue];if(de.visible||de===re){var pe=de.actualBounds,Se=this.naturalBounds;pe.x>Se.width||pe.y>Se.height||0>pe.x+pe.width||0>pe.y+pe.height||(pe=de,de=de instanceof Vn?de:null,Se=St.alloc(),Se.set(ee),(de!==null?de.Cf(a,y,x,E,b,Se):Ul(pe,a,E,Se))&&(y!==null&&(pe=y(pe)),pe===null||x!==null&&!x(pe)||b.add(pe)),St.free(Se))}}return z===void 0&&St.free(ee),E}return z===void 0&&St.free(ee),!1};function Fv(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 Vn&&Fv(ee,y,x,E),y!==null&&(ee=y(ee)),ee===null||x!==null&&!x(ee)||E.add(ee))}}}Ee.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:ws(tt.allocAt(a.x,a.y),this.transform),ue=re?y:ws(tt.allocAt(y.x,y.y),this.transform),de=oe.Bf(ue),pe=0<oe.x&&oe.x<ee.width&&0<oe.y&&oe.y<ee.height||Js(oe.x,oe.y,0,0,0,ee.height)<=de||Js(oe.x,oe.y,0,ee.height,ee.width,ee.height)<=de||Js(oe.x,oe.y,ee.width,ee.height,ee.width,0)<=de||Js(oe.x,oe.y,ee.width,0,0,0)<=de;if(ee=oe.zd(0,0)<=de&&oe.zd(0,ee.height)<=de&&oe.zd(ee.width,0)<=de&&oe.zd(ee.width,ee.height)<=de,re||(tt.free(oe),tt.free(ue)),pe){if(!this.isAtomic){oe=tt.alloc(),ue=tt.alloc(),de=Zh(this);for(var Se=this.O.s,Pe=Se.length;Pe--;){var Le=Se[Pe];if(Le.visible||Le===de){var De=Le.actualBounds,qe=this.naturalBounds;(!re||!(De.x>qe.width||De.y>qe.height||0>De.x+De.width||0>De.y+De.height))&&(Le.se()?(De=Le.transform,ws(oe.set(a),De),ws(ue.set(y),De)):(oe.set(a),ue.set(y)),De=Le,Le=Le instanceof Vn?Le:null,(Le!==null?Le.og(oe,ue,x,E,b,z):De.tx(oe,ue,b))&&(x!==null&&(De=x(De)),De===null||E!==null&&!E(De)||z.add(De)))}}tt.free(oe),tt.free(ue)}return b?pe:ee}return!1};function Lv(a){var y=null;return a instanceof bo&&(y=a.spot1,y===qi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Fl),y}function Mv(a){var y=null;return a instanceof bo&&(y=a.spot2,y===qi&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=un),y}Ee.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},Ee.M=function(a){return this.O.M(a)},Ee.Gb=function(a,y){y instanceof xr&&Wt("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&Wt("Cannot make a Panel contain itself: "+this.toString()),Wt("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&Wt("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!==Vn.Grid||y instanceof bo||Wt("Can only add Shapes to a Grid Panel, not: "+y),this.na!==Vn.Graduated||y instanceof bo||y instanceof Bs||Wt("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 sr),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 Wt("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),rt(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof Vn&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||Jm(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof xi&&(x.Te=!0),x.Te&&x instanceof xi&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(ka,"elements",this,y,null,E,null),x.cb(aa,"elements",this,null,y,null,a)))};function Av(a,y){a.l=y?a.l|16777216:a.l&-16777217}Ee.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)},Ee.mb=function(a){0<=a&&this.pc(a,!0)},Ee.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),it(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 xi&&(E instanceof Vn?E.qm(E,function(ee,re){$v(z,re,y)}):$v(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ka,"elements",this,E,null,a,null))},Ee.Fb=function(a){0>a&&pr(a,">= 0",Vn,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Kl;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(aa,"rowdefs",this,null,x,null,a)}return y[a]},Ee.oA=function(a){if(0>a&&pr(a,">= 0",Vn,"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(ka,"rowdefs",this,x,null,a,null),this.v()}}};function d1(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Kl?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ee.Eb=function(a){0>a&&pr(a,">= 0",Vn,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Kl;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(aa,"coldefs",this,null,x,null,a)}return y[a]},Ee.jA=function(a){if(0>a&&pr(a,">= 0",Vn,"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(ka,"coldefs",this,x,null,a,null),this.v()}}};function h1(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Kl?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}Ee.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&$m(y,a),this},Ee.Hy=function(a,y){return(a=this.Fb(a))&&$m(a,new Kl(y)),this},Ee.By=function(a,y){return(a=this.Eb(a))&&$m(a,new Kl(y)),this},Ee.nz=function(a){if(0>a||this.type!==Vn.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},Ee.fz=function(a){if(0>a||this.type!==Vn.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},Ee.Fz=function(a,y){if(y===void 0&&(y=new tt(NaN,NaN)),this.type!==Vn.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)},Ee.Gz=function(a){if(this.type!==Vn.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function f1(a){return a=a.allBindings,a!==null&&a._isFrozen}function Fd(a){var y=a.allBindings;if(y===null)a.data!==null&&Wt("Template cannot have .data be non-null: "+a),a.allBindings=y=new Un;else if(y._isFrozen)return;var x=new Un;Av(a,!1),a.qm(a,function(ue,de){de.th();var pe=de.localBindings;if(pe!==null)for(xe(de,!1),pe=pe.iterator;pe.next();){var Se=pe.value;Se.mode===gm&&xe(de,!0);var Pe=Se.sourceName;Pe!==null&&(Pe==="/"&&Av(ue,!0),Pe=LS(Se,ue,de),Pe!==null&&(x.add(Pe),Pe.srcBindings===null&&(Pe.srcBindings=new Un),Pe.srcBindings.add(Se))),y.add(Se)}if(de instanceof Vn&&de.type===Vn.Table){if(0<de.rowCount){for(ue=de.rowDefs,pe=ue.length,Se=0;Se<pe;Se++)if(Pe=ue[Se],Pe!==void 0&&Pe.be!==null)for(var Le=Pe.be.iterator;Le.next();){var De=Le.value;De.xd=Pe,De.to=2,De.wl=Pe.index,y.add(De)}}if(0<de.columnCount){for(de=de.colDefs,ue=de.length,pe=0;pe<ue;pe++)if(Se=de[pe],Se!==void 0&&Se.be!==null)for(Pe=Se.be.iterator;Pe.next();)Le=Pe.value,Le.xd=Se,Le.to=1,Le.wl=Se.index,y.add(Le)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){xe(b,!0);for(var z=b.srcBindings.iterator;z.next();){var ee=z.value;b.localBindings===null&&(b.localBindings=new Un),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 Vn&&(ee=re.substring(0,oe),re=re.substr(oe+1),oe=z.fb(ee),oe!==null?(z=oe,b.targetProperty=re):Ro('Warning: unable to find GraphObject named "'+ee+'" for Binding: '+b.toString())),z instanceof Kl?(ee=No(z.panel),b.Ai=ee===void 0?-1:ee,z.panel.bindingId=b.Ai):z instanceof Dt?(ee=No(z),b.Ai=ee===void 0?-1:ee,z.bindingId=b.Ai):Wt("Unknown type of binding target: "+z)}y.freeze(),a instanceof xr&&a.Zc()&&a.Va()}Ee.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return vx(y,function(x){x instanceof Vn&&(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&&Fd(y),y},Ee.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 Vn))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},Ee.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 Vn&&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 Vn)||z.data!==y[ee])return!0;b++,ee++}return!1}function Up(a){if(a.type===Vn.Spot||a.type===Vn.Auto)return Math.min(a.O.length,1);if(a.type===Vn.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof bo&&E.isPanelMain))break}return x}return a.type===Vn.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof Vn&&lf(a))?1:0}Ee.mv=function(){for(var a=Up(this);this.O.length>a;)this.pc(this.O.length-1,!1);g1(this,this.itemArray)};function g1(a,y){var x=Up(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++)Qm(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 Vn){if(ee.data!==z){var re=Bv(a,ee.data),oe=Bv(a,z),ue=oe!==re;ue||(re=kv(a,re),ue=kv(a,oe)!==re),ue?(a.pc(E,!1),Qm(a,z,b,!1)):ee.data=z}}else Qm(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Nv(a,x,0),rt(a)||a.v(),a.graduatedIntervals=null,a.If()||Jm(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof xi&&(y.Te=!0),y.Te&&y instanceof xi&&(y.wc=null))}}function Qm(a,y,x,E){if(!(y==null||0>x)){var b=Bv(a,y);if(b=kv(a,b),b!==null){if(Fd(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Av(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new sr),a.ge.add(y,b)),z=x+Up(a),a.Gb(z,b),E&&(b.ub=y,Nv(a,z,x),b.ub=null),b.data=y}}}function Nv(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof Vn){var b=y,z=x;E.type===Vn.TableRow?E.row=b:E.type===Vn.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Bv(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=Bl(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;Wt("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function kv(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(p1||(p1=!0,Ro('No item template Panel found for category "'+y+'" on '+a),Ro(" Using default item template."),a=new Vn,y=new Bs,y.bind(new Tl("text","",xa)),a.add(y),m1=a),E=m1)),E}function Jm(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof Vn){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof Vn&&!z.isEnabled||Jm(a,z,x)}}}function lh(a,y){y.name=a,Od.add(a,y)}dn.Object.defineProperties(Vn.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===Vn.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&&pr(a,">= 0",Vn,"padding"),a=new oo(a)):(0>a.left&&pr(a.left,">= 0",Vn,"padding:value.left"),0>a.right&&pr(a.right,">= 0",Vn,"padding:value.right"),0>a.top&&pr(a.top,">= 0",Vn,"padding:value.top"),0>a.bottom&&pr(a.bottom,">= 0",Vn,"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:iu},set:function(a){typeof a=="number"&&(a=new oo(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new md),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 Ca)&&(a instanceof Ca&&a.freeze(),this.T===null&&(this.T=new md),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 md),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)||Wt("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 md),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 Ca)&&(a instanceof Ca&&a.freeze(),this.T===null&&(this.T=new md),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 md),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)||Wt("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 md),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 md),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||Wt("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&mu(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()||Wt("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&mu(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 Vh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),ve(this)&&(a=this.part,a!==null&&Rs(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 Vh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),ve(this)&&(a=this.part,a!==null&&Rs(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 Vh),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 Vh),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 Vh,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 Vh,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 Vh,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 Vh,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 md),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new md),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:e0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new md),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:e0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new md),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)&&Wt("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new md),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)&&Wt("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new md),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 xr&&!(this instanceof Fa);Fd(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Jn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof xr&&(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 Hr),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&&yy(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&vy(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||g1(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 sr}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof xr||a.isPanelMain)&&Wt("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(););Ao(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&&(Ao(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 po&&(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&&Jm(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))}}}),dn.Object.defineProperties(Vn,{Position:{get:function(){return Od.I("Position")}},Horizontal:{get:function(){return Od.I("Horizontal")}},Vertical:{get:function(){return Od.I("Vertical")}},Spot:{get:function(){return Od.I("Spot")}},Auto:{get:function(){return Od.I("Auto")}},Table:{get:function(){return Od.I("Table")}},Viewbox:{get:function(){return Od.I("Viewbox")}},TableRow:{get:function(){return Od.I("TableRow")}},TableColumn:{get:function(){return Od.I("TableColumn")}},Link:{get:function(){return Od.I("Link")}},Grid:{get:function(){return Od.I("Grid")}},Graduated:{get:function(){return Od.I("Graduated")}}}),Vn.prototype.rebuildItemElements=Vn.prototype.mv,Vn.prototype.findItemPanelForData=Vn.prototype.sx,Vn.prototype.updateTargetBindings=Vn.prototype.La,Vn.prototype.copyTemplate=Vn.prototype.Uy,Vn.prototype.graduatedValueForPoint=Vn.prototype.Gz,Vn.prototype.graduatedPointForValue=Vn.prototype.Fz,Vn.prototype.findColumnForLocalX=Vn.prototype.fz,Vn.prototype.findRowForLocalY=Vn.prototype.nz,Vn.prototype.addColumnDefinition=Vn.prototype.By,Vn.prototype.addRowDefinition=Vn.prototype.Hy,Vn.prototype.addRowColumnDefinition=Vn.prototype.Gy,Vn.prototype.removeColumnDefinition=Vn.prototype.jA,Vn.prototype.getColumnDefinition=Vn.prototype.Eb,Vn.prototype.removeRowDefinition=Vn.prototype.oA,Vn.prototype.getRowDefinition=Vn.prototype.Fb,Vn.prototype.removeAt=Vn.prototype.mb,Vn.prototype.remove=Vn.prototype.remove,Vn.prototype.insertAt=Vn.prototype.Gb,Vn.prototype.elt=Vn.prototype.M,Vn.prototype.add=Vn.prototype.add,Vn.prototype.findObject=Vn.prototype.fb,Vn.prototype.findInVisualTree=Vn.prototype.Nl,Vn.prototype.walkVisualTreeFrom=Vn.prototype.qm,Vn.prototype.findMainElement=Vn.prototype.Pb;var p1=!1,m1=null,Od=new sr;Vn.className="Panel",Vn.definePanelLayout=lh,lh("Position",new Rm),lh("Vertical",new zm),lh("Auto",new Hm),lh("Link",new Ym);function Vh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}Vh.prototype.copy=function(){var a=new Vh;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},Vh.className="GradPanelSettings";function md(){this.Pc=[],this.Oc=[],this.j=this.ob=e0,this.hb=this.Hb=0,this.Qp=iu,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}md.prototype.copy=function(a){for(var y=new md,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},md.className="TablePanelSettings";function Kl(a){_a(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=qi,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Dv,this.hg=ao,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))}Kl.prototype.copy=function(){var a=new Kl;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=Pi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function $m(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=Pi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}Ee=Kl.prototype,Ee.qb=function(a){a.classType===Kl&&(this.sizing=a)},Ee.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+No(this)},Ee.wi=function(a){this.Me=a},Ee.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)},Ee.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===Vn.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)},Ee.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(mo,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 qm(a){if(a.sizing===Dv){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}Ee.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Tl(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&f1(y)&&Wt("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new Un),this.be.add(b),this},dn.Object.defineProperties(Kl.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&&pr(a,">= 0",Kl,"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&&pr(a,">= 0",Kl,"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))&&pr(a,">= 0",Kl,"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&&pr(a,">= 0",Kl,"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 oo(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&&Bf(a,"RowColumnDefinition.separatorStroke"),a instanceof Ca&&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)||Wt("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&&Bf(a,"RowColumnDefinition.background"),a instanceof Ca&&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}}}),Kl.prototype.computeEffectiveSpacing=Kl.prototype.Wc,Kl.prototype.computeEffectiveSpacingTop=Kl.prototype.Io;var Dv=new Qt(Kl,"Default",0),Kp=new Qt(Kl,"None",1),e0=new Qt(Kl,"ProportionalExtra",2);Kl.className="RowColumnDefinition",Kl.Default=Dv,Kl.None=Kp,Kl.ProportionalExtra=e0;function bo(a,y){Dt.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)}It(bo,Dt),bo.prototype.cloneProtected=function(a){Dt.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=Pi(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 sg(a){a.Na===null?a.Na=new Ov:a.Na.nc&&(a.Na=a.Na.copy())}Ee=bo.prototype,Ee.th=function(){Dt.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},Ee.qb=function(a){a===Tn||a===ir||a===qo||a===ao?this.geometryStretch=a:Dt.prototype.qb.call(this,a)},Ee.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+No(this)};function cp(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],ue,de,pe,Se,Pe,Le,De=0,qe=Ar(),Ze=2;Ze<b;Ze+=2)ue=x[Ze],de=x[Ze+1],pe=ue-re,re=de-oe,pe===0&&(pe=.001),Se=re/pe,Pe=Math.atan2(re,pe),Le=Math.sqrt(pe*pe+re*re),qe.push([pe,Pe,Se,Le]),De+=Le,re=ue,oe=de;re=x[0],oe=x[1],pe=E.measuredBounds.width,E instanceof bo&&(pe-=E.strokeWidth),1>pe&&(pe=1),b=x=pe,ue=ee/2,de=ue!==0,Ze=0,Le=qe[Ze],pe=Le[0],Pe=Le[1],Se=Le[2],Le=Le[3];for(var ct=0;.1<=De;){if(ct===0&&(de?(b=x,b-=ue,De-=ue,de=!1):b=x,b===0&&(b=1)),b>De){br(qe);return}b>Le?(ct=b-Le,b=Le):ct=0;var ft=Math.sqrt(b*b/(1+Se*Se));if(0>pe&&(ft=-ft),re+=ft,oe+=Se*ft,a.translate(re,oe),a.rotate(Pe),a.translate(-(ee/2),-(z/2)),ct===0&&E.hh(a,y),a.translate(ee/2,z/2),a.rotate(-Pe),a.translate(-re,-oe),De-=b,Le-=b,ct!==0){if(Ze++,Ze===qe.length){br(qe);return}Le=qe[Ze],pe=Le[0],Pe=Le[1],Se=Le[2],Le=Le[3],b=ct}}br(qe)}}Ee.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&&cl(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===Vn.Link&&re instanceof Fa&&re.category==="Selection"&&re.adornedObject instanceof bo&&re.adornedPart.Pb()===re.adornedObject?re.adornedObject.strokeWidth:0),oe===0&&(x=null),x!==null&&oe!==0&&(cl(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===dt.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===dt.u){var ue=b.startX;oe=b.startY;var de=b.endX,pe=b.endY;b=Math.min(ue,de);var Se=Math.min(oe,pe);ue=Math.abs(de-ue),oe=Math.abs(pe-oe),a.beginPath(),a.rect(b,Se,ue,oe),E!==null&&a.ng(E),x!==null&&(re&&z&&ac(a),a.jk(),re&&z&&Pu(a)),a.Se()}else if(b.type===dt.F)ue=b.startX,oe=b.startY,de=b.endX,pe=b.endY,b=Math.abs(de-ue)/2,Se=Math.abs(pe-oe)/2,ue=Math.min(ue,de)+b,oe=Math.min(oe,pe)+Se,a.beginPath(),a.moveTo(ue,oe-Se),a.bezierCurveTo(ue+ze.wg*b,oe-Se,ue+b,oe-ze.wg*Se,ue+b,oe),a.bezierCurveTo(ue+b,oe+ze.wg*Se,ue+ze.wg*b,oe+Se,ue,oe+Se),a.bezierCurveTo(ue-ze.wg*b,oe+Se,ue-b,oe+ze.wg*Se,ue-b,oe),a.bezierCurveTo(ue-b,oe-ze.wg*Se,ue-ze.wg*b,oe-Se,ue,oe-Se),a.closePath(),E!==null&&a.ng(E),x!==null&&(re&&z&&ac(a),a.jk(),re&&z&&Pu(a)),a.Se();else if(b.type===dt.o)for(b=b.figures,oe=b.length,Se=0;Se<oe;Se++){ue=b.s[Se],a.beginPath(),a.moveTo(ue.startX,ue.startY),de=ue.segments.s,pe=de.length;for(var Pe=null,Le=0;Le<pe;Le++){var De=de[Le];switch(De.type){case vi:a.moveTo(De.endX,De.endY);break;case Ai:a.lineTo(De.endX,De.endY);break;case Or:a.bezierCurveTo(De.point1X,De.point1Y,De.point2X,De.point2Y,De.endX,De.endY);break;case Ur:a.quadraticCurveTo(De.point1X,De.point1Y,De.endX,De.endY);break;case Fr:if(De.radiusX===De.radiusY){var qe=Math.PI/180;a.arc(De.point1X,De.point1Y,De.radiusX,De.startAngle*qe,(De.startAngle+De.sweepAngle)*qe,0>De.sweepAngle,Pe!==null?Pe.endX:ue.startX,Pe!==null?Pe.endY:ue.startY)}else if(Pe=zo(De,ue),qe=Pe.length,qe===0)a.lineTo(De.centerX,De.centerY);else for(var Ze=0;Ze<qe;Ze++){var ct=Pe[Ze];Ze===0&&a.lineTo(ct[0],ct[1]),a.bezierCurveTo(ct[2],ct[3],ct[4],ct[5],ct[6],ct[7])}break;case ko:if(Ze=qe=0,Pe!==null&&Pe.type===Fr){if(Pe=zo(Pe,ue),ct=Pe.length,ct===0){a.lineTo(De.endX,De.endY);break}Pe=Pe[ct-1]||null,Pe!==null&&(qe=Pe[6],Ze=Pe[7])}else qe=Pe!==null?Pe.endX:ue.startX,Ze=Pe!==null?Pe.endY:ue.startY;if(Pe=Ii(De,ue,qe,Ze),qe=Pe.length,qe===0){a.lineTo(De.endX,De.endY);break}for(Ze=0;Ze<qe;Ze++)ct=Pe[Ze],a.bezierCurveTo(ct[2],ct[3],ct[4],ct[5],ct[6],ct[7]);break;default:Wt("Segment not of valid type: "+De.type)}De.isClosed&&a.closePath(),Pe=De}de=ue.isFilled,z?ue.isShadowed?(de===!0&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&(de&&re&&ac(a),a.jk(),de&&re&&Pu(a))):(ac(a),de&&E!=="transparent"&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk(),Pu(a)):(de&&E!==null&&a.ng(E,ue.isEvenOdd),x!==null&&a.jk()),a.Se(Se)}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=Ar(),z.type===dt.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),cp(a,y,E,x);else if(z.type===dt.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,Se=b,ue=re.segments.s,de=ue.length,pe=0;pe<de;pe++){switch(Le=ue[pe],Le.type){case vi:cp(a,y,E,x),E.length=0,E.push(Le.endX),E.push(Le.endY),ee=Le.endX,b=Le.endY,oe=ee,Se=b;break;case Ai:E.push(Le.endX),E.push(Le.endY),ee=Le.endX,b=Le.endY;break;case Or:ze.Qe(ee,b,Le.point1X,Le.point1Y,Le.point2X,Le.point2Y,Le.endX,Le.endY,.5,E),ee=Le.endX,b=Le.endY;break;case Ur:ze.ep(ee,b,Le.point1X,Le.point1Y,Le.endX,Le.endY,.5,E),ee=Le.endX,b=Le.endY;break;case Fr:if(De=zo(Le,re),Pe=De.length,Pe===0){E.push(Le.centerX),E.push(Le.centerY),ee=Le.centerX,b=Le.centerY;break}for(qe=0;qe<Pe;qe++)Ze=De[qe],ze.Qe(ee,b,Ze[2],Ze[3],Ze[4],Ze[5],Ze[6],Ze[7],.5,E),ee=Ze[6],b=Ze[7];break;case ko:if(De=Ii(Le,re,ee,b),Pe=De.length,Pe===0){E.push(Le.endX),E.push(Le.endY),ee=Le.endX,b=Le.endY;break}for(qe=0;qe<Pe;qe++)Ze=De[qe],ze.Qe(ee,b,Ze[2],Ze[3],Ze[4],Ze[5],Ze[6],Ze[7],.5,E),ee=Ze[6],b=Ze[7];break;default:Wt("Segment not of valid type: "+Le.type)}Le.isClosed&&(E.push(oe),E.push(Se),cp(a,y,E,x))}cp(a,y,E,x)}else if(z.type===dt.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),cp(a,y,E,x);else if(z.type===dt.F){if(b=new Vr,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,ee=new mr(Fr),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=zo(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++)Se=z[oe],ze.Qe(ee,b,Se[2],Se[3],Se[4],Se[5],Se[6],Se[7],.5,E),ee=Se[6],b=Se[7];cp(a,y,E,x)}br(E),a.restore(),a.Vc(!1)}}}},Ee.kk=function(a,y,x){return!Dt.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)},Ee.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Dt.prototype.nk.call(this,a)},Ee.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)}},Ee.ga=function(a,y){if(y===void 0&&(y=new tt),a instanceof fr){a.Mc()&&Wt("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},Ee.mi=function(a){a===void 0&&(a=new ln);var y=this.naturalBounds,x=this.oe;y=ln.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=tt.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Ws(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Ws(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Ws(a,E.x,E.y,0,0),ln.free(y),tt.free(E),a},Ee.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!==dt.j||y||(b+=2);var z=ln.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return ln.free(z),!1;if(E=b+1e-4,x.type===dt.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:(ln.free(z),ze.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===dt.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 ln.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),ln.free(z),a}if(x.type===dt.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 ln.free(z),!1;ee+=E,b+=E}return this.stroke!==null&&(ee+=E,b+=E),ln.free(z),0>=ee||0>=b?!1:1>=x*x/(ee*ee)+y*y/(b*b)}if(x.type===dt.o)return ln.free(z),this.fill===null?Yn(x,a.x,a.y,b):kr(x,a,b,1<this.strokeWidth,y);Wt("Unknown Geometry type: "+x.type)},Ee.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=_v[re];if(oe===void 0){var ue=ze.Ze[re];typeof ue=="string"&&(ue=ze.Ze[ue]),typeof ue=="function"?(oe=ue(null,100,100),_v[re]=oe):Wt("Unsupported Figure: "+re)}ee=oe.bounds}re=ee.width,oe=ee.height,ue=ee.width;var de=ee.height;switch(oc(this,!0)){case Tn:E=x=0;break;case Hn:ue=Math.max(a-z,0),de=Math.max(y-z,0);break;case dr:ue=Math.max(a-z,0),E=0;break;case Mr:x=0,de=Math.max(y-z,0)}isFinite(b.width)&&(ue=b.width),isFinite(b.height)&&(de=b.height);var pe=this.maxSize,Se=this.minSize;switch(x=Math.max(x-z,Se.width),E=Math.max(E-z,Se.height),ue=Math.min(pe.width,ue),de=Math.min(pe.height,de),ue=isFinite(ue)?Math.max(x,ue):Math.max(re,x),de=isFinite(de)?Math.max(E,de):Math.max(oe,E),x=Tv(this),x){case Tn:break;case Hn:re=ue,oe=de;break;case ir:x=Math.min(ue/re,de/oe),isFinite(x)||(x=1),re*=x,oe*=x;break;default:Wt(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&&ze.$(this.ua.Sk,a-z)&&ze.$(this.ua.Rk,y-z)||(this.ua=bo.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),ue+z,de+z),b.w()?(ue=b.width,de=b.height,ue=Math.min(pe.width,ue),de=Math.min(pe.height,de),ue=Math.max(Se.width,ue),de=Math.max(Se.height,de),this.dc.h(0,0,ue,de)):this.dc.assign(ee)};function Tv(a){var y=a.geometryStretch;return a.Rd!==null?y===ao?Hn:y:y===ao?_v[a.figure].defaultStretch:y}Ee.eh=function(a,y,x,E){Xu(this,a,y,x,E)},Ee.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},Ee.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,ue=-z.m21*ee,de=z.m11*ee,pe=ee*(z.m21*z.dy-z.m22*z.dx),Se=ee*(z.m12*z.dx-z.m11*z.dy);z=a*re+y*ue+pe,ee=a*oe+y*de+Se,re=x*re+E*ue+pe,oe=x*oe+E*de+Se,pe=this.ig/2,ue=this.ua,ue===null&&(this.measure(1/0,1/0),ue=this.ua);var Pe=ue.bounds;if(de=!1,ue.type===dt.j)if(1.5>=this.strokeWidth)de=ze.Ve(ue.startX,ue.startY,ue.endX,ue.endY,z,ee,re,oe,b);else{if(ue.startX===ue.endX?(E=pe,de=0):(y=(ue.endY-ue.startY)/(ue.endX-ue.startX),de=pe/Math.sqrt(1+y*y),E=de*y),y=Ar(),a=new tt,ze.Ve(ue.startX+E,ue.startY+de,ue.endX+E,ue.endY+de,z,ee,re,oe,a)&&y.push(a),a=new tt,ze.Ve(ue.startX-E,ue.startY-de,ue.endX-E,ue.endY-de,z,ee,re,oe,a)&&y.push(a),a=new tt,ze.Ve(ue.startX+E,ue.startY+de,ue.startX-E,ue.startY-de,z,ee,re,oe,a)&&y.push(a),a=new tt,ze.Ve(ue.endX+E,ue.endY+de,ue.endX-E,ue.endY-de,z,ee,re,oe,a)&&y.push(a),re=y.length,re===0)return br(y),!1;for(de=!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);br(y)}else if(ue.type===dt.u)de=ze.Ff(Pe.x-pe,Pe.y-pe,Pe.x+Pe.width+pe,Pe.y+Pe.height+pe,z,ee,re,oe,b);else if(ue.type===dt.F){y=ln.allocAt(Pe.x,Pe.y,Pe.width,Pe.height).Bc(pe,pe);e:if(y.width===0)de=ze.Ve(y.x,y.y,y.x,y.y+y.height,z,ee,re,oe,b);else if(y.height===0)de=ze.Ve(y.x,y.y,y.x+y.width,y.y,z,ee,re,oe,b);else{if(a=y.width/2,ue=y.height/2,E=y.x+a,de=y.y+ue,x=9999,z!==re&&(x=(ee-oe)/(z-re)),9999>Math.abs(x)){if(oe=ee-de-x*(z-E),0>a*a*x*x+ue*ue-oe*oe){b.x=NaN,b.y=NaN,de=!1;break e}pe=Math.sqrt(a*a*x*x+ue*ue-oe*oe),re=(-(a*a*x*oe)+a*ue*pe)/(ue*ue+a*a*x*x)+E,a=(-(a*a*x*oe)-a*ue*pe)/(ue*ue+a*a*x*x)+E,ue=x*(re-E)+oe+de,oe=x*(a-E)+oe+de,Math.abs((z-re)*(z-re))+Math.abs((ee-ue)*(ee-ue))<Math.abs((z-a)*(z-a))+Math.abs((ee-oe)*(ee-oe))?(b.x=re,b.y=ue):(b.x=a,b.y=oe)}else{if(re=ue*ue,oe=z-E,re-=re/(a*a)*oe*oe,0>re){b.x=NaN,b.y=NaN,de=!1;break e}oe=Math.sqrt(re),re=de+oe,oe=de-oe,Math.abs(re-ee)<Math.abs(oe-ee)?(b.x=z,b.y=re):(b.x=z,b.y=oe)}de=!0}ln.free(y)}else if(ue.type===dt.o){Se=tt.alloc();var Le=re-z,De=oe-ee,qe=Le*Le+De*De,Ze=z,ct=ee;if(0<qe&&Pe.contains(Ze,ct)&&(Se.x=Ze,Se.y=ct,this.ca(Se)))for(Le!==0&&.5>Math.abs(Le)?(De*=.5/Le,Le=.5):De!==0&&.5>Math.abs(De)&&(Le*=.5/De,De=.5),Ze-=Le,ct-=De;Pe.contains(Ze,ct);)Ze-=Le,ct-=De;for(b.x=re,b.y=oe,De=0;De<ue.figures.count;De++){var ft=ue.figures.s[De],yt=ft.isFilled?Ze:z,kt=ft.isFilled?ct:ee,Ut=ft.segments;Pe=ft.startX,Le=ft.startY;for(var gi=Pe,Qi=Le,Gi=0;Gi<Ut.count;Gi++){var Qn=Ut.s[Gi],An=Qn.type,so=Qn.endX,Wr=Qn.endY,Ta=!1;switch(An){case vi:gi=so,Qi=Wr;break;case Ai:Ta=n0(Pe,Le,so,Wr,yt,kt,re,oe,Se);break;case Or:Ta=ze.Eo(Pe,Le,Qn.point1X,Qn.point1Y,Qn.point2X,Qn.point2Y,so,Wr,yt,kt,re,oe,.6,Se);break;case Ur:Ta=ze.Eo(Pe,Le,Pe+2/3*(Qn.point1X-Pe),Le+2/3*(Qn.point1Y-Le),so+2/3*(Qn.point1X-so),Wr+2/3*(Qn.point1Y-Wr),so,Wr,yt,kt,re,oe,.6,Se);break;case Fr:case ko:An=Qn.type===Fr?zo(Qn,ft):Ii(Qn,ft,Pe,Le);var As=An.length;if(As===0){Ta=n0(Pe,Le,Qn.type===Fr?Qn.centerX:Qn.endX,Qn.type===Fr?Qn.centerY:Qn.endY,yt,kt,re,oe,Se);break}for(Wr=null,so=0;so<As;so++){if(Wr=An[so],so===0&&n0(Pe,Le,Wr[0],Wr[1],yt,kt,re,oe,Se)){var cu=t0(yt,kt,Se,qe,b);cu<qe&&(qe=cu,de=!0)}ze.Eo(Wr[0],Wr[1],Wr[2],Wr[3],Wr[4],Wr[5],Wr[6],Wr[7],yt,kt,re,oe,.6,Se)&&(cu=t0(yt,kt,Se,qe,b),cu<qe&&(qe=cu,de=!0))}so=Wr[6],Wr=Wr[7];break;default:Wt("Unknown Segment type: "+An)}Pe=so,Le=Wr,Ta&&(Ta=t0(yt,kt,Se,qe,b),Ta<qe&&(qe=Ta,de=!0)),Qn.isClosed&&(so=gi,Wr=Qi,n0(Pe,Le,so,Wr,yt,kt,re,oe,Se)&&(Qn=t0(yt,kt,Se,qe,b),Qn<qe&&(qe=Qn,de=!0)))}}z=x-a,ee=E-y,re=Math.sqrt(z*z+ee*ee),re!==0&&(z/=re,ee/=re),b.x-=z*pe,b.y-=ee*pe,tt.free(Se)}else Wt("Unknown Geometry type: "+ue.type);return de?(this.transform.Ga(b),!0):!1};function t0(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 n0(a,y,x,E,b,z,ee,re,oe){if(ze.$(a,x)&&ze.$(y,E)||ze.$(b,ee)&&ze.$(z,re))return!1;var ue=!1,de=(b-ee)*(y-E)-(z-re)*(a-x);return de===0?!1:(oe.x=((b*re-z*ee)*(a-x)-(b-ee)*(a*E-y*x))/de,oe.y=((b*re-z*ee)*(y-E)-(z-re)*(a*E-y*x))/de,(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||ze.$(oe.y,a))&&(oe.y<y||ze.$(oe.y,y))&&(ue=!0)):(y=a<x?a:x,a=a<x?x:a,(oe.x>y||ze.$(oe.x,y))&&(oe.x<a||ze.$(oe.x,a))&&(ue=!0)),ue)}Ee.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=tt.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)))),tt.free(z),b},Ee.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=St.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var ee=tt.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 tt.free(ee),!0;var re=tt.alloc(),oe=tt.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,lg(this,ee,re,oe)?y=!0:(ee.x=b,ee.y=a,ee.transform(x),lg(this,ee,re,oe)?y=!0:(re.x=E,re.y=a,re.transform(x),lg(this,ee,re,oe)?y=!0:(ee.x=E,ee.y=z,ee.transform(x),lg(this,ee,re,oe)&&(y=!0)))),tt.free(ee),St.free(x),tt.free(re),tt.free(oe),y};function lg(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)}Ee.tx=function(a,y,x){function E(qe,Ze){for(var ct=qe.length,ft=0;ft<ct;ft+=2)if(Ze.zd(qe[ft],qe[ft+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,ue=ee.x+ee.width;if(ee=ee.y+ee.height,Xr(a.x,a.y,re,oe)<=b&&Xr(a.x,a.y,ue,oe)<=b&&Xr(a.x,a.y,re,ee)<=b&&Xr(a.x,a.y,ue,ee)<=b)return!0}if(re=y.startX,oe=y.startY,ue=y.endX,ee=y.endY,y.type===dt.j){if(x=(re-ue)*(a.x-ue)+(oe-ee)*(a.y-ee),Js(a.x,a.y,re,oe,ue,ee)<=(0<=(ue-re)*(a.x-re)+(ee-oe)*(a.y-oe)&&0<=x?b:z))return!0}else{if(y.type===dt.u)return y=!1,x&&(y=Js(a.x,a.y,re,oe,re,ee)<=b||Js(a.x,a.y,re,oe,ue,oe)<=b||Js(a.x,a.y,ue,oe,ue,ee)<=b||Js(a.x,a.y,re,ee,ue,ee)<=b),y;if(y.type===dt.F){y=a.x-(re+ue)/2,z=a.y-(oe+ee)/2;var de=Math.abs(ue-re)/2,pe=Math.abs(ee-oe)/2;if(de===0||pe===0)return Js(a.x,a.y,re,oe,ue,ee)<=b;if(x){if(a=ze.$y(de,pe,y,z),a*a<=b)return!0}else return!(Xr(y,z,-de,0)>=b||Xr(y,z,0,-pe)>=b||Xr(y,z,0,pe)>=b||Xr(y,z,de,0)>=b)}else if(y.type===dt.o){if(ue=y.bounds,z=ue.x,re=ue.y,oe=ue.x+ue.width,ue=ue.y+ue.height,a.x>oe&&a.x<z&&a.y>ue&&a.y<re&&Js(a.x,a.y,z,re,z,ue)>b&&Js(a.x,a.y,z,re,oe,re)>b&&Js(a.x,a.y,oe,ue,z,ue)>b&&Js(a.x,a.y,oe,ue,oe,re)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?Yn(y,a.x,a.y,z):kr(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,de=z.startY,a.zd(ee,de)>b)return!1;for(re=z.segments.s,oe=re.length,ue=0;ue<oe;ue++)switch(pe=re[ue],pe.type){case vi:case Ai:if(ee=pe.endX,de=pe.endY,a.zd(ee,de)>b)return!1;break;case Or:var Se=Ar();if(ze.Qe(ee,de,pe.point1X,pe.point1Y,pe.point2X,pe.point2Y,pe.endX,pe.endY,.8,Se),ee=E(Se,a),br(Se),ee||(ee=pe.endX,de=pe.endY,a.zd(ee,de)>b))return!1;break;case Ur:if(Se=Ar(),ze.ep(ee,de,pe.point1X,pe.point1Y,pe.endX,pe.endY,.8,Se),ee=E(Se,a),br(Se),ee||(ee=pe.endX,de=pe.endY,a.zd(ee,de)>b))return!1;break;case Fr:case ko:Se=pe.type===Fr?zo(pe,z):Ii(pe,z,ee,de);var Pe=Se.length;if(Pe===0){if(ee=pe.type===Fr?pe.centerX:pe.endX,de=pe.type===Fr?pe.centerY:pe.endY,a.zd(ee,de)>b)return!1;break}pe=null;for(var Le=Ar(),De=0;De<Pe;De++)if(pe=Se[De],Le.length=0,ze.Qe(pe[0],pe[1],pe[2],pe[3],pe[4],pe[5],pe[6],pe[7],.8,Le),E(Le,a))return br(Le),!1;br(Le),pe!==null&&(ee=pe[6],de=pe[7]);break;default:Wt("Unknown Segment type: "+pe.type)}}return!0}}}return!1},Ee.qc=function(){this.ua=null},Ee.kq=function(){return this.ig};function v1(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=nm,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=Ho):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new fr(1-Ho.x,Ho.y)))}bo.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=Ch[a.toArrow];else a.fromArrow!=="None"?E=Ch[a.fromArrow]:(E=ze.Ze[a.figure],typeof E=="string"&&(E=ze.Ze[E]),E===void 0&&Wt("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=ze.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function y1(a){var y=Ch[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=Ch[x],y===void 0){var E=null,b;for(b in ze.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=dt.parse(ze.um[E],!1),Ch[E]=a,x!==E&&(Ch[x]=E),E}}return typeof y=="string"?y:y instanceof dt?a:null}dn.Object.defineProperties(bo.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),ve(this)&&(a=this.part,a!==null&&Rs(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=dt.parse(a);var y=a.normalize();this.geometry=a,this.position=a=tt.allocAt(-y.x,-y.y),tt.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&&Bf(a,"Shape.fill"),a instanceof Ca&&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&&Bf(a,"Shape.stroke"),a instanceof Ca&&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 pr(a,"value >= 0",bo,"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"?pr(a,'"butt", "round", or "square"',bo,"strokeCap"):(sg(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"?pr(a,'"miter", "bevel", or "round"',bo,"strokeJoin"):(sg(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){sg(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)||Wt("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&&(sg(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=ze.Ze[a];typeof x=="function"?x=a:(x=ze.Ze[a.toLowerCase()])||Wt("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=y1(a);x===null?Wt("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new eo),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),v1(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=y1(a);x===null?Wt("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new eo),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),v1(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:qi},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),sg(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:qi},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),sg(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&&(sg(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:ao},set:function(a){var y=this.geometryStretch;y!==a&&(sg(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 bh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&mu(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 bh),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 bh),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 bh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),bo.prototype.intersectsRect=bo.prototype.Yc,bo.prototype.containedInRect=bo.prototype.fh,bo.prototype.getNearestIntersectionPoint=bo.prototype.rs,bo.prototype.getDocumentBounds=bo.prototype.mi,bo.prototype.getDocumentPoint=bo.prototype.ga;var Ch=new to,_v=new to;bo.className="Shape",bo.getFigureGenerators=function(){var a=new sr,y;for(y in ze.Ze)y!==y.toLowerCase()&&a.add(y,ze.Ze[y]);return a.freeze(),a},bo.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=ze.Ze;E[a]=y,E[x]=a},bo.getArrowheadGeometries=function(){var a=new sr;for(E in ze.um)if(Ch[E]===void 0){var y=dt.parse(ze.um[E],!1);Ch[E]=y,y=E.toLowerCase(),y!==E&&(Ch[y]=E)}for(var x in Ch)if(x!==x.toLowerCase()){var E=Ch[x];E instanceof dt&&a.add(x,E)}return a.freeze(),a},bo.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=dt.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||Wt("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=Ch;E[a]=x,E[y]=a};function Ov(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=ao,this.gg=this.fg=qi}Ov.prototype.copy=function(){var a=new Ov;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 Bs(a,y){return Dt.call(this),s0||(Ac=ul?new Tu(null).context:null,s0=!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}It(Bs,Dt),Bs.prototype.cloneProtected=function(a){Dt.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 uh(a){a.da===null?a.da=new Wv:a.da.nc&&(a.da=a.da.copy())}Ee=Bs.prototype,Ee.th=function(){Dt.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function S1(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}Ee.qb=function(a){a.classType===Bs?this.wrap=a:Dt.prototype.qb.call(this,a)},Ee.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},Ee.v=function(){Dt.prototype.v.call(this)},Ee.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=Xp(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 ue=this.isStrikethrough;cl(this,a,this.xc,!0,!1,x,E),(oe||ue)&&cl(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var de=this.oe,pe=de.dx-(ee*de.m21+de.dx);de=de.dy-(ee*de.m22+de.dy);var Se=y.scale;switch(8>(pe*pe+de*de)*Se*Se&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Ja&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,pe=this.spacingBelow,this.flip){case ga:a.translate(b,0),a.scale(-1,1);break;case Mo:a.translate(0,z),a.scale(1,-1);break;case is:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),de=this.Gc,Se=(y+ee+pe)*de,z>Se&&(E=this.verticalAlignment,E=E.y*z-E.y*Se+E.offsetY),de===1&&this.ze!==null)pe=this.Cb,pe>b&&(pe=b),this.Oj(this.ze,a,0,E+y,b,ee,pe,x,re,oe,ue);else if(this.Qc!==null&&this.Qb!==null)for(Se=0;Se<de;Se++){var Pe=this.Qc[Se];Pe>b&&(Pe=b),E+=y,this.Oj(this.Qb[Se],a,0,E,b,ee,Pe,x,re,oe,ue),E+=ee+pe}switch(this.flip){case ga:a.scale(-1,1),a.translate(-b,0);break;case Mo:a.scale(1,-1),a.translate(0,-z);break;case is:a.scale(-1,-1),a.translate(-b,-z)}}},Ee.Oj=function(a,y,x,E,b,z,ee,re,oe,ue,de){var pe=0;if(re)oe==="left"?pe=0:oe==="right"?pe=b-ee:oe==="center"&&(pe=(b-ee)/2),y.fillRect(x+pe,E+.25*z,ee,1);else{if(oe==="left"?pe=0:oe==="right"?pe=b:oe==="center"&&(pe=b/2),b=i0!==null?i0(this,z):.75*z,y.fillText(a,x+pe,E+b),a=z/20|0,a===0&&(a=1),oe==="right"?pe-=ee:oe==="center"&&(pe-=ee/2),ue){re=r0!==null?r0(this,z):.8*z,oe=x+pe,ue=E+re,b=x+pe+ee,re=E+re;var Se=a;y.beginPath(),y.lineWidth=Se,y.moveTo(oe,ue),y.lineTo(b,re),y.stroke(),y.Se(),y instanceof Ja&&y.ad.classList.add("gojs-td")}de&&(de=E+z-z/2.2|0,a%2!==0&&(de+=.5),E=x+pe,z=de,x=x+pe+ee,ee=de,pe=a,y.beginPath(),y.lineWidth=pe,y.moveTo(E,z),y.lineTo(x,ee),y.stroke(),y.Se(),y instanceof Ja&&y.ad.classList.add("gojs-td"))}},Ee.kk=function(a,y,x){if(!Dt.prototype.kk.call(this,a,y,x))return!1;if(cl(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++)Mc(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Mc(a,y,!0);return!0},Ee.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Dt.prototype.nk.call(this,a)},Ee.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)}},Ee.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;Ac!==null&&F1!==z&&(F1=Ac.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 ue=z.indexOf(`
`,re);ue===-1&&(ue=z.length,oe=!0),re=z.substr(re,ue-re),this.formatting===Qp&&(re=re.trim()),ee=Math.max(ee,Id(re)),re=ue+1}z=ee}else ee=z.indexOf(`
`,0),0<=ee&&(z=z.substr(0,ee)),z=Id(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=w1(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===o0&&(y=this.Ae,y=this.overflow===o0?x1(y):0,ue=this.spacingAbove+this.spacingBelow,ue=Math.max(0,Xp(this)+ue),oe=Math.min(this.maxLines-1,Math.max(Math.floor(oe/ue+.01)-1,0)),!(oe+1>=this.Qb.length))){for(this.l|=16777216,ue=this.Qb[oe],y=Math.max(1,a-y);Id(ue)>y&&1<ue.length;)ue=ue.substr(0,ue.length-1);ue+=Jp,y=Id(ue),this.Qb[oe]=ue,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===P1||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),ee=Math.max(E,ee),Gl(this.dc,z,ee),this.Ge(0,0,z,ee),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},Ee.eh=function(a,y,x,E){Xu(this,a,y,x,E)};function Yp(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 Iv(a,y,x,E){var b=a.formatting===Qp;b&&(y=y.trim());var z=0,ee=a.Ae,re=a.spacingAbove+a.spacingBelow;re=Math.max(0,Xp(a)+re);var oe=a.overflow===o0?x1(ee):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,re);else if(ee=y,a.wrap===Rv){a.Le=1;var ue=Id(y);if(oe===0||ue<=x)a.Cb=Math.max(a.Cb,ue),Yp(a,y,a.Cb),E!==null&&E.h(ue,re);else{for(z=dp(a,ee),ee=ee.substr(z.length),y=dp(a,ee),ue=Id(z+y);0<y.length&&ue<=x;)z+=y,ee=ee.substr(y.length),y=dp(a,ee),ue=z+y,b&&(ue=ue.trim()),ue=Id(ue);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-oe);Id(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=Jp;var de=Id(z);a.Cb=de,Yp(a,z,de),E!==null&&E.h(de,re)}}else{for(oe=0,ee.length===0&&(oe=1,Yp(a,ee,0));0<ee.length;){for(y=dp(a,ee),ee=ee.substr(y.length);Id(y)>x;){var pe=1;for(ue=Id(y.substr(0,pe)),de=0;ue<=x;)pe++,de=ue,ue=Id(y.substr(0,pe));if(pe===1){var Se=ue;z=Math.max(z,ue)}else Se=de,z=Math.max(z,de);if(pe--,1>pe&&(pe=1),Yp(a,y.substr(0,pe),Se),oe++,y=y.substr(pe),a.Gc+oe>a.maxLines)break}for(de=dp(a,ee),ue=Id(y+de);0<de.length&&ue<=x;)y+=de,ee=ee.substr(de.length),de=dp(a,ee),ue=y+de,b&&(ue=ue.trim()),ue=Id(ue);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),de.length===0?(pe=ue,z=Math.max(z,ue)):(pe=de=Id(y),z=Math.max(z,de)),Yp(a,y,pe),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 dp(a,y){if(a.wrap===E1)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===C1&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function Id(a){return Ac===null?8*a.length:Ac.measureText(a).width}function Xp(a){if(a.df!==null)return a.df;var y=a.Ae;if(Ac===null){var x=16;return a.df=x}return Gv[y]!==void 0&&5e3>b1?x=Gv[y]:(x=1.3*Ac.measureText("M").width,Gv[y]=x,b1++),a.df=x}function x1(a){if(Ac===null)return 6;if(a0[a]!==void 0&&5e3>Hv)var y=a0[a];else y=Ac.measureText(Jp).width,a0[a]=y,Hv++;return y}function w1(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,Xp(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!==Rv){a.Le=0;var oe=Fn.alloc();Iv(a,z,y,oe),b+=oe.height,Fn.free(oe),a.Gc+=a.Le}else Iv(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(re=!0)}z=ee+1}return a.Lq=b}dn.Object.defineProperties(Bs.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"||(uh(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Tn},set:function(a){var y=this.flip;y!==a&&(uh(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Ts},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),uh(this),this.da.Yr=a,ec(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=Fn.alloc();Iv(this,this.ec,999999,a);var y=a.width;Fn.free(a),a=w1(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Gl(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:jv},set:function(a){var y=this.wrap;y!==a&&(uh(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:zv},set:function(a){var y=this.overflow;y!==a&&(uh(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&&Bf(a,"TextBlock.stroke"),a instanceof Ca&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return Xp(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&&(uh(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&&(uh(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 bh),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 bh),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 bh),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 bh),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 bh),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&&(uh(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&&(uh(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&&(uh(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&&(uh(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Qp},set:function(a){var y=this.formatting;y!==a&&(uh(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&&pr(a,"> 0",Bs,"maxLines"),uh(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 i0=null,r0=null,Rv=new Qt(Bs,"None",0),P1=new Qt(Bs,"WrapFit",1),jv=new Qt(Bs,"WrapDesiredSize",2),E1=new Qt(Bs,"WrapBreakAll",3),zv=new Qt(Bs,"OverflowClip",0),o0=new Qt(Bs,"OverflowEllipsis",1),Qp=new Qt(Bs,"FormatTrim",0),C1=new Qt(Bs,"FormatNone",0),Sx=/[ \u200b\u00ad]/,Gv=new to,b1=0,a0=new to,Hv=0,Jp="...",F1="",Ac=null,s0=!1;Bs.className="TextBlock";function Wv(){this.nc=!1,this.Hd=null,this.Xf=Tn,this.gq=Qp,this.Jq=1/0,this.$q=zv,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Ts,this.$r=jv}Wv.prototype.copy=function(){var a=new Wv;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},Bs.getEllipsis=function(){return Jp},Bs.setEllipsis=function(a){Jp=a,a0=new to,Hv=0},Bs.getBaseline=function(){return i0},Bs.setBaseline=function(a){i0=a},Bs.getUnderline=function(){return r0},Bs.setUnderline=function(a){r0=a},Bs.isValidFont=function(a){if(s0||(Ac=ul?new Tu(null).context:null,s0=!0),Ac===null)return!0;var y=Ac.font;if(a===y||a==="10px sans-serif")return!0;Ac.font="10px sans-serif",Ac.font=a;var x=Ac.font;if(x!=="10px sans-serif")return Ac.font=y,!0;Ac.font="19px serif";var E=Ac.font;return Ac.font=a,x=Ac.font,Ac.font=y,x!==E},Bs.FormatNone=C1,Bs.FormatTrim=Qp,Bs.None=Rv,Bs.OverflowClip=zv,Bs.OverflowEllipsis=o0,Bs.WrapBreakAll=E1,Bs.WrapDesiredSize=jv,Bs.WrapFit=P1;function bh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}bh.prototype.copy=function(){var a=new bh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},bh.className="GradElementSettings";function Nc(a,y){Dt.call(this),this.Eg=null,this.qo="",this.Xg=ts,this.Nk=Hn,this.Zg=this.Hd=null,this.Mk=pa,this.Xf=Tn,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 hp;It(Nc,Dt),Nc.prototype.cloneProtected=function(a){Dt.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},Nc.prototype.qb=function(a){a===Tn||a===ir||a===qo?this.imageStretch=a:Dt.prototype.qb.call(this,a)},Nc.prototype.toString=function(){return"Picture("+this.source+")#"+No(this)};function fp(a){a===void 0&&(a=""),a!==""?hp[a]&&(delete hp[a],l0--):(hp=new to,l0=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()||(it(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=Ar();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);br(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Nc.prototype.hA=function(){if(this.source!==""){fp(this.source);var a=this.source;this.source="",this.source=a}},Nc.prototype.redraw=function(){this.N(),this.Uc=!0},Nc.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 Ud)){var b=a instanceof Ja;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 ue=oe,de=re;this.sourceRect.w()&&(z=this.Xg.x,ee=this.Xg.y,oe=this.Xg.width,re=this.Xg.height);var pe=oe,Se=re,Pe=this.Nk,Le=this.Mk;switch(Pe){case Tn:if(this.sourceRect.w())break;pe>=E.width&&(z=z+Le.offsetX+(pe*Le.x-E.width*Le.x)),Se>=E.height&&(ee=ee+Le.offsetY+(Se*Le.y-E.height*Le.y)),oe=Math.min(E.width,pe),re=Math.min(E.height,Se);break;case Hn:pe=E.width,Se=E.height;break;case ir:case qo:Pe===ir?(Pe=Math.min(E.height/Se,E.width/pe),pe*=Pe,Se*=Pe):Pe===qo&&(Pe=Math.max(E.height/Se,E.width/pe),pe*=Pe,Se*=Pe,pe>=E.width&&(z=(z+Le.offsetX+(pe*Le.x-E.width*Le.x)/pe)*oe),Se>=E.height&&(ee=(ee+Le.offsetY+(Se*Le.y-E.height*Le.y)/Se)*re),oe*=1/(pe/E.width),re*=1/(Se/E.height),pe=E.width,Se=E.height)}Pe=this.Df()*y.scale;var De=pe*Pe*Se*Pe,qe=oe*re/De,Ze=x.__goCache;Pe=null;var ct=xx;if(!b){if(x.sq&&Ze!==void 0&&4<De&&qe>ct*ct)for(Ze.gi===null&&(A1(Ze,4,ue,de,x),A1(Ze,16,ue,de,x)),b=Ze.gi,ue=b.length,de=0;de<ue&&b[de].ratio*b[de].ratio<qe;de++)Pe=b[de];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Tu(null).context;try{b.drawImage(this.Eg,0,0)}catch(ft){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ft){this.vl=!0}}if(this.vl)return}}switch(b=pe<E.width?Le.offsetX+(E.width*Le.x-pe*Le.x):0,Le=Se<E.height?Le.offsetY+(E.height*Le.y-Se*Le.y):0,this.flip){case ga:a.translate(Math.min(E.width,pe),0),a.scale(-1,1);break;case Mo:a.translate(0,Math.min(E.height,Se)),a.scale(1,-1);break;case is:a.translate(Math.min(E.width,pe),Math.min(E.height,Se)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Ze!==void 0&&Pe!==null&&Pe.ratio!==1){a.save(),y=Pe.ratio;try{a.drawImage(Pe.source,z/y,ee/y,Math.min(Pe.source.width,oe/y),Math.min(Pe.source.height,re/y),b,Le,Math.min(E.width,pe),Math.min(E.height,Se)),a instanceof Ja&&(this.bt=[z/y,ee/y,Math.min(Pe.source.width,oe/y),Math.min(Pe.source.height,re/y),b,Le,Math.min(E.width,pe),Math.min(E.height,Se)])}catch(ft){this.en=!1}a.restore()}else try{a.drawImage(x,z,ee,oe,re,b,Le,Math.min(E.width,pe),Math.min(E.height,Se)),a instanceof Ja&&(this.bt=[z,ee,oe,re,b,Le,Math.min(E.width,pe),Math.min(E.height,Se)])}catch(ft){this.en=!1}switch(this.flip){case ga:a.scale(-1,1),a.translate(-Math.min(E.width,pe),0);break;case Mo:a.scale(1,-1),a.translate(0,-Math.min(E.height,Se));break;case is:a.scale(-1,-1),a.translate(-Math.min(E.width,pe),-Math.min(E.height,Se))}}}}},Nc.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=oc(this,!0),ee=this.Eg,re=this.qn,oe=0,ue=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,ue=re?+ee.height:ee.naturalHeight),isFinite(b.width)||z===Hn||z===dr?(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===Hn||z===Mr?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:ee!==null&&(y=ue)),E=0):ee!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:ue),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)),Gl(this.dc,a,y),this.Ge(0,0,a,y)},Nc.prototype.eh=function(a,y,x,E){Xu(this,a,y,x,E)},dn.Object.defineProperties(Nc.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||Wt("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Td(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new zn),E!==null&&x&&dc(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()||(it(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=hp;if(ul){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<l0&&(fp(),x=hp),E=Kn("img"),E.hn=!0,L1(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,l0++}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}}}),Nc.prototype.redraw=Nc.prototype.redraw,Nc.prototype.reloadSource=Nc.prototype.hA;var l0=0,xx=4;Nc.className="Picture",hp=new to,Nc.clearCache=fp;function M1(){this.gi=null}function A1(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Tu(null),ee=z.context,re=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new N1(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 N1(a,y){this.source=a,this.ratio=y}N1.className="PictureCacheInstance";function gp(){this.os=new dt,this.mc=null}gp.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new dt,this.mc=null};function pp(a,y,x,E,b,z){a.mc=new Vr,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()}gp.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new mr(vi);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},gp.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new mr(Ai);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function uf(a,y,x,E,b,z,ee){var re;re===void 0&&(re=!1);var oe=new mr(Or);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 u0(a,y,x,E,b){var z;z===void 0&&(z=!1);var ee=new mr(Ur);ee.point1X=y,ee.point1Y=x,ee.endX=E,ee.endY=b,z&&ee.close(),a.mc.segments.add(ee)}gp.prototype.arcTo=function(a,y,x,E,b,z,ee){z===void 0&&(z=0),ee===void 0&&(ee=!1);var re=new mr(Fr);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 mr(ko,ee,re,y,x,E,b,z),oe&&y.close(),a.mc.segments.add(y)}function B1(a){var y=c0;return y!==null?(c0=null,y.reset(a),y):(y=new gp,y.reset(a),y)}var c0=null;gp.className="StreamGeometryContext";function tc(a,y){var x=a.toLowerCase(),E=ze.Ze;E[a]=y,E[x]=a}tc("Rectangle",function(a,y,x){a="r"+y+","+x;var E=ze.Mf[a];return E!==void 0||(E=new dt(dt.u),E.endX=y,E.endY=x,ze.Nf<ze.vm&&(ze.Mf[a]=E,ze.Nf++)),E}),tc("Square",function(a,y,x){a="s"+y+","+x;var E=ze.Mf[a];return E!==void 0||(E=new dt(dt.u),E.endX=y,E.endY=x,E.defaultStretch=ir,ze.Nf<ze.vm&&(ze.Mf[a]=E,ze.Nf++)),E}),tc("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=ze.Mf[E];if(b!==void 0)return b;var z=a*ze.wg;return b=new dt().add(new Vr(a,0,!0).add(new mr(Ai,y-a,0)).add(new mr(Or,y,a,y-z,0,y,z)).add(new mr(Ai,y,x-a)).add(new mr(Or,y-a,x,y,x-z,y-z,x)).add(new mr(Ai,a,x)).add(new mr(Or,0,x-a,z,x,0,x-z)).add(new mr(Ai,0,a)).add(new mr(Or,a,0,0,z,z,0).close())),1<z&&(b.spot1=new fr(0,0,z,z),b.spot2=new fr(1,1,-z,-z)),ze.Nf<ze.vm&&(ze.Mf[E]=b,ze.Nf++),b}),tc("Border","RoundedRectangle"),tc("Ellipse",function(a,y,x){a="e"+y+","+x;var E=ze.Mf[a];return E!==void 0||(E=new dt(dt.F),E.endX=y,E.endY=x,E.spot1=Ns,E.spot2=Aa,ze.Nf<ze.vm&&(ze.Mf[a]=E,ze.Nf++)),E}),tc("Circle",function(a,y,x){a="c"+y+","+x;var E=ze.Mf[a];return E!==void 0||(E=new dt(dt.F),E.endX=y,E.endY=x,E.spot1=Ns,E.spot2=Aa,E.defaultStretch=ir,ze.Nf<ze.vm&&(ze.Mf[a]=E,ze.Nf++)),E}),tc("TriangleRight",function(a,y,x){return new dt().add(new Vr(0,0).add(new mr(Ai,y,.5*x)).add(new mr(Ai,0,x).close())).pm(0,.25,.5,.75)}),tc("TriangleDown",function(a,y,x){return new dt().add(new Vr(0,0).add(new mr(Ai,y,0)).add(new mr(Ai,.5*y,x).close())).pm(.25,0,.75,.5)}),tc("TriangleLeft",function(a,y,x){return new dt().add(new Vr(y,x).add(new mr(Ai,0,.5*x)).add(new mr(Ai,y,0).close())).pm(.5,.25,1,.75)}),tc("TriangleUp",function(a,y,x){return new dt().add(new Vr(y,x).add(new mr(Ai,0,x)).add(new mr(Ai,.5*y,0).close())).pm(.25,.5,.75,1)}),tc("Triangle","TriangleUp"),tc("Diamond",function(a,y,x){return new dt().add(new Vr(.5*y,0).add(new mr(Ai,0,.5*x)).add(new mr(Ai,.5*y,x)).add(new mr(Ai,y,.5*x).close())).pm(.25,.25,.75,.75)}),tc("LineH",function(a,y,x){return a=new dt(dt.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),tc("LineV",function(a,y,x){return a=new dt(dt.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),tc("None","Rectangle"),tc("BarH","Rectangle"),tc("BarV","Rectangle"),tc("MinusLine","LineH"),tc("PlusLine",function(a,y,x){return new dt().add(new Vr(0,x/2,!1).add(new mr(Ai,y,x/2)).add(new mr(vi,y/2,0)).add(new mr(Ai,y/2,x)))}),tc("XLine",function(a,y,x){return new dt().add(new Vr(0,x,!1).add(new mr(Ai,y,0)).add(new mr(vi,0,0)).add(new mr(Ai,y,x)))}),tc("LineRight",function(a,y,x){return new dt().add(new Vr(.25*y,0,!1).add(new mr(Ai,.75*y,.5*x)).add(new mr(Ai,.25*y,x)))}),tc("LineDown",function(a,y,x){return new dt().add(new Vr(0,.25*x,!1).add(new mr(Ai,.5*y,.75*x)).add(new mr(Ai,y,.25*x)))}),tc("LineLeft",function(a,y,x){return new dt().add(new Vr(.75*y,0,!1).add(new mr(Ai,.25*y,.5*x)).add(new mr(Ai,.75*y,x)))}),tc("LineUp",function(a,y,x){return new dt().add(new Vr(0,.75*x,!1).add(new mr(Ai,.5*y,.25*x)).add(new mr(Ai,y,.75*x)))}),ze.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 Zv(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=hu,this.ir=null,this.jr="",this.lr=qi,this.Gq="",this.Hq=Fl,this.Pq=ql,this.Kq=rl,this.Up=null,this.Cq=127,this.zr=Il,this.yr="gray",this.Vg=4}Zv.prototype.copy=function(){var a=new Zv;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 xr(a,y){a===void 0||a instanceof Jl||typeof a=="string"?Vn.call(this,a):(Vn.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 tt(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new ln,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}It(xr,Vn),xr.prototype.cloneProtected=function(a){Vn.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},Ee=xr.prototype,Ee.Af=function(a){Vn.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},Ee.toString=function(){var a=Rr(this.constructor)+"#"+No(this);return this.data!==null&&(a+="("+xa(this.data)+")"),a};function Bc(a){a.P===null?a.P=new Zv:a.P.nc&&(a.P=a.P.copy())}Ee.th=function(){Vn.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},Ee.gk=function(a,y,x,E,b,z,ee){var re=this.diagram;re!==null&&(a===aa&&y==="elements"?b instanceof Vn?ag(b,function(oe){vy(re.partManager,oe),Gc(re,oe)}):dc(re,b):a===ka&&y==="elements"&&(b instanceof Vn?ag(b,function(oe){yy(re.partManager,oe,re)}):Td(re,b)),re.cb(a,y,x,E,b,z,ee))},Ee.La=function(a){if(Vn.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 Vn&&ag(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},xr.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},xr.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},xr.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 sr),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)))}}},xr.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)}},xr.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=Ar();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);br(y)}},xr.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 po?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof Fa))break e;Fd(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=Vn.Link),x.adornedObject=y)}if(x!==null){x.type===Vn.Link&&x.v(),this.bh("Selection",x);break e}}this.Jf("Selection")}for(Ex(this,a),y=this.adornments;y.next();)y.value.La()}},xr.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function Vv(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 d0(a){if(Tf(a)===!1){Kv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function k1(a){if(a.G|=2097152,Tf(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||_1(a,y,x),x=a.Ib;var E=ln.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),ln.free(E),Kv(a,!1)}}xr.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new St);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},xr.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=pa;this.locationSpot.sb()&&(z=this.locationSpot);var ee=tt.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),tt.free(ee)}},xr.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},xr.prototype.moveTo=function(a,y,x){a=tt.allocAt(a,y),this.move(a,x),tt.free(a)},xr.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())},xr.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())},xr.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new sr),y.I(a)!==null)return y.I(a);var x=Vn.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function cf(a,y,x,E){E===void 0&&(E=new tt),x=x.Mc()?pa: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}xr.prototype.mi=function(a){return a===void 0&&(a=new ln),a.assign(this.actualBounds)},xr.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function D1(a){var y=tt.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof bo?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 ug(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=c1(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}xr.prototype.arrange=function(){if(vt(this)===!1)k1(this);else{Ft(this,!1);var a=this.Ib,y=ln.alloc();y.assign(a);var x=_f(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;_1(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()||ze.B(y.width,a.width)&&ze.B(y.height,a.height)||0<=this.vw&&this.C(16),ln.free(y),Kv(this,!1)}},Ee=xr.prototype,Ee.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=ln.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),ln.free(b)}!(this.G&65536)&&a.D(y)||R1(this,E,x),x.N(),!a.w()&&!y.w()||al(a,y)||(this instanceof xi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},Ee.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 tt(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),Tf(this)===!1&&vt(this)===!1&&(d0(this),k1(this)),!0};function T1(a,y,x,E,b){y===null||a instanceof Fa||(y=y.animationManager,y.zb&&Gs(y,a,new tt(E,b),x))}Ee.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;Tf(this)||vt(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)}d0(this)},Ee.Av=function(){this.G&=-2097153,d0(this)};function _1(a,y,x){var E=D1(a),b=a.diagram,z=x.w(),ee=y.w();z&&ee?a.G&2097152?O1(a,y,x,b,E):I1(a,y,x,b,E):z?O1(a,y,x,b,E):ee&&I1(a,y,x,b,E),a.G|=2097152,tt.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 Fa||Gs(x,a,new tt(z,ee),y),E||y.x===z&&y.y===ee||a.g("position",new tt(z,ee),y.copy()))}function I1(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 R1(a,y,x){Yv(a,!1),a instanceof xi&&Oh(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?_f(a)?(Dc(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}Ee.si=function(){return!0},Ee.Zc=function(){return!0},Ee.ph=function(){return!1},Ee.Dd=function(){return!0};function Uv(a,y,x,E){y.constructor===a.constructor||G1||(G1=!0,Ro('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Ro(" Old class: "+Rr(a.constructor)+", new class: "+Rr(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,ue=!1;a instanceof xi&&(re=a.isTreeLeaf,oe=a.isTreeExpanded,ue=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 xi&&(a.U=re?a.U|4:a.U&-5,a.U=oe?a.U|1:a.U&-2,a.U=ue?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)}xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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},xr.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 Tf(a){return(a.G&32768)!==0}function Kv(a,y){a.G=y?a.G|32768:a.G&-32769}function Yv(a,y){a.G=y?a.G|65536:a.G&-65537}function _f(a){return(a.G&131072)!==0}Ee=xr.prototype,Ee.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function h0(a,y){a.G=y?a.G|1048576:a.G&-1048577}Ee.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},Ee.N=function(){var a=this.diagram;a!==null&&!vt(this)&&!Tf(this)&&this.isVisible()&&this.Ib.w()&&a.N(ug(this,this.Ib))},Ee.v=function(){Vn.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof xi&&this.labeledLink!==null&&ec(this.labeledLink),a.$b(!0))},Ee.Vo=function(a){a||(a=this.Ah,a!==null&&ey(a,this))},Ee.Wo=function(a){a||(a=this.Ah,a!==null&&ty(a,this))},Ee.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},Ee.oz=function(){return Xv(this,this)};function Xv(a,y){var x=y.containingGroup;return x!==null?1+Xv(a,x):y instanceof xi&&(y=y.labeledLink,y!==null)?Xv(a,y):0}Ee.sz=function(){return j1(this,this)};function j1(a,y){var x=y.containingGroup;return x!==null||y instanceof xi&&(x=y.labeledLink,x!==null)?j1(a,x):y}Ee.Td=function(a){return a instanceof po?Qv(this,this,a):!1};function Qv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!Qv(a,E,x)?y instanceof xi&&(y=y.labeledLink,y!==null)?Qv(a,y,x):!1:!0}Ee.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof po&&h0(y,!0),y instanceof xi){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 xi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof po&&h0(y,!1),y instanceof xi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},xr.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof xi&&this.isLinkLabel)},xr.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 xi&&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 z1(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function Of(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof Fa)){if(a.add(y),y instanceof xi){if(x&&y instanceof po)for(var ee=y.memberParts;ee.next();)Of(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,ue=re.toNode;oe=oe===null||a.contains(oe),ue=ue===null||a.contains(ue),(b?oe&&ue:oe||ue)&&Of(a,re,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)Of(a,y.value,x,E-1,b,z)}else if(y instanceof Jn)for(y=y.labelNodes;y.next();)Of(a,y.value,x,E,b,z)}}dn.Object.defineProperties(xr.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Za: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(ka,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(aa,"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&&(Bc(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&&Vl(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 Fa?this.type!==Vn.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:ql},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),Bc(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:rl},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),Bc(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&&(Bc(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:Fl},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),Bc(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,vt(this)===!1&&(d0(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 Fa)){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 Fa?this instanceof Fa&&(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&&(Fd(x),x=x.copy(),x!==null&&Uv(this,x,y,a))):(z!==null&&z.jm(E,a),x=hS(x.partManager,E,a),x!==null&&(Fd(x),x=x.copy(),x===null||x instanceof Jn||(E=this.location.copy(),Uv(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){Uv(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&&(Bc(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&&(Bc(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&&(Bc(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 Jn?(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&&(Bc(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&&(Bc(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&&(Bc(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:hu},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),Bc(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&&(Bc(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&&(Bc(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:qi},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),Bc(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&&Wt("Cannot make a Group a member of itself: "+this.toString()),Wt("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?ty(y,this):this instanceof po&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?ey(a,this):this instanceof po&&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 po){for(x=new zn,Of(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof xi)for(E=E.linksConnected;E.next();)mp(E.value)}if(this instanceof xi){for(x=this.linksConnected;x.next();)mp(x.value);x=this.labeledLink,x!==null&&mp(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Vl(y,-1,a))}}else Wt("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&&(Bc(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof xi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(Bc(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&&(Bc(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Il},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),Bc(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&&(Bc(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&&(Bc(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),xr.prototype.invalidateLayout=xr.prototype.C,xr.prototype.findCommonContainingGroup=xr.prototype.px,xr.prototype.isMemberOf=xr.prototype.Td,xr.prototype.findTopLevelPart=xr.prototype.sz,xr.prototype.findSubGraphLevel=xr.prototype.oz,xr.prototype.ensureBounds=xr.prototype.Va,xr.prototype.getDocumentBounds=xr.prototype.mi,xr.prototype.findObject=xr.prototype.fb,xr.prototype.moveTo=xr.prototype.moveTo,xr.prototype.invalidateAdornments=xr.prototype.Wb,xr.prototype.clearAdornments=xr.prototype.Ej,xr.prototype.removeAdornment=xr.prototype.Jf,xr.prototype.addAdornment=xr.prototype.bh,xr.prototype.findAdornment=xr.prototype.Pj,xr.prototype.updateTargetBindings=xr.prototype.La;var G1=!1;xr.className="Part",xr.LayoutNone=0,xr.LayoutAdded=1,xr.LayoutRemoved=2,xr.LayoutShown=4,xr.LayoutHidden=8,xr.LayoutNodeSized=16,xr.LayoutGroupLayout=32,xr.LayoutNodeReplaced=64,xr.LayoutStandard=127,xr.LayoutAll=16777215;function Fa(a,y){a===void 0||a instanceof Jl||typeof a=="string"?xr.call(this,a):(xr.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)}It(Fa,xr),Fa.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},Fa.prototype.updateRelationshipsFromData=function(){},Fa.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Jn&&y instanceof bo){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 bo&&(b.ua=a)}}},Fa.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!vt(a))},Fa.prototype.Zc=function(){return!1},Fa.prototype.gk=function(a,y,x,E,b,z,ee){if(a===aa&&y==="elements"){if(b instanceof gc)this.$a===null&&(this.$a=b);else if(b instanceof Vn){var re=b.Nl(function(oe){return oe instanceof gc});re instanceof gc&&this.$a===null&&(this.$a=re)}}else a===ka&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Vn&&this.$a.rg(E)&&(this.$a=null));xr.prototype.gk.call(this,a,y,x,E,b,z,ee)},Fa.prototype.updateAdornments=function(){},Fa.prototype.Lj=function(){},dn.Object.defineProperties(Fa.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}}}),Fa.className="Adornment";function Jv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=Tc,this.er=p0,this.Kr=this.ij=this.Nq=this.Mq=null}Jv.prototype.copy=function(){var a=new Jv;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 xi(a,y){a===void 0||a instanceof Jl||typeof a=="string"?xr.call(this,a):(xr.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new Un,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}It(xi,xr),xi.prototype.cloneProtected=function(a){xr.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},Ee=xi.prototype,Ee.Af=function(a){xr.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function df(a){a.Ba===null?a.Ba=new Jv:a.Ba.nc&&(a.Ba=a.Ba.copy())}Ee.th=function(){xr.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function H1(a,y){y!==null&&(a.af===null&&(a.af=new zn),a.af.add(y))}function W1(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}Ee.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=W1(this,a,y,x),a!==null&&a.Sl()},Ee.gk=function(a,y,x,E,b,z,ee){a===aa&&y==="elements"?this.wc=null:a===ka&&y==="elements"&&(this.wc=null),xr.prototype.gk.call(this,a,y,x,E,b,z,ee)},Ee.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(ed(x.fromPort),ed(x.toPort),x.bb())}};function Z1(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(ed(x.fromPort),ed(x.toPort),x.bb())}}function ed(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||ed(y.port)}}Ee.si=function(){return!0},xi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},xi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},xi.prototype.isVisible=function(){if(!xr.prototype.isVisible.call(this))return!1;var a=!0,y=ah,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===ah){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Cl){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===jh&&(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},xi.prototype.Zb=function(a){xr.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)}},xi.prototype.qx=function(){var a=new zn,y=new zn;return V1(this,this,a,y),y.iterator};function V1(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)&&V1(a,b?ee.toNode:ee.fromNode,x,E):E.add(ee)})}}xi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new ca(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},Ee=xi.prototype,Ee.Mo=function(a){a===void 0&&(a=null);var y=new ca(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},Ee.Sd=function(a){a===void 0&&(a=null);var y=new ca(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},Ee.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 zn,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 zn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new wa(x):Za},Ee.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 zn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new wa(x):Za},Ee.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 zn,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new wa(x):Za},Ee.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ca(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},Ee.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ca(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 f0(a,y,x){ed(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 g0(a,y,x){ed(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)):$p(y)))}function $p(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}}}xi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},Ee=xi.prototype,Ee.Vo=function(a){xr.prototype.Vo.call(this,a),a||($p(this),a=this.Yk,a!==null&&eS(a,this))},Ee.Wo=function(a){xr.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},Ee.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,xr.prototype.Lj.call(this)},Ee.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;U1(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function U1(a){a.wc===null?a.wc=new sr: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 $v(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=Ar()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);br(x)}}}Ee.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},Ee.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}},Ee.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)h0(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;)h0(y,!1),y=y.pg();return x},Ee.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},Ee.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof xi)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},Ee.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 zn;return a(this,y),y},Ee.uz=function(){return Y1(this,this)};function Y1(a,y){return y=y.pg(),y===null?0:1+Y1(a,y)}Ee.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ca(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},Ee.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 Un,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 Un,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new wa(x):Za},Ee.wz=function(a){a===void 0&&(a=1/0);var y=new zn;return Of(y,this,!1,a,!0),y},xi.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 zn;x.add(this),X1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===ah),y.Ue=!1}};function X1(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),X1(oe,y,x,E-1,b,z,ee)))}else Q1(a,y,x,b,z,ee)}function Q1(a,y,x,E,b,z){for(var ee=b===a?!0:a.isTreeExpanded,re=x?a.Mo():a.Sd(),oe={};re.next();){var ue=re.value;if(ue.isTreeLink&&(ue=ue.To(a),ue!==null&&ue!==a)){var de=y.contains(ue);if(de||y.add(ue),ee){var pe=x?ue.Oo():ue.Po();oe.uv=a,pe.all(function(Se){return function(Pe){return Pe===Se.uv||!Pe.isTreeExpanded}}(oe))&&E.Aj(ue,b),ue.oh(),ue.Zb(!1)}ue.isTreeExpanded&&(ue.wasTreeExpanded=ue.isTreeExpanded,de||Q1(ue,y,x,E,b,z))}oe={uv:oe.uv}}a.isTreeExpanded=!1}xi.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 zn;x.add(this),J1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===ah),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(),ue={};oe.next();){var de=oe.value;if(de.isTreeLink&&(re||de.fd||de.bb(),de=de.To(a),de!==null&&de!==a&&!y.contains(de))){if(y.add(de),!re){de.Zb(!0),de.oh();var pe=x?de.Oo():de.Po();ue.vv=a,pe.all(function(Se){return function(Pe){return Pe===Se.vv||!Pe.isTreeExpanded}}(ue))&&b.Cj(de,z)}(2<E||de.wasTreeExpanded)&&(de.wasTreeExpanded=!1,J1(de,y,x,E-1,b,z,ee))}ue={vv:ue.vv}}a.isTreeExpanded=!0}dn.Object.defineProperties(xi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:p0},set:function(a){var y=this.portSpreading;y!==a&&(df(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&&Oh(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:Tc},set:function(a){typeof a=="number"&&(a=new oo(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),df(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Oh(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&&(df(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&&(df(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&&(df(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&&(eS(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),ec(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&U1(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&&(df(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))}}}),xi.prototype.expandTree=xi.prototype.expandTree,xi.prototype.collapseTree=xi.prototype.collapseTree,xi.prototype.findTreeParts=xi.prototype.wz,xi.prototype.findTreeChildrenNodes=xi.prototype.Ou,xi.prototype.findTreeChildrenLinks=xi.prototype.Qo,xi.prototype.findTreeLevel=xi.prototype.uz,xi.prototype.findTreeParentChain=xi.prototype.vz,xi.prototype.findTreeParentNode=xi.prototype.pg,xi.prototype.findTreeParentLink=xi.prototype.kh,xi.prototype.findCommonTreeParent=xi.prototype.gz,xi.prototype.findTreeRoot=xi.prototype.xz,xi.prototype.isInTreeOf=xi.prototype.Nz,xi.prototype.findPort=xi.prototype.ns,xi.prototype.findLinksTo=xi.prototype.kz,xi.prototype.findLinksBetween=xi.prototype.jz,xi.prototype.findNodesInto=xi.prototype.Oo,xi.prototype.findNodesOutOf=xi.prototype.Po,xi.prototype.findNodesConnected=xi.prototype.Mu,xi.prototype.findLinksInto=xi.prototype.Sd,xi.prototype.findLinksOutOf=xi.prototype.Mo,xi.prototype.findExternalTreeLinksConnected=xi.prototype.qx,xi.prototype.invalidateConnectedLinks=xi.prototype.Bd,xi.prototype.invalidateLinkBundle=xi.prototype.Lz;var Cx=new Qt(xi,"SpreadingNone",10),p0=new Qt(xi,"SpreadingEvenly",11),qv=new Qt(xi,"SpreadingPacked",12);xi.className="Node",xi.SpreadingNone=Cx,xi.SpreadingEvenly=p0,xi.SpreadingPacked=qv;function po(a,y){a===void 0||a instanceof Jl||typeof a=="string"?xi.call(this,a):(xi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new zn,this.$a=null,this.Sc=new qs,this.Sc.group=this,this.gl=new zn,this.tb=this.$p=null,y&&Object.assign(this,y)}It(po,xi),po.prototype.cloneProtected=function(a){xi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof gc});y instanceof gc?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())},Ee=po.prototype,Ee.Af=function(a){xi.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 xi)x.Bd(y);else if(x instanceof Jn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},Ee.gk=function(a,y,x,E,b,z,ee){if(a===aa&&y==="elements"){if(b instanceof gc)this.$a===null?this.$a=b:this.$a!==b&&Wt("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof Vn){var re=b.Nl(function(oe){return oe instanceof gc});re instanceof gc&&(this.$a===null?this.$a=re:this.$a!==re&&Wt("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ka&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof Vn&&this.$a.rg(E)&&(this.$a=null));xi.prototype.gk.call(this,a,y,x,E,b,z,ee)},Ee.Xl=function(a,y){xi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==Vn.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof Vn&&(a=a.Pb()),this.tb===null&&(this.tb=new ln),a.mi(this.tb),a instanceof bo&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},Ee.eh=function(a,y,x,E){this.nf=this.$a,xi.prototype.eh.call(this,a,y,x,E)},Ee.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Jn||y.Va()}),xi.prototype.Va.call(this)},Ee.si=function(){if(!xi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof xi){if(y.isVisible()&&vt(y))return!1}else if(y instanceof Jn&&y.isVisible()&&vt(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function ey(a,y){if(a.Gn.add(y)){y instanceof po&&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 Jn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function ty(a,y){if(a.Gn.remove(y)){y instanceof po&&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 Jn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}Ee.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)}xi.prototype.Lj.call(this)},po.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=sn(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},po.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=sn(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},po.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))},Ee=po.prototype,Ee.Bd=function(a){var y=(this.U&65536)!==0;if(xi.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()?(ed(x.fromPort),ed(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(ed(x.fromPort),ed(x.toPort),x.bb()))}}},Ee.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 zn,E=y.iterator;E.next();){var b=E.value;if(b instanceof xi)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},Ee.iz=function(){var a=this.Rj();a.add(this);for(var y=new zn,x=a.iterator;x.next();){var E=x.value;if(E instanceof xi)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},Ee.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new zn;return a(this,y),y},Ee.Rj=function(){var a=new zn;return Of(a,this,!0,0,!0),a.remove(this),a},Ee.Zb=function(a){xi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},po.prototype.collapseSubGraph=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(!1),z instanceof po&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,$1(z,y,x,E)),z instanceof xi)z.Bd(y),x.Aj(z,E);else if(z instanceof Jn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}po.prototype.expandSubGraph=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(!0),z instanceof po&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,q1(z,y,x,E)),z instanceof xi)z.Bd(y),x.Cj(z,E);else if(z instanceof Jn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}po.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=tt.alloc(),xi.prototype.move.call(this,a,y),a=new zn,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Jn&&(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 xi&&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 Jn&&(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(),iy(b)&&b.bb());tt.free(z)}},dn.Object.defineProperties(po.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&&Wt("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&&(df(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&&(df(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&&(df(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&&(df(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)}}}),po.prototype.expandSubGraph=po.prototype.expandSubGraph,po.prototype.collapseSubGraph=po.prototype.collapseSubGraph,po.prototype.findSubGraphParts=po.prototype.Rj,po.prototype.findContainingGroupChain=po.prototype.hz,po.prototype.findExternalNodesConnected=po.prototype.iz,po.prototype.findExternalLinksConnected=po.prototype.Lu,po.prototype.ensureBounds=po.prototype.Va,po.className="Group";function gc(a){Dt.call(this),this.yb=iu,this.ko=new ln(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}It(gc,Dt),gc.prototype.cloneProtected=function(a){Dt.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},gc.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return Oa(0,0,y.width,y.height,a.x,a.y)},gc.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof po||a instanceof Fa)||Wt("Placeholder is not inside a Group or Adornment."),a instanceof po){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Gl(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=tt.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),tt.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 bo&&(ee=z.strokeWidth);var re=z.Df(),oe=z.naturalBounds,ue=(oe.width+ee)*re;ee=(oe.height+ee)*re,a.type!==Vn.Link&&(re=z.ga(a.category==="Selection"?Fl:a.locationSpot,tt.alloc()),a.location=re,tt.free(re)),isNaN(ue)||isNaN(ee)?(a=z.ga(Fl,tt.alloc()),ue=ln.allocAt(a.x,a.y,0,0),ue.Ye(z.ga(un,a)),ue.Ye(z.ga(Ec,a)),ue.Ye(z.ga(Ju,a)),Gl(y,ue.width+E||0,ue.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),tt.free(a),ln.free(ue)):(Gl(y,ue+E||0,ee+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},gc.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},gc.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof po&&!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=ln.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof po&&!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)),ln.free(x),E&&y instanceof po&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},gc.prototype.computeMemberBounds=function(a){if(!(this.part instanceof po))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 Jn&&(!y.computesBoundsIncludingLinks||rt(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},dn.Object.defineProperties(gc.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new oo(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),gc.className="Placeholder";function Jn(a){xr.call(this,Vn.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=pc,this.Om=0,this.Qm=pc,this.Rm=NaN,this.qj=ay,this.po=.5,this.wd=null,this.Nb=new Un().freeze(),this.Tg=this.Mg=null,this.ml=new ln,this.ua=new dt,this.u=this.o=this.Sf=this.Wf=null,this.su=new tt,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}It(Jn,xr),Jn.prototype.cloneProtected=function(a){xr.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())},Ee=Jn.prototype,Ee.Af=function(a){xr.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&&ed(y),a=a.toPort,a!==null&&ed(a)},Ee.qb=function(a){a.classType===Jn?(a.value&2)===2?this.routing=a:a===cd||a===ff||a===yp?this.curve=a:a===tm||a===w0||a===P0?this.adjusting=a:a!==ay&&a!==pc&&Wt("Unknown Link enum value for a Link property: "+a):xr.prototype.qb.call(this,a)},Ee.Xc=function(){this.ba===null&&(this.ba=new So)},Ee.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),vt(a)||Tf(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),vt(a)||Tf(a)))},Ee.zv=function(){return!1},Ee.Av=function(){},Ee.Zc=function(){return!1},Jn.prototype.computeAngle=function(a,y,x){return Jn.computeAngle(y,x)},Jn.computeAngle=function(a,y){switch(a){default:case pc:a=0;break;case nm:a=y;break;case im:a=y+90;break;case rm:a=y-90;break;case sy:a=y+180;break;case E0:a=ze.bp(y),90<a&&270>a&&(a-=180);break;case om:a=ze.bp(y+90),90<a&&270>a&&(a-=180);break;case am:a=ze.bp(y-90),90<a&&270>a&&(a-=180);break;case C0:if(a=ze.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return ze.bp(a)};function mp(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&&ty(x,a),a.Ah=y,y!==null&&ey(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}Ee=Jn.prototype,Ee.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&xr.prototype.oh.call(this)},Ee.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},Ee.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function eS(a,y){a.wd===null&&(a.wd=new zn),a.wd.add(y),a.v()}Ee.Vo=function(a){if(xr.prototype.Vo.call(this,a),cg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,f0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||f0(x,this,E)}qp(this)}},Ee.Wo=function(a){if(xr.prototype.Wo.call(this,a),cg(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,g0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||g0(x,this,E)}em(this)}},Ee.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))},Jn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Jn.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?xr.prototype.move.call(this,a,!1):(a=tt.allocAt(x.x+E,x.y+b),xr.prototype.move.call(this,a,!1),tt.free(a)),hf(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Jn.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},Jn.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},Jn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(nu),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()===cd))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()===cd){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return ze.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),ze.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},Jn.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()===cd))return this.ua.wx(.5);if(this.computeCurve()===cd&&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),ze.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)},Ee=Jn.prototype,Ee.i=function(a){return this.Nb.s[a]},Ee.dd=function(a,y){this.Nb.cd(a,y)},Ee.L=function(a,y,x){this.Nb.cd(a,new tt(y,x))},Ee.Kz=function(a,y){this.Nb.Gb(a,y)},Ee.m=function(a,y,x){this.Nb.Gb(a,new tt(y,x))},Ee.ne=function(a){this.Nb.add(a)},Ee.yf=function(a,y){this.Nb.add(new tt(a,y))},Ee.pv=function(a){this.Nb.mb(a)},Ee.Fj=function(){this.Nb.clear()};function hf(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 Un,z=a.Nb.iterator;z.next();){var ee=z.value;b.add(new tt(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),ec(a)),E?m0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),ee!==null&&ee.animationManager.zb&&la(ee.animationManager,a,b),a.g("points",z,b)}}Ee.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},Ee.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,ue=oe.length,de=0;de<ue;de++){var pe=oe[de];ee=Math.min(pe.x,ee),re=Math.min(pe.y,re),pe.freeze()}if(y.freeze(),ue===z){for(z=0;z<ue;z++)if(de=b[z],pe=oe[z],de.x-x!==pe.x-ee||de.y-E!==pe.y-re){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&la(x.animationManager,this,y),m0(this),this.g("points",a,y)}},Ee.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function m0(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),x0(a,!1))}Ee.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())}},Ee.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()}}},Jn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(Og||(Og=new xi,Og.desiredSize=Bo,Og.Va()),this.defaultFromPoint&&(Og.location=this.defaultFromPoint,Og.Va(),y=a=Og)):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?(Ig||(Ig=new xi,Ig.desiredSize=Bo,Ig.Va()),this.defaultToPoint&&(Ig.location=this.defaultToPoint,Ig.Va(),b=E=Ig)):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=vp(ee),oe=vp(x),ue=y===b&&y!==null,de=this.isOrthogonal,pe=this.curve===cd;this.Wf=ue&&!de?pe=!0:!1;var Se=this.computeAdjusting()===pc||ue;if(!de&&!ue&&re&&oe){if(re=!1,!Se&&3<=z&&(Se=this.getLinkPoint(a,y,ee,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),re=this.adjustPoints(0,Se,z-1,oe))&&(Se=this.getLinkPoint(a,y,ee,!0,!1,E,b),oe=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,Se,z-1,oe)),!re)if(this.Fj(),pe){z=this.getLinkPoint(a,y,ee,!0,!1,E,b),Se=this.getLinkPoint(E,b,x,!1,!1,a,y),re=Se.x-z.x,oe=Se.y-z.y,ue=this.computeCurviness(),pe=de=0;var Pe=z.x+re/3,Le=z.y+oe/3,De=Pe,qe=Le;ze.B(oe,0)?qe=0<re?qe-ue:qe+ue:(de=-re/oe,pe=Math.sqrt(ue*ue/(de*de+1)),0>ue&&(pe=-pe),De=(0>oe?-1:1)*pe+Pe,qe=de*(De-Pe)+Le),Pe=z.x+2*re/3,Le=z.y+2*oe/3;var Ze=Pe,ct=Le;ze.B(oe,0)?ct=0<re?ct-ue:ct+ue:(Ze=(0>oe?-1:1)*pe+Pe,ct=de*(Ze-Pe)+Le),this.Fj(),this.ne(z),this.yf(De,qe),this.yf(Ze,ct),this.ne(Se),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,Se=b,E=this.getLinkPoint(a,y,ee,!0,!1,z,Se),b=this.getLinkPoint(z,Se,x,!1,!1,a,y),this.hasCurviness()?(Se=b.x-E.x,x=b.y-E.y,ee=this.computeCurviness(),a=E.x+Se/2,y=E.y+x/2,z=a,re=y,ze.B(x,0)?re=0<Se?re-ee:re+ee:(Se=-Se/x,z=Math.sqrt(ee*ee/(Se*Se+1)),0>ee&&(z=-z),z=(0>x?-1:1)*z+a,re=Se*(z-a)+y),this.ne(E),this.yf(z,re),this.ne(b)):(this.ne(E),this.ne(b),re=ln.alloc(),y.mi(re),oe=re.ca(b),Se.mi(re),ue=re.ca(E),(oe||ue)&&(ee=y.ga(y0(ee),new tt),this.dd(0,this.getLinkPointFromPoint(a,y,ee,b,!0,ee)),x=Se.ga(y0(x),new tt),this.dd(1,this.getLinkPointFromPoint(z,Se,x,E,!1,x))),ln.free(re))}else{pe=this.isAvoiding,Se&&(de&&pe||ue)&&this.Fj();var ft=ue?this.computeCurviness():0;pe=this.getLinkPoint(a,y,ee,!0,de,E,b),Pe=De=Le=0,(de||!re||ue)&&(qe=this.computeEndSegmentLength(a,y,ee,!0),Pe=this.getLinkDirection(a,y,pe,ee,!0,de,E,b),ue&&(re||ee.D(x)||!de&&ee.x+x.x===1&&ee.y+x.y===1)&&(Pe-=de?90:30,0>ft&&(Pe-=180)),0>Pe?Pe+=360:360<=Pe&&(Pe-=360),ue&&(qe+=Math.abs(ft)*(de?1:2)),Pe===0?Le=qe:Pe===90?De=qe:Pe===180?Le=-qe:Pe===270?De=-qe:(Le=qe*Math.cos(Pe*Math.PI/180),De=qe*Math.sin(Pe*Math.PI/180)),ee.Mc()&&ue&&(qe=y.ga(pa,tt.alloc()),Ze=tt.allocAt(qe.x+1e3*Le,qe.y+1e3*De),this.getLinkPointFromPoint(a,y,qe,Ze,!0,pe),tt.free(qe),tt.free(Ze))),qe=this.getLinkPoint(E,b,x,!1,de,a,y);var yt=ct=Ze=0;if(de||!oe||ue){var kt=this.computeEndSegmentLength(E,b,x,!1);yt=this.getLinkDirection(E,b,qe,x,!1,de,a,y),ue&&(oe||ee.D(x)||!de&&ee.x+x.x===1&&ee.y+x.y===1)&&(yt+=de?0:30,0>ft&&(yt+=180)),0>yt?yt+=360:360<=yt&&(yt-=360),ue&&(kt+=Math.abs(ft)*(de?1:2)),yt===0?Ze=kt:yt===90?ct=kt:yt===180?Ze=-kt:yt===270?ct=-kt:(Ze=kt*Math.cos(yt*Math.PI/180),ct=kt*Math.sin(yt*Math.PI/180)),x.Mc()&&ue&&(x=b.ga(pa,tt.alloc()),ee=tt.allocAt(x.x+1e3*Ze,x.y+1e3*ct),this.getLinkPointFromPoint(E,b,x,ee,!1,qe),tt.free(x),tt.free(ee))}x=pe,(de||!re||ue)&&(x=new tt(pe.x+Le,pe.y+De)),ee=qe,(de||!oe||ue)&&(ee=new tt(qe.x+Ze,qe.y+ct)),!Se&&!de&&re&&3<z&&this.adjustPoints(0,pe,z-2,ee)?this.dd(z-1,qe):!Se&&!de&&oe&&3<z&&this.adjustPoints(1,x,z-1,qe)?this.dd(0,pe):!Se&&(de?6<=z:4<z)&&this.adjustPoints(1,x,z-2,ee)?(this.dd(0,pe),this.dd(z-1,qe)):(this.Fj(),this.ne(pe),(de||!re||ue)&&this.ne(x),de&&this.addOrthoPoints(x,Pe,ee,yt,a,E),(de||!oe||ue)&&this.ne(ee),this.ne(qe))}return!0};function ny(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}Jn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new tt),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,ue=a.m11*b,de=b*(a.m21*a.dy-a.m22*a.dx),pe=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*ee+E.y*oe+de,E=E.x*re+E.y*ue+pe,ee=x.x*ee+x.y*oe+de,x=x.x*re+x.y*ue+pe}return y.Sj(b,E,ee,x,z),a!==null&&z.transform(a),z};function v0(a,y){var x=y.Zn;return x===null&&(x=new Rg,x.port=y,x.node=y.part,y.Zn=x),lS(x,a)}Jn.prototype.getLinkPoint=function(a,y,x,E,b,z,ee,re){if(re===void 0&&(re=new tt),x.sb()&&!vp(x))return y.ga(x,re),re;if(x.$c()){var oe=v0(this,y);if(oe!==null){if(re.assign(oe.Zo),b&&this.routing===nS){var ue=v0(this,ee);if(ue!==null&&oe.Gl<ue.Gl){oe=tt.alloc(),ue=tt.alloc();var de=new ln(y.ga(Fl,oe),y.ga(un,ue)),pe=this.computeSpot(!E,ee);a=this.getLinkPoint(z,ee,pe,!E,b,a,y,ue),(x.Hf(er)||x.Hf(Wi))&&a.y>=de.y&&a.y<=de.y+de.height?re.y=a.y:(x.Hf(Gn)||x.Hf(Bi))&&a.x>=de.x&&a.x<=de.x+de.width&&(re.x=a.x),tt.free(oe),tt.free(ue)}}return re}}return x=y.ga(y0(x),tt.alloc()),this.pointsCount>(b?6:2)?(ee=E?this.i(1):this.i(this.pointsCount-2),b&&(ee=ny(x,ee.copy()))):(oe=this.computeSpot(!E,ee),z=tt.alloc(),ee=ee.ga(y0(oe),z),b&&(ee=ny(x,ee)),tt.free(z)),this.getLinkPointFromPoint(a,y,x,ee,E,re),tt.free(x),re},Jn.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=v0(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(pa,tt.alloc()),this.pointsCount>(z?6:2)?(re=b?this.i(1):this.i(this.pointsCount-2),re=z?ny(oe,re.copy()):x):(x=tt.alloc(),re=re.ga(pa,x),tt.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,tt.free(oe),oe=x}return E.Mc()&&ee.Td(a)&&(oe+=180,360<=oe&&(oe-=360)),vp(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},Jn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=v0(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)},Jn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=pa:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===qi?El:y)):(a=y||this.toPort,a===null?a=pa:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===qi?El:y)),a};function vp(a){return a===El||a.x===.5&&a.y===.5}function y0(a){return a.x===.5&&a.y===.5?a:pa}Jn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==pc&&4<this.pointsCount?this.computeMidPoint(new tt):(a=y.Zn,a=a!==null?lS(a,this):null,a!==null?a.Zo:y.ga(pa))},Jn.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},Jn.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=St.alloc(),ee.reset()),ee.multiply(this.transform),this.fh(a,ee))return Fv(this,y,x,b),z===void 0&&St.free(ee),!0;if(this.Yc(a,ee)){var re=!1;if(!this.isAtomic)for(var oe=this.O.s,ue=oe.length;ue--;){var de=oe[ue];if(de.visible||de===this.locationObject){var pe=de.actualBounds,Se=this.naturalBounds;if(!(pe.x>Se.width||pe.y>Se.height||0>pe.x+pe.width||0>pe.y+pe.height)){if(pe=St.alloc(),pe.set(ee),de instanceof Vn)re=de.Cf(a,y,x,E,b,pe);else if(this.path===de){if(de instanceof bo)if(re=a,Se=E,de.pickable===!1)re=!1;else if(pe.multiply(de.transform),Se)e:{var Pe=re,Le=pe;if(de.fh(Pe,Le))re=!0;else{if(Le===void 0&&(Le=de.transform,Pe.Re(de.actualBounds))){re=!0;break e}re=Pe.left,Se=Pe.right;var De=Pe.top;Pe=Pe.bottom;var qe=tt.alloc(),Ze=tt.alloc(),ct=tt.alloc(),ft=St.alloc();ft.set(Le),ft.bv(de.transform),ft.Vj(),Ze.x=Se,Ze.y=De,Ze.transform(ft),qe.x=re,qe.y=De,qe.transform(ft),Le=!1,lg(de,qe,Ze,ct)?Le=!0:(qe.x=Se,qe.y=Pe,qe.transform(ft),lg(de,qe,Ze,ct)?Le=!0:(Ze.x=re,Ze.y=Pe,Ze.transform(ft),lg(de,qe,Ze,ct)?Le=!0:(qe.x=re,qe.y=De,qe.transform(ft),lg(de,qe,Ze,ct)&&(Le=!0)))),St.free(ft),tt.free(qe),tt.free(Ze),tt.free(ct),re=Le}}else re=de.fh(re,pe)}else re=Ul(de,a,E,pe);re&&(Se=de,y!==null&&(Se=y(de)),Se&&(x===null||x(Se))&&b.add(Se)),St.free(pe)}}}return z===void 0&&St.free(ee),re||this.background!==null||this.areaBackground!==null}return z===void 0&&St.free(ee),!1},Jn.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?cd:this.curve},Jn.prototype.computeCorner=function(){if(this.curve===cd)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Jn.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},Jn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=rS;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===nm||E===E0||E===sy?a=Math.max(a,b):E===rm||E===am||E===im||E===om?a=Math.max(a,ee):(y=y.ga(pa).ab(x.ga(pa))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*ee)+Math.abs(Math.cos(y)*b)+1)),this.curve===cd&&(a*=1.333)}}return a},Jn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===pc&&x.bb()}},Jn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=iS;var y=this.Sf;if(y!==null){for(var x=Ar(),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),br(x)}}return a},Jn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Jn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Jn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===w0)return!1;b===P0&&(b=tm)}switch(b){case w0: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,ue=Math.sqrt(re*re+oe*oe);if(!ze.$(ue,0)){if(ze.$(re,0))var de=0>oe?-Math.PI/2:Math.PI/2;else de=Math.atan(oe/Math.abs(re)),0>re&&(de=Math.PI-de);ee=y.x;var pe=y.y;re=E.x-ee;var Se=E.y-pe;for(oe=Math.sqrt(re*re+Se*Se),ze.$(re,0)?Se=0>Se?-Math.PI/2:Math.PI/2:(Se=Math.atan(Se/Math.abs(re)),0>re&&(Se=Math.PI-Se)),ue=oe/ue,de=Se-de,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),ze.$(y,0)||(ze.$(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+de,y*=ue,this.L(a,ee+y*Math.cos(re),pe+y*Math.sin(re)));this.dd(x,E)}}return!0;case P0:if(z=this.i(a),pe=this.i(x),!z.Xa(y)||!pe.Xa(E)){b=z.x,z=z.y,ee=pe.x,pe=pe.y,ue=(ee-b)*(ee-b)+(pe-z)*(pe-z),re=y.x,de=y.y,oe=E.x,Se=E.y;var Pe=1;if(oe-re!==0){var Le=(Se-de)/(oe-re);Pe=Math.sqrt(1+1/(Le*Le))}else Le=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var De=y.x,qe=y.y,Ze=.5;ue!==0&&(Ze=((b-De)*(b-ee)+(z-qe)*(z-pe))/ue);var ct=b+Ze*(ee-b),ft=z+Ze*(pe-z);y=Math.sqrt((De-ct)*(De-ct)+(qe-ft)*(qe-ft)),qe<Le*(De-ct)+ft&&(y=-y),0<Le&&(y=-y),De=re+Ze*(oe-re),Ze=de+Ze*(Se-de),Le!==0?(y=De+y/Pe,this.L(a,y,Ze-(y-De)/Le)):this.L(a,De,Ze+y)}this.dd(x,E)}return!0;case tm:e:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),ee=this.i(a+2),re=z.x,de=z.y,pe=re,ue=de,ze.B(b.y,z.y)?ze.B(z.x,ee.x)?de=y.y:ze.B(z.y,ee.y)&&(re=y.x):ze.B(b.x,z.x)&&(ze.B(z.y,ee.y)?re=y.x:ze.B(z.x,ee.x)&&(de=y.y)),this.L(a+1,re,de),b=this.i(x),z=this.i(x-1),ee=this.i(x-2),re=z.x,de=z.y,oe=re,Se=de,ze.B(b.y,z.y)?ze.B(z.x,ee.x)?de=E.y:ze.B(z.y,ee.y)&&(re=E.x):ze.B(b.x,z.x)&&(ze.B(z.y,ee.y)?re=E.x:ze.B(z.x,ee.x)&&(de=E.y)),this.L(x-1,re,de),iy(this))){this.L(a+1,pe,ue),this.L(x-1,oe,Se),x=!1;break e}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Jn.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(sm,sm),oe.Bc(sm,sm),re.Ye(a),oe.Ye(x);var ue=tt.alloc(),de=tt.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?(ue.h(x.x,a.y),de.h(x.x,(a.y+x.y)/2),E===180?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),de.x=ue.x,de.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.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,de.x=ue.x,de.y=x.y):E===0&&a.x<oe.left&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),de.y=ue.y)):(ue.h(a.x,x.y),de.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))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===180||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),de.x=x.x,de.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x>=re.left&&x.x<=a.x||a.x<=oe.right&&a.x>=x.x?(E===90||E===270)&&(ue.h(Math.max((a.x+x.x)/2,a.x),a.y),de.h(ue.x,x.y)):(ue.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)),de.x=x.x,de.y=ue.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?(ue.h(x.x,a.y),de.h(x.x,(a.y+x.y)/2),E===0?(ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),de.x=ue.x,de.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(ue.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,de.x=ue.x,de.y=x.y):E===180&&a.x>oe.right&&a.y>oe.top&&a.y<oe.bottom&&(ue.x=a.x,ue.y=a.y<x.y?Math.min(x.y,oe.top):Math.max(x.y,oe.bottom),de.y=ue.y)):(ue.h(a.x,x.y),de.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))?ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?ue.y=this.computeMidOrthoPosition(a.x,re.top,x.x,Math.max(x.y,oe.bottom),!0):x.y>a.y&&(E===0||E===270)&&(ue.y=this.computeMidOrthoPosition(a.x,re.bottom,x.x,Math.min(x.y,oe.top),!0)),de.x=x.x,de.y=ue.y),ue.y>re.top&&ue.y<re.bottom&&(x.x<=re.right&&x.x>=a.x||a.x>=oe.left&&a.x<=x.x?(E===90||E===270)&&(ue.h(Math.min((a.x+x.x)/2,a.x),a.y),de.h(ue.x,x.y)):(ue.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)),de.x=x.x,de.y=ue.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?(ue.h(a.x,x.y),de.h((a.x+x.x)/2,x.y),E===270?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),de.x=x.x,de.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(ue.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,de.x=x.x,de.y=ue.y):E===90&&a.y<oe.top&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,de.x=ue.x)):(ue.h(x.x,a.y),de.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))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),de.x=ue.x,de.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y>=re.top&&x.y<=a.y||a.y<=oe.bottom&&a.y>=x.y?(E===0||E===180)&&(ue.h(a.x,Math.max((a.y+x.y)/2,a.y)),de.h(x.x,ue.y)):(ue.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)),de.x=ue.x,de.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?(ue.h(a.x,x.y),de.h((a.x+x.x)/2,x.y),E===90?(ue.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),de.x=x.x,de.y=ue.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(ue.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,de.x=x.x,de.y=ue.y):E===270&&a.y>oe.bottom&&a.x>oe.left&&a.x<oe.right&&(ue.x=a.x<x.x?Math.min(x.x,oe.left):Math.max(x.x,oe.right),ue.y=a.y,de.x=ue.x)):(ue.h(x.x,a.y),de.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))?ue.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?ue.x=this.computeMidOrthoPosition(re.left,a.y,Math.max(x.x,oe.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(ue.x=this.computeMidOrthoPosition(re.right,a.y,Math.min(x.x,oe.left),x.y,!1)),de.x=ue.x,de.y=x.y),ue.x>re.left&&ue.x<re.right&&(x.y<=re.bottom&&x.y>=a.y||a.y>=oe.top&&a.y<=x.y?(E===0||E===180)&&(ue.h(a.x,Math.min((a.y+x.y)/2,a.y)),de.h(x.x,ue.y)):(ue.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)),de.x=ue.x,de.y=x.y)));var pe=x;if(this.isAvoiding){var Se=this.diagram;if(Se===null||b===z||this.layer.isTemporary||!tg(Se)||re.ca(pe)&&!z.Td(b)||oe.ca(a)&&!b.Td(z))y=!1;else{var Pe=Lf(Se,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Pe.Yj(Math.min(a.x,ue.x),Math.min(a.y,ue.y),Math.abs(a.x-ue.x),Math.abs(a.y-ue.y))&&Pe.Yj(Math.min(ue.x,de.x),Math.min(ue.y,de.y),Math.abs(ue.x-de.x),Math.abs(ue.y-de.y))&&Pe.Yj(Math.min(de.x,pe.x),Math.min(de.y,pe.y),Math.abs(de.x-pe.x),Math.abs(de.y-pe.y)))y=!1;else{b=a,z=pe;var Le=x=null;if(Se.isVirtualized){Se=Pe.bounds.copy(),Se.Bc(-Pe.Ho,-Pe.Go);var De=tt.alloc();Sp(Pe,a.x,a.y)||(ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,a.x,a.y,ue.x,ue.y,De)?(x=a=De.copy(),y=De.ab(ue)):ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,ue.x,ue.y,de.x,de.y,De)?(x=a=De.copy(),y=De.ab(de)):ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,de.x,de.y,pe.x,pe.y,De)&&(x=a=De.copy(),y=De.ab(pe))),Sp(Pe,pe.x,pe.y)||(ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,pe.x,pe.y,de.x,de.y,De)?(Le=pe=De.copy(),E=de.ab(De)):ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,de.x,de.y,ue.x,ue.y,De)?(Le=pe=De.copy(),E=ue.ab(De)):ze.Ff(Se.x,Se.y,Se.x+Se.width,Se.y+Se.height,ue.x,ue.y,a.x,a.y,De)&&(Le=pe=De.copy(),E=a.ab(De))),tt.free(De)}re=re.copy().ed(oe),re.Bc(Pe.Ho*Pe.Os,Pe.Go*Pe.Os),aS(Pe,a,y,pe,E,re,!0),oe=Fh(Pe,pe.x,pe.y),!Pe.abort&&oe>=xp&&(oS(Pe),re.Bc(Pe.Ho*Pe.Hx,Pe.Go*Pe.Ix),aS(Pe,a,y,pe,E,re,!1),oe=Fh(Pe,pe.x,pe.y)),!Pe.abort&&oe<xp&&Fh(Pe,pe.x,pe.y)!==gf?(ry(this,Pe,pe.x,pe.y,E,!0,ee),re=this.i(2),4>this.pointsCount?(y===0||y===180?(re.x=a.x,re.y=pe.y):(re.x=pe.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?ze.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)):ze.B(re.y,ee.y)?(Math.abs(a.y-re.y)<=Pe.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)&&(ze.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)):ze.B(re.x,ee.x)?(Math.abs(a.x-re.x)<=Pe.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)),Le!==null&&(E===0||E===180?this.yf(z.x,Le.y):this.yf(Le.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(ue.copy()),this.ne(de.copy())),tt.free(ue),tt.free(de)}},Jn.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 iy(a){if(a.diagram===null||!a.isAvoiding||!tg(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=Lf(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 ry(a,y,x,E,b,z,ee){var re=y.Ho,oe=y.Go,ue=Fh(y,x,E),de=x,pe=E;for(b===0?de+=re:b===90?pe+=oe:b===180?de-=re:pe-=oe,b!==ee&&ue>dg&&Fh(y,de,pe)!==ue-1&&(Fh(y,x-re,E)===ue-1?(b=180,de=x-re,pe=E):Fh(y,x+re,E)===ue-1?(b=0,de=x+re,pe=E):Fh(y,x,E-oe)===ue-1?(b=270,de=x,pe=E-oe):Fh(y,x,E+oe)===ue-1&&(b=90,de=x,pe=E+oe));ue>dg&&Fh(y,de,pe)===ue-1;)x=de,E=pe,b===0?de+=re:b===90?pe+=oe:b===180?de-=re:pe-=oe,--ue;z?ue>dg&&(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),ue>dg&&(z=b,ee=x,de=E,b===0?(z=90,de+=oe):b===90?(z=180,ee-=re):b===180?(z=270,de-=oe):b===270&&(z=0,ee+=re),Fh(y,ee,de)===ue-1?ry(a,y,ee,de,z,!1,z):(ee=x,de=E,b===0?(z=270,de-=oe):b===90?(z=0,ee+=re):b===180?(z=90,de+=oe):b===270&&(z=180,ee-=re),Fh(y,ee,de)===ue-1&&ry(a,y,ee,de,z,!1,z))),a.yf(x,E)}Jn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Js(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=Js(y,a,E.x,E.y,x.x,x.y);E=x,re<b&&(z=ee,b=re)}return z},Jn.prototype.qc=function(){this.lk=!1,this.v()},Jn.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 bo&&(b.ua=this.ua)}}},Jn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&cg(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===cd&&3<=y&&!ze.$(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||cg(this)){if(a.type=dt.o,re=B1(a),this.computeShortLength(!0)!==0&&(b=Tg(this,b,!0,z)),pp(re,b.x,b.y,!1),ee===cd&&3<=y&&!ze.$(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=Tg(this,b,!1,z)),uf(re,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=tt.allocAt(E,oe),x=tt.alloc(),x.assign(this.i(1)),z=tt.allocAt(E,oe),b=tt.allocAt(E,oe),ee=this.i(0);for(var ue,de=this.smoothness/3,pe=1;pe<this.pointsCount-1;pe++){ue=this.i(pe);var Se=ee,Pe=ue,Le=this.i(oy(this,ue,pe,!1));if((!ze.$(Se.x,Pe.x)||!ze.$(Pe.x,Le.x))&&(!ze.$(Se.y,Pe.y)||!ze.$(Pe.y,Le.y))){var De=de;isNaN(De)&&(De=this.smoothness/3);var qe=Se.x;Se=Se.y;var Ze=Pe.x;Pe=Pe.y;var ct=Le.x;Le=Le.y;var ft=De*S0(qe,Se,Ze,Pe);De*=S0(Ze,Pe,ct,Le),ze.$(Se,Pe)&&ze.$(Ze,ct)&&(Ze>qe?Le>Pe?(z.x=Ze-ft,z.y=Pe-ft,b.x=Ze+De,b.y=Pe+De):(z.x=Ze-ft,z.y=Pe+ft,b.x=Ze+De,b.y=Pe-De):Le>Pe?(z.x=Ze+ft,z.y=Pe-ft,b.x=Ze-De,b.y=Pe+De):(z.x=Ze+ft,z.y=Pe+ft,b.x=Ze-De,b.y=Pe-De)),ze.$(qe,Ze)&&ze.$(Pe,Le)&&(Pe>Se?(ct>Ze?(z.x=Ze-ft,z.y=Pe-ft,b.x=Ze+De):(z.x=Ze+ft,z.y=Pe-ft,b.x=Ze-De),b.y=Pe+De):(ct>Ze?(z.x=Ze-ft,z.y=Pe+ft,b.x=Ze+De):(z.x=Ze+ft,z.y=Pe+ft,b.x=Ze-De),b.y=Pe-De)),(ze.$(qe,Ze)&&ze.$(Ze,ct)||ze.$(Se,Pe)&&ze.$(Pe,Le))&&(qe=.5*(qe+ct),Se=.5*(Se+Le),z.x=qe,z.y=Se,b.x=qe,b.y=Se),(pe===1||pe===2&&ze.$(ee.x,this.i(0).x)&&ze.$(ee.y,this.i(0).y))&&(x.x=.5*(ee.x+ue.x),x.y=.5*(ee.y+ue.y)),uf(re,x.x-E,x.y-oe,z.x-E,z.y-oe,ue.x-E,ue.y-oe),y.set(z),x.set(b),ee=ue}}ue=ee.x,ee=ee.y,de=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(de=Tg(this,de.copy(),!1,il)),ue=.5*(ue+de.x),ee=.5*(ee+de.y),uf(re,b.x-E,b.y-oe,ue-E,ee-oe,de.x-E,de.y-oe),tt.free(y),tt.free(x),tt.free(z),tt.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=Tg(this,ee.copy(),!1,il)),uf(re,z.x-E,z.y-oe,b.x-E,b.y-oe,ee.x-E,ee.y-oe);else{for(z=tt.alloc(),z.assign(this.i(0)),b=tt.alloc(),b.assign(z),ee=this.computeCorner(),pe=1,ue=0;pe<y;){if(pe=oy(this,z,pe,1<pe),de=this.i(pe),pe>=y-1){if(!z.D(de))this.computeShortLength(!1)!==0&&(de=Tg(this,de.copy(),!1,il)),_g(this,re,-E,-oe,z,de,x);else if(ue===0)for(pe=1;pe<y;)b.assign(z),de=this.i(pe++),_g(this,re,-E,-oe,z,de,x),z.assign(de);break}if(ue=oy(this,de,pe+1,pe<y-3),pe=-E,qe=-oe,Se=de,Ze=this.i(ue),De=x,ze.B(z.y,Se.y)&&ze.B(Se.x,Ze.x))if(Le=Math.min(ee,Math.abs(Se.x-b.x)/2),Le=ft=Math.min(Le,Math.abs(Ze.y-Se.y)/2),ze.B(Le,0))_g(this,re,pe,qe,z,Se,De),z.assign(Se);else{var yt=Se.x,kt=Se.y;Pe=yt,ct=kt,Se.x>z.x?yt=Se.x-Le:yt=Se.x+Le,Ze.y>Se.y?ct=Se.y+ft:ct=Se.y-ft,Ze=tt.allocAt(yt,kt),_g(this,re,pe,qe,z,Ze,De),tt.free(Ze),u0(re,Se.x+pe,Se.y+qe,Pe+pe,ct+qe),z.h(Pe,ct)}else ze.B(z.x,Se.x)&&ze.B(Se.y,Ze.y)?(Le=Math.min(ee,Math.abs(Se.y-b.y)/2),Le=ft=Math.min(Le,Math.abs(Ze.x-Se.x)/2),ze.B(ft,0)?(_g(this,re,pe,qe,z,Se,De),z.assign(Se)):(yt=Se.x,kt=Se.y,Pe=yt,ct=kt,Se.y>z.y?kt=Se.y-Le:kt=Se.y+Le,Ze.x>Se.x?Pe=Se.x+ft:Pe=Se.x-ft,Ze=tt.allocAt(yt,kt),_g(this,re,pe,qe,z,Ze,De),tt.free(Ze),u0(re,Se.x+pe,Se.y+qe,Pe+pe,ct+qe),z.h(Pe,ct))):(_g(this,re,pe,qe,z,Se,De),z.assign(Se));b.assign(de),pe=ue}tt.free(z)}c0=re}else re=this.i(1).copy(),re.x-=E,re.y-=oe,this.computeShortLength(!0)!==0&&(b=Tg(this,b,!0,z)),this.computeShortLength(!1)!==0&&(re=Tg(this,re,!1,z)),a.type=dt.j,a.startX=b.x,a.startY=b.y,a.endX=re.x,a.endY=re.y;return this.lk=!0,a};function S0(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),ze.$(a,0)?y:ze.$(y,0)?a:Math.sqrt(a*a+y*y)))}function Tg(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=S0(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=S0(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 oy(a,y,x,E){for(var b=a.pointsCount,z=y;ze.$(y.x,z.x)&&ze.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!ze.$(y.x,z.x)&&!ze.$(y.y,z.y))return x-1;for(var ee=z;ze.$(y.x,z.x)&&ze.$(z.x,ee.x)&&(!E||(y.y>=z.y?z.y>=ee.y:z.y<=ee.y))||ze.$(y.y,z.y)&&ze.$(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}Jn.prototype.computeJumpLength=function(){return 10};function _g(a,y,x,E,b,z,ee){if(!ee&&cg(a)){ee=a.computeJumpLength();var re=ee/2,oe=[],ue=0;if(a.isVisible()&&(ue=bx(a,b,z,oe)),0<ue){if(ze.B(b.y,z.y))if(b.x<z.x)for(var de=0;de<ue;){var pe=Math.max(b.x,Math.min(oe[de++]-re,z.x-ee));y.lineTo(pe+x,z.y+E);for(var Se=pe+x,Pe=Math.min(pe+ee,z.x);de<ue&&(pe=oe[de],pe<Pe+ee);)de++,Pe=Math.min(pe+re,z.x);pe=z.y-ee+E,Pe+=x;var Le=z.y+E;a.curve===ff?pp(y,Pe,Le,!1):uf(y,Se,pe,Pe,pe,Pe,Le)}else for(--ue;0<=ue;){for(de=Math.min(b.x,Math.max(oe[ue--]+re,z.x+ee)),y.lineTo(de+x,z.y+E),Se=de+x,pe=Math.max(de-ee,z.x);0<=ue&&(de=oe[ue],de>pe-ee);)ue--,pe=Math.max(de-re,z.x);de=z.y-ee+E,pe+=x,Pe=z.y+E,a.curve===ff?pp(y,pe,Pe,!1):uf(y,Se,de,pe,de,pe,Pe)}else if(ze.B(b.x,z.x))if(b.y<z.y)for(de=0;de<ue;){for(pe=Math.max(b.y,Math.min(oe[de++]-re,z.y-ee)),y.lineTo(z.x+x,pe+E),Se=pe+E,pe=Math.min(pe+ee,z.y);de<ue&&(Pe=oe[de],Pe<pe+ee);)de++,pe=Math.min(Pe+re,z.y);Pe=z.x-ee+x,Le=z.x+x,pe+=E,a.curve===ff?pp(y,Le,pe,!1):uf(y,Pe,Se,Pe,pe,Le,pe)}else for(--ue;0<=ue;){for(de=Math.min(b.y,Math.max(oe[ue--]+re,z.y+ee)),y.lineTo(z.x+x,de+E),Se=de+E,de=Math.max(de-ee,z.y);0<=ue&&(pe=oe[ue],pe>de-ee);)ue--,de=Math.max(pe-re,z.y);pe=z.x-ee+x,Pe=z.x+x,de+=E,a.curve===ff?pp(y,Pe,de,!1):uf(y,pe,Se,pe,de,Pe,de)}}}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 Jn){if(oe===a)return 0<E.length&&E.sort(function(de,pe){return de-pe}),E.length;if(oe.isVisible()&&cg(oe)){var ue=oe.routeBounds;ue.w()&&a.routeBounds.Yc(ue)&&!a.usesSamePort(oe)&&(ue=oe.path,ue!==null&&ue.Ed()&&Fx(y,x,E,oe))}}}}}return 0<E.length&&E.sort(function(de,pe){return de-pe}),E.length}function Fx(a,y,x,E){for(var b=ze.B(a.y,y.y),z=E.pointsCount,ee=E.i(0),re=tt.alloc(),oe=1;oe<z;oe++){var ue=E.i(oe);if(oe<z-1){var de=E.i(oe+1);if(ee.y===ue.y&&ue.y===de.y){if(ue.x>ee.x&&de.x>=ue.x||ue.x<ee.x&&de.x<=ue.x)continue}else if(ee.x===ue.x&&ue.x===de.x&&(ue.y>ee.y&&de.y>=ue.y||ue.y<ee.y&&de.y<=ue.y))continue}e:{de=a.x;var pe=a.y,Se=y.x,Pe=y.y,Le=ee.x;ee=ee.y;var De=ue.x,qe=ue.y;if(ze.B(de,Se)){if(!ze.B(pe,Pe)&&ze.B(ee,qe)&&Math.min(pe,Pe)<ee&&Math.max(pe,Pe)>ee&&Math.min(Le,De)<de&&Math.max(Le,De)>de&&!ze.B(Le,De)){re.x=de,re.y=ee,de=!0;break e}}else if(ze.B(pe,Pe)&&ze.B(Le,De)&&Math.min(de,Se)<Le&&Math.max(de,Se)>Le&&Math.min(ee,qe)<pe&&Math.max(ee,qe)>pe&&!ze.B(ee,qe)){re.x=Le,re.y=pe,de=!0;break e}re.x=0,re.y=0,de=!1}de&&(b?x.push(re.x):x.push(re.y)),ee=ue}tt.free(re)}function cg(a){return a=a.curve,a===yp||a===ff}function x0(a,y){(y||cg(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()))}Jn.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 Jn&&(oe===this?z=!0:z&&tS(this,oe,a))}}else if(E)for(z=b.Pa.s,b=z.length,ee=0;ee<b;ee++)re=z[ee],re instanceof Jn&&tS(this,re,a)}}}}};function tS(a,y,x){if(y!==null&&y.lk&&y.fd&&cg(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Jn.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},Jn.prototype.isVisible=function(){if(!xr.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},Jn.prototype.Zb=function(a){if(xr.prototype.Zb.call(this,a),a&&x0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Jn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?tm:this.qk};function qp(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 ue=ee[oe];(ue.ef===y&&ue.ff===E&&ue.uf===x&&ue.vf===b||ue.ef===x&&ue.ff===b&&ue.uf===y&&ue.vf===E)&&(z===null?z=ue:(a===null&&(a=[],a.push(z)),a.push(ue)))}if(a!==null){for(z=W1(y,x,E,b),z===null&&(z=new b0(y,E,x,b),H1(y,z),H1(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function em(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(qa(y.links,a),y.Sl()))}Jn.prototype.ph=function(){return!0},dn.Object.defineProperties(Jn.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&&g0(y,this,x),em(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&&f0(a,this,b),qp(this),this.C(1)),this.g("fromNode",y,a),mp(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&ed(x),em(this),this.ff=a;var E=this.fromPort;E!==null&&ed(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))),qp(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&&g0(y,this,x),em(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&&f0(a,this,b),qp(this),this.C(1)),this.g("toNode",y,a),mp(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&ed(x),em(this),this.vf=a;var E=this.toPort;E!==null&&ed(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))),qp(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:qi},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&&ed(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&&pr(a,">= 0",Jn,"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:qi},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&&ed(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&&pr(a,">= 0",Jn,"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?Za: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&&$p(this.fromNode),this.toNode!==null&&$p(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof bo?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()===cd&&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),ze.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);ze.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 tt)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||m0(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);ze.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):ze.$(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 Un,E=0;E<a.length/2;E++)b=new tt(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(!Zn(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new Un,E=0;E<a.length;E++)b=a[E],x.add(new tt(b.x,b.y).freeze())}}else if(a instanceof Un)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else Wt("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),m0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&la(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||!vp(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!vp(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(),x0(this,y===ff||y===yp||a===ff||a===yp),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(),x0(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)}}}),Jn.prototype.invalidateOtherJumpOvers=Jn.prototype.Xo,Jn.prototype.findClosestSegment=Jn.prototype.ez,Jn.prototype.updateRoute=Jn.prototype.vg,Jn.prototype.invalidateRoute=Jn.prototype.bb,Jn.prototype.rollbackRoute=Jn.prototype.rv,Jn.prototype.commitRoute=Jn.prototype.zf,Jn.prototype.startRoute=Jn.prototype.uh,Jn.prototype.clearPoints=Jn.prototype.Fj,Jn.prototype.removePoint=Jn.prototype.pv,Jn.prototype.addPointAt=Jn.prototype.yf,Jn.prototype.addPoint=Jn.prototype.ne,Jn.prototype.insertPointAt=Jn.prototype.m,Jn.prototype.insertPoint=Jn.prototype.Kz,Jn.prototype.setPointAt=Jn.prototype.L,Jn.prototype.setPoint=Jn.prototype.dd,Jn.prototype.getPoint=Jn.prototype.i,Jn.prototype.getOtherPort=Jn.prototype.Cz,Jn.prototype.getOtherNode=Jn.prototype.To;var Og=null,Ig=null,ay=new Qt(Jn,"Normal",1),Lx=new Qt(Jn,"Orthogonal",2),Mx=new Qt(Jn,"AvoidsNodes",6),nS=new Qt(Jn,"AvoidsNodesStraight",7),pc=new Qt(Jn,"None",0),cd=new Qt(Jn,"Bezier",9),ff=new Qt(Jn,"JumpGap",10),yp=new Qt(Jn,"JumpOver",11),tm=new Qt(Jn,"End",17),w0=new Qt(Jn,"Scale",18),P0=new Qt(Jn,"Stretch",19),nm=new Qt(Jn,"OrientAlong",21),im=new Qt(Jn,"OrientPlus90",22),rm=new Qt(Jn,"OrientMinus90",23),sy=new Qt(Jn,"OrientOpposite",24),E0=new Qt(Jn,"OrientUpright",25),om=new Qt(Jn,"OrientPlus90Upright",26),am=new Qt(Jn,"OrientMinus90Upright",27),C0=new Qt(Jn,"OrientUpright45",28),iS=16,rS=14,sm=8;Jn.className="Link",Jn.Normal=ay,Jn.Orthogonal=Lx,Jn.AvoidsNodes=Mx,Jn.AvoidsNodesStraight=nS,Jn.None=pc,Jn.Bezier=cd,Jn.JumpGap=ff,Jn.JumpOver=yp,Jn.End=tm,Jn.Scale=w0,Jn.Stretch=P0,Jn.OrientAlong=nm,Jn.OrientPlus90=im,Jn.OrientMinus90=rm,Jn.OrientOpposite=sy,Jn.OrientUpright=E0,Jn.OrientPlus90Upright=om,Jn.OrientMinus90Upright=am,Jn.OrientUpright45=C0,Jn.EndSegmentStep=8,Jn.CurvinessStart=iS,Jn.SpacingMin=rS,Jn.OrthoShortCut=sm;function b0(a,y,x,E){_a(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}b0.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},b0.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))}},b0.className="LinkBundle";function lm(a){_a(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}lm.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=ly,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 Sp(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function Fh(a,y,x){return Sp(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):ly}function oS(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]>=dg&&(x[E]=ly)}lm.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]===gf)return!1}return!0};function Lh(a,y,x,E,b,z,ee,re,oe){if(!(y<z||y>ee||x<re||x>oe)){var ue=y|0,de=x|0,pe=a.ac[ue][de];if(pe>=dg&&pe<xp)for(b?de+=E:ue+=E,pe+=1;z<=ue&&ue<=ee&&re<=de&&de<=oe&&!(pe>=a.ac[ue][de]);)a.ac[ue][de]=pe,pe+=1,b?de+=E:ue+=E;if(ue=b?de:ue,b)if(0<E)for(x+=E;x<ue;x+=E)Lh(a,y,x,1,!b,z,ee,re,oe),Lh(a,y,x,-1,!b,z,ee,re,oe);else for(x+=E;x>ue;x+=E)Lh(a,y,x,1,!b,z,ee,re,oe),Lh(a,y,x,-1,!b,z,ee,re,oe);else if(0<E)for(y+=E;y<ue;y+=E)Lh(a,y,x,1,!b,z,ee,re,oe),Lh(a,y,x,-1,!b,z,ee,re,oe);else for(y+=E;y>ue;y+=E)Lh(a,y,x,1,!b,z,ee,re,oe),Lh(a,y,x,-1,!b,z,ee,re,oe)}}function F0(a,y,x,E,b,z,ee,re,oe){y|=0,x|=0;var ue=gf,de=dg;for(a.ac[y][x]=de;ue===gf&&y>z&&y<ee&&x>re&&x<oe;)de+=1,a.ac[y][x]=de,b?x+=E:y+=E,ue=a.ac[y][x]}function L0(a,y,x,E,b,z,ee,re,oe){y|=0,x|=0;var ue=gf,de=xp;for(a.ac[y][x]=de;ue===gf&&y>z&&y<ee&&x>re&&x<oe;)a.ac[y][x]=de,b?x+=E:y+=E,ue=a.ac[y][x]}function aS(a,y,x,E,b,z,ee){if(a.ac!==null){a.abort=!1;var re=y.x,oe=y.y;if(Sp(a,re,oe)){re-=a.Nd,re/=a.rc,oe-=a.Od,oe/=a.sc;var ue=E.x,de=E.y;if(Sp(a,ue,de))if(ue-=a.Nd,ue/=a.rc,de-=a.Od,de/=a.sc,1>=Math.abs(re-ue)&&1>=Math.abs(oe-de))a.abort=!0;else{var pe=z.x;E=z.y,y=z.x+z.width;var Se=z.y+z.height;pe-=a.Nd,pe/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,Se-=a.Od,Se/=a.sc,z=Math.max(0,Math.min(a.di,pe|0)),y=Math.min(a.di,Math.max(0,y|0)),pe=Math.max(0,Math.min(a.ei,E|0)),Se=Math.min(a.ei,Math.max(0,Se|0)),E=a.ac,re|=0,oe|=0,ue|=0,de|=0;var Pe=x===0||x===90?1:-1;if(x=x===90||x===270,E[re][oe]===gf?(F0(a,re,oe,Pe,x,z,y,pe,Se),F0(a,re,oe,1,!x,z,y,pe,Se),F0(a,re,oe,-1,!x,z,y,pe,Se)):F0(a,re,oe,Pe,x,re,oe,re,oe),E[ue][de]===gf?(L0(a,ue,de,b===0||b===90?1:-1,b===90||b===270,z,y,pe,Se),L0(a,ue,de,1,!(b===90||b===270),z,y,pe,Se),L0(a,ue,de,-1,!(b===90||b===270),z,y,pe,Se)):L0(a,ue,de,Pe,x,ue,de,ue,de),x=Ar(),ee&&sS(a,ue,de,b,re,oe,x))for((x[0]!==ue||x[1]!==de)&&(x.unshift(de),x.unshift(ue)),(x[x.length-2]!==re||x[x.length-1]!==oe)&&(x.push(re),x.push(oe)),a=dg,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],ue=x[z+1];y>b?b++:y<b?b--:ue>ee?ee++:ue<ee&&ee--,E[b][ee]=a++,b!==y||ee!==ue;);else Lh(a,re,oe,1,!1,z,y,pe,Se),Lh(a,re,oe,-1,!1,z,y,pe,Se),Lh(a,re,oe,1,!0,z,y,pe,Se),Lh(a,re,oe,-1,!0,z,y,pe,Se);br(x)}}}}function sS(a,y,x,E,b,z,ee){for(var re=a.ac,oe=y,ue=x;;){if(oe===b&&ue===z)return!0;var de=oe,pe=ue;if(E===0)if(de<b)de++;else break;else if(E===90)if(pe<z)pe++;else break;else if(E===180)if(de>b)de--;else break;else if(pe>z)pe--;else break;var Se=re[de][pe];if(Se===0||Se===uy)break;oe=de,ue=pe}for(;;){if(de=E,pe=oe,Se=ue,E===0?Se<z?(de=90,Se++):Se>z&&(de=270,Se--):E===90?pe<b?(de=0,pe++):pe>b&&(de=180,pe--):E===180?Se<z?(de=90,Se++):Se>z&&(de=270,Se--):pe<b?(de=0,pe++):pe>b&&(de=180,pe--),pe=re[pe][Se],de!==E&&pe!==0&&pe!==uy){if(ee.push(oe),ee.push(ue),sS(a,oe,ue,de,b,z,ee))return!0;ee.pop(),ee.pop()}if(re[oe][ue]=uy,E===0){if(oe===y)return!1;oe--}else if(E===90){if(ue===x)return!1;ue--}else if(E===180){if(oe===y)return!1;oe++}else{if(ue===x)return!1;ue++}}}dn.Object.defineProperties(lm.prototype,{bounds:{get:function(){return new ln(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 gf=0,dg=1,xp=999999,ly=xp+1,uy=xp+2;lm.className="PositionArray";function Rg(){_a(this),this.port=this.node=null,this.pe=[],this.ap=!1}Rg.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 Ax(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}Rg.prototype.Sl=function(){this.pe.length=0};function lS(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 po?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(Fl,tt.alloc()),oe=a.port.ga(un,tt.alloc());for(b=ln.allocAt(re.x,re.y,0,0),b.Ye(oe),tt.free(re),tt.free(oe),re=tt.allocAt(b.x+b.width/2,b.y+b.height/2),oe=a.port.li(),ee=ee.iterator;ee.next();){var ue=ee.value;if(ue.isVisible()&&ue.fromPort!==ue.toPort){var de=ue.fromPort===a.port||ue.fromNode!==null&&ue.fromNode.Td(E),pe=ue.computeSpot(de,a.port);if(pe.$c()&&(de=de?ue.toPort:ue.fromPort,de!==null)){var Se=de.part;if(Se!==null){var Pe=Se.findVisibleNode();Pe!==null&&Pe!==Se&&(Se=Pe,de=Se.port),de=ue.computeOtherPoint(Se,de),Se=re.ab(de),Se-=oe,0>Se?Se+=360:360<=Se&&(Se-=360),pe=Ax(b,pe,Se,ue.isOrthogonal),pe===0?(pe=4,180<Se&&(Se-=360)):pe===90?(pe=8,270<Se&&(Se-=360)):pe===180?pe=2:(pe=1,90>Se&&(Se+=360)),Pe=a.pe[z],Pe===void 0?(Pe=new cy(ue,Se,pe),a.pe[z]=Pe):(Pe.link=ue,Pe.angle=Se,Pe.Nc=pe),Pe.hv.set(de),z++}}}}for(tt.free(re),a.pe.sort(Rg.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,pe=a.port,E=a.node.portSpreading,re=tt.alloc(),oe=tt.alloc(),ee=tt.alloc(),ue=tt.alloc(),pe.ga(Fl,re),pe.ga(Ec,oe),pe.ga(un,ee),pe.ga(Ju,ue),Pe=Se=de=pe=0,E===qv)for(var Le=0;Le<z.length;Le++){var De=z[Le];if(De!==null){var qe=De.link.computeThickness();switch(De.Nc){case 8:Se+=qe;break;case 2:Pe+=qe;break;case 1:pe+=qe;break;default:case 4:de+=qe}}}var Ze=Le=0,ct=1,ft=De=0;for(qe=0;qe<z.length;qe++){var yt=z[qe];if(yt!==null){if(Le!==yt.Nc){switch(Le=yt.Nc,Le){case 8:var kt=ee;Ze=ue;break;case 2:kt=ue,Ze=re;break;case 1:kt=re,Ze=oe;break;default:case 4:kt=oe,Ze=ee}switch(De=Ze.x-kt.x,ft=Ze.y-kt.y,Le){case 8:Se>Math.abs(De)?(ct=Math.abs(De)/Se,Se=Math.abs(De)):ct=1;break;case 2:Pe>Math.abs(ft)?(ct=Math.abs(ft)/Pe,Pe=Math.abs(ft)):ct=1;break;case 1:pe>Math.abs(De)?(ct=Math.abs(De)/pe,pe=Math.abs(De)):ct=1;break;default:case 4:de>Math.abs(ft)?(ct=Math.abs(ft)/de,de=Math.abs(ft)):ct=1}Ze=0}var Ut=yt.Zo;if(E===qv){switch(yt=yt.link.computeThickness(),yt*=ct,Ut.set(kt),Le){case 8:Ut.x=kt.x+De/2+Se/2-Ze-yt/2;break;case 2:Ut.y=kt.y+ft/2+Pe/2-Ze-yt/2;break;case 1:Ut.x=kt.x+De/2-pe/2+Ze+yt/2;break;default:case 4:Ut.y=kt.y+ft/2-de/2+Ze+yt/2}Ze+=yt}else{var gi=.5;E===p0&&(gi=(yt.Uo+1)/(yt.Gl+1)),Ut.x=kt.x+De*gi,Ut.y=kt.y+ft*gi}}}for(tt.free(re),tt.free(oe),tt.free(ee),tt.free(ue),kt=a.pe,z=0;z<kt.length;z++)E=kt[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,ln.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}Rg.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},Rg.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,El,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)},Rg.className="Knot";function cy(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new tt,this.Gl=this.Uo=0,this.Zo=new tt,this.Ju=0}cy.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()},cy.className="LinkInfo";function qs(a){_a(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new tt(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}qs.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},qs.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},qs.prototype.qb=function(){},qs.prototype.toString=function(){var a=Rr(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},qs.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())}}},qs.prototype.createNetwork=function(){return new ks(this)},qs.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Gt?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof po?y.lg(a.memberParts):y.lg(a.iterator),y},qs.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")}},qs.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()}},qs.prototype.doLayout=function(a){var y=new zn;a instanceof Gt?(If(this,y,a.nodes,!0,this.rh,!0,!1,!0),If(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof po?If(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},qs.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;um(re);var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(E,b),re instanceof po&&(re.rh=!1),E+=Math.max(ue,50)+20,ee=Math.max(ee,Math.max(oe,50)),z>=y-1?(z=0,E=x,b+=ee+20,ee=0):z++}},qs.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 Jn)&&(um(re),this.rh(re))){var oe=re.measuredBounds,ue=oe.width;oe=oe.height,re.moveTo(x,E),re instanceof po&&(re.rh=!1),x+=Math.max(ue,50)+20,z=Math.max(z,Math.max(oe,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},qs.prototype.rh=function(a){return!!(!a.location.w()||a instanceof po&&a.rh)};function If(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 xi?oe.isLinkLabel||(oe instanceof po&&oe.layout===null?If(a,y,oe.memberParts,!1,b,z,ee,re):(um(oe),y.add(oe))):ee&&oe instanceof Jn?y.add(oe):!re||!oe.Zc()||oe instanceof xi||(um(oe),y.add(oe)))}}function um(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}qs.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new ln),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},qs.prototype.ex=function(a){var y=new zn;return a instanceof Gt?(If(this,y,a.nodes,!0,null,!0,!0,!0),If(this,y,a.links,!0,null,!0,!0,!0),If(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof po?If(this,y,a.memberParts,!1,null,!0,!0,!0):If(this,y,a.iterator,!1,null,!0,!0,!0),y},qs.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(Fl),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},dn.Object.defineProperties(qs.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())}}}),qs.prototype.collectParts=qs.prototype.ex,qs.prototype.getLayoutBounds=qs.prototype.ni,qs.prototype.invalidateLayout=qs.prototype.C,qs.className="Layout";function ks(a){_a(this),this.Sc=a,this.wf=new zn,this.ye=new zn,this.Es=new sr,this.zs=new sr}ks.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 zn,this.ye=new zn,this.Es=new sr,this.zs=new sr},ks.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},ks.prototype.createVertex=function(){return new $l(this)},ks.prototype.createEdge=function(){return new td(this)},ks.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 xi)return!ee.isLinkLabel;if(ee instanceof Jn){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 xi&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof po&&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 Jn&&(!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))}}},ks.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},Ee=ks.prototype,Ee.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},Ee.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},Ee.Iu=function(a){if(a!==null&&uS(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 uS(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}Ee.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},Ee.ki=function(a){return a===null?null:this.Es.I(a)},Ee.Bo=function(a){if(a!==null){dy(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function dy(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}}Ee.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},Ee.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),hy(this,a)}};function hy(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}Ee.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},Ee.Lo=function(a){return a===null?null:this.zs.I(a)},Ee.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},Ee.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))}},Ee.Ko=function(){for(var a=Ar(),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]);br(a)},ks.prototype.deleteArtificialVertexes=function(){for(var a=Ar(),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=Ar(),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]);br(a),br(y)};function Nx(a){for(var y=Ar(),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]);br(y)}ks.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Nx(this),this.Ko()),a=new Un;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),fy(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 fy(a,y,x){if(x!==null&&x.network!==y){uS(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(hy(a,b),dy(y,b),fy(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(hy(a,x),dy(y,x),fy(a,y,x.toVertex))}}ks.prototype.dz=function(){for(var a=new zn,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},dn.Object.defineProperties(ks.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}}}),ks.prototype.findAllParts=ks.prototype.dz,ks.prototype.splitIntoSubNetworks=ks.prototype.Zx,ks.prototype.deleteSelfEdges=ks.prototype.Ko,ks.prototype.reverseEdge=ks.prototype.gm,ks.prototype.linkVertexes=ks.prototype.Zj,ks.prototype.findEdge=ks.prototype.Lo,ks.prototype.deleteLink=ks.prototype.Yy,ks.prototype.deleteEdge=ks.prototype.Mj,ks.prototype.addLink=ks.prototype.Dy,ks.prototype.addEdge=ks.prototype.Bo,ks.prototype.findVertex=ks.prototype.ki,ks.prototype.deleteNode=ks.prototype.Zy,ks.prototype.deleteVertex=ks.prototype.Iu,ks.prototype.addNode=ks.prototype.Bl,ks.prototype.addVertex=ks.prototype.dh,ks.prototype.addParts=ks.prototype.lg,ks.className="LayoutNetwork";function $l(a){_a(this),this.ob=a,this.j=new ln(0,0,10,10).freeze(),this.o=new tt(5,5).freeze(),this.Sh=this.ub=null,this.tg=new Un,this.mg=new Un}$l.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new Un,this.mg=new Un},$l.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+No(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},$l.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Zn(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 po)){x=ln.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(pa);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),ln.free(x);return}ln.free(x)}a.moveTo(y.x,y.y)}},$l.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},$l.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},$l.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},$l.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function gy(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}dn.Object.defineProperties($l.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=ln.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),ln.free(x),!(a instanceof po)&&(a=a.locationObject.ga(pa),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 zn,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new zn,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new zn,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 Un,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}}}),$l.prototype.deleteDestinationEdge=$l.prototype.Jl,$l.prototype.addDestinationEdge=$l.prototype.zl,$l.prototype.deleteSourceEdge=$l.prototype.Kl,$l.prototype.addSourceEdge=$l.prototype.Cl,$l.className="LayoutVertex",$l.standardComparer=gy,$l.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 td(a){_a(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}td.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},td.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+No(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},td.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},td.prototype.commit=function(){},td.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},dn.Object.defineProperties(td.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)}}}),td.prototype.getOtherVertex=td.prototype.Ax,td.className="LayoutEdge";function Fu(a){qs.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new Fn(NaN,NaN).freeze(),this.tf=new Fn(10,10).freeze(),this.Jb=cm,this.Rb=A0,this.nd=dm,this.hd=cS,a&&Object.assign(this,a)}It(Fu,qs),Fu.prototype.cloneProtected=function(a){qs.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},Fu.prototype.qb=function(a){a.classType===Fu?a===dm||a===B0||a===py||a===N0?this.sorting=a:a===A0||a===Xd?this.arrangement=a:a===cm||a===M0?this.alignment=a:Wt("Unknown enum value: "+a):qs.prototype.qb.call(this,a)},Fu.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 po)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 N0:b.reverse();break;case dm:b.sort(this.comparer);break;case B0: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 M0:var re=y,oe=x,ue=ln.alloc(),de=Math.max(this.cellSize.width,1);if(!isFinite(de))for(var pe=de=0;pe<b.length;pe++){var Se=this.ni(b[pe],ue);de=Math.max(de,Se.width)}if(de=Math.max(de+re,1),pe=Math.max(this.cellSize.height,1),!isFinite(pe))for(Se=pe=0;Se<b.length;Se++){var Pe=this.ni(b[Se],ue);pe=Math.max(pe,Pe.height)}pe=Math.max(pe+oe,1),Se=this.arrangement;for(var Le=Pe=this.arrangementOrigin.x,De=this.arrangementOrigin.y,qe=0,Ze=0,ct=0;ct<b.length;ct++){var ft=b[ct],yt=this.ni(ft,ue),kt=Math.ceil((yt.width+re)/de)*de,Ut=Math.ceil((yt.height+oe)/pe)*pe;switch(Se){case Xd:var gi=Math.abs(Le-yt.width);break;default:gi=Le+yt.width}switch((0<z&&qe>z-1||0<ee&&0<qe&&gi-Pe>ee)&&(E.push(new ln(0,De,ee+re,Ze)),qe=0,Le=Pe,De+=Ze,Ze=0),Ze=Math.max(Ze,Ut),Se){case Xd:yt=-yt.width;break;default:yt=0}switch(ft.moveTo(Le+yt,De),Se){case Xd:Le-=kt;break;default:Le+=kt}qe++}E.push(new ln(0,De,ee+re,Ze)),ln.free(ue);break;case cm:for(oe=ee,de=z,pe=y,Se=x,ee=ln.alloc(),Pe=Math.max(this.cellSize.width,1),z=De=ue=0,re=tt.alloc(),Le=0;Le<b.length;Le++)Ze=b[Le],qe=this.ni(Ze,ee),Ze=cf(Ze,Ze.locationObject,Ze.locationSpot,re),ue=Math.max(ue,Ze.x),De=Math.max(De,qe.width-Ze.x),z=Math.max(z,Ze.y);switch(Le=this.arrangement,Le){case Xd:ue+=pe;break;default:De+=pe}Pe=isFinite(Pe)?Math.max(Pe+pe,1):Math.max(ue+De,1);var Qi=Ze=this.arrangementOrigin.x;for(ct=this.arrangementOrigin.y,De=0,oe>=ue&&(oe-=ue),ue=ft=0,kt=Math.max(this.cellSize.height,1),yt=z=0,Ut=!0,qe=tt.alloc(),gi=0;gi<b.length;gi++){var Gi=b[gi],Qn=this.ni(Gi,ee),An=cf(Gi,Gi.locationObject,Gi.locationSpot,re);if(0<De)switch(Le){case Xd:Qi=(Qi-Ze-(Qn.width-An.x))/Pe,Qi=ze.$(Math.round(Qi),Qi)?Math.round(Qi):Math.floor(Qi),Qi=Qi*Pe+Ze;break;default:Qi=(Qi-Ze+An.x)/Pe,Qi=ze.$(Math.round(Qi),Qi)?Math.round(Qi):Math.ceil(Qi),Qi=Qi*Pe+Ze}else switch(Le){case Xd:ft=Qi+An.x+Qn.width;break;default:ft=Qi-An.x}switch(Le){case Xd:var so=-(Qi+An.x)+ft;break;default:so=Qi+Qn.width-An.x-ft}if(0<de&&De>de-1||0<oe&&0<De&&so>oe){for(E.push(new ln(0,Ut?ct-z:ct,oe+pe,yt+z+Se)),Qi=0;Qi<De&&gi!==De;Qi++){so=b[gi-De+Qi];var Wr=cf(so,so.locationObject,so.locationSpot,qe);so.moveTo(so.position.x,so.position.y+z-Wr.y)}yt+=Se,ct=Ut?ct+yt:ct+(yt+z),De=yt=z=0,Qi=Ze,Ut=!1}switch(Qi===Ze&&(ue=Le===Xd?Math.max(ue,Qn.width-An.x):Math.min(ue,-An.x)),z=Math.max(z,An.y),yt=Math.max(yt,Qn.height-An.y),isFinite(kt)&&(yt=Math.max(yt,Math.max(Qn.height,kt)-An.y)),Ut?Gi.moveTo(Qi-An.x,ct-An.y):Gi.moveTo(Qi-An.x,ct),Le){case Xd:Qi-=An.x+pe;break;default:Qi+=Qn.width-An.x+pe}De++}if(E.push(new ln(0,ct,oe+pe,(Ut?yt:yt+z)+Se)),b.length!==De)for(oe=0;oe<De;oe++)de=b[b.length-De+oe],pe=cf(de,de.locationObject,de.locationSpot,re),de.moveTo(de.position.x,de.position.y+z-pe.y);if(tt.free(re),tt.free(qe),Le===Xd)for(b=0;b<E.length;b++)z=E[b],z.width+=ue,z.x-=ue;else for(b=0;b<E.length;b++)z=E[b],z.x>ue&&(z.width+=z.x-ue,z.x=ue);ln.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===Xd?this.commitLayers(E,new tt(b+y/2-(z+b),ee-x/2)):this.commitLayers(E,new tt(b-y/2,ee-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Fu.prototype.commitLayers=function(){};function cS(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}dn.Object.defineProperties(Fu.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!==cm&&a!==M0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==A0&&a!==Xd||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==py&&a!==N0&&a!==dm&&a!==B0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var M0=new Qt(Fu,"Position",0),cm=new Qt(Fu,"Location",1),A0=new Qt(Fu,"LeftToRight",2),Xd=new Qt(Fu,"RightToLeft",3),py=new Qt(Fu,"Forward",4),N0=new Qt(Fu,"Reverse",5),dm=new Qt(Fu,"Ascending",6),B0=new Qt(Fu,"Descending",7);Fu.className="GridLayout",Fu.standardComparer=cS,Fu.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},Fu.Position=M0,Fu.Location=cm,Fu.LeftToRight=A0,Fu.RightToLeft=Xd,Fu.Forward=py,Fu.Reverse=N0,Fu.Ascending=dm,Fu.Descending=B0;function rs(){this.On=new zn,this.Dn=new zn,this.Pa=new zn,this.cf=new sr,this.bf=new sr,this.aj=new sr,this.H=null,this.tp=!1}Ee=rs.prototype,Ee.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},Ee.Xe=function(a){this.H=a},Ee.oi=function(a){if(a instanceof xi){if(this.On.add(a),a instanceof po){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 Jn?this.Dn.add(a):a instanceof Fa||this.Pa.add(a);y=a.data,y===null||a instanceof Fa||(a instanceof Jn?this.bf.add(y,a):this.cf.add(y,a))},Ee.pc=function(a){if(a.Ej(),a instanceof xi){if(this.On.remove(a),a instanceof po){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 Jn?this.Dn.remove(a):a instanceof Fa||this.Pa.remove(a);y=a.data,y===null||a instanceof Fa||(a instanceof Jn?this.bf.remove(y):this.cf.remove(y))},Ee.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 po)&&Wt('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 po||Wt('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 Jn||Wt('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=Ar(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=Ar(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=Ar(),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]);br(y),br(x),br(a)}},rs.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},rs.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&dS(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&Ed(this.diagram,!1)};function dS(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=hS(a,y,E);if(b!==null&&(Fd(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)}}rs.prototype.insertLink=function(){return null},rs.prototype.resolveReferencesForData=function(){},rs.prototype.Ro=function(a){return this.H.model.Ro(a)};function hS(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&&(pS||(pS=!0,Ro('No Group template found for category "'+x+'"'),Ro(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(gS||(gS=!0,Ro('No Node template found for category "'+x+'"'),Ro(" Using default node template")),y=a.ny))),y}rs.prototype.getLinkCategoryForData=function(){return""},rs.prototype.setLinkCategoryForData=function(){},rs.prototype.setFromNodeForLink=function(){},rs.prototype.setToNodeForLink=function(){},rs.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(mS||(mS=!0,Ro('No Link template found for category "'+a+'"'),Ro(" Using default link template")),x=y.my)),x},rs.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},rs.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},rs.prototype.ip=function(a){a=this.Lc(a),a!==null&&(ef(this.diagram,a,!1),this.unresolveReferencesForPart(a))},rs.prototype.unresolveReferencesForPart=function(){},rs.prototype.removeDataForLink=function(){},rs.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},rs.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof xi?a:null)},rs.prototype.findLinkForKey=function(){return null},Ee=rs.prototype,Ee.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},Ee.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof xi?a:null)},Ee.Kc=function(a){return a===null?null:this.bf.I(a)},Ee.ms=function(a){for(var y=0;y<arguments.length;++y);y=new zn;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(Zn(ee)&&my(this,b,ee)){y.add(E);break}}}return y.iterator},Ee.ls=function(a){for(var y=0;y<arguments.length;++y);y=new zn;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(Zn(ee)&&my(this,b,ee)){y.add(E);break}}}return y.iterator};function my(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Ni(z)){if(!Ni(b)||b.length<z.length)return!1;for(var ee=0;ee<b.length;ee++){var re=z[ee];if(re!==void 0&&!fS(a,b[ee],re))return!1}}else if(!fS(a,b,z))return!1}return!0}function fS(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(Zn(y)&&Zn(x)){if(!my(a,y,x))return!1}else if(y!==x)return!1;return!0}rs.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===mo){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===aa){var ee=a.newValue;E==="nodeDataArray"&&Zn(ee)&&dS(this,ee),y.isModified=!0}else if(x===ka){var re=a.oldValue;E==="nodeDataArray"&&Zn(re)&&this.ip(re),y.isModified=!0}else x===Gr&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===mo){var oe=a.propertyName,ue=a.object;ue===y.model?(oe==="nodeKeyProperty"||oe==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(ue,oe),y.isModified=!0}else if(x===aa||x===ka){var de=a.change===aa,pe=de?a.newParam:a.oldParam,Se=de?a.newValue:a.oldValue,Pe=this.aj.I(a.object);if(Array.isArray(Pe))for(a=0;a<Pe.length;a++){var Le=Pe[a];if(de)Qm(Le,Se,pe,!0);else if(!(0>pe)){var De=pe+Up(Le);Le.pc(De,!0),Nv(Le,De,pe)}}y.isModified=!0}}finally{y.aa=!0}}}}},rs.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)},rs.prototype.rp=function(){for(var a=this.H.model,y=new zn,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){bS(a,ee,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&CS(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()},rs.prototype.refreshDataBoundLinks=function(){},rs.prototype.updateRelationshipsFromData=function(){},rs.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=Ar()),x.push(ee))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);br(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function vy(a,y){var x=y.Hh;if(Ni(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 yy(a,y,x){ag(y,function(ee){ee=ee.O.s;for(var re=ee.length,oe=0;oe<re;oe++)Td(x,ee[oe])});var E=y.Hh;if(Ni(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}}}}rs.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new sr;if(Ni(a))for(var b=0;b<a.length;b++)k0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)k0(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 zn;for(var z=new sr,ee=E.iterator;ee.next();){var re=ee.value;if(re instanceof Jn)a||re.fromNode!==null&&re.toNode!==null||b.add(re);else if(re instanceof xi&&re.data!==null&&x.Tl()){var oe=re;re=ee.key;var ue=re.pg();ue!==null&&(ue=E.I(ue),ue!==null?(x.qe(oe.data,x.wa(ue.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 de=new sr;E.each(function(pe){pe.key.data!==null&&de.add(pe.key.data,pe.value.data)}),x(de,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function k0(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 xr))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof xi){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 po&&z instanceof po)for(y=y.memberParts;y.next();)ee=k0(a,y.value,x,E,b),ee instanceof Jn||ee===null||(ee.containingGroup=z)}else if(y instanceof Jn&&z instanceof Jn)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=k0(a,y.value,x,E,b),ee!==null&&ee instanceof xi&&(ee.labeledLink=z);return z}rs.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Jn||(E=b.copyNodeData(E),Zn(E)&&(b.xf(E),x=y.Lc(E)))}else Fd(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 Jn||(b=y.copyNodeData(E)),Zn(b)&&(x.data=b)));return x},dn.Object.defineProperties(rs.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}}}),rs.prototype.updateAllRelationshipsFromData=rs.prototype.rp,rs.prototype.findLinksByExample=rs.prototype.ls,rs.prototype.findNodesByExample=rs.prototype.ms,rs.prototype.findLinkForData=rs.prototype.Kc,rs.prototype.findNodeForData=rs.prototype.ii,rs.prototype.findPartForData=rs.prototype.Lc,rs.prototype.findNodeForKey=rs.prototype.Vb,rs.prototype.removeModeledPart=rs.prototype.ip,rs.prototype.removeModeledParts=rs.prototype.Gs,rs.prototype.rebuildParts=rs.prototype.Wd;var gS=!1,pS=!1,mS=!1;rs.className="PartManager";function vu(a){rs.apply(this,arguments)}It(vu,rs),vu.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),vS(this,a.linkDataArray)},vu.prototype.addModeledParts=function(a){for(rs.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)mp(a.value);Ed(this.diagram,!1)};function vS(a,y){y.forEach(function(x){yS(a,x)}),Ed(a.diagram,!1)}function yS(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){Fd(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=O0(x,y,!0);z!==""&&(b.fromPortId=z),z=dd(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof xi&&(b.fromNode=z)),z=O0(x,y,!1),z!==""&&(b.toPortId=z),z=dd(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof xi&&(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}}}}vu.prototype.removeAllModeledParts=function(){var a=this.diagram.model;SS(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function SS(a,y){y.forEach(function(x){a.ip(x)})}vu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},vu.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},vu.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},vu.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},vu.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},vu.prototype.findPartForKey=function(a){var y=rs.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},vu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},vu.prototype.doModelChanged=function(a){var y=this;if(rs.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===mo){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 ue=this.Kc(a.object);if(ue!==null){var de=a.newValue;typeof de=="string"&&(ue.fromPortId=de)}}else if(b==="linkToPortId"){var pe=this.Kc(a.object);if(pe!==null){var Se=a.newValue;typeof Se=="string"&&(pe.toPortId=Se)}}else if(b==="nodeGroupKey"){var Pe=this.Lc(a.object);if(Pe!==null){var Le=a.newValue;if(Le!==void 0){var De=this.Vb(Le);De instanceof po?Pe.containingGroup=De:Pe.containingGroup=null}else Pe.containingGroup=null}}else if(b==="linkLabelKeys"){var qe=this.Kc(a.object);if(qe!==null){var Ze=a.oldValue,ct=a.newValue;Array.isArray(Ze)&&Ze.forEach(function(An){0<=ct.indexOf(An)||(An=y.Vb(An),An!==null&&(An.labeledLink=null))}),Array.isArray(ct)&&ct.forEach(function(An){An=y.Vb(An),An!==null&&(An.labeledLink=qe)})}}else if(b==="linkCategory"){var ft=this.Kc(a.object),yt=a.newValue;ft!==null&&typeof yt=="string"&&(ft.category=yt)}else b==="linkDataArray"&&(SS(this,a.oldValue),vS(this,a.newValue));x.isModified=!0}else if(E===aa){var kt=a.newValue;if(b==="linkDataArray"&&typeof kt=="object"&&kt!==null)yS(this,kt);else if(b==="linkLabelKeys"&&jf(kt)){var Ut=this.Kc(a.object),gi=this.Vb(kt);Ut!==null&&gi!==null&&(gi.labeledLink=Ut)}x.isModified=!0}else if(E===ka){var Qi=a.oldValue;if(b==="linkDataArray"&&typeof Qi=="object"&&Qi!==null)this.ip(Qi);else if(b==="linkLabelKeys"&&jf(Qi)){var Gi=this.Vb(Qi);Gi!==null&&(Gi.labeledLink=null)}x.isModified=!0}}else if(E===mo){var Qn=a.propertyName;a.object!==x.model||Qn!=="linkFromKeyProperty"&&Qn!=="linkToKeyProperty"&&Qn!=="linkFromPortIdProperty"&&Qn!=="linkToPortIdProperty"&&Qn!=="linkLabelKeysProperty"&&Qn!=="nodeIsGroupProperty"&&Qn!=="nodeGroupKeyProperty"&&Qn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},vu.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new zn,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){BS(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&NS(y,z,!1)})},vu.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 Jn){var b=dd(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=dd(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 zn().addAll(y);var ee=new zn;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 Fa)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof po)&&(a.containingGroup=y)}}},vu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(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 po&&y.lh(ee)===x&&(ee=this.Lc(ee),ee!==null&&(ee.containingGroup=b)):(z.link=this.Kc(ee),z.link!==null&&b instanceof xi&&(dd(y,ee,!0)===x&&(z.link.fromNode=b),dd(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}}Jd(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof po&&(b.containingGroup=a))}},vu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof xi){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)Qd(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&Qd(y,x,E.data)),a instanceof po)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&Qd(y,x,E)}}},vu.prototype.copyPartData=function(a,y){var x=rs.prototype.copyPartData.call(this,a,y);if(a instanceof Jn)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},vu.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 Jn){if(Fd(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 xi&&(Fd(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&&Pp(z,E,z.wa(a.data),!0),Ep(z,E,re,!0),x!==null&&Pp(z,E,z.wa(x.data),!1),Ep(z,E,y,!1),z.fi(E),a=ee.archetypeLabelNodeData,a===null||a instanceof xi||(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},vu.prototype.findLinkForKey=vu.prototype.findLinkForKey,vu.prototype.findPartForKey=vu.prototype.findPartForKey,vu.prototype.removeAllModeledParts=vu.prototype.removeAllModeledParts,vu.prototype.addModeledParts=vu.prototype.addModeledParts,vu.prototype.addAllModeledParts=vu.prototype.addAllModeledParts,vu.className="GraphLinksPartManager";function vd(){rs.apply(this,arguments),this.Sg=null}It(vd,rs);function D0(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||!ni(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(Fd(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}}}vd.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},vd.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},vd.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}},vd.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))},vd.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},vd.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},vd.prototype.doModelChanged=function(a){if(rs.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===mo){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:D0(this,z,ee)}}else if(E==="parentLinkCategory"){var oe=this.ii(a.object),ue=a.newValue;if(oe!==null&&typeof ue=="string"){var de=oe.kh();de!==null&&(de.category=ue)}}y.isModified=!0}}else if(x===mo){var pe=a.propertyName;a.object===y.model&&pe==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},vd.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof xi&&(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:D0(this,y,a):E!==null&&ef(x,E,!1)))}}},vd.prototype.updateDataBindings=function(a,y){rs.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},vd.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=hm(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 xi&&y.mh(z)===x&&D0(this,b,this.ii(z))}Jd(y,x)}a=y.mh(a),a!==void 0&&b instanceof xi&&(a=this.Vb(a),D0(this,a,b))}},vd.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof xi){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(ka,"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)&&Qd(y,x,b)}},vd.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},vd.prototype.findLinkForKey=vd.prototype.findLinkForKey,vd.className="TreePartManager";function ar(a,y){this.kl=new zn,this.il=new zn,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,_a(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new sr,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 sr,this.Lt=new Un,this.Wg=!1,this.o=null,this.undoManager=new Kr,a!==void 0&&(Ni(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}ar.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},ar.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},ar.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},ar.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)+":"+xa(b)}}return y},ar.prototype.xA=function(a){a.change!==Gr&&Wt("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Fs?(wS(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},ar.prototype.Qv=function(a,y){var x=this,E=!1,b=new zn,z=new zn,ee=new zn,re=this.vh;a.changes.each(function(pe){pe.model===x&&(pe.modelChange==="nodeDataArray"?pe.change===aa?b.add(pe.newValue):pe.change===ka&&ee.add(pe.oldValue):x.lb(pe.object)?z.add(pe.object):pe.change!==mo||x.modelData!==pe.object&&pe.propertyName!=="modelData"?pe.object!==null&&(re&&re.contains(pe.object)?re.get(pe.object).each(function(Se){x.lb(Se)&&z.add(Se)}):pe.object instanceof ar||x.ri()&&x.Jc(pe.object)||PS(x,pe.object).each(function(Se){z.add(Se)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(pe){oe.add(x.wa(pe)),y||z.add(pe)});var ue=this.kl;ue.clear(),ee.each(function(pe){ue.add(x.wa(pe)),y&&z.add(pe)}),a=x.cloneDeep(z.Fa());var de=null;return E&&(de===null&&(de={}),de.modelData=this.cloneDeep(this.modelData)),0<oe.count&&(de===null&&(de={}),y?de.removedNodeKeys=oe.Fa():de.insertedNodeKeys=oe.Fa()),0<a.length&&(de===null&&(de={}),de.modifiedNodeData=a),0<ue.count&&(de===null&&(de={}),y?de.insertedNodeKeys=ue.Fa():de.removedNodeKeys=ue.Fa()),ue.clear(),oe.clear(),de},ar.prototype.cloneDeep=function(a){return wp(this,a,!0)};function wp(a,y,x,E,b,z){function ee(pe,Se){re?(pe.__gohashid===void 0&&z.push(pe),E.set(pe,Se)):(pe=kl++,E.set(pe,Se),b.set(pe,y))}if(!Zn(y))return y;z||(z=[]);var re=Object.isExtensible(y);if(E||(E=new sr),re){var oe=E.get(y);if(oe)return oe}else for(b||(b=new sr),oe=b.iterator;oe.next();){var ue=oe.key;if(oe.value===y&&(ue=E.get(ue)))return ue}if(Array.isArray(y)){oe=[],ee(y,oe);for(var de=0;de<y.length;de++)oe.push(wp(a,y[de],!1,E,b,z))}else if(y instanceof tt||y instanceof Fn||y instanceof ln||y instanceof oo||y instanceof fr)oe=y.copy(),ee(y,oe);else{if(y instanceof Ca||y instanceof dt||y instanceof Qt)return y;if(y instanceof Un)oe=new Un().addAll(wp(a,y.Fa(),!1,E,b,z)),ee(y,oe);else if(y instanceof zn)oe=new zn().addAll(wp(a,y.Fa(),!1,E,b,z)),ee(y,oe);else if(y instanceof sr)oe=new sr().addAll(wp(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(de in oe={},ee(y,oe),y)de!=="__gohashid"&&(oe[de]=wp(a,y[de],!1,E,b,z))}return x&&z.forEach(function(pe){delete pe.__gohashid}),oe}Ee=ar.prototype,Ee.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},Ee.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},Ee.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 xS(a,y){y=y.modelData,Zn(y)&&(a.dm(y),a.modelData=y)}Ee.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!ES(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Sy(this,this.modelData)),a+`,
"nodeDataArray": `+Rf(this,this.nodeDataArray,!0)},Ee.kv=function(a){xS(this,a),a=a.nodeDataArray,Ni(a)&&(this.dm(a),this.nodeDataArray=a)};function wS(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var ee=E.get(b);ee===null?(ee=new zn,ee.add(z),E.add(b,ee)):ee.add(z)}}var E=a.vh;E===null&&(E=new sr,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===mo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===aa||z===ka)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function PS(a,y){for(var x=new zn,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];T0(a,y,b,b,x)}return x}function T0(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(T0(a,y,ee,E,b))return!0}else if(Zn(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(ee=x[z],ee===y)return b.add(E),!0;if(T0(a,y,ee,E,b))return!0}return!1}Ee.Pv=function(a,y){var x=this,E=!1,b=new zn,z=new zn,ee=new zn,re=this.vh;a.changes.each(function(de){de.model===x&&(de.modelChange==="nodeDataArray"?de.change===aa?b.add(de.newValue):de.change===ka&&ee.add(de.oldValue):x.lb(de.object)?z.add(de.object):de.change!==mo||x.modelData!==de.object&&de.propertyName!=="modelData"?de.object!==null&&(re&&re.contains(de.object)?re.get(de.object).each(function(pe){x.lb(pe)&&z.add(pe)}):de.object instanceof ar||x.ri()&&x.Jc(de.object)||PS(x,de.object).each(function(pe){z.add(pe)})):E=!0)});var oe=this.il;oe.clear(),b.each(function(de){oe.add(x.wa(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ee.each(function(de){ue.add(x.wa(de)),y&&z.add(de)}),a="",E&&(a+=`,
"modelData": `+Sy(this,this.modelData)),0<oe.count&&(a+=(y?this.Yv:this.Wv)+Rf(this,oe.Fa(),!0)),0<z.count&&(a+=this.jy+Rf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Wv:this.Yv)+Rf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},Ee.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)&&Wt("applyIncrementalJson cannot change Model properties"),xS(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new sr;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)},Ee.$x=function(a,y){a.change!==Gr&&Wt("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Fs?(y===void 0&&(y=fm(this,this)),wS(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 }'},Ee.yA=function(a,y){return this.$x(a,y)},Ee.np=function(a){return a===void 0&&(a=fm(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},Ee.toJSON=function(a){return this.np(a)},Ee.Zw=function(a){var y=null;if(typeof a=="string")try{y=Kt.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:Wt("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&Wt("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},Ee.Ky=function(a){return this.Zw(a)},ar.constructGraphLinksModel=function(){return new ar},Ee=ar.prototype,Ee.dm=function(a){if(Ni(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Zn(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:Wt("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Zn(a)){for(y in a)if(x=a[y],Zn(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 Un,E=0;E<x.length/2;E++)b.add(new tt(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Bx(a)}return a},Ee.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()):Ni(a)?Rf(this,a):Zn(a)?Sy(this,a):typeof a=="function"?"null":a.toString()};function Rf(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new ba;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 ES(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function mc(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Sy(a,y){var x=y;if(x instanceof tt)y={class:"go.Point",x:mc(x.x),y:mc(x.y)};else if(x instanceof Fn)y={class:"go.Size",width:mc(x.width),height:mc(x.height)};else if(x instanceof ln)y={class:"go.Rect",x:mc(x.x),y:mc(x.y),width:mc(x.width),height:mc(x.height)};else if(x instanceof oo)y={class:"go.Margin",top:mc(x.top),right:mc(x.right),bottom:mc(x.bottom),left:mc(x.left)};else if(x instanceof fr)x.sb()?y={class:"go.Spot",x:mc(x.x),y:mc(x.y),offsetX:mc(x.offsetX),offsetY:mc(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof Ca){if(y={class:"go.Brush",type:x.type.name},x.type===sf?y.color=x.color:(x.type===Wh||x.type===pd)&&(y.start=x.start,y.end=x.end,x.type===pd&&(x.startRadius!==0&&(y.startRadius=mc(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=mc(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 dt?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=mc(x.startX)),x.startY!==0&&(y.startY=mc(x.startY)),x.endX!==0&&(y.endX=mc(x.endX)),x.endY!==0&&(y.endY=mc(x.endY)),x.spot1.D(Fl)||(y.spot1=x.spot1),x.spot2.D(un)||(y.spot2=x.spot2),x.type===dt.o&&(y.path=dt.ia(x))):x instanceof Qt&&(y={class:"go.EnumValue",classType:fm(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Bl(y,b);if(!ES(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof Un){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 vc(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Bx(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 tt(vc(a.x),vc(a.y));else if(y==="Size")x=new Fn(vc(a.width),vc(a.height));else if(y==="Rect")x=new ln(vc(a.x),vc(a.y),vc(a.width),vc(a.height));else if(y==="Margin")x=new oo(vc(a.top),vc(a.right),vc(a.bottom),vc(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Zs(a.enum):x=new fr(vc(a.x),vc(a.y),vc(a.offsetX),vc(a.offsetY));else if(y==="Brush"){if(x=new Ca,x.type=Br(Ca,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof fr&&(x.start=a.start),a.end instanceof fr&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=vc(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=vc(a.endRadius)),a=a.colorStops,Zn(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=dt.parse(a.path):x=new dt,x.type=Br(dt,a.type),typeof a.startX=="number"&&(x.startX=vc(a.startX)),typeof a.startY=="number"&&(x.startY=vc(a.startY)),typeof a.endX=="number"&&(x.endX=vc(a.endX)),typeof a.endY=="number"&&(x.endY=vc(a.endY)),a.spot1 instanceof fr&&(x.spot1=a.spot1),a.spot2 instanceof fr&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=wy(E),typeof E=="function"&&(x=Br(E,a.name)));return x}Ee.Pe=function(a){return this.Lt.add(a),this},Ee.ik=function(a){this.Lt.remove(a)},Ee.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)},Ee.cb=function(a,y,x,E,b,z,ee){Yl(this,"",a,y,x,E,b,z,ee)},Ee.g=function(a,y,x,E,b){Yl(this,"",mo,a,this,y,x,E,b)},Ee.Fs=function(a,y,x,E,b,z){Yl(this,"",mo,y,a,x,E,b,z)};function Yl(a,y,x,E,b,z,ee,re,oe){re===void 0&&(re=null),oe===void 0&&(oe=null);var ue=new Xi;ue.model=a,ue.change=x,ue.modelChange=y,ue.propertyName=E,ue.object=b,ue.oldValue=z,ue.oldParam=re,ue.newValue=ee,ue.newParam=oe,a.ds(ue)}ar.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===mo){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)),Qs(x,E,b)}else a.change===aa?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Zn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&qa(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&xs(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Ni(E)&&a.propertyName&&(E=Bl(a.object,a.propertyName)),Ni(E)&&typeof x=="number"&&(a=a.newValue,y?qa(E,x):xs(E,x,a))):Wt("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ka?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Zn(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&xs(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&qa(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Ni(E)&&a.propertyName&&(E=Bl(a.object,a.propertyName)),Ni(E)&&typeof x=="number"&&(a=a.oldValue,y?xs(E,x,a):qa(E,x))):Wt("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==Gr&&Wt("unknown ChangedEvent: "+a.toString())},ar.prototype.Ea=function(a){return this.undoManager.Ea(a)},ar.prototype.eb=function(a){return this.undoManager.eb(a)},ar.prototype.Kf=function(){return this.undoManager.Kf()},ar.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}},Ee=ar.prototype,Ee.La=function(a,y){y===void 0&&(y=""),Yl(this,"SourceChanged",Gr,y,a,null,null)},Ee.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Bl(a,y),y!==void 0)){if(jf(y))return y;Wt("Key value for node data "+a+" is not a number or a string: "+y)}}},Ee.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Bl(a,x);E!==y&&this.hc(y)===null&&(Qs(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Yl(this,"nodeKey",mo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else Qs(a,x,y)}};function jf(a){return typeof a=="number"||typeof a=="string"}Ee.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},Ee.hc=function(a){return a===null&&Wt("Model.findNodeDataForKey:key must not be null"),a!==void 0&&jf(a)?this.kb.I(a):null},Ee.$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))){Qs(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;Qs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;Qs(a,y,x)}}}}},Ee.xf=function(a){a!==null&&(Sl(a),this.lb(a)||CS(this,a,!0))};function CS(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&&Wt("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,xs(a.Tc,E,y)),Yl(a,"nodeDataArray",aa,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}Ee.Fy=function(a){if(Ni(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)},Ee.cm=function(a){a!==null&&bS(this,a,!0)};function bS(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;qa(a.Tc,E)}Yl(a,"nodeDataArray",ka,"nodeDataArray",a,y,null,E,null),a.qp(y)}Ee.nA=function(a){if(Ni(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)},Ee.$z=function(a){if(a!==this.nodeDataArray&&Ni(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()}},Ee.jp=function(a,y){y!==void 0&&(a=hm(this,a),a instanceof zn&&this.Vf.add(y,a))},Ee.Lv=function(){},Ee.fm=function(){},Ee.em=function(){},Ee.qp=function(){};function Qd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new zn,a.Vf.add(y,E)),E.add(x)}}function Jd(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof zn&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function hm(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof zn?a:null)}Ee.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},ar.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):_0(this,a,!0),Zn(a)&&_a(a),a};function _0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=_0(a,y[x],a.copiesArrayObjects);E.push(b)}return _a(E),E}if(x&&Zn(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=Bl(y,E),ee=fm(a,z);ee==="GraphObject"||ee==="Diagram"||ee==="Layer"||ee==="RowColumnDefinition"||ee==="AnimationManager"||ee==="Tool"||ee==="CommandHandler"||ee==="Layout"||ee==="InputEvent"||ee==="DiagramEvent"||z instanceof ar||z instanceof Kr||z instanceof Fs||z instanceof Xi||(z=_0(a,z,!1)),Qs(x,E,z)}return _a(x),x}return y instanceof tt||y instanceof Fn||y instanceof ln||y instanceof fr||y instanceof oo?y.copy():y}ar.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!FS&&a instanceof Dt&&(FS=!0,Ro('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Ro(" Is that really your intent?"));var E=Bl(a,y);E!==x&&(Qs(a,y,x),this.Fs(a,y,E,x))},Ee=ar.prototype,Ee.set=function(a,y,x){this.setDataProperty(a,y,x)},Ee.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])}},Ee.Ay=function(a,y){this.ts(a,-1,y)},Ee.ts=function(a,y,x){0>y&&(y=a.length),xs(a,y,x),Yl(this,"",aa,"",a,null,x,null,y)},Ee.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&Wt("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];qa(a,y),Yl(this,"",ka,"",a,x,null,y,null)},Ee.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Bl(a,y),y===void 0))return"";if(typeof y=="string")return y;Wt("getCategoryForNodeData found a non-string category for "+a+": "+y)},Ee.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Bl(a,x);E===void 0&&(E=""),E!==y&&(Qs(a,x,y),Yl(this,"nodeCategory",mo,x,a,E,y))}else Qs(a,x,y)}},Ee.lm=function(a,y){this.jm(y,this.Ro(a))},Ee.Tl=function(){return!1},Ee.Wj=function(){return!1},Ee.ri=function(){return!1},Ee.xs=function(){return!1},Ee.Xj=function(){return!1};function xy(){return new ar}function fm(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 fm(a,y.constructor);return typeof y}function wy(a){return Rd[a]?Rd[a]:Kt.go!==void 0&&Kt.go[a]?Kt.go[a]:null}function Bl(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 Qs(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){}}dn.Object.defineProperties(ar.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===""&&Wt("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&Wt("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];Zn(b)||Wt("Model.nodeDataArray must only contain Objects, not: "+b),Sl(b)}for(this.Tc=a,E=new Un,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(Yl(this,"nodeDataArray",mo,"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"}}}),ar.prototype.setCategoryForNodeData=ar.prototype.jm,ar.prototype.getCategoryForNodeData=ar.prototype.Ro,ar.prototype.removeArrayItem=ar.prototype.ov,ar.prototype.insertArrayItem=ar.prototype.ts,ar.prototype.addArrayItem=ar.prototype.Ay,ar.prototype.assignAllDataProperties=ar.prototype.Do,ar.prototype.set=ar.prototype.set,ar.prototype.clearUnresolvedReferences=ar.prototype.Qy,ar.prototype.mergeNodeDataArray=ar.prototype.$z,ar.prototype.removeNodeDataCollection=ar.prototype.nA,ar.prototype.removeNodeData=ar.prototype.cm,ar.prototype.addNodeDataCollection=ar.prototype.Fy,ar.prototype.addNodeData=ar.prototype.xf,ar.prototype.makeNodeDataKeyUnique=ar.prototype.$u,ar.prototype.findNodeDataForKey=ar.prototype.hc,ar.prototype.containsNodeData=ar.prototype.lb,ar.prototype.setKeyForNodeData=ar.prototype.km,ar.prototype.getKeyForNodeData=ar.prototype.wa,ar.prototype.updateTargetBindings=ar.prototype.La,ar.prototype.commit=ar.prototype.commit,ar.prototype.rollbackTransaction=ar.prototype.Kf,ar.prototype.commitTransaction=ar.prototype.eb,ar.prototype.startTransaction=ar.prototype.Ea,ar.prototype.raiseDataChanged=ar.prototype.Fs,ar.prototype.raiseChanged=ar.prototype.g,ar.prototype.raiseChangedEvent=ar.prototype.cb,ar.prototype.removeChangedListener=ar.prototype.ik,ar.prototype.addChangedListener=ar.prototype.Pe,ar.prototype.writeJsonValue=ar.prototype.sm,ar.prototype.replaceJsonObjects=ar.prototype.dm,ar.prototype.applyIncrementalJSON=ar.prototype.Ky,ar.prototype.applyIncrementalJson=ar.prototype.Zw,ar.prototype.toJSON=ar.prototype.toJSON,ar.prototype.toJson=ar.prototype.np,ar.prototype.toIncrementalJSON=ar.prototype.yA,ar.prototype.toIncrementalJson=ar.prototype.$x,ar.prototype.toIncrementalData=ar.prototype.xA,ar.prototype.clear=ar.prototype.clear;var FS=!1,Rd={};ar.className="Model",ar.fromJSON=ar.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=Kt.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:Wt("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=wy(E)):(b=wy(E),b===null&&(b=Kt[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof ar?y=a:Wt("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=ar.constructGraphLinksModel()),y.gp(x),y.kv(x),y},ar.safePropertyValue=Bl,ar.safePropertySet=Qs,Rd.Brush=Ca,Rd.ChangedEvent=Xi,Rd.Geometry=dt,Rd.Margin=oo,Rd.Panel=Vn,Rd.Point=tt,Rd.Rect=ln,Rd.Size=Fn,Rd.Spot=fr,Rd.Transaction=Fs,Rd.UndoManager=Kr;function Tl(a,y,x,E){_a(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=gm,this.wk=E),this.st=new zn}Tl.prototype.copy=function(){var a=new Tl;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},Ee=Tl.prototype,Ee.qb=function(a){a.classType===Tl&&(this.mode=a)},Ee.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},Ee.freeze=function(){return this._isFrozen=!0,this},Ee.ka=function(){return this._isFrozen=!1,this},Ee.Kx=function(a){return a===void 0&&(a=null),this.mode=gm,this.backConverter=a,this},Ee.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},Ee.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)}Ee.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==="")Ro("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Bl(y,E)),z!==void 0)if(b===null)x!==""&&Qs(a,x,z);else try{if(x!==""){var ee=b(z,a);Qs(a,x,ee)}else b(z,a)}catch(re){}}}},Ee.sp=function(a,y,x,E){if(this.el===gm){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,ee=a;if(b!==""&&(ee=Bl(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):Qs(y,x,ee);else if(oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var ue=E.itemIndex,de=E.panel.itemArray;oe.ov(de,ue),oe.ts(de,ue,ee)}}else try{if(x!==""){var pe=z(ee,y,oe);oe!==null?oe.setDataProperty(y,x,pe):Qs(y,x,pe)}else{var Se=z(ee,y,oe);if(Se!==void 0&&oe!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Pe=E.itemIndex,Le=E.panel.itemArray;oe.ov(Le,Pe),oe.ts(Le,Pe,Se)}}}catch(De){}}finally{this.st.remove(a)}}}},dn.Object.defineProperties(Tl.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&Yi(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&Yi(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&Yi(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&Yi(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&Yi(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&Yi(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&Yi(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&Yi(this),this.el=a}}}),Tl.prototype.updateSource=Tl.prototype.sp,Tl.prototype.updateTarget=Tl.prototype.Mv,Tl.prototype.ofModel=Tl.prototype.dA,Tl.prototype.ofObject=Tl.prototype.cp,Tl.prototype.makeTwoWay=Tl.prototype.Kx;var kx="Binding",MS=new Qt(Tl,"OneWay",1),gm=new Qt(Tl,"TwoWay",2);Tl.className="Binding",Tl.parseEnum=function(a,y){return function(x){return x=Br(a,x),x===null?y:x}},Tl.toString=xa,Tl.OneWay=MS,Tl.TwoWay=gm;function Sa(a,y,x){ar.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new zn,this.wb=new sr,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&&(Ni(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}It(Sa,ar),Sa.constructGraphLinksModel=ar.constructGraphLinksModel,Sa.prototype.cloneProtected=function(a){ar.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},Ee=Sa.prototype,Ee.clear=function(){ar.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},Ee.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)+":"+xa(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+dd(this,b,!0)+"-->"+dd(this,b,!1)}return y},Ee.Qv=function(a,y){this.linkKeyProperty===""&&Wt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=ar.prototype.Qv.call(this,a,y),E=this,b=new zn,z=new zn,ee=new zn,re=this.vh;a.changes.each(function(de){de.model===E&&(de.modelChange==="linkDataArray"?de.change===aa?b.add(de.newValue):de.change===ka&&ee.add(de.oldValue):E.Jc(de.object)?z.add(de.object):de.object!==null&&(de.object!==null&&re&&re.contains(de.object)?re.get(de.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):de.object instanceof ar||E.lb(de.object)||AS(E,de.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(de){oe.add(E.Ac(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ee.each(function(de){ue.add(E.Ac(de)),y&&z.add(de)}),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<ue.count&&(x===null&&(x={}),y?x.insertedLinkKeys=ue.Fa():x.removedLinkKeys=ue.Fa()),ue.clear(),oe.clear(),x},Ee.rm=function(){var a=ar.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},Ee.gp=function(a){ar.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)},Ee.Rv=function(){var a=ar.prototype.Rv.call(this),y=`,
"linkDataArray": `+Rf(this,this.linkDataArray,!0);return a+y},Ee.kv=function(a){ar.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function AS(a,y){for(var x=new zn,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];T0(a,y,b,b,x)}return x}Ee.Pv=function(a,y){this.linkKeyProperty===""&&Wt("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=ar.prototype.Pv.call(this,a,y),E=this,b=new zn,z=new zn,ee=new zn,re=this.vh;a.changes.each(function(de){de.model===E&&(de.modelChange==="linkDataArray"?de.change===aa?b.add(de.newValue):de.change===ka&&ee.add(de.oldValue):E.Jc(de.object)?z.add(de.object):de.object!==null&&(de.object!==null&&re&&re.contains(de.object)?re.get(de.object).each(function(pe){E.Jc(pe)&&z.add(pe)}):de.object instanceof ar||E.lb(de.object)||AS(E,de.object).each(function(pe){z.add(pe)})))});var oe=this.il;oe.clear(),b.each(function(de){oe.add(E.Ac(de)),y||z.add(de)});var ue=this.kl;return ue.clear(),ee.each(function(de){ue.add(E.Ac(de)),y&&z.add(de)}),a=x,0<oe.count&&(a+=(y?this.Xv:this.Vv)+Rf(this,oe.Fa(),!0)),0<z.count&&(a+=this.iy+Rf(this,z.Fa(),!0)),0<ue.count&&(a+=(y?this.Vv:this.Xv)+Rf(this,ue.Fa(),!0)),ue.clear(),oe.clear(),a},Ee.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)&&Wt("applyIncrementalJson cannot change Model properties"),ar.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]);kS(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)},Sa.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===mo){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),Qs(x,E,b);return}}else if(a.change===aa){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Zn(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===ka){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Zn(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}}ar.prototype.changeState.call(this,a,y)}},Ee=Sa.prototype,Ee.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),Qs(x,this.nodeKeyProperty,a),this.xf(x))}return a}},Ee.yx=function(a){return dd(this,a,!0)},Ee.wv=function(a,y){Pp(this,a,y,!0)},Ee.Bx=function(a){return dd(this,a,!1)},Ee.Bv=function(a,y){Pp(this,a,y,!1)};function dd(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Bl(y,a),a!==void 0))){if(jf(a))return a;Wt((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Pp(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=Bl(y,b);z!==x&&(Jd(a,z,y),Qs(y,b,x),a.hc(x)===null&&Qd(a,x,y),Yl(a,E?"linkFromKey":"linkToKey",mo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Qs(y,b,x)}}Ee.zx=function(a){return O0(this,a,!0)},Ee.xv=function(a,y){Ep(this,a,y,!0)},Ee.Cx=function(a){return O0(this,a,!1)},Ee.Cv=function(a,y){Ep(this,a,y,!1)};function O0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Bl(y,a),y===void 0?"":y)}function Ep(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Bl(y,b);z===void 0&&(z=""),z!==x&&(Qs(y,b,x),Yl(a,E?"linkFromPortId":"linkToPortId",mo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else Qs(y,b,x)}}Ee.Ef=function(a){if(a===null)return I0;var y=this.je;return y===""?I0:(a=Bl(a,y),a===void 0?I0:a)},Ee.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Bl(a,x);if(E===void 0&&(E=I0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)Jd(this,E[z],a);for(Qs(a,x,y),b=y.length,z=0;z<b;z++){var ee=y[z];this.hc(ee)===null&&Qd(this,ee,a)}Yl(this,"linkLabelKeys",mo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else Qs(a,x,y)}},Ee.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Bl(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&&Qd(this,y,a),Yl(this,"linkLabelKeys",aa,x,a,null,y,null,b)))}else Wt(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},Ee.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Bl(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(Jd(this,y,a),Yl(this,"linkLabelKeys",ka,x,a,y,null,b,null)))}else E!==void 0&&Wt(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},Ee.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Bl(a,y),y!==void 0)){if(jf(y))return y;Wt("Key value for link data "+a+" is not a number or a string: "+y)}}},Ee.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Bl(a,x);E!==y&&this.jh(y)===null&&(Qs(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Yl(this,"linkKey",mo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},Ee.jh=function(a){return a===null&&Wt("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&jf(a)?this.wb.I(a):null},Ee.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))){Qs(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;Qs(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;Qs(a,y,x)}}}}},Ee.Jc=function(a){return a===null?!1:this.$f.contains(a)},Ee.fi=function(a){a!==null&&(Sl(a),this.Jc(a)||NS(this,a,!0))};function NS(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&&Wt("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)),Yl(a,"linkDataArray",aa,"linkDataArray",a,null,y,null,E),Py(a,y)}Ee.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)},Ee.bm=function(a){a!==null&&BS(this,a,!0)};function BS(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(Yl(a,"linkDataArray",ka,"linkDataArray",a,y,null,E,null),x=dd(a,y,!0),Jd(a,x,y),x=dd(a,y,!1),Jd(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],Jd(a,x,y)}Ee.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)},Ee.Zz=function(a){if(this.linkKeyProperty===""&&Wt("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Ni(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),kS(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 Py(a,y){var x=dd(a,y,!0);x=a.Vl(x),a.hc(x)===null&&Qd(a,x,y),x=dd(a,y,!1),x=a.Vl(x),a.hc(x)===null&&Qd(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&&Qd(a,x,y)}Ee.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):_0(this,a,!0),Zn(a)&&(_a(a),this.lf!==""&&Qs(a,this.lf,void 0),this.mf!==""&&Qs(a,this.mf,void 0),this.je!==""&&Qs(a,this.je,[])),a},Ee.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Bl(a,y)},Ee.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Bl(a,y),y!==void 0)){if(jf(y))return y;Wt("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},Ee.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Bl(a,x);E!==y&&(Jd(this,E,a),Qs(a,x,y),this.hc(y)===null&&Qd(this,y,a),Yl(this,"nodeGroupKey",mo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},Sa.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Bl(a,this.Je)===void 0||Qs(a,this.Je,void 0),a)},Sa.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){Pp(this,a,x,!0);return}if(y===this.linkToKeyProperty){Pp(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Ep(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Ep(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=Bl(a,y);E!==x&&(Qs(a,y,x),this.Fs(a,y,E,x))},Ee=Sa.prototype,Ee.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&&Bl(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},Ee.jp=function(a,y){ar.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(dd(this,E,!0)===b){var ee=this.lf;Qs(E,ee,z),Yl(this,"linkFromKey",mo,ee,E,b,z),typeof ee=="string"&&this.La(E,ee)}if(dd(this,E,!1)===b&&(ee=this.mf,Qs(E,ee,z),Yl(this,"linkToKey",mo,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,ue=0;ue<re;ue++)ee[ue]===b&&(ee[ue]=z,Yl(this,"linkLabelKeys",aa,oe,E,b,z,ue,ue))}},Ee.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;Qs(a,E,x),Yl(this,"nodeGroupKey",mo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ee.Lv=function(){ar.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Py(this,a[x])},Ee.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Ar();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Yl(this,"nodeGroupKey",mo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(dd(this,E,!0)===a&&(b=this.lf,Yl(this,"linkFromKey",mo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),dd(this,E,!1)===a&&(b=this.mf,Yl(this,"linkToKey",mo,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&&(Yl(this,"linkLabelKeys",aa,ee,E,a,a,re,re),x.push(E))}for(y=0;y<x.length;y++)Jd(this,a,x[y]);br(x)}},Ee.em=function(a){ar.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&Qd(this,y,a)},Ee.qp=function(a){ar.prototype.qp.call(this,a);var y=this.lh(a);Jd(this,y,a)},Ee.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Bl(a,y),y===void 0))return"";if(typeof y=="string")return y;Wt("getCategoryForLinkData found a non-string category for "+a+": "+y)},Sa.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Sa.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Bl(a,x);E===void 0&&(E=""),E!==y&&(Qs(a,x,y),Yl(this,"linkCategory",mo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},Sa.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},Ee=Sa.prototype,Ee.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function kS(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))}Ee.Wj=function(){return!0},Ee.ri=function(){return!0},Ee.xs=function(){return!0},Ee.Xj=function(){return!0},dn.Object.defineProperties(Sa.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];Zn(b)||Wt("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),Sl(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new Un,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 zn,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Yl(this,"linkDataArray",mo,"linkDataArray",this,y,a),y=0;y<x;y++)Py(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"}}}),Sa.prototype.setCategoryForLinkData=Sa.prototype.lp,Sa.prototype.getCategoryForLinkData=Sa.prototype.ps,Sa.prototype.assignAllDataProperties=Sa.prototype.Do,Sa.prototype.setGroupKeyForNodeData=Sa.prototype.mp,Sa.prototype.getGroupKeyForNodeData=Sa.prototype.lh,Sa.prototype.isGroupForNodeData=Sa.prototype.Yu,Sa.prototype.copyLinkData=Sa.prototype.Jo,Sa.prototype.mergeLinkDataArray=Sa.prototype.Zz,Sa.prototype.removeLinkDataCollection=Sa.prototype.lA,Sa.prototype.removeLinkData=Sa.prototype.bm,Sa.prototype.addLinkDataCollection=Sa.prototype.Ey,Sa.prototype.addLinkData=Sa.prototype.fi,Sa.prototype.containsLinkData=Sa.prototype.Jc,Sa.prototype.makeLinkDataKeyUnique=Sa.prototype.Bs,Sa.prototype.findLinkDataForKey=Sa.prototype.jh,Sa.prototype.setKeyForLinkData=Sa.prototype.Ks,Sa.prototype.getKeyForLinkData=Sa.prototype.Ac,Sa.prototype.removeLabelKeyForLinkData=Sa.prototype.Qx,Sa.prototype.addLabelKeyForLinkData=Sa.prototype.Bu,Sa.prototype.setLabelKeysForLinkData=Sa.prototype.Ls,Sa.prototype.getLabelKeysForLinkData=Sa.prototype.Ef,Sa.prototype.setToPortIdForLinkData=Sa.prototype.Cv,Sa.prototype.getToPortIdForLinkData=Sa.prototype.Cx,Sa.prototype.setFromPortIdForLinkData=Sa.prototype.xv,Sa.prototype.getFromPortIdForLinkData=Sa.prototype.zx,Sa.prototype.setToKeyForLinkData=Sa.prototype.Bv,Sa.prototype.getToKeyForLinkData=Sa.prototype.Bx,Sa.prototype.setFromKeyForLinkData=Sa.prototype.wv,Sa.prototype.getFromKeyForLinkData=Sa.prototype.yx,Sa.prototype.clear=Sa.prototype.clear;var I0=Object.freeze([]);Sa.className="GraphLinksModel",Rd.GraphLinksModel=Sa,ar.constructGraphLinksModel=ar.constructGraphLinksModel=function(){return new Sa},ar.initDiagramModel=xy=function(){return new Sa};function yc(a,y){ar.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Ni(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}It(yc,ar),yc.constructGraphLinksModel=ar.constructGraphLinksModel,yc.prototype.cloneProtected=function(a){ar.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},Ee=yc.prototype,Ee.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)+":"+xa(b)}}return y},Ee.rm=function(){var a=ar.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},Ee.gp=function(a){ar.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},Ee.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&Wt("applyIncrementalJson cannot change Model properties"),ar.prototype.fp.call(this,a)},Ee.Vl=function(a){return a},Ee.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Bl(a,y),y!==void 0)){if(jf(y))return y;Wt("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},Ee.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=Bl(a,x);E!==y&&(Jd(this,E,a),Qs(a,x,y),this.hc(y)===null&&Qd(this,y,a),Yl(this,"nodeParentKey",mo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},Ee.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Bl(a,y),y===void 0)?"":typeof y=="string"?y:(Wt("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},yc.prototype.getLinkCategoryForData=function(a){return this.ss(a)},yc.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Bl(a,x);E===void 0&&(E=""),E!==y&&(Qs(a,x,y),Yl(this,"parentLinkCategory",mo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else Qs(a,x,y)}},yc.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},yc.prototype.copyNodeData=function(a){return a===null?null:(a=ar.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Bl(a,this.Ke)===void 0||Qs(a,this.Ke,void 0),a)},yc.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=Bl(a,y);E!==x&&(Qs(a,y,x),this.Fs(a,y,E,x))},Ee=yc.prototype,Ee.jp=function(a,y){ar.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},Ee.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;Qs(a,E,x),Yl(this,"nodeParentKey",mo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},Ee.fm=function(a){ar.prototype.fm.call(this,a),a=this.wa(a);var y=hm(this,a);if(y!==null){var x=Ar();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Yl(this,"nodeParentKey",mo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)Jd(this,a,x[y]);br(x)}},Ee.em=function(a){ar.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&Qd(this,y,a)},Ee.qp=function(a){ar.prototype.qp.call(this,a);var y=this.mh(a);Jd(this,y,a)},Ee.lm=function(a,y){ar.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},Ee.Tl=function(){return!0},Ee.xs=function(){return!0},dn.Object.defineProperties(yc.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"}}}),yc.prototype.setParentLinkCategoryForNodeData=yc.prototype.Ms,yc.prototype.getParentLinkCategoryForNodeData=yc.prototype.ss,yc.prototype.setParentKeyForNodeData=yc.prototype.qe,yc.prototype.getParentKeyForNodeData=yc.prototype.mh,yc.className="TreeModel",Rd.TreeModel=yc;function hl(a){qs.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=jd,this.Ti=0,this.Zv=new tt,this.Jp=this.me=0,this.Xr=new ym,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=jd,this.K=Sc,this.nd=bp,this.hd=gy,this.tf=6,this.Nn=Z0,a&&Object.assign(this,a)}It(hl,qs),hl.prototype.cloneProtected=function(a){qs.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},hl.prototype.qb=function(a){a.classType===hl?a===H0||a===W0||a===z0||a===G0||a===bp?this.sorting=a:a===hg||a===Cp||a===Sc||a===Gf?this.direction=a:a===pf||a===zf||a===jd||a===zd?this.arrangement=a:(a===jg||a===Z0)&&(this.nodeDiameterFormula=a):qs.prototype.qb.call(this,a)},hl.prototype.createNetwork=function(){return new Fp(this)},hl.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 Un;y.addAll(a.iterator),a=new Un;var x=new Un,E=this.sort(y),b,z,ee=this.Jp,re=this.arrangement,oe=this.nodeDiameterFormula,ue=this.radius;(!isFinite(ue)||0>=ue)&&(ue=NaN);var de=this.aspectRatio;(!isFinite(de)||0>=de)&&(de=1);var pe=this.startAngle;isFinite(pe)||(pe=0);var Se=this.sweepAngle;if((!isFinite(Se)||360<Se||1>Se)&&(Se=360),y=this.spacing,isFinite(y)||(y=NaN),re===zd&&oe===jg?re=jd:re===zd&&oe!==jg&&(re=this.arrangement),(this.direction===hg||this.direction===Cp)&&this.sorting!==bp){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===hg?(this.arrangement===zd&&a.reverse(),E=new Un,E.addAll(a),E.addAll(x)):(this.arrangement===zd&&x.reverse(),E=new Un,E.addAll(x),E.addAll(a))}oe=E.length;for(var Pe=z=b=0;Pe<E.length;Pe++){var Le=pe+Se*z*(this.direction===Sc?1:-1)/oe,De=E.M(Pe).diameter;isNaN(De)&&(De=Hf(E.M(Pe),Le)),360>Se&&(Pe===0||Pe===E.length-1)&&(De/=2),b+=De,z++}if(isNaN(ue)||re===zd){if(isNaN(y)&&(y=6),re!==jd&&re!==zd){for(z=-1/0,ee=0;ee<oe;ee++)Pe=E.M(ee),b=E.M(ee===oe-1?0:ee+1),isNaN(Pe.diameter)&&Hf(Pe,0),isNaN(b.diameter)&&Hf(b,0),z=Math.max(z,(Pe.diameter+b.diameter)/2);ee=z+y,re===pf?ue=(z+y)/(2*Math.PI/oe):ue=R0(this,ee*(360<=Se?oe:oe-1),de,pe*Math.PI/180,Se*Math.PI/180)}else ue=R0(this,b+(360<=Se?oe:oe-1)*(re!==zd?y:1.6*y),de,pe*Math.PI/180,Se*Math.PI/180);z=ue*de}else if(z=ue*de,Pe=Ey(this,ue,z,pe*Math.PI/180,Se*Math.PI/180),isNaN(y))(re===jd||re===zd)&&(y=(Pe-b)/(360<=Se?oe:oe-1));else if(re===jd||re===zd)Pe=(Pe-b)/(360<=Se?oe:oe-1),Pe<y?(ue=R0(this,b+y*(360<=Se?oe:oe-1),de,pe*Math.PI/180,Se*Math.PI/180),z=ue*de):y=Pe;else{for(ee=-1/0,b=0;b<oe;b++)Le=E.M(b),De=E.M(b===oe-1?0:b+1),isNaN(Le.diameter)&&Hf(Le,0),isNaN(De.diameter)&&Hf(De,0),ee=Math.max(ee,(Le.diameter+De.diameter)/2);ee+=y,b=R0(this,ee*(360<=Se?oe:oe-1),de,pe*Math.PI/180,Se*Math.PI/180),b>ue?(ue=b,z=ue*de):ee=Pe/(360<=Se?oe:oe-1)}if(this.kw=re,this.lc=ue,this.Zm=de,this.lw=pe,this.Wp=Se,this.Ti=y,this.me=z,this.Jp=ee,y=E,E=this.kw,re=this.lc,ue=this.lw,de=this.Wp,pe=this.Ti,Se=this.me,oe=this.Jp,this.direction!==hg&&this.direction!==Cp||E!==zd)if(this.direction===hg||this.direction===Cp){switch(ee=0,E){case zf:ee=180*j0(this,re,Se,ue,oe)/Math.PI;break;case jd:oe=y=0,ee=a.first(),ee!==null&&(y=Hf(ee,Math.PI/2)),ee=x.first(),ee!==null&&(oe=Hf(ee,Math.PI/2)),ee=180*j0(this,re,Se,ue,pe+(y+oe)/2)/Math.PI;break;case pf:ee=de/y.length}if(this.direction===hg){switch(E){case zf:vm(this,a,ue,Gf);break;case jd:mm(this,a,ue,Gf);break;case pf:pm(this,a,de/2,ue,Gf)}switch(E){case zf:vm(this,x,ue+ee,Sc);break;case jd:mm(this,x,ue+ee,Sc);break;case pf:pm(this,x,de/2,ue+ee,Sc)}}else{switch(E){case zf:vm(this,x,ue,Gf);break;case jd:mm(this,x,ue,Gf);break;case pf:pm(this,x,de/2,ue,Gf)}switch(E){case zf:vm(this,a,ue+ee,Sc);break;case jd:mm(this,a,ue+ee,Sc);break;case pf:pm(this,a,de/2,ue+ee,Sc)}}}else switch(E){case zf:vm(this,y,ue,this.direction);break;case jd:mm(this,y,ue,this.direction);break;case pf:pm(this,y,de,ue,this.direction);break;case zd:DS(this,y,de,ue,this.direction)}else DS(this,y,de,ue-de/2,Sc)}this.updateParts(),this.network=null,this.isValidLayout=!0};function pm(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 ue=E+(b===Sc?oe*x/(360<=z?re:re-1):-(oe*x)/re),de=y.M(oe),pe=ee*Math.tan(ue)/a;pe=Math.sqrt((ee*ee+a*a*pe*pe)/(1+pe*pe)),de.centerX=pe*Math.cos(ue),de.centerY=pe*Math.sin(ue),de.actualAngle=180*ue/Math.PI}}function mm(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 ue=y.M(oe),de=y.M(oe===re-1?0:oe+1),pe=z*Math.sin(x);ue.centerX=b*Math.cos(x),ue.centerY=pe,ue.actualAngle=180*x/Math.PI,isNaN(ue.diameter)&&Hf(ue,0),isNaN(de.diameter)&&Hf(de,0),ue=j0(a,b,z,E===Sc?x:-x,(ue.diameter+de.diameter)/2+ee),x+=E===Sc?ue:-ue}}function vm(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 ue=y.M(oe);ue.centerX=b*Math.cos(x),ue.centerY=z*Math.sin(x),ue.actualAngle=180*x/Math.PI,ue=j0(a,b,z,E===Sc?x:-x,ee),x+=E===Sc?ue:-ue}}function DS(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new ym,360>x){for(z=E+(b===Sc?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,_S(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),ue=a.me*Math.sin(E*Math.PI/180),de=y.Fa();if(de.length===3)de[0].centerX=z,de[0].centerY=0,de[1].centerX=de[0].centerX-de[0].width/2-de[1].width/2-ee,de[1].y=de[0].y,de[2].centerX=(de[0].centerX+de[1].centerX)/2,de[2].y=de[0].y-de[2].height-ee;else if(de.length===4)de[0].centerX=z,de[0].centerY=0,de[2].centerX=-de[0].centerX,de[2].centerY=de[0].centerY,de[1].centerX=0,de[1].y=Math.min(de[0].y,de[2].y)-de[1].height-ee,de[3].centerX=0,de[3].y=Math.max(de[0].y+de[0].height+ee,de[2].y+de[2].height+ee);else{z=tt.alloc();for(var pe=0;pe<de.length&&(de[pe].centerX=oe,de[pe].centerY=ue,!(pe>=de.length-1));pe++)OS(a,oe,ue,de,pe,b,z)||IS(a,oe,ue,de,pe,b,z),oe=z.x,ue=z.y;if(tt.free(z),a.mj++,!(23<a.mj)){oe=de[0].centerX,ue=de[0].centerY,z=de[de.length-1].centerX,pe=de[de.length-1].centerY;var Se=Math.abs(oe-z)-((de[0].width+de[de.length-1].width)/2+ee),Pe=Math.abs(ue-pe)-((de[0].height+de[de.length-1].height)/2+ee);ee=0,1>Math.abs(Pe)?Math.abs(oe-z)<(de[0].width+de[de.length-1].width)/2&&(ee=0):ee=0<Pe?Pe:1>Math.abs(Se)?0:Se,oe=Math.abs(z)>Math.abs(pe)?0<z!=ue>pe:0<pe!=oe<z,(oe=b===Sc?oe:!oe)&&(ee=-Math.abs(ee),ee=Math.min(ee,-de[de.length-1].width),ee=Math.min(ee,-de[de.length-1].height)),a.Xr.compare(ee,de),1<Math.abs(ee)&&(a.lc=8>a.mj?a.lc-ee/(2*Math.PI):5>de.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 _S(a,y,x,E,b){for(var z=a.lc,ee=a.me,re=a.Zm,oe=z*Math.cos(E*Math.PI/180),ue=ee*Math.sin(E*Math.PI/180),de=tt.alloc(),pe=y.Fa(),Se=0;Se<pe.length&&(pe[Se].centerX=oe,pe[Se].centerY=ue,!(Se>=pe.length-1));Se++)OS(a,oe,ue,pe,Se,b,de)||IS(a,oe,ue,pe,Se,b,de),oe=de.x,ue=de.y;if(tt.free(de),a.mj++,!(23<a.mj)){if(oe=Math.atan2(ue,oe),oe=b===Sc?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<pe.length;oe++)ee.mk[oe]=pe[oe].bounds.x,ee.tm[oe]=pe[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,_S(a,y,x,E,b))}}function OS(a,y,x,E,b,z,ee){var re=a.lc,oe=a.me,ue=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var de=!1;if(0<=x!=(z===Sc)){if(z=y+a,z>re){if(z=y-a,z<-re)return ee.x=z,ee.y=ue,!1;de=!0}}else if(z=y-a,z<-re){if(z=y+a,z>re)return ee.x=z,ee.y=ue,!1;de=!0}return ue=Math.sqrt(1-Math.min(1,z*z/(re*re)))*oe,0>x!==de&&(ue=-ue),Math.abs(x-ue)>(E[b].height+E[b+1].height)/2?(ee.x=z,ee.y=ue,!1):(ee.x=z,ee.y=ue,!0)}function IS(a,y,x,E,b,z,ee){var re=a.lc,oe=a.me,ue=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===Sc)){if(z=x-a,z<-oe){if(z=x+a,z>oe){ee.x=ue,ee.y=z;return}E=!0}}else if(z=x+a,z>oe){if(z=x-a,z<-oe){ee.x=ue,ee.y=z;return}E=!0}ue=Math.sqrt(1-Math.min(1,z*z/(oe*oe)))*re,0>y!==E&&(ue=-ue),ee.x=ue,ee.y=z}hl.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},hl.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 tt(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))},hl.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function Ey(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,ue=0;ue<=z;ue++){E!==void 0&&b!==void 0?oe=E+ue*b/z:oe=ue*Math.PI/(2*z);var de=Math.sin(oe);ee+=Math.sqrt(1-a*a*de*de)*re}return E!==void 0&&b!==void 0?(y>x?y:x)*ee:4*(y>x?y:x)*ee}function R0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?Ey(a,1,x,E,b):Ey(a,1,x))}function j0(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}}hl.prototype.sort=function(a){switch(this.sorting){case z0:break;case G0:a.reverse();break;case H0:a.sort(this.comparer);break;case W0:a.sort(this.comparer),a.reverse();break;case bp:return this.ak(Dx(a));default:Wt("Invalid sorting type.")}return a};function Dx(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new Un;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}hl.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 Un;for(var oe=0,ue=0;ue<y.length;ue++){var de=y[ue].length;if(de===1)E.push(ue);else if(de===0)b.add(a.M(ue));else{if(oe===0)x.push(ue);else{for(var pe=de=1/0,Se=-1,Pe=[],Le=0;Le<x.length;Le++)0>y[x[Le]].indexOf(x[Le===x.length-1?0:Le+1])&&Pe.push(Le===x.length-1?0:Le+1);if(Pe.length===0)for(Le=0;Le<x.length;Le++)Pe.push(Le);for(Le=0;Le<Pe.length;Le++){for(var De=Pe[Le],qe=y[ue],Ze=0,ct=0;ct<ee.length;ct++){var ft=z[ee[ct]],yt=z[re[ct]];if(ft<yt){var kt=ft;ft=yt}else kt=yt;if(kt<De&&De<=ft)for(yt=0;yt<qe.length;yt++){var Ut=qe[yt];0>x.indexOf(Ut)||kt<z[Ut]&&z[Ut]<ft||kt===z[Ut]||ft===z[Ut]||Ze++}else for(yt=0;yt<qe.length;yt++)Ut=qe[yt],0>x.indexOf(Ut)||kt<z[Ut]&&z[Ut]<ft&&kt!==z[Ut]&&ft!==z[Ut]&&Ze++}for(qe=Ze,ct=Ze=0;ct<y[ue].length;ct++)kt=x.indexOf(y[ue][ct]),0<=kt&&(kt=Math.abs(De-(kt>=De?kt+1:kt)),Ze+=kt<x.length+1-kt?kt:x.length+1-kt);for(ct=0;ct<ee.length;ct++)kt=z[ee[ct]],ft=z[re[ct]],kt>=De&&kt++,ft>=De&&ft++,kt>ft&&(yt=ft,ft=kt,kt=yt),ft-kt<(x.length+2)/2==(kt<De&&De<=ft)&&Ze++;(qe<de||qe===de&&Ze<pe)&&(de=qe,pe=Ze,Se=De)}for(x.splice(Se,0,ue),de=0;de<x.length;de++)z[x[de]]=de;for(de=0;de<y[ue].length;de++)pe=y[ue][de],0<=x.indexOf(pe)&&(ee.push(ue),re.push(pe))}oe++}}for(ee=x.length;;){for(z=!0,re=0;re<E.length;re++)if(oe=E[re],ue=y[oe][0],de=x.indexOf(ue),0<=de){for(Se=pe=0;Se<y[ue].length;Se++)Pe=x.indexOf(y[ue][Se]),0>Pe||Pe===de||(Le=Pe>de?Pe-de:de-Pe,pe+=Pe<de!=Le>ee-Le?1:-1);x.splice(0>pe?de:de+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},dn.Object.defineProperties(hl.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!==zd&&a!==jd&&a!==zf&&a!==pf||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==Sc&&a!==Gf&&a!==hg&&a!==Cp||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==z0&&a!==G0&&a!==H0&&!W0&&a!==bp||(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!==Z0&&a!==jg||(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 jd=new Qt(hl,"ConstantSpacing",0),zf=new Qt(hl,"ConstantDistance",1),pf=new Qt(hl,"ConstantAngle",2),zd=new Qt(hl,"Packed",3),Sc=new Qt(hl,"Clockwise",4),Gf=new Qt(hl,"Counterclockwise",5),hg=new Qt(hl,"BidirectionalLeft",6),Cp=new Qt(hl,"BidirectionalRight",7),z0=new Qt(hl,"Forwards",8),G0=new Qt(hl,"Reverse",9),H0=new Qt(hl,"Ascending",10),W0=new Qt(hl,"Descending",11),bp=new Qt(hl,"Optimized",12),Z0=new Qt(hl,"Pythagorean",13),jg=new Qt(hl,"Circular",14);hl.className="CircularLayout",hl.ConstantSpacing=jd,hl.ConstantDistance=zf,hl.ConstantAngle=pf,hl.Packed=zd,hl.Clockwise=Sc,hl.Counterclockwise=Gf,hl.BidirectionalLeft=hg,hl.BidirectionalRight=Cp,hl.Forwards=z0,hl.Reverse=G0,hl.Ascending=H0,hl.Descending=W0,hl.Optimized=bp,hl.Pythagorean=Z0,hl.Circular=jg;function ym(){this.Pl=-1/0,this.tm=this.mk=null}ym.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},ym.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]}},ym.className="VertexArrangement";function Fp(a){ks.call(this,a)}It(Fp,ks),Fp.prototype.createVertex=function(){return new Sm(this)},Fp.prototype.createEdge=function(){return new V0(this)},Fp.className="CircularNetwork";function Sm(a){$l.call(this,a),this.u=this.Si=NaN}It(Sm,$l);function Hf(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===zd)if(x.nodeDiameterFormula===jg)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===jg?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}dn.Object.defineProperties(Sm.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)}}}),Sm.className="CircularVertex";function V0(a){td.call(this,a)}It(V0,td),V0.className="CircularEdge";function Gu(a){qs.call(this),this.ah=null,this.An=0,this.$d=new Fn(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)}It(Gu,qs),Gu.prototype.cloneProtected=function(a){qs.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},Gu.prototype.createNetwork=function(){return new zg(this)},Gu.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}RS(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 ue=Ar(),de=0;de<re+y.vertexes.count+2;de++)ue[de]=null;re=0,ee.reset();for(var pe=ln.alloc();ee.next();)if(de=ee.value,this.computeBounds(de,pe),oe)oe=!1,b=pe.x+pe.width/2,z=pe.y+pe.height/2,ue[0]=new tt(pe.x+pe.width+E.width,pe.y),ue[1]=new tt(pe.x,pe.y+pe.height+E.height),re=2;else{var Se=jS(ue,re,b,z,pe.width,pe.height,E),Pe=ue[Se],Le=new tt(Pe.x+pe.width+E.width,Pe.y),De=new tt(Pe.x,Pe.y+pe.height+E.height);for(Se+1<re&&ue.splice(Se+1,0,null),ue[Se]=Le,ue[Se+1]=De,re++,Se=Pe.x-pe.x,Pe=Pe.y-pe.y,de=de.vertexes.iterator;de.next();)Le=de.value,Le.centerX+=Se,Le.centerY+=Pe}for(ln.free(pe),de=y.vertexes.iterator;de.next();)ee=de.value,Se=ee.bounds,2>re?(b=Se.x+Se.width/2,z=Se.y+Se.height/2,ue[0]=new tt(Se.x+Se.width+E.width,Se.y),ue[1]=new tt(Se.x,Se.y+Se.height+E.height),re=2):(oe=jS(ue,re,b,z,Se.width,Se.height,E),pe=ue[oe],Pe=new tt(pe.x+Se.width+E.width,pe.y),Se=new tt(pe.x,pe.y+Se.height+E.height),oe+1<re&&ue.splice(oe+1,0,null),ue[oe]=Pe,ue[oe+1]=Se,re++,ee.centerX=pe.x+ee.width/2,ee.centerY=pe.y+ee.height/2);for(br(ue),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)}}GS(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Gu.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},Gu.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 RS(a,y,x){if(Tx(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=_x(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,RS(a,y+1,x),GS(a,z),Ox(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 Tx(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 _x(a,y){for(var x=a.network,E=new zg(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var ee=new HS;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 Un),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 Un,b.Hj=re),re.add(ee),b.Vd--,b.sh+=ee.sh):ee.network===E&&(re=ee.Hj,re===null&&(re=new Un,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,ze.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 ue=re=0,de=oe.count-ee;de<oe.count;de++){var pe=oe.M(de),Se=null;for(z=pe.edges.iterator;z.next();){var Pe=z.value;if(Pe.Ax(pe)===b){Se=Pe;break}}Se!==null&&(ue+=Se.length,re+=pe.width*pe.height)}z=b.centerX,oe=b.centerY,de=b.width,pe=b.height,Se=b.focus,Pe=de*pe,1>Pe&&(Pe=1),re=ze.sqrt((re+Pe+ue*ue*4/(ee*ee))/Pe),ee=(re-1)*de/2,re=(re-1)*pe/2,b.bounds=new ln(z-Se.x-ee,oe-Se.y-re,de+2*ee,pe+2*re),b.focus=new tt(Se.x+ee,Se.y+re)}}return a.network=E,x}function Ox(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 ln(E.centerX-z,E.centerY-ee,b.Ss,b.Qs),E.focus=new tt(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=ze.sqrt(z*z+ee*ee)/2;for(var re=!1,oe=ee=0,ue=0,de=y.vertexes.iterator;de.next();){var pe=de.value;1>=pe.Vd?oe++:(re=!0,ue++,ee+=Math.atan2(y.centerY-pe.centerY,y.centerX-pe.centerX))}if(oe!==0){for(0<ue&&(ee/=ue),ue=y=0,y=re?2*Math.PI/(oe+1):2*Math.PI/oe,oe%2===0&&(ue=y/2),1<x.count&&x.sort(function(Pe,Le){return Pe===null||Le===null||Pe===Le?0:Le.width*Le.height-Pe.width*Pe.height}),re=oe%2===0?0:1,x=x.iterator;x.next();)if(oe=x.value,!(1<oe.Vd||a.isFixed(oe))){for(de=null,pe=oe.edges.iterator;pe.next();){de=pe.value;break}pe=oe.width;var Se=oe.height;pe=ze.sqrt(pe*pe+Se*Se)/2,de=z+de.length+pe,pe=ee+(y*(re/2>>1)+ue)*(re%2===0?1:-1),oe.centerX=E+de*Math.cos(pe),oe.centerY=b+de*Math.sin(pe),re++}}}}function jS(a,y,x,E,b,z,ee){var re=9e19,oe=-1,ue=0;e:for(;ue<y;ue++){var de=a[ue],pe=de.x-x,Se=de.y-E;if(pe=pe*pe+Se*Se,pe<re){for(Se=ue-1;0<=Se;Se--)if(a[Se].y>de.y&&a[Se].x-de.x<b+ee.width)continue e;for(Se=ue+1;Se<y;Se++)if(a[Se].x>de.x&&a[Se].y-de.y<z+ee.height)continue e;oe=ue,re=pe}}return oe}Gu.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Gu.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 zS(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,ze.sqrt(x*x+a*a)):a+x<y?(E=E+b-ee,a=a+x-y,ze.sqrt(E*E+a*a)):ee-(E+b):E>ee+re?a>y+z?(x=E-ee-re,a=a-y-z,ze.sqrt(x*x+a*a)):a+x<y?(E=E-ee-re,a=a+x-y,ze.sqrt(E*E+a*a)):E-(ee+re):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function GS(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(De,qe){return De===null||qe===null||De===qe?0:De.centerX-qe.centerX}):y.sort(function(De,qe){return De===null||qe===null||De===qe?0:De.centerY-qe.centerY}),x=a.Zf;var ue=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 de=E.y+re.y;E=ee.charge*a.electricalFieldX(oe,de),ue=ee.charge*a.electricalFieldY(oe,de),E+=ee.mass*a.gravitationalFieldX(oe,de),ue+=ee.mass*a.gravitationalFieldY(oe,de),ee.forceX+=E,ee.forceY+=ue;for(var pe=z+1;pe<y.length;pe++){var Se=y[pe];if(Se!==ee){E=Se.bounds,re=Se.focus,ue=E.x+re.x;var Pe=E.y+re.y;if(oe-ue>x||ue-oe>x){if(b)break}else if(de-Pe>x||Pe-de>x){if(!b)break}else{var Le=zS(ee,Se);1>Le?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new U0),Le=E.random(),re=E.random(),oe>ue?(E=Math.abs(Se.bounds.right-ee.bounds.x),E=(1+E)*Le):oe<ue?(E=Math.abs(Se.bounds.x-ee.bounds.right),E=-(1+E)*Le):(E=Math.max(Se.width,ee.width),E=(1+E)*Le-E/2),de>Pe?(ue=Math.abs(Se.bounds.bottom-ee.bounds.y),ue=(1+ue)*re):oe<ue?(ue=Math.abs(Se.bounds.y-ee.bounds.bottom),ue=-(1+ue)*re):(ue=Math.max(Se.height,ee.height),ue=(1+ue)*re-ue/2)):(re=-(ee.charge*Se.charge)/(Le*Le),E=(ue-oe)/Le*re,ue=(Pe-de)/Le*re),ee.forceX+=E,ee.forceY+=ue,Se.forceX-=E,Se.forceY-=ue}}}}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,de=z.bounds,pe=z.focus,oe=de.x+pe.x,de=de.y+pe.y,pe=zS(x,z),1>pe?(pe=a.randomNumberGenerator,pe===null&&(a.randomNumberGenerator=pe=new U0),re=pe.random(),pe=pe.random(),E=(E>oe?1:-1)*(1+(z.width>x.width?z.width:x.width))*re,ue=(ee>de?1:-1)*(1+(z.height>x.height?z.height:x.height))*pe):(re=re.stiffness*(pe-re.length),E=(oe-E)/pe*re,ue=(de-ee)/pe*re),x.forceX+=E,x.forceY+=ue,z.forceX-=E,z.forceY-=ue;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}Gu.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},Gu.prototype.moveFixedVertex=function(){},Gu.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Gu.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=qi,y.toSpot=qi)}},Gu.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=ln.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,ln.free(x)}x=ln.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()}ln.free(x)},Gu.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Gu.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Gu.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Gu.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Gu.prototype.electricalFieldX=function(){return 0},Gu.prototype.electricalFieldY=function(){return 0},Gu.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Gu.prototype.gravitationalFieldX=function(){return 0},Gu.prototype.gravitationalFieldY=function(){return 0},Gu.prototype.isFixed=function(a){return a.isFixed},dn.Object.defineProperties(Gu.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"&&Wt('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())}}}),Gu.className="ForceDirectedLayout";function HS(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}HS.className="ForceDirectedSubnet";function zg(a){ks.call(this,a)}It(zg,ks),zg.prototype.createVertex=function(){return new xm(this)},zg.prototype.createEdge=function(){return new wm(this)},zg.className="ForceDirectedNetwork";function xm(a){$l.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}It(xm,$l),dn.Object.defineProperties(xm.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)}}}),xm.className="ForceDirectedVertex";function wm(a){td.call(this,a),this.j=this.o=NaN}It(wm,td),dn.Object.defineProperties(wm.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)}}}),wm.className="ForceDirectedEdge";function U0(){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()}U0.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},U0.className="RandomNumberGenerator";function os(a){qs.call(this),this.kc=this.ie=25,this.K=0,this.Dk=J0,this.Zk=$0,this.Qk=q0,this.bj=4,this.rk=ev,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 tt,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}It(os,qs),os.prototype.cloneProtected=function(a){qs.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},os.prototype.qb=function(a){a.classType===os?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:Wt("Unknown enum value: "+a):qs.prototype.qb.call(this,a)},os.prototype.createNetwork=function(){return new Mp(this)},os.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!==Em&&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===Em&&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,ue=0;if(E.link!==null){if(re=E.link,re===null)continue;var de=b.node;if(ee=z.node,de===null||ee===null)continue;var pe=re.fromNode;oe=re.toNode;for(var Se=re.fromPort;Se!==null&&!Se.Ed();)Se=Se.panel;for(re=re.toPort;re!==null&&!re.Ed();)re=re.panel;if(E.rev){ue=pe;var Pe=Se;pe=oe,Se=re,oe=ue,re=Pe}var Le=b.focus;ue=z.focus;var De=E.rev?z.bounds:b.bounds;Pe=tt.alloc(),de!==pe?De.w()&&pe.isVisible()?pe.actualBounds.w()?(cf(pe,Se,pa,Pe),Pe.x+=pe.actualBounds.x-De.x,Pe.y+=pe.actualBounds.y-De.y):(cf(pe,Se,pa,Pe),Pe.w()||Pe.assign(Le)):Pe.assign(Le):De.w()?(cf(pe,Se,pa,Pe),Pe.w()||Pe.assign(Le)):Pe.assign(Le),pe=E.rev?b.bounds:z.bounds,de=tt.alloc(),ee!==oe?pe.w()&&oe.isVisible()?oe.actualBounds.w()?(cf(oe,re,pa,de),de.x+=oe.actualBounds.x-pe.x,de.y+=oe.actualBounds.y-pe.y):(cf(oe,re,pa,de),de.w()||de.assign(ue)):de.assign(ue):pe.w()?(cf(oe,re,pa,de),de.w()||de.assign(ue)):de.assign(ue),this.K===90||this.K===270?(ee=Math.round((Pe.x-Le.x)/this.kc),oe=Pe.x,re=Math.round((de.x-ue.x)/this.kc),ue=de.x):(ee=Math.round((Pe.y-Le.y)/this.kc),oe=Pe.y,re=Math.round((de.y-ue.y)/this.kc),ue=de.y),tt.free(Pe),tt.free(de),E.portFromColOffset=ee,E.portFromPos=oe,E.portToColOffset=re,E.portToPos=ue}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Pe=b.layer,de=z.layer,pe=0,De=E.link,De!==null){var qe=De.fromPort,Ze=De.toPort;if(qe!==null&&Ze!==null){var ct=De.fromNode;if(Se=De.toNode,ct!==null&&Se!==null){var ft=Q0(this,!0),yt=Q0(this,!1),kt=this.setsPortSpots?ft:De.computeSpot(!0,qe);Le=this.setsPortSpots?yt:De.computeSpot(!1,Ze);var Ut=De.isOrthogonal;kt.$c()&&kt.Hf(yt)&&Le.$c()&&Le.Hf(ft)?pe=0:(ft=De.getLinkPoint(ct,qe,kt,!0,Ut,Se,Ze,tt.alloc()),yt=De.getLinkDirection(ct,qe,ft,kt,!0,Ut,Se,Ze),tt.free(ft),kt.ys()||yt!==JS(this,E,!0)?this.setsPortSpots&&ct!==null&&ct.ports.count===1&&E.rev&&(pe+=1):pe+=1,kt=De.getLinkPoint(Se,Ze,Le,!1,Ut,ct,qe,tt.alloc()),De=De.getLinkDirection(Se,Ze,kt,Le,!1,Ut,ct,qe),tt.free(kt),Le.ys()||De!==JS(this,E,!1)?this.setsPortSpots&&Se!==null&&Se.ports.count===1&&E.rev&&(pe+=2):pe+=2)}}}if(Se=pe,pe=Se===1||Se===3,(Se=Se===2||Se===3)&&(Le=a.createVertex(),Le.node=null,Le.Dj=1,Le.layer=Pe,Le.near=b,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=ee,b.portToColOffset=0,b.portFromPos=oe,b.portToPos=0,b=Le),De=1,pe&&De--,Pe-de>De&&0<Pe){for(E.valid=!1,Le=a.createVertex(),Le.node=null,Le.Dj=2,Le.layer=Pe-1,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=Se?0:ee,b.portToColOffset=0,b.portFromPos=Se?0:oe,b.portToPos=0,b=Le,Pe--;Pe-de>De&&0<Pe;)Le=a.createVertex(),Le.node=null,Le.Dj=3,Le.layer=Pe-1,a.dh(Le),b=a.Zj(b,Le,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Le,Pe--;b=a.Zj(Le,z,E.link),b.valid=!pe,pe&&(Le.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=re,b.portFromPos=0,b.portToPos=ue}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=Wf(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),Zf(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},os.prototype.linkMinLength=function(){return 1};function Cy(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}os.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},os.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 kc(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 yd(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 WS(a,y,x){var E=Wf(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],ue=oe.near;if(ue!==null&&ue.layer===oe.layer)if(oe=ue.index,oe>ee)for(var de=ee+1;de<oe;de++){var pe=E[de];pe.near===ue&&pe.Dj===ue.Dj||re++}else for(de=ee-1;de>oe;de--)pe=E[de],pe.near===ue&&pe.Dj===ue.Dj||re++;var Se;if(0<=x)for(oe=E[ee].sourceEdgesArrayAccess,ue=0;ue<oe.length;ue++){var Pe=oe[ue];if(Pe.valid&&Pe.fromVertex.layer!==y)for(pe=Pe.fromVertex.index,de=Pe.portToPos,Pe=Pe.portFromPos,Se=ue+1;Se<oe.length;Se++){var Le=oe[Se];if(Le.valid&&Le.fromVertex.layer!==y){var De=Le.fromVertex.index,qe=Le.portToPos;Le=Le.portFromPos,de<qe&&(pe>De||pe===De&&Pe>Le)&&re++,qe<de&&(De>pe||De===pe&&Le>Pe)&&re++}}}if(0>=x){for(oe=E[ee].destinationEdgesArrayAccess,ue=0;ue<oe.length;ue++)if(Pe=oe[ue],Pe.valid&&Pe.toVertex.layer!==y)for(pe=Pe.toVertex.index,de=Pe.portToPos,Pe=Pe.portFromPos,Se=ue+1;Se<oe.length;Se++)Le=oe[Se],Le.valid&&Le.toVertex.layer!==y&&(De=Le.toVertex.index,qe=Le.portToPos,Le=Le.portFromPos,Pe<Le&&(pe>De||pe===De&&de>qe)&&re++,Le<Pe&&(De>pe||De===pe&&qe>de)&&re++)}for(z[ee*b+ee]=re,oe=ee+1;oe<b;oe++){var Ze=0,ct=0;if(0<=x){re=E[ee].sourceEdgesArrayAccess;var ft=E[oe].sourceEdgesArrayAccess;for(ue=0;ue<re.length;ue++)if(Pe=re[ue],Pe.valid&&Pe.fromVertex.layer!==y)for(pe=Pe.fromVertex.index,Pe=Pe.portFromPos,Se=0;Se<ft.length;Se++)Le=ft[Se],Le.valid&&Le.fromVertex.layer!==y&&(De=Le.fromVertex.index,Le=Le.portFromPos,(pe<De||pe===De&&Pe<Le)&&ct++,(De<pe||De===pe&&Le<Pe)&&Ze++)}if(0>=x){for(re=E[ee].destinationEdgesArrayAccess,ft=E[oe].destinationEdgesArrayAccess,ue=0;ue<re.length;ue++)if(Pe=re[ue],Pe.valid&&Pe.toVertex.layer!==y)for(pe=Pe.toVertex.index,de=Pe.portToPos,Se=0;Se<ft.length;Se++)Le=ft[Se],Le.valid&&Le.toVertex.layer!==y&&(De=Le.toVertex.index,qe=Le.portToPos,(pe<De||pe===De&&de<qe)&&ct++,(De<pe||De===pe&&qe<de)&&Ze++)}z[ee*b+oe]=Ze,z[oe*b+ee]=ct}}return Zf(a,y,E),z}os.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=WS(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 K0(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=Wf(E,b),ee=E.tc[b],re=0,oe=0;oe<ee;oe++){var ue=z[oe].destinationEdgesArrayAccess;if(ue!==null)for(var de=0;de<ue.length;de++){var pe=ue[de];if(pe.valid&&pe.toVertex.layer!==b){var Se=pe.fromVertex.column+pe.portFromColOffset,Pe=pe.toVertex.column+pe.portToColOffset;re+=(Math.abs(Se-Pe)+1)*Cy(pe)}}}Zf(E,b,z),y+=re}return y}os.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 by(a,y,x){for(var E=Wf(a,y),b=a.tc[y],z=[],ee=0;ee<b;ee++){var re=E[ee],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var de=0,pe=0,Se=re.near;if(Se!==null&&Se.layer===re.layer&&(de+=Se.column-1,pe++),oe!==null)for(Se=0;Se<oe.length;Se++){re=oe[Se];var Pe=re.fromVertex;re.valid&&!re.rev&&Pe.layer!==y&&(de+=Pe.column,pe++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],Se=re.toVertex,re.valid&&!re.rev&&Se.layer!==y&&(de+=Se.column,pe++);z[ee]=pe===0?-1:de/pe}return Zf(a,y,E),z}function ZS(a,y,x){for(var E=Wf(a,y),b=a.tc[y],z=[],ee=0;ee<b;ee++){var re=E[ee],oe=null;0>=x&&(oe=re.sourceEdgesArrayAccess);var ue=null;0<=x&&(ue=re.destinationEdgesArrayAccess);var de=0,pe=[],Se=re.near;if(Se!==null&&Se.layer===re.layer&&(pe[de]=Se.column-1,de++),re=void 0,oe!==null)for(Se=0;Se<oe.length;Se++){re=oe[Se];var Pe=re.fromVertex;re.valid&&!re.rev&&Pe.layer!==y&&(pe[de]=Pe.column+re.portFromColOffset,de++)}if(ue!==null)for(oe=0;oe<ue.length;oe++)re=ue[oe],Se=re.toVertex,re.valid&&!re.rev&&Se.layer!==y&&(pe[de]=Se.column+re.portToColOffset,de++);de===0?z[ee]=-1:(pe.sort(function(Le,De){return Le-De}),ue=de>>1,z[ee]=de&1?pe[ue]:pe[ue-1]+pe[ue]>>1)}return Zf(a,y,E),z}function Pm(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,ue=y.layer-oe.layer;re=a.linkMinLength(re),ue===re&&Pm(a,oe,x,E,b,z)}if(z)for(ee=y.sourceEdges;ee.next();)re=ee.value,oe=re.fromVertex,ue=oe.layer-y.layer,re=a.linkMinLength(re),ue===re&&Pm(a,oe,x,E,b,z)}}function Fy(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var ee=y.destinationEdges;ee.next();)Fy(a,ee.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Fy(a,y.value.fromVertex,x,E,b,z)}}os.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Ay: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=VS(a);b!==null;)E[x]=b,x--,b.valid=!1,b=VS(a);for(b=US(a);b!==null;)E[y]=b,y++,b.valid=!1,b=US(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,ue=re.destinationEdges;ue.next();)ue.value.toVertex.valid&&oe++;ue=0;for(var de=re.sourceEdges;de.next();)de.value.fromVertex.valid&&ue++;(b===null||z<oe-ue)&&(b=re,z=oe-ue)}}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 J0: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&&Ly(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Ly(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 Em: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 VS(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 US(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 Ly(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,Ly(a,b))}y.finish=a.Kn,a.Kn++}os.prototype.assignLayers=function(){switch(this.Zk){case Ny:KS(this);break;case By:for(var a,y=this.network.vertexes.iterator;y.next();)a=XS(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 $0: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&&QS(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=YS(a,y.value);a.Ia=Math.max(x,a.Ia)}}function YS(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,YS(a,z)+b)}y.layer=x}else x=y.layer;return x}function XS(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,XS(a,z)+b)}y.layer=x}else x=y.layer;return x}function QS(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)QS(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&&Pm(a,re,0,-1,!0,!1)}for(Pm(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 ue=ee.value;if(ue.component===1){var de=0,pe=!1,Se=ue.sourceEdgesArrayAccess;b=Se.length;for(var Pe=0;Pe<b;Pe++){var Le=Se[Pe],De=Le.fromVertex;de+=1,De.component!==1&&(z+=1,De=De.layer-ue.layer,Le=a.linkMinLength(Le),E=Math.min(E,De-Le))}for(Se=ue.destinationEdgesArrayAccess,b=Se.length,Pe=0;Pe<b;Pe++)Le=Se[Pe].toVertex,--de,Le.component!==1?--z:pe=!0;(oe===null||de<re)&&!pe&&(oe=ue,re=de)}}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(Pm(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(ue=0,de=!1,Se=ee.sourceEdgesArrayAccess,pe=Se.length,Pe=0;Pe<pe;Pe++)Le=Se[Pe].fromVertex,ue+=1,Le.component!==1?E+=1:de=!0;for(Se=ee.destinationEdgesArrayAccess,pe=Se.length,Pe=0;Pe<pe;Pe++)Le=Se[Pe],De=Le.toVertex,--ue,De.component!==1&&(--E,De=ee.layer-De.layer,Le=a.linkMinLength(Le),b=Math.min(b,De-Le));(re===null||ue>z)&&!de&&(re=ee,z=ue)}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}os.prototype.initializeIndices=function(){switch(this.Qk){default:case Dy: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 q0: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&&$S(this,x);break;case ky: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&&qS(this,x)}};function $S(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&&$S(a,E))}function qS(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&&qS(a,E))}os.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=kc(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)Y0(this,E,1),Ld(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=kc(this)),E=this.Ia;0<=E;E--)Y0(this,E,-1),Ld(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=kc(this))}for(yd(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)Y0(this,E,0),Ld(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=kc(this)),E=this.Ia;0<=E;E--)Y0(this,E,0),Ld(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=kc(this))}yd(this,y);var z,ee,re;switch(this.rk){case Ty:break;case _y: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=Ld(this,E,-1)||z;for(b=this.countCrossings(),b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Ld(this,E,1)||z;for(b=this.countCrossings(),b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,1)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,-1)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Ld(this,E,0)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,0)||z;b>=a?yd(this,y):(a=b,y=kc(this))}break;default:case ev: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=Ld(this,E,-1)||z;for(b=this.countCrossings(),b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Ld(this,E,1)||z;for(b=this.countCrossings(),b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,1)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,-1)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=x;E>=ee;E--)z=Ld(this,E,0)||z;for(b>=a?yd(this,y):(a=b,y=kc(this)),z=!0;z;)for(z=!1,E=ee;E<=x;E++)z=Ld(this,E,0)||z;b>=a?yd(this,y):(a=b,y=kc(this))}}yd(this,y)};function Y0(a,y,x){var E=Wf(a,y),b=a.tc[y],z=ZS(a,y,x),ee=by(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);Zf(a,y,E)}function Ld(a,y,x){var E=Wf(a,y),b=a.tc[y];x=WS(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,ue=!0;ue;)for(ue=!1,z=0;z<b-1;z++){var de=x[E[z].index*b+E[z+1].index],pe=x[E[z+1].index*b+E[z].index],Se=0,Pe=0,Le=E[z].column,De=E[z+1].column,qe=a.nodeMinColumnSpace(E[z],!0),Ze=a.nodeMinColumnSpace(E[z],!1),ct=a.nodeMinColumnSpace(E[z+1],!0),ft=a.nodeMinColumnSpace(E[z+1],!1);qe=Le-qe+ct,Ze=De-Ze+ft;var yt=E[z].sourceEdges.iterator;for(yt.reset();yt.next();)if(ct=yt.value,ft=ct.fromVertex,ct.valid&&ft.layer===y){for(ct=0;E[ct]!==ft;)ct++;ct<z&&(Se+=2*(z-ct),Pe+=2*(z+1-ct)),ct===z+1&&(Se+=1),ct>z+1&&(Se+=4*(ct-z),Pe+=4*(ct-(z+1)))}for(yt=E[z].destinationEdges.iterator,yt.reset();yt.next();)if(ct=yt.value,ft=ct.toVertex,ct.valid&&ft.layer===y){for(ct=0;E[ct]!==ft;)ct++;ct===z+1&&(Pe+=1)}for(yt=E[z+1].sourceEdges.iterator,yt.reset();yt.next();)if(ct=yt.value,ft=ct.fromVertex,ct.valid&&ft.layer===y){for(ct=0;E[ct]!==ft;)ct++;ct<z&&(Se+=2*(z+1-ct),Pe+=2*(z-ct)),ct===z&&(Pe+=1),ct>z+1&&(Se+=4*(ct-(z+1)),Pe+=4*(ct-z))}for(yt=E[z+1].destinationEdges.iterator,yt.reset();yt.next();)if(ct=yt.value,ft=ct.toVertex,ct.valid&&ft.layer===y){for(ct=0;E[ct]!==ft;)ct++;ct===z&&(Se+=1)}ct=ft=0,yt=ee[E[z].index];var kt=re[E[z].index],Ut=ee[E[z+1].index],gi=re[E[z+1].index];yt!==-1&&(ft+=Math.abs(yt-Le),ct+=Math.abs(yt-Ze)),kt!==-1&&(ft+=Math.abs(kt-Le),ct+=Math.abs(kt-Ze)),Ut!==-1&&(ft+=Math.abs(Ut-De),ct+=Math.abs(Ut-qe)),gi!==-1&&(ft+=Math.abs(gi-De),ct+=Math.abs(gi-qe)),(Pe<Se-.5||Pe===Se&&pe<de-.5||Pe===Se&&pe===de&&ct<ft-.5)&&(ue=oe=!0,E[z].column=Ze,E[z+1].column=qe,de=E[z],E[z]=E[z+1],E[z+1]=de)}for(z=0;z<b;z++)E[z].index=z;return Zf(a,y,E),oe}os.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&Kx)!==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=Lp(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,-1)||x;x=Lp(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)My(this,y,1);for(y=this.Md-1;0<=y;y--)My(this,y,-1);My(this,this.Md,0)}if(a&&(ex(this,-1),ex(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Lp(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Lp(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Lp(this,y,0)||x}}else Wx(this)};function Lp(a,y,x){for(var E=!1;zx(a,y,x);)E=!0;return E}function zx(a,y,x){var E,b=Wf(a,y),z=a.tc[y],ee=by(a,y,-1);if(0<x)for(E=0;E<z;E++)ee[E]=-1;var re=by(a,y,1);if(0>x)for(E=0;E<z;E++)re[E]=-1;for(var oe=!1,ue=!0;ue;)for(ue=!1,E=0;E<z;E++){var de=b[E].column,pe=a.nodeMinColumnSpace(b[E],!0),Se=a.nodeMinColumnSpace(b[E],!1),Pe=0;0>E-1||de-b[E-1].column-1>pe+a.nodeMinColumnSpace(b[E-1],!1)?Pe=de-1:Pe=de,pe=E+1>=z||b[E+1].column-de-1>Se+a.nodeMinColumnSpace(b[E+1],!0)?de+1:de;var Le=Se=0,De=0;if(0>=x)for(var qe=b[E].sourceEdges.iterator;qe.next();){var Ze=qe.value,ct=Ze.fromVertex;if(Ze.valid&&ct.layer!==y){var ft=Cy(Ze),yt=Ze.portFromColOffset;Ze=Ze.portToColOffset,ct=ct.column,Se+=(Math.abs(de+Ze-(ct+yt))+1)*ft,Le+=(Math.abs(Pe+Ze-(ct+yt))+1)*ft,De+=(Math.abs(pe+Ze-(ct+yt))+1)*ft}}if(0<=x)for(qe=b[E].destinationEdges.iterator;qe.next();)Ze=qe.value,ct=Ze.toVertex,Ze.valid&&ct.layer!==y&&(ft=Cy(Ze),yt=Ze.portFromColOffset,Ze=Ze.portToColOffset,ct=ct.column,Se+=(Math.abs(de+yt-(ct+Ze))+1)*ft,Le+=(Math.abs(Pe+yt-(ct+Ze))+1)*ft,De+=(Math.abs(pe+yt-(ct+Ze))+1)*ft);Ze=yt=ft=0,qe=ee[b[E].index],ct=re[b[E].index],qe!==-1&&(ft+=Math.abs(qe-de),yt+=Math.abs(qe-Pe),Ze+=Math.abs(qe-pe)),ct!==-1&&(ft+=Math.abs(ct-de),yt+=Math.abs(ct-Pe),Ze+=Math.abs(ct-pe)),Le<Se||Le===Se&&yt<ft?(ue=oe=!0,b[E].column=Pe):(De<Se||De===Se&&Ze<ft)&&(ue=oe=!0,b[E].column=pe)}return Zf(a,y,b),a.normalize(),oe}function My(a,y,x){var E=Wf(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),ue=a.nodeMinColumnSpace(E[x],!1),de=0;if(ee[x]===-1)if(x===0&&x===b-1)de=re;else if(x===0){var pe=E[x+1].column;pe-re===ue+a.nodeMinColumnSpace(E[x+1],!0)?de=re-1:de=re}else x===b-1?(pe=E[x-1].column,de=re-pe===oe+a.nodeMinColumnSpace(E[x-1],!1)?re+1:re):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,de=(oe+ue)/2|0);else x===0&&x===b-1?de=ee[x]:x===0?(pe=E[x+1].column,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,de=Math.min(ee[x],ue)):x===b-1?(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,de=Math.max(ee[x],oe)):(pe=E[x-1].column,oe=pe+a.nodeMinColumnSpace(E[x-1],!1)+oe+1,pe=E[x+1].column,ue=pe-a.nodeMinColumnSpace(E[x+1],!0)-ue-1,oe<ee[x]&&ee[x]<ue?de=ee[x]:oe>=ee[x]?de=oe:ue<=ee[x]&&(de=ue));de!==re&&(z=!0,E[x].column=de)}Zf(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 ex(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=kc(a),z=K0(a);for(E=z+1;z<E;){E=z,tx(a,x,1);var ee=K0(a);ee>z?yd(a,b):ee<z&&(z=ee,b=kc(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=kc(a),z=K0(a),E=z+1;z<E;)E=z,tx(a,x,-1),ee=K0(a),ee>z?yd(a,b):ee<z&&(z=ee,b=kc(a));a.normalize()}function tx(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&&(Fy(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 Wx(a){for(var y=Ar(),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 zn,Zx(y,x);var z=null,ee=null,re=null,oe=null,ue=(a.ve&1)!==0,de=(a.ve&2)!==0,pe=(a.ve&4)!==0,Se=(a.ve&8)!==0;for(ue&&(a.verticalAlignment(y,x,!0),z=X0(a,y,!0,!1)),y.reverse(),pe&&(a.verticalAlignment(y,x,!1),re=X0(a,y,!1,!1)),E=gn(y),b=E.next();!b.done;b=E.next())b.value.reverse();Se&&(a.verticalAlignment(y,x,!1),oe=X0(a,y,!1,!0)),y.reverse(),de&&(a.verticalAlignment(y,x,!0),ee=X0(a,y,!0,!0)),br(y),a.u(z,ee,re,oe),a.network.vertexes.each(function(Pe){var Le=Ar();ue&&Le.push(z.get(Pe)),de&&Le.push(ee.get(Pe)),pe&&Le.push(re.get(Pe)),Se&&Le.push(oe.get(Pe)),Le.sort(function(qe,Ze){return qe-Ze});var De=Le.length;De=(Le[Math.floor((De-1)/2)]+Le[Math.ceil((De-1)/2)])/2,br(Le),Pe.zc=De})}function Zx(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 ue=re[oe];e:{if(ue.node===null){var de=Oy(ue);if(0<de.length){de=de[0].node===null;break e}}de=!1}var pe=de;if(oe===re.length-1||pe){for(de=ee.length-1,pe&&(de=Oy(ue)[0].index);z<=oe;){if(ue=re[z],!ue.bo){pe=[];for(var Se=gn(ue.sourceEdgesArrayAccess),Pe=Se.next();!Pe.done;Pe=Se.next())Pe=Pe.value,Pe.valid&&pe.push(Pe);ue.bo=pe}for(ue=gn(ue.bo),pe=ue.next();!pe.done;pe=ue.next())pe=pe.value,Se=pe.fromVertex.index,(Se<b||Se>de)&&y.add(pe);z++}b=de}}}os.prototype.verticalAlignment=function(a,y,x){Vx(a),a=gn(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=gn(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var ee=x?Oy(z):Yx(z),re=ee.length;if(0<re){ee.sort(function(pe,Se){return pe.vi-Se.vi});var oe=(re-1)/2;for(re=Math.floor(oe),oe=Math.ceil(oe);re<=oe;re++)if(z.align===z){var ue=ee[re],de=void 0;de=x?tv(ue,z):tv(z,ue),!y.contains(de)&&b<ue.vi&&(ue.align=z,z.root=ue.root,z.align=ue.root,b=ue.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 X0(a,y,x,E){for(var b=a.K===90||a.K===270,z=gn(y),ee=z.next();!ee.done;ee=z.next()){var re=gn(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=gn(y),re=z.next();!re.done;re=z.next()){re=gn(re.value);for(var oe=re.next();!oe.done;oe=re.next())if(oe=oe.value,oe.root===oe){for(var ue=0,de=oe;de.align!==oe;){var pe=de.align,Se=ee?de.width:de.height,Pe=ee?pe.width:pe.height;if(x){var Le=tv(de,pe),De=Le.portFromPos,qe=Le.portToPos;Le.link!==null&&(de.node&&de.node!==Le.link.fromNode&&(De=ee?de.focusX:de.focusY),pe.node&&pe.node!==Le.link.toNode&&(qe=ee?pe.focusX:pe.focusY))}else Le=tv(pe,de),De=Le.portToPos,qe=Le.portFromPos,Le.link!==null&&(de.node&&de.node!==Le.link.toNode&&(De=ee?de.focusX:de.focusY),pe.node&&pe.node!==Le.link.fromNode&&(qe=ee?pe.focusX:pe.focusY));Se=E?de.qg+(Se-De)-(Pe-qe):de.qg+De-qe,pe.qg=Se,ue=Math.min(ue,Se),de=de.align}de=oe;do de.qg=de.qg-ue,de=de.align;while(de!==oe)}}for(x=gn(y),ee=x.next();!ee.done;ee=x.next())for(z=gn(ee.value),ee=z.next();!ee.done;ee=z.next())ee=ee.value,ee.root===ee&&nx(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=ix(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 sr,y=gn(y),ee=y.next();!ee.done;ee=y.next())for(x=gn(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 nx(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=ix(E,x),z=b.root;nx(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 ix(a,y){var x=a.Tz;return a=a.vi,1>a&&Wt("Could not determine previous vertex in layer"),y[x][a-1]}os.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=Ar(),b=Ar(),z=1/0,ee=0;4>ee;ee++)if(y[ee]){var re=Ux(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(ue){ue.value+=oe.delta}}(z)));br(E),br(b)};function Ux(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,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}os.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=Q0(this,!0),y=Q0(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 Q0(a,y){return a.K===270?y?ha:zr:a.K===90?y?zr:ha:a.K===180?y?za:Ho:y?Ho:za}os.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,ue=oe.layer,de=oe.column|0;E?(ee=y.x+this.kc*de,ue=this.Kd[ue]):(ee=this.Kd[ue],ue=y.y+this.kc*de),oe.centerX=ee,oe.centerY=ue,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 tt(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},os.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 ln(0,0,x,Math.abs(this.Ta[0]))):y.push(new ln(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new ln(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new ln(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new ln(0,0,Math.abs(this.Ta[0]),x)):y.push(new ln(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new ln(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new ln(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},os.prototype.commitLayers=function(){},os.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 ue=y.computeSpot(!0,ee);oe=y.computeSpot(!1,re);var de=x.fromVertex,pe=x.toVertex;if(x.valid)y.curve===cd&&y.pointsCount===4&&(de.column===pe.column&&this.alignOption===0?(x=y.getLinkPoint(b,ee,ue,!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&&ue===El&&(E=!0),re!==null&&oe===El&&(x=!0),(E||x)&&(oe=null,E&&(oe=y.getLinkPointFromPoint(b,ee,ee.ga(pa),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(pa),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(de.layer===pe.layer)y.zf();else{var Se=!1,Pe=!1,Le=this.ie,De=y.firstPickIndex+1;if(y.isOrthogonal){Pe=!0;var qe=y.pointsCount;4<qe&&y.points.removeRange(2,qe-3)}else if(y.curve===cd)Se=!0,qe=y.pointsCount,4<qe&&y.points.removeRange(2,qe-3),qe===4&&(De=2);else{qe=y.pointsCount;var Ze=ue===El,ct=oe===El;2<qe&&Ze&&ct?y.points.removeRange(1,qe-2):3<qe&&Ze&&!ct?y.points.removeRange(1,qe-3):3<qe&&!Ze&&ct?y.points.removeRange(2,qe-2):4<qe&&!Ze&&!ct&&y.points.removeRange(2,qe-3)}if(x.rev){for(;pe!==null&&de!==pe;){var ft=qe=null;for(Ze=pe.sourceEdges.iterator;Ze.next()&&(ct=Ze.value,ct.link!==x.link||(qe=ct.fromVertex,ft=ct.toVertex,qe.node!==null)););if(qe===null)break;if(qe!==de){Ze=y.i(De-1).x,ct=y.i(De-1).y;var yt=qe.centerX,kt=qe.centerY;if(Pe)this.K===180||this.K===0?De===y.firstPickIndex+1?(y.m(De++,Ze,ct),y.m(De++,Ze,kt)):(ft!==null?ft.centerY:ct)!==kt&&(ft=this.Ta[qe.layer-1]+this.Rf.x,y.m(De++,ft,ct),y.m(De++,ft,kt)):De===y.firstPickIndex+1?(y.m(De++,Ze,ct),y.m(De++,yt,ct)):(ft!==null?ft.centerX:Ze)!==yt&&(ft=this.Ta[qe.layer-1]+this.Rf.y,y.m(De++,Ze,ft),y.m(De++,yt,ft));else if(De===y.firstPickIndex+1){ft=Math.max(10,this.he[pe.layer]);var Ut=Math.max(10,this.Ld[pe.layer]);if(Se)this.K===180?yt<=pe.bounds.x?(pe=pe.bounds.x,y.m(De++,pe-ft,kt),y.m(De++,pe,kt),y.m(De++,pe+Ut,kt)):(y.m(De++,yt-ft,kt),y.m(De++,yt,kt),y.m(De++,yt+Ut,kt)):this.K===90?kt>=pe.bounds.bottom?(pe=pe.bounds.y+pe.bounds.height,y.m(De++,yt,pe+Ut),y.m(De++,yt,pe),y.m(De++,yt,pe-ft)):(y.m(De++,yt,kt+Ut),y.m(De++,yt,kt),y.m(De++,yt,kt-ft)):this.K===270?kt<=pe.bounds.y?(pe=pe.bounds.y,y.m(De++,yt,pe-ft),y.m(De++,yt,pe),y.m(De++,yt,pe+Ut)):(y.m(De++,yt,kt-ft),y.m(De++,yt,kt),y.m(De++,yt,kt+Ut)):this.K===0&&(yt>=pe.bounds.right?(pe=pe.bounds.x+pe.bounds.width,y.m(De++,pe+Ut,kt),y.m(De++,pe,kt),y.m(De++,pe-ft,kt)):(y.m(De++,yt+Ut,kt),y.m(De++,yt,kt),y.m(De++,yt-ft,kt)));else{y.m(De++,Ze,ct);var gi=0;this.K===180||this.K===0?((this.K===180?yt>=pe.bounds.right:yt<=pe.bounds.x)&&(gi=(this.K===0?-ft:Ut)/2),y.m(De++,Ze+gi,kt)):((this.K===270?kt>=pe.bounds.bottom:kt<=pe.bounds.y)&&(gi=(this.K===90?-ft:Ut)/2),y.m(De++,yt,ct+gi)),y.m(De++,yt,kt)}}else ft=Math.max(10,this.he[qe.layer]),Ut=Math.max(10,this.Ld[qe.layer]),Se?this.K===180?(y.m(De++,yt-ft-Le,kt),y.m(De++,Math.min(yt-ft+Le/2,yt),kt),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,Math.max(yt+Ut-Le/2,yt),kt),y.m(De++,yt+Ut+Le,kt)):this.K===90?(y.m(De++,yt,kt+Ut+Le),y.m(De++,yt,Math.max(kt+Ut-Le/2,kt)),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,yt,Math.min(kt-ft+Le/2,kt)),y.m(De++,yt,kt-ft-Le)):this.K===270?(y.m(De++,yt,kt-ft-Le),y.m(De++,yt,Math.min(kt-ft+Le/2,kt)),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,yt,Math.max(kt+Ut-Le/2,kt)),y.m(De++,yt,kt+Ut+Le)):(y.m(De++,yt+Ut+Le,kt),y.m(De++,Math.max(yt+Ut-Le/2,yt),kt),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,Math.min(yt-ft+Le/2,yt),kt),y.m(De++,yt-ft-Le,kt)):y.m(De++,yt,kt)}pe=qe}(re===null||ue!==El||Pe)&&(Ze=y.i(De-1).x,ct=y.i(De-1).y,yt=y.i(De).x,kt=y.i(De).y,Pe?(Le=this.Ld[de.layer],this.K===180||this.K===0?(Pe=ct,Pe>=de.bounds.y&&Pe<=de.bounds.bottom&&(this.K===180?yt>=de.bounds.x:yt<=de.bounds.right)&&(pe=de.centerX+(this.K===180?-Le:Le),Pe<de.bounds.y+de.bounds.height/2?Pe=de.bounds.y-this.kc/2:Pe=de.bounds.bottom+this.kc/2,y.m(De++,pe,ct),y.m(De++,pe,Pe)),y.m(De++,yt,Pe)):(Pe=Ze,Pe>=de.bounds.x&&Pe<=de.bounds.right&&(this.K===270?kt>=de.bounds.y:kt<=de.bounds.bottom)&&(pe=de.centerY+(this.K===270?-Le:Le),Pe<de.bounds.x+de.bounds.width/2?Pe=de.bounds.x-this.kc/2:Pe=de.bounds.right+this.kc/2,y.m(De++,Ze,pe),y.m(De++,Pe,pe)),y.m(De++,Pe,kt)),y.m(De++,yt,kt)):Se?(ft=Math.max(10,this.he[de.layer]),Ut=Math.max(10,this.Ld[de.layer]),this.K===180&&yt>=de.bounds.x?(pe=de.bounds.x+de.bounds.width,y.L(De-2,pe,ct),y.L(De-1,pe+Ut,ct)):this.K===90&&kt<=de.bounds.bottom?(pe=de.bounds.y,y.L(De-2,Ze,pe),y.L(De-1,Ze,pe-ft)):this.K===270&&kt>=de.bounds.y?(pe=de.bounds.y+de.bounds.height,y.L(De-2,Ze,pe),y.L(De-1,Ze,pe+Ut)):this.K===0&&yt<=de.bounds.right&&(pe=de.bounds.x,y.L(De-2,pe,ct),y.L(De-1,pe-ft,ct))):(ft=Math.max(10,this.he[de.layer]),Ut=Math.max(10,this.Ld[de.layer]),Pe=0,this.K===180||this.K===0?((this.K===180?yt<=de.bounds.x:yt>=de.bounds.right)&&(Pe=(this.K===0?Ut:-ft)/2),y.m(De++,yt+Pe,ct)):((this.K===270?kt<=de.bounds.y:kt>=de.bounds.bottom)&&(Pe=(this.K===90?Ut:-ft)/2),y.m(De++,Ze,kt+Pe)),y.m(De++,yt,kt)))}else{for(;de!==null&&de!==pe;){for(ft=qe=null,de=de.destinationEdges.iterator;de.next()&&(Ze=de.value,Ze.link!==x.link||(qe=Ze.toVertex,ft=Ze.fromVertex,ft.node!==null&&(ft=null),qe.node!==null)););if(qe===null)break;qe!==pe&&(Ze=y.i(De-1).x,ct=y.i(De-1).y,yt=qe.centerX,kt=qe.centerY,Pe?this.K===180||this.K===0?(ft!==null?ft.centerY:ct)!==kt&&(ft=this.Ta[qe.layer]+this.Rf.x,De===y.firstPickIndex+1&&(ft=this.K===0?Math.max(ft,Ze):Math.min(ft,Ze)),y.m(De++,ft,ct),y.m(De++,ft,kt)):(ft!==null?ft.centerX:Ze)!==yt&&(ft=this.Ta[qe.layer]+this.Rf.y,De===y.firstPickIndex+1&&(ft=this.K===90?Math.max(ft,ct):Math.min(ft,ct)),y.m(De++,Ze,ft),y.m(De++,yt,ft)):(ft=Math.max(10,this.he[qe.layer]),Ut=Math.max(10,this.Ld[qe.layer]),Se?this.K===180?(y.m(De++,yt+Ut+Le,kt),y.m(De++,Math.max(yt+Ut-Le/2,yt),kt),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,Math.min(yt-ft+Le/2,yt),kt),y.m(De++,yt-ft-Le,kt)):this.K===90?(y.m(De++,yt,kt-ft-Le),y.m(De++,yt,Math.min(kt-ft+Le/2,kt)),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,yt,Math.max(kt+Ut-Le/2,kt)),y.m(De++,yt,kt+Ut+Le)):this.K===270?(y.m(De++,yt,kt+Ut+Le),y.m(De++,yt,Math.max(kt+Ut-Le/2,kt)),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,yt,Math.min(kt-ft+Le/2,kt)),y.m(De++,yt,kt-ft-Le)):(y.m(De++,yt-ft-Le,kt),y.m(De++,Math.min(yt-ft+Le/2,yt),kt),y.m(De++,yt,kt),y.m(De++,yt,kt),y.m(De++,Math.max(yt+Ut-Le/2,yt),kt),y.m(De++,yt+Ut+Le,kt)):this.K===180?(y.m(De++,yt+Ut,kt),y.m(De++,yt-ft,kt)):this.K===90?(y.m(De++,yt,kt-ft),y.m(De++,yt,kt+Ut)):this.K===270?(y.m(De++,yt,kt+Ut),y.m(De++,yt,kt-ft)):(y.m(De++,yt-ft,kt),y.m(De++,yt+Ut,kt)))),de=qe}Pe&&(Ze=y.i(De-1).x,ct=y.i(De-1).y,yt=y.i(De).x,kt=y.i(De).y,this.K===180||this.K===0?ct!==kt&&(ft=this.K===0?Math.min(Math.max((yt+Ze)/2,this.Ta[pe.layer]+this.Rf.x),yt):Math.max(Math.min((yt+Ze)/2,this.Ta[pe.layer]+this.Rf.x),yt),y.m(De++,ft,ct),y.m(De++,ft,kt)):Ze!==yt&&(ft=this.K===90?Math.min(Math.max((kt+ct)/2,this.Ta[pe.layer]+this.Rf.y),kt):Math.max(Math.min((kt+ct)/2,this.Ta[pe.layer]+this.Rf.y),kt),y.m(De++,Ze,ft),y.m(De++,yt,ft)))}E!==null&&Se&&4<=y.pointsCount&&(ee!==null&&(ee=ue===El?y.getLinkPointFromPoint(b,ee,ee.ga(pa),y.i(3),!0):y.i(0),ue===El&&(ue=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(ee.x+ue.x)/2,ue.y),y.L(2,E.x,(ue.y+E.y)/2)):(y.L(1,ue.x,(ee.y+ue.y)/2),y.L(2,(ue.x+E.x)/2,E.y))),ee.w()||ee.set(b.actualBounds.center),y.L(0,ee.x,ee.y)),re!==null&&(b=oe===El?y.getLinkPointFromPoint(z,re,re.ga(pa),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),oe===El&&(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()},os.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new Un,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 Vf;re.layer=Math.floor(z.y/2);var oe=E.i(0),ue=E.i(E.pointsCount-1);if(re.first=oe.x*oe.x+oe.y,re.jc=ue.x*ue.x+ue.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),ue=E.i(b+2);var de=0;oe.y<z.y?de=ue.y<z.y?3:z.x<ee.x?2:1:oe.y>z.y&&(de=ue.y>z.y?0:ee.x<z.x?2:1),re.j=de}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),de=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(de++,re=ue.jc);this.zi(x,this.Ux,z,z+ee);var pe=1;for(re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(pe++,re=ue.first);for(oe=!0,ue=pe,de<pe?(oe=!1,ue=de,re=x[z].jc,this.zi(x,this.Js,z,z+ee)):re=x[z].first,de=0,pe=z;pe<b;pe++){var Se=x[pe];(oe?Se.first:Se.jc)!==re&&(de++,re=oe?Se.first:Se.jc);var Pe=Se.link;z=Pe.i(Se.index),ee=Pe.i(Se.index+1);var Le=this.linkSpacing*(de-(ue-1)/2);y++,Pe.uh(),Pe.L(Se.index,z.x,z.y+Le),Pe.L(Se.index+1,ee.x,ee.y+Le),Pe.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 Vf,re.layer=Math.floor(z.x/2),oe=E.i(0),ue=E.i(E.pointsCount-1),re.first=oe.x+oe.y*oe.y,re.jc=ue.x+ue.y*ue.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),ue=E.i(b+2),de=0,oe.x<z.x?de=ue.x<z.x?3:z.y<ee.y?2:1:oe.x>z.x&&(de=ue.x>z.x?0:ee.y<z.y?2:1),re.j=de),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),de=1,re=x[z].jc,oe=z;oe<b;oe++)ue=x[oe],ue.jc!==re&&(de++,re=ue.jc);for(this.zi(x,this.Ux,z,z+ee),pe=1,re=x[z].first,oe=z;oe<b;oe++)ue=x[oe],ue.first!==re&&(pe++,re=ue.first);for(oe=!0,ue=pe,de<pe?(oe=!1,ue=de,re=x[z].jc,this.zi(x,this.Js,z,z+ee)):re=x[z].first,de=0,pe=z;pe<b;pe++)Se=x[pe],(oe?Se.first:Se.jc)!==re&&(de++,re=oe?Se.first:Se.jc),Pe=Se.link,z=Pe.i(Se.index),ee=Pe.i(Se.index+1),Le=this.linkSpacing*(de-(ue-1)/2),y++,Pe.uh(),Pe.L(Se.index,z.x+Le,z.y),Pe.L(Se.index+1,ee.x+Le,ee.y),Pe.zf()}z=b}a=E}}}},Ee=os.prototype,Ee.Vx=function(a,y){return a instanceof Vf&&y instanceof Vf&&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},Ee.Ux=function(a,y){return a instanceof Vf&&y instanceof Vf&&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},Ee.Js=function(a,y){return a instanceof Vf&&y instanceof Vf&&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},Ee.B=function(a,y){return a-=y,-1<a&&1>a},Ee.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&Wt("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 Wf(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 Zf(a,y,x){a.He[a.tc[y]]=x}dn.Object.defineProperties(os.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()):Wt("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Ay&&a!==J0&&a!==Em||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==$0&&a!==Ny&&a!==By||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==q0&&a!==ky&&a!==Dy||(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!==Ty&&a!==ev&&a!==_y||(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 J0=new Qt(os,"CycleDepthFirst",0),Ay=new Qt(os,"CycleGreedy",1),Em=new Qt(os,"CycleFromLayers",2),$0=new Qt(os,"LayerOptimalLinkLength",0),Ny=new Qt(os,"LayerLongestPathSink",1),By=new Qt(os,"LayerLongestPathSource",2),q0=new Qt(os,"InitDepthFirstOut",0),ky=new Qt(os,"InitDepthFirstIn",1),Dy=new Qt(os,"InitNaive",2),Ty=new Qt(os,"AggressiveNone",0),ev=new Qt(os,"AggressiveLess",1),_y=new Qt(os,"AggressiveMore",2),Kx=8;os.className="LayeredDigraphLayout",os.CycleDepthFirst=J0,os.CycleGreedy=Ay,os.CycleFromLayers=Em,os.LayerOptimalLinkLength=$0,os.LayerLongestPathSink=Ny,os.LayerLongestPathSource=By,os.InitDepthFirstOut=q0,os.InitDepthFirstIn=ky,os.InitNaive=Dy,os.AggressiveNone=Ty,os.AggressiveLess=ev,os.AggressiveMore=_y,os.PackNone=0,os.PackExpand=1,os.PackStraighten=2,os.PackMedian=4,os.PackAll=15,os.AlignNone=0,os.AlignUpperLeft=1,os.AlignUpperRight=2,os.AlignLowerLeft=4,os.AlignLowerRight=8,os.AlignAll=15;function Vf(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}Vf.className="SegInfo";function Mp(a){ks.call(this,a)}It(Mp,ks),Mp.prototype.createVertex=function(){return new Sd(this)},Mp.prototype.createEdge=function(){return new Cm(this)},Mp.className="LayeredDigraphNetwork";function Sd(a){$l.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}It(Sd,$l);function rx(a,y){return a.index-y.index}function tv(a,y){if(!a.$n){for(var x=[],E=gn(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=gn(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;Wt("Unable to find destination edge to given vertex")}function Oy(a){if(!a.co){for(var y=[],x=gn(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(rx),a.co=y}return a.co}function Yx(a){if(!a.ao){for(var y=[],x=gn(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(rx),a.ao=y}return a.ao}Sd.prototype.Cl=function(a){$l.prototype.Cl.call(this,a),this.bo=this.co=null},Sd.prototype.Kl=function(a){$l.prototype.Kl.call(this,a),this.bo=this.co=null},Sd.prototype.zl=function(a){$l.prototype.zl.call(this,a),this.$n=this.ao=null},Sd.prototype.Jl=function(a){$l.prototype.Jl.call(this,a),this.$n=this.ao=null},dn.Object.defineProperties(Sd.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)}}}),Sd.prototype.deleteDestinationEdge=Sd.prototype.Jl,Sd.prototype.addDestinationEdge=Sd.prototype.zl,Sd.prototype.deleteSourceEdge=Sd.prototype.Kl,Sd.prototype.addSourceEdge=Sd.prototype.Cl,Sd.className="LayeredDigraphVertex";function Cm(a){td.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}It(Cm,td),dn.Object.defineProperties(Cm.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)}}}),Cm.className="LayeredDigraphEdge";function Yo(a){qs.call(this),this.Ub=new zn,this.Wn=ov,this.ud=Mh,this.vo=sv,this.Bq=Ky,this.$v=[],this.td=!0,this.Rb=lv,this.$d=new Fn(10,10).freeze();var y=new Zg(this);this.W=new Md(y),this.Y=new Md(y),this.ru=[],a&&Object.assign(this,a)}It(Yo,qs),Yo.prototype.cloneProtected=function(a){qs.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)},Yo.prototype.qb=function(a){a.classType===Yo?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:Wt("Unknown enum value: "+a):qs.prototype.qb.call(this,a)},Yo.prototype.createNetwork=function(){return new Zg(this)},Yo.prototype.makeNetwork=function(a){function y(E){if(E instanceof xi)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Jn){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 Gt?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof po?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Yo.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==uv&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Gt&&(y=a),this.path===ov&&y!==null?this.ud=y.isTreePathToChildren?Mh:Hg:this.ud=this.path===ov?Mh: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 zn,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof xi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof Md&&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,Iy(this,y));for(y=this.network.vertexes,a=null;a=Xx(y),0<a.count;)y=ox(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Iy(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Md&&sx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Md&&lx(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof Md&&ux(this,y);if(this.Cu(),this.layerStyle===cv){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===Yy)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 Md&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new zn,this.isValidLayout=!0};function Xx(a){var y=new zn;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Yo.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case Mh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Hg:x.destinationEdges.count===0&&this.Ub.add(x);break;default:Wt("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=ox(this,a),a!==null&&this.Ub.add(a))};function ox(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case Mh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Hg:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:Wt("Unhandled path value "+a.ud.toString())}}return E}function Iy(a,y){if(y!==null){switch(a.ud){case Mh:if(0<y.destinationEdges.count){for(var x=new Un,E=y.destinationVertexes;E.next();){var b=E.value;ax(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Hg:if(0<y.sourceEdges.count){for(x=new Un,E=y.sourceVertexes;E.next();)b=E.value,ax(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:Wt("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++)Iy(a,x[y])}}function ax(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}Yo.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 sx(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===Bh&&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];sx(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 Qx(a,y){switch(a.vo){default:case sv:return y.parent!==null?y.parent:a.W;case Vy:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Zy:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Wy: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}}Yo.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(Qx(this,a)),a.parent!==null&&a.parent.alignment===Bh){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 lx(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)lx(a,y[E])}}Yo.prototype.assignTreeVertexValues=function(){};function ux(a,y){if(y!==null){y.alignment!==Bh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)ux(a,y[E])}}Yo.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Ap:break;case Fm:a.children.reverse();break;case Lm:a.children.sort(a.comparer);break;case Mm:a.children.sort(a.comparer),a.children.reverse();break;default:Wt("Unhandled sorting value "+a.sorting.toString())}},Yo.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Yo.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=Uf(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 ue=a.node.Mu();ue.next();){var de=ue.value;de.category==="Comment"&&de.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(de),de.Va(),de=de.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,de.width),ee+=de.height+Math.abs(re)):(z+=de.width+Math.abs(re),ee=Math.max(ee,de.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=ln.allocAt(0,0,a.bounds.width+z,a.bounds.height+ee),a.bounds=b,ln.free(b))};function Uf(a){return a===mf||a===Bh||a===vf||a===Uh}function bm(a){return a===mf||a===Bh}function Ry(a){var y=a.parent;if(y!==null){var x=y.alignment;if(Uf(x)){if(bm(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===vf)return!0}}return!1}Yo.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=Uf(z)),E=E===90||E===270,x=b===90||b===270;for(var ee=a.childrenCount===0,re=Ry(a),oe=0,ue=a.comments,de=ue.length,pe=tt.alloc(),Se=0;Se<de;Se++){var Pe=ue[Se],Le=Pe.measuredBounds;if(E&&!ee||!z&&!x&&ee||z&&x&&ee){if(135<b&&!z||x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x-a.commentMargin-Le.width,a.bounds.y+oe),Pe.move(pe),Pe=Pe.Sd();Pe.next();){var De=Pe.value;De.fromSpot=za,De.toSpot=Ho}else for(pe.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+oe),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=Ho,De.toSpot=za;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+oe),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=Ho,De.toSpot=za;else for(pe.h(a.bounds.x+a.commentMargin-Le.width,a.bounds.y+oe),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=za,De.toSpot=Ho;oe=0<=a.commentSpacing?oe+(Le.height+a.commentSpacing):oe+(a.commentSpacing-Le.height)}else{if(135<b&&!z||!x&&re)if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y-a.commentMargin-Le.height),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=ha,De.toSpot=zr;else for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y-a.commentMargin),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=zr,De.toSpot=ha;else if(0<=a.commentMargin)for(pe.h(a.bounds.x+oe,a.bounds.y+2*a.focus.y+a.commentMargin),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=zr,De.toSpot=ha;else for(pe.h(a.bounds.x+oe,a.bounds.y+a.commentMargin-Le.height),Pe.move(pe),Pe=Pe.Sd();Pe.next();)De=Pe.value,De.fromSpot=ha,De.toSpot=zr;oe=0<=a.commentSpacing?oe+(Le.width+a.commentSpacing):oe+(a.commentSpacing-Le.width)}}if(tt.free(pe),y=oe-a.commentSpacing-(E?y.height:y.width),this.ud===Mh)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)}},Yo.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 av:cx(this,a);break;case Am:if(a.alignment===Bh)cx(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=Uf(x)),E=Ry(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=Gd(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===Ah;var ue=oe===Nh,de=Uf(oe),pe=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var Se=a.nodeSpacing,Pe=this.computeNodeIndent(a),Le=a.rowSpacing,De=0;(E||ue||a.hm||a.im&&a.maxGenerationCount===1)&&(De=Math.max(0,a.rowIndent)),E=a.width;var qe=a.height,Ze=0,ct=0,ft=0,yt=null,kt=null,Ut=0,gi=0,Qi=0,Gi=0,Qn=0,An=0,so=0,Wr=0;if(de&&!bm(oe)&&135<b&&ee.reverse(),bm(oe))if(1<re)for(var Ta=0;Ta<re;Ta++)Ta%2===0&&Ta!==re-1&&(Wr=Math.max(Wr,y?ee[Ta].Da.width:ee[Ta].Da.height));else re===1&&(Wr=y?ee[0].Da.width:ee[0].Da.height);if(de){switch(oe){case mf:ct=135>b?dx(this,a,ee,Wr,Ze,ct):hx(this,a,ee,Wr,Ze,ct),Wr=ct.x,Ze=ct.width,ct=ct.height;break;case vf:for(yt=0;yt<re;yt++)kt=ee[yt],pe=kt.Da,ft=An===0?0:Le,y?(kt.S.h(z-pe.width,Gi+ft),Ze=Math.max(Ze,pe.width),ct=Math.max(ct,Gi+ft+pe.height),Gi+=ft+pe.height):(kt.S.h(Qi+ft,z-pe.height),Ze=Math.max(Ze,Qi+ft+pe.width),ct=Math.max(ct,pe.height),Qi+=ft+pe.width),An++;break;case Uh:for(yt=0;yt<re;yt++)kt=ee[yt],z=kt.Da,pe=An===0?0:Le,y?(kt.S.h(Se/2+a.focus.x,Gi+pe),Ze=Math.max(Ze,z.width),ct=Math.max(ct,Gi+pe+z.height),Gi+=pe+z.height):(kt.S.h(Qi+pe,Se/2+a.focus.y),Ze=Math.max(Ze,Qi+pe+z.width),ct=Math.max(ct,z.height),Qi+=pe+z.width),An++}yt=Uc(this,2),kt=Uc(this,2),y?(yt[0].h(0,0),yt[1].h(0,ct),kt[0].h(Ze,0)):(yt[0].h(0,0),yt[1].h(Ze,0),kt[0].h(0,ct)),kt[1].h(Ze,ct)}else for(Ta=0;Ta<re;Ta++){var As=ee[Ta],cu=As.Da;if(y){0<pe&&0<An&&Qi+Se+cu.width>pe&&(Qi<z&&fg(a,oe,z-Qi,0,so,Ta-1),Qn++,An=0,so=Ta,ft=ct,Qi=0,Gi=135<b?-ct-Le:ct+Le),iv(this,As,0,Gi);var yu=0;if(An===0)yt=As.Yo,kt=As.kp,Ut=cu.width,gi=cu.height,(yt===null||kt===null||b!==Gd(As))&&(yt=Uc(this,2),kt=Uc(this,2),yt[0].h(0,0),yt[1].h(0,gi),kt[0].h(Ut,0),kt[1].h(Ut,gi));else{var sc=Ar();gi=fx(this,a,As,yt,kt,Ut,gi,sc),yu=gi.x,yt=sc[0],kt=sc[1],Ut=gi.width,gi=gi.height,br(sc),Qi<cu.width&&0>yu&&(Gg(a,-yu,0,so,Ta-1),rv(yt,-yu,0),rv(kt,-yu,0),yu=0)}As.S.h(yu,Gi),Ze=Math.max(Ze,Ut),ct=Math.max(ct,ft+(Qn===0?0:Le)+cu.height),Qi=Ut}else 0<pe&&0<An&&Gi+Se+cu.height>pe&&(Gi<z&&fg(a,oe,0,z-Gi,so,Ta-1),Qn++,An=0,so=Ta,ft=Ze,Gi=0,Qi=135<b?-Ze-Le:Ze+Le),iv(this,As,Qi,0),yu=0,An===0?(yt=As.Yo,kt=As.kp,Ut=cu.width,gi=cu.height,(yt===null||kt===null||b!==Gd(As))&&(yt=Uc(this,2),kt=Uc(this,2),yt[0].h(0,0),yt[1].h(Ut,0),kt[0].h(0,gi),kt[1].h(Ut,gi))):(sc=Ar(),gi=fx(this,a,As,yt,kt,Ut,gi,sc),yu=gi.x,yt=sc[0],kt=sc[1],Ut=gi.width,gi=gi.height,br(sc),Gi<cu.height&&0>yu&&(Gg(a,0,-yu,so,Ta-1),rv(yt,0,-yu),rv(kt,0,-yu),yu=0)),As.S.h(Qi,yu),ct=Math.max(ct,gi),Ze=Math.max(Ze,ft+(Qn===0?0:Le)+cu.width),Gi=gi;An++}switch(0<Qn&&(y?(ct+=Math.max(0,x),Qi<Ze&&fg(a,oe,Ze-Qi,0,so,re-1),0<De&&(ue||Gg(a,De,0,0,re-1),Ze+=De)):(Ze+=Math.max(0,x),Gi<ct&&fg(a,oe,0,ct-Gi,so,re-1),0<De&&(ue||Gg(a,0,De,0,re-1),ct+=De))),De=ue=0,oe){case Np:y?ue+=Ze/2-a.focus.x-Pe/2:De+=ct/2-a.focus.y-Pe/2;break;case Wg:0<Qn?y?ue+=Ze/2-a.focus.x-Pe/2:De+=ct/2-a.focus.y-Pe/2:y?(Wr=ee[0].S.x+ee[0].la.x,ue+=Wr+(ee[re-1].S.x+ee[re-1].la.x+2*ee[re-1].focus.x-Wr)/2-a.focus.x-Pe/2):(Wr=ee[0].S.y+ee[0].la.y,De+=Wr+(ee[re-1].S.y+ee[re-1].la.y+2*ee[re-1].focus.y-Wr)/2-a.focus.y-Pe/2);break;case Ah:y?(ue-=Pe,Ze+=Pe):(De-=Pe,ct+=Pe);break;case Nh:y?(ue+=Ze-a.width+Pe,Ze+=Pe):(De+=ct-a.height+Pe,ct+=Pe);break;case mf:y?1<re?ue+=Wr+Se/2-a.focus.x:ue+=ee[0].focus.x-a.focus.x+ee[0].la.x:1<re?De+=Wr+Se/2-a.focus.y:De+=ee[0].focus.y-a.focus.y+ee[0].la.y;break;case vf:y?ue+=Ze+Se/2-a.focus.x:De+=ct+Se/2-a.focus.y;break;case Uh:break;default:ct=this.customAlignment(a,ue,De,Ze,ct),ue=ct[0],De=ct[1],Ze=ct[2],ct=ct[3]}for(Pe=0;Pe<re;Pe++)Wr=ee[Pe],y?Wr.S.h(Wr.S.x+Wr.la.x-ue,Wr.S.y+(135<b?(de?-ct:-Wr.Da.height)+Wr.la.y-x:qe+x+Wr.la.y)):Wr.S.h(Wr.S.x+(135<b?(de?-Ze:-Wr.Da.width)+Wr.la.x-x:E+x+Wr.la.x),Wr.S.y+Wr.la.y-De);if(re=ee=0,de?y?(Ze=jy(a,Ze,ue),0>ue&&(ue=0),135<b&&(De+=ct+x),ct+=qe+x,oe===Uh&&(ee+=Se/2+a.focus.x),re+=qe+x):(135<b&&(ue+=Ze+x),Ze+=E+x,ct=zy(a,ct,De),0>De&&(De=0),oe===Uh&&(re+=Se/2+a.focus.y),ee+=E+x):y?(a.comments===null?E>Ze&&(Ze=Gy(oe,E-Ze,0),ee=Ze.x,re=Ze.y,Ze=E,ue=0):Ze=jy(a,Ze,ue),0>ue&&(ee-=ue,ue=0),135<b&&(De+=ct+x),ct=Math.max(Math.max(ct,qe),ct+qe+x),re+=qe+x):(135<b&&(ue+=Ze+x),Ze=Math.max(Math.max(Ze,E),Ze+E+x),a.comments===null?qe>ct&&(ct=Gy(oe,0,qe-ct),ee=ct.x,re=ct.y,ct=qe,De=0):ct=zy(a,ct,De),0>De&&(re-=De,De=0),ee+=E+x),0<Qn)b=Uc(this,4),Qn=Uc(this,4),y?(b[2].h(0,qe+x),b[3].h(b[2].x,ct),Qn[2].h(Ze,b[2].y),Qn[3].h(Qn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Ze,b[2].y),Qn[2].h(b[2].x,ct),Qn[3].h(b[3].x,Qn[2].y));else{for(b=Uc(this,yt.length+2),Qn=Uc(this,kt.length+2),oe=0;oe<yt.length;oe++)de=yt[oe],b[oe+2].h(de.x+ee,de.y+re);for(oe=0;oe<kt.length;oe++)de=kt[oe],Qn[oe+2].h(de.x+ee,de.y+re)}y?(b[0].h(ue,0),b[1].h(b[0].x,qe),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])),Qn[0].h(ue+E,0),Qn[1].h(Qn[0].x,qe),Qn[2].y<Qn[1].y&&(Qn[2].x<Qn[0].x?Qn[2].assign(Qn[1]):Qn[1].assign(Qn[2])),Qn[3].y<Qn[2].y&&(Qn[3].x<Qn[0].x?Qn[3].assign(Qn[2]):Qn[2].assign(Qn[3])),b[2].y-=x/2,Qn[2].y-=x/2):(b[0].h(0,De),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])),Qn[0].h(0,De+qe),Qn[1].h(E,Qn[0].y),Qn[2].x<Qn[1].x&&(Qn[2].y<Qn[0].y?Qn[2].assign(Qn[1]):Qn[1].assign(Qn[2])),Qn[3].x<Qn[2].x&&(Qn[3].y<Qn[0].y?Qn[3].assign(Qn[2]):Qn[2].assign(Qn[3])),b[2].x-=x/2,Qn[2].x-=x/2),$d(this,yt),$d(this,kt),a.Yo=b,a.kp=Qn,a.la.h(ue,De),a.Da.h(Ze,ct)}break;default:Wt("Unhandled compaction value "+a.compaction.toString())}}};function cx(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=Uf(x));var b=Ry(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=Gd(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 ue=y.alignment,de=ue===Ah,pe=ue===Nh;re=Uf(ue);var Se=Math.max(0,y.breadthLimit);oe=a.computeLayerSpacing(y);var Pe=y.nodeSpacing,Le=a.computeNodeIndent(y),De=de||pe?0:Le/2,qe=y.rowSpacing,Ze=0;(de||pe||y.hm||y.im&&y.maxGenerationCount===1)&&(Ze=Math.max(0,y.rowIndent)),de=y.width;var ct=y.height,ft=0,yt=0,kt=0,Ut=0,gi=0,Qi=0,Gi=0,Qn=0,An=0,so=0;if(re&&!bm(ue)&&135<E&&b.reverse(),bm(ue))if(1<ee)for(var Wr=0;Wr<ee;Wr++){var Ta=b[Wr],As=Ta.Da;Wr%2===0&&Wr!==ee-1?An=Math.max(An,(x?As.width:As.height)+a.computeBusNodeSpacing(Ta)-Pe):Wr%2!==0&&(so=Math.max(so,(x?As.width:As.height)+a.computeBusNodeSpacing(Ta)-Pe))}else ee===1&&(An=x?b[0].Da.width:b[0].Da.height);if(re)switch(ue){case mf:case Bh:yt=135>E?dx(a,y,b,An,ft,yt):hx(a,y,b,An,ft,yt),An=yt.x,ft=yt.width,yt=yt.height;break;case vf:for(Se=0;Se<ee;Se++)De=b[Se],kt=De.Da,so=Gi===0?0:qe,x?(De.S.h(z-kt.width,gi+so),ft=Math.max(ft,kt.width),yt=Math.max(yt,gi+so+kt.height),gi+=so+kt.height):(De.S.h(Ut+so,z-kt.height),ft=Math.max(ft,Ut+so+kt.width),yt=Math.max(yt,kt.height),Ut+=so+kt.width),Gi++;break;case Uh:for(z=0;z<ee;z++)Se=b[z],De=Se.Da,kt=Gi===0?0:qe,x?(Se.S.h(Pe/2+y.focus.x,gi+kt),ft=Math.max(ft,De.width),yt=Math.max(yt,gi+kt+De.height),gi+=kt+De.height):(Se.S.h(Ut+kt,Pe/2+y.focus.y),ft=Math.max(ft,Ut+kt+De.width),yt=Math.max(yt,De.height),Ut+=kt+De.width),Gi++}else for(so=0;so<ee;so++)Wr=b[so],Ta=Wr.Da,x?(0<Se&&0<Gi&&Ut+Pe+Ta.width>Se&&(Ut<z&&fg(y,ue,z-Ut,0,Qn,so-1),Qi++,Gi=0,Qn=so,kt=yt,Ut=0,gi=135<E?-yt-qe:yt+qe),As=Gi===0?De:Pe,iv(a,Wr,0,gi),Wr.S.h(Ut+As,gi),ft=Math.max(ft,Ut+As+Ta.width),yt=Math.max(yt,kt+(Qi===0?0:qe)+Ta.height),Ut+=As+Ta.width):(0<Se&&0<Gi&&gi+Pe+Ta.height>Se&&(gi<z&&fg(y,ue,0,z-gi,Qn,so-1),Qi++,Gi=0,Qn=so,kt=ft,gi=0,Ut=135<E?-ft-qe:ft+qe),As=Gi===0?De:Pe,iv(a,Wr,Ut,0),Wr.S.h(Ut,gi+As),yt=Math.max(yt,gi+As+Ta.height),ft=Math.max(ft,kt+(Qi===0?0:qe)+Ta.width),gi+=As+Ta.height),Gi++;switch(0<Qi&&(x?(yt+=Math.max(0,oe),Ut<ft&&fg(y,ue,ft-Ut,0,Qn,ee-1),0<Ze&&(pe||Gg(y,Ze,0,0,ee-1),ft+=Ze)):(ft+=Math.max(0,oe),gi<yt&&fg(y,ue,0,yt-gi,Qn,ee-1),0<Ze&&(pe||Gg(y,0,Ze,0,ee-1),yt+=Ze))),Ze=pe=0,ue){case Np:x?pe+=ft/2-y.focus.x-Le/2:Ze+=yt/2-y.focus.y-Le/2;break;case Wg:0<Qi?x?pe+=ft/2-y.focus.x-Le/2:Ze+=yt/2-y.focus.y-Le/2:x?(a=b[0].S.x+b[0].la.x,pe+=a+(b[ee-1].S.x+b[ee-1].la.x+2*b[ee-1].focus.x-a)/2-y.focus.x-Le/2):(a=b[0].S.y+b[0].la.y,Ze+=a+(b[ee-1].S.y+b[ee-1].la.y+2*b[ee-1].focus.y-a)/2-y.focus.y-Le/2);break;case Ah:x?(pe-=Le,ft+=Le):(Ze-=Le,yt+=Le);break;case Nh:x?(pe+=ft-y.width+Le,ft+=Le):(Ze+=yt-y.height+Le,yt+=Le);break;case mf:case Bh:x?1<ee?pe+=An+Pe/2-y.focus.x:pe+=b[0].focus.x-y.focus.x+b[0].la.x:1<ee?Ze+=An+Pe/2-y.focus.y:Ze+=b[0].focus.y-y.focus.y+b[0].la.y;break;case vf:x?pe+=ft+Pe/2-y.focus.x:Ze+=yt+Pe/2-y.focus.y;break;case Uh:break;default:a=a.customAlignment(y,pe,Ze,ft,yt),pe=a[0],Ze=a[1],ft=a[2],yt=a[3]}for(a=0;a<ee;a++)Le=b[a],x?Le.S.h(Le.S.x+Le.la.x-pe,Le.S.y+(135<E?(re?-yt:-Le.Da.height)+Le.la.y-oe:ct+oe+Le.la.y)):Le.S.h(Le.S.x+(135<E?(re?-ft:-Le.Da.width)+Le.la.x-oe:de+oe+Le.la.x),Le.S.y+Le.la.y-Ze);x?(ft=jy(y,ft,pe),0>pe&&(pe=0),135<E&&(Ze+=yt+oe),yt=Math.max(Math.max(yt,ct),yt+ct+oe)):(135<E&&(pe+=ft+oe),ft=Math.max(Math.max(ft,de),ft+de+oe),yt=zy(y,yt,Ze),0>Ze&&(Ze=0)),y.la.h(pe,Ze),y.Da.h(ft,yt)}}Yo.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function dx(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new ln(E,0,b,z);if(ee===1)return y=x[0],b=y.Da.width,z=y.Da.height,new ln(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=Gd(y)===90,de=0,pe=0,Se=0,Pe=0;Pe<ee;Pe++)if(!(Pe%2!==0||1<ee&&Pe===ee-1)){var Le=x[Pe],De=Le.Da,qe=de===0?0:oe;if(ue){var Ze=a.computeBusNodeSpacing(Le)-re;Le.S.h(E-(De.width+Ze),Se+qe),b=Math.max(b,De.width+Ze),z=Math.max(z,Se+qe+De.height),Se+=qe+De.height}else Ze=a.computeBusNodeSpacing(Le)-re,Le.S.h(pe+qe,E-(De.height+Ze)),z=Math.max(z,De.height+Ze),b=Math.max(b,pe+qe+De.width),pe+=qe+De.width;de++}for(de=0,Le=pe,Pe=Se,ue?(pe=E+re,Se=0):(pe=0,Se=E+re),De=0;De<ee;De++)if(De%2!==0){qe=x[De],Ze=qe.Da;var ct=de===0?0:oe;if(ue){var ft=a.computeBusNodeSpacing(qe)-re;qe.S.h(pe+ft,Se+ct),b=Math.max(b,pe+Ze.width+ft),z=Math.max(z,Se+ct+Ze.height),Se+=ct+Ze.height}else ft=a.computeBusNodeSpacing(qe)-re,qe.S.h(pe+ct,Se+ft),b=Math.max(b,pe+ct+Ze.width),z=Math.max(z,Se+Ze.height+ft),pe+=ct+Ze.width;de++}return 1<ee&&ee%2===1&&(x=x[ee-1],ee=x.Da,a=a.computeBusLastRowSpacing(x,ue?Math.max(Math.abs(Pe),Math.abs(Se)):Math.max(Math.abs(Le),Math.abs(pe))),ue?(x.S.h(E+re/2-x.focus.x-x.la.x,z+a),ue=E+re/2-x.focus.x-x.la.x,b=Math.max(b,ue+ee.width),0>ue&&(b-=ue),z=Math.max(z,Math.max(Pe,Se)+a+ee.height),0>x.S.x&&(E=nv(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(Le,pe)+a+ee.width),Se=E+re/2-x.focus.y-x.la.y,z=Math.max(z,Se+ee.height),0>Se&&(z-=Se),0>x.S.y&&(E=nv(y,x.S.y,!0,E,re)))),new ln(E,0,b,z)}function hx(a,y,x,E,b,z){var ee=x.length;if(ee===0)return new ln(E,0,b,z);if(ee===1)return x=x[0],b=x.Da.width,z=x.Da.height,new ln(E,0,b,z);for(var re=y.nodeSpacing,oe=y.rowSpacing,ue=Gd(y)===270,de=0,pe=0,Se=0,Pe=0;Pe<ee;Pe++)if(!(Pe%2!==0||1<ee&&Pe===ee-1)){var Le=x[Pe],De=Le.Da,qe=de===0?0:oe;if(ue){var Ze=a.computeBusNodeSpacing(Le)-re;Se-=qe+De.height,Le.S.h(E-(De.width+Ze),Se),b=Math.max(b,De.width+Ze),z=Math.max(z,Math.abs(Se))}else Ze=a.computeBusNodeSpacing(Le)-re,pe-=qe+De.width,Le.S.h(pe,E-(De.height+Ze)),z=Math.max(z,De.height+Ze),b=Math.max(b,Math.abs(pe));de++}for(de=0,Le=pe,Pe=Se,ue?(pe=E+re,Se=0):(pe=0,Se=E+re),De=0;De<ee;De++)if(De%2!==0){qe=x[De],Ze=qe.Da;var ct=de===0?0:oe;if(ue){var ft=a.computeBusNodeSpacing(qe)-re;Se-=ct+Ze.height,qe.S.h(pe+ft,Se),b=Math.max(b,pe+Ze.width+ft),z=Math.max(z,Math.abs(Se))}else ft=a.computeBusNodeSpacing(qe)-re,pe-=ct+Ze.width,qe.S.h(pe,Se+ft),z=Math.max(z,Se+Ze.height+ft),b=Math.max(b,Math.abs(pe));de++}for(1<ee&&ee%2===1&&(oe=x[ee-1],de=oe.Da,a=a.computeBusLastRowSpacing(oe,ue?Math.max(Math.abs(Pe),Math.abs(Se)):Math.max(Math.abs(Le),Math.abs(pe))),ue?(oe.S.h(E+re/2-oe.focus.x-oe.la.x,-z-de.height-a),pe=E+re/2-oe.focus.x-oe.la.x,b=Math.max(b,pe+de.width),0>pe&&(b-=pe),z=Math.max(z,Math.abs(Math.min(Pe,Se))+a+de.height),0>oe.S.x&&(E=nv(y,oe.S.x,!1,E,re))):(oe.S.h(-b-de.width-a,E+re/2-oe.focus.y-oe.la.y),b=Math.max(b,Math.abs(Math.min(Le,pe))+a+de.width),Se=E+re/2-oe.focus.y-oe.la.y,z=Math.max(z,Se+de.height),0>Se&&(z-=Se),0>oe.S.y&&(E=nv(y,oe.S.y,!0,E,re)))),y=0;y<ee;y++)re=x[y],ue?re.S.h(re.S.x,re.S.y+z):re.S.h(re.S.x+b,re.S.y);return new ln(E,0,b,z)}Yo.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Yo.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function nv(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 jy(a,y,x){switch(a.alignment){case Wg:case Np:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case Ah:return a.width>y?a.width:y;case Nh:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case mf:case Bh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case vf:return a.width-a.focus.x+a.nodeSpacing/2+y;case Uh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function zy(a,y,x){switch(a.alignment){case Wg:case Np:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case Ah:return a.height>y?a.height:y;case Nh:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case mf:case Bh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case vf:return a.height-a.focus.y+a.nodeSpacing/2+y;case Uh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Gy(a,y,x){switch(a){case Np:y/=2,x/=2;break;case Wg:y/=2,x/=2;break;case Ah:x=y=0;break;case Nh:break;default:Wt("Unhandled alignment value "+a.toString())}return new tt(y,x)}function fg(a,y,x,E,b,z){y=Gy(y,x,E),Gg(a,y.x,y.y,b,z)}function Gg(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 iv(a,y,x,E){var b=y.parent;switch(a.ud){case Mh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Hg:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:Wt("Unhandled path value "+a.ud.toString())}}function rv(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function fx(a,y,x,E,b,z,ee,re){var oe=Gd(y),ue=oe===90||oe===270,de=y.nodeSpacing;y=E;var pe=b;E=z;var Se=ee,Pe=x.Yo,Le=x.kp;ee=x.Da;var De=ue?Math.max(Se,ee.height):Math.max(E,ee.width);if((Pe===null||oe!==Gd(x))&&(Pe=Uc(a,2),Le=Uc(a,2),ue?(Pe[0].h(0,0),Pe[1].h(0,ee.height),Le[0].h(ee.width,0),Le[1].h(Le[0].x,Pe[1].y)):(Pe[0].h(0,0),Pe[1].h(ee.width,0),Le[0].h(0,ee.height),Le[1].h(Pe[1].x,Le[0].y))),ue){if(Se=9999999,!(pe===null||2>pe.length||Pe===null||2>Pe.length))for(b=x=0;x<pe.length&&b<Pe.length;){z=pe[x];var qe=Pe[b];oe=qe.x,ue=qe.y,oe+=E;var Ze=z;x+1<pe.length&&(Ze=pe[x+1]);var ct=qe;qe=ct.x,ct=ct.y,b+1<Pe.length&&(ct=Pe[b+1],qe=ct.x,ct=ct.y,qe+=E);var ft=Se;z.y===ue?ft=oe-z.x:z.y>ue&&z.y<ct?ft=oe+(z.y-ue)/(ct-ue)*(qe-oe)-z.x:ue>z.y&&ue<Ze.y&&(ft=oe-(z.x+(ue-z.y)/(Ze.y-z.y)*(Ze.x-z.x))),ft<Se&&(Se=ft),Ze.y<=z.y?x++:ct<=ue?b++:(Ze.y<=ct&&x++,ct<=Ze.y&&b++)}if(Se=E-Se,Se+=de,x=Pe,b=Se,y===null||2>y.length||x===null||2>x.length)E=null;else{for(de=Uc(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].y<y[0].y;)ue=x[z++],de[E++].h(ue.x+b,ue.y);for(;oe<y.length;)ue=y[oe++],de[E++].h(ue.x,ue.y);for(oe=y[y.length-1].y;z<x.length&&x[z].y<=oe;)z++;for(;z<x.length&&x[z].y>oe;)ue=x[z++],de[E++].h(ue.x+b,ue.y);for(x=Uc(a,E),oe=0;oe<E;oe++)x[oe].assign(de[oe]);$d(a,de),E=x}if(z=Le,oe=Se,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(de=Uc(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].y<z[0].y;)Ze=pe[x++],de[b++].h(Ze.x,Ze.y);for(;ue<z.length;)Ze=z[ue++],de[b++].h(Ze.x+oe,Ze.y);for(z=z[z.length-1].y;x<pe.length&&pe[x].y<=z;)x++;for(;x<pe.length&&pe[x].y>z;)oe=pe[x++],de[b++].h(oe.x,oe.y);for(z=Uc(a,b),x=0;x<b;x++)z[x].assign(de[x]);$d(a,de),b=z}return z=Math.max(0,Se)+ee.width,ee=De,$d(a,y),$d(a,Pe),$d(a,pe),$d(a,Le),re[0]=E,re[1]=b,new ln(Se,0,z,ee)}if(E=9999999,!(pe===null||2>pe.length||Pe===null||2>Pe.length))for(b=x=0;x<pe.length&&b<Pe.length;)z=pe[x],qe=Pe[b],oe=qe.x,ue=qe.y,ue+=Se,Ze=z,x+1<pe.length&&(Ze=pe[x+1]),ct=qe,qe=ct.x,ct=ct.y,b+1<Pe.length&&(ct=Pe[b+1],qe=ct.x,ct=ct.y,ct+=Se),ft=E,z.x===oe?ft=ue-z.y:z.x>oe&&z.x<qe?ft=ue+(z.x-oe)/(qe-oe)*(ct-ue)-z.y:oe>z.x&&oe<Ze.x&&(ft=ue-(z.y+(oe-z.x)/(Ze.x-z.x)*(Ze.y-z.y))),ft<E&&(E=ft),Ze.x<=z.x?x++:qe<=oe?b++:(Ze.x<=qe&&x++,qe<=Ze.x&&b++);if(Se-=E,Se+=de,x=Pe,b=Se,y===null||2>y.length||x===null||2>x.length)E=null;else{for(de=Uc(a,y.length+x.length),E=z=oe=0;z<x.length&&x[z].x<y[0].x;)ue=x[z++],de[E++].h(ue.x,ue.y+b);for(;oe<y.length;)ue=y[oe++],de[E++].h(ue.x,ue.y);for(oe=y[y.length-1].x;z<x.length&&x[z].x<=oe;)z++;for(;z<x.length&&x[z].x>oe;)ue=x[z++],de[E++].h(ue.x,ue.y+b);for(x=Uc(a,E),oe=0;oe<E;oe++)x[oe].assign(de[oe]);$d(a,de),E=x}if(z=Le,oe=Se,pe===null||2>pe.length||z===null||2>z.length)b=null;else{for(de=Uc(a,pe.length+z.length),b=ue=x=0;x<pe.length&&pe[x].x<z[0].x;)Ze=pe[x++],de[b++].h(Ze.x,Ze.y);for(;ue<z.length;)Ze=z[ue++],de[b++].h(Ze.x,Ze.y+oe);for(z=z[z.length-1].x;x<pe.length&&pe[x].x<=z;)x++;for(;x<pe.length&&pe[x].x>z;)oe=pe[x++],de[b++].h(oe.x,oe.y);for(z=Uc(a,b),x=0;x<b;x++)z[x].assign(de[x]);$d(a,de),b=z}return z=De,ee=Math.max(0,Se)+ee.height,$d(a,y),$d(a,Pe),$d(a,pe),$d(a,Le),re[0]=E,re[1]=b,new ln(Se,0,z,ee)}function Uc(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 tt;return a}function $d(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Yo.prototype.arrangeTrees=function(){if(this.Rb===uv)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof Md){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),Hy(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof Md&&a.push(x);switch(this.sorting){case Ap:break;case Fm:a.reverse();break;case Lm:a.sort(this.comparer);break;case Mm:a.sort(this.comparer),a.reverse();break;default:Wt("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(Hy(this,b,y+b.la.x,x+b.la.y),this.Rb){case lv:x+=b.Da.height+this.$d.height;break;case Uy:y+=b.Da.width+this.$d.width;break;default:Wt("Unhandled arrangement value "+this.Rb.toString())}}}};function Hy(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];Hy(a,ee,x+ee.S.x,E+ee.S.y)}}}Yo.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Yo.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Yo.prototype.Gu=function(){if(this.layerStyle===cv){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 tt(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new tt(-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 ln(0,z,x,re))):this.angle===90?(b.push(new ln(0,z,x,re)),z+=re):this.angle===180?(z-=re,b.push(new ln(z,0,re,x))):(b.push(new ln(z,0,re,x)),z+=re)}this.commitLayers(b,E)}},Yo.prototype.commitLayers=function(){},Yo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Yo.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof Md&&gx(this,y)}};function gx(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)gx(a,y[E])}}Yo.prototype.setPortSpots=function(a){var y=a.alignment;if(Uf(y)){var x=this.ud===Mh,E=Gd(a);switch(E){case 0:var b=Ho;break;case 90:b=zr;break;case 180:b=za;break;default:b=ha}var z=a.children,ee=z.length;switch(y){case mf:case Bh: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?za:ha;if(ee===1||y===ee-1&&ee%2===1)switch(E){case 0:oe=za;break;case 90:oe=ha;break;case 180:oe=Ho;break;default:oe=zr}else y%2===0&&(oe=E===90||E===270?Ho:zr);x?(a.setsPortSpot&&(re.fromSpot=b),a.setsChildPortSpot&&(re.toSpot=oe)):(a.setsPortSpot&&(re.fromSpot=oe),a.setsChildPortSpot&&(re.toSpot=b))}}break;case vf:for(E=E===90||E===270?Ho:zr,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 Uh:for(E=E===90||E===270?za:ha,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=Gd(a),this.ud===Mh){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=Ho;break;case 90:E.fromSpot=zr;break;case 180:E.fromSpot=za;break;default:E.fromSpot=ha}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=za;break;case 90:E.toSpot=ha;break;case 180:E.toSpot=Ho;break;default:E.toSpot=zr}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=Ho;break;case 90:E.toSpot=zr;break;case 180:E.toSpot=za;break;default:E.toSpot=ha}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=za;break;case 90:E.fromSpot=ha;break;case 180:E.fromSpot=Ho;break;default:E.fromSpot=zr}else E.fromSpot=a.childPortSpot}};function Gd(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Yo.prototype.computeLayerSpacing=function(a){var y=Gd(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},Yo.prototype.computeNodeIndent=function(a){var y=Gd(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)},dn.Object.defineProperties(Yo.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!==sv&&a!==Zy&&a!==Wy&&a!==Vy||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==Ky&&a!==Yy&&a!==cv||(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!==lv&&a!==Uy&&a!==uv||(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!==Ap&&a!==Fm&&a!==Lm&&!Mm||(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()):Wt("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!==av&&a!==Am||(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!==Ap&&a!==Fm&&a!==Lm&&!Mm||(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!==av&&a!==Am||(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 ov=new Qt(Yo,"PathDefault",-1),Mh=new Qt(Yo,"PathDestination",0),Hg=new Qt(Yo,"PathSource",1),Ap=new Qt(Yo,"SortingForwards",10),Fm=new Qt(Yo,"SortingReverse",11),Lm=new Qt(Yo,"SortingAscending",12),Mm=new Qt(Yo,"SortingDescending",13),Np=new Qt(Yo,"AlignmentCenterSubtrees",20),Wg=new Qt(Yo,"AlignmentCenterChildren",21),Ah=new Qt(Yo,"AlignmentStart",22),Nh=new Qt(Yo,"AlignmentEnd",23),mf=new Qt(Yo,"AlignmentBus",24),Bh=new Qt(Yo,"AlignmentBusBranching",25),vf=new Qt(Yo,"AlignmentTopLeftBus",26),Uh=new Qt(Yo,"AlignmentBottomRightBus",27),av=new Qt(Yo,"CompactionNone",30),Am=new Qt(Yo,"CompactionBlock",31),sv=new Qt(Yo,"StyleLayered",40),Wy=new Qt(Yo,"StyleLastParents",41),Zy=new Qt(Yo,"StyleAlternating",42),Vy=new Qt(Yo,"StyleRootOnly",43),lv=new Qt(Yo,"ArrangementVertical",50),Uy=new Qt(Yo,"ArrangementHorizontal",51),uv=new Qt(Yo,"ArrangementFixedRoots",52),Ky=new Qt(Yo,"LayerIndividual",60),Yy=new Qt(Yo,"LayerSiblings",61),cv=new Qt(Yo,"LayerUniform",62);Yo.className="TreeLayout",Yo.PathDefault=ov,Yo.PathDestination=Mh,Yo.PathSource=Hg,Yo.SortingForwards=Ap,Yo.SortingReverse=Fm,Yo.SortingAscending=Lm,Yo.SortingDescending=Mm,Yo.AlignmentCenterSubtrees=Np,Yo.AlignmentCenterChildren=Wg,Yo.AlignmentStart=Ah,Yo.AlignmentEnd=Nh,Yo.AlignmentBus=mf,Yo.AlignmentBusBranching=Bh,Yo.AlignmentTopLeftBus=vf,Yo.AlignmentBottomRightBus=Uh,Yo.CompactionNone=av,Yo.CompactionBlock=Am,Yo.StyleLayered=sv,Yo.StyleLastParents=Wy,Yo.StyleAlternating=Zy,Yo.StyleRootOnly=Vy,Yo.ArrangementVertical=lv,Yo.ArrangementHorizontal=Uy,Yo.ArrangementFixedRoots=uv,Yo.LayerIndividual=Ky,Yo.LayerSiblings=Yy,Yo.LayerUniform=cv;function Zg(a){ks.call(this,a)}It(Zg,ks),Zg.prototype.createVertex=function(){return new Md(this)},Zg.prototype.createEdge=function(){return new Bp(this)},Zg.className="TreeNetwork";function Md(a){$l.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 tt(0,0),this.Da=new Fn(0,0),this.la=new tt(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Ap,this.hd=gy,this.Kb=0,this.Jb=Wg,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=Am,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=qi,this.wr=!0,this.Dp=qi}It(Md,$l),Md.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)},dn.Object.defineProperties(Md.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)}}}),Md.className="TreeVertex";function Bp(a){td.call(this,a),this.$t=new tt(0,0)}It(Bp,td),Bp.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 Mh:x=this.fromVertex,E=this.toVertex;break;case Hg:x=this.toVertex,E=this.fromVertex;break;default:Wt("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=Gd(x),ee=y.computeLayerSpacing(x),re=x.rowSpacing;a.vg();var oe=a.curve===cd,ue=a.isOrthogonal,de;if(a.uh(),ue||oe){for(de=2;4<a.pointsCount;)a.pv(2);var pe=a.i(1),Se=a.i(2)}else{for(de=1;3<a.pointsCount;)a.pv(1);pe=a.i(0),Se=a.i(a.pointsCount-1)}var Pe=a.i(a.pointsCount-1);z===0?(x.alignment===Nh?(z=E.bottom+b.y,b.y===0&&pe.y>Pe.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===Ah?(z=E.top+b.y,b.y===0&&pe.y<Pe.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.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(de,pe.x,z),de++,a.m(de,E.right+ee,z),de++,a.m(de,E.right+ee+(b.x-re)/3,z),de++,a.m(de,E.right+ee+2*(b.x-re)/3,z),de++,a.m(de,E.right+ee+(b.x-re),z),de++,a.m(de,Se.x,z)):(ue&&(a.m(de,E.right+ee/2,pe.y),de++),a.m(de,E.right+ee/2,z),de++,a.m(de,E.right+ee+b.x-(ue?re/2:re),z),de++,ue&&a.m(de,a.i(de-1).x,Se.y))):z===90?(x.alignment===Nh?(z=E.right+b.x,b.x===0&&pe.x>Pe.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===Ah?(z=E.left+b.x,b.x===0&&pe.x<Pe.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.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(de,z,pe.y),de++,a.m(de,z,E.bottom+ee),de++,a.m(de,z,E.bottom+ee+(b.y-re)/3),de++,a.m(de,z,E.bottom+ee+2*(b.y-re)/3),de++,a.m(de,z,E.bottom+ee+(b.y-re)),de++,a.m(de,z,Se.y)):(ue&&(a.m(de,pe.x,E.bottom+ee/2),de++),a.m(de,z,E.bottom+ee/2),de++,a.m(de,z,E.bottom+ee+b.y-(ue?re/2:re)),de++,ue&&a.m(de,Se.x,a.i(de-1).y))):z===180?(x.alignment===Nh?(z=E.bottom+b.y,b.y===0&&pe.y>Pe.y+x.rowIndent&&(z=Math.min(z,Math.max(pe.y,z-y.computeNodeIndent(x))))):x.alignment===Ah?(z=E.top+b.y,b.y===0&&pe.y<Pe.y-x.rowIndent&&(z=Math.max(z,Math.min(pe.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(de,pe.x,z),de++,a.m(de,E.left-ee,z),de++,a.m(de,E.left-ee+(b.x+re)/3,z),de++,a.m(de,E.left-ee+2*(b.x+re)/3,z),de++,a.m(de,E.left-ee+(b.x+re),z),de++,a.m(de,Se.x,z)):(ue&&(a.m(de,E.left-ee/2,pe.y),de++),a.m(de,E.left-ee/2,z),de++,a.m(de,E.left-ee+b.x+(ue?re/2:re),z),de++,ue&&a.m(de,a.i(de-1).x,Se.y))):z===270?(x.alignment===Nh?(z=E.right+b.x,b.x===0&&pe.x>Pe.x+x.rowIndent&&(z=Math.min(z,Math.max(pe.x,z-y.computeNodeIndent(x))))):x.alignment===Ah?(z=E.left+b.x,b.x===0&&pe.x<Pe.x-x.rowIndent&&(z=Math.max(z,Math.min(pe.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(de,z,pe.y),de++,a.m(de,z,E.top-ee),de++,a.m(de,z,E.top-ee+(b.y+re)/3),de++,a.m(de,z,E.top-ee+2*(b.y+re)/3),de++,a.m(de,z,E.top-ee+(b.y+re)),de++,a.m(de,z,Se.y)):(ue&&(a.m(de,pe.x,E.top-ee/2),de++),a.m(de,z,E.top-ee/2),de++,a.m(de,z,E.top-ee+b.y+(ue?re/2:re)),de++,ue&&a.m(de,Se.x,a.i(de-1).y))):Wt("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=Gd(x),y!==Gd(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===cd,b=a.isOrthogonal,E=Uf(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()))}}},dn.Object.defineProperties(Bp.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)}}}),Bp.className="TreeEdge",jo.prototype.initializeStandardTools=function(){this.gb("Action",new Dn,this.mouseDownTools),this.gb("Relinking",new Qo,this.mouseDownTools),this.gb("LinkReshaping",new ui,this.mouseDownTools),this.gb("Rotating",new Xt,this.mouseDownTools),this.gb("Resizing",new gt,this.mouseDownTools),this.gb("Linking",new ho,this.mouseMoveTools),this.gb("Dragging",new uo,this.mouseMoveTools),this.gb("DragSelecting",new yi,this.mouseMoveTools),this.gb("Panning",new ai,this.mouseMoveTools),this.gb("ContextMenu",new Pr,this.mouseUpTools),this.gb("TextEditing",new or,this.mouseUpTools),this.gb("ClickCreating",new di,this.mouseUpTools),this.gb("ClickSelecting",new vn,this.mouseUpTools)},lh("Horizontal",new jm),lh("Spot",new Gm),lh("Table",new Wm),lh("Viewbox",new Um),lh("TableRow",new Zm),lh("TableColumn",new Vm),lh("Graduated",new Vp),lh("Grid",new Zp),ig.add("GraphLinksModel",vu),ig.add("TreeModel",vd);var dv=Kt.go,Xy={get licenseKey(){return Gt.licenseKey},set licenseKey(a){Gt.licenseKey=a},get version(){return Gt.version},Group:po,EnumValue:Qt,List:Un,Set:zn,Map:sr,Point:tt,Size:Fn,Rect:ln,Margin:oo,Spot:fr,Geometry:dt,PathFigure:Vr,PathSegment:mr,InputEvent:yr,DiagramEvent:vo,ChangedEvent:Xi,Model:ar,GraphLinksModel:Sa,TreeModel:yc,Binding:Tl,Transaction:Fs,UndoManager:Kr,CommandHandler:$e,Tool:Fo,DraggingTool:uo,DraggingInfo:Zd,DraggingOptions:ae,LinkingBaseTool:bi,LinkingTool:ho,RelinkingTool:Qo,LinkReshapingTool:ui,ResizingTool:gt,RotatingTool:Xt,ClickSelectingTool:vn,ActionTool:Dn,ClickCreatingTool:di,HTMLInfo:Hi,ContextMenuTool:Pr,DragSelectingTool:yi,PanningTool:ai,TextEditingTool:or,ToolManager:jo,Animation:Us,AnimationManager:hs,AnimationTrigger:Pl,Layer:Ko,Diagram:Gt,Palette:fe,Overview:me,Brush:Ca,GraphObject:Dt,Panel:Vn,RowColumnDefinition:Kl,Shape:bo,TextBlock:Bs,Picture:Nc,Part:xr,Adornment:Fa,Node:xi,Link:Jn,Placeholder:gc,Layout:qs,LayoutNetwork:ks,LayoutVertex:$l,LayoutEdge:td,GridLayout:Fu,PanelLayout:Jl,CircularLayout:hl,CircularNetwork:Fp,CircularVertex:Sm,CircularEdge:V0,ForceDirectedLayout:Gu,ForceDirectedNetwork:zg,ForceDirectedVertex:xm,ForceDirectedEdge:wm,LayeredDigraphLayout:os,LayeredDigraphNetwork:Mp,LayeredDigraphVertex:Sd,LayeredDigraphEdge:Cm,TreeLayout:Yo,TreeNetwork:Zg,TreeVertex:Md,TreeEdge:Bp};typeof dv=="object"&&dv.version&&Ro("WARNING: a `go` object on the root object is already defined. "+("Debug"in dv?"debug ":"")+"version: "+dv.version+", replaced with version: "+Xy.version),Gt.prototype.go=Xy,Kt.go=Xy,typeof Rn.exports=="object"&&(Rn.exports=typeof be.g!="undefined"?be.g.go:self.go)}();var le=typeof be.g!="undefined"?be.g.go:self.go;const Xe=typeof be.g!="undefined"?be.g.go:self.go,Lt=Xe.Group,At=Xe.EnumValue,wt=Xe.List,_e=Xe.Set,Ve=Xe.Map,xt=Xe.Point,ut=Xe.Size,pt=Xe.Rect,Rt=Xe.Margin,Ot=Xe.Spot,jt=Xe.Geometry,Te=Xe.PathFigure,ne=Xe.PathSegment,te=Xe.InputEvent,ce=Xe.DiagramEvent,se=Xe.ChangedEvent,ge=Xe.Model,ye=Xe.GraphLinksModel,we=Xe.TreeModel,Ce=Xe.Binding,Re=Xe.Transaction,We=Xe.UndoManager,lt=Xe.CommandHandler,ht=Xe.Tool,nt=Xe.DraggingTool,mt=Xe.DraggingInfo,at=Xe.LinkingBaseTool,Pt=Xe.LinkingTool,Nt=Xe.RelinkingTool,Et=Xe.LinkReshapingTool,Ln=Xe.ResizingTool,xn=Xe.RotatingTool,Nn=Xe.ClickSelectingTool,fn=Xe.ActionTool,Qe=Xe.ClickCreatingTool,Ke=Xe.HTMLInfo,Je=Xe.ContextMenuTool,_n=Xe.DragSelectingTool,Xn=Xe.PanningTool,zt=Xe.TextEditingTool,kn=Xe.ToolManager,bn=Xe.Animation,oi=Xe.AnimationManager,Yt=Xe.AnimationTrigger,Mt=Xe.Layer,_t=Xe.Diagram,mn=Xe.Palette,rn=Xe.Overview,He=Xe.Brush,Me=Xe.GraphObject,Fe=Xe.Panel,Oe=Xe.RowColumnDefinition,Ue=Xe.Shape,Be=Xe.TextBlock,ot=Xe.TextBlockMetrics,Cn=Xe.Picture,ci=Xe.Part,si=Xe.Adornment,pn=Xe.Node,qn=Xe.Link,en=Xe.Placeholder,wi=Xe.Layout,Si=Xe.LayoutNetwork,Di=Xe.LayoutVertex,Ti=Xe.LayoutEdge,ro=Xe.GridLayout,Zr=Xe.PanelLayout,Fi=Xe.CircularLayout,mi=Xe.CircularNetwork,Co=Xe.CircularVertex,jn=Xe.CircularEdge,yn=Xe.ForceDirectedLayout,Jr=Xe.ForceDirectedNetwork,lo=Xe.ForceDirectedVertex,hr=Xe.ForceDirectedEdge,Nr=Xe.LayeredDigraphLayout,Xo=Xe.LayeredDigraphNetwork,ji=Xe.LayeredDigraphVertex,Mi=Xe.LayeredDigraphEdge,Oi=Xe.TreeLayout,vr=Xe.TreeNetwork,Dr=Xe.TreeVertex,Cr=Xe.TreeEdge,En=Xe.version},19575:function(Rn,$n,be){var le,Xe;(function(Lt,At){Rn.exports=At(Lt)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof be.g!="undefined"?be.g:this,function(Lt){"use strict";Lt=Lt||{};var At=Lt.Base64,wt="2.6.4",_e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ve=function(Nt){for(var Et={},Ln=0,xn=Nt.length;Ln<xn;Ln++)Et[Nt.charAt(Ln)]=Ln;return Et}(_e),xt=String.fromCharCode,ut=function(Nt){if(Nt.length<2){var Et=Nt.charCodeAt(0);return Et<128?Nt:Et<2048?xt(192|Et>>>6)+xt(128|Et&63):xt(224|Et>>>12&15)+xt(128|Et>>>6&63)+xt(128|Et&63)}else{var Et=65536+(Nt.charCodeAt(0)-55296)*1024+(Nt.charCodeAt(1)-56320);return xt(240|Et>>>18&7)+xt(128|Et>>>12&63)+xt(128|Et>>>6&63)+xt(128|Et&63)}},pt=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Rt=function(Nt){return Nt.replace(pt,ut)},Ot=function(Nt){var Et=[0,2,1][Nt.length%3],Ln=Nt.charCodeAt(0)<<16|(Nt.length>1?Nt.charCodeAt(1):0)<<8|(Nt.length>2?Nt.charCodeAt(2):0),xn=[_e.charAt(Ln>>>18),_e.charAt(Ln>>>12&63),Et>=2?"=":_e.charAt(Ln>>>6&63),Et>=1?"=":_e.charAt(Ln&63)];return xn.join("")},jt=Lt.btoa&&typeof Lt.btoa=="function"?function(Nt){return Lt.btoa(Nt)}:function(Nt){if(Nt.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Nt.replace(/[\s\S]{1,3}/g,Ot)},Te=function(Nt){return jt(Rt(String(Nt)))},ne=function(Nt){return Nt.replace(/[+\/]/g,function(Et){return Et=="+"?"-":"_"}).replace(/=/g,"")},te=function(Nt,Et){return Et?ne(Te(Nt)):Te(Nt)},ce=function(Nt){return te(Nt,!0)},se;Lt.Uint8Array&&(se=function(Nt,Et){for(var Ln="",xn=0,Nn=Nt.length;xn<Nn;xn+=3){var fn=Nt[xn],Qe=Nt[xn+1],Ke=Nt[xn+2],Je=fn<<16|Qe<<8|Ke;Ln+=_e.charAt(Je>>>18)+_e.charAt(Je>>>12&63)+(typeof Qe!="undefined"?_e.charAt(Je>>>6&63):"=")+(typeof Ke!="undefined"?_e.charAt(Je&63):"=")}return Et?ne(Ln):Ln});var ge=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ye=function(Nt){switch(Nt.length){case 4:var Et=(7&Nt.charCodeAt(0))<<18|(63&Nt.charCodeAt(1))<<12|(63&Nt.charCodeAt(2))<<6|63&Nt.charCodeAt(3),Ln=Et-65536;return xt((Ln>>>10)+55296)+xt((Ln&1023)+56320);case 3:return xt((15&Nt.charCodeAt(0))<<12|(63&Nt.charCodeAt(1))<<6|63&Nt.charCodeAt(2));default:return xt((31&Nt.charCodeAt(0))<<6|63&Nt.charCodeAt(1))}},we=function(Nt){return Nt.replace(ge,ye)},Ce=function(Nt){var Et=Nt.length,Ln=Et%4,xn=(Et>0?Ve[Nt.charAt(0)]<<18:0)|(Et>1?Ve[Nt.charAt(1)]<<12:0)|(Et>2?Ve[Nt.charAt(2)]<<6:0)|(Et>3?Ve[Nt.charAt(3)]:0),Nn=[xt(xn>>>16),xt(xn>>>8&255),xt(xn&255)];return Nn.length-=[0,0,2,1][Ln],Nn.join("")},Re=Lt.atob&&typeof Lt.atob=="function"?function(Nt){return Lt.atob(Nt)}:function(Nt){return Nt.replace(/\S{1,4}/g,Ce)},We=function(Nt){return Re(String(Nt).replace(/[^A-Za-z0-9\+\/]/g,""))},lt=function(Nt){return we(Re(Nt))},ht=function(Nt){return String(Nt).replace(/[-_]/g,function(Et){return Et=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},nt=function(Nt){return lt(ht(Nt))},mt;Lt.Uint8Array&&(mt=function(Nt){return Uint8Array.from(We(ht(Nt)),function(Et){return Et.charCodeAt(0)})});var at=function(){var Nt=Lt.Base64;return Lt.Base64=At,Nt};if(Lt.Base64={VERSION:wt,atob:We,btoa:jt,fromBase64:nt,toBase64:te,utob:Rt,encode:te,encodeURI:ce,btou:we,decode:nt,noConflict:at,fromUint8Array:se,toUint8Array:mt},typeof Object.defineProperty=="function"){var Pt=function(Nt){return{value:Nt,enumerable:!1,writable:!0,configurable:!0}};Lt.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Pt(function(){return nt(this)})),Object.defineProperty(String.prototype,"toBase64",Pt(function(Nt){return te(this,Nt)})),Object.defineProperty(String.prototype,"toBase64URI",Pt(function(){return te(this,!0)}))}}return Lt.Meteor&&(Base64=Lt.Base64),Rn.exports?Rn.exports.Base64=Lt.Base64:(le=[],Xe=function(){return Lt.Base64}.apply($n,le),Xe!==void 0&&(Rn.exports=Xe)),{Base64:Lt.Base64}})},15979:function(Rn,$n,be){"use strict";be.d($n,{hP:function(){return rn}});var le=function(He,Me){return(le=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Fe,Oe){Fe.__proto__=Oe}||function(Fe,Oe){for(var Ue in Oe)Object.prototype.hasOwnProperty.call(Oe,Ue)&&(Fe[Ue]=Oe[Ue])})(He,Me)};function Xe(He,Me){function Fe(){this.constructor=He}le(He,Me),He.prototype=Me===null?Object.create(Me):(Fe.prototype=Me.prototype,new Fe)}function Lt(He,Me,Fe,Oe){return new(Fe||(Fe=Promise))(function(Ue,Be){function ot(si){try{ci(Oe.next(si))}catch(pn){Be(pn)}}function Cn(si){try{ci(Oe.throw(si))}catch(pn){Be(pn)}}function ci(si){var pn;si.done?Ue(si.value):(pn=si.value,pn instanceof Fe?pn:new Fe(function(qn){qn(pn)})).then(ot,Cn)}ci((Oe=Oe.apply(He,Me||[])).next())})}function At(He,Me){var Fe,Oe,Ue,Be,ot={label:0,sent:function(){if(1&Ue[0])throw Ue[1];return Ue[1]},trys:[],ops:[]};return Be={next:Cn(0),throw:Cn(1),return:Cn(2)},typeof Symbol=="function"&&(Be[Symbol.iterator]=function(){return this}),Be;function Cn(ci){return function(si){return function(pn){if(Fe)throw new TypeError("Generator is already executing.");for(;ot;)try{if(Fe=1,Oe&&(Ue=2&pn[0]?Oe.return:pn[0]?Oe.throw||((Ue=Oe.return)&&Ue.call(Oe),0):Oe.next)&&!(Ue=Ue.call(Oe,pn[1])).done)return Ue;switch(Oe=0,Ue&&(pn=[2&pn[0],Ue.value]),pn[0]){case 0:case 1:Ue=pn;break;case 4:return ot.label++,{value:pn[1],done:!1};case 5:ot.label++,Oe=pn[1],pn=[0];continue;case 7:pn=ot.ops.pop(),ot.trys.pop();continue;default:if(Ue=ot.trys,!((Ue=Ue.length>0&&Ue[Ue.length-1])||pn[0]!==6&&pn[0]!==2)){ot=0;continue}if(pn[0]===3&&(!Ue||pn[1]>Ue[0]&&pn[1]<Ue[3])){ot.label=pn[1];break}if(pn[0]===6&&ot.label<Ue[1]){ot.label=Ue[1],Ue=pn;break}if(Ue&&ot.label<Ue[2]){ot.label=Ue[2],ot.ops.push(pn);break}Ue[2]&&ot.ops.pop(),ot.trys.pop();continue}pn=Me.call(He,ot)}catch(qn){pn=[6,qn],Oe=0}finally{Fe=Ue=0}if(5&pn[0])throw pn[1];return{value:pn[0]?pn[1]:void 0,done:!0}}([ci,si])}}}function wt(){for(var He=0,Me=0,Fe=arguments.length;Me<Fe;Me++)He+=arguments[Me].length;var Oe=Array(He),Ue=0;for(Me=0;Me<Fe;Me++)for(var Be=arguments[Me],ot=0,Cn=Be.length;ot<Cn;ot++,Ue++)Oe[Ue]=Be[ot];return Oe}var _e=function(){function He(){}return He.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},He.setAttributes=function(Me,Fe){for(var Oe=0,Ue=Fe;Oe<Ue.length;Oe++){var Be=Ue[Oe],ot=Be[0],Cn=Be[1];Me.setAttribute(ot,Cn)}},He.createRect=function(Me,Fe,Oe){var Ue=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ue.setAttribute("width",Me.toString()),Ue.setAttribute("height",Fe.toString()),Oe&&He.setAttributes(Ue,Oe),Ue},He.createLine=function(Me,Fe,Oe,Ue,Be){var ot=document.createElementNS("http://www.w3.org/2000/svg","line");return ot.setAttribute("x1",Me.toString()),ot.setAttribute("y1",Fe.toString()),ot.setAttribute("x2",Oe.toString()),ot.setAttribute("y2",Ue.toString()),Be&&He.setAttributes(ot,Be),ot},He.createPolygon=function(Me,Fe){var Oe=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Oe.setAttribute("points",Me),Fe&&He.setAttributes(Oe,Fe),Oe},He.createCircle=function(Me,Fe){var Oe=document.createElementNS("http://www.w3.org/2000/svg","circle");return Oe.setAttribute("cx",(Me/2).toString()),Oe.setAttribute("cy",(Me/2).toString()),Oe.setAttribute("r",Me.toString()),Fe&&He.setAttributes(Oe,Fe),Oe},He.createEllipse=function(Me,Fe,Oe){var Ue=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ue.setAttribute("cx",(Me/2).toString()),Ue.setAttribute("cy",(Fe/2).toString()),Ue.setAttribute("rx",(Me/2).toString()),Ue.setAttribute("ry",(Fe/2).toString()),Oe&&He.setAttributes(Ue,Oe),Ue},He.createGroup=function(Me){var Fe=document.createElementNS("http://www.w3.org/2000/svg","g");return Me&&He.setAttributes(Fe,Me),Fe},He.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},He.createMarker=function(Me,Fe,Oe,Ue,Be,ot,Cn){var ci=document.createElementNS("http://www.w3.org/2000/svg","marker");return He.setAttributes(ci,[["id",Me],["orient",Fe],["markerWidth",Oe.toString()],["markerHeight",Ue.toString()],["refX",Be.toString()],["refY",ot.toString()]]),ci.appendChild(Cn),ci},He.createText=function(Me){var Fe=document.createElementNS("http://www.w3.org/2000/svg","text");return Fe.setAttribute("x","0"),Fe.setAttribute("y","0"),Me&&He.setAttributes(Fe,Me),Fe},He.createTSpan=function(Me,Fe){var Oe=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Oe.textContent=Me,Fe&&He.setAttributes(Oe,Fe),Oe},He.createImage=function(Me){var Fe=document.createElementNS("http://www.w3.org/2000/svg","image");return Me&&He.setAttributes(Fe,Me),Fe},He.createPoint=function(Me,Fe){var Oe=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Oe.x=Me,Oe.y=Fe,Oe},He.createPath=function(Me,Fe){var Oe=document.createElementNS("http://www.w3.org/2000/svg","path");return Oe.setAttribute("d",Me),Fe&&He.setAttributes(Oe,Fe),Oe},He}(),Ve=function(){function He(){}return He.addKey=function(Me){He.key=Me},Object.defineProperty(He,"isLicensed",{get:function(){return!!He.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(He.key)},enumerable:!1,configurable:!0}),He}(),xt=function(){function He(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return He.prototype.rasterize=function(Me,Fe,Oe){var Ue=this;return new Promise(function(Be){var ot=Oe!==void 0?Oe:document.createElement("canvas");Me===null&&(Ue.markersOnly=!0,Ue.naturalSize=!1);var Cn=document.createElementNS("http://www.w3.org/2000/svg","svg");Cn.setAttribute("xmlns","http://www.w3.org/2000/svg"),Cn.setAttribute("width",Fe.width.baseVal.valueAsString),Cn.setAttribute("height",Fe.height.baseVal.valueAsString),Cn.setAttribute("viewBox","0 0 "+Fe.viewBox.baseVal.width.toString()+" "+Fe.viewBox.baseVal.height.toString()),Cn.innerHTML=Fe.innerHTML,Ue.naturalSize===!0?(Cn.width.baseVal.value=Me.naturalWidth,Cn.height.baseVal.value=Me.naturalHeight):Ue.width!==void 0&&Ue.height!==void 0&&(Cn.width.baseVal.value=Ue.width,Cn.height.baseVal.value=Ue.height),ot.width=Cn.width.baseVal.value,ot.height=Cn.height.baseVal.value;var ci=Cn.outerHTML,si=ot.getContext("2d");Ue.markersOnly!==!0&&si.drawImage(Me,0,0,ot.width,ot.height);var pn=window.URL,qn=new Image(ot.width,ot.height);qn.setAttribute("crossOrigin","anonymous");var en=new Blob([ci],{type:"image/svg+xml"}),wi=pn.createObjectURL(en);qn.onload=function(){si.drawImage(qn,0,0),pn.revokeObjectURL(wi);var Si=ot.toDataURL(Ue.imageType,Ue.imageQuality);Be(Si)},qn.src=wi})},He}(),ut=function(){},pt=function(){function He(Me){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Me+"_"}return Object.defineProperty(He.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(He.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(He.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),He.prototype.addClass=function(Me){return this.styleSheet===void 0&&this.addStyleSheet(),Me.name=""+this.classNamePrefix+Me.localName,this.classes.push(Me),this.styleSheet.sheet.insertRule("."+Me.name+" {"+Me.style+"}",this.styleSheet.sheet.cssRules.length),Me},He.prototype.addRule=function(Me){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Me),this.styleSheet.sheet.insertRule(Me.selector+" {"+Me.style+"}",this.styleSheet.sheet.cssRules.length)},He.prototype.addStyleSheet=function(){var Me;this.styleSheet=document.createElement("style"),((Me=this.styleSheetRoot)!==null&&Me!==void 0?Me:document.head).appendChild(this.styleSheet),this.addRule(new Rt("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Rt("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Rt("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Ot("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Ot("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},He.prototype.removeStyleSheet=function(){var Me;this.styleSheet&&(((Me=this.styleSheetRoot)!==null&&Me!==void 0?Me:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},He}(),Rt=function(He,Me){this.selector=He,this.style=Me},Ot=function(He,Me){this.localName=He,this.style=Me},jt=function(){function He(Me,Fe,Oe,Ue,Be){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Me,this.displayMode=Fe,this.markerItems=Oe,this.uiStyleSettings=Ue,this.styles=Be,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return He.prototype.show=function(Me){var Fe=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Me,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Oe=document.createElement("div");Oe.className=this.toolbarBlockStyleClass.name,Oe.style.whiteSpace="nowrap",this.uiContainer.appendChild(Oe),this.addActionButton(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Oe,'<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(Be){var ot=document.createElement("div");ot.className=""+Fe.toolbarButtonStyleClass.name,ot.setAttribute("data-type-name",Be.typeName),ot.innerHTML=Be.icon,ot.addEventListener("click",function(){Fe.markerToolbarButtonClicked(ot,Be)}),Fe.buttons.push(ot),Fe.markerButtons.push(ot)}),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 Ue=document.createElement("div");Ue.className=this.toolbarBlockStyleClass.name,Ue.style.whiteSpace="nowrap",Ue.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ue),this.addActionButton(Ue,'<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(Ue,'<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()},He.prototype.addButtonClickListener=function(Me){this.buttonClickListeners.push(Me)},He.prototype.removeButtonClickListener=function(Me){this.buttonClickListeners.indexOf(Me)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Me),1)},He.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},He.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Me=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Fe=0;Fe<this.markerButtons.length;Fe++)Fe<Me||Fe===Me&&this.markerButtons.length-1===Me?this.markerButtonBlock.appendChild(this.markerButtons[Fe]):(Fe===Me&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Fe]))}},He.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")},He.prototype.resetButtonStyles=function(){var Me=this;this.buttons.forEach(function(Fe){Fe.className=Fe.className.replace(Me.uiStyleSettings.toolbarButtonStyleColorsClassName?Me.uiStyleSettings.toolbarButtonStyleColorsClassName:Me.toolbarButtonStyleColorsClass.name,"").trim(),Fe.className=Fe.className.replace(Me.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Me.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Me.toolbarActiveButtonStyleColorsClass.name,"").trim(),Fe.className+=" "+(Me.uiStyleSettings.toolbarButtonStyleColorsClassName?Me.uiStyleSettings.toolbarButtonStyleColorsClassName:Me.toolbarButtonStyleColorsClass.name)})},He.prototype.addActionButton=function(Me,Fe,Oe){var Ue=this,Be=document.createElement("div");switch(Be.className=""+this.toolbarButtonStyleClass.name,Be.innerHTML=Fe,Be.setAttribute("data-action",Oe),Be.addEventListener("click",function(){Ue.actionToolbarButtonClicked(Be,Oe)}),Oe){case"select":Be.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Be.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Be.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Be.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Be.style.fill=this.uiStyleSettings.closeButtonColor}Me.appendChild(Be),this.buttons.push(Be)},He.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Ot("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Ot("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 Ot("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Me=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Ot("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Me)+`px;
padding: `+Me+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Ot("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Rt("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},He.prototype.markerToolbarButtonClicked=function(Me,Fe){this.setActiveButton(Me),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Oe){return Oe("marker",Fe)}),this.markerButtonOverflowBlock.style.display="none"},He.prototype.actionToolbarButtonClicked=function(Me,Fe){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Oe){return Oe("action",Fe)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},He.prototype.setActiveButton=function(Me){this.resetButtonStyles(),Me.className=Me.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Me.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},He.prototype.setActiveMarkerButton=function(Me){var Fe=this.markerButtons.find(function(Oe){return Oe.getAttribute("data-type-name")===Me});Fe&&this.setActiveButton(Fe)},He.prototype.setCurrentMarker=function(Me){var Fe=this;this.currentMarker=Me,this.buttons.filter(function(Oe){return/delete|notes/.test(Oe.getAttribute("data-action"))}).forEach(function(Oe){Fe.currentMarker===void 0?(Oe.style.fillOpacity="0.4",Oe.style.pointerEvents="none"):(Oe.style.fillOpacity="1",Oe.style.pointerEvents="all")})},He}(),Te=function(){function He(Me,Fe,Oe,Ue){this.panels=[],this.panelButtons=[],this.markerjsContainer=Me,this.displayMode=Fe,this.uiStyleSettings=Oe,this.styles=Ue,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return He.prototype.addStyles=function(){var Me;this.toolboxStyleClass=this.styles.addClass(new Ot("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 Ot("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var Fe=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Ot("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Ot("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Ot("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 Ot("toolbox-panel-row_colors",`
background-color: `+((Me=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Me!==void 0?Me:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Ot("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Fe)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Fe)+`px;
padding: `+Fe+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Ot("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Ot("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Rt("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Rt("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},He.prototype.show=function(Me){var Fe;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Me,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Fe=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Fe!==void 0?Fe:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},He.prototype.setPanelButtons=function(Me){var Fe,Oe,Ue=this;this.panels=Me,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Fe=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Fe!==void 0?Fe:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Oe=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Oe!==void 0?Oe:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Be){var ot;Be.uiStyleSettings=Ue.uiStyleSettings;var Cn=document.createElement("div");Cn.className=Ue.toolboxButtonStyleClass.name+" "+((ot=Ue.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ot!==void 0?ot:Ue.toolboxButtonStyleColorsClass.name),Cn.innerHTML=Be.icon,Cn.title=Be.title,Cn.addEventListener("click",function(){Ue.panelButtonClick(Be)}),Ue.panelButtons.push(Cn),Ue.buttonRow.appendChild(Cn)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},He.prototype.panelButtonClick=function(Me){var Fe=this,Oe=-1;if(Me!==this.activePanel){Oe=this.panels.indexOf(Me),this.panelRow.innerHTML="";var Ue=Me.getUi();Ue.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ue),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=Me}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Fe.displayMode==="inline"?Fe.panelRow.style.display="none":Fe.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Be,ot){var Cn,ci;Be.className=Fe.toolboxButtonStyleClass.name+" "+(ot===Oe?""+((Cn=Fe.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Cn!==void 0?Cn:Fe.toolboxActiveButtonStyleColorsClass.name):""+((ci=Fe.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&ci!==void 0?ci:Fe.toolboxButtonStyleColorsClass.name))})},He}(),ne=function(He,Me){this.title=He,this.icon=Me},te=function(He){function Me(Fe,Oe,Ue,Be){var ot=He.call(this,Fe,Be||'<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 ot.colors=[],ot.addTransparent=!1,ot.colorBoxes=[],ot.colors=Oe,ot.currentColor=Ue,ot.setCurrentColor=ot.setCurrentColor.bind(ot),ot.getColorBox=ot.getColorBox.bind(ot),ot}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");return Oe.style.overflow="hidden",Oe.style.whiteSpace="nowrap",this.colors.forEach(function(Ue){var Be=Fe.getColorBox(Ue);Oe.appendChild(Be),Fe.colorBoxes.push(Be)}),Oe},Me.prototype.getColorBox=function(Fe){var Oe=this,Ue=this.uiStyleSettings.toolbarHeight/4,Be=this.uiStyleSettings.toolbarHeight-Ue,ot=document.createElement("div");ot.style.display="inline-block",ot.style.boxSizing="content-box",ot.style.width=Be-2+"px",ot.style.height=Be-2+"px",ot.style.padding="1px",ot.style.marginRight="2px",ot.style.marginBottom="2px",ot.style.borderWidth="2px",ot.style.borderStyle="solid",ot.style.borderRadius=(Be+2)/2+"px",ot.style.borderColor=Fe===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",ot.addEventListener("click",function(){Oe.setCurrentColor(Fe,ot)});var Cn=document.createElement("div");return Cn.style.display="inline-block",Cn.style.width=Be-2+"px",Cn.style.height=Be-2+"px",Cn.style.backgroundColor=Fe,Cn.style.borderRadius=Be/2+"px",Fe==="transparent"&&(Cn.style.fill=this.uiStyleSettings.toolboxAccentColor,Cn.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>`),ot.appendChild(Cn),ot},Me.prototype.setCurrentColor=function(Fe,Oe){var Ue=this;this.currentColor=Fe,this.colorBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Fe)},Me}(ne),ce=function(){function He(Me,Fe,Oe){this._state="new",this._isSelected=!1,this._container=Me,this._overlayContainer=Fe,this.globalSettings=Oe,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(He.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),He.prototype.ownsTarget=function(Me){return!1},Object.defineProperty(He.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),He.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},He.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},He.prototype.pointerDown=function(Me,Fe){},He.prototype.dblClick=function(Me,Fe){},He.prototype.manipulate=function(Me){},He.prototype.pointerUp=function(Me){this.stateChanged()},He.prototype.dispose=function(){},He.prototype.addMarkerVisualToContainer=function(Me){this.container.childNodes.length>0?this.container.insertBefore(Me,this.container.childNodes[0]):this.container.appendChild(Me)},He.prototype.getState=function(){return{typeName:He.typeName,state:this.state,notes:this.notes}},He.prototype.restoreState=function(Me){this._state=Me.state,this.notes=Me.notes},He.prototype.scale=function(Me,Fe){},He.prototype.colorChanged=function(Me){this.onColorChanged&&this.onColorChanged(Me),this.stateChanged()},He.prototype.fillColorChanged=function(Me){this.onFillColorChanged&&this.onFillColorChanged(Me),this.stateChanged()},He.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Me=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Me.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Me)&&this.onStateChanged(this)}},He.typeName="MarkerBase",He}(),se=function(){function He(){this.findGripByVisual=this.findGripByVisual.bind(this)}return He.prototype.findGripByVisual=function(Me){return this.topLeft.ownsTarget(Me)?this.topLeft:this.topCenter.ownsTarget(Me)?this.topCenter:this.topRight.ownsTarget(Me)?this.topRight:this.centerLeft.ownsTarget(Me)?this.centerLeft:this.centerRight.ownsTarget(Me)?this.centerRight:this.bottomLeft.ownsTarget(Me)?this.bottomLeft:this.bottomCenter.ownsTarget(Me)?this.bottomCenter:this.bottomRight.ownsTarget(Me)?this.bottomRight:void 0},He}(),ge=function(){function He(){this.GRIP_SIZE=10,this.visual=_e.createGroup(),this.visual.appendChild(_e.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(_e.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return He.prototype.ownsTarget=function(Me){return Me===this.visual||Me===this.visual.childNodes[0]||Me===this.visual.childNodes[1]},He}(),ye=function(){function He(){}return He.toITransformMatrix=function(Me){return{a:Me.a,b:Me.b,c:Me.c,d:Me.d,e:Me.e,f:Me.f}},He.toSVGMatrix=function(Me,Fe){return Me.a=Fe.a,Me.b=Fe.b,Me.c=Fe.c,Me.d=Fe.d,Me.e=Fe.e,Me.f=Fe.f,Me},He}(),we=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.left=0,Be.top=0,Be.width=0,Be.height=0,Be.defaultSize={x:50,y:20},Be.offsetX=0,Be.offsetY=0,Be.rotationAngle=0,Be.CB_DISTANCE=10,Be._suppressMarkerCreateEvent=!1,Be.container.transform.baseVal.appendItem(_e.createTransform()),Be.setupControlBox(),Be}return Xe(Me,He),Object.defineProperty(Me.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Me.prototype,"visual",{get:function(){return this._visual},set:function(Fe){this._visual=Fe;var Oe=_e.createTransform();this._visual.transform.baseVal.appendItem(Oe)},enumerable:!1,configurable:!0}),Me.prototype.ownsTarget=function(Fe){return!!He.prototype.ownsTarget.call(this,Fe)||!!(this.controlGrips.findGripByVisual(Fe)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Fe))},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="new"&&(this.left=Fe.x,this.top=Fe.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ue=this.unrotatePoint(Fe);if(this.manipulationStartX=Ue.x,this.manipulationStartY=Ue.y,this.offsetX=Ue.x-this.left,this.offsetY=Ue.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Oe),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Oe)){this.activeGrip=this.rotatorGrip;var Be=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Be.x-this.width/2,this.top=Be.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var ot=this.container.transform.baseVal.getItem(0);ot.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(ot,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Me.prototype.pointerUp=function(Fe){var Oe=this.state;He.prototype.pointerUp.call(this,Fe),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Fe),this._state="select",Oe==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Me.prototype.moveVisual=function(Fe){this.visual.style.transform="translate("+Fe.x+"px, "+Fe.y+"px)"},Me.prototype.manipulate=function(Fe){var Oe=this.unrotatePoint(Fe);this.state==="creating"?this.resize(Fe):this.state==="move"?(this.left=this.manipulationStartLeft+(Oe.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Oe.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Oe):this.state==="rotate"&&this.rotate(Fe)},Me.prototype.resize=function(Fe){var Oe=this.manipulationStartLeft,Ue=this.manipulationStartWidth,Be=this.manipulationStartTop,ot=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Oe=this.manipulationStartLeft+Fe.x-this.manipulationStartX,Ue=this.manipulationStartWidth+this.manipulationStartLeft-Oe;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ue=this.manipulationStartWidth+Fe.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Be=this.manipulationStartTop+Fe.y-this.manipulationStartY,ot=this.manipulationStartHeight+this.manipulationStartTop-Be;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:ot=this.manipulationStartHeight+Fe.y-this.manipulationStartY}Ue>=0?(this.left=Oe,this.width=Ue):(this.left=Oe+Ue,this.width=-Ue),ot>=0?(this.top=Be,this.height=ot):(this.top=Be+ot,this.height=-ot),this.setSize()},Me.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Me.prototype.rotate=function(Fe){if(Math.abs(Fe.x-this.centerX)>.1){var Oe=Math.sign(Fe.x-this.centerX);this.rotationAngle=180*Math.atan((Fe.y-this.centerY)/(Fe.x-this.centerX))/Math.PI+90*Oe,this.applyRotation()}},Me.prototype.applyRotation=function(){var Fe=this.container.transform.baseVal.getItem(0);Fe.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Fe,0)},Me.prototype.rotatePoint=function(Fe){if(this.rotationAngle===0)return Fe;var Oe=this.container.getCTM(),Ue=_e.createPoint(Fe.x,Fe.y);return{x:(Ue=Ue.matrixTransform(Oe)).x,y:Ue.y}},Me.prototype.unrotatePoint=function(Fe){if(this.rotationAngle===0)return Fe;var Oe=this.container.getCTM();Oe=Oe.inverse();var Ue=_e.createPoint(Fe.x,Fe.y);return{x:(Ue=Ue.matrixTransform(Oe)).x,y:Ue.y}},Me.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Me.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Me.prototype.setupControlBox=function(){this.controlBox=_e.createGroup();var Fe=_e.createTransform();Fe.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Fe),this.container.appendChild(this.controlBox),this.controlRect=_e.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=_e.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"},Me.prototype.adjustControlBox=function(){var Fe=this.controlBox.transform.baseVal.getItem(0);Fe.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Fe,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()},Me.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()},Me.prototype.createGrip=function(){var Fe=new ge;return Fe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Fe.visual),Fe},Me.prototype.positionGrips=function(){var Fe=this.controlGrips.topLeft.GRIP_SIZE,Oe=-Fe/2,Ue=Oe,Be=(this.width+this.CB_DISTANCE)/2-Fe/2,ot=(this.height+this.CB_DISTANCE)/2-Fe/2,Cn=this.height+this.CB_DISTANCE-Fe/2,ci=this.width+this.CB_DISTANCE-Fe/2;this.positionGrip(this.controlGrips.topLeft.visual,Oe,Ue),this.positionGrip(this.controlGrips.topCenter.visual,Be,Ue),this.positionGrip(this.controlGrips.topRight.visual,ci,Ue),this.positionGrip(this.controlGrips.centerLeft.visual,Oe,ot),this.positionGrip(this.controlGrips.centerRight.visual,ci,ot),this.positionGrip(this.controlGrips.bottomLeft.visual,Oe,Cn),this.positionGrip(this.controlGrips.bottomCenter.visual,Be,Cn),this.positionGrip(this.controlGrips.bottomRight.visual,ci,Cn),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Be,Ue-3*this.CB_DISTANCE)},Me.prototype.positionGrip=function(Fe,Oe,Ue){var Be=Fe.transform.baseVal.getItem(0);Be.setTranslate(Oe,Ue),Fe.transform.baseVal.replaceItem(Be,0)},Me.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Me.prototype.showControlBox=function(){this.controlBox.style.display=""},Me.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ye.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ye.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},He.prototype.getState.call(this))},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe);var Oe=Fe;this.left=Oe.left,this.top=Oe.top,this.width=Oe.width,this.height=Oe.height,this.rotationAngle=Oe.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ye.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Oe.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ye.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Oe.containerTransformMatrix))},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe);var Ue=this.rotatePoint({x:this.left,y:this.top}),Be=this.unrotatePoint({x:Ue.x*Fe,y:Ue.y*Oe});this.left=Be.x,this.top=Be.y,this.width=this.width*Fe,this.height=this.height*Oe,this.adjustControlBox()},Me}(ce),Ce=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.opacity=1,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual)},Me.prototype.createVisual=function(){this.visual=_e.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)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="new"&&(this.createVisual(),this.moveVisual(Fe),this._state="creating")},Me.prototype.manipulate=function(Fe){He.prototype.manipulate.call(this,Fe)},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),this.setSize()},Me.prototype.setSize=function(){He.prototype.setSize.call(this),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Me.prototype.pointerUp=function(Fe){He.prototype.pointerUp.call(this,Fe),this.setSize()},Me.prototype.setStrokeColor=function(Fe){this.strokeColor=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Fe),this.stateChanged()},Me.prototype.setFillColor=function(Fe){this.fillColor=Fe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Me.prototype.setStrokeWidth=function(Fe){this.strokeWidth=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Me.prototype.setStrokeDasharray=function(Fe){this.strokeDasharray=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Me.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this))},Me.prototype.restoreState=function(Fe){var Oe=Fe;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.opacity=Oe.opacity,this.createVisual(),He.prototype.restoreState.call(this,Fe),this.setSize()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.setSize()},Me.title="Rectangle marker",Me}(we),Re=function(He){function Me(Fe,Oe,Ue,Be){var ot=He.call(this,Fe,Be||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return ot.widths=[],ot.widthBoxes=[],ot.widths=Oe,ot.currentWidth=Ue,ot.setCurrentWidth=ot.setCurrentWidth.bind(ot),ot}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.widths.forEach(function(Ue){var Be=document.createElement("div");Be.style.display="flex",Be.style.flexGrow="2",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderColor=Ue===Fe.currentWidth?Fe.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Fe.setCurrentWidth(Ue,Be)}),Oe.appendChild(Be);var ot=document.createElement("div");ot.innerText=Ue.toString(),ot.style.marginRight="5px",Be.appendChild(ot);var Cn=document.createElement("div");Cn.style.minHeight="20px",Cn.style.flexGrow="2",Cn.style.display="flex",Cn.style.alignItems="center";var ci=document.createElement("hr");ci.style.minWidth="20px",ci.style.border="0px",ci.style.borderTop=Ue+"px solid "+Fe.uiStyleSettings.toolboxColor,ci.style.flexGrow="2",Cn.appendChild(ci),Be.appendChild(Cn),Fe.widthBoxes.push(Be)}),Oe},Me.prototype.setCurrentWidth=function(Fe,Oe){var Ue=this;this.currentWidth=Fe,this.widthBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Me}(ne),We=function(He){function Me(Fe,Oe,Ue,Be){var ot=He.call(this,Fe,Be||'<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 ot.styles=[],ot.styleBoxes=[],ot.styles=Oe,ot.currentStyle=Ue,ot.setCurrentStyle=ot.setCurrentStyle.bind(ot),ot}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.styles.forEach(function(Ue){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.overflow="hidden",Be.style.maxWidth=100/Fe.styles.length-5+"%",Be.style.borderColor=Ue===Fe.currentStyle?Fe.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Fe.setCurrentStyle(Ue,Be)}),Oe.appendChild(Be);var ot=document.createElement("div");ot.style.minHeight="20px",ot.style.flexGrow="2",ot.style.overflow="hidden";var Cn=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Fe.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ue!==""?'stroke-dasharray="'+Ue+'"':"")+` />
</svg>`;ot.innerHTML=Cn,Be.appendChild(ot),Fe.styleBoxes.push(Be)}),Oe},Me.prototype.setCurrentStyle=function(Fe,Oe){var Ue=this;this.currentStyle=Fe,this.styleBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Me}(ne),lt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.strokeColor=Ue.defaultColor,Be.strokeWidth=Ue.defaultStrokeWidth,Be.strokeDasharray=Ue.defaultStrokeDasharray,Be.strokePanel=new te("Line color",Ue.defaultColorSet,Ue.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new We("Line style",Ue.defaultStrokeDasharrays,Ue.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return Xe(Me,He),Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=He.prototype.getState.call(this);return Fe.typeName=Me.typeName,Fe},Me.typeName="FrameMarker",Me.title="Frame marker",Me.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Me}(Ce),ht=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"},nt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.x1=0,Be.y1=0,Be.x2=0,Be.y2=0,Be.defaultLength=50,Be.manipulationStartX=0,Be.manipulationStartY=0,Be.manipulationStartX1=0,Be.manipulationStartY1=0,Be.manipulationStartX2=0,Be.manipulationStartY2=0,Be.setupControlBox(),Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!!He.prototype.ownsTarget.call(this,Fe)||!(!this.grip1.ownsTarget(Fe)&&!this.grip2.ownsTarget(Fe))},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.manipulationStartX=Fe.x,this.manipulationStartY=Fe.y,this.state==="new"&&(this.x1=Fe.x,this.y1=Fe.y,this.x2=Fe.x,this.y2=Fe.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(Oe)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Oe)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Me.prototype.pointerUp=function(Fe){var Oe=this.state;He.prototype.pointerUp.call(this,Fe),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(Fe),this._state="select",Oe==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Me.prototype.adjustVisual=function(){},Me.prototype.manipulate=function(Fe){this.state==="creating"?this.resize(Fe):this.state==="move"?(this.x1=this.manipulationStartX1+Fe.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Fe.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Fe.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Fe.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Fe)},Me.prototype.resize=function(Fe){switch(this.activeGrip){case this.grip1:this.x1=Fe.x,this.y1=Fe.y;break;case this.grip2:case void 0:this.x2=Fe.x,this.y2=Fe.y}this.adjustVisual(),this.adjustControlBox()},Me.prototype.select=function(){He.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Me.prototype.deselect=function(){He.prototype.deselect.call(this),this.controlBox.style.display="none"},Me.prototype.setupControlBox=function(){this.controlBox=_e.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Me.prototype.adjustControlBox=function(){this.positionGrips()},Me.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Me.prototype.createGrip=function(){var Fe=new ge;return Fe.visual.transform.baseVal.appendItem(_e.createTransform()),this.controlBox.appendChild(Fe.visual),Fe},Me.prototype.positionGrips=function(){var Fe=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Fe/2,this.y1-Fe/2),this.positionGrip(this.grip2.visual,this.x2-Fe/2,this.y2-Fe/2)},Me.prototype.positionGrip=function(Fe,Oe,Ue){var Be=Fe.transform.baseVal.getItem(0);Be.setTranslate(Oe,Ue),Fe.transform.baseVal.replaceItem(Be,0)},Me.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},He.prototype.getState.call(this))},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe);var Oe=Fe;this.x1=Oe.x1,this.y1=Oe.y1,this.x2=Oe.x2,this.y2=Oe.y2},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.x1=this.x1*Fe,this.y1=this.y1*Oe,this.x2=this.x2*Fe,this.y2=this.y2*Oe,this.adjustVisual(),this.adjustControlBox()},Me}(ce),mt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.strokeColor=Ue.defaultColor,Be.strokeWidth=Ue.defaultStrokeWidth,Be.strokeDasharray=Ue.defaultStrokeDasharray,Be.strokePanel=new te("Line color",Ue.defaultColorSet,Ue.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new We("Line style",Ue.defaultStrokeDasharrays,Ue.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual&&Fe!==this.selectorLine&&Fe!==this.visibleLine)},Me.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorLine=_e.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=_e.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)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Me.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()),_e.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Me.prototype.setStrokeColor=function(Fe){this.strokeColor=Fe,this.adjustVisual(),this.colorChanged(Fe)},Me.prototype.setStrokeWidth=function(Fe){this.strokeWidth=Fe,this.adjustVisual()},Me.prototype.setStrokeDasharray=function(Fe){this.strokeDasharray=Fe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe);var Oe=Fe;this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.createVisual(),this.adjustVisual()},Me.typeName="LineMarker",Me.title="Line marker",Me.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Me}(nt),at=function(He){function Me(Fe,Oe,Ue,Be){var ot=He.call(this,Fe,Be||'<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 ot.fonts=[],ot.fontBoxes=[],ot.fonts=Oe,ot.currentFont=Ue,ot.setCurrentFont=ot.setCurrentFont.bind(ot),ot}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");return Oe.style.overflow="hidden",Oe.style.flexGrow="2",this.fonts.forEach(function(Ue){var Be=document.createElement("div");Be.style.display="inline-block",Be.style.alignItems="center",Be.style.justifyContent="space-between",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.overflow="hidden",Be.style.maxWidth=100/Fe.fonts.length-5+"%",Be.style.borderColor=Ue===Fe.currentFont?Fe.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Fe.setCurrentFont(Ue,Be)}),Oe.appendChild(Be);var ot=document.createElement("div");ot.style.display="flex",ot.style.minHeight="20px",ot.style.flexGrow="2",ot.style.fontFamily=Ue,ot.style.overflow="hidden";var Cn=document.createElement("div");Cn.style.whiteSpace="nowrap",Cn.style.overflow="hidden",Cn.style.textOverflow="ellipsis",Cn.innerHTML="The quick brown fox jumps over the lazy dog",ot.appendChild(Cn),Be.appendChild(ot),Fe.fontBoxes.push(Be)}),Oe},Me.prototype.setCurrentFont=function(Fe,Oe){var Ue=this;this.currentFont=Fe,this.fontBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Me}(ne),Pt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.color="transparent",Be.padding=5,Be.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Be.text=Be.DEFAULT_TEXT,Be.isMoved=!1,Be.color=Ue.defaultColor,Be.fontFamily=Ue.defaultFontFamily,Be.defaultSize={x:100,y:30},Be.setColor=Be.setColor.bind(Be),Be.setFont=Be.setFont.bind(Be),Be.renderText=Be.renderText.bind(Be),Be.sizeText=Be.sizeText.bind(Be),Be.textEditDivClicked=Be.textEditDivClicked.bind(Be),Be.showTextEditor=Be.showTextEditor.bind(Be),Be.setSize=Be.setSize.bind(Be),Be.positionTextEditor=Be.positionTextEditor.bind(Be),Be.colorPanel=new te("Color",Ue.defaultColorSet,Ue.defaultColor),Be.colorPanel.onColorChanged=Be.setColor,Be.fontFamilyPanel=new at("Font",Ue.defaultFontFamilies,Ue.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){if(He.prototype.ownsTarget.call(this,Fe)||Fe===this.visual||Fe===this.textElement||Fe===this.bgRectangle)return!0;var Oe=!1;return this.textElement.childNodes.forEach(function(Ue){Ue===Fe&&(Oe=!0)}),Oe},Me.prototype.createVisual=function(){this.visual=_e.createGroup(),this.bgRectangle=_e.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=_e.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.textElement.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.isMoved=!1,this.pointerDownPoint=Fe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Fe),this._state="creating")},Me.prototype.renderText=function(){var Fe=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(Oe){Fe.textElement.appendChild(_e.createTSpan(Oe.trim()===""?" ":Oe.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Me.prototype.getTextScale=function(){var Fe=this.textElement.getBBox(),Oe=1;if(Fe.width>0&&Fe.height>0){var Ue=(1*this.width-this.width*this.padding*2/100)/Fe.width,Be=(1*this.height-this.height*this.padding*2/100)/Fe.height;Oe=Math.min(Ue,Be)}return Oe},Me.prototype.getTextPosition=function(Fe){var Oe=this.textElement.getBBox(),Ue=0,Be=0;return Oe.width>0&&Oe.height>0&&(Ue=(this.width-Oe.width*Fe)/2,Be=this.height/2-Oe.height*Fe/2),{x:Ue,y:Be}},Me.prototype.sizeText=function(){var Fe=this.textElement.getBBox(),Oe=this.getTextScale(),Ue=this.getTextPosition(Oe);Ue.y-=Fe.y*Oe,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ue.x+"px, "+Ue.y+"px) scale("+Oe+", "+Oe+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ue.x,Ue.y),this.textElement.transform.baseVal.getItem(1).setScale(Oe,Oe))},Me.prototype.manipulate=function(Fe){He.prototype.manipulate.call(this,Fe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Fe.x-this.pointerDownPoint.x)>5||Math.abs(Fe.y-this.pointerDownPoint.y)>5)},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),this.isMoved=!0,this.setSize(),this.sizeText()},Me.prototype.setSize=function(){He.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Me.prototype.pointerUp=function(Fe){var Oe=this.state;Oe==="creating"&&(this._suppressMarkerCreateEvent=!0),He.prototype.pointerUp.call(this,Fe),this.setSize(),(Oe==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Me.prototype.showTextEditor=function(){var Fe=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(Oe){Oe.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Oe=Number.parseFloat(Fe.textEditor.style.fontSize);Fe.textEditor.clientWidth>=Number.parseInt(Fe.textEditor.style.maxWidth)&&Oe>.9;)Oe-=.1,Fe.textEditor.style.fontSize=Math.max(Oe,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Oe){Oe.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Oe){if(Oe.clipboardData){var Ue=Oe.clipboardData.getData("text"),Be=window.getSelection();if(!Be.rangeCount)return!1;Be.deleteFromDocument(),Be.getRangeAt(0).insertNode(document.createTextNode(Ue)),Oe.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Fe.textEditDivClicked(Fe.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Me.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Fe=this.getTextScale(),Oe=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ue=this.textElement.getBBox(),Be={x:Ue.width*Fe,y:Ue.height*Fe};Oe.x-=Be.x/2,Oe.y-=Be.y/2,this.textEditor.style.top=Oe.y+"px",this.textEditor.style.left=Oe.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Oe.x+"px",this.textEditor.style.fontSize=Math.max(16*Fe,12)+"px",this.textElement.style.display="none"}},Me.prototype.textEditDivClicked=function(Fe){this.text=Fe.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Me.prototype.select=function(){He.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Me.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),He.prototype.deselect.call(this)},Me.prototype.dblClick=function(Fe,Oe){He.prototype.dblClick.call(this,Fe,Oe),this.showTextEditor()},Me.prototype.setColor=function(Fe){this.textElement&&_e.setAttributes(this.textElement,[["fill",Fe]]),this.color=Fe,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Fe)},Me.prototype.setFont=function(Fe){this.textElement&&_e.setAttributes(this.textElement,[["font-family",Fe]]),this.fontFamily=Fe,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Me.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Me.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){var Oe=Fe;this.color=Oe.color,this.fontFamily=Oe.fontFamily,this.padding=Oe.padding,this.text=Oe.text,this.createVisual(),He.prototype.restoreState.call(this,Fe),this.setSize()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.setSize(),this.sizeText(),this.positionTextEditor()},Me.typeName="TextMarker",Me.title="Text marker",Me.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>',Me}(we),Nt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.color="transparent",Be.lineWidth=3,Be.drawing=!1,Be.pixelRatio=1,Be.color=Ue.defaultColor,Be.lineWidth=Ue.defaultStrokeWidth,Be.pixelRatio=Ue.freehandPixelRatio,Be.setColor=Be.setColor.bind(Be),Be.addCanvas=Be.addCanvas.bind(Be),Be.finishCreation=Be.finishCreation.bind(Be),Be.setLineWidth=Be.setLineWidth.bind(Be),Be.colorPanel=new te("Color",Ue.defaultColorSet,Ue.defaultColor),Be.colorPanel.onColorChanged=Be.setColor,Be.lineWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.lineWidthPanel.onWidthChanged=Be.setLineWidth,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual&&Fe!==this.drawingImage)},Me.prototype.createVisual=function(){this.visual=_e.createGroup(),this.drawingImage=_e.createImage(),this.visual.appendChild(this.drawingImage);var Fe=_e.createTransform();this.visual.transform.baseVal.appendItem(Fe),this.addMarkerVisualToContainer(this.visual)},Me.prototype.pointerDown=function(Fe,Oe){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(Fe.x,Fe.y),this.drawing=!0):He.prototype.pointerDown.call(this,Fe,Oe)},Me.prototype.manipulate=function(Fe){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Fe.x,Fe.y),this.canvasContext.stroke()):He.prototype.manipulate.call(this,Fe)},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),_e.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Me.prototype.pointerUp=function(Fe){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):He.prototype.pointerUp.call(this,Fe)},Me.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)},Me.prototype.select=function(){this.state==="creating"&&this.finishCreation(),He.prototype.select.call(this)},Me.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),He.prototype.deselect.call(this)},Me.prototype.finishCreation=function(){for(var Fe=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Oe=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ue=Oe[0],Be=Oe[1],ot=Oe[2],Cn=Oe[3],ci=!1,si=0;si<this.canvasElement.height;si++)for(var pn=0;pn<this.canvasElement.width;pn++)Fe.data[si*this.canvasElement.width*4+4*pn+3]>0&&(ci=!0,si<Be&&(Be=si),pn<Ue&&(Ue=pn),si>Cn&&(Cn=si),pn>ot&&(ot=pn));if(ci){this.left=Ue/this.pixelRatio,this.top=Be/this.pixelRatio,this.width=(ot-Ue)/this.pixelRatio,this.height=(Cn-Be)/this.pixelRatio;var qn=document.createElement("canvas");qn.width=ot-Ue,qn.height=Cn-Be,qn.getContext("2d").putImageData(this.canvasContext.getImageData(Ue,Be,ot-Ue,Cn-Be),0,0),this.drawingImgUrl=qn.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Me.prototype.setDrawingImage=function(){_e.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),_e.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Me.prototype.setColor=function(Fe){this.color=Fe,this.colorChanged(Fe)},Me.prototype.setLineWidth=function(Fe){this.lineWidth=Fe},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({drawingImgUrl:this.drawingImgUrl},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){this.createVisual(),He.prototype.restoreState.call(this,Fe),this.drawingImgUrl=Fe.drawingImgUrl,this.setDrawingImage()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.setDrawingImage()},Me.typeName="FreehandMarker",Me.title="Freehand marker",Me.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>',Me}(we),Et=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Ue||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Be.typeBoxes=[],Be.currentType=Oe,Be.setCurrentType=Be.setCurrentType.bind(Be),Be}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2";for(var Ue=function(Cn){var ci="both";switch(Cn){case 0:ci="both";break;case 1:ci="start";break;case 2:ci="end";break;case 3:ci="none"}var si=document.createElement("div");if(si.style.display="flex",si.style.flexGrow="2",si.style.alignItems="center",si.style.justifyContent="space-between",si.style.padding="5px",si.style.borderWidth="2px",si.style.borderStyle="solid",si.style.borderColor=ci===Be.currentType?Be.uiStyleSettings.toolboxAccentColor:"transparent",si.addEventListener("click",function(){Fe.setCurrentType(ci,si)}),Oe.appendChild(si),ci==="both"||ci==="start"){var pn=document.createElement("div");pn.style.display="flex",pn.style.alignItems="center",pn.style.minHeight="20px",pn.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="`+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,pn.style.marginLeft="5px",si.appendChild(pn)}var qn=document.createElement("div");qn.style.display="flex",qn.style.alignItems="center",qn.style.minHeight="20px",qn.style.flexGrow="2";var en=document.createElement("hr");if(en.style.minWidth="20px",en.style.border="0px",en.style.borderTop="3px solid "+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee"),en.style.flexGrow="2",qn.appendChild(en),si.appendChild(qn),ci==="both"||ci==="end"){var wi=document.createElement("div");wi.style.display="flex",wi.style.alignItems="center",wi.style.minHeight="20px",wi.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="`+(Be.uiStyleSettings!==void 0?Be.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,wi.style.marginRight="5px",si.appendChild(wi)}Be.typeBoxes.push(si)},Be=this,ot=0;ot<4;ot++)Ue(ot);return Oe},Me.prototype.setCurrentType=function(Fe,Oe){var Ue=this;this.currentType=Fe,this.typeBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings!==void 0?Ue.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Me}(ne),Ln=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.arrowType="end",Be.arrowBaseHeight=10,Be.arrowBaseWidth=10,Be.getArrowPoints=Be.getArrowPoints.bind(Be),Be.setArrowType=Be.setArrowType.bind(Be),Be.arrowTypePanel=new Et("Arrow type","end"),Be.arrowTypePanel.onArrowTypeChanged=Be.setArrowType,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.arrow1&&Fe!==this.arrow2)},Me.prototype.getArrowPoints=function(Fe,Oe){var Ue=this.arrowBaseWidth+2*this.strokeWidth,Be=this.arrowBaseHeight+2*this.strokeWidth;return Fe-Ue/2+","+(Oe+Be/2)+" "+Fe+","+(Oe-Be/2)+" "+(Fe+Ue/2)+","+(Oe+Be/2)},Me.prototype.createTips=function(){this.arrow1=_e.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=_e.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(_e.createTransform()),this.visual.appendChild(this.arrow2)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="creating"&&this.createTips()},Me.prototype.adjustVisual=function(){if(He.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",_e.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),_e.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Fe=0;Math.abs(this.x1-this.x2)>.1&&(Fe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Oe=this.arrow1.transform.baseVal.getItem(0);Oe.setRotate(Fe,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Oe,0);var Ue=this.arrow2.transform.baseVal.getItem(0);Ue.setRotate(Fe+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ue,0)}},Me.prototype.setArrowType=function(Fe){this.arrowType=Fe,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({arrowType:this.arrowType},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe);var Oe=Fe;this.arrowType=Oe.arrowType,this.createTips(),this.adjustVisual()},Me.typeName="ArrowMarker",Me.title="Arrow marker",Me.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Me}(mt),xn=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.fillColor=Ue.defaultFillColor,Be.strokeWidth=0,Be.fillPanel=new te("Color",Ue.defaultColorSet,Ue.defaultFillColor),Be.fillPanel.onColorChanged=Be.setFillColor,Be}return Xe(Me,He),Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=He.prototype.getState.call(this);return Fe.typeName=Me.typeName,Fe},Me.typeName="CoverMarker",Me.title="Cover marker",Me.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Me}(Ce),Nn=function(He){function Me(Fe,Oe,Ue,Be){var ot=He.call(this,Fe,Be||'<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 ot.opacities=[],ot.opacityBoxes=[],ot.opacities=Oe,ot.currentOpacity=Ue,ot.setCurrentOpacity=ot.setCurrentOpacity.bind(ot),ot}return Xe(Me,He),Me.prototype.getUi=function(){var Fe=this,Oe=document.createElement("div");return Oe.style.display="flex",Oe.style.overflow="hidden",Oe.style.flexGrow="2",Oe.style.justifyContent="space-between",this.opacities.forEach(function(Ue){var Be=document.createElement("div");Be.style.display="flex",Be.style.alignItems="center",Be.style.justifyContent="center",Be.style.padding="5px",Be.style.borderWidth="2px",Be.style.borderStyle="solid",Be.style.borderColor=Ue===Fe.currentOpacity?Fe.uiStyleSettings.toolboxAccentColor:"transparent",Be.addEventListener("click",function(){Fe.setCurrentOpacity(Ue,Be)}),Oe.appendChild(Be);var ot=document.createElement("div");ot.innerText=100*Ue+"%",Be.appendChild(ot),Fe.opacityBoxes.push(Be)}),Oe},Me.prototype.setCurrentOpacity=function(Fe,Oe){var Ue=this;this.currentOpacity=Fe,this.opacityBoxes.forEach(function(Be){Be.style.borderColor=Be===Oe?Ue.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Me}(ne),fn=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.setOpacity=Be.setOpacity.bind(Be),Be.fillColor=Ue.defaultHighlightColor,Be.strokeWidth=0,Be.opacity=Ue.defaultHighlightOpacity,Be.fillPanel=new te("Color",Ue.defaultColorSet,Be.fillColor),Be.fillPanel.onColorChanged=Be.setFillColor,Be.opacityPanel=new Nn("Opacity",Ue.defaultOpacitySteps,Be.opacity),Be.opacityPanel.onOpacityChanged=Be.setOpacity,Be}return Xe(Me,He),Me.prototype.setOpacity=function(Fe){this.opacity=Fe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=He.prototype.getState.call(this);return Fe.typeName=Me.typeName,Fe},Me.typeName="HighlightMarker",Me.title="Highlight marker",Me.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>',Me}(xn),Qe='<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>',Ke='<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>',Je=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.bgColor="transparent",Be.tipPosition={x:0,y:0},Be.tipBase1Position={x:0,y:0},Be.tipBase2Position={x:0,y:0},Be.tipMoving=!1,Be.color=Ue.defaultStrokeColor,Be.bgColor=Ue.defaultFillColor,Be.fontFamily=Ue.defaultFontFamily,Be.defaultSize={x:100,y:30},Be.setBgColor=Be.setBgColor.bind(Be),Be.getTipPoints=Be.getTipPoints.bind(Be),Be.positionTip=Be.positionTip.bind(Be),Be.setTipPoints=Be.setTipPoints.bind(Be),Be.colorPanel=new te("Text color",Ue.defaultColorSet,Be.color,Qe),Be.colorPanel.onColorChanged=Be.setColor,Be.bgColorPanel=new te("Fill color",Ue.defaultColorSet,Be.bgColor,Ke),Be.bgColorPanel.onColorChanged=Be.setBgColor,Be.fontFamilyPanel=new at("Font",Ue.defaultFontFamilies,Ue.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be.tipGrip=new ge,Be.tipGrip.visual.transform.baseVal.appendItem(_e.createTransform()),Be.controlBox.appendChild(Be.tipGrip.visual),Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return He.prototype.ownsTarget.call(this,Fe)||this.tipGrip.ownsTarget(Fe)||this.tip===Fe},Me.prototype.createTip=function(){_e.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=_e.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Me.prototype.pointerDown=function(Fe,Oe){this.state==="new"&&He.prototype.pointerDown.call(this,Fe,Oe),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Oe)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):He.prototype.pointerDown.call(this,Fe,Oe)},Me.prototype.pointerUp=function(Fe){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,He.prototype.pointerUp.call(this,Fe);else{var Oe=this.state==="creating";He.prototype.pointerUp.call(this,Fe),this.setTipPoints(Oe),this.positionTip()}},Me.prototype.manipulate=function(Fe){if(this.tipMoving){var Oe=this.unrotatePoint(Fe);this.tipPosition={x:Oe.x-this.manipulationStartLeft,y:Oe.y-this.manipulationStartTop},this.positionTip()}else He.prototype.manipulate.call(this,Fe)},Me.prototype.setBgColor=function(Fe){this.bgRectangle&&this.tip&&(_e.setAttributes(this.bgRectangle,[["fill",Fe]]),_e.setAttributes(this.tip,[["fill",Fe]])),this.bgColor=Fe,this.fillColorChanged(Fe)},Me.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},Me.prototype.setTipPoints=function(Fe){Fe===void 0&&(Fe=!1);var Oe=Math.min(this.height/2,15),Ue=this.height/5;Fe&&(this.tipPosition={x:Oe+Ue/2,y:this.height+20});var Be=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Be<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ue=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:Oe,y:0},this.tipBase2Position={x:Oe+Ue,y:0}):(this.tipBase1Position={x:0,y:Oe},this.tipBase2Position={x:0,y:Oe+Ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Be<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ue=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Oe-Ue,y:0},this.tipBase2Position={x:this.width-Oe,y:0}):(this.tipBase1Position={x:this.width,y:Oe},this.tipBase2Position={x:this.width,y:Oe+Ue}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Be<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ue=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Oe-Ue,y:this.height},this.tipBase2Position={x:this.width-Oe,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Oe-Ue},this.tipBase2Position={x:this.width,y:this.height-Oe}):Be<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ue=this.width/5,Oe=Math.min(this.width/2,15),this.tipBase1Position={x:Oe,y:this.height},this.tipBase2Position={x:Oe+Ue,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Oe},this.tipBase2Position={x:0,y:this.height-Oe-Ue})},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),this.positionTip()},Me.prototype.positionTip=function(){_e.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Fe=this.tipGrip.visual.transform.baseVal.getItem(0);Fe.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Fe,0)},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Me.prototype.select=function(){this.positionTip(),He.prototype.select.call(this)},Me.prototype.getState=function(){var Fe=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){var Oe=Fe;this.bgColor=Oe.bgColor,this.tipPosition=Oe.tipPosition,He.prototype.restoreState.call(this,Fe),this.createTip(),this.setTipPoints()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.tipPosition={x:this.tipPosition.x*Fe,y:this.tipPosition.y*Oe},this.positionTip()},Me.typeName="CalloutMarker",Me.title="Callout marker",Me.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>',Me}(Pt),_n=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.opacity=1,Be.strokeColor=Ue.defaultColor,Be.strokeWidth=Ue.defaultStrokeWidth,Be.strokeDasharray=Ue.defaultStrokeDasharray,Be.fillColor=Ue.defaultFillColor,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.setOpacity=Be.setOpacity.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be.strokePanel=new te("Line color",wt(Ue.defaultColorSet,["transparent"]),Ue.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.fillPanel=new te("Fill color",wt(Ue.defaultColorSet,["transparent"]),Be.fillColor,Ke),Be.fillPanel.onColorChanged=Be.setFillColor,Be.strokeWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new We("Line style",Ue.defaultStrokeDasharrays,Ue.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be.opacityPanel=new Nn("Opacity",Ue.defaultOpacitySteps,Be.opacity),Be.opacityPanel.onOpacityChanged=Be.setOpacity,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual)},Me.prototype.createVisual=function(){this.visual=_e.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)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="new"&&(this.createVisual(),this.moveVisual(Fe),this._state="creating")},Me.prototype.manipulate=function(Fe){He.prototype.manipulate.call(this,Fe)},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),this.setSize()},Me.prototype.setSize=function(){He.prototype.setSize.call(this),_e.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Me.prototype.pointerUp=function(Fe){He.prototype.pointerUp.call(this,Fe),this.setSize()},Me.prototype.setStrokeColor=function(Fe){this.strokeColor=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Fe),this.stateChanged()},Me.prototype.setFillColor=function(Fe){this.fillColor=Fe,this.visual&&_e.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Fe),this.stateChanged()},Me.prototype.setStrokeWidth=function(Fe){this.strokeWidth=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Me.prototype.setStrokeDasharray=function(Fe){this.strokeDasharray=Fe,this.visual&&_e.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Me.prototype.setOpacity=function(Fe){this.opacity=Fe,this.visual&&_e.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){var Oe=Fe;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.opacity=Oe.opacity,this.createVisual(),He.prototype.restoreState.call(this,Fe),this.setSize()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.setSize()},Me.typeName="EllipseMarker",Me.title="Ellipse marker",Me.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>',Me}(we),Xn=function(He){function Me(Fe,Oe,Ue){return He.call(this,Fe,Oe,Ue)||this}return Xe(Me,He),Object.defineProperty(Me.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.tip1&&Fe!==this.tip2)},Me.prototype.createTips=function(){this.tip1=_e.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(_e.createTransform()),this.visual.appendChild(this.tip1),this.tip2=_e.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(_e.createTransform()),this.visual.appendChild(this.tip2)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.state==="creating"&&this.createTips()},Me.prototype.adjustVisual=function(){if(He.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(_e.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()]]),_e.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 Fe=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Oe=this.tip1.transform.baseVal.getItem(0);Oe.setRotate(Fe,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Oe,0);var Ue=this.tip2.transform.baseVal.getItem(0);Ue.setRotate(Fe+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ue,0)}},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=He.prototype.getState.call(this);return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe),this.createTips(),this.adjustVisual()},Me.typeName="MeasurementMarker",Me.title="Measurement marker",Me.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>',Me}(mt),zt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.strokePanel.colors=Ue.defaultColorSet,Be.fillColor="transparent",Be}return Xe(Me,He),Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=He.prototype.getState.call(this);return Fe.typeName=Me.typeName,Fe},Me.typeName="EllipseFrameMarker",Me.title="Ellipse frame marker",Me.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>',Me}(_n),kn=function(){function He(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),He.prototype.addUndoStep=function(Me){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Me)||(this.undoStack.push(Me),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Me)&&this.redoStack.splice(0,this.redoStack.length))},He.prototype.replaceLastUndoStep=function(Me){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Me)},He.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},He.prototype.undo=function(){if(this.undoStack.length>1){var Me=this.undoStack.pop();return Me!==void 0&&this.redoStack.push(Me),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},He.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},He}(),bn=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.curveX=0,Be.curveY=0,Be.manipulationStartCurveX=0,Be.manipulationStartCurveY=0,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.positionGrips=Be.positionGrips.bind(Be),Be.addControlGrips=Be.addControlGrips.bind(Be),Be.adjustVisual=Be.adjustVisual.bind(Be),Be.setupControlBox=Be.setupControlBox.bind(Be),Be.resize=Be.resize.bind(Be),Be.strokeColor=Ue.defaultColor,Be.strokeWidth=Ue.defaultStrokeWidth,Be.strokeDasharray=Ue.defaultStrokeDasharray,Be.strokePanel=new te("Line color",Ue.defaultColorSet,Ue.defaultColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.strokeWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new We("Line style",Ue.defaultStrokeDasharrays,Ue.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual&&Fe!==this.selectorCurve&&Fe!==this.visibleCurve&&!this.curveGrip.ownsTarget(Fe))},Me.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Me.prototype.createVisual=function(){this.visual=_e.createGroup(),this.selectorCurve=_e.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=_e.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)},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Fe.x,this.curveY=Fe.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Oe)&&(this.activeGrip=this.curveGrip,this._state="resize")},Me.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),_e.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),_e.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),_e.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Me.prototype.setupControlBox=function(){He.prototype.setupControlBox.call(this),this.curveControlLine1=_e.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=_e.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)},Me.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,He.prototype.addControlGrips.call(this)},Me.prototype.positionGrips=function(){He.prototype.positionGrips.call(this);var Fe=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Fe/2,this.curveY-Fe/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()))},Me.prototype.manipulate=function(Fe){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Fe.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Fe.y-this.manipulationStartY),He.prototype.manipulate.call(this,Fe)},Me.prototype.resize=function(Fe){this.activeGrip===this.curveGrip&&(this.curveX=Fe.x,this.curveY=Fe.y),He.prototype.resize.call(this,Fe),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Me.prototype.setStrokeColor=function(Fe){this.strokeColor=Fe,this.adjustVisual(),this.colorChanged(Fe)},Me.prototype.setStrokeWidth=function(Fe){this.strokeWidth=Fe,this.adjustVisual()},Me.prototype.setStrokeDasharray=function(Fe){this.strokeDasharray=Fe,this.adjustVisual()},Me.prototype.scale=function(Fe,Oe){this.curveX=this.curveX*Fe,this.curveY=this.curveY*Oe,He.prototype.scale.call(this,Fe,Oe)},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},He.prototype.getState.call(this));return Fe.typeName=Me.typeName,Fe},Me.prototype.restoreState=function(Fe){He.prototype.restoreState.call(this,Fe);var Oe=Fe;this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.curveX=Oe.curveX,this.curveY=Oe.curveY,this.createVisual(),this.adjustVisual()},Me.typeName="CurveMarker",Me.title="Curve marker",Me.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>',Me}(nt),oi=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,Oe,Ue)||this;return Be.fillColor="transparent",Be.strokeColor="transparent",Be.strokeWidth=0,Be.strokeDasharray="",Be.textColor="transparent",Be.fontSize="1rem",Be.isMoved=!1,Be.captionText="Caption",Be.PADDING=5,Be.captionBoxWidth=0,Be.captionBoxHeight=0,Be.strokeColor=Ue.defaultColor,Be.strokeWidth=Ue.defaultStrokeWidth,Be.strokeDasharray=Ue.defaultStrokeDasharray,Be.fillColor=Ue.defaultFillColor,Be.textColor=Ue.defaultStrokeColor,Be.fontFamily=Ue.defaultFontFamily,Be.fontSize=Ue.defaultCaptionFontSize,Be.captionText=Ue.defaultCaptionText,Be.setStrokeColor=Be.setStrokeColor.bind(Be),Be.setFillColor=Be.setFillColor.bind(Be),Be.setStrokeWidth=Be.setStrokeWidth.bind(Be),Be.setStrokeDasharray=Be.setStrokeDasharray.bind(Be),Be.createVisual=Be.createVisual.bind(Be),Be.sizeCaption=Be.sizeCaption.bind(Be),Be.setCaptionText=Be.setCaptionText.bind(Be),Be.showTextEditor=Be.showTextEditor.bind(Be),Be.positionTextEditor=Be.positionTextEditor.bind(Be),Be.finishTextEditing=Be.finishTextEditing.bind(Be),Be.setFont=Be.setFont.bind(Be),Be.setTextColor=Be.setTextColor.bind(Be),Be.strokePanel=new te("Line color",wt(Ue.defaultColorSet,["transparent"]),Be.strokeColor),Be.strokePanel.onColorChanged=Be.setStrokeColor,Be.fillPanel=new te("Fill color",wt(Ue.defaultColorSet,["transparent"]),Be.fillColor,Ke),Be.fillPanel.onColorChanged=Be.setFillColor,Be.strokeWidthPanel=new Re("Line width",Ue.defaultStrokeWidths,Ue.defaultStrokeWidth),Be.strokeWidthPanel.onWidthChanged=Be.setStrokeWidth,Be.strokeStylePanel=new We("Line style",Ue.defaultStrokeDasharrays,Ue.defaultStrokeDasharray),Be.strokeStylePanel.onStyleChanged=Be.setStrokeDasharray,Be.fontFamilyPanel=new at("Font",Ue.defaultFontFamilies,Ue.defaultFontFamily),Be.fontFamilyPanel.onFontChanged=Be.setFont,Be.textColorPanel=new te("Text color",Ue.defaultColorSet,Be.textColor,Qe),Be.textColorPanel.onColorChanged=Be.setTextColor,Be}return Xe(Me,He),Me.prototype.ownsTarget=function(Fe){return!(!He.prototype.ownsTarget.call(this,Fe)&&Fe!==this.visual&&Fe!==this.frame&&Fe!==this.captionBg&&Fe!==this.captionElement)},Me.prototype.createVisual=function(){this.visual=_e.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=_e.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=_e.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=_e.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()},Me.prototype.setCaptionText=function(Fe){this.captionText=Fe,this.captionElement.textContent=this.captionText,this.sizeCaption()},Me.prototype.pointerDown=function(Fe,Oe){He.prototype.pointerDown.call(this,Fe,Oe),this.isMoved=!1,this.pointerDownPoint=Fe,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Fe),this._state="creating")},Me.prototype.manipulate=function(Fe){He.prototype.manipulate.call(this,Fe),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Fe.x-this.pointerDownPoint.x)>5||Math.abs(Fe.y-this.pointerDownPoint.y)>5)},Me.prototype.resize=function(Fe){He.prototype.resize.call(this,Fe),this.setSize()},Me.prototype.sizeCaption=function(){var Fe=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Fe.width+2*this.PADDING,this.captionBoxHeight=Fe.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),_e.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')"]]),_e.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')"]])},Me.prototype.showTextEditor=function(){var Fe=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(Oe){Oe.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Oe){Oe.key==="Enter"&&Fe.finishTextEditing(Fe.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Oe){Oe.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Fe.finishTextEditing(Fe.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Fe.finishTextEditing(Fe.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Me.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"))},Me.prototype.finishTextEditing=function(Fe){this.setCaptionText(Fe.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Me.prototype.setFont=function(Fe){this.captionElement&&_e.setAttributes(this.captionElement,[["font-family",Fe]]),this.fontFamily=Fe,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Me.prototype.setTextColor=function(Fe){this.captionElement&&_e.setAttributes(this.captionElement,[["fill",Fe]]),this.textColor=Fe,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Me.prototype.setSize=function(){He.prototype.setSize.call(this),_e.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Me.prototype.pointerUp=function(Fe){He.prototype.pointerUp.call(this,Fe),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Me.prototype.dblClick=function(Fe,Oe){He.prototype.dblClick.call(this,Fe,Oe),this.showTextEditor()},Me.prototype.setStrokeColor=function(Fe){this.strokeColor=Fe,this.frame&&_e.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Fe),this.stateChanged()},Me.prototype.setFillColor=function(Fe){this.fillColor=Fe,this.captionBg&&_e.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Fe),this.stateChanged()},Me.prototype.setStrokeWidth=function(Fe){this.strokeWidth=Fe,this.frame&&_e.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Me.prototype.setStrokeDasharray=function(Fe){this.strokeDasharray=Fe,this.frame&&_e.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Me.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Me.prototype.getState=function(){var Fe=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},He.prototype.getState.call(this));return Fe.typeName=this.typeName,Fe},Me.prototype.restoreState=function(Fe){var Oe=Fe;this.fillColor=Oe.fillColor,this.strokeColor=Oe.strokeColor,this.strokeWidth=Oe.strokeWidth,this.strokeDasharray=Oe.strokeDasharray,this.textColor=Oe.textColor,this.fontFamily=Oe.fontFamily,this.captionText=Oe.captionText,this.fontSize=Oe.fontSize,this.createVisual(),He.prototype.restoreState.call(this,Fe),this.setSize()},Me.prototype.scale=function(Fe,Oe){He.prototype.scale.call(this,Fe,Oe),this.setSize()},Me.typeName="CaptionFrameMarker",Me.title="Caption frame marker",Me.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>',Me}(we),Yt=function(){function He(Me,Fe){Fe===void 0&&(Fe=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Me,this.cancelable=Fe}return Object.defineProperty(He.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),He.prototype.preventDefault=function(){this._defaultPrevented=!0},He}(),Mt=function(He){function Me(Fe,Oe,Ue){var Be=He.call(this,Fe,!1)||this;return Be.dataUrl=Oe,Be.state=Ue,Be}return Xe(Me,He),Me}(Yt),_t=function(He){function Me(Fe,Oe,Ue){Ue===void 0&&(Ue=!1);var Be=He.call(this,Fe,Ue)||this;return Be.marker=Oe,Be}return Xe(Me,He),Me}(Yt),mn=function(){function He(){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 He.prototype.addEventListener=function(Me,Fe){this[Me].push(Fe)},He.prototype.removeEventListener=function(Me,Fe){var Oe=this[Me].indexOf(Fe);Oe>-1&&this[Me].splice(Oe,1)},He}(),rn=function(){function He(Me){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new ht,this._isOpen=!1,this.undoRedoManager=new kn,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 mn,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=He.instanceCounter++,this.styles=new pt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Me,this.targetRoot=document.body,this.width=Me.clientWidth,this.height=Me.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(He.prototype,"ALL_MARKER_TYPES",{get:function(){return[lt,Nt,Ln,Pt,zt,_n,fn,Je,Xn,xn,mt,bn,oi]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[lt,Nt,Ln,Pt,_n,fn,Je]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"BASIC_MARKER_TYPES",{get:function(){return[lt,Nt,Ln,Pt,fn]},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Me){var Fe=this;this._availableMarkerTypes.splice(0),Me.forEach(function(Oe){if(typeof Oe=="string"){var Ue=Fe.ALL_MARKER_TYPES.find(function(Be){return Be.typeName===Oe});Ue!==void 0&&Fe._availableMarkerTypes.push(Ue)}else Fe._availableMarkerTypes.push(Oe)})},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Me){this._zoomLevel=Me,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(He.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),He.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),Ve.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},He.prototype.show=function(){var Me=this;this.styles.styleSheetRoot===void 0&&ut.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ut.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Fe){return Fe(new Yt(Me))})},He.prototype.render=function(){return Lt(this,void 0,void 0,function(){var Me;return At(this,function(Fe){switch(Fe.label){case 0:return this.setCurrentMarker(),(Me=new xt).naturalSize=this.renderAtNaturalSize,Me.imageType=this.renderImageType,Me.imageQuality=this.renderImageQuality,Me.markersOnly=this.renderMarkersOnly,Me.width=this.renderWidth,Me.height=this.renderHeight,[4,Me.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Fe.sent(),[4,Me.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Fe.sent()]}})})},He.prototype.close=function(Me){var Fe=this;if(Me===void 0&&(Me=!1),this.isOpen){var Oe=!1;Me||this.eventListeners.beforeclose.forEach(function(Ue){var Be=new Yt(Fe,!0);Ue(Be),Be.defaultPrevented&&(Oe=!0)}),Oe||(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(Ue){return Ue(new Yt(Fe))}),this.detachEvents(),this._isOpen=!1)}},He.prototype.addMarkersToToolbar=function(){for(var Me,Fe=[],Oe=0;Oe<arguments.length;Oe++)Fe[Oe]=arguments[Oe];(Me=this._availableMarkerTypes).push.apply(Me,Fe)},He.prototype.addRenderEventListener=function(Me){this.addEventListener("render",function(Fe){Me(Fe.dataUrl,Fe.state)})},He.prototype.removeRenderEventListener=function(Me){},He.prototype.addCloseEventListener=function(Me){this.addEventListener("close",function(){Me()})},He.prototype.removeCloseEventListener=function(Me){},He.prototype.setupResizeObserver=function(){var Me=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Me.resize(Me.target.clientWidth,Me.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Me.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},He.prototype.onPopupTargetResize=function(){var Me=1*this.target.clientWidth/this.target.clientHeight,Fe=this.editorCanvas.clientWidth/Me>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Me:this.editorCanvas.clientWidth,Oe=Fe<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Me;this.resize(Fe,Oe)},He.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},He.prototype.resize=function(Me,Fe){this._isResizing=!0;var Oe=Me/this.imageWidth,Ue=Fe/this.imageHeight;this.imageWidth=Math.round(Me),this.imageHeight=Math.round(Fe),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(Oe,Ue),this._isResizing=!1},He.prototype.scaleMarkers=function(Me,Fe){var Oe,Ue=this;this._currentMarker&&this._currentMarker instanceof Pt?this._currentMarker.scale(Me,Fe):(Oe=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Be){Be!==Ue._currentMarker&&Be.scale(Me,Fe)}),Oe!==void 0&&this.setCurrentMarker(Oe)},He.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"},He.prototype.setTopLeft=function(){var Me=this.editingTarget.getBoundingClientRect(),Fe=this.editorCanvas.getBoundingClientRect();this.left=Me.left-Fe.left,this.top=Me.top-Fe.top},He.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)},He.prototype.addDefs=function(){for(var Me,Fe=[],Oe=0;Oe<arguments.length;Oe++)Fe[Oe]=arguments[Oe];this.defs=_e.createDefs(),this.addDefsToImage(),(Me=this.defs).append.apply(Me,Fe)},He.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},He.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)},He.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},He.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},He.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)},He.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},He.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)},He.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 Me=document.createElement("a");Me.href="https://markerjs.com/",Me.target="_blank",Me.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>',Me.title="Powered by marker.js",Me.style.display="grid",Me.style.alignItems="center",Me.style.justifyItems="center",Me.style.padding="3px",Me.style.width="20px",Me.style.height="20px",this.logoUI.appendChild(Me),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},He.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")},He.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"},He.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},He.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 Me=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=Me+"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 jt(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 Te(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},He.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},He.prototype.removeMarker=function(Me){this.markerImage.removeChild(Me.container),this.markers.indexOf(Me)>-1&&this.markers.splice(this.markers.indexOf(Me),1),Me.dispose()},He.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())},He.prototype.toolbarButtonClicked=function(Me,Fe){if(Me==="marker"&&Fe!==void 0)this.createNewMarker(Fe);else if(Me==="action")switch(Fe){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()}},He.prototype.deleteSelectedMarker=function(){var Me=this;if(this._currentMarker!==void 0){var Fe=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ue){var Be=new _t(Me,Me._currentMarker,!0);Ue(Be),Be.defaultPrevented&&(Fe=!0)}),!Fe){var Oe=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(Ue){return Ue(new _t(Me,Oe))})}}},He.prototype.clear=function(){var Me=this,Fe=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(ot){var Cn=new _t(Me,void 0,!0);ot(Cn),Cn.defaultPrevented&&(Fe=!0)}),!Fe)){this.setCurrentMarker();for(var Oe=function(ot){var Cn=Ue.markers[ot];Ue.setCurrentMarker(Ue.markers[ot]),Ue._currentMarker.dispose(),Ue.markerImage.removeChild(Ue._currentMarker.container),Ue.markers.splice(Ue.markers.indexOf(Ue._currentMarker),1),Ue.eventListeners.markerdelete.forEach(function(ci){return ci(new _t(Me,Cn))})},Ue=this,Be=this.markers.length-1;Be>=0;Be--)Oe(Be);this.addUndoStep()}},Object.defineProperty(He.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),He.prototype.showNotesEditor=function(){var Me;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=(Me=this._currentMarker.notes)!==null&&Me!==void 0?Me:"",this.overlayContainer.appendChild(this.notesArea))},He.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)},He.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},He.prototype.addUndoStep=function(){var Me=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Fe=this.getState(),Oe=this.undoRedoManager.getLastUndoStep();if(!Oe||Oe.width===Fe.width&&Oe.height===Fe.height){var Ue=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Fe),Ue<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Be){return Be(new Yt(Me))})}else this.undoRedoManager.replaceLastUndoStep(Fe),this.eventListeners.statechange.forEach(function(Be){return Be(new Yt(Me))})}},He.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},He.prototype.undoStep=function(){var Me=this,Fe=this.undoRedoManager.undo();Fe!==void 0&&(this.restoreState(Fe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Oe){return Oe(new Yt(Me))}))},He.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},He.prototype.redoStep=function(){var Me=this,Fe=this.undoRedoManager.redo();Fe!==void 0&&(this.restoreState(Fe),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Oe){return Oe(new Yt(Me))}))},He.prototype.stepZoom=function(){var Me=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Me<this.zoomSteps.length-1?this.zoomSteps[Me+1]:this.zoomSteps[0]},He.prototype.panTo=function(Me){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Me.x,top:this.prevPanPoint.y-Me.y}),this.prevPanPoint=Me},He.prototype.startRenderAndClose=function(){return Lt(this,void 0,void 0,function(){var Me,Fe,Oe=this;return At(this,function(Ue){switch(Ue.label){case 0:return[4,this.render()];case 1:return Me=Ue.sent(),Fe=this.getState(),this.eventListeners.render.forEach(function(Be){return Be(new Mt(Oe,Me,Fe))}),this.close(!0),[2]}})})},He.prototype.getState=function(Me){Me===!0&&this.setCurrentMarker();var Fe={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Oe){return Fe.markers.push(Oe.getState())}),Fe},He.prototype.restoreState=function(Me){var Fe=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Me.markers.forEach(function(Oe){var Ue=Fe._availableMarkerTypes.find(function(ot){return ot.typeName===Oe.typeName});if(Ue!==void 0){var Be=Fe.addNewMarker(Ue);Be.restoreState(Oe),Fe.markers.push(Be)}}),Me.width&&Me.height&&(Me.width!==this.imageWidth||Me.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Me.width,this.imageHeight/Me.height),this.eventListeners.restorestate.forEach(function(Oe){return Oe(new Yt(Fe))})},He.prototype.addNewMarker=function(Me){var Fe=_e.createGroup();return this.markerImage.appendChild(Fe),new Me(Fe,this.overlayContainer,this.settings)},He.prototype.createNewMarker=function(Me){var Fe,Oe=this;(Fe=typeof Me=="string"?this._availableMarkerTypes.find(function(Ue){return Ue.typeName===Me}):Me)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Fe),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(Fe.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ue){return Ue(new _t(Oe,Oe._currentMarker))}))},He.prototype.markerCreated=function(Me){var Fe=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Me),this.setCurrentMarker(Me),Me instanceof Nt&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Nt):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Oe){return Oe(new _t(Fe,Fe._currentMarker))})},He.prototype.colorChanged=function(Me){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Me,this.settings.defaultStrokeColor=Me)},He.prototype.fillColorChanged=function(Me){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Me)},He.prototype.markerStateChanged=function(Me){var Fe=this;this.eventListeners.markerchange.forEach(function(Oe){return Oe(new _t(Fe,Me))})},He.prototype.setCurrentMarker=function(Me){var Fe=this;this._currentMarker!==Me&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Oe){return Oe(new _t(Fe,Fe._currentMarker))})),this._currentMarker=Me,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(Oe){return Oe(new _t(Fe,Fe._currentMarker))}))},He.prototype.onPointerDown=function(Me){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Me.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Fe=this.markers.find(function(Oe){return Oe.ownsTarget(Me.target)});Fe!==void 0?(this.setCurrentMarker(Fe),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Me.clientX,Me.clientY),Me.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Me.clientX,y:Me.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Me.clientX,Me.clientY))},He.prototype.onDblClick=function(Me){if(this._isFocused||this.focus(),this.mode==="select"){var Fe=this.markers.find(function(Oe){return Oe.ownsTarget(Me.target)});Fe!==void 0&&Fe!==this._currentMarker&&this.setCurrentMarker(Fe),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Me.clientX,Me.clientY),Me.target):this.setCurrentMarker()}},He.prototype.onPointerMove=function(Me){this.touchPoints!==1&&Me.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Me.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Me.clientX,Me.clientY)):this.zoomLevel>1&&this.panTo({x:Me.clientX,y:Me.clientY}))},He.prototype.onPointerUp=function(Me){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Me.clientX,Me.clientY)),this.isDragging=!1,this.addUndoStep()},He.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},He.prototype.onKeyUp=function(Me){this._currentMarker===void 0||this.notesArea!==void 0||Me.key!=="Delete"&&Me.key!=="Backspace"||this.deleteSelectedMarker()},He.prototype.clientToLocalCoordinates=function(Me,Fe){var Oe=this.markerImage.getBoundingClientRect();return{x:(Me-Oe.left)/this.zoomLevel,y:(Fe-Oe.top)/this.zoomLevel}},He.prototype.onWindowResize=function(){this.positionUI()},He.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Me=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Me+"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()},He.prototype.addLicenseKey=function(Me){Ve.addKey(Me)},He.prototype.addEventListener=function(Me,Fe){this.eventListeners.addEventListener(Me,Fe)},He.prototype.removeEventListener=function(Me,Fe){this.eventListeners.removeEventListener(Me,Fe)},He.prototype.renderState=function(Me){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Me),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(He.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),He.prototype.focus=function(){var Me=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Fe){return Fe(new Yt(Me))}))},He.prototype.blur=function(){var Me=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Fe){return Fe(new Yt(Me))}))},He.instanceCounter=0,He}()},13272:function(Rn,$n,be){"use strict";be.d($n,{s:function(){return Yr},default:function(){return sa}});function le(){return le=Object.assign?Object.assign.bind():function(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie];for(var gt in st)({}).hasOwnProperty.call(st,gt)&&(ke[gt]=st[gt])}return ke},le.apply(null,arguments)}function Xe(ke){"@babel/helpers - typeof";return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ie){return typeof Ie}:function(Ie){return Ie&&typeof Symbol=="function"&&Ie.constructor===Symbol&&Ie!==Symbol.prototype?"symbol":typeof Ie},Xe(ke)}function Lt(ke,Ie){if(Xe(ke)!="object"||!ke)return ke;var st=ke[Symbol.toPrimitive];if(st!==void 0){var gt=st.call(ke,Ie||"default");if(Xe(gt)!="object")return gt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ie==="string"?String:Number)(ke)}function At(ke){var Ie=Lt(ke,"string");return Xe(Ie)=="symbol"?Ie:Ie+""}function wt(ke,Ie,st){return(Ie=At(Ie))in ke?Object.defineProperty(ke,Ie,{value:st,enumerable:!0,configurable:!0,writable:!0}):ke[Ie]=st,ke}function _e(ke,Ie){var st=Object.keys(ke);if(Object.getOwnPropertySymbols){var gt=Object.getOwnPropertySymbols(ke);Ie&&(gt=gt.filter(function(Xt){return Object.getOwnPropertyDescriptor(ke,Xt).enumerable})),st.push.apply(st,gt)}return st}function Ve(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie]!=null?arguments[Ie]:{};Ie%2?_e(Object(st),!0).forEach(function(gt){wt(ke,gt,st[gt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(st)):_e(Object(st)).forEach(function(gt){Object.defineProperty(ke,gt,Object.getOwnPropertyDescriptor(st,gt))})}return ke}function xt(ke,Ie){(Ie==null||Ie>ke.length)&&(Ie=ke.length);for(var st=0,gt=Array(Ie);st<Ie;st++)gt[st]=ke[st];return gt}function ut(ke){if(Array.isArray(ke))return xt(ke)}function pt(ke){if(typeof Symbol!="undefined"&&ke[Symbol.iterator]!=null||ke["@@iterator"]!=null)return Array.from(ke)}function Rt(ke,Ie){if(ke){if(typeof ke=="string")return xt(ke,Ie);var st={}.toString.call(ke).slice(8,-1);return st==="Object"&&ke.constructor&&(st=ke.constructor.name),st==="Map"||st==="Set"?Array.from(ke):st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st)?xt(ke,Ie):void 0}}function Ot(){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 jt(ke){return ut(ke)||pt(ke)||Rt(ke)||Ot()}function Te(ke){if(Array.isArray(ke))return ke}function ne(ke,Ie){var st=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(st!=null){var gt,Xt,vn,Dn,di=[],yi=!0,ai=!1;try{if(vn=(st=st.call(ke)).next,Ie===0){if(Object(st)!==st)return;yi=!1}else for(;!(yi=(gt=vn.call(st)).done)&&(di.push(gt.value),di.length!==Ie);yi=!0);}catch(Hi){ai=!0,Xt=Hi}finally{try{if(!yi&&st.return!=null&&(Dn=st.return(),Object(Dn)!==Dn))return}finally{if(ai)throw Xt}}return di}}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 ce(ke,Ie){return Te(ke)||ne(ke,Ie)||Rt(ke,Ie)||te()}function se(ke,Ie){if(ke==null)return{};var st={};for(var gt in ke)if({}.hasOwnProperty.call(ke,gt)){if(Ie.indexOf(gt)!==-1)continue;st[gt]=ke[gt]}return st}function ge(ke,Ie){if(ke==null)return{};var st,gt,Xt=se(ke,Ie);if(Object.getOwnPropertySymbols){var vn=Object.getOwnPropertySymbols(ke);for(gt=0;gt<vn.length;gt++)st=vn[gt],Ie.indexOf(st)===-1&&{}.propertyIsEnumerable.call(ke,st)&&(Xt[st]=ke[st])}return Xt}function ye(){return ye=Object.assign?Object.assign.bind():function(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie];for(var gt in st)Object.prototype.hasOwnProperty.call(st,gt)&&(ke[gt]=st[gt])}return ke},ye.apply(this,arguments)}function we(ke,Ie){(Ie==null||Ie>ke.length)&&(Ie=ke.length);for(var st=0,gt=new Array(Ie);st<Ie;st++)gt[st]=ke[st];return gt}function Ce(ke){if(Array.isArray(ke))return we(ke)}function Re(ke){if(typeof Symbol!="undefined"&&ke[Symbol.iterator]!=null||ke["@@iterator"]!=null)return Array.from(ke)}function We(ke,Ie){if(ke){if(typeof ke=="string")return we(ke,Ie);var st=Object.prototype.toString.call(ke).slice(8,-1);if(st==="Object"&&ke.constructor&&(st=ke.constructor.name),st==="Map"||st==="Set")return Array.from(ke);if(st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st))return we(ke,Ie)}}function lt(){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 ht(ke){return Ce(ke)||Re(ke)||We(ke)||lt()}function nt(ke){"@babel/helpers - typeof";return nt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ie){return typeof Ie}:function(Ie){return Ie&&typeof Symbol=="function"&&Ie.constructor===Symbol&&Ie!==Symbol.prototype?"symbol":typeof Ie},nt(ke)}function mt(ke,Ie){if(nt(ke)!=="object"||ke===null)return ke;var st=ke[Symbol.toPrimitive];if(st!==void 0){var gt=st.call(ke,Ie||"default");if(nt(gt)!=="object")return gt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ie==="string"?String:Number)(ke)}function at(ke){var Ie=mt(ke,"string");return nt(Ie)==="symbol"?Ie:String(Ie)}function Pt(ke,Ie,st){return Ie=at(Ie),Ie in ke?Object.defineProperty(ke,Ie,{value:st,enumerable:!0,configurable:!0,writable:!0}):ke[Ie]=st,ke}function Nt(ke,Ie){var st=Object.keys(ke);if(Object.getOwnPropertySymbols){var gt=Object.getOwnPropertySymbols(ke);Ie&&(gt=gt.filter(function(Xt){return Object.getOwnPropertyDescriptor(ke,Xt).enumerable})),st.push.apply(st,gt)}return st}function Et(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie]!=null?arguments[Ie]:{};Ie%2?Nt(Object(st),!0).forEach(function(gt){Pt(ke,gt,st[gt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(st)):Nt(Object(st)).forEach(function(gt){Object.defineProperty(ke,gt,Object.getOwnPropertyDescriptor(st,gt))})}return ke}function Ln(ke){if(Array.isArray(ke))return ke}function xn(ke,Ie){var st=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(st!=null){var gt,Xt,vn,Dn,di=[],yi=!0,ai=!1;try{if(vn=(st=st.call(ke)).next,Ie===0){if(Object(st)!==st)return;yi=!1}else for(;!(yi=(gt=vn.call(st)).done)&&(di.push(gt.value),di.length!==Ie);yi=!0);}catch(Hi){ai=!0,Xt=Hi}finally{try{if(!yi&&st.return!=null&&(Dn=st.return(),Object(Dn)!==Dn))return}finally{if(ai)throw Xt}}return di}}function Nn(){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 fn(ke,Ie){return Ln(ke)||xn(ke,Ie)||We(ke,Ie)||Nn()}function Qe(ke,Ie){if(ke==null)return{};var st={},gt=Object.keys(ke),Xt,vn;for(vn=0;vn<gt.length;vn++)Xt=gt[vn],!(Ie.indexOf(Xt)>=0)&&(st[Xt]=ke[Xt]);return st}function Ke(ke,Ie){if(ke==null)return{};var st=Qe(ke,Ie),gt,Xt;if(Object.getOwnPropertySymbols){var vn=Object.getOwnPropertySymbols(ke);for(Xt=0;Xt<vn.length;Xt++)gt=vn[Xt],!(Ie.indexOf(gt)>=0)&&Object.prototype.propertyIsEnumerable.call(ke,gt)&&(st[gt]=ke[gt])}return st}var Je=be(67294);function _n(ke){var Ie=Je.useRef();Ie.current=ke;var st=Je.useCallback(function(){for(var gt,Xt=arguments.length,vn=new Array(Xt),Dn=0;Dn<Xt;Dn++)vn[Dn]=arguments[Dn];return(gt=Ie.current)===null||gt===void 0?void 0:gt.call.apply(gt,[Ie].concat(vn))},[]);return st}function Xn(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var zt=Xn()?Je.useLayoutEffect:Je.useEffect,kn=zt,bn=function(Ie,st){var gt=Je.useRef(!0);zt(function(){if(!gt.current)return Ie()},st),zt(function(){return gt.current=!1,function(){gt.current=!0}},[])};function oi(ke){var Ie=Je.useRef(!1),st=Je.useState(ke),gt=fn(st,2),Xt=gt[0],vn=gt[1];Je.useEffect(function(){return Ie.current=!1,function(){Ie.current=!0}},[]);function Dn(di,yi){yi&&Ie.current||vn(di)}return[Xt,Dn]}function Yt(ke){return ke!==void 0}function Mt(ke,Ie){var st=Ie||{},gt=st.defaultValue,Xt=st.value,vn=st.onChange,Dn=st.postState,di=oi(function(){return Yt(Xt)?Xt:Yt(gt)?typeof gt=="function"?gt():gt:typeof ke=="function"?ke():ke}),yi=fn(di,2),ai=yi[0],Hi=yi[1],$i=Xt!==void 0?Xt:ai,Pr=Dn?Dn($i):$i,Ui=_n(vn),zi=oi([$i]),cr=fn(zi,2),Er=cr[0],To=cr[1];bn(function(){var Eo=Er[0];ai!==Eo&&Ui(ai,Eo)},[Er]),bn(function(){Yt(Xt)||Hi(Xt)},[Xt]);var ea=_n(function(Eo,Po){Hi(Eo,Po),To([$i],Po)});return[Pr,ea]}var _t={};function mn(ke,Ie){}function rn(ke,Ie){}function He(){_t={}}function Me(ke,Ie,st){!Ie&&!_t[st]&&(ke(!1,st),_t[st]=!0)}function Fe(ke,Ie){Me(mn,ke,Ie)}function Oe(ke,Ie){Me(rn,ke,Ie)}var Ue=Fe,Be=be(94184),ot=be.n(Be),Cn=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))},ci=be(16357);function si(ke,Ie,st){var gt=Je.useRef({});return(!("value"in gt.current)||st(gt.current.condition,Ie))&&(gt.current.value=ke(),gt.current.condition=Ie),gt.current.value}function pn(ke,Ie){typeof ke=="function"?ke(Ie):nt(ke)==="object"&&ke&&"current"in ke&&(ke.current=Ie)}function qn(){for(var ke=arguments.length,Ie=new Array(ke),st=0;st<ke;st++)Ie[st]=arguments[st];var gt=Ie.filter(function(Xt){return Xt});return gt.length<=1?gt[0]:function(Xt){Ie.forEach(function(vn){pn(vn,Xt)})}}function en(){for(var ke=arguments.length,Ie=new Array(ke),st=0;st<ke;st++)Ie[st]=arguments[st];return si(function(){return qn.apply(void 0,Ie)},Ie,function(gt,Xt){return gt.length===Xt.length&&gt.every(function(vn,Dn){return vn===Xt[Dn]})})}function wi(ke){var Ie,st,gt=isMemo(ke)?ke.type.type:ke.type;return!(typeof gt=="function"&&!((Ie=gt.prototype)!==null&&Ie!==void 0&&Ie.render)||typeof ke=="function"&&!((st=ke.prototype)!==null&&st!==void 0&&st.render))}var Si=function(Ie){var st=Ie.className,gt=Ie.customizeIcon,Xt=Ie.customizeIconProps,vn=Ie.children,Dn=Ie.onMouseDown,di=Ie.onClick,yi=typeof gt=="function"?gt(Xt):gt;return Je.createElement("span",{className:st,onMouseDown:function(Hi){Hi.preventDefault(),Dn==null||Dn(Hi)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:di,"aria-hidden":!0},yi!==void 0?yi:Je.createElement("span",{className:ot()(st.split(/\s+/).map(function(ai){return"".concat(ai,"-icon")}))},vn))},Di=Si,Ti=function(Ie,st,gt,Xt,vn){var Dn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,di=arguments.length>6?arguments[6]:void 0,yi=arguments.length>7?arguments[7]:void 0,ai=Je.useMemo(function(){if(nt(Xt)==="object")return Xt.clearIcon;if(vn)return vn},[Xt,vn]),Hi=Je.useMemo(function(){return!!(!Dn&&Xt&&(gt.length||di)&&!(yi==="combobox"&&di===""))},[Xt,Dn,gt.length,di,yi]);return{allowClear:Hi,clearIcon:Je.createElement(Di,{className:"".concat(Ie,"-clear"),onMouseDown:st,customizeIcon:ai},"\xD7")}},ro=Je.createContext(null);function Zr(){return Je.useContext(ro)}function Fi(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Ie=Je.useState(!1),st=fn(Ie,2),gt=st[0],Xt=st[1],vn=Je.useRef(null),Dn=function(){window.clearTimeout(vn.current)};Je.useEffect(function(){return Dn},[]);var di=function(ai,Hi){Dn(),vn.current=window.setTimeout(function(){Xt(ai),Hi&&Hi()},ke)};return[gt,di,Dn]}function mi(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Ie=Je.useRef(null),st=Je.useRef(null);Je.useEffect(function(){return function(){window.clearTimeout(st.current)}},[]);function gt(Xt){(Xt||Ie.current===null)&&(Ie.current=Xt),window.clearTimeout(st.current),st.current=window.setTimeout(function(){Ie.current=null},ke)}return[function(){return Ie.current},gt]}function Co(ke,Ie,st,gt){var Xt=Je.useRef(null);Xt.current={open:Ie,triggerOpen:st,customizedTrigger:gt},Je.useEffect(function(){function vn(Dn){var di;if(!((di=Xt.current)!==null&&di!==void 0&&di.customizedTrigger)){var yi=Dn.target;yi.shadowRoot&&Dn.composed&&(yi=Dn.composedPath()[0]||yi),Xt.current.open&&ke().filter(function(ai){return ai}).every(function(ai){return!ai.contains(yi)&&ai!==yi})&&Xt.current.triggerOpen(!1)}}return window.addEventListener("mousedown",vn),function(){return window.removeEventListener("mousedown",vn)}},[])}var jn={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(Ie){var st=Ie.keyCode;if(Ie.altKey&&!Ie.ctrlKey||Ie.metaKey||st>=jn.F1&&st<=jn.F12)return!1;switch(st){case jn.ALT:case jn.CAPS_LOCK:case jn.CONTEXT_MENU:case jn.CTRL:case jn.DOWN:case jn.END:case jn.ESC:case jn.HOME:case jn.INSERT:case jn.LEFT:case jn.MAC_FF_META:case jn.META:case jn.NUMLOCK:case jn.NUM_CENTER:case jn.PAGE_DOWN:case jn.PAGE_UP:case jn.PAUSE:case jn.PRINT_SCREEN:case jn.RIGHT:case jn.SHIFT:case jn.UP:case jn.WIN_KEY:case jn.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ie){if(Ie>=jn.ZERO&&Ie<=jn.NINE||Ie>=jn.NUM_ZERO&&Ie<=jn.NUM_MULTIPLY||Ie>=jn.A&&Ie<=jn.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ie===0)return!0;switch(Ie){case jn.SPACE:case jn.QUESTION_MARK:case jn.NUM_PLUS:case jn.NUM_MINUS:case jn.NUM_PERIOD:case jn.NUM_DIVISION:case jn.SEMICOLON:case jn.DASH:case jn.EQUALS:case jn.COMMA:case jn.PERIOD:case jn.SLASH:case jn.APOSTROPHE:case jn.SINGLE_QUOTE:case jn.OPEN_SQUARE_BRACKET:case jn.BACKSLASH:case jn.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},yn=jn;function Jr(ke){return ke&&![yn.ESC,yn.SHIFT,yn.BACKSPACE,yn.TAB,yn.WIN_KEY,yn.ALT,yn.META,yn.WIN_KEY_RIGHT,yn.CTRL,yn.SEMICOLON,yn.EQUALS,yn.CAPS_LOCK,yn.CONTEXT_MENU,yn.F1,yn.F2,yn.F3,yn.F4,yn.F5,yn.F6,yn.F7,yn.F8,yn.F9,yn.F10,yn.F11,yn.F12].includes(ke)}var lo=`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`,hr=`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`,Nr="".concat(lo," ").concat(hr).split(/[\s\n]+/),Xo="aria-",ji="data-";function Mi(ke,Ie){return ke.indexOf(Ie)===0}function Oi(ke){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,st;Ie===!1?st={aria:!0,data:!0,attr:!0}:Ie===!0?st={aria:!0}:st=Et({},Ie);var gt={};return Object.keys(ke).forEach(function(Xt){(st.aria&&(Xt==="role"||Mi(Xt,Xo))||st.data&&Mi(Xt,ji)||st.attr&&Nr.includes(Xt))&&(gt[Xt]=ke[Xt])}),gt}function vr(){return vr=Object.assign?Object.assign.bind():function(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie];for(var gt in st)Object.prototype.hasOwnProperty.call(st,gt)&&(ke[gt]=st[gt])}return ke},vr.apply(this,arguments)}function Dr(ke){"@babel/helpers - typeof";return Dr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ie){return typeof Ie}:function(Ie){return Ie&&typeof Symbol=="function"&&Ie.constructor===Symbol&&Ie!==Symbol.prototype?"symbol":typeof Ie},Dr(ke)}function Cr(ke,Ie){if(Dr(ke)!=="object"||ke===null)return ke;var st=ke[Symbol.toPrimitive];if(st!==void 0){var gt=st.call(ke,Ie||"default");if(Dr(gt)!=="object")return gt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ie==="string"?String:Number)(ke)}function En(ke){var Ie=Cr(ke,"string");return Dr(Ie)==="symbol"?Ie:String(Ie)}function Ee(ke,Ie,st){return Ie=En(Ie),Ie in ke?Object.defineProperty(ke,Ie,{value:st,enumerable:!0,configurable:!0,writable:!0}):ke[Ie]=st,ke}function on(ke,Ie){var st=Object.keys(ke);if(Object.getOwnPropertySymbols){var gt=Object.getOwnPropertySymbols(ke);Ie&&(gt=gt.filter(function(Xt){return Object.getOwnPropertyDescriptor(ke,Xt).enumerable})),st.push.apply(st,gt)}return st}function gn(ke){for(var Ie=1;Ie<arguments.length;Ie++){var st=arguments[Ie]!=null?arguments[Ie]:{};Ie%2?on(Object(st),!0).forEach(function(gt){Ee(ke,gt,st[gt])}):Object.getOwnPropertyDescriptors?Object.defineProperties(ke,Object.getOwnPropertyDescriptors(st)):on(Object(st)).forEach(function(gt){Object.defineProperty(ke,gt,Object.getOwnPropertyDescriptor(st,gt))})}return ke}function Mn(ke){if(Array.isArray(ke))return ke}function In(ke,Ie){var st=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(st!=null){var gt,Xt,vn,Dn,di=[],yi=!0,ai=!1;try{if(vn=(st=st.call(ke)).next,Ie===0){if(Object(st)!==st)return;yi=!1}else for(;!(yi=(gt=vn.call(st)).done)&&(di.push(gt.value),di.length!==Ie);yi=!0);}catch(Hi){ai=!0,Xt=Hi}finally{try{if(!yi&&st.return!=null&&(Dn=st.return(),Object(Dn)!==Dn))return}finally{if(ai)throw Xt}}return di}}function ii(ke,Ie){(Ie==null||Ie>ke.length)&&(Ie=ke.length);for(var st=0,gt=new Array(Ie);st<Ie;st++)gt[st]=ke[st];return gt}function Ci(ke,Ie){if(ke){if(typeof ke=="string")return ii(ke,Ie);var st=Object.prototype.toString.call(ke).slice(8,-1);if(st==="Object"&&ke.constructor&&(st=ke.constructor.name),st==="Map"||st==="Set")return Array.from(ke);if(st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st))return ii(ke,Ie)}}function Ji(){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 Vt(ke,Ie){return Mn(ke)||In(ke,Ie)||Ci(ke,Ie)||Ji()}function Zt(ke,Ie){if(ke==null)return{};var st={},gt=Object.keys(ke),Xt,vn;for(vn=0;vn<gt.length;vn++)Xt=gt[vn],!(Ie.indexOf(Xt)>=0)&&(st[Xt]=ke[Xt]);return st}function It(ke,Ie){if(ke==null)return{};var st=Zt(ke,Ie),gt,Xt;if(Object.getOwnPropertySymbols){var vn=Object.getOwnPropertySymbols(ke);for(Xt=0;Xt<vn.length;Xt++)gt=vn[Xt],!(Ie.indexOf(gt)>=0)&&Object.prototype.propertyIsEnumerable.call(ke,gt)&&(st[gt]=ke[gt])}return st}var dn=be(48555);function Ri(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var hi=Ri()?Je.useLayoutEffect:Je.useEffect,ri=function(Ie,st){var gt=Je.useRef(!0);hi(function(){return Ie(gt.current)},st),hi(function(){return gt.current=!1,function(){gt.current=!0}},[])},Kt=function(Ie,st){ri(function(gt){if(!gt)return Ie()},st)},wn=ri,Ki=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],wr=void 0;function Kn(ke,Ie){var st=ke.prefixCls,gt=ke.invalidate,Xt=ke.item,vn=ke.renderItem,Dn=ke.responsive,di=ke.responsiveDisabled,yi=ke.registerSize,ai=ke.itemKey,Hi=ke.className,$i=ke.style,Pr=ke.children,Ui=ke.display,zi=ke.order,cr=ke.component,Er=cr===void 0?"div":cr,To=It(ke,Ki),ea=Dn&&!Ui;function Eo($r){yi(ai,$r)}Je.useEffect(function(){return function(){Eo(null)}},[]);var Po=vn&&Xt!==wr?vn(Xt):Pr,Ma;gt||(Ma={opacity:ea?0:1,height:ea?0:wr,overflowY:ea?"hidden":wr,order:Dn?zi:wr,pointerEvents:ea?"none":wr,position:ea?"absolute":wr});var or={};ea&&(or["aria-hidden"]=!0);var _o=Je.createElement(Er,vr({className:ot()(!gt&&st,Hi),style:gn(gn({},Ma),$i)},or,To,{ref:Ie}),Po);return Dn&&(_o=Je.createElement(dn.Z,{onResize:function(Oo){var fa=Oo.offsetWidth;Eo(fa)},disabled:di},_o)),_o}var Wt=Je.forwardRef(Kn);Wt.displayName="Item";var Yi=Wt;function pr(ke){var Ie=Je.useRef();Ie.current=ke;var st=Je.useCallback(function(){for(var gt,Xt=arguments.length,vn=new Array(Xt),Dn=0;Dn<Xt;Dn++)vn[Dn]=arguments[Dn];return(gt=Ie.current)===null||gt===void 0?void 0:gt.call.apply(gt,[Ie].concat(vn))},[]);return st}var Ro=be(73935),Zn=function(Ie){return+setTimeout(Ie,16)},Ni=function(Ie){return clearTimeout(Ie)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Zn=function(Ie){return window.requestAnimationFrame(Ie)},Ni=function(Ie){return window.cancelAnimationFrame(Ie)});var Pi=0,xs=new Map;function qa(ke){xs.delete(ke)}var Ar=function(Ie){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Pi+=1;var gt=Pi;function Xt(vn){if(vn===0)qa(gt),Ie();else{var Dn=Zn(function(){Xt(vn-1)});xs.set(gt,Dn)}}return Xt(st),gt};Ar.cancel=function(ke){var Ie=xs.get(ke);return qa(Ie),Ni(Ie)};var br=Ar;function Rr(ke){if(typeof MessageChannel=="undefined")br(ke);else{var Ie=new MessageChannel;Ie.port1.onmessage=function(){return ke()},Ie.port2.postMessage(void 0)}}function xa(){var ke=Je.useRef(null),Ie=function(gt){ke.current||(ke.current=[],Rr(function(){(0,Ro.unstable_batchedUpdates)(function(){ke.current.forEach(function(Xt){Xt()}),ke.current=null})})),ke.current.push(gt)};return Ie}function Ka(ke,Ie){var st=Je.useState(Ie),gt=Vt(st,2),Xt=gt[0],vn=gt[1],Dn=pr(function(di){ke(function(){vn(di)})});return[Xt,Dn]}var _i=Je.createContext(null),yo=["component"],zl=["className"],ms=["className"],as=function(Ie,st){var gt=Je.useContext(_i);if(!gt){var Xt=Ie.component,vn=Xt===void 0?"div":Xt,Dn=It(Ie,yo);return Je.createElement(vn,vr({},Dn,{ref:st}))}var di=gt.className,yi=It(gt,zl),ai=Ie.className,Hi=It(Ie,ms);return Je.createElement(_i.Provider,{value:null},Je.createElement(Yi,vr({ref:st,className:ot()(di,ai)},yi,Hi)))},Qt=Je.forwardRef(as);Qt.displayName="RawItem";var Br=Qt,ba=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],to="responsive",vs="invalidate";function La(ke){return"+ ".concat(ke.length," ...")}function Za(ke,Ie){var st=ke.prefixCls,gt=st===void 0?"rc-overflow":st,Xt=ke.data,vn=Xt===void 0?[]:Xt,Dn=ke.renderItem,di=ke.renderRawItem,yi=ke.itemKey,ai=ke.itemWidth,Hi=ai===void 0?10:ai,$i=ke.ssr,Pr=ke.style,Ui=ke.className,zi=ke.maxCount,cr=ke.renderRest,Er=ke.renderRawRest,To=ke.suffix,ea=ke.component,Eo=ea===void 0?"div":ea,Po=ke.itemComponent,Ma=ke.onVisibleChange,or=It(ke,ba),_o=$i==="full",$r=xa(),Oo=Ka($r,null),fa=Vt(Oo,2),Qr=fa[0],Na=fa[1],ra=Qr||0,ns=Ka($r,new Map),Jo=Vt(ns,2),Wa=Jo[0],ds=Jo[1],ys=Ka($r,0),ls=Vt(ys,2),Lo=ls[0],Ea=ls[1],Cs=Ka($r,0),hs=Vt(Cs,2),zs=hs[0],Os=hs[1],Vs=Ka($r,0),Gs=Vt(Vs,2),nl=Gs[0],Wl=Gs[1],el=(0,Je.useState)(null),$o=Vt(el,2),oa=$o[0],la=$o[1],qr=(0,Je.useState)(null),fo=Vt(qr,2),Vo=fo[0],Xa=fo[1],ss=Je.useMemo(function(){return Vo===null&&_o?Number.MAX_SAFE_INTEGER:Vo||0},[Vo,Qr]),va=(0,Je.useState)(!1),ll=Vt(va,2),Nl=ll[0],Us=ll[1],Zl="".concat(gt,"-item"),$s=Math.max(Lo,zs),pl=zi===to,xl=vn.length&&pl,ru=zi===vs,Ll=xl||typeof zi=="number"&&vn.length>zi,wl=(0,Je.useMemo)(function(){var Ra=vn;return xl?Qr===null&&_o?Ra=vn:Ra=vn.slice(0,Math.min(vn.length,ra/Hi)):typeof zi=="number"&&(Ra=vn.slice(0,zi)),Ra},[vn,Hi,Qr,zi,xl]),Ks=(0,Je.useMemo)(function(){return xl?vn.slice(ss+1):vn.slice(wl.length)},[vn,wl,xl,ss]),Pl=(0,Je.useCallback)(function(Ra,Ys){var Ba;return typeof yi=="function"?yi(Ra):(Ba=yi&&(Ra==null?void 0:Ra[yi]))!==null&&Ba!==void 0?Ba:Ys},[yi]),xu=(0,Je.useCallback)(Dn||function(Ra){return Ra},[Dn]);function Cu(Ra,Ys,Ba){Vo===Ra&&(Ys===void 0||Ys===oa)||(Xa(Ra),Ba||(Us(Ra<vn.length-1),Ma==null||Ma(Ra)),Ys!==void 0&&la(Ys))}function ta(Ra,Ys){Na(Ys.clientWidth)}function Io(Ra,Ys){ds(function(Ba){var ou=new Map(Ba);return Ys===null?ou.delete(Ra):ou.set(Ra,Ys),ou})}function Ko(Ra,Ys){Os(Ys),Ea(zs)}function gs(Ra,Ys){Wl(Ys)}function Ml(Ra){return Wa.get(Pl(wl[Ra],Ra))}wn(function(){if(ra&&typeof $s=="number"&&wl){var Ra=nl,Ys=wl.length,Ba=Ys-1;if(!Ys){Cu(0,null);return}for(var ou=0;ou<Ys;ou+=1){var Nu=Ml(ou);if(_o&&(Nu=Nu||0),Nu===void 0){Cu(ou-1,void 0,!0);break}if(Ra+=Nu,Ba===0&&Ra<=ra||ou===Ba-1&&Ra+Ml(Ba)<=ra){Cu(Ba,null);break}else if(Ra+$s>ra){Cu(ou-1,Ra-Nu-nl+zs);break}}To&&Ml(0)+nl>ra&&la(null)}},[ra,Wa,zs,nl,Pl,wl]);var Vl=Nl&&!!Ks.length,wu={};oa!==null&&xl&&(wu={position:"absolute",left:oa,top:0});var Gt={prefixCls:Zl,responsive:xl,component:Po,invalidate:ru},Uu=di?function(Ra,Ys){var Ba=Pl(Ra,Ys);return Je.createElement(_i.Provider,{key:Ba,value:gn(gn({},Gt),{},{order:Ys,item:Ra,itemKey:Ba,registerSize:Io,display:Ys<=ss})},di(Ra,Ys))}:function(Ra,Ys){var Ba=Pl(Ra,Ys);return Je.createElement(Yi,vr({},Gt,{order:Ys,key:Ba,item:Ra,renderItem:xu,itemKey:Ba,registerSize:Io,display:Ys<=ss}))},Ql,$u={order:Vl?ss:Number.MAX_SAFE_INTEGER,className:"".concat(Zl,"-rest"),registerSize:Ko,display:Vl};if(Er)Er&&(Ql=Je.createElement(_i.Provider,{value:gn(gn({},Gt),$u)},Er(Ks)));else{var Ic=cr||La;Ql=Je.createElement(Yi,vr({},Gt,$u),typeof Ic=="function"?Ic(Ks):Ic)}var tu=Je.createElement(Eo,vr({className:ot()(!ru&&gt,Ui),style:Pr,ref:Ie},or),wl.map(Uu),Ll?Ql:null,To&&Je.createElement(Yi,vr({},Gt,{responsive:pl,responsiveDisabled:!xl,order:ss,className:"".concat(Zl,"-suffix"),registerSize:gs,display:!0,style:wu}),To));return pl&&(tu=Je.createElement(dn.Z,{onResize:ta,disabled:!xl},tu)),tu}var wa=Je.forwardRef(Za);wa.displayName="Overflow",wa.Item=Br,wa.RESPONSIVE=to,wa.INVALIDATE=vs;var ca=wa,Ya=ca,Un=function(Ie,st){var gt,Xt=Ie.prefixCls,vn=Ie.id,Dn=Ie.inputElement,di=Ie.disabled,yi=Ie.tabIndex,ai=Ie.autoFocus,Hi=Ie.autoComplete,$i=Ie.editable,Pr=Ie.activeDescendantId,Ui=Ie.value,zi=Ie.maxLength,cr=Ie.onKeyDown,Er=Ie.onMouseDown,To=Ie.onChange,ea=Ie.onPaste,Eo=Ie.onCompositionStart,Po=Ie.onCompositionEnd,Ma=Ie.onBlur,or=Ie.open,_o=Ie.attrs,$r=Dn||Je.createElement("input",null),Oo=$r,fa=Oo.ref,Qr=Oo.props,Na=Qr.onKeyDown,ra=Qr.onChange,ns=Qr.onMouseDown,Jo=Qr.onCompositionStart,Wa=Qr.onCompositionEnd,ds=Qr.onBlur,ys=Qr.style;return"maxLength"in $r.props,$r=Je.cloneElement($r,Et(Et(Et({type:"search"},Qr),{},{id:vn,ref:qn(st,fa),disabled:di,tabIndex:yi,autoComplete:Hi||"off",autoFocus:ai,className:ot()("".concat(Xt,"-selection-search-input"),(gt=$r)===null||gt===void 0||(gt=gt.props)===null||gt===void 0?void 0:gt.className),role:"combobox","aria-expanded":or||!1,"aria-haspopup":"listbox","aria-owns":"".concat(vn,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(vn,"_list"),"aria-activedescendant":or?Pr:void 0},_o),{},{value:$i?Ui:"",maxLength:zi,readOnly:!$i,unselectable:$i?null:"on",style:Et(Et({},ys),{},{opacity:$i?null:0}),onKeyDown:function(Lo){cr(Lo),Na&&Na(Lo)},onMouseDown:function(Lo){Er(Lo),ns&&ns(Lo)},onChange:function(Lo){To(Lo),ra&&ra(Lo)},onCompositionStart:function(Lo){Eo(Lo),Jo&&Jo(Lo)},onCompositionEnd:function(Lo){Po(Lo),Wa&&Wa(Lo)},onPaste:ea,onBlur:function(Lo){Ma(Lo),ds&&ds(Lo)}})),$r},js=Je.forwardRef(Un),zn=js;function _a(ke){return Array.isArray(ke)?ke:ke!==void 0?[ke]:[]}var Sl=typeof window!="undefined"&&window.document&&window.document.documentElement,No=Sl;function kl(ke){return ke!=null}function bs(ke){return!ke&&ke!==0}function ja(ke){return["string","number"].includes(nt(ke))}function es(ke){var Ie=void 0;return ke&&(ja(ke.title)?Ie=ke.title.toString():ja(ke.label)&&(Ie=ke.label.toString())),Ie}function fl(ke,Ie){No?Je.useLayoutEffect(ke,Ie):Je.useEffect(ke,Ie)}function ps(ke){var Ie;return(Ie=ke.key)!==null&&Ie!==void 0?Ie:ke.value}var sr=function(Ie){Ie.preventDefault(),Ie.stopPropagation()},tt=function(Ie){var st=Ie.id,gt=Ie.prefixCls,Xt=Ie.values,vn=Ie.open,Dn=Ie.searchValue,di=Ie.autoClearSearchValue,yi=Ie.inputRef,ai=Ie.placeholder,Hi=Ie.disabled,$i=Ie.mode,Pr=Ie.showSearch,Ui=Ie.autoFocus,zi=Ie.autoComplete,cr=Ie.activeDescendantId,Er=Ie.tabIndex,To=Ie.removeIcon,ea=Ie.maxTagCount,Eo=Ie.maxTagTextLength,Po=Ie.maxTagPlaceholder,Ma=Po===void 0?function(qr){return"+ ".concat(qr.length," ...")}:Po,or=Ie.tagRender,_o=Ie.onToggleOpen,$r=Ie.onRemove,Oo=Ie.onInputChange,fa=Ie.onInputPaste,Qr=Ie.onInputKeyDown,Na=Ie.onInputMouseDown,ra=Ie.onInputCompositionStart,ns=Ie.onInputCompositionEnd,Jo=Ie.onInputBlur,Wa=Je.useRef(null),ds=(0,Je.useState)(0),ys=fn(ds,2),ls=ys[0],Lo=ys[1],Ea=(0,Je.useState)(!1),Cs=fn(Ea,2),hs=Cs[0],zs=Cs[1],Os="".concat(gt,"-selection"),Vs=vn||$i==="multiple"&&di===!1||$i==="tags"?Dn:"",Gs=$i==="tags"||$i==="multiple"&&di===!1||Pr&&(vn||hs);fl(function(){Lo(Wa.current.scrollWidth)},[Vs]);var nl=function(fo,Vo,Xa,ss,va){return Je.createElement("span",{title:es(fo),className:ot()("".concat(Os,"-item"),Pt({},"".concat(Os,"-item-disabled"),Xa))},Je.createElement("span",{className:"".concat(Os,"-item-content")},Vo),ss&&Je.createElement(Di,{className:"".concat(Os,"-item-remove"),onMouseDown:sr,onClick:va,customizeIcon:To},"\xD7"))},Wl=function(fo,Vo,Xa,ss,va,ll){var Nl=function(Zl){sr(Zl),_o(!vn)};return Je.createElement("span",{onMouseDown:Nl},or({label:Vo,value:fo,disabled:Xa,closable:ss,onClose:va,isMaxTag:!!ll}))},el=function(fo){var Vo=fo.disabled,Xa=fo.label,ss=fo.value,va=!Hi&&!Vo,ll=Xa;if(typeof Eo=="number"&&(typeof Xa=="string"||typeof Xa=="number")){var Nl=String(ll);Nl.length>Eo&&(ll="".concat(Nl.slice(0,Eo),"..."))}var Us=function($s){$s&&$s.stopPropagation(),$r(fo)};return typeof or=="function"?Wl(ss,ll,Vo,va,Us):nl(fo,ll,Vo,va,Us)},$o=function(fo){if(!Xt.length)return null;var Vo=typeof Ma=="function"?Ma(fo):Ma;return typeof or=="function"?Wl(void 0,Vo,!1,!1,void 0,!0):nl({title:Vo},Vo,!1)},oa=Je.createElement("div",{className:"".concat(Os,"-search"),style:{width:ls},onFocus:function(){zs(!0)},onBlur:function(){zs(!1)}},Je.createElement(zn,{ref:yi,open:vn,prefixCls:gt,id:st,inputElement:null,disabled:Hi,autoFocus:Ui,autoComplete:zi,editable:Gs,activeDescendantId:cr,value:Vs,onKeyDown:Qr,onMouseDown:Na,onChange:Oo,onPaste:fa,onCompositionStart:ra,onCompositionEnd:ns,onBlur:Jo,tabIndex:Er,attrs:Oi(Ie,!0)}),Je.createElement("span",{ref:Wa,className:"".concat(Os,"-search-mirror"),"aria-hidden":!0},Vs,"\xA0")),la=Je.createElement(Ya,{prefixCls:"".concat(Os,"-overflow"),data:Xt,renderItem:el,renderRest:$o,suffix:oa,itemKey:ps,maxCount:ea});return Je.createElement("span",{className:"".concat(Os,"-wrap")},la,!Xt.length&&!Vs&&Je.createElement("span",{className:"".concat(Os,"-placeholder")},ai))},il=tt,ql=function(Ie){var st=Ie.inputElement,gt=Ie.prefixCls,Xt=Ie.id,vn=Ie.inputRef,Dn=Ie.disabled,di=Ie.autoFocus,yi=Ie.autoComplete,ai=Ie.activeDescendantId,Hi=Ie.mode,$i=Ie.open,Pr=Ie.values,Ui=Ie.placeholder,zi=Ie.tabIndex,cr=Ie.showSearch,Er=Ie.searchValue,To=Ie.activeValue,ea=Ie.maxLength,Eo=Ie.onInputKeyDown,Po=Ie.onInputMouseDown,Ma=Ie.onInputChange,or=Ie.onInputPaste,_o=Ie.onInputCompositionStart,$r=Ie.onInputCompositionEnd,Oo=Ie.onInputBlur,fa=Ie.title,Qr=Je.useState(!1),Na=fn(Qr,2),ra=Na[0],ns=Na[1],Jo=Hi==="combobox",Wa=Jo||cr,ds=Pr[0],ys=Er||"";Jo&&To&&!ra&&(ys=To),Je.useEffect(function(){Jo&&ns(!1)},[Jo,To]);var ls=Hi!=="combobox"&&!$i&&!cr?!1:!!ys,Lo=fa===void 0?es(ds):fa,Ea=Je.useMemo(function(){return ds?null:Je.createElement("span",{className:"".concat(gt,"-selection-placeholder"),style:ls?{visibility:"hidden"}:void 0},Ui)},[ds,ls,Ui,gt]);return Je.createElement("span",{className:"".concat(gt,"-selection-wrap")},Je.createElement("span",{className:"".concat(gt,"-selection-search")},Je.createElement(zn,{ref:vn,prefixCls:gt,id:Xt,open:$i,inputElement:st,disabled:Dn,autoFocus:di,autoComplete:yi,editable:Wa,activeDescendantId:ai,value:ys,onKeyDown:Eo,onMouseDown:Po,onChange:function(hs){ns(!0),Ma(hs)},onPaste:or,onCompositionStart:_o,onCompositionEnd:$r,onBlur:Oo,tabIndex:zi,attrs:Oi(Ie,!0),maxLength:Jo?ea:void 0})),!Jo&&ds?Je.createElement("span",{className:"".concat(gt,"-selection-item"),title:Lo,style:ls?{visibility:"hidden"}:void 0},ds.label):null,Ea)},rl=ql,Il=function(Ie,st){var gt=(0,Je.useRef)(null),Xt=(0,Je.useRef)(!1),vn=Ie.prefixCls,Dn=Ie.open,di=Ie.mode,yi=Ie.showSearch,ai=Ie.tokenWithEnter,Hi=Ie.disabled,$i=Ie.prefix,Pr=Ie.autoClearSearchValue,Ui=Ie.onSearch,zi=Ie.onSearchSubmit,cr=Ie.onToggleOpen,Er=Ie.onInputKeyDown,To=Ie.onInputBlur,ea=Ie.domRef;Je.useImperativeHandle(st,function(){return{focus:function(Lo){gt.current.focus(Lo)},blur:function(){gt.current.blur()}}});var Eo=mi(0),Po=fn(Eo,2),Ma=Po[0],or=Po[1],_o=function(Lo){var Ea=Lo.which,Cs=gt.current instanceof HTMLTextAreaElement;!Cs&&Dn&&(Ea===yn.UP||Ea===yn.DOWN)&&Lo.preventDefault(),Er&&Er(Lo),Ea===yn.ENTER&&di==="tags"&&!Xt.current&&!Dn&&(zi==null||zi(Lo.target.value)),!(Cs&&!Dn&&~[yn.UP,yn.DOWN,yn.LEFT,yn.RIGHT].indexOf(Ea))&&Jr(Ea)&&cr(!0)},$r=function(){or(!0)},Oo=(0,Je.useRef)(null),fa=function(Lo){Ui(Lo,!0,Xt.current)!==!1&&cr(!0)},Qr=function(){Xt.current=!0},Na=function(Lo){Xt.current=!1,di!=="combobox"&&fa(Lo.target.value)},ra=function(Lo){var Ea=Lo.target.value;if(ai&&Oo.current&&/[\r\n]/.test(Oo.current)){var Cs=Oo.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Ea=Ea.replace(Cs,Oo.current)}Oo.current=null,fa(Ea)},ns=function(Lo){var Ea=Lo.clipboardData,Cs=Ea==null?void 0:Ea.getData("text");Oo.current=Cs||""},Jo=function(Lo){var Ea=Lo.target;if(Ea!==gt.current){var Cs=document.body.style.msTouchAction!==void 0;Cs?setTimeout(function(){gt.current.focus()}):gt.current.focus()}},Wa=function(Lo){var Ea=Ma();Lo.target!==gt.current&&!Ea&&!(di==="combobox"&&Hi)&&Lo.preventDefault(),(di!=="combobox"&&(!yi||!Ea)||!Dn)&&(Dn&&Pr!==!1&&Ui("",!0,!1),cr())},ds={inputRef:gt,onInputKeyDown:_o,onInputMouseDown:$r,onInputChange:ra,onInputPaste:ns,onInputCompositionStart:Qr,onInputCompositionEnd:Na,onInputBlur:To},ys=di==="multiple"||di==="tags"?Je.createElement(il,ye({},Ie,ds)):Je.createElement(rl,ye({},Ie,ds));return Je.createElement("div",{ref:ea,className:"".concat(vn,"-selector"),onClick:Jo,onMouseDown:Wa},$i&&Je.createElement("div",{className:"".concat(vn,"-prefix")},$i),ys)},nu=Je.forwardRef(Il),Mu=nu,Au=be(98280),Hu=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ws=function(Ie){var st=Ie===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:st,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:st,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:st,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:st,adjustY:1},htmlRegion:"scroll"}}},Js=function(Ie,st){var gt=Ie.prefixCls,Xt=Ie.disabled,vn=Ie.visible,Dn=Ie.children,di=Ie.popupElement,yi=Ie.animation,ai=Ie.transitionName,Hi=Ie.dropdownStyle,$i=Ie.dropdownClassName,Pr=Ie.direction,Ui=Pr===void 0?"ltr":Pr,zi=Ie.placement,cr=Ie.builtinPlacements,Er=Ie.dropdownMatchSelectWidth,To=Ie.dropdownRender,ea=Ie.dropdownAlign,Eo=Ie.getPopupContainer,Po=Ie.empty,Ma=Ie.getTriggerDOMNode,or=Ie.onPopupVisibleChange,_o=Ie.onPopupMouseEnter,$r=Ke(Ie,Hu),Oo="".concat(gt,"-dropdown"),fa=di;To&&(fa=To(di));var Qr=Je.useMemo(function(){return cr||ws(Er)},[cr,Er]),Na=yi?"".concat(Oo,"-").concat(yi):ai,ra=typeof Er=="number",ns=Je.useMemo(function(){return ra?null:Er===!1?"minWidth":"width"},[Er,ra]),Jo=Hi;ra&&(Jo=Et(Et({},Jo),{},{width:Er}));var Wa=Je.useRef(null);return Je.useImperativeHandle(st,function(){return{getPopupElement:function(){var ys;return(ys=Wa.current)===null||ys===void 0?void 0:ys.popupElement}}}),Je.createElement(Au.Z,ye({},$r,{showAction:or?["click"]:[],hideAction:or?["click"]:[],popupPlacement:zi||(Ui==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Qr,prefixCls:Oo,popupTransitionName:Na,popup:Je.createElement("div",{onMouseEnter:_o},fa),ref:Wa,stretch:ns,popupAlign:ea,popupVisible:vn,getPopupContainer:Eo,popupClassName:ot()($i,Pt({},"".concat(Oo,"-empty"),Po)),popupStyle:Jo,getTriggerDOMNode:Ma,onPopupVisibleChange:or}),Dn)},Xr=Je.forwardRef(Js),no=Xr;function na(ke){return Ln(ke)||Re(ke)||We(ke)||Nn()}function Fn(ke,Ie){var st=ke.key,gt;return"value"in ke&&(gt=ke.value),st!=null?st:gt!==void 0?gt:"rc-index-key-".concat(Ie)}function Bo(ke){return typeof ke!="undefined"&&!Number.isNaN(ke)}function io(ke,Ie){var st=ke||{},gt=st.label,Xt=st.value,vn=st.options,Dn=st.groupLabel,di=gt||(Ie?"children":"label");return{label:di,value:Xt||"value",options:vn||"options",groupLabel:Dn||di}}function Ds(ke){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=Ie.fieldNames,gt=Ie.childrenAsData,Xt=[],vn=io(st,!1),Dn=vn.label,di=vn.value,yi=vn.options,ai=vn.groupLabel;function Hi($i,Pr){Array.isArray($i)&&$i.forEach(function(Ui){if(Pr||!(yi in Ui)){var zi=Ui[di];Xt.push({key:Fn(Ui,Xt.length),groupOption:Pr,data:Ui,label:Ui[Dn],value:zi})}else{var cr=Ui[ai];cr===void 0&&gt&&(cr=Ui.label),Xt.push({key:Fn(Ui,Xt.length),group:!0,data:Ui,label:cr}),Hi(Ui[yi],!0)}})}return Hi(ke,!1),Xt}function Ps(ke){var Ie=Et({},ke);return"props"in Ie||Object.defineProperty(Ie,"props",{get:function(){return Ue(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Ie}}),Ie}var ol=function(Ie,st,gt){if(!st||!st.length)return null;var Xt=!1,vn=function di(yi,ai){var Hi=na(ai),$i=Hi[0],Pr=Hi.slice(1);if(!$i)return[yi];var Ui=yi.split($i);return Xt=Xt||Ui.length>1,Ui.reduce(function(zi,cr){return[].concat(ht(zi),ht(di(cr,Pr)))},[]).filter(Boolean)},Dn=vn(Ie,st);return Xt?typeof gt!="undefined"?Dn.slice(0,gt):Dn:null},Al=Je.createContext(null),hu=Al;function eu(ke){var Ie=ke.visible,st=ke.values;if(!Ie)return null;var gt=50;return Je.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(st.slice(0,gt).map(function(Xt){var vn=Xt.label,Dn=Xt.value;return["number","string"].includes(nt(vn))?vn:Dn}).join(", ")),st.length>gt?", ...":null)}var Eu=["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"],Wu=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ln=function(Ie){return Ie==="tags"||Ie==="multiple"},Gl=Je.forwardRef(function(ke,Ie){var st,gt=ke.id,Xt=ke.prefixCls,vn=ke.className,Dn=ke.showSearch,di=ke.tagRender,yi=ke.direction,ai=ke.omitDomProps,Hi=ke.displayValues,$i=ke.onDisplayValuesChange,Pr=ke.emptyOptions,Ui=ke.notFoundContent,zi=Ui===void 0?"Not Found":Ui,cr=ke.onClear,Er=ke.mode,To=ke.disabled,ea=ke.loading,Eo=ke.getInputElement,Po=ke.getRawInputElement,Ma=ke.open,or=ke.defaultOpen,_o=ke.onDropdownVisibleChange,$r=ke.activeValue,Oo=ke.onActiveValueChange,fa=ke.activeDescendantId,Qr=ke.searchValue,Na=ke.autoClearSearchValue,ra=ke.onSearch,ns=ke.onSearchSplit,Jo=ke.tokenSeparators,Wa=ke.allowClear,ds=ke.prefix,ys=ke.suffixIcon,ls=ke.clearIcon,Lo=ke.OptionList,Ea=ke.animation,Cs=ke.transitionName,hs=ke.dropdownStyle,zs=ke.dropdownClassName,Os=ke.dropdownMatchSelectWidth,Vs=ke.dropdownRender,Gs=ke.dropdownAlign,nl=ke.placement,Wl=ke.builtinPlacements,el=ke.getPopupContainer,$o=ke.showAction,oa=$o===void 0?[]:$o,la=ke.onFocus,qr=ke.onBlur,fo=ke.onKeyUp,Vo=ke.onKeyDown,Xa=ke.onMouseDown,ss=Ke(ke,Eu),va=ln(Er),ll=(Dn!==void 0?Dn:va)||Er==="combobox",Nl=Et({},ss);Wu.forEach(function(ml){delete Nl[ml]}),ai==null||ai.forEach(function(ml){delete Nl[ml]});var Us=Je.useState(!1),Zl=fn(Us,2),$s=Zl[0],pl=Zl[1];Je.useEffect(function(){pl(Cn())},[]);var xl=Je.useRef(null),ru=Je.useRef(null),Ll=Je.useRef(null),wl=Je.useRef(null),Ks=Je.useRef(null),Pl=Je.useRef(!1),xu=Fi(),Cu=fn(xu,3),ta=Cu[0],Io=Cu[1],Ko=Cu[2];Je.useImperativeHandle(Ie,function(){var ml,Xs;return{focus:(ml=wl.current)===null||ml===void 0?void 0:ml.focus,blur:(Xs=wl.current)===null||Xs===void 0?void 0:Xs.blur,scrollTo:function(mu){var ku;return(ku=Ks.current)===null||ku===void 0?void 0:ku.scrollTo(mu)},nativeElement:xl.current||ru.current}});var gs=Je.useMemo(function(){var ml;if(Er!=="combobox")return Qr;var Xs=(ml=Hi[0])===null||ml===void 0?void 0:ml.value;return typeof Xs=="string"||typeof Xs=="number"?String(Xs):""},[Qr,Er,Hi]),Ml=Er==="combobox"&&typeof Eo=="function"&&Eo()||null,Vl=typeof Po=="function"&&Po(),wu=en(ru,Vl==null||(st=Vl.props)===null||st===void 0?void 0:st.ref),Gt=Je.useState(!1),Uu=fn(Gt,2),Ql=Uu[0],$u=Uu[1];kn(function(){$u(!0)},[]);var Ic=Mt(!1,{defaultValue:or,value:Ma}),tu=fn(Ic,2),Ra=tu[0],Ys=tu[1],Ba=Ql?Ra:!1,ou=!zi&&Pr;(To||ou&&Ba&&Er==="combobox")&&(Ba=!1);var Nu=ou?!1:Ba,Ua=Je.useCallback(function(ml){var Xs=ml!==void 0?ml:!Ba;To||(Ys(Xs),Ba!==Xs&&(_o==null||_o(Xs)))},[To,Ba,Ys,_o]),Ms=Je.useMemo(function(){return(Jo||[]).some(function(ml){return[`
`,`\r
`].includes(ml)})},[Jo]),us=Je.useContext(hu)||{},fs=us.maxCount,gl=us.rawValues,tl=function(Xs,cc,mu){if(!(va&&Bo(fs)&&(gl==null?void 0:gl.size)>=fs)){var ku=!0,qu=Xs;Oo==null||Oo(null);var Gc=ol(Xs,Jo,Bo(fs)?fs-gl.size:void 0),dc=mu?null:Gc;return Er!=="combobox"&&dc&&(qu="",ns==null||ns(dc),Ua(!1),ku=!1),ra&&gs!==qu&&ra(qu,{source:cc?"typing":"effect"}),ku}},nc=function(Xs){!Xs||!Xs.trim()||ra(Xs,{source:"submit"})};Je.useEffect(function(){!Ba&&!va&&Er!=="combobox"&&tl("",!1,!1)},[Ba]),Je.useEffect(function(){Ra&&To&&Ys(!1),To&&!Pl.current&&Io(!1)},[To]);var Rc=mi(),_u=fn(Rc,2),au=_u[0],jc=_u[1],Fc=Je.useRef(!1),Ou=function(Xs){var cc=au(),mu=Xs.key,ku=mu==="Enter";if(ku&&(Er!=="combobox"&&Xs.preventDefault(),Ba||Ua(!0)),jc(!!gs),mu==="Backspace"&&!cc&&va&&!gs&&Hi.length){for(var qu=ht(Hi),Gc=null,dc=qu.length-1;dc>=0;dc-=1){var Td=qu[dc];if(!Td.disabled){qu.splice(dc,1),Gc=Td;break}}Gc&&$i(qu,{type:"remove",values:[Gc]})}for(var hc=arguments.length,_d=new Array(hc>1?hc-1:0),Ed=1;Ed<hc;Ed++)_d[Ed-1]=arguments[Ed];if(Ba&&(!ku||!Fc.current)){var vh;ku&&(Fc.current=!0),(vh=Ks.current)===null||vh===void 0||vh.onKeyDown.apply(vh,[Xs].concat(_d))}Vo==null||Vo.apply(void 0,[Xs].concat(_d))},kd=function(Xs){for(var cc=arguments.length,mu=new Array(cc>1?cc-1:0),ku=1;ku<cc;ku++)mu[ku-1]=arguments[ku];if(Ba){var qu;(qu=Ks.current)===null||qu===void 0||qu.onKeyUp.apply(qu,[Xs].concat(mu))}Xs.key==="Enter"&&(Fc.current=!1),fo==null||fo.apply(void 0,[Xs].concat(mu))},Is=function(Xs){var cc=Hi.filter(function(mu){return mu!==Xs});$i(cc,{type:"remove",values:[Xs]})},Qa=function(){Fc.current=!1},jl=Je.useRef(!1),ic=function(){Io(!0),To||(la&&!jl.current&&la.apply(void 0,arguments),oa.includes("focus")&&Ua(!0)),jl.current=!0},Bu=function(){Pl.current=!0,Io(!1,function(){jl.current=!1,Pl.current=!1,Ua(!1)}),!To&&(gs&&(Er==="tags"?ra(gs,{source:"submit"}):Er==="multiple"&&ra("",{source:"blur"})),qr&&qr.apply(void 0,arguments))},Ku=[];Je.useEffect(function(){return function(){Ku.forEach(function(ml){return clearTimeout(ml)}),Ku.splice(0,Ku.length)}},[]);var pu=function(Xs){var cc,mu=Xs.target,ku=(cc=Ll.current)===null||cc===void 0?void 0:cc.getPopupElement();if(ku&&ku.contains(mu)){var qu=setTimeout(function(){var hc=Ku.indexOf(qu);if(hc!==-1&&Ku.splice(hc,1),Ko(),!$s&&!ku.contains(document.activeElement)){var _d;(_d=wl.current)===null||_d===void 0||_d.focus()}});Ku.push(qu)}for(var Gc=arguments.length,dc=new Array(Gc>1?Gc-1:0),Td=1;Td<Gc;Td++)dc[Td-1]=arguments[Td];Xa==null||Xa.apply(void 0,[Xs].concat(dc))},fd=Je.useState({}),Dl=fn(fd,2),zc=Dl[1];function qh(){zc({})}var Dd;Vl&&(Dd=function(Xs){Ua(Xs)}),Co(function(){var ml;return[xl.current,(ml=Ll.current)===null||ml===void 0?void 0:ml.getPopupElement()]},Nu,Ua,!!Vl);var gh=Je.useMemo(function(){return Et(Et({},ke),{},{notFoundContent:zi,open:Ba,triggerOpen:Nu,id:gt,showSearch:ll,multiple:va,toggleOpen:Ua})},[ke,zi,Nu,Ba,gt,ll,va,Ua]),rh=!!ys||ea,ph;rh&&(ph=Je.createElement(Di,{className:ot()("".concat(Xt,"-arrow"),Pt({},"".concat(Xt,"-arrow-loading"),ea)),customizeIcon:ys,customizeIconProps:{loading:ea,searchValue:gs,open:Ba,focused:ta,showSearch:ll}}));var mh=function(){var Xs;cr==null||cr(),(Xs=wl.current)===null||Xs===void 0||Xs.focus(),$i([],{type:"clear",values:Hi}),tl("",!1,!1)},ef=Ti(Xt,mh,Hi,Wa,ls,To,gs,Er),wd=ef.allowClear,oh=ef.clearIcon,tf=Je.createElement(Lo,{ref:Ks}),nf=ot()(Xt,vn,Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt(Pt({},"".concat(Xt,"-focused"),ta),"".concat(Xt,"-multiple"),va),"".concat(Xt,"-single"),!va),"".concat(Xt,"-allow-clear"),Wa),"".concat(Xt,"-show-arrow"),rh),"".concat(Xt,"-disabled"),To),"".concat(Xt,"-loading"),ea),"".concat(Xt,"-open"),Ba),"".concat(Xt,"-customize-input"),Ml),"".concat(Xt,"-show-search"),ll)),_h=Je.createElement(no,{ref:Ll,disabled:To,prefixCls:Xt,visible:Nu,popupElement:tf,animation:Ea,transitionName:Cs,dropdownStyle:hs,dropdownClassName:zs,direction:yi,dropdownMatchSelectWidth:Os,dropdownRender:Vs,dropdownAlign:Gs,placement:nl,builtinPlacements:Wl,getPopupContainer:el,empty:Pr,getTriggerDOMNode:function(Xs){return ru.current||Xs},onPopupVisibleChange:Dd,onPopupMouseEnter:qh},Vl?Je.cloneElement(Vl,{ref:wu}):Je.createElement(Mu,ye({},ke,{domRef:ru,prefixCls:Xt,inputElement:Ml,ref:wl,id:gt,prefix:ds,showSearch:ll,autoClearSearchValue:Na,mode:Er,activeDescendantId:fa,tagRender:di,values:Hi,open:Ba,onToggleOpen:Ua,activeValue:$r,searchValue:gs,onSearch:tl,onSearchSubmit:nc,onRemove:Is,tokenWithEnter:Ms,onInputBlur:Qa}))),Pd;return Vl?Pd=_h:Pd=Je.createElement("div",ye({className:nf},Nl,{ref:xl,onMouseDown:pu,onKeyDown:Ou,onKeyUp:kd,onFocus:ic,onBlur:Bu}),Je.createElement(eu,{visible:ta&&!Ba,values:Hi}),_h,ph,wd&&oh),Je.createElement(ro.Provider,{value:gh},Pd)}),Uo=Gl,Zu=function(){return null};Zu.isSelectOptGroup=!0;var al=Zu,Su=function(){return null};Su.isSelectOption=!0;var Jc=Su;function Dc(ke,Ie){var st=Et({},ke);return Array.isArray(Ie)&&Ie.forEach(function(gt){delete st[gt]}),st}var Ws=be(73299);function Oa(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Pa=["disabled","title","children","style","className"];function Ga(ke){return typeof ke=="string"||typeof ke=="number"}var ts=function(Ie,st){var gt=Zr(),Xt=gt.prefixCls,vn=gt.id,Dn=gt.open,di=gt.multiple,yi=gt.mode,ai=gt.searchValue,Hi=gt.toggleOpen,$i=gt.notFoundContent,Pr=gt.onPopupScroll,Ui=Je.useContext(hu),zi=Ui.maxCount,cr=Ui.flattenOptions,Er=Ui.onActiveValue,To=Ui.defaultActiveFirstOption,ea=Ui.onSelect,Eo=Ui.menuItemSelectedIcon,Po=Ui.rawValues,Ma=Ui.fieldNames,or=Ui.virtual,_o=Ui.direction,$r=Ui.listHeight,Oo=Ui.listItemHeight,fa=Ui.optionRender,Qr="".concat(Xt,"-item"),Na=si(function(){return cr},[Dn,cr],function($o,oa){return oa[0]&&$o[1]!==oa[1]}),ra=Je.useRef(null),ns=Je.useMemo(function(){return di&&Bo(zi)&&(Po==null?void 0:Po.size)>=zi},[di,zi,Po==null?void 0:Po.size]),Jo=function(oa){oa.preventDefault()},Wa=function(oa){var la;(la=ra.current)===null||la===void 0||la.scrollTo(typeof oa=="number"?{index:oa}:oa)},ds=Je.useCallback(function($o){return yi==="combobox"?!1:Po.has($o)},[yi,ht(Po).toString(),Po.size]),ys=function(oa){for(var la=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,qr=Na.length,fo=0;fo<qr;fo+=1){var Vo=(oa+fo*la+qr)%qr,Xa=Na[Vo]||{},ss=Xa.group,va=Xa.data;if(!ss&&!(va!=null&&va.disabled)&&(ds(va.value)||!ns))return Vo}return-1},ls=Je.useState(function(){return ys(0)}),Lo=fn(ls,2),Ea=Lo[0],Cs=Lo[1],hs=function(oa){var la=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Cs(oa);var qr={source:la?"keyboard":"mouse"},fo=Na[oa];if(!fo){Er(null,-1,qr);return}Er(fo.value,oa,qr)};(0,Je.useEffect)(function(){hs(To!==!1?ys(0):-1)},[Na.length,ai]);var zs=Je.useCallback(function($o){return yi==="combobox"?String($o).toLowerCase()===ai.toLowerCase():Po.has($o)},[yi,ai,ht(Po).toString(),Po.size]);(0,Je.useEffect)(function(){var $o=setTimeout(function(){if(!di&&Dn&&Po.size===1){var la=Array.from(Po)[0],qr=Na.findIndex(function(fo){var Vo=fo.data;return Vo.value===la});qr!==-1&&(hs(qr),Wa(qr))}});if(Dn){var oa;(oa=ra.current)===null||oa===void 0||oa.scrollTo(void 0)}return function(){return clearTimeout($o)}},[Dn,ai]);var Os=function(oa){oa!==void 0&&ea(oa,{selected:!Po.has(oa)}),di||Hi(!1)};if(Je.useImperativeHandle(st,function(){return{onKeyDown:function(oa){var la=oa.which,qr=oa.ctrlKey;switch(la){case yn.N:case yn.P:case yn.UP:case yn.DOWN:{var fo=0;if(la===yn.UP?fo=-1:la===yn.DOWN?fo=1:Oa()&&qr&&(la===yn.N?fo=1:la===yn.P&&(fo=-1)),fo!==0){var Vo=ys(Ea+fo,fo);Wa(Vo),hs(Vo,!0)}break}case yn.TAB:case yn.ENTER:{var Xa,ss=Na[Ea];ss&&!(ss!=null&&(Xa=ss.data)!==null&&Xa!==void 0&&Xa.disabled)&&!ns?Os(ss.value):Os(void 0),Dn&&oa.preventDefault();break}case yn.ESC:Hi(!1),Dn&&oa.stopPropagation()}},onKeyUp:function(){},scrollTo:function(oa){Wa(oa)}}}),Na.length===0)return Je.createElement("div",{role:"listbox",id:"".concat(vn,"_list"),className:"".concat(Qr,"-empty"),onMouseDown:Jo},$i);var Vs=Object.keys(Ma).map(function($o){return Ma[$o]}),Gs=function(oa){return oa.label};function nl($o,oa){var la=$o.group;return{role:la?"presentation":"option",id:"".concat(vn,"_list_").concat(oa)}}var Wl=function(oa){var la=Na[oa];if(!la)return null;var qr=la.data||{},fo=qr.value,Vo=la.group,Xa=Oi(qr,!0),ss=Gs(la);return la?Je.createElement("div",ye({"aria-label":typeof ss=="string"&&!Vo?ss:null},Xa,{key:oa},nl(la,oa),{"aria-selected":zs(fo)}),fo):null},el={role:"listbox",id:"".concat(vn,"_list")};return Je.createElement(Je.Fragment,null,or&&Je.createElement("div",ye({},el,{style:{height:0,width:0,overflow:"hidden"}}),Wl(Ea-1),Wl(Ea),Wl(Ea+1)),Je.createElement(Ws.Z,{itemKey:"key",ref:ra,data:Na,height:$r,itemHeight:Oo,fullHeight:!1,onMouseDown:Jo,onScroll:Pr,virtual:or,direction:_o,innerProps:or?null:el},function($o,oa){var la=$o.group,qr=$o.groupOption,fo=$o.data,Vo=$o.label,Xa=$o.value,ss=fo.key;if(la){var va,ll=(va=fo.title)!==null&&va!==void 0?va:Ga(Vo)?Vo.toString():void 0;return Je.createElement("div",{className:ot()(Qr,"".concat(Qr,"-group"),fo.className),title:ll},Vo!==void 0?Vo:ss)}var Nl=fo.disabled,Us=fo.title,Zl=fo.children,$s=fo.style,pl=fo.className,xl=Ke(fo,Pa),ru=Dc(xl,Vs),Ll=ds(Xa),wl=Nl||!Ll&&ns,Ks="".concat(Qr,"-option"),Pl=ot()(Qr,Ks,pl,Pt(Pt(Pt(Pt({},"".concat(Ks,"-grouped"),qr),"".concat(Ks,"-active"),Ea===oa&&!wl),"".concat(Ks,"-disabled"),wl),"".concat(Ks,"-selected"),Ll)),xu=Gs($o),Cu=!Eo||typeof Eo=="function"||Ll,ta=typeof xu=="number"?xu:xu||Xa,Io=Ga(ta)?ta.toString():void 0;return Us!==void 0&&(Io=Us),Je.createElement("div",ye({},Oi(ru),or?{}:nl($o,oa),{"aria-selected":zs(Xa),className:Pl,title:Io,onMouseMove:function(){Ea===oa||wl||hs(oa)},onClick:function(){wl||Os(Xa)},style:$s}),Je.createElement("div",{className:"".concat(Ks,"-content")},typeof fa=="function"?fa($o,{index:oa}):ta),Je.isValidElement(Eo)||Ll,Cu&&Je.createElement(Di,{className:"".concat(Qr,"-option-state"),customizeIcon:Eo,customizeIconProps:{value:Xa,disabled:wl,isSelected:Ll}},Ll?"\u2713":null))}))},sl=Je.forwardRef(ts),oo=sl,$c=function(ke,Ie){var st=Je.useRef({values:new Map,options:new Map}),gt=Je.useMemo(function(){var vn=st.current,Dn=vn.values,di=vn.options,yi=ke.map(function($i){if($i.label===void 0){var Pr;return Et(Et({},$i),{},{label:(Pr=Dn.get($i.value))===null||Pr===void 0?void 0:Pr.label})}return $i}),ai=new Map,Hi=new Map;return yi.forEach(function($i){ai.set($i.value,$i),Hi.set($i.value,Ie.get($i.value)||di.get($i.value))}),st.current.values=ai,st.current.options=Hi,yi},[ke,Ie]),Xt=Je.useCallback(function(vn){return Ie.get(vn)||st.current.options.get(vn)},[Ie]);return[gt,Xt]};function Hl(ke,Ie){return _a(ke).join("").toUpperCase().includes(Ie)}var iu=function(ke,Ie,st,gt,Xt){return Je.useMemo(function(){if(!st||gt===!1)return ke;var vn=Ie.options,Dn=Ie.label,di=Ie.value,yi=[],ai=typeof gt=="function",Hi=st.toUpperCase(),$i=ai?gt:function(Ui,zi){return Xt?Hl(zi[Xt],Hi):zi[vn]?Hl(zi[Dn!=="children"?Dn:"label"],Hi):Hl(zi[di],Hi)},Pr=ai?function(Ui){return Ps(Ui)}:function(Ui){return Ui};return ke.forEach(function(Ui){if(Ui[vn]){var zi=$i(st,Pr(Ui));if(zi)yi.push(Ui);else{var cr=Ui[vn].filter(function(Er){return $i(st,Pr(Er))});cr.length&&yi.push(Et(Et({},Ui),{},Pt({},vn,cr)))}return}$i(st,Pr(Ui))&&yi.push(Ui)}),yi},[ke,gt,Xt,st,Ie])},Tc=0,Pc=Xn();function fr(){var ke;return Pc?(ke=Tc,Tc+=1):ke="TEST_OR_SSR",ke}function El(ke){var Ie=Je.useState(),st=fn(Ie,2),gt=st[0],Xt=st[1];return Je.useEffect(function(){Xt("rc_select_".concat(fr()))},[]),ke||gt}function Fl(ke){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},st=[];return Je.Children.forEach(ke,function(gt){gt==null&&!Ie.keepEmpty||(Array.isArray(gt)?st=st.concat(Fl(gt)):(0,ci.isFragment)(gt)&&gt.props?st=st.concat(Fl(gt.props.children,Ie)):st.push(gt))}),st}var Qu=["children","value"],Ec=["children"];function _c(ke){var Ie=ke,st=Ie.key,gt=Ie.props,Xt=gt.children,vn=gt.value,Dn=Ke(gt,Qu);return Et({key:st,value:vn!==void 0?vn:st,children:Xt},Dn)}function pa(ke){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Fl(ke).map(function(st,gt){if(!Je.isValidElement(st)||!st.type)return null;var Xt=st,vn=Xt.type.isSelectOptGroup,Dn=Xt.key,di=Xt.props,yi=di.children,ai=Ke(di,Ec);return Ie||!vn?_c(st):Et(Et({key:"__RC_SELECT_GRP__".concat(Dn===null?gt:Dn,"__"),label:Dn},ai),{},{options:pa(yi)})}).filter(function(st){return st})}var qc=function(Ie,st,gt,Xt,vn){return Je.useMemo(function(){var Dn=Ie,di=!Ie;di&&(Dn=pa(st));var yi=new Map,ai=new Map,Hi=function(Ui,zi,cr){cr&&typeof cr=="string"&&Ui.set(zi[cr],zi)},$i=function Pr(Ui){for(var zi=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,cr=0;cr<Ui.length;cr+=1){var Er=Ui[cr];!Er[gt.options]||zi?(yi.set(Er[gt.value],Er),Hi(ai,Er,gt.label),Hi(ai,Er,Xt),Hi(ai,Er,vn)):Pr(Er[gt.options],!0)}};return $i(Dn),{options:Dn,valueOptions:yi,labelOptions:ai}},[Ie,st,gt,Xt,vn])},Ju=qc;function tn(ke){var Ie=Je.useRef();Ie.current=ke;var st=Je.useCallback(function(){return Ie.current.apply(Ie,arguments)},[]);return st}function un(ke){var Ie=ke.mode,st=ke.options,gt=ke.children,Xt=ke.backfill,vn=ke.allowClear,Dn=ke.placeholder,di=ke.getInputElement,yi=ke.showSearch,ai=ke.onSearch,Hi=ke.defaultOpen,$i=ke.autoFocus,Pr=ke.labelInValue,Ui=ke.value,zi=ke.inputValue,cr=ke.optionLabelProp,Er=isMultiple(Ie),To=yi!==void 0?yi:Er||Ie==="combobox",ea=st||convertChildrenToData(gt);if(warning(Ie!=="tags"||ea.every(function(or){return!or.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Ie==="tags"||Ie==="combobox"){var Eo=ea.some(function(or){return or.options?or.options.some(function(_o){return typeof("value"in _o?_o.value:_o.key)=="number"}):typeof("value"in or?or.value:or.key)=="number"});warning(!Eo,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Ie!=="combobox"||!cr,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Ie==="combobox"||!Xt,"`backfill` only works with `combobox` mode."),warning(Ie==="combobox"||!di,"`getInputElement` only work with `combobox` mode."),noteOnce(Ie!=="combobox"||!di||!vn||!Dn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),ai&&!To&&Ie!=="combobox"&&Ie!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Hi||$i,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ui!=null){var Po=toArray(Ui);warning(!Pr||Po.every(function(or){return _typeof(or)==="object"&&("key"in or||"value"in or)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Er||Array.isArray(Ui),"`value` should be array when `mode` is `multiple` or `tags`")}if(gt){var Ma=null;toNodeArray(gt).some(function(or){if(!React.isValidElement(or)||!or.type)return!1;var _o=or,$r=_o.type;if($r.isSelectOption)return!1;if($r.isSelectOptGroup){var Oo=toNodeArray(or.props.children).every(function(fa){return!React.isValidElement(fa)||!or.type||fa.type.isSelectOption?!0:(Ma=fa.type,!1)});return!Oo}return Ma=$r,!0}),Ma&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ma.displayName||Ma.name||Ma,"`.")),warning(zi===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function Gn(ke,Ie){if(ke){var st=function gt(Xt){for(var vn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Dn=0;Dn<Xt.length;Dn++){var di=Xt[Dn];if(di[Ie==null?void 0:Ie.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!vn&&Array.isArray(di[Ie==null?void 0:Ie.options])&&gt(di[Ie==null?void 0:Ie.options],!0))break}};st(ke)}}var er=null,Wi=["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"],Bi=["inputValue"];function ki(ke){return!ke||nt(ke)!=="object"}var On=Je.forwardRef(function(ke,Ie){var st=ke.id,gt=ke.mode,Xt=ke.prefixCls,vn=Xt===void 0?"rc-select":Xt,Dn=ke.backfill,di=ke.fieldNames,yi=ke.inputValue,ai=ke.searchValue,Hi=ke.onSearch,$i=ke.autoClearSearchValue,Pr=$i===void 0?!0:$i,Ui=ke.onSelect,zi=ke.onDeselect,cr=ke.dropdownMatchSelectWidth,Er=cr===void 0?!0:cr,To=ke.filterOption,ea=ke.filterSort,Eo=ke.optionFilterProp,Po=ke.optionLabelProp,Ma=ke.options,or=ke.optionRender,_o=ke.children,$r=ke.defaultActiveFirstOption,Oo=ke.menuItemSelectedIcon,fa=ke.virtual,Qr=ke.direction,Na=ke.listHeight,ra=Na===void 0?200:Na,ns=ke.listItemHeight,Jo=ns===void 0?20:ns,Wa=ke.labelRender,ds=ke.value,ys=ke.defaultValue,ls=ke.labelInValue,Lo=ke.onChange,Ea=ke.maxCount,Cs=Ke(ke,Wi),hs=El(st),zs=ln(gt),Os=!!(!Ma&&_o),Vs=Je.useMemo(function(){return To===void 0&&gt==="combobox"?!1:To},[To,gt]),Gs=Je.useMemo(function(){return io(di,Os)},[JSON.stringify(di),Os]),nl=Mt("",{value:ai!==void 0?ai:yi,postState:function(Ms){return Ms||""}}),Wl=fn(nl,2),el=Wl[0],$o=Wl[1],oa=Ju(Ma,_o,Gs,Eo,Po),la=oa.valueOptions,qr=oa.labelOptions,fo=oa.options,Vo=Je.useCallback(function(Ua){var Ms=_a(Ua);return Ms.map(function(us){var fs,gl,tl,nc,Rc;if(ki(us))fs=us;else{var _u;tl=us.key,gl=us.label,fs=(_u=us.value)!==null&&_u!==void 0?_u:tl}var au=la.get(fs);if(au){var jc;if(gl===void 0&&(gl=au==null?void 0:au[Po||Gs.label]),tl===void 0&&(tl=(jc=au==null?void 0:au.key)!==null&&jc!==void 0?jc:fs),nc=au==null?void 0:au.disabled,Rc=au==null?void 0:au.title,0)var Fc}return{label:gl,value:fs,key:tl,disabled:nc,title:Rc}})},[Gs,Po,la]),Xa=Mt(ys,{value:ds}),ss=fn(Xa,2),va=ss[0],ll=ss[1],Nl=Je.useMemo(function(){var Ua,Ms=zs&&va===null?[]:va,us=Vo(Ms);return gt==="combobox"&&bs((Ua=us[0])===null||Ua===void 0?void 0:Ua.value)?[]:us},[va,Vo,gt,zs]),Us=$c(Nl,la),Zl=fn(Us,2),$s=Zl[0],pl=Zl[1],xl=Je.useMemo(function(){if(!gt&&$s.length===1){var Ua=$s[0];if(Ua.value===null&&(Ua.label===null||Ua.label===void 0))return[]}return $s.map(function(Ms){var us;return Et(Et({},Ms),{},{label:(us=typeof Wa=="function"?Wa(Ms):Ms.label)!==null&&us!==void 0?us:Ms.value})})},[gt,$s,Wa]),ru=Je.useMemo(function(){return new Set($s.map(function(Ua){return Ua.value}))},[$s]);Je.useEffect(function(){if(gt==="combobox"){var Ua,Ms=(Ua=$s[0])===null||Ua===void 0?void 0:Ua.value;$o(kl(Ms)?String(Ms):"")}},[$s]);var Ll=tn(function(Ua,Ms){var us=Ms!=null?Ms:Ua;return Pt(Pt({},Gs.value,Ua),Gs.label,us)}),wl=Je.useMemo(function(){if(gt!=="tags")return fo;var Ua=ht(fo),Ms=function(fs){return la.has(fs)};return ht($s).sort(function(us,fs){return us.value<fs.value?-1:1}).forEach(function(us){var fs=us.value;Ms(fs)||Ua.push(Ll(fs,us.label))}),Ua},[Ll,fo,la,$s,gt]),Ks=iu(wl,Gs,el,Vs,Eo),Pl=Je.useMemo(function(){return gt!=="tags"||!el||Ks.some(function(Ua){return Ua[Eo||"value"]===el})||Ks.some(function(Ua){return Ua[Gs.value]===el})?Ks:[Ll(el)].concat(ht(Ks))},[Ll,Eo,gt,Ks,el,Gs]),xu=function Ua(Ms){var us=ht(Ms).sort(function(fs,gl){return ea(fs,gl,{searchValue:el})});return us.map(function(fs){return Array.isArray(fs.options)?Et(Et({},fs),{},{options:fs.options.length>0?Ua(fs.options):fs.options}):fs})},Cu=Je.useMemo(function(){return ea?xu(Pl):Pl},[Pl,ea,el]),ta=Je.useMemo(function(){return Ds(Cu,{fieldNames:Gs,childrenAsData:Os})},[Cu,Gs,Os]),Io=function(Ms){var us=Vo(Ms);if(ll(us),Lo&&(us.length!==$s.length||us.some(function(tl,nc){var Rc;return((Rc=$s[nc])===null||Rc===void 0?void 0:Rc.value)!==(tl==null?void 0:tl.value)}))){var fs=ls?us:us.map(function(tl){return tl.value}),gl=us.map(function(tl){return Ps(pl(tl.value))});Lo(zs?fs:fs[0],zs?gl:gl[0])}},Ko=Je.useState(null),gs=fn(Ko,2),Ml=gs[0],Vl=gs[1],wu=Je.useState(0),Gt=fn(wu,2),Uu=Gt[0],Ql=Gt[1],$u=$r!==void 0?$r:gt!=="combobox",Ic=Je.useCallback(function(Ua,Ms){var us=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},fs=us.source,gl=fs===void 0?"keyboard":fs;Ql(Ms),Dn&&gt==="combobox"&&Ua!==null&&gl==="keyboard"&&Vl(String(Ua))},[Dn,gt]),tu=function(Ms,us,fs){var gl=function(){var Is,Qa=pl(Ms);return[ls?{label:Qa==null?void 0:Qa[Gs.label],value:Ms,key:(Is=Qa==null?void 0:Qa.key)!==null&&Is!==void 0?Is:Ms}:Ms,Ps(Qa)]};if(us&&Ui){var tl=gl(),nc=fn(tl,2),Rc=nc[0],_u=nc[1];Ui(Rc,_u)}else if(!us&&zi&&fs!=="clear"){var au=gl(),jc=fn(au,2),Fc=jc[0],Ou=jc[1];zi(Fc,Ou)}},Ra=tn(function(Ua,Ms){var us,fs=zs?Ms.selected:!0;fs?us=zs?[].concat(ht($s),[Ua]):[Ua]:us=$s.filter(function(gl){return gl.value!==Ua}),Io(us),tu(Ua,fs),gt==="combobox"?Vl(""):(!ln||Pr)&&($o(""),Vl(""))}),Ys=function(Ms,us){Io(Ms);var fs=us.type,gl=us.values;(fs==="remove"||fs==="clear")&&gl.forEach(function(tl){tu(tl.value,!1,fs)})},Ba=function(Ms,us){if($o(Ms),Vl(null),us.source==="submit"){var fs=(Ms||"").trim();if(fs){var gl=Array.from(new Set([].concat(ht(ru),[fs])));Io(gl),tu(fs,!0),$o("")}return}us.source!=="blur"&&(gt==="combobox"&&Io(Ms),Hi==null||Hi(Ms))},ou=function(Ms){var us=Ms;gt!=="tags"&&(us=Ms.map(function(gl){var tl=qr.get(gl);return tl==null?void 0:tl.value}).filter(function(gl){return gl!==void 0}));var fs=Array.from(new Set([].concat(ht(ru),ht(us))));Io(fs),fs.forEach(function(gl){tu(gl,!0)})},Nu=Je.useMemo(function(){var Ua=fa!==!1&&Er!==!1;return Et(Et({},oa),{},{flattenOptions:ta,onActiveValue:Ic,defaultActiveFirstOption:$u,onSelect:Ra,menuItemSelectedIcon:Oo,rawValues:ru,fieldNames:Gs,virtual:Ua,direction:Qr,listHeight:ra,listItemHeight:Jo,childrenAsData:Os,maxCount:Ea,optionRender:or})},[Ea,oa,ta,Ic,$u,Ra,Oo,ru,Gs,fa,Er,Qr,ra,Jo,Os,or]);return Je.createElement(hu.Provider,{value:Nu},Je.createElement(Uo,ye({},Cs,{id:hs,prefixCls:vn,ref:Ie,omitDomProps:Bi,mode:gt,displayValues:xl,onDisplayValuesChange:Ys,direction:Qr,searchValue:el,onSearch:Ba,autoClearSearchValue:Pr,onSearchSplit:ou,dropdownMatchSelectWidth:Er,OptionList:oo,emptyOptions:!ta.length,activeValue:Ml,activeDescendantId:"".concat(hs,"_list_").concat(Uu)})))}),pi=On;pi.Option=Jc,pi.OptGroup=al;var ur=null,_r=null;function da(ke){var Ie=Je.useRef();Ie.current=ke;var st=Je.useCallback(function(){for(var gt,Xt=arguments.length,vn=new Array(Xt),Dn=0;Dn<Xt;Dn++)vn[Dn]=arguments[Dn];return(gt=Ie.current)===null||gt===void 0?void 0:gt.call.apply(gt,[Ie].concat(vn))},[]);return st}function ia(ke){if(Array.isArray(ke))return ke}function Es(ke,Ie){var st=ke==null?null:typeof Symbol!="undefined"&&ke[Symbol.iterator]||ke["@@iterator"];if(st!=null){var gt,Xt,vn,Dn,di=[],yi=!0,ai=!1;try{if(vn=(st=st.call(ke)).next,Ie===0){if(Object(st)!==st)return;yi=!1}else for(;!(yi=(gt=vn.call(st)).done)&&(di.push(gt.value),di.length!==Ie);yi=!0);}catch(Hi){ai=!0,Xt=Hi}finally{try{if(!yi&&st.return!=null&&(Dn=st.return(),Object(Dn)!==Dn))return}finally{if(ai)throw Xt}}return di}}function cs(ke,Ie){(Ie==null||Ie>ke.length)&&(Ie=ke.length);for(var st=0,gt=new Array(Ie);st<Ie;st++)gt[st]=ke[st];return gt}function Do(ke,Ie){if(ke){if(typeof ke=="string")return cs(ke,Ie);var st=Object.prototype.toString.call(ke).slice(8,-1);if(st==="Object"&&ke.constructor&&(st=ke.constructor.name),st==="Map"||st==="Set")return Array.from(ke);if(st==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(st))return cs(ke,Ie)}}function jr(){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 qi(ke,Ie){return ia(ke)||Es(ke,Ie)||Do(ke,Ie)||jr()}function Va(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Ha=Va()?Je.useLayoutEffect:Je.useEffect,Ts=function(Ie,st){var gt=Je.useRef(!0);Ha(function(){return Ie(gt.current)},st),Ha(function(){return gt.current=!1,function(){gt.current=!0}},[])},_s=function(Ie,st){Ts(function(gt){if(!gt)return Ie()},st)},ha=null;function za(ke){var Ie=Je.useRef(!1),st=Je.useState(ke),gt=qi(st,2),Xt=gt[0],vn=gt[1];Je.useEffect(function(){return Ie.current=!1,function(){Ie.current=!0}},[]);function Dn(di,yi){yi&&Ie.current||vn(di)}return[Xt,Dn]}function Ho(ke){return ke!==void 0}function zr(ke,Ie){var st=Ie||{},gt=st.defaultValue,Xt=st.value,vn=st.onChange,Dn=st.postState,di=za(function(){return Ho(Xt)?Xt:Ho(gt)?typeof gt=="function"?gt():gt:typeof ke=="function"?ke():ke}),yi=qi(di,2),ai=yi[0],Hi=yi[1],$i=Xt!==void 0?Xt:ai,Pr=Dn?Dn($i):$i,Ui=da(vn),zi=za([$i]),cr=qi(zi,2),Er=cr[0],To=cr[1];_s(function(){var Eo=Er[0];ai!==Eo&&Ui(ai,Eo)},[Er]),_s(function(){Ho(Xt)||Hi(Xt)},[Xt]);var ea=da(function(Eo,Po){Hi(Eo,Po),To([$i],Po)});return[Pr,ea]}var Ns=Je.createContext({}),Aa=Ns,Ia="__rc_cascader_search_mark__",Zs=function(Ie,st,gt){var Xt=gt.label,vn=Xt===void 0?"":Xt;return st.some(function(Dn){return String(Dn[vn]).toLowerCase().includes(Ie.toLowerCase())})},Vu=function(Ie,st,gt,Xt){return st.map(function(vn){return vn[Xt.label]}).join(" / ")},fu=function(Ie,st,gt,Xt,vn,Dn){var di=vn.filter,yi=di===void 0?Zs:di,ai=vn.render,Hi=ai===void 0?Vu:ai,$i=vn.limit,Pr=$i===void 0?50:$i,Ui=vn.sort;return Je.useMemo(function(){var zi=[];if(!Ie)return[];function cr(Er,To){var ea=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Er.forEach(function(Eo){if(!(!Ui&&Pr!==!1&&Pr>0&&zi.length>=Pr)){var Po=[].concat(jt(To),[Eo]),Ma=Eo[gt.children],or=ea||Eo.disabled;if((!Ma||Ma.length===0||Dn)&&yi(Ie,Po,{label:gt.label})){var _o;zi.push(Ve(Ve({},Eo),{},(_o={disabled:or},wt(_o,gt.label,Hi(Ie,Po,Xt,gt)),wt(_o,Ia,Po),wt(_o,gt.children,void 0),_o)))}Ma&&cr(Eo[gt.children],Po,or)}})}return cr(st,[]),Ui&&zi.sort(function(Er,To){return Ui(Er[Ia],To[Ia],Ie,gt)}),Pr!==!1&&Pr>0?zi.slice(0,Pr):zi},[Ie,st,gt,Xt,Hi,Dn,yi,Ui,Pr])},St=fu,Jt="__RC_CASCADER_SPLIT__",ze="SHOW_PARENT",dt="SHOW_CHILD";function lr(ke){return ke.join(Jt)}function rr(ke){return ke.map(lr)}function kr(ke){return ke.split(Jt)}function tr(ke){var Ie=ke||{},st=Ie.label,gt=Ie.value,Xt=Ie.children,vn=gt||"value";return{label:st||"label",value:vn,key:vn,children:Xt||"children"}}function Yn(ke,Ie){var st,gt;return(st=ke.isLeaf)!==null&&st!==void 0?st:!((gt=ke[Ie.children])!==null&&gt!==void 0&&gt.length)}function Tr(ke){var Ie=ke.parentElement;if(Ie){var st=ke.offsetTop-Ie.offsetTop;st-Ie.scrollTop<0?Ie.scrollTo({top:st}):st+ke.offsetHeight-Ie.scrollTop>Ie.offsetHeight&&Ie.scrollTo({top:st+ke.offsetHeight-Ie.offsetHeight})}}function Lr(ke,Ie){return ke.map(function(st){var gt;return(gt=st[Ia])===null||gt===void 0?void 0:gt.map(function(Xt){return Xt[Ie.value]})})}function Vr(ke){return Array.isArray(ke)&&Array.isArray(ke[0])}function mr(ke){return ke?Vr(ke)?ke:(ke.length===0?[]:[ke]).map(function(Ie){return Array.isArray(Ie)?Ie:[Ie]}):[]}function zo(ke,Ie,st){var gt=new Set(ke),Xt=Ie();return ke.filter(function(vn){var Dn=Xt[vn],di=Dn?Dn.parent:null,yi=Dn?Dn.children:null;return Dn&&Dn.node.disabled?!0:st===dt?!(yi&&yi.some(function(ai){return ai.key&&gt.has(ai.key)})):!(di&&!di.node.disabled&&gt.has(di.key))})}function Ii(ke,Ie,st){for(var gt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,Xt=Ie,vn=[],Dn=function(){var ai,Hi,$i,Pr=ke[di],Ui=(ai=Xt)===null||ai===void 0?void 0:ai.findIndex(function(cr){var Er=cr[st.value];return gt?String(Er)===String(Pr):Er===Pr}),zi=Ui!==-1?(Hi=Xt)===null||Hi===void 0?void 0:Hi[Ui]:null;vn.push({value:($i=zi==null?void 0:zi[st.value])!==null&&$i!==void 0?$i:Pr,index:Ui,option:zi}),Xt=zi==null?void 0:zi[st.children]},di=0;di<ke.length;di+=1)Dn();return vn}var vi=function(ke,Ie,st,gt,Xt){return Je.useMemo(function(){var vn=Xt||function(Dn){var di=gt?Dn.slice(-1):Dn,yi=" / ";return di.every(function(ai){return["string","number"].includes(Xe(ai))})?di.join(yi):di.reduce(function(ai,Hi,$i){var Pr=Je.isValidElement(Hi)?Je.cloneElement(Hi,{key:$i}):Hi;return $i===0?[Pr]:[].concat(jt(ai),[yi,Pr])},[])};return ke.map(function(Dn){var di,yi=Ii(Dn,Ie,st),ai=vn(yi.map(function($i){var Pr,Ui=$i.option,zi=$i.value;return(Pr=Ui==null?void 0:Ui[st.label])!==null&&Pr!==void 0?Pr:zi}),yi.map(function($i){var Pr=$i.option;return Pr})),Hi=lr(Dn);return{label:ai,value:Hi,key:Hi,valueCells:Dn,disabled:(di=yi[yi.length-1])===null||di===void 0||(di=di.option)===null||di===void 0?void 0:di.disabled}})},[ke,Ie,st,Xt,gt])};function Ai(ke,Ie){return Je.useCallback(function(st){var gt=[],Xt=[];return st.forEach(function(vn){var Dn=Ii(vn,ke,Ie);Dn.every(function(di){return di.option})?Xt.push(vn):gt.push(vn)}),[Xt,gt]},[ke,Ie])}var Or=be(1089),Ur=function(ke,Ie){var st=Je.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}}),gt=Je.useCallback(function(){return st.current.options!==ke&&(st.current.options=ke,st.current.info=(0,Or.I8)(ke,{fieldNames:Ie,initWrapper:function(vn){return Ve(Ve({},vn),{},{pathKeyEntities:{}})},processEntity:function(vn,Dn){var di=vn.nodes.map(function(yi){return yi[Ie.value]}).join(Jt);Dn.pathKeyEntities[di]=vn,vn.key=di}})),st.current.info.pathKeyEntities},[Ie,ke]);return gt};function Fr(ke,Ie){var st=Je.useMemo(function(){return Ie||[]},[Ie]),gt=Ur(st,ke),Xt=Je.useCallback(function(vn){var Dn=gt();return vn.map(function(di){var yi=Dn[di].nodes;return yi.map(function(ai){return ai[ke.value]})})},[gt,ke]);return[st,gt,Xt]}var ko={},yr=[],vo=function(Ie){yr.push(Ie)};function Xi(ke,Ie){if(0)var st}function Gr(ke,Ie){if(0)var st}function mo(){ko={}}function aa(ke,Ie,st){!Ie&&!ko[st]&&(ke(!1,st),ko[st]=!0)}function ka(ke,Ie){aa(Xi,ke,Ie)}function Fs(ke,Ie){aa(Gr,ke,Ie)}ka.preMessage=vo,ka.resetWarned=mo,ka.noteOnce=Fs;var Kr=null;function Xl(ke){return Je.useMemo(function(){if(!ke)return[!1,{}];var Ie={matchInputWidth:!0,limit:50};return ke&&Xe(ke)==="object"&&(Ie=Ve(Ve({},Ie),ke)),Ie.limit<=0&&(Ie.limit=!1),[!0,Ie]},[ke])}var Fo=be(17341);function Da(ke,Ie,st,gt,Xt,vn,Dn,di){return function(yi){if(!ke)Ie(yi);else{var ai=lr(yi),Hi=rr(st),$i=rr(gt),Pr=Hi.includes(ai),Ui=Xt.some(function(or){return lr(or)===ai}),zi=st,cr=Xt;if(Ui&&!Pr)cr=Xt.filter(function(or){return lr(or)!==ai});else{var Er=Pr?Hi.filter(function(or){return or!==ai}):[].concat(jt(Hi),[ai]),To=vn(),ea;if(Pr){var Eo=(0,Fo.S)(Er,{checked:!1,halfCheckedKeys:$i},To);ea=Eo.checkedKeys}else{var Po=(0,Fo.S)(Er,!0,To);ea=Po.checkedKeys}var Ma=zo(ea,vn,di);zi=Dn(Ma)}Ie([].concat(jt(cr),jt(zi)))}}}function jo(ke,Ie,st,gt,Xt){return Je.useMemo(function(){var vn=Xt(Ie),Dn=ce(vn,2),di=Dn[0],yi=Dn[1];if(!ke||!Ie.length)return[di,[],yi];var ai=rr(di),Hi=st(),$i=(0,Fo.S)(ai,!0,Hi),Pr=$i.checkedKeys,Ui=$i.halfCheckedKeys;return[gt(Pr),gt(Ui),yi]},[ke,Ie,st,gt,Xt])}var yl=Je.memo(function(ke){var Ie=ke.children;return Ie},function(ke,Ie){return!Ie.open}),Ls=yl;function Rl(ke){var Ie,st=ke.prefixCls,gt=ke.checked,Xt=ke.halfChecked,vn=ke.disabled,Dn=ke.onClick,di=ke.disableCheckbox,yi=Je.useContext(Aa),ai=yi.checkable,Hi=typeof ai!="boolean"?ai:null;return Je.createElement("span",{className:ot()("".concat(st),(Ie={},wt(Ie,"".concat(st,"-checked"),gt),wt(Ie,"".concat(st,"-indeterminate"),!gt&&Xt),wt(Ie,"".concat(st,"-disabled"),vn||di),Ie)),onClick:Dn},Hi)}var Oc="__cascader_fix_label__";function ad(ke){var Ie=ke.prefixCls,st=ke.multiple,gt=ke.options,Xt=ke.activeValue,vn=ke.prevValuePath,Dn=ke.onToggleOpen,di=ke.onSelect,yi=ke.onActive,ai=ke.checkedSet,Hi=ke.halfCheckedSet,$i=ke.loadingKeys,Pr=ke.isSelectable,Ui=ke.disabled,zi="".concat(Ie,"-menu"),cr="".concat(Ie,"-menu-item"),Er=Je.useContext(Aa),To=Er.fieldNames,ea=Er.changeOnSelect,Eo=Er.expandTrigger,Po=Er.expandIcon,Ma=Er.loadingIcon,or=Er.dropdownMenuColumnStyle,_o=Er.optionRender,$r=Eo==="hover",Oo=function(Na){return Ui||Na},fa=Je.useMemo(function(){return gt.map(function(Qr){var Na,ra=Qr.disabled,ns=Qr.disableCheckbox,Jo=Qr[Ia],Wa=(Na=Qr[Oc])!==null&&Na!==void 0?Na:Qr[To.label],ds=Qr[To.value],ys=Yn(Qr,To),ls=Jo?Jo.map(function(zs){return zs[To.value]}):[].concat(jt(vn),[ds]),Lo=lr(ls),Ea=$i.includes(Lo),Cs=ai.has(Lo),hs=Hi.has(Lo);return{disabled:ra,label:Wa,value:ds,isLeaf:ys,isLoading:Ea,checked:Cs,halfChecked:hs,option:Qr,disableCheckbox:ns,fullPath:ls,fullPathKey:Lo}})},[gt,ai,To,Hi,$i,vn]);return Je.createElement("ul",{className:zi,role:"menu"},fa.map(function(Qr){var Na,ra=Qr.disabled,ns=Qr.label,Jo=Qr.value,Wa=Qr.isLeaf,ds=Qr.isLoading,ys=Qr.checked,ls=Qr.halfChecked,Lo=Qr.option,Ea=Qr.fullPath,Cs=Qr.fullPathKey,hs=Qr.disableCheckbox,zs=function(){if(!Oo(ra)){var nl=jt(Ea);$r&&Wa&&nl.pop(),yi(nl)}},Os=function(){Pr(Lo)&&!Oo(ra)&&di(Ea,Wa)},Vs;return typeof Lo.title=="string"?Vs=Lo.title:typeof ns=="string"&&(Vs=ns),Je.createElement("li",{key:Cs,className:ot()(cr,(Na={},wt(Na,"".concat(cr,"-expand"),!Wa),wt(Na,"".concat(cr,"-active"),Xt===Jo||Xt===Cs),wt(Na,"".concat(cr,"-disabled"),Oo(ra)),wt(Na,"".concat(cr,"-loading"),ds),Na)),style:or,role:"menuitemcheckbox",title:Vs,"aria-checked":ys,"data-path-key":Cs,onClick:function(){zs(),!hs&&(!st||Wa)&&Os()},onDoubleClick:function(){ea&&Dn(!1)},onMouseEnter:function(){$r&&zs()},onMouseDown:function(nl){nl.preventDefault()}},st&&Je.createElement(Rl,{prefixCls:"".concat(Ie,"-checkbox"),checked:ys,halfChecked:ls,disabled:Oo(ra)||hs,disableCheckbox:hs,onClick:function(nl){hs||(nl.stopPropagation(),Os())}}),Je.createElement("div",{className:"".concat(cr,"-content")},_o?_o(Lo):ns),!ds&&Po&&!Wa&&Je.createElement("div",{className:"".concat(cr,"-expand-icon")},Po),ds&&Ma&&Je.createElement("div",{className:"".concat(cr,"-loading-icon")},Ma))}))}var Cc=function(Ie,st){var gt=Je.useContext(Aa),Xt=gt.values,vn=Xt[0],Dn=Je.useState([]),di=ce(Dn,2),yi=di[0],ai=di[1];return Je.useEffect(function(){Ie||ai(vn||[])},[st,vn]),[yi,ai]},bc=Cc,uo={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(Ie){var st=Ie.keyCode;if(Ie.altKey&&!Ie.ctrlKey||Ie.metaKey||st>=uo.F1&&st<=uo.F12)return!1;switch(st){case uo.ALT:case uo.CAPS_LOCK:case uo.CONTEXT_MENU:case uo.CTRL:case uo.DOWN:case uo.END:case uo.ESC:case uo.HOME:case uo.INSERT:case uo.LEFT:case uo.MAC_FF_META:case uo.META:case uo.NUMLOCK:case uo.NUM_CENTER:case uo.PAGE_DOWN:case uo.PAGE_UP:case uo.PAUSE:case uo.PRINT_SCREEN:case uo.RIGHT:case uo.SHIFT:case uo.UP:case uo.WIN_KEY:case uo.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ie){if(Ie>=uo.ZERO&&Ie<=uo.NINE||Ie>=uo.NUM_ZERO&&Ie<=uo.NUM_MULTIPLY||Ie>=uo.A&&Ie<=uo.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ie===0)return!0;switch(Ie){case uo.SPACE:case uo.QUESTION_MARK:case uo.NUM_PLUS:case uo.NUM_MINUS:case uo.NUM_PERIOD:case uo.NUM_DIVISION:case uo.SEMICOLON:case uo.DASH:case uo.EQUALS:case uo.COMMA:case uo.PERIOD:case uo.SLASH:case uo.APOSTROPHE:case uo.SINGLE_QUOTE:case uo.OPEN_SQUARE_BRACKET:case uo.BACKSLASH:case uo.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},gu=uo,Ye=function(ke,Ie,st,gt,Xt,vn,Dn){var di=Dn.direction,yi=Dn.searchValue,ai=Dn.toggleOpen,Hi=Dn.open,$i=di==="rtl",Pr=Je.useMemo(function(){for(var or=-1,_o=Ie,$r=[],Oo=[],fa=gt.length,Qr=Lr(Ie,st),Na=function(ds){var ys=_o.findIndex(function(ls,Lo){return(Qr[Lo]?lr(Qr[Lo]):ls[st.value])===gt[ds]});if(ys===-1)return 1;or=ys,$r.push(or),Oo.push(gt[ds]),_o=_o[or][st.children]},ra=0;ra<fa&&_o&&!Na(ra);ra+=1);for(var ns=Ie,Jo=0;Jo<$r.length-1;Jo+=1)ns=ns[$r[Jo]][st.children];return[Oo,or,ns,Qr]},[gt,st,Ie]),Ui=ce(Pr,4),zi=Ui[0],cr=Ui[1],Er=Ui[2],To=Ui[3],ea=function(_o){Xt(_o)},Eo=function(_o){var $r=Er.length,Oo=cr;Oo===-1&&_o<0&&(Oo=$r);for(var fa=0;fa<$r;fa+=1){Oo=(Oo+_o+$r)%$r;var Qr=Er[Oo];if(Qr&&!Qr.disabled){var Na=zi.slice(0,-1).concat(To[Oo]?lr(To[Oo]):Qr[st.value]);ea(Na);return}}},Po=function(){if(zi.length>1){var _o=zi.slice(0,-1);ea(_o)}else ai(!1)},Ma=function(){var _o,$r=((_o=Er[cr])===null||_o===void 0?void 0:_o[st.children])||[],Oo=$r.find(function(Qr){return!Qr.disabled});if(Oo){var fa=[].concat(jt(zi),[Oo[st.value]]);ea(fa)}};Je.useImperativeHandle(ke,function(){return{onKeyDown:function(_o){var $r=_o.which;switch($r){case gu.UP:case gu.DOWN:{var Oo=0;$r===gu.UP?Oo=-1:$r===gu.DOWN&&(Oo=1),Oo!==0&&Eo(Oo);break}case gu.LEFT:{if(yi)break;$i?Ma():Po();break}case gu.RIGHT:{if(yi)break;$i?Po():Ma();break}case gu.BACKSPACE:{yi||Po();break}case gu.ENTER:{if(zi.length){var fa=Er[cr],Qr=(fa==null?void 0:fa[Ia])||[];Qr.length?vn(Qr.map(function(Na){return Na[st.value]}),Qr[Qr.length-1]):vn(zi,Er[cr])}break}case gu.ESC:ai(!1),Hi&&_o.stopPropagation()}},onKeyUp:function(){}}})},bt=Je.forwardRef(function(ke,Ie){var st,gt,Xt,vn=ke.prefixCls,Dn=ke.multiple,di=ke.searchValue,yi=ke.toggleOpen,ai=ke.notFoundContent,Hi=ke.direction,$i=ke.open,Pr=ke.disabled,Ui=Je.useRef(null),zi=Hi==="rtl",cr=Je.useContext(Aa),Er=cr.options,To=cr.values,ea=cr.halfValues,Eo=cr.fieldNames,Po=cr.changeOnSelect,Ma=cr.onSelect,or=cr.searchOptions,_o=cr.dropdownPrefixCls,$r=cr.loadData,Oo=cr.expandTrigger,fa=_o||vn,Qr=Je.useState([]),Na=ce(Qr,2),ra=Na[0],ns=Na[1],Jo=function(qr){if(!(!$r||di)){var fo=Ii(qr,Er,Eo),Vo=fo.map(function(va){var ll=va.option;return ll}),Xa=Vo[Vo.length-1];if(Xa&&!Yn(Xa,Eo)){var ss=lr(qr);ns(function(va){return[].concat(jt(va),[ss])}),$r(Vo)}}};Je.useEffect(function(){ra.length&&ra.forEach(function(la){var qr=kr(la),fo=Ii(qr,Er,Eo,!0).map(function(Xa){var ss=Xa.option;return ss}),Vo=fo[fo.length-1];(!Vo||Vo[Eo.children]||Yn(Vo,Eo))&&ns(function(Xa){return Xa.filter(function(ss){return ss!==la})})})},[Er,ra,Eo]);var Wa=Je.useMemo(function(){return new Set(rr(To))},[To]),ds=Je.useMemo(function(){return new Set(rr(ea))},[ea]),ys=bc(Dn,$i),ls=ce(ys,2),Lo=ls[0],Ea=ls[1],Cs=function(qr){Ea(qr),Jo(qr)},hs=function(qr){if(Pr)return!1;var fo=qr.disabled,Vo=Yn(qr,Eo);return!fo&&(Vo||Po||Dn)},zs=function(qr,fo){var Vo=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;Ma(qr),!Dn&&(fo||Po&&(Oo==="hover"||Vo))&&yi(!1)},Os=Je.useMemo(function(){return di?or:Er},[di,or,Er]),Vs=Je.useMemo(function(){for(var la=[{options:Os}],qr=Os,fo=Lr(qr,Eo),Vo=function(){var va=Lo[Xa],ll=qr.find(function(Us,Zl){return(fo[Zl]?lr(fo[Zl]):Us[Eo.value])===va}),Nl=ll==null?void 0:ll[Eo.children];if(!(Nl!=null&&Nl.length))return 1;qr=Nl,la.push({options:Nl})},Xa=0;Xa<Lo.length&&!Vo();Xa+=1);return la},[Os,Lo,Eo]),Gs=function(qr,fo){hs(fo)&&zs(qr,Yn(fo,Eo),!0)};Ye(Ie,Os,Eo,Lo,Cs,Gs,{direction:Hi,searchValue:di,toggleOpen:yi,open:$i}),Je.useEffect(function(){if(!di)for(var la=0;la<Lo.length;la+=1){var qr,fo=Lo.slice(0,la+1),Vo=lr(fo),Xa=(qr=Ui.current)===null||qr===void 0?void 0:qr.querySelector('li[data-path-key="'.concat(Vo.replace(/\\{0,2}"/g,'\\"'),'"]'));Xa&&Tr(Xa)}},[Lo,di]);var nl=!((st=Vs[0])!==null&&st!==void 0&&(st=st.options)!==null&&st!==void 0&&st.length),Wl=[(gt={},wt(gt,Eo.value,"__EMPTY__"),wt(gt,Oc,ai),wt(gt,"disabled",!0),gt)],el=Ve(Ve({},ke),{},{multiple:!nl&&Dn,onSelect:zs,onActive:Cs,onToggleOpen:yi,checkedSet:Wa,halfCheckedSet:ds,loadingKeys:ra,isSelectable:hs}),$o=nl?[{options:Wl}]:Vs,oa=$o.map(function(la,qr){var fo=Lo.slice(0,qr),Vo=Lo[qr];return Je.createElement(ad,le({key:qr},el,{prefixCls:fa,options:la.options,prevValuePath:fo,activeValue:Vo}))});return Je.createElement(Ls,{open:$i},Je.createElement("div",{className:ot()("".concat(fa,"-menus"),(Xt={},wt(Xt,"".concat(fa,"-menu-empty"),nl),wt(Xt,"".concat(fa,"-rtl"),zi),Xt)),ref:Ui},oa))}),Bt=bt,Tt=Je.forwardRef(function(ke,Ie){var st=Zr();return Je.createElement(Bt,le({},ke,st,{ref:Ie}))}),$t=Tt,hn=be(80705);function Pn(ke,Ie,st){var gt=React.useRef({});return(!("value"in gt.current)||st(gt.current.condition,Ie))&&(gt.current.value=ke(),gt.current.condition=Ie),gt.current.value}var Wn=Symbol.for("react.element"),fi=Symbol.for("react.transitional.element"),ti=Symbol.for("react.fragment");function nr(ke){return ke&&_typeof(ke)==="object"&&(ke.$$typeof===Wn||ke.$$typeof===fi)&&ke.type===ti}var li=Number(Je.version.split(".")[0]),Zi=function(Ie,st){typeof Ie=="function"?Ie(st):_typeof(Ie)==="object"&&Ie&&"current"in Ie&&(Ie.current=st)},Li=function(){for(var Ie=arguments.length,st=new Array(Ie),gt=0;gt<Ie;gt++)st[gt]=arguments[gt];var Xt=st.filter(Boolean);return Xt.length<=1?Xt[0]:function(vn){st.forEach(function(Dn){Zi(Dn,vn)})}},gr=function(){for(var Ie=arguments.length,st=new Array(Ie),gt=0;gt<Ie;gt++)st[gt]=arguments[gt];return useMemo(function(){return Li.apply(void 0,st)},st,function(Xt,vn){return Xt.length!==vn.length||Xt.every(function(Dn,di){return Dn!==vn[di]})})},Ir=function(Ie){var st,gt;if(!Ie)return!1;if(co(Ie)&&li>=19)return!0;var Xt=isMemo(Ie)?Ie.type.type:Ie.type;return!(typeof Xt=="function"&&!((st=Xt.prototype)!==null&&st!==void 0&&st.render)&&Xt.$$typeof!==ForwardRef||typeof Ie=="function"&&!((gt=Ie.prototype)!==null&&gt!==void 0&&gt.render)&&Ie.$$typeof!==ForwardRef)};function co(ke){return isValidElement(ke)&&!isFragment(ke)}var Wo=function(Ie){return co(Ie)&&Ir(Ie)},Ht=function(Ie){if(Ie&&co(Ie)){var st=Ie;return st.props.propertyIsEnumerable("ref")?st.props.ref:st.ref}return null};function ei(ke,Ie,st,gt){if(!Ie.length)return st;var Xt=_toArray(Ie),vn=Xt[0],Dn=Xt.slice(1),di;return!ke&&typeof vn=="number"?di=[]:Array.isArray(ke)?di=_toConsumableArray(ke):di=_objectSpread({},ke),gt&&st===void 0&&Dn.length===1?delete di[vn][Dn[0]]:di[vn]=ei(di[vn],Dn,st,gt),di}function bi(ke,Ie,st){var gt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ie.length&&gt&&st===void 0&&!get(ke,Ie.slice(0,-1))?ke:ei(ke,Ie,st,gt)}function Vi(ke){return _typeof(ke)==="object"&&ke!==null&&Object.getPrototypeOf(ke)===Object.prototype}function ni(ke){return Array.isArray(ke)?[]:{}}var Sr=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function xo(){for(var ke=arguments.length,Ie=new Array(ke),st=0;st<ke;st++)Ie[st]=arguments[st];var gt=ni(Ie[0]);return Ie.forEach(function(Xt){function vn(Dn,di){var yi=new Set(di),ai=get(Xt,Dn),Hi=Array.isArray(ai);if(Hi||Vi(ai)){if(!yi.has(ai)){yi.add(ai);var $i=get(gt,Dn);Hi?gt=bi(gt,Dn,[]):(!$i||_typeof($i)!=="object")&&(gt=bi(gt,Dn,ni(ai))),Sr(ai).forEach(function(Pr){vn([].concat(_toConsumableArray(Dn),[Pr]),yi)})}}else gt=bi(gt,Dn,ai)}vn([])}),gt}function ho(){}function Yr(ke){var Ie,st=ke,gt=st.prefixCls,Xt=gt===void 0?"rc-cascader":gt,vn=st.style,Dn=st.className,di=st.options,yi=st.checkable,ai=st.defaultValue,Hi=st.value,$i=st.fieldNames,Pr=st.changeOnSelect,Ui=st.onChange,zi=st.showCheckedStrategy,cr=st.loadData,Er=st.expandTrigger,To=st.expandIcon,ea=To===void 0?">":To,Eo=st.loadingIcon,Po=st.direction,Ma=st.notFoundContent,or=Ma===void 0?"Not Found":Ma,_o=st.disabled,$r=!!yi,Oo=zr(ai,{value:Hi,postState:mr}),fa=ce(Oo,2),Qr=fa[0],Na=fa[1],ra=Je.useMemo(function(){return tr($i)},[JSON.stringify($i)]),ns=Fr(ra,di),Jo=ce(ns,3),Wa=Jo[0],ds=Jo[1],ys=Jo[2],ls=Ai(Wa,ra),Lo=jo($r,Qr,ds,ys,ls),Ea=ce(Lo,3),Cs=Ea[0],hs=Ea[1],zs=Ea[2],Os=da(function($o){if(Na($o),Ui){var oa=mr($o),la=oa.map(function(Vo){return Ii(Vo,Wa,ra).map(function(Xa){return Xa.option})}),qr=$r?oa:oa[0],fo=$r?la:la[0];Ui(qr,fo)}}),Vs=Da($r,Os,Cs,hs,zs,ds,ys,zi),Gs=da(function($o){Vs($o)}),nl=Je.useMemo(function(){return{options:Wa,fieldNames:ra,values:Cs,halfValues:hs,changeOnSelect:Pr,onSelect:Gs,checkable:yi,searchOptions:[],dropdownPrefixCls:void 0,loadData:cr,expandTrigger:Er,expandIcon:ea,loadingIcon:Eo,dropdownMenuColumnStyle:void 0}},[Wa,ra,Cs,hs,Pr,Gs,yi,cr,Er,ea,Eo]),Wl="".concat(Xt,"-panel"),el=!Wa.length;return Je.createElement(Aa.Provider,{value:nl},Je.createElement("div",{className:ot()(Wl,(Ie={},wt(Ie,"".concat(Wl,"-rtl"),Po==="rtl"),wt(Ie,"".concat(Wl,"-empty"),el),Ie),Dn),style:vn},el?or:Je.createElement(Bt,{prefixCls:Xt,searchValue:"",multiple:$r,toggleOpen:ho,open:!0,direction:Po,disabled:_o})))}function $a(ke){var Ie=ke.onPopupVisibleChange,st=ke.popupVisible,gt=ke.popupClassName,Xt=ke.popupPlacement;warning(!Ie,"`onPopupVisibleChange` is deprecated. Please use `onDropdownVisibleChange` instead."),warning(st===void 0,"`popupVisible` is deprecated. Please use `open` instead."),warning(gt===void 0,"`popupClassName` is deprecated. Please use `dropdownClassName` instead."),warning(Xt===void 0,"`popupPlacement` is deprecated. Please use `placement` instead.")}function Go(ke,Ie){if(ke){var st=function gt(Xt){for(var vn=0;vn<Xt.length;vn++){var Dn=Xt[vn];if(Dn[Ie==null?void 0:Ie.value]===null)return warning(!1,"`value` in Cascader options should not be `null`."),!0;if(Array.isArray(Dn[Ie==null?void 0:Ie.children])&&gt(Dn[Ie==null?void 0:Ie.children]))return!0}};st(ke)}}var Qo=null,ma=["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"],ui=Je.forwardRef(function(ke,Ie){var st=ke.id,gt=ke.prefixCls,Xt=gt===void 0?"rc-cascader":gt,vn=ke.fieldNames,Dn=ke.defaultValue,di=ke.value,yi=ke.changeOnSelect,ai=ke.onChange,Hi=ke.displayRender,$i=ke.checkable,Pr=ke.autoClearSearchValue,Ui=Pr===void 0?!0:Pr,zi=ke.searchValue,cr=ke.onSearch,Er=ke.showSearch,To=ke.expandTrigger,ea=ke.options,Eo=ke.dropdownPrefixCls,Po=ke.loadData,Ma=ke.popupVisible,or=ke.open,_o=ke.popupClassName,$r=ke.dropdownClassName,Oo=ke.dropdownMenuColumnStyle,fa=ke.dropdownStyle,Qr=ke.popupPlacement,Na=ke.placement,ra=ke.onDropdownVisibleChange,ns=ke.onPopupVisibleChange,Jo=ke.expandIcon,Wa=Jo===void 0?">":Jo,ds=ke.loadingIcon,ys=ke.children,ls=ke.dropdownMatchSelectWidth,Lo=ls===void 0?!1:ls,Ea=ke.showCheckedStrategy,Cs=Ea===void 0?ze:Ea,hs=ke.optionRender,zs=ge(ke,ma),Os=El(st),Vs=!!$i,Gs=zr(Dn,{value:di,postState:mr}),nl=ce(Gs,2),Wl=nl[0],el=nl[1],$o=Je.useMemo(function(){return tr(vn)},[JSON.stringify(vn)]),oa=Fr($o,ea),la=ce(oa,3),qr=la[0],fo=la[1],Vo=la[2],Xa=zr("",{value:zi,postState:function(Ra){return Ra||""}}),ss=ce(Xa,2),va=ss[0],ll=ss[1],Nl=function(Ra,Ys){ll(Ra),Ys.source!=="blur"&&cr&&cr(Ra)},Us=Xl(Er),Zl=ce(Us,2),$s=Zl[0],pl=Zl[1],xl=St(va,qr,$o,Eo||Xt,pl,yi||Vs),ru=Ai(qr,$o),Ll=jo(Vs,Wl,fo,Vo,ru),wl=ce(Ll,3),Ks=wl[0],Pl=wl[1],xu=wl[2],Cu=Je.useMemo(function(){var tu=rr(Ks),Ra=zo(tu,fo,Cs);return[].concat(jt(xu),jt(Vo(Ra)))},[Ks,fo,Vo,xu,Cs]),ta=vi(Cu,qr,$o,Vs,Hi),Io=da(function(tu){if(el(tu),ai){var Ra=mr(tu),Ys=Ra.map(function(Nu){return Ii(Nu,qr,$o).map(function(Ua){return Ua.option})}),Ba=Vs?Ra:Ra[0],ou=Vs?Ys:Ys[0];ai(Ba,ou)}}),Ko=Da(Vs,Io,Ks,Pl,xu,fo,Vo,Cs),gs=da(function(tu){(!Vs||Ui)&&ll(""),Ko(tu)}),Ml=function(Ra,Ys){if(Ys.type==="clear"){Io([]);return}var Ba=Ys.values[0],ou=Ba.valueCells;gs(ou)},Vl=or!==void 0?or:Ma,wu=$r||_o,Gt=Na||Qr,Uu=function(Ra){ra==null||ra(Ra),ns==null||ns(Ra)},Ql=Je.useMemo(function(){return{options:qr,fieldNames:$o,values:Ks,halfValues:Pl,changeOnSelect:yi,onSelect:gs,checkable:$i,searchOptions:xl,dropdownPrefixCls:Eo,loadData:Po,expandTrigger:To,expandIcon:Wa,loadingIcon:ds,dropdownMenuColumnStyle:Oo,optionRender:hs}},[qr,$o,Ks,Pl,yi,gs,$i,xl,Eo,Po,To,Wa,ds,Oo,hs]),$u=!(va?xl:qr).length,Ic=va&&pl.matchInputWidth||$u?{}:{minWidth:"auto"};return Je.createElement(Aa.Provider,{value:Ql},Je.createElement(Uo,le({},zs,{ref:Ie,id:Os,prefixCls:Xt,autoClearSearchValue:Ui,dropdownMatchSelectWidth:Lo,dropdownStyle:Ve(Ve({},Ic),fa),displayValues:ta,onDisplayValuesChange:Ml,mode:Vs?"multiple":void 0,searchValue:va,onSearch:Nl,showSearch:$s,OptionList:$t,emptyOptions:$u,open:Vl,dropdownClassName:wu,placement:Gt,onDropdownVisibleChange:Uu,getRawInputElement:function(){return ys}})))});ui.SHOW_PARENT=ze,ui.SHOW_CHILD=dt,ui.Panel=Yr;var wo=ui,sa=wo},42767:function(Rn,$n){"use strict";var be;var le=typeof Symbol=="function"&&Symbol.for,Xe=le?Symbol.for("react.element"):60103,Lt=le?Symbol.for("react.portal"):60106,At=le?Symbol.for("react.fragment"):60107,wt=le?Symbol.for("react.strict_mode"):60108,_e=le?Symbol.for("react.profiler"):60114,Ve=le?Symbol.for("react.provider"):60109,xt=le?Symbol.for("react.context"):60110,ut=le?Symbol.for("react.async_mode"):60111,pt=le?Symbol.for("react.concurrent_mode"):60111,Rt=le?Symbol.for("react.forward_ref"):60112,Ot=le?Symbol.for("react.suspense"):60113,jt=le?Symbol.for("react.suspense_list"):60120,Te=le?Symbol.for("react.memo"):60115,ne=le?Symbol.for("react.lazy"):60116,te=le?Symbol.for("react.block"):60121,ce=le?Symbol.for("react.fundamental"):60117,se=le?Symbol.for("react.responder"):60118,ge=le?Symbol.for("react.scope"):60119;function ye(Ce){if(typeof Ce=="object"&&Ce!==null){var Re=Ce.$$typeof;switch(Re){case Xe:switch(Ce=Ce.type,Ce){case ut:case pt:case At:case _e:case wt:case Ot:return Ce;default:switch(Ce=Ce&&Ce.$$typeof,Ce){case xt:case Rt:case ne:case Te:case Ve:return Ce;default:return Re}}case Lt:return Re}}}function we(Ce){return ye(Ce)===pt}be=ut,be=pt,be=xt,be=Ve,be=Xe,be=Rt,be=At,be=ne,be=Te,be=Lt,be=_e,be=wt,be=Ot,be=function(Ce){return we(Ce)||ye(Ce)===ut},be=we,be=function(Ce){return ye(Ce)===xt},be=function(Ce){return ye(Ce)===Ve},be=function(Ce){return typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===Xe},be=function(Ce){return ye(Ce)===Rt},$n.isFragment=function(Ce){return ye(Ce)===At},be=function(Ce){return ye(Ce)===ne},be=function(Ce){return ye(Ce)===Te},be=function(Ce){return ye(Ce)===Lt},be=function(Ce){return ye(Ce)===_e},be=function(Ce){return ye(Ce)===wt},be=function(Ce){return ye(Ce)===Ot},be=function(Ce){return typeof Ce=="string"||typeof Ce=="function"||Ce===At||Ce===pt||Ce===_e||Ce===wt||Ce===Ot||Ce===jt||typeof Ce=="object"&&Ce!==null&&(Ce.$$typeof===ne||Ce.$$typeof===Te||Ce.$$typeof===Ve||Ce.$$typeof===xt||Ce.$$typeof===Rt||Ce.$$typeof===ce||Ce.$$typeof===se||Ce.$$typeof===ge||Ce.$$typeof===te)},be=ye},16357:function(Rn,$n,be){"use strict";Rn.exports=be(42767)},16404:function(Rn,$n){"use strict";var be;var le=Symbol.for("react.element"),Xe=Symbol.for("react.portal"),Lt=Symbol.for("react.fragment"),At=Symbol.for("react.strict_mode"),wt=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),Ve=Symbol.for("react.context"),xt=Symbol.for("react.server_context"),ut=Symbol.for("react.forward_ref"),pt=Symbol.for("react.suspense"),Rt=Symbol.for("react.suspense_list"),Ot=Symbol.for("react.memo"),jt=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ce){if(typeof ce=="object"&&ce!==null){var se=ce.$$typeof;switch(se){case le:switch(ce=ce.type,ce){case Lt:case wt:case At:case pt:case Rt:return ce;default:switch(ce=ce&&ce.$$typeof,ce){case xt:case Ve:case ut:case jt:case Ot:case _e:return ce;default:return se}}case Xe:return se}}}be=Ve,be=_e,be=le,be=ut,be=Lt,be=jt,be=Ot,be=Xe,be=wt,be=At,be=pt,be=Rt,be=function(){return!1},be=function(){return!1},be=function(ce){return te(ce)===Ve},be=function(ce){return te(ce)===_e},be=function(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===le},be=function(ce){return te(ce)===ut},be=function(ce){return te(ce)===Lt},be=function(ce){return te(ce)===jt},be=function(ce){return te(ce)===Ot},be=function(ce){return te(ce)===Xe},be=function(ce){return te(ce)===wt},be=function(ce){return te(ce)===At},be=function(ce){return te(ce)===pt},be=function(ce){return te(ce)===Rt},be=function(ce){return typeof ce=="string"||typeof ce=="function"||ce===Lt||ce===wt||ce===At||ce===pt||ce===Rt||ce===Te||typeof ce=="object"&&ce!==null&&(ce.$$typeof===jt||ce.$$typeof===Ot||ce.$$typeof===_e||ce.$$typeof===Ve||ce.$$typeof===ut||ce.$$typeof===ne||ce.getModuleId!==void 0)},be=te},80705:function(Rn,$n,be){"use strict";be(16404)},3510:function(Rn,$n,be){"use strict";be.r($n),be.d($n,{Panel:function(){return Nt},default:function(){return Pt}});var le=be(87462),Xe=be(74902),Lt=be(97685),At=be(71002),wt=be(94184),_e=be.n(wt),Ve=be(21770),xt=be(80334),ut=be(67294),pt=be(45987),Rt=be(50344),Ot=be(1413),jt=be(4942),Te=be(62874),ne=be(15105),te=ut.forwardRef(function(Et,Ln){var xn=Et.prefixCls,Nn=Et.forceRender,fn=Et.className,Qe=Et.style,Ke=Et.children,Je=Et.isActive,_n=Et.role,Xn=Et.classNames,zt=Et.styles,kn=ut.useState(Je||Nn),bn=(0,Lt.Z)(kn,2),oi=bn[0],Yt=bn[1];return ut.useEffect(function(){(Nn||Je)&&Yt(!0)},[Nn,Je]),oi?ut.createElement("div",{ref:Ln,className:_e()("".concat(xn,"-content"),(0,jt.Z)((0,jt.Z)({},"".concat(xn,"-content-active"),Je),"".concat(xn,"-content-inactive"),!Je),fn),style:Qe,role:_n},ut.createElement("div",{className:_e()("".concat(xn,"-content-box"),Xn==null?void 0:Xn.body),style:zt==null?void 0:zt.body},Ke)):null});te.displayName="PanelContent";var ce=te,se=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],ge=ut.forwardRef(function(Et,Ln){var xn=Et.showArrow,Nn=xn===void 0?!0:xn,fn=Et.headerClass,Qe=Et.isActive,Ke=Et.onItemClick,Je=Et.forceRender,_n=Et.className,Xn=Et.classNames,zt=Xn===void 0?{}:Xn,kn=Et.styles,bn=kn===void 0?{}:kn,oi=Et.prefixCls,Yt=Et.collapsible,Mt=Et.accordion,_t=Et.panelKey,mn=Et.extra,rn=Et.header,He=Et.expandIcon,Me=Et.openMotion,Fe=Et.destroyInactivePanel,Oe=Et.children,Ue=(0,pt.Z)(Et,se),Be=Yt==="disabled",ot=mn!=null&&typeof mn!="boolean",Cn=(0,jt.Z)((0,jt.Z)((0,jt.Z)({onClick:function(){Ke==null||Ke(_t)},onKeyDown:function(Si){(Si.key==="Enter"||Si.keyCode===ne.Z.ENTER||Si.which===ne.Z.ENTER)&&(Ke==null||Ke(_t))},role:Mt?"tab":"button"},"aria-expanded",Qe),"aria-disabled",Be),"tabIndex",Be?-1:0),ci=typeof He=="function"?He(Et):ut.createElement("i",{className:"arrow"}),si=ci&&ut.createElement("div",(0,le.Z)({className:"".concat(oi,"-expand-icon")},["header","icon"].includes(Yt)?Cn:{}),ci),pn=_e()("".concat(oi,"-item"),(0,jt.Z)((0,jt.Z)({},"".concat(oi,"-item-active"),Qe),"".concat(oi,"-item-disabled"),Be),_n),qn=_e()(fn,"".concat(oi,"-header"),(0,jt.Z)({},"".concat(oi,"-collapsible-").concat(Yt),!!Yt),zt.header),en=(0,Ot.Z)({className:qn,style:bn.header},["header","icon"].includes(Yt)?{}:Cn);return ut.createElement("div",(0,le.Z)({},Ue,{ref:Ln,className:pn}),ut.createElement("div",en,Nn&&si,ut.createElement("span",(0,le.Z)({className:"".concat(oi,"-header-text")},Yt==="header"?Cn:{}),rn),ot&&ut.createElement("div",{className:"".concat(oi,"-extra")},mn)),ut.createElement(Te.Z,(0,le.Z)({visible:Qe,leavedClassName:"".concat(oi,"-content-hidden")},Me,{forceRender:Je,removeOnLeave:Fe}),function(wi,Si){var Di=wi.className,Ti=wi.style;return ut.createElement(ce,{ref:Si,prefixCls:oi,className:Di,classNames:zt,style:Ti,styles:bn,isActive:Qe,forceRender:Je,role:Mt?"tabpanel":void 0},Oe)}))}),ye=ge,we=["children","label","key","collapsible","onItemClick","destroyInactivePanel"],Ce=function(Ln,xn){var Nn=xn.prefixCls,fn=xn.accordion,Qe=xn.collapsible,Ke=xn.destroyInactivePanel,Je=xn.onItemClick,_n=xn.activeKey,Xn=xn.openMotion,zt=xn.expandIcon;return Ln.map(function(kn,bn){var oi=kn.children,Yt=kn.label,Mt=kn.key,_t=kn.collapsible,mn=kn.onItemClick,rn=kn.destroyInactivePanel,He=(0,pt.Z)(kn,we),Me=String(Mt!=null?Mt:bn),Fe=_t!=null?_t:Qe,Oe=rn!=null?rn:Ke,Ue=function(Cn){Fe!=="disabled"&&(Je(Cn),mn==null||mn(Cn))},Be=!1;return fn?Be=_n[0]===Me:Be=_n.indexOf(Me)>-1,ut.createElement(ye,(0,le.Z)({},He,{prefixCls:Nn,key:Me,panelKey:Me,isActive:Be,accordion:fn,openMotion:Xn,expandIcon:zt,header:Yt,collapsible:Fe,onItemClick:Ue,destroyInactivePanel:Oe}),oi)})},Re=function(Ln,xn,Nn){if(!Ln)return null;var fn=Nn.prefixCls,Qe=Nn.accordion,Ke=Nn.collapsible,Je=Nn.destroyInactivePanel,_n=Nn.onItemClick,Xn=Nn.activeKey,zt=Nn.openMotion,kn=Nn.expandIcon,bn=Ln.key||String(xn),oi=Ln.props,Yt=oi.header,Mt=oi.headerClass,_t=oi.destroyInactivePanel,mn=oi.collapsible,rn=oi.onItemClick,He=!1;Qe?He=Xn[0]===bn:He=Xn.indexOf(bn)>-1;var Me=mn!=null?mn:Ke,Fe=function(Be){Me!=="disabled"&&(_n(Be),rn==null||rn(Be))},Oe={key:bn,panelKey:bn,header:Yt,headerClass:Mt,isActive:He,prefixCls:fn,destroyInactivePanel:_t!=null?_t:Je,openMotion:zt,accordion:Qe,children:Ln.props.children,onItemClick:Fe,expandIcon:kn,collapsible:Me};return typeof Ln.type=="string"?Ln:(Object.keys(Oe).forEach(function(Ue){typeof Oe[Ue]=="undefined"&&delete Oe[Ue]}),ut.cloneElement(Ln,Oe))};function We(Et,Ln,xn){return Array.isArray(Et)?Ce(Et,xn):(0,Rt.Z)(Ln).map(function(Nn,fn){return Re(Nn,fn,xn)})}var lt=We,ht=be(64217);function nt(Et){var Ln=Et;if(!Array.isArray(Ln)){var xn=(0,At.Z)(Ln);Ln=xn==="number"||xn==="string"?[Ln]:[]}return Ln.map(function(Nn){return String(Nn)})}var mt=ut.forwardRef(function(Et,Ln){var xn=Et.prefixCls,Nn=xn===void 0?"rc-collapse":xn,fn=Et.destroyInactivePanel,Qe=fn===void 0?!1:fn,Ke=Et.style,Je=Et.accordion,_n=Et.className,Xn=Et.children,zt=Et.collapsible,kn=Et.openMotion,bn=Et.expandIcon,oi=Et.activeKey,Yt=Et.defaultActiveKey,Mt=Et.onChange,_t=Et.items,mn=_e()(Nn,_n),rn=(0,Ve.Z)([],{value:oi,onChange:function(ot){return Mt==null?void 0:Mt(ot)},defaultValue:Yt,postState:nt}),He=(0,Lt.Z)(rn,2),Me=He[0],Fe=He[1],Oe=function(ot){return Fe(function(){if(Je)return Me[0]===ot?[]:[ot];var Cn=Me.indexOf(ot),ci=Cn>-1;return ci?Me.filter(function(si){return si!==ot}):[].concat((0,Xe.Z)(Me),[ot])})};(0,xt.ZP)(!Xn,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var Ue=lt(_t,Xn,{prefixCls:Nn,accordion:Je,openMotion:kn,expandIcon:bn,collapsible:zt,destroyInactivePanel:Qe,onItemClick:Oe,activeKey:Me});return ut.createElement("div",(0,le.Z)({ref:Ln,className:mn,style:Ke,role:Je?"tablist":void 0},(0,ht.Z)(Et,{aria:!0,data:!0})),Ue)}),at=Object.assign(mt,{Panel:ye}),Pt=at,Nt=at.Panel},31457:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return _t}});var le=be(4942),Xe=be(87462),Lt=be(71002),At=be(1413),wt=be(97685),_e=be(94184),Ve=be.n(_e),xt=be(67294);function ut(mn){var rn=xt.useRef();rn.current=mn;var He=xt.useCallback(function(){for(var Me,Fe=arguments.length,Oe=new Array(Fe),Ue=0;Ue<Fe;Ue++)Oe[Ue]=arguments[Ue];return(Me=rn.current)===null||Me===void 0?void 0:Me.call.apply(Me,[rn].concat(Oe))},[]);return He}function pt(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var Rt=pt()?xt.useLayoutEffect:xt.useEffect,Ot=function(rn,He){var Me=xt.useRef(!0);Rt(function(){return rn(Me.current)},He),Rt(function(){return Me.current=!1,function(){Me.current=!0}},[])},jt=function(rn,He){Ot(function(Me){if(!Me)return rn()},He)},Te=null;function ne(mn){var rn=xt.useRef(!1),He=xt.useState(mn),Me=(0,wt.Z)(He,2),Fe=Me[0],Oe=Me[1];xt.useEffect(function(){return rn.current=!1,function(){rn.current=!0}},[]);function Ue(Be,ot){ot&&rn.current||Oe(Be)}return[Fe,Ue]}function te(mn){return mn!==void 0}function ce(mn,rn){var He=rn||{},Me=He.defaultValue,Fe=He.value,Oe=He.onChange,Ue=He.postState,Be=ne(function(){return te(Fe)?Fe:te(Me)?typeof Me=="function"?Me():Me:typeof mn=="function"?mn():mn}),ot=(0,wt.Z)(Be,2),Cn=ot[0],ci=ot[1],si=Fe!==void 0?Fe:Cn,pn=Ue?Ue(si):si,qn=ut(Oe),en=ne([si]),wi=(0,wt.Z)(en,2),Si=wi[0],Di=wi[1];jt(function(){var ro=Si[0];Cn!==ro&&qn(Cn,ro)},[Si]),jt(function(){te(Fe)||ci(Fe)},[Fe]);var Ti=ut(function(ro,Zr){ci(ro,Zr),Di([si],Zr)});return[pn,Ti]}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(rn){var He=rn.keyCode;if(rn.altKey&&!rn.ctrlKey||rn.metaKey||He>=se.F1&&He<=se.F12)return!1;switch(He){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(rn){if(rn>=se.ZERO&&rn<=se.NINE||rn>=se.NUM_ZERO&&rn<=se.NUM_MULTIPLY||rn>=se.A&&rn<=se.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&rn===0)return!0;switch(rn){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}}},ge=se,ye=`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`,we=`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`,Ce="".concat(ye," ").concat(we).split(/[\s\n]+/),Re="aria-",We="data-";function lt(mn,rn){return mn.indexOf(rn)===0}function ht(mn){var rn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,He;rn===!1?He={aria:!0,data:!0,attr:!0}:rn===!0?He={aria:!0}:He=(0,At.Z)({},rn);var Me={};return Object.keys(mn).forEach(function(Fe){(He.aria&&(Fe==="role"||lt(Fe,Re))||He.data&&lt(Fe,We)||He.attr&&Ce.includes(Fe))&&(Me[Fe]=mn[Fe])}),Me}var nt={},mt=[],at=function(rn){mt.push(rn)};function Pt(mn,rn){if(0)var He}function Nt(mn,rn){if(0)var He}function Et(){nt={}}function Ln(mn,rn,He){!rn&&!nt[He]&&(mn(!1,He),nt[He]=!0)}function xn(mn,rn){Ln(Pt,mn,rn)}function Nn(mn,rn){Ln(Nt,mn,rn)}xn.preMessage=at,xn.resetWarned=Et,xn.noteOnce=Nn;var fn=null,Qe=be(81626),Ke=[10,20,50,100],Je=function(rn){var He=rn.pageSizeOptions,Me=He===void 0?Ke:He,Fe=rn.locale,Oe=rn.changeSize,Ue=rn.pageSize,Be=rn.goButton,ot=rn.quickGo,Cn=rn.rootPrefixCls,ci=rn.disabled,si=rn.buildOptionText,pn=rn.showSizeChanger,qn=rn.sizeChangerRender,en=xt.useState(""),wi=(0,wt.Z)(en,2),Si=wi[0],Di=wi[1],Ti=function(){return!Si||Number.isNaN(Si)?void 0:Number(Si)},ro=typeof si=="function"?si:function(hr){return"".concat(hr," ").concat(Fe.items_per_page)},Zr=function(Nr){Di(Nr.target.value)},Fi=function(Nr){Be||Si===""||(Di(""),!(Nr.relatedTarget&&(Nr.relatedTarget.className.indexOf("".concat(Cn,"-item-link"))>=0||Nr.relatedTarget.className.indexOf("".concat(Cn,"-item"))>=0))&&(ot==null||ot(Ti())))},mi=function(Nr){Si!==""&&(Nr.keyCode===ge.ENTER||Nr.type==="click")&&(Di(""),ot==null||ot(Ti()))},Co=function(){return Me.some(function(Nr){return Nr.toString()===Ue.toString()})?Me:Me.concat([Ue]).sort(function(Nr,Xo){var ji=Number.isNaN(Number(Nr))?0:Number(Nr),Mi=Number.isNaN(Number(Xo))?0:Number(Xo);return ji-Mi})},jn="".concat(Cn,"-options");if(!pn&&!ot)return null;var yn=null,Jr=null,lo=null;return pn&&qn&&(yn=qn({disabled:ci,size:Ue,onSizeChange:function(Nr){Oe==null||Oe(Number(Nr))},"aria-label":Fe.page_size,className:"".concat(jn,"-size-changer"),options:Co().map(function(hr){return{label:ro(hr),value:hr}})})),ot&&(Be&&(lo=typeof Be=="boolean"?xt.createElement("button",{type:"button",onClick:mi,onKeyUp:mi,disabled:ci,className:"".concat(jn,"-quick-jumper-button")},Fe.jump_to_confirm):xt.createElement("span",{onClick:mi,onKeyUp:mi},Be)),Jr=xt.createElement("div",{className:"".concat(jn,"-quick-jumper")},Fe.jump_to,xt.createElement("input",{disabled:ci,type:"text",value:Si,onChange:Zr,onKeyUp:mi,onBlur:Fi,"aria-label":Fe.page}),Fe.page,lo)),xt.createElement("li",{className:jn},yn,Jr)},_n=Je,Xn=function(rn){var He=rn.rootPrefixCls,Me=rn.page,Fe=rn.active,Oe=rn.className,Ue=rn.showTitle,Be=rn.onClick,ot=rn.onKeyPress,Cn=rn.itemRender,ci="".concat(He,"-item"),si=Ve()(ci,"".concat(ci,"-").concat(Me),(0,le.Z)((0,le.Z)({},"".concat(ci,"-active"),Fe),"".concat(ci,"-disabled"),!Me),Oe),pn=function(){Be(Me)},qn=function(Si){ot(Si,Be,Me)},en=Cn(Me,"page",xt.createElement("a",{rel:"nofollow"},Me));return en?xt.createElement("li",{title:Ue?String(Me):null,className:si,onClick:pn,onKeyDown:qn,tabIndex:0},en):null},zt=Xn,kn=function(rn,He,Me){return Me};function bn(){}function oi(mn){var rn=Number(mn);return typeof rn=="number"&&!Number.isNaN(rn)&&isFinite(rn)&&Math.floor(rn)===rn}function Yt(mn,rn,He){var Me=typeof mn=="undefined"?rn:mn;return Math.floor((He-1)/Me)+1}var Mt=function(rn){var He=rn.prefixCls,Me=He===void 0?"rc-pagination":He,Fe=rn.selectPrefixCls,Oe=Fe===void 0?"rc-select":Fe,Ue=rn.className,Be=rn.current,ot=rn.defaultCurrent,Cn=ot===void 0?1:ot,ci=rn.total,si=ci===void 0?0:ci,pn=rn.pageSize,qn=rn.defaultPageSize,en=qn===void 0?10:qn,wi=rn.onChange,Si=wi===void 0?bn:wi,Di=rn.hideOnSinglePage,Ti=rn.align,ro=rn.showPrevNextJumpers,Zr=ro===void 0?!0:ro,Fi=rn.showQuickJumper,mi=rn.showLessItems,Co=rn.showTitle,jn=Co===void 0?!0:Co,yn=rn.onShowSizeChange,Jr=yn===void 0?bn:yn,lo=rn.locale,hr=lo===void 0?Qe.Z:lo,Nr=rn.style,Xo=rn.totalBoundaryShowSizeChanger,ji=Xo===void 0?50:Xo,Mi=rn.disabled,Oi=rn.simple,vr=rn.showTotal,Dr=rn.showSizeChanger,Cr=Dr===void 0?si>ji:Dr,En=rn.sizeChangerRender,Ee=rn.pageSizeOptions,on=rn.itemRender,gn=on===void 0?kn:on,Mn=rn.jumpPrevIcon,In=rn.jumpNextIcon,ii=rn.prevIcon,Ci=rn.nextIcon,Ji=xt.useRef(null),Vt=ce(10,{value:pn,defaultValue:en}),Zt=(0,wt.Z)(Vt,2),It=Zt[0],dn=Zt[1],Ri=ce(1,{value:Be,defaultValue:Cn,postState:function(Bo){return Math.max(1,Math.min(Bo,Yt(void 0,It,si)))}}),hi=(0,wt.Z)(Ri,2),ri=hi[0],Kt=hi[1],wn=xt.useState(ri),Ki=(0,wt.Z)(wn,2),wr=Ki[0],Kn=Ki[1];(0,xt.useEffect)(function(){Kn(ri)},[ri]);var Wt=Si!==bn,Yi="current"in rn,pr=Math.max(1,ri-(mi?3:5)),Ro=Math.min(Yt(void 0,It,si),ri+(mi?3:5));function Zn(Fn,Bo){var io=Fn||xt.createElement("button",{type:"button","aria-label":Bo,className:"".concat(Me,"-item-link")});return typeof Fn=="function"&&(io=xt.createElement(Fn,(0,At.Z)({},rn))),io}function Ni(Fn){var Bo=Fn.target.value,io=Yt(void 0,It,si),Ds;return Bo===""?Ds=Bo:Number.isNaN(Number(Bo))?Ds=wr:Bo>=io?Ds=io:Ds=Number(Bo),Ds}function Pi(Fn){return oi(Fn)&&Fn!==ri&&oi(si)&&si>0}var xs=si>It?Fi:!1;function qa(Fn){(Fn.keyCode===ge.UP||Fn.keyCode===ge.DOWN)&&Fn.preventDefault()}function Ar(Fn){var Bo=Ni(Fn);switch(Bo!==wr&&Kn(Bo),Fn.keyCode){case ge.ENTER:xa(Bo);break;case ge.UP:xa(Bo-1);break;case ge.DOWN:xa(Bo+1);break;default:break}}function br(Fn){xa(Ni(Fn))}function Rr(Fn){var Bo=Yt(Fn,It,si),io=ri>Bo&&Bo!==0?Bo:ri;dn(Fn),Kn(io),Jr==null||Jr(ri,Fn),Kt(io),Si==null||Si(io,Fn)}function xa(Fn){if(Pi(Fn)&&!Mi){var Bo=Yt(void 0,It,si),io=Fn;return Fn>Bo?io=Bo:Fn<1&&(io=1),io!==wr&&Kn(io),Kt(io),Si==null||Si(io,It),io}return ri}var Ka=ri>1,_i=ri<Yt(void 0,It,si);function yo(){Ka&&xa(ri-1)}function zl(){_i&&xa(ri+1)}function ms(){xa(pr)}function as(){xa(Ro)}function Qt(Fn,Bo){if(Fn.key==="Enter"||Fn.charCode===ge.ENTER||Fn.keyCode===ge.ENTER){for(var io=arguments.length,Ds=new Array(io>2?io-2:0),Ps=2;Ps<io;Ps++)Ds[Ps-2]=arguments[Ps];Bo.apply(void 0,Ds)}}function Br(Fn){Qt(Fn,yo)}function ba(Fn){Qt(Fn,zl)}function to(Fn){Qt(Fn,ms)}function vs(Fn){Qt(Fn,as)}function La(Fn){var Bo=gn(Fn,"prev",Zn(ii,"prev page"));return xt.isValidElement(Bo)?xt.cloneElement(Bo,{disabled:!Ka}):Bo}function Za(Fn){var Bo=gn(Fn,"next",Zn(Ci,"next page"));return xt.isValidElement(Bo)?xt.cloneElement(Bo,{disabled:!_i}):Bo}function wa(Fn){(Fn.type==="click"||Fn.keyCode===ge.ENTER)&&xa(wr)}var ca=null,Ya=ht(rn,{aria:!0,data:!0}),Un=vr&&xt.createElement("li",{className:"".concat(Me,"-total-text")},vr(si,[si===0?0:(ri-1)*It+1,ri*It>si?si:ri*It])),js=null,zn=Yt(void 0,It,si);if(Di&&si<=It)return null;var _a=[],Sl={rootPrefixCls:Me,onClick:xa,onKeyPress:Qt,showTitle:jn,itemRender:gn,page:-1},No=ri-1>0?ri-1:0,kl=ri+1<zn?ri+1:zn,bs=Fi&&Fi.goButton,ja=(0,Lt.Z)(Oi)==="object"?Oi.readOnly:!Oi,es=bs,fl=null;Oi&&(bs&&(typeof bs=="boolean"?es=xt.createElement("button",{type:"button",onClick:wa,onKeyUp:wa},hr.jump_to_confirm):es=xt.createElement("span",{onClick:wa,onKeyUp:wa},bs),es=xt.createElement("li",{title:jn?"".concat(hr.jump_to).concat(ri,"/").concat(zn):null,className:"".concat(Me,"-simple-pager")},es)),fl=xt.createElement("li",{title:jn?"".concat(ri,"/").concat(zn):null,className:"".concat(Me,"-simple-pager")},ja?wr:xt.createElement("input",{type:"text","aria-label":hr.jump_to,value:wr,disabled:Mi,onKeyDown:qa,onKeyUp:Ar,onChange:Ar,onBlur:br,size:3}),xt.createElement("span",{className:"".concat(Me,"-slash")},"/"),zn));var ps=mi?1:2;if(zn<=3+ps*2){zn||_a.push(xt.createElement(zt,(0,Xe.Z)({},Sl,{key:"noPager",page:1,className:"".concat(Me,"-item-disabled")})));for(var sr=1;sr<=zn;sr+=1)_a.push(xt.createElement(zt,(0,Xe.Z)({},Sl,{key:sr,page:sr,active:ri===sr})))}else{var tt=mi?hr.prev_3:hr.prev_5,il=mi?hr.next_3:hr.next_5,ql=gn(pr,"jump-prev",Zn(Mn,"prev page")),rl=gn(Ro,"jump-next",Zn(In,"next page"));Zr&&(ca=ql?xt.createElement("li",{title:jn?tt:null,key:"prev",onClick:ms,tabIndex:0,onKeyDown:to,className:Ve()("".concat(Me,"-jump-prev"),(0,le.Z)({},"".concat(Me,"-jump-prev-custom-icon"),!!Mn))},ql):null,js=rl?xt.createElement("li",{title:jn?il:null,key:"next",onClick:as,tabIndex:0,onKeyDown:vs,className:Ve()("".concat(Me,"-jump-next"),(0,le.Z)({},"".concat(Me,"-jump-next-custom-icon"),!!In))},rl):null);var Il=Math.max(1,ri-ps),nu=Math.min(ri+ps,zn);ri-1<=ps&&(nu=1+ps*2),zn-ri<=ps&&(Il=zn-ps*2);for(var Mu=Il;Mu<=nu;Mu+=1)_a.push(xt.createElement(zt,(0,Xe.Z)({},Sl,{key:Mu,page:Mu,active:ri===Mu})));if(ri-1>=ps*2&&ri!==3&&(_a[0]=xt.cloneElement(_a[0],{className:Ve()("".concat(Me,"-item-after-jump-prev"),_a[0].props.className)}),_a.unshift(ca)),zn-ri>=ps*2&&ri!==zn-2){var Au=_a[_a.length-1];_a[_a.length-1]=xt.cloneElement(Au,{className:Ve()("".concat(Me,"-item-before-jump-next"),Au.props.className)}),_a.push(js)}Il!==1&&_a.unshift(xt.createElement(zt,(0,Xe.Z)({},Sl,{key:1,page:1}))),nu!==zn&&_a.push(xt.createElement(zt,(0,Xe.Z)({},Sl,{key:zn,page:zn})))}var Hu=La(No);if(Hu){var ws=!Ka||!zn;Hu=xt.createElement("li",{title:jn?hr.prev_page:null,onClick:yo,tabIndex:ws?null:0,onKeyDown:Br,className:Ve()("".concat(Me,"-prev"),(0,le.Z)({},"".concat(Me,"-disabled"),ws)),"aria-disabled":ws},Hu)}var Js=Za(kl);if(Js){var Xr,no;Oi?(Xr=!_i,no=Ka?0:null):(Xr=!_i||!zn,no=Xr?null:0),Js=xt.createElement("li",{title:jn?hr.next_page:null,onClick:zl,tabIndex:no,onKeyDown:ba,className:Ve()("".concat(Me,"-next"),(0,le.Z)({},"".concat(Me,"-disabled"),Xr)),"aria-disabled":Xr},Js)}var na=Ve()(Me,Ue,(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(Me,"-start"),Ti==="start"),"".concat(Me,"-center"),Ti==="center"),"".concat(Me,"-end"),Ti==="end"),"".concat(Me,"-simple"),Oi),"".concat(Me,"-disabled"),Mi));return xt.createElement("ul",(0,Xe.Z)({className:na,style:Nr,ref:Ji},Ya),Un,Hu,Oi?fl:_a,Js,xt.createElement(_n,{locale:hr,rootPrefixCls:Me,disabled:Mi,selectPrefixCls:Oe,changeSize:Rr,pageSize:It,pageSizeOptions:Ee,quickGo:xs?xa:null,goButton:es,showSizeChanger:Cr,sizeChangerRender:En}))},_t=Mt},71032:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return ye}});var le=be(87462),Xe=be(4942),Lt=be(97685),At=be(45987),wt=be(94184),_e=be.n(wt),Ve=be(21770),xt=be(15105),ut=be(64217),pt=be(67294);function Rt(we,Ce){var Re=we.disabled,We=we.prefixCls,lt=we.character,ht=we.characterRender,nt=we.index,mt=we.count,at=we.value,Pt=we.allowHalf,Nt=we.focused,Et=we.onHover,Ln=we.onClick,xn=function(zt){Et(zt,nt)},Nn=function(zt){Ln(zt,nt)},fn=function(zt){zt.keyCode===xt.Z.ENTER&&Ln(zt,nt)},Qe=nt+1,Ke=new Set([We]);at===0&&nt===0&&Nt?Ke.add("".concat(We,"-focused")):Pt&&at+.5>=Qe&&at<Qe?(Ke.add("".concat(We,"-half")),Ke.add("".concat(We,"-active")),Nt&&Ke.add("".concat(We,"-focused"))):(Qe<=at?Ke.add("".concat(We,"-full")):Ke.add("".concat(We,"-zero")),Qe===at&&Nt&&Ke.add("".concat(We,"-focused")));var Je=typeof lt=="function"?lt(we):lt,_n=pt.createElement("li",{className:_e()(Array.from(Ke)),ref:Ce},pt.createElement("div",{onClick:Re?null:Nn,onKeyDown:Re?null:fn,onMouseMove:Re?null:xn,role:"radio","aria-checked":at>nt?"true":"false","aria-posinset":nt+1,"aria-setsize":mt,tabIndex:Re?-1:0},pt.createElement("div",{className:"".concat(We,"-first")},Je),pt.createElement("div",{className:"".concat(We,"-second")},Je)));return ht&&(_n=ht(_n,we)),_n}var Ot=pt.forwardRef(Rt);function jt(){var we=pt.useRef({});function Ce(We){return we.current[We]}function Re(We){return function(lt){we.current[We]=lt}}return[Ce,Re]}function Te(we){var Ce=we.pageXOffset,Re="scrollLeft";if(typeof Ce!="number"){var We=we.document;Ce=We.documentElement[Re],typeof Ce!="number"&&(Ce=We.body[Re])}return Ce}function ne(we){var Ce,Re,We=we.ownerDocument,lt=We.body,ht=We&&We.documentElement,nt=we.getBoundingClientRect();return Ce=nt.left,Re=nt.top,Ce-=ht.clientLeft||lt.clientLeft||0,Re-=ht.clientTop||lt.clientTop||0,{left:Ce,top:Re}}function te(we){var Ce=ne(we),Re=we.ownerDocument,We=Re.defaultView||Re.parentWindow;return Ce.left+=Te(We),Ce.left}var ce=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function se(we,Ce){var Re=we.prefixCls,We=Re===void 0?"rc-rate":Re,lt=we.className,ht=we.defaultValue,nt=we.value,mt=we.count,at=mt===void 0?5:mt,Pt=we.allowHalf,Nt=Pt===void 0?!1:Pt,Et=we.allowClear,Ln=Et===void 0?!0:Et,xn=we.keyboard,Nn=xn===void 0?!0:xn,fn=we.character,Qe=fn===void 0?"\u2605":fn,Ke=we.characterRender,Je=we.disabled,_n=we.direction,Xn=_n===void 0?"ltr":_n,zt=we.tabIndex,kn=zt===void 0?0:zt,bn=we.autoFocus,oi=we.onHoverChange,Yt=we.onChange,Mt=we.onFocus,_t=we.onBlur,mn=we.onKeyDown,rn=we.onMouseLeave,He=(0,At.Z)(we,ce),Me=jt(),Fe=(0,Lt.Z)(Me,2),Oe=Fe[0],Ue=Fe[1],Be=pt.useRef(null),ot=function(){if(!Je){var Cr;(Cr=Be.current)===null||Cr===void 0||Cr.focus()}};pt.useImperativeHandle(Ce,function(){return{focus:ot,blur:function(){if(!Je){var Cr;(Cr=Be.current)===null||Cr===void 0||Cr.blur()}}}});var Cn=(0,Ve.Z)(ht||0,{value:nt}),ci=(0,Lt.Z)(Cn,2),si=ci[0],pn=ci[1],qn=(0,Ve.Z)(null),en=(0,Lt.Z)(qn,2),wi=en[0],Si=en[1],Di=function(Cr,En){var Ee=Xn==="rtl",on=Cr+1;if(Nt){var gn=Oe(Cr),Mn=te(gn),In=gn.clientWidth;(Ee&&En-Mn>In/2||!Ee&&En-Mn<In/2)&&(on-=.5)}return on},Ti=function(Cr){pn(Cr),Yt==null||Yt(Cr)},ro=pt.useState(!1),Zr=(0,Lt.Z)(ro,2),Fi=Zr[0],mi=Zr[1],Co=function(){mi(!0),Mt==null||Mt()},jn=function(){mi(!1),_t==null||_t()},yn=pt.useState(null),Jr=(0,Lt.Z)(yn,2),lo=Jr[0],hr=Jr[1],Nr=function(Cr,En){var Ee=Di(En,Cr.pageX);Ee!==wi&&(hr(Ee),Si(null)),oi==null||oi(Ee)},Xo=function(Cr){Je||(hr(null),Si(null),oi==null||oi(void 0)),Cr&&(rn==null||rn(Cr))},ji=function(Cr,En){var Ee=Di(En,Cr.pageX),on=!1;Ln&&(on=Ee===si),Xo(),Ti(on?0:Ee),Si(on?Ee:null)},Mi=function(Cr){var En=Cr.keyCode,Ee=Xn==="rtl",on=Nt?.5:1;Nn&&(En===xt.Z.RIGHT&&si<at&&!Ee?(Ti(si+on),Cr.preventDefault()):En===xt.Z.LEFT&&si>0&&!Ee||En===xt.Z.RIGHT&&si>0&&Ee?(Ti(si-on),Cr.preventDefault()):En===xt.Z.LEFT&&si<at&&Ee&&(Ti(si+on),Cr.preventDefault())),mn==null||mn(Cr)};pt.useEffect(function(){bn&&!Je&&ot()},[]);var Oi=new Array(at).fill(0).map(function(Dr,Cr){return pt.createElement(Ot,{ref:Ue(Cr),index:Cr,count:at,disabled:Je,prefixCls:"".concat(We,"-star"),allowHalf:Nt,value:lo===null?si:lo,onClick:ji,onHover:Nr,key:Dr||Cr,character:Qe,characterRender:Ke,focused:Fi})}),vr=_e()(We,lt,(0,Xe.Z)((0,Xe.Z)({},"".concat(We,"-disabled"),Je),"".concat(We,"-rtl"),Xn==="rtl"));return pt.createElement("ul",(0,le.Z)({className:vr,onMouseLeave:Xo,tabIndex:Je?-1:kn,onFocus:Je?null:Co,onBlur:Je?null:jn,onKeyDown:Je?null:Mi,ref:Be},(0,ut.Z)(He,{aria:!0,data:!0,attr:!0})),Oi)}var ge=pt.forwardRef(se),ye=ge},58212:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return fn}});function le(){return le=Object.assign?Object.assign.bind():function(Qe){for(var Ke=1;Ke<arguments.length;Ke++){var Je=arguments[Ke];for(var _n in Je)Object.prototype.hasOwnProperty.call(Je,_n)&&(Qe[_n]=Je[_n])}return Qe},le.apply(this,arguments)}function Xe(Qe){"@babel/helpers - typeof";return Xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Ke){return typeof Ke}:function(Ke){return Ke&&typeof Symbol=="function"&&Ke.constructor===Symbol&&Ke!==Symbol.prototype?"symbol":typeof Ke},Xe(Qe)}function Lt(Qe,Ke){if(Xe(Qe)!=="object"||Qe===null)return Qe;var Je=Qe[Symbol.toPrimitive];if(Je!==void 0){var _n=Je.call(Qe,Ke||"default");if(Xe(_n)!=="object")return _n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(Ke==="string"?String:Number)(Qe)}function At(Qe){var Ke=Lt(Qe,"string");return Xe(Ke)==="symbol"?Ke:String(Ke)}function wt(Qe,Ke,Je){return Ke=At(Ke),Ke in Qe?Object.defineProperty(Qe,Ke,{value:Je,enumerable:!0,configurable:!0,writable:!0}):Qe[Ke]=Je,Qe}function _e(Qe){if(Array.isArray(Qe))return Qe}function Ve(Qe,Ke){var Je=Qe==null?null:typeof Symbol!="undefined"&&Qe[Symbol.iterator]||Qe["@@iterator"];if(Je!=null){var _n,Xn,zt,kn,bn=[],oi=!0,Yt=!1;try{if(zt=(Je=Je.call(Qe)).next,Ke===0){if(Object(Je)!==Je)return;oi=!1}else for(;!(oi=(_n=zt.call(Je)).done)&&(bn.push(_n.value),bn.length!==Ke);oi=!0);}catch(Mt){Yt=!0,Xn=Mt}finally{try{if(!oi&&Je.return!=null&&(kn=Je.return(),Object(kn)!==kn))return}finally{if(Yt)throw Xn}}return bn}}function xt(Qe,Ke){(Ke==null||Ke>Qe.length)&&(Ke=Qe.length);for(var Je=0,_n=new Array(Ke);Je<Ke;Je++)_n[Je]=Qe[Je];return _n}function ut(Qe,Ke){if(Qe){if(typeof Qe=="string")return xt(Qe,Ke);var Je=Object.prototype.toString.call(Qe).slice(8,-1);if(Je==="Object"&&Qe.constructor&&(Je=Qe.constructor.name),Je==="Map"||Je==="Set")return Array.from(Qe);if(Je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return xt(Qe,Ke)}}function pt(){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 Rt(Qe,Ke){return _e(Qe)||Ve(Qe,Ke)||ut(Qe,Ke)||pt()}function Ot(Qe,Ke){if(Qe==null)return{};var Je={},_n=Object.keys(Qe),Xn,zt;for(zt=0;zt<_n.length;zt++)Xn=_n[zt],!(Ke.indexOf(Xn)>=0)&&(Je[Xn]=Qe[Xn]);return Je}function jt(Qe,Ke){if(Qe==null)return{};var Je=Ot(Qe,Ke),_n,Xn;if(Object.getOwnPropertySymbols){var zt=Object.getOwnPropertySymbols(Qe);for(Xn=0;Xn<zt.length;Xn++)_n=zt[Xn],!(Ke.indexOf(_n)>=0)&&Object.prototype.propertyIsEnumerable.call(Qe,_n)&&(Je[_n]=Qe[_n])}return Je}var Te=be(67294),ne=be(94184),te=be.n(ne);function ce(Qe){if(Array.isArray(Qe))return Qe}function se(Qe,Ke){var Je=Qe==null?null:typeof Symbol!="undefined"&&Qe[Symbol.iterator]||Qe["@@iterator"];if(Je!=null){var _n,Xn,zt,kn,bn=[],oi=!0,Yt=!1;try{if(zt=(Je=Je.call(Qe)).next,Ke===0){if(Object(Je)!==Je)return;oi=!1}else for(;!(oi=(_n=zt.call(Je)).done)&&(bn.push(_n.value),bn.length!==Ke);oi=!0);}catch(Mt){Yt=!0,Xn=Mt}finally{try{if(!oi&&Je.return!=null&&(kn=Je.return(),Object(kn)!==kn))return}finally{if(Yt)throw Xn}}return bn}}function ge(Qe,Ke){(Ke==null||Ke>Qe.length)&&(Ke=Qe.length);for(var Je=0,_n=new Array(Ke);Je<Ke;Je++)_n[Je]=Qe[Je];return _n}function ye(Qe,Ke){if(Qe){if(typeof Qe=="string")return ge(Qe,Ke);var Je=Object.prototype.toString.call(Qe).slice(8,-1);if(Je==="Object"&&Qe.constructor&&(Je=Qe.constructor.name),Je==="Map"||Je==="Set")return Array.from(Qe);if(Je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Je))return ge(Qe,Ke)}}function we(){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 Ce(Qe,Ke){return ce(Qe)||se(Qe,Ke)||ye(Qe,Ke)||we()}function Re(Qe){var Ke=Te.useRef();Ke.current=Qe;var Je=Te.useCallback(function(){for(var _n,Xn=arguments.length,zt=new Array(Xn),kn=0;kn<Xn;kn++)zt[kn]=arguments[kn];return(_n=Ke.current)===null||_n===void 0?void 0:_n.call.apply(_n,[Ke].concat(zt))},[]);return Je}function We(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var lt=We()?Te.useLayoutEffect:Te.useEffect,ht=function(Ke,Je){var _n=Te.useRef(!0);lt(function(){return Ke(_n.current)},Je),lt(function(){return _n.current=!1,function(){_n.current=!0}},[])},nt=function(Ke,Je){ht(function(_n){if(!_n)return Ke()},Je)},mt=null;function at(Qe){var Ke=Te.useRef(!1),Je=Te.useState(Qe),_n=Ce(Je,2),Xn=_n[0],zt=_n[1];Te.useEffect(function(){return Ke.current=!1,function(){Ke.current=!0}},[]);function kn(bn,oi){oi&&Ke.current||zt(bn)}return[Xn,kn]}function Pt(Qe){return Qe!==void 0}function Nt(Qe,Ke){var Je=Ke||{},_n=Je.defaultValue,Xn=Je.value,zt=Je.onChange,kn=Je.postState,bn=at(function(){return Pt(Xn)?Xn:Pt(_n)?typeof _n=="function"?_n():_n:typeof Qe=="function"?Qe():Qe}),oi=Ce(bn,2),Yt=oi[0],Mt=oi[1],_t=Xn!==void 0?Xn:Yt,mn=kn?kn(_t):_t,rn=Re(zt),He=at([_t]),Me=Ce(He,2),Fe=Me[0],Oe=Me[1];nt(function(){var Be=Fe[0];Yt!==Be&&rn(Yt,Be)},[Fe]),nt(function(){Pt(Xn)||Mt(Xn)},[Xn]);var Ue=Re(function(Be,ot){Mt(Be,ot),Oe([_t],ot)});return[mn,Ue]}var Et={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(Ke){var Je=Ke.keyCode;if(Ke.altKey&&!Ke.ctrlKey||Ke.metaKey||Je>=Et.F1&&Je<=Et.F12)return!1;switch(Je){case Et.ALT:case Et.CAPS_LOCK:case Et.CONTEXT_MENU:case Et.CTRL:case Et.DOWN:case Et.END:case Et.ESC:case Et.HOME:case Et.INSERT:case Et.LEFT:case Et.MAC_FF_META:case Et.META:case Et.NUMLOCK:case Et.NUM_CENTER:case Et.PAGE_DOWN:case Et.PAGE_UP:case Et.PAUSE:case Et.PRINT_SCREEN:case Et.RIGHT:case Et.SHIFT:case Et.UP:case Et.WIN_KEY:case Et.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(Ke){if(Ke>=Et.ZERO&&Ke<=Et.NINE||Ke>=Et.NUM_ZERO&&Ke<=Et.NUM_MULTIPLY||Ke>=Et.A&&Ke<=Et.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&Ke===0)return!0;switch(Ke){case Et.SPACE:case Et.QUESTION_MARK:case Et.NUM_PLUS:case Et.NUM_MINUS:case Et.NUM_PERIOD:case Et.NUM_DIVISION:case Et.SEMICOLON:case Et.DASH:case Et.EQUALS:case Et.COMMA:case Et.PERIOD:case Et.SLASH:case Et.APOSTROPHE:case Et.SINGLE_QUOTE:case Et.OPEN_SQUARE_BRACKET:case Et.BACKSLASH:case Et.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ln=Et,xn=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Nn=Te.forwardRef(function(Qe,Ke){var Je,_n=Qe.prefixCls,Xn=_n===void 0?"rc-switch":_n,zt=Qe.className,kn=Qe.checked,bn=Qe.defaultChecked,oi=Qe.disabled,Yt=Qe.loadingIcon,Mt=Qe.checkedChildren,_t=Qe.unCheckedChildren,mn=Qe.onClick,rn=Qe.onChange,He=Qe.onKeyDown,Me=jt(Qe,xn),Fe=Nt(!1,{value:kn,defaultValue:bn}),Oe=Rt(Fe,2),Ue=Oe[0],Be=Oe[1];function ot(pn,qn){var en=Ue;return oi||(en=pn,Be(en),rn==null||rn(en,qn)),en}function Cn(pn){pn.which===Ln.LEFT?ot(!1,pn):pn.which===Ln.RIGHT&&ot(!0,pn),He==null||He(pn)}function ci(pn){var qn=ot(!Ue,pn);mn==null||mn(qn,pn)}var si=te()(Xn,zt,(Je={},wt(Je,"".concat(Xn,"-checked"),Ue),wt(Je,"".concat(Xn,"-disabled"),oi),Je));return Te.createElement("button",le({},Me,{type:"button",role:"switch","aria-checked":Ue,disabled:oi,className:si,ref:Ke,onKeyDown:Cn,onClick:ci}),Yt,Te.createElement("span",{className:"".concat(Xn,"-inner")},Te.createElement("span",{className:"".concat(Xn,"-inner-checked")},Mt),Te.createElement("span",{className:"".concat(Xn,"-inner-unchecked")},_t)))});Nn.displayName="Switch";var fn=Nn},45233:function(Rn,$n,be){"use strict";be.d($n,{R:function(){return Xe},w:function(){return le}});var le={},Xe="rc-table-internal-hook"},54768:function(Rn,$n,be){"use strict";be.d($n,{L:function(){return ce},Z:function(){return Ce}});var le=be(97685),Xe=be(4942),Lt=be(74902),At=be(71002),wt=be(1413),_e=be(45987),Ve=be(63295),xt=be(67294);function ut(Re){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},lt=[];return xt.Children.forEach(Re,function(ht){ht==null&&!We.keepEmpty||(Array.isArray(ht)?lt=lt.concat(ut(ht)):(0,Ve.Z)(ht)&&ht.props?lt=lt.concat(ut(ht.props.children,We)):lt.push(ht))}),lt}var pt=be(40830),Rt=be(45233),Ot=be(62978);function jt(Re){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof We=="number"?We:We.endsWith("%")?Re*parseFloat(We)/100:null}function Te(Re,We,lt){return xt.useMemo(function(){if(We&&We>0){var ht=0,nt=0;Re.forEach(function(Nn){var fn=jt(We,Nn.width);fn?ht+=fn:nt+=1});var mt=Math.max(We,lt),at=Math.max(mt-ht,nt),Pt=nt,Nt=at/nt,Et=0,Ln=Re.map(function(Nn){var fn=(0,wt.Z)({},Nn),Qe=jt(We,fn.width);if(Qe)fn.width=Qe;else{var Ke=Math.floor(Nt);fn.width=Pt===1?at:Ke,at-=Ke,Pt-=1}return Et+=fn.width,fn});if(Et<mt){var xn=mt/Et;at=mt,Ln.forEach(function(Nn,fn){var Qe=Math.floor(Nn.width*xn);Nn.width=fn===Ln.length-1?at:Qe,at-=Qe})}return[Ln,Math.max(Et,mt)]}return[Re,We]},[Re,We,lt])}var ne=["children"],te=["fixed"];function ce(Re){return ut(Re).filter(function(We){return xt.isValidElement(We)}).map(function(We){var lt=We.key,ht=We.props,nt=ht.children,mt=(0,_e.Z)(ht,ne),at=(0,wt.Z)({key:lt},mt);return nt&&(at.children=ce(nt)),at})}function se(Re){return Re.filter(function(We){return We&&(0,At.Z)(We)==="object"&&!We.hidden}).map(function(We){var lt=We.children;return lt&&lt.length>0?(0,wt.Z)((0,wt.Z)({},We),{},{children:se(lt)}):We})}function ge(Re){var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return Re.filter(function(lt){return lt&&(0,At.Z)(lt)==="object"}).reduce(function(lt,ht,nt){var mt=ht.fixed,at=mt===!0?"left":mt,Pt="".concat(We,"-").concat(nt),Nt=ht.children;return Nt&&Nt.length>0?[].concat((0,Lt.Z)(lt),(0,Lt.Z)(ge(Nt,Pt).map(function(Et){return(0,wt.Z)({fixed:at},Et)}))):[].concat((0,Lt.Z)(lt),[(0,wt.Z)((0,wt.Z)({key:Pt},ht),{},{fixed:at})])},[])}function ye(Re){return Re.map(function(We){var lt=We.fixed,ht=(0,_e.Z)(We,te),nt=lt;return lt==="left"?nt="right":lt==="right"&&(nt="left"),(0,wt.Z)({fixed:nt},ht)})}function we(Re,We){var lt=Re.prefixCls,ht=Re.columns,nt=Re.children,mt=Re.expandable,at=Re.expandedKeys,Pt=Re.columnTitle,Nt=Re.getRowKey,Et=Re.onTriggerExpand,Ln=Re.expandIcon,xn=Re.rowExpandable,Nn=Re.expandIconColumnIndex,fn=Re.direction,Qe=Re.expandRowByClick,Ke=Re.columnWidth,Je=Re.fixed,_n=Re.scrollWidth,Xn=Re.clientWidth,zt=xt.useMemo(function(){var He=ht||ce(nt)||[];return se(He.slice())},[ht,nt]),kn=xt.useMemo(function(){if(mt){var He=zt.slice();if(!He.includes(Rt.w)){var Me=Nn||0;Me>=0&&(Me||Je==="left"||!Je)&&He.splice(Me,0,Rt.w),Je==="right"&&He.splice(zt.length,0,Rt.w)}var Fe=He.indexOf(Rt.w);He=He.filter(function(ot,Cn){return ot!==Rt.w||Cn===Fe});var Oe=zt[Fe],Ue;Je?Ue=Je:Ue=Oe?Oe.fixed:null;var Be=(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},Ot.v,{className:"".concat(lt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Pt),"fixed",Ue),"className","".concat(lt,"-row-expand-icon-cell")),"width",Ke),"render",function(Cn,ci,si){var pn=Nt(ci,si),qn=at.has(pn),en=xn?xn(ci):!0,wi=Ln({prefixCls:lt,expanded:qn,expandable:en,record:ci,onExpand:Et});return Qe?xt.createElement("span",{onClick:function(Di){return Di.stopPropagation()}},wi):wi});return He.map(function(ot){return ot===Rt.w?Be:ot})}return zt.filter(function(ot){return ot!==Rt.w})},[mt,zt,Nt,at,Ln,fn]),bn=xt.useMemo(function(){var He=kn;return We&&(He=We(He)),He.length||(He=[{render:function(){return null}}]),He},[We,kn,fn]),oi=xt.useMemo(function(){return fn==="rtl"?ye(ge(bn)):ge(bn)},[bn,fn,_n]),Yt=xt.useMemo(function(){for(var He=-1,Me=oi.length-1;Me>=0;Me-=1){var Fe=oi[Me].fixed;if(Fe==="left"||Fe===!0){He=Me;break}}if(He>=0)for(var Oe=0;Oe<=He;Oe+=1){var Ue=oi[Oe].fixed;if(Ue!=="left"&&Ue!==!0)return!0}var Be=oi.findIndex(function(ci){var si=ci.fixed;return si==="right"});if(Be>=0)for(var ot=Be;ot<oi.length;ot+=1){var Cn=oi[ot].fixed;if(Cn!=="right")return!0}return!1},[oi]),Mt=Te(oi,_n,Xn),_t=(0,le.Z)(Mt,2),mn=_t[0],rn=_t[1];return[bn,mn,rn,Yt]}var Ce=we},29104:function(Rn,$n,be){"use strict";be.d($n,{w2:function(){return le.w},vP:function(){return wa.v},RQ:function(){return le.R},ER:function(){return En},Q$:function(){return Oa},TN:function(){return bc}});var le=be(45233),Xe=be(97685),Lt=be(66680),At=be(8410),wt=be(91881),_e=be(67294),Ve=be(73935);function xt(Ye){var bt=_e.createContext(void 0),Bt=function($t){var hn=$t.value,Pn=$t.children,Wn=_e.useRef(hn);Wn.current=hn;var fi=_e.useState(function(){return{getValue:function(){return Wn.current},listeners:new Set}}),ti=(0,Xe.Z)(fi,1),nr=ti[0];return(0,At.Z)(function(){(0,Ve.unstable_batchedUpdates)(function(){nr.listeners.forEach(function(li){li(hn)})})},[hn]),_e.createElement(bt.Provider,{value:nr},Pn)};return{Context:bt,Provider:Bt,defaultValue:Ye}}function ut(Ye,bt){var Bt=(0,Lt.Z)(typeof bt=="function"?bt:function(li){if(bt===void 0)return li;if(!Array.isArray(bt))return li[bt];var Zi={};return bt.forEach(function(Li){Zi[Li]=li[Li]}),Zi}),Tt=_e.useContext(Ye==null?void 0:Ye.Context),$t=Tt||{},hn=$t.listeners,Pn=$t.getValue,Wn=_e.useRef();Wn.current=Bt(Tt?Pn():Ye==null?void 0:Ye.defaultValue);var fi=_e.useState({}),ti=(0,Xe.Z)(fi,2),nr=ti[1];return(0,At.Z)(function(){if(!Tt)return;function li(Zi){var Li=Bt(Zi);(0,wt.Z)(Wn.current,Li,!0)||nr({})}return hn.add(li),function(){hn.delete(li)}},[Tt]),Wn.current}var pt=be(87462),Rt=be(42550);function Ot(){var Ye=_e.createContext(null);function bt(){return _e.useContext(Ye)}function Bt($t,hn){var Pn=(0,Rt.Yr)($t),Wn=function(ti,nr){var li=Pn?{ref:nr}:{},Zi=_e.useRef(0),Li=_e.useRef(ti),gr=bt();return gr!==null?_e.createElement($t,(0,pt.Z)({},ti,li)):((!hn||hn(Li.current,ti))&&(Zi.current+=1),Li.current=ti,_e.createElement(Ye.Provider,{value:Zi.current},_e.createElement($t,(0,pt.Z)({},ti,li))))};return Pn?_e.forwardRef(Wn):Wn}function Tt($t,hn){var Pn=(0,Rt.Yr)($t),Wn=function(ti,nr){var li=Pn?{ref:nr}:{};return bt(),_e.createElement($t,(0,pt.Z)({},ti,li))};return Pn?_e.memo(_e.forwardRef(Wn),hn):_e.memo(Wn,hn)}return{makeImmutable:Bt,responseImmutable:Tt,useImmutableMark:bt}}var jt=Ot(),Te=jt.makeImmutable,ne=jt.responseImmutable,te=jt.useImmutableMark,ce=Ot(),se=ce.makeImmutable,ge=ce.responseImmutable,ye=ce.useImmutableMark,we=xt(),Ce=we;function Re(Ye,bt){var Bt=React.useRef(0);Bt.current+=1;var Tt=React.useRef(Ye),$t=[];Object.keys(Ye||{}).map(function(Pn){var Wn;(Ye==null?void 0:Ye[Pn])!==((Wn=Tt.current)===null||Wn===void 0?void 0:Wn[Pn])&&$t.push(Pn)}),Tt.current=Ye;var hn=React.useRef([]);return $t.length&&(hn.current=$t),React.useDebugValue(Bt.current),React.useDebugValue(hn.current.join(", ")),bt&&console.log("".concat(bt,":"),Bt.current,hn.current),Bt.current}var We=null,lt=null,ht=be(71002),nt=be(1413),mt=be(4942),at=be(94184),Pt=be.n(at);function Nt(Ye,bt,Bt){var Tt=_e.useRef({});return(!("value"in Tt.current)||Bt(Tt.current.condition,bt))&&(Tt.current.value=Ye(),Tt.current.condition=bt),Tt.current.value}var Et=be(40830);function Ln(Ye,bt){var Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Tt=new Set;function $t(hn,Pn){var Wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,fi=Tt.has(hn);if((0,Et.ZP)(!fi,"Warning: There may be circular references"),fi)return!1;if(hn===Pn)return!0;if(Bt&&Wn>1)return!1;Tt.add(hn);var ti=Wn+1;if(Array.isArray(hn)){if(!Array.isArray(Pn)||hn.length!==Pn.length)return!1;for(var nr=0;nr<hn.length;nr++)if(!$t(hn[nr],Pn[nr],ti))return!1;return!0}if(hn&&Pn&&(0,ht.Z)(hn)==="object"&&(0,ht.Z)(Pn)==="object"){var li=Object.keys(hn);return li.length!==Object.keys(Pn).length?!1:li.every(function(Zi){return $t(hn[Zi],Pn[Zi],ti)})}return!1}return $t(Ye,bt)}var xn=Ln;function Nn(Ye,bt){for(var Bt=Ye,Tt=0;Tt<bt.length;Tt+=1){if(Bt==null)return;Bt=Bt[bt[Tt]]}return Bt}var fn=_e.createContext({renderWithProps:!1}),Qe=fn,Ke="RC_TABLE_KEY";function Je(Ye){return Ye==null?[]:Array.isArray(Ye)?Ye:[Ye]}function _n(Ye){var bt=[],Bt={};return Ye.forEach(function(Tt){for(var $t=Tt||{},hn=$t.key,Pn=$t.dataIndex,Wn=hn||Je(Pn).join("-")||Ke;Bt[Wn];)Wn="".concat(Wn,"_next");Bt[Wn]=!0,bt.push(Wn)}),bt}function Xn(Ye){return Ye!=null}function zt(Ye){return typeof Ye=="number"&&!Number.isNaN(Ye)}function kn(Ye){return Ye&&(0,ht.Z)(Ye)==="object"&&!Array.isArray(Ye)&&!_e.isValidElement(Ye)}function bn(Ye,bt,Bt,Tt,$t,hn){var Pn=_e.useContext(Qe),Wn=ye(),fi=Nt(function(){if(Xn(Tt))return[Tt];var ti=bt==null||bt===""?[]:Array.isArray(bt)?bt:[bt],nr=Nn(Ye,ti),li=nr,Zi=void 0;if($t){var Li=$t(nr,Ye,Bt);kn(Li)?(li=Li.children,Zi=Li.props,Pn.renderWithProps=!0):li=Li}return[li,Zi]},[Wn,Ye,Tt,bt,$t,Bt],function(ti,nr){if(hn){var li=(0,Xe.Z)(ti,2),Zi=li[1],Li=(0,Xe.Z)(nr,2),gr=Li[1];return hn(gr,Zi)}return Pn.renderWithProps?!0:!xn(ti,nr,!0)});return fi}function oi(Ye,bt,Bt,Tt){var $t=Ye+bt-1;return Ye<=Tt&&$t>=Bt}function Yt(Ye,bt){return ut(Ce,function(Bt){var Tt=oi(Ye,bt||1,Bt.hoverStartRow,Bt.hoverEndRow);return[Tt,Bt.onHover]})}function Mt(Ye){var bt=_e.useRef();bt.current=Ye;var Bt=_e.useCallback(function(){for(var Tt,$t=arguments.length,hn=new Array($t),Pn=0;Pn<$t;Pn++)hn[Pn]=arguments[Pn];return(Tt=bt.current)===null||Tt===void 0?void 0:Tt.call.apply(Tt,[bt].concat(hn))},[]);return Bt}function _t(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var mn=_t()?_e.useLayoutEffect:_e.useEffect,rn=function(bt,Bt){var Tt=React.useRef(!0);mn(function(){return bt(Tt.current)},Bt),mn(function(){return Tt.current=!1,function(){Tt.current=!0}},[])},He=function(bt,Bt){rn(function(Tt){if(!Tt)return bt()},Bt)},Me=null;function Fe(Ye){var bt=React.useRef(!1),Bt=React.useState(Ye),Tt=_slicedToArray(Bt,2),$t=Tt[0],hn=Tt[1];React.useEffect(function(){return bt.current=!1,function(){bt.current=!0}},[]);function Pn(Wn,fi){fi&&bt.current||hn(Wn)}return[$t,Pn]}function Oe(Ye){return Ye!==void 0}function Ue(Ye,bt){var Bt=bt||{},Tt=Bt.defaultValue,$t=Bt.value,hn=Bt.onChange,Pn=Bt.postState,Wn=useState(function(){return Oe($t)?$t:Oe(Tt)?typeof Tt=="function"?Tt():Tt:typeof Ye=="function"?Ye():Ye}),fi=_slicedToArray(Wn,2),ti=fi[0],nr=fi[1],li=$t!==void 0?$t:ti,Zi=Pn?Pn(li):li,Li=useEvent(hn),gr=useState([li]),Ir=_slicedToArray(gr,2),co=Ir[0],Wo=Ir[1];useLayoutUpdateEffect(function(){var ei=co[0];ti!==ei&&Li(ti,ei)},[co]),useLayoutUpdateEffect(function(){Oe($t)||nr($t)},[$t]);var Ht=useEvent(function(ei,bi){nr(ei,bi),Wo([li],bi)});return[Zi,Ht]}var Be=be(35110),ot=be(63295),Cn=Number(_e.version.split(".")[0]),ci=function(bt,Bt){typeof bt=="function"?bt(Bt):(0,ht.Z)(bt)==="object"&&bt&&"current"in bt&&(bt.current=Bt)},si=function(){for(var bt=arguments.length,Bt=new Array(bt),Tt=0;Tt<bt;Tt++)Bt[Tt]=arguments[Tt];var $t=Bt.filter(Boolean);return $t.length<=1?$t[0]:function(hn){Bt.forEach(function(Pn){ci(Pn,hn)})}},pn=function(){for(var bt=arguments.length,Bt=new Array(bt),Tt=0;Tt<bt;Tt++)Bt[Tt]=arguments[Tt];return useMemo(function(){return si.apply(void 0,Bt)},Bt,function($t,hn){return $t.length!==hn.length||$t.every(function(Pn,Wn){return Pn!==hn[Wn]})})},qn=function(bt){var Bt,Tt;if(!bt)return!1;if(en(bt)&&Cn>=19)return!0;var $t=isMemo(bt)?bt.type.type:bt.type;return!(typeof $t=="function"&&!((Bt=$t.prototype)!==null&&Bt!==void 0&&Bt.render)&&$t.$$typeof!==ForwardRef||typeof bt=="function"&&!((Tt=bt.prototype)!==null&&Tt!==void 0&&Tt.render)&&bt.$$typeof!==ForwardRef)};function en(Ye){return isValidElement(Ye)&&!isFragment(Ye)}var wi=function(bt){return en(bt)&&qn(bt)},Si=function(bt){if(bt&&en(bt)){var Bt=bt;return Bt.props.propertyIsEnumerable("ref")?Bt.props.ref:Bt.ref}return null};function Di(Ye,bt,Bt,Tt){if(!bt.length)return Bt;var $t=_toArray(bt),hn=$t[0],Pn=$t.slice(1),Wn;return!Ye&&typeof hn=="number"?Wn=[]:Array.isArray(Ye)?Wn=_toConsumableArray(Ye):Wn=_objectSpread({},Ye),Tt&&Bt===void 0&&Pn.length===1?delete Wn[hn][Pn[0]]:Wn[hn]=Di(Wn[hn],Pn,Bt,Tt),Wn}function Ti(Ye,bt,Bt){var Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return bt.length&&Tt&&Bt===void 0&&!get(Ye,bt.slice(0,-1))?Ye:Di(Ye,bt,Bt,Tt)}function ro(Ye){return _typeof(Ye)==="object"&&Ye!==null&&Object.getPrototypeOf(Ye)===Object.prototype}function Zr(Ye){return Array.isArray(Ye)?[]:{}}var Fi=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function mi(){for(var Ye=arguments.length,bt=new Array(Ye),Bt=0;Bt<Ye;Bt++)bt[Bt]=arguments[Bt];var Tt=Zr(bt[0]);return bt.forEach(function($t){function hn(Pn,Wn){var fi=new Set(Wn),ti=get($t,Pn),nr=Array.isArray(ti);if(nr||ro(ti)){if(!fi.has(ti)){fi.add(ti);var li=get(Tt,Pn);nr?Tt=Ti(Tt,Pn,[]):(!li||_typeof(li)!=="object")&&(Tt=Ti(Tt,Pn,Zr(ti))),Fi(ti).forEach(function(Zi){hn([].concat(_toConsumableArray(Pn),[Zi]),fi)})}}else Tt=Ti(Tt,Pn,ti)}hn([])}),Tt}var Co=function(bt){var Bt=bt.ellipsis,Tt=bt.rowType,$t=bt.children,hn,Pn=Bt===!0?{showTitle:!0}:Bt;return Pn&&(Pn.showTitle||Tt==="header")&&(typeof $t=="string"||typeof $t=="number"?hn=$t.toString():_e.isValidElement($t)&&typeof $t.props.children=="string"&&(hn=$t.props.children)),hn};function jn(Ye){var bt,Bt,Tt,$t,hn,Pn,Wn,fi,ti=Ye.component,nr=Ye.children,li=Ye.ellipsis,Zi=Ye.scope,Li=Ye.prefixCls,gr=Ye.className,Ir=Ye.align,co=Ye.record,Wo=Ye.render,Ht=Ye.dataIndex,ei=Ye.renderIndex,bi=Ye.shouldCellUpdate,Vi=Ye.index,ni=Ye.rowType,Sr=Ye.colSpan,xo=Ye.rowSpan,ho=Ye.fixLeft,Yr=Ye.fixRight,$a=Ye.firstFixLeft,Go=Ye.lastFixLeft,Qo=Ye.firstFixRight,ma=Ye.lastFixRight,ui=Ye.appendNode,wo=Ye.additionalProps,sa=wo===void 0?{}:wo,ke=Ye.isSticky,Ie="".concat(Li,"-cell"),st=ut(Ce,["supportSticky","allColumnsFixedLeft","rowHoverable"]),gt=st.supportSticky,Xt=st.allColumnsFixedLeft,vn=st.rowHoverable,Dn=bn(co,Ht,ei,nr,Wo,bi),di=(0,Xe.Z)(Dn,2),yi=di[0],ai=di[1],Hi={},$i=typeof ho=="number"&&gt,Pr=typeof Yr=="number"&&gt;$i&&(Hi.position="sticky",Hi.left=ho),Pr&&(Hi.position="sticky",Hi.right=Yr);var Ui=(bt=(Bt=(Tt=ai==null?void 0:ai.colSpan)!==null&&Tt!==void 0?Tt:sa.colSpan)!==null&&Bt!==void 0?Bt:Sr)!==null&&bt!==void 0?bt:1,zi=($t=(hn=(Pn=ai==null?void 0:ai.rowSpan)!==null&&Pn!==void 0?Pn:sa.rowSpan)!==null&&hn!==void 0?hn:xo)!==null&&$t!==void 0?$t:1,cr=Yt(Vi,zi),Er=(0,Xe.Z)(cr,2),To=Er[0],ea=Er[1],Eo=Mt(function(fa){var Qr;co&&ea(Vi,Vi+zi-1),sa==null||(Qr=sa.onMouseEnter)===null||Qr===void 0||Qr.call(sa,fa)}),Po=Mt(function(fa){var Qr;co&&ea(-1,-1),sa==null||(Qr=sa.onMouseLeave)===null||Qr===void 0||Qr.call(sa,fa)});if(Ui===0||zi===0)return null;var Ma=(Wn=sa.title)!==null&&Wn!==void 0?Wn:Co({rowType:ni,ellipsis:li,children:yi}),or=Pt()(Ie,gr,(fi={},(0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)(fi,"".concat(Ie,"-fix-left"),$i&&gt),"".concat(Ie,"-fix-left-first"),$a&&gt),"".concat(Ie,"-fix-left-last"),Go&&gt),"".concat(Ie,"-fix-left-all"),Go&&Xt&&gt),"".concat(Ie,"-fix-right"),Pr&&gt),"".concat(Ie,"-fix-right-first"),Qo&&gt),"".concat(Ie,"-fix-right-last"),ma&&gt),"".concat(Ie,"-ellipsis"),li),"".concat(Ie,"-with-append"),ui),"".concat(Ie,"-fix-sticky"),($i||Pr)&&ke&&gt),(0,mt.Z)(fi,"".concat(Ie,"-row-hover"),!ai&&To)),sa.className,ai==null?void 0:ai.className),_o={};Ir&&(_o.textAlign=Ir);var $r=(0,nt.Z)((0,nt.Z)((0,nt.Z)((0,nt.Z)({},ai==null?void 0:ai.style),Hi),_o),sa.style),Oo=yi;return(0,ht.Z)(Oo)==="object"&&!Array.isArray(Oo)&&!_e.isValidElement(Oo)&&(Oo=null),li&&(Go||Qo)&&(Oo=_e.createElement("span",{className:"".concat(Ie,"-content")},Oo)),_e.createElement(ti,(0,pt.Z)({},ai,sa,{className:or,style:$r,title:Ma,scope:Zi,onMouseEnter:vn?Eo:void 0,onMouseLeave:vn?Po:void 0,colSpan:Ui!==1?Ui:null,rowSpan:zi!==1?zi:null}),ui,Oo)}var yn=_e.memo(jn);function Jr(Ye,bt,Bt,Tt,$t){var hn=Bt[Ye]||{},Pn=Bt[bt]||{},Wn,fi;hn.fixed==="left"?Wn=Tt.left[$t==="rtl"?bt:Ye]:Pn.fixed==="right"&&(fi=Tt.right[$t==="rtl"?Ye:bt]);var ti=!1,nr=!1,li=!1,Zi=!1,Li=Bt[bt+1],gr=Bt[Ye-1],Ir=Li&&!Li.fixed||gr&&!gr.fixed||Bt.every(function(bi){return bi.fixed==="left"});if($t==="rtl"){if(Wn!==void 0){var co=gr&&gr.fixed==="left";Zi=!co&&Ir}else if(fi!==void 0){var Wo=Li&&Li.fixed==="right";li=!Wo&&Ir}}else if(Wn!==void 0){var Ht=Li&&Li.fixed==="left";ti=!Ht&&Ir}else if(fi!==void 0){var ei=gr&&gr.fixed==="right";nr=!ei&&Ir}return{fixLeft:Wn,fixRight:fi,lastFixLeft:ti,firstFixRight:nr,lastFixRight:li,firstFixLeft:Zi,isSticky:Tt.isSticky}}var lo=_e.createContext({}),hr=lo;function Nr(Ye){var bt=Ye.className,Bt=Ye.index,Tt=Ye.children,$t=Ye.colSpan,hn=$t===void 0?1:$t,Pn=Ye.rowSpan,Wn=Ye.align,fi=ut(Ce,["prefixCls","direction"]),ti=fi.prefixCls,nr=fi.direction,li=_e.useContext(hr),Zi=li.scrollColumnIndex,Li=li.stickyOffsets,gr=li.flattenColumns,Ir=Bt+hn-1,co=Ir+1===Zi?hn+1:hn,Wo=Jr(Bt,Bt+co-1,gr,Li,nr);return _e.createElement(yn,(0,pt.Z)({className:bt,index:Bt,component:"td",prefixCls:ti,record:null,dataIndex:null,align:Wn,colSpan:co,rowSpan:Pn,render:function(){return Tt}},Wo))}var Xo=be(45987),ji=["children"];function Mi(Ye){var bt=Ye.children,Bt=(0,Xo.Z)(Ye,ji);return _e.createElement("tr",Bt,bt)}function Oi(Ye){var bt=Ye.children;return bt}Oi.Row=Mi,Oi.Cell=Nr;var vr=Oi;function Dr(Ye){var bt=Ye.children,Bt=Ye.stickyOffsets,Tt=Ye.flattenColumns,$t=ut(Ce,"prefixCls"),hn=Tt.length-1,Pn=Tt[hn],Wn=_e.useMemo(function(){return{stickyOffsets:Bt,flattenColumns:Tt,scrollColumnIndex:Pn!=null&&Pn.scrollbar?hn:null}},[Pn,Tt,hn,Bt]);return _e.createElement(hr.Provider,{value:Wn},_e.createElement("tfoot",{className:"".concat($t,"-summary")},bt))}var Cr=ge(Dr),En=vr,Ee=be(48555),on=function(Ye){if(!Ye)return!1;if(Ye instanceof Element){if(Ye.offsetParent)return!0;if(Ye.getBBox){var bt=Ye.getBBox(),Bt=bt.width,Tt=bt.height;if(Bt||Tt)return!0}if(Ye.getBoundingClientRect){var $t=Ye.getBoundingClientRect(),hn=$t.width,Pn=$t.height;if(hn||Pn)return!0}}return!1},gn=function(bt){if(_t()&&window.document.documentElement){var Bt=Array.isArray(bt)?bt:[bt],Tt=window.document.documentElement;return Bt.some(function($t){return $t in Tt.style})}return!1},Mn=function(bt,Bt){if(!gn(bt))return!1;var Tt=document.createElement("div"),$t=Tt.style[bt];return Tt.style[bt]=Bt,Tt.style[bt]!==$t};function In(Ye,bt){return!Array.isArray(Ye)&&bt!==void 0?Mn(Ye,bt):gn(Ye)}function ii(Ye,bt){if(!Ye)return!1;if(Ye.contains)return Ye.contains(bt);for(var Bt=bt;Bt;){if(Bt===Ye)return!0;Bt=Bt.parentNode}return!1}var Ci="data-rc-order",Ji="data-rc-priority",Vt="rc-util-key",Zt=new Map;function It(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},bt=Ye.mark;return bt?bt.startsWith("data-")?bt:"data-".concat(bt):Vt}function dn(Ye){if(Ye.attachTo)return Ye.attachTo;var bt=document.querySelector("head");return bt||document.body}function Ri(Ye){return Ye==="queue"?"prependQueue":Ye?"prepend":"append"}function hi(Ye){return Array.from((Zt.get(Ye)||Ye).children).filter(function(bt){return bt.tagName==="STYLE"})}function ri(Ye){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!_t())return null;var Bt=bt.csp,Tt=bt.prepend,$t=bt.priority,hn=$t===void 0?0:$t,Pn=Ri(Tt),Wn=Pn==="prependQueue",fi=document.createElement("style");fi.setAttribute(Ci,Pn),Wn&&hn&&fi.setAttribute(Ji,"".concat(hn)),Bt!=null&&Bt.nonce&&(fi.nonce=Bt==null?void 0:Bt.nonce),fi.innerHTML=Ye;var ti=dn(bt),nr=ti.firstChild;if(Tt){if(Wn){var li=(bt.styles||hi(ti)).filter(function(Zi){if(!["prepend","prependQueue"].includes(Zi.getAttribute(Ci)))return!1;var Li=Number(Zi.getAttribute(Ji)||0);return hn>=Li});if(li.length)return ti.insertBefore(fi,li[li.length-1].nextSibling),fi}ti.insertBefore(fi,nr)}else ti.appendChild(fi);return fi}function Kt(Ye){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=dn(bt);return(bt.styles||hi(Bt)).find(function(Tt){return Tt.getAttribute(It(bt))===Ye})}function wn(Ye){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=Kt(Ye,bt);if(Bt){var Tt=dn(bt);Tt.removeChild(Bt)}}function Ki(Ye,bt){var Bt=Zt.get(Ye);if(!Bt||!ii(document,Bt)){var Tt=ri("",bt),$t=Tt.parentNode;Zt.set(Ye,$t),Ye.removeChild(Tt)}}function wr(){Zt.clear()}function Kn(Ye,bt){var Bt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Tt=dn(Bt),$t=hi(Tt),hn=(0,nt.Z)((0,nt.Z)({},Bt),{},{styles:$t});Ki(Tt,hn);var Pn=Kt(bt,hn);if(Pn){var Wn,fi;if((Wn=hn.csp)!==null&&Wn!==void 0&&Wn.nonce&&Pn.nonce!==((fi=hn.csp)===null||fi===void 0?void 0:fi.nonce)){var ti;Pn.nonce=(ti=hn.csp)===null||ti===void 0?void 0:ti.nonce}return Pn.innerHTML!==Ye&&(Pn.innerHTML=Ye),Pn}var nr=ri(Ye,hn);return nr.setAttribute(It(hn),bt),nr}var Wt;function Yi(Ye){var bt="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),Bt=document.createElement("div");Bt.id=bt;var Tt=Bt.style;Tt.position="absolute",Tt.left="0",Tt.top="0",Tt.width="100px",Tt.height="100px",Tt.overflow="scroll";var $t,hn;if(Ye){var Pn=getComputedStyle(Ye);Tt.scrollbarColor=Pn.scrollbarColor,Tt.scrollbarWidth=Pn.scrollbarWidth;var Wn=getComputedStyle(Ye,"::-webkit-scrollbar"),fi=parseInt(Wn.width,10),ti=parseInt(Wn.height,10);try{var nr=fi?"width: ".concat(Wn.width,";"):"",li=ti?"height: ".concat(Wn.height,";"):"";Kn(`
#`.concat(bt,`::-webkit-scrollbar {
`).concat(nr,`
`).concat(li,`
}`),bt)}catch(gr){console.error(gr),$t=fi,hn=ti}}document.body.appendChild(Bt);var Zi=Ye&&$t&&!isNaN($t)?$t:Bt.offsetWidth-Bt.clientWidth,Li=Ye&&hn&&!isNaN(hn)?hn:Bt.offsetHeight-Bt.clientHeight;return document.body.removeChild(Bt),wn(bt),{width:Zi,height:Li}}function pr(Ye){return typeof document=="undefined"?0:((Ye||Wt===void 0)&&(Wt=Yi()),Wt.width)}function Ro(Ye){return typeof document=="undefined"||!Ye||!(Ye instanceof Element)?{width:0,height:0}:Yi(Ye)}var Zn=`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`,Pi="".concat(Zn," ").concat(Ni).split(/[\s\n]+/),xs="aria-",qa="data-";function Ar(Ye,bt){return Ye.indexOf(bt)===0}function br(Ye){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Bt;bt===!1?Bt={aria:!0,data:!0,attr:!0}:bt===!0?Bt={aria:!0}:Bt=(0,nt.Z)({},bt);var Tt={};return Object.keys(Ye).forEach(function($t){(Bt.aria&&($t==="role"||Ar($t,xs))||Bt.data&&Ar($t,qa)||Bt.attr&&Pi.includes($t))&&(Tt[$t]=Ye[$t])}),Tt}function Rr(Ye,bt,Bt,Tt,$t,hn,Pn){Ye.push({record:bt,indent:Bt,index:Pn});var Wn=hn(bt),fi=$t==null?void 0:$t.has(Wn);if(bt&&Array.isArray(bt[Tt])&&fi)for(var ti=0;ti<bt[Tt].length;ti+=1)Rr(Ye,bt[Tt][ti],Bt+1,Tt,$t,hn,ti)}function xa(Ye,bt,Bt,Tt){var $t=_e.useMemo(function(){if(Bt!=null&&Bt.size){for(var hn=[],Pn=0;Pn<(Ye==null?void 0:Ye.length);Pn+=1){var Wn=Ye[Pn];Rr(hn,Wn,0,bt,Bt,Tt,Pn)}return hn}return Ye==null?void 0:Ye.map(function(fi,ti){return{record:fi,indent:0,index:ti}})},[Ye,bt,Bt,Tt]);return $t}function Ka(Ye,bt,Bt,Tt){var $t=ut(Ce,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),hn=$t.flattenColumns,Pn=$t.expandableType,Wn=$t.expandedKeys,fi=$t.childrenColumnName,ti=$t.onTriggerExpand,nr=$t.rowExpandable,li=$t.onRow,Zi=$t.expandRowByClick,Li=$t.rowClassName,gr=Pn==="nest",Ir=Pn==="row"&&(!nr||nr(Ye)),co=Ir||gr,Wo=Wn&&Wn.has(bt),Ht=fi&&Ye&&Ye[fi],ei=Mt(ti),bi=li==null?void 0:li(Ye,Bt),Vi=bi==null?void 0:bi.onClick,ni=function(Yr){Zi&&co&&ti(Ye,Yr);for(var $a=arguments.length,Go=new Array($a>1?$a-1:0),Qo=1;Qo<$a;Qo++)Go[Qo-1]=arguments[Qo];Vi==null||Vi.apply(void 0,[Yr].concat(Go))},Sr;typeof Li=="string"?Sr=Li:typeof Li=="function"&&(Sr=Li(Ye,Bt,Tt));var xo=_n(hn);return(0,nt.Z)((0,nt.Z)({},$t),{},{columnsKey:xo,nestExpandable:gr,expanded:Wo,hasNestChildren:Ht,record:Ye,onTriggerExpand:ei,rowSupportExpand:Ir,expandable:co,rowProps:(0,nt.Z)((0,nt.Z)({},bi),{},{className:Pt()(Sr,bi==null?void 0:bi.className),onClick:ni})})}function _i(Ye){var bt=Ye.prefixCls,Bt=Ye.children,Tt=Ye.component,$t=Ye.cellComponent,hn=Ye.className,Pn=Ye.expanded,Wn=Ye.colSpan,fi=Ye.isEmpty,ti=ut(Ce,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),nr=ti.scrollbarSize,li=ti.fixHeader,Zi=ti.fixColumn,Li=ti.componentWidth,gr=ti.horizonScroll,Ir=Bt;return(fi?gr&&Li:Zi)&&(Ir=_e.createElement("div",{style:{width:Li-(li&&!fi?nr:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(bt,"-expanded-row-fixed")},Ir)),_e.createElement(Tt,{className:hn,style:{display:Pn?null:"none"}},_e.createElement(yn,{component:$t,prefixCls:bt,colSpan:Wn},Ir))}var yo=_i;function zl(Ye){var bt=Ye.prefixCls,Bt=Ye.record,Tt=Ye.onExpand,$t=Ye.expanded,hn=Ye.expandable,Pn="".concat(bt,"-row-expand-icon");if(!hn)return _e.createElement("span",{className:Pt()(Pn,"".concat(bt,"-row-spaced"))});var Wn=function(ti){Tt(Bt,ti),ti.stopPropagation()};return _e.createElement("span",{className:Pt()(Pn,(0,mt.Z)((0,mt.Z)({},"".concat(bt,"-row-expanded"),$t),"".concat(bt,"-row-collapsed"),!$t)),onClick:Wn})}function ms(Ye,bt,Bt){var Tt=[];function $t(hn){(hn||[]).forEach(function(Pn,Wn){Tt.push(bt(Pn,Wn)),$t(Pn[Bt])})}return $t(Ye),Tt}function as(Ye,bt,Bt,Tt){return typeof Ye=="string"?Ye:typeof Ye=="function"?Ye(bt,Bt,Tt):""}function Qt(Ye,bt,Bt,Tt,$t){var hn=Ye.record,Pn=Ye.prefixCls,Wn=Ye.columnsKey,fi=Ye.fixedInfoList,ti=Ye.expandIconColumnIndex,nr=Ye.nestExpandable,li=Ye.indentSize,Zi=Ye.expandIcon,Li=Ye.expanded,gr=Ye.hasNestChildren,Ir=Ye.onTriggerExpand,co=Wn[Bt],Wo=fi[Bt],Ht;Bt===(ti||0)&&nr&&(Ht=_e.createElement(_e.Fragment,null,_e.createElement("span",{style:{paddingLeft:"".concat(li*Tt,"px")},className:"".concat(Pn,"-row-indent indent-level-").concat(Tt)}),Zi({prefixCls:Pn,expanded:Li,expandable:gr,record:hn,onExpand:Ir})));var ei;return bt.onCell&&(ei=bt.onCell(hn,$t)),{key:co,fixedInfo:Wo,appendCellNode:Ht,additionalCellProps:ei||{}}}function Br(Ye){var bt=Ye.className,Bt=Ye.style,Tt=Ye.record,$t=Ye.index,hn=Ye.renderIndex,Pn=Ye.rowKey,Wn=Ye.indent,fi=Wn===void 0?0:Wn,ti=Ye.rowComponent,nr=Ye.cellComponent,li=Ye.scopeCellComponent,Zi=Ka(Tt,Pn,$t,fi),Li=Zi.prefixCls,gr=Zi.flattenColumns,Ir=Zi.expandedRowClassName,co=Zi.expandedRowRender,Wo=Zi.rowProps,Ht=Zi.expanded,ei=Zi.rowSupportExpand,bi=_e.useRef(!1);bi.current||(bi.current=Ht);var Vi=as(Ir,Tt,$t,fi),ni=_e.createElement(ti,(0,pt.Z)({},Wo,{"data-row-key":Pn,className:Pt()(bt,"".concat(Li,"-row"),"".concat(Li,"-row-level-").concat(fi),Wo==null?void 0:Wo.className,(0,mt.Z)({},Vi,fi>=1)),style:(0,nt.Z)((0,nt.Z)({},Bt),Wo==null?void 0:Wo.style)}),gr.map(function(ho,Yr){var $a=ho.render,Go=ho.dataIndex,Qo=ho.className,ma=Qt(Zi,ho,Yr,fi,$t),ui=ma.key,wo=ma.fixedInfo,sa=ma.appendCellNode,ke=ma.additionalCellProps;return _e.createElement(yn,(0,pt.Z)({className:Qo,ellipsis:ho.ellipsis,align:ho.align,scope:ho.rowScope,component:ho.rowScope?li:nr,prefixCls:Li,key:ui,record:Tt,index:$t,renderIndex:hn,dataIndex:Go,render:$a,shouldCellUpdate:ho.shouldCellUpdate},wo,{appendNode:sa,additionalProps:ke}))})),Sr;if(ei&&(bi.current||Ht)){var xo=co(Tt,$t,fi+1,Ht);Sr=_e.createElement(yo,{expanded:Ht,className:Pt()("".concat(Li,"-expanded-row"),"".concat(Li,"-expanded-row-level-").concat(fi+1),Vi),prefixCls:Li,component:ti,cellComponent:nr,colSpan:gr.length,isEmpty:!1},xo)}return _e.createElement(_e.Fragment,null,ni,Sr)}var ba=ge(Br);function to(Ye){var bt=Ye.columnKey,Bt=Ye.onColumnResize,Tt=_e.useRef();return _e.useEffect(function(){Tt.current&&Bt(bt,Tt.current.offsetWidth)},[]),_e.createElement(Ee.Z,{data:bt},_e.createElement("td",{ref:Tt,style:{padding:0,border:0,height:0}},_e.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}function vs(Ye){var bt=Ye.prefixCls,Bt=Ye.columnsKey,Tt=Ye.onColumnResize;return _e.createElement("tr",{"aria-hidden":"true",className:"".concat(bt,"-measure-row"),style:{height:0,fontSize:0}},_e.createElement(Ee.Z.Collection,{onBatchResize:function(hn){hn.forEach(function(Pn){var Wn=Pn.data,fi=Pn.size;Tt(Wn,fi.offsetWidth)})}},Bt.map(function($t){return _e.createElement(to,{key:$t,columnKey:$t,onColumnResize:Tt})})))}function La(Ye){var bt=Ye.data,Bt=Ye.measureColumnWidth,Tt=ut(Ce,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),$t=Tt.prefixCls,hn=Tt.getComponent,Pn=Tt.onColumnResize,Wn=Tt.flattenColumns,fi=Tt.getRowKey,ti=Tt.expandedKeys,nr=Tt.childrenColumnName,li=Tt.emptyNode,Zi=xa(bt,nr,ti,fi),Li=_e.useRef({renderWithProps:!1}),gr=hn(["body","wrapper"],"tbody"),Ir=hn(["body","row"],"tr"),co=hn(["body","cell"],"td"),Wo=hn(["body","cell"],"th"),Ht;bt.length?Ht=Zi.map(function(bi,Vi){var ni=bi.record,Sr=bi.indent,xo=bi.index,ho=fi(ni,Vi);return _e.createElement(ba,{key:ho,rowKey:ho,record:ni,index:Vi,renderIndex:xo,rowComponent:Ir,cellComponent:co,scopeCellComponent:Wo,indent:Sr})}):Ht=_e.createElement(yo,{expanded:!0,className:"".concat($t,"-placeholder"),prefixCls:$t,component:Ir,cellComponent:co,colSpan:Wn.length,isEmpty:!0},li);var ei=_n(Wn);return _e.createElement(Qe.Provider,{value:Li.current},_e.createElement(gr,{className:"".concat($t,"-tbody")},Bt&&_e.createElement(vs,{prefixCls:$t,columnsKey:ei,onColumnResize:Pn}),Ht))}var Za=ge(La),wa=be(62978),ca=["columnType"];function Ya(Ye){for(var bt=Ye.colWidths,Bt=Ye.columns,Tt=Ye.columCount,$t=ut(Ce,["tableLayout"]),hn=$t.tableLayout,Pn=[],Wn=Tt||Bt.length,fi=!1,ti=Wn-1;ti>=0;ti-=1){var nr=bt[ti],li=Bt&&Bt[ti],Zi=void 0,Li=void 0;if(li&&(Zi=li[wa.v],hn==="auto"&&(Li=li.minWidth)),nr||Li||Zi||fi){var gr=Zi||{},Ir=gr.columnType,co=(0,Xo.Z)(gr,ca);Pn.unshift(_e.createElement("col",(0,pt.Z)({key:ti,style:{width:nr,minWidth:Li}},co))),fi=!0}}return _e.createElement("colgroup",null,Pn)}var Un=Ya,js=be(74902),zn=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function _a(Ye,bt){return(0,_e.useMemo)(function(){for(var Bt=[],Tt=0;Tt<bt;Tt+=1){var $t=Ye[Tt];if($t!==void 0)Bt[Tt]=$t;else return null}return Bt},[Ye.join("_"),bt])}var Sl=_e.forwardRef(function(Ye,bt){var Bt=Ye.className,Tt=Ye.noData,$t=Ye.columns,hn=Ye.flattenColumns,Pn=Ye.colWidths,Wn=Ye.columCount,fi=Ye.stickyOffsets,ti=Ye.direction,nr=Ye.fixHeader,li=Ye.stickyTopOffset,Zi=Ye.stickyBottomOffset,Li=Ye.stickyClassName,gr=Ye.onScroll,Ir=Ye.maxContentScroll,co=Ye.children,Wo=(0,Xo.Z)(Ye,zn),Ht=ut(Ce,["prefixCls","scrollbarSize","isSticky","getComponent"]),ei=Ht.prefixCls,bi=Ht.scrollbarSize,Vi=Ht.isSticky,ni=Ht.getComponent,Sr=ni(["header","table"],"table"),xo=Vi&&!nr?0:bi,ho=_e.useRef(null),Yr=_e.useCallback(function(ke){ci(bt,ke),ci(ho,ke)},[]);_e.useEffect(function(){var ke;function Ie(st){var gt=st,Xt=gt.currentTarget,vn=gt.deltaX;vn&&(gr({currentTarget:Xt,scrollLeft:Xt.scrollLeft+vn}),st.preventDefault())}return(ke=ho.current)===null||ke===void 0||ke.addEventListener("wheel",Ie,{passive:!1}),function(){var st;(st=ho.current)===null||st===void 0||st.removeEventListener("wheel",Ie)}},[]);var $a=_e.useMemo(function(){return hn.every(function(ke){return ke.width})},[hn]),Go=hn[hn.length-1],Qo={fixed:Go?Go.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(ei,"-cell-scrollbar")}}},ma=(0,_e.useMemo)(function(){return xo?[].concat((0,js.Z)($t),[Qo]):$t},[xo,$t]),ui=(0,_e.useMemo)(function(){return xo?[].concat((0,js.Z)(hn),[Qo]):hn},[xo,hn]),wo=(0,_e.useMemo)(function(){var ke=fi.right,Ie=fi.left;return(0,nt.Z)((0,nt.Z)({},fi),{},{left:ti==="rtl"?[].concat((0,js.Z)(Ie.map(function(st){return st+xo})),[0]):Ie,right:ti==="rtl"?ke:[].concat((0,js.Z)(ke.map(function(st){return st+xo})),[0]),isSticky:Vi})},[xo,fi,Vi]),sa=_a(Pn,Wn);return _e.createElement("div",{style:(0,nt.Z)({overflow:"hidden"},Vi?{top:li,bottom:Zi}:{}),ref:Yr,className:Pt()(Bt,(0,mt.Z)({},Li,!!Li))},_e.createElement(Sr,{style:{tableLayout:"fixed",visibility:Tt||sa?null:"hidden"}},(!Tt||!Ir||$a)&&_e.createElement(Un,{colWidths:sa?[].concat((0,js.Z)(sa),[xo]):[],columCount:Wn+1,columns:ui}),co((0,nt.Z)((0,nt.Z)({},Wo),{},{stickyOffsets:wo,columns:ma,flattenColumns:ui}))))}),No=_e.memo(Sl),kl=function(bt){var Bt=bt.cells,Tt=bt.stickyOffsets,$t=bt.flattenColumns,hn=bt.rowComponent,Pn=bt.cellComponent,Wn=bt.onHeaderRow,fi=bt.index,ti=ut(Ce,["prefixCls","direction"]),nr=ti.prefixCls,li=ti.direction,Zi;Wn&&(Zi=Wn(Bt.map(function(gr){return gr.column}),fi));var Li=_n(Bt.map(function(gr){return gr.column}));return _e.createElement(hn,Zi,Bt.map(function(gr,Ir){var co=gr.column,Wo=Jr(gr.colStart,gr.colEnd,$t,Tt,li),Ht;return co&&co.onHeaderCell&&(Ht=gr.column.onHeaderCell(co)),_e.createElement(yn,(0,pt.Z)({},gr,{scope:co.title?gr.colSpan>1?"colgroup":"col":null,ellipsis:co.ellipsis,align:co.align,component:Pn,prefixCls:nr,key:Li[Ir]},Wo,{additionalProps:Ht,rowType:"header"}))}))},bs=kl;function ja(Ye){var bt=[];function Bt(Pn,Wn){var fi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;bt[fi]=bt[fi]||[];var ti=Wn,nr=Pn.filter(Boolean).map(function(li){var Zi={key:li.key,className:li.className||"",children:li.title,column:li,colStart:ti},Li=1,gr=li.children;return gr&&gr.length>0&&(Li=Bt(gr,ti,fi+1).reduce(function(Ir,co){return Ir+co},0),Zi.hasSubColumns=!0),"colSpan"in li&&(Li=li.colSpan),"rowSpan"in li&&(Zi.rowSpan=li.rowSpan),Zi.colSpan=Li,Zi.colEnd=Zi.colStart+Li-1,bt[fi].push(Zi),ti+=Li,Li});return nr}Bt(Ye,0);for(var Tt=bt.length,$t=function(Wn){bt[Wn].forEach(function(fi){!("rowSpan"in fi)&&!fi.hasSubColumns&&(fi.rowSpan=Tt-Wn)})},hn=0;hn<Tt;hn+=1)$t(hn);return bt}var es=function(bt){var Bt=bt.stickyOffsets,Tt=bt.columns,$t=bt.flattenColumns,hn=bt.onHeaderRow,Pn=ut(Ce,["prefixCls","getComponent"]),Wn=Pn.prefixCls,fi=Pn.getComponent,ti=_e.useMemo(function(){return ja(Tt)},[Tt]),nr=fi(["header","wrapper"],"thead"),li=fi(["header","row"],"tr"),Zi=fi(["header","cell"],"th");return _e.createElement(nr,{className:"".concat(Wn,"-thead")},ti.map(function(Li,gr){var Ir=_e.createElement(bs,{key:gr,flattenColumns:$t,cells:Li,stickyOffsets:Bt,rowComponent:li,cellComponent:Zi,onHeaderRow:hn,index:gr});return Ir}))},fl=ge(es),ps=be(54768);function sr(Ye,bt,Bt){var Tt=(0,wa.g)(Ye),$t=Tt.expandIcon,hn=Tt.expandedRowKeys,Pn=Tt.defaultExpandedRowKeys,Wn=Tt.defaultExpandAllRows,fi=Tt.expandedRowRender,ti=Tt.onExpand,nr=Tt.onExpandedRowsChange,li=Tt.childrenColumnName,Zi=$t||zl,Li=li||"children",gr=_e.useMemo(function(){return fi?"row":Ye.expandable&&Ye.internalHooks===le.R&&Ye.expandable.__PARENT_RENDER_ICON__||bt.some(function(Vi){return Vi&&(0,ht.Z)(Vi)==="object"&&Vi[Li]})?"nest":!1},[!!fi,bt]),Ir=_e.useState(function(){return Pn||(Wn?ms(bt,Bt,Li):[])}),co=(0,Xe.Z)(Ir,2),Wo=co[0],Ht=co[1],ei=_e.useMemo(function(){return new Set(hn||Wo||[])},[hn,Wo]),bi=_e.useCallback(function(Vi){var ni=Bt(Vi,bt.indexOf(Vi)),Sr,xo=ei.has(ni);xo?(ei.delete(ni),Sr=(0,js.Z)(ei)):Sr=[].concat((0,js.Z)(ei),[ni]),Ht(Sr),ti&&ti(!xo,Vi),nr&&nr(Sr)},[Bt,ei,bt,ti,nr]);return[Tt,gr,ei,Zi,Li,bi]}function tt(Ye,bt,Bt){var Tt=Ye.map(function($t,hn){return Jr(hn,hn,Ye,bt,Bt)});return Nt(function(){return Tt},[Tt],function($t,hn){return!xn($t,hn)})}function il(Ye){var bt=(0,_e.useRef)(Ye),Bt=(0,_e.useState)({}),Tt=(0,Xe.Z)(Bt,2),$t=Tt[1],hn=(0,_e.useRef)(null),Pn=(0,_e.useRef)([]);function Wn(fi){Pn.current.push(fi);var ti=Promise.resolve();hn.current=ti,ti.then(function(){if(hn.current===ti){var nr=Pn.current,li=bt.current;Pn.current=[],nr.forEach(function(Zi){bt.current=Zi(bt.current)}),hn.current=null,li!==bt.current&&$t({})}})}return(0,_e.useEffect)(function(){return function(){hn.current=null}},[]),[bt.current,Wn]}function ql(Ye){var bt=(0,_e.useRef)(Ye||null),Bt=(0,_e.useRef)();function Tt(){window.clearTimeout(Bt.current)}function $t(Pn){bt.current=Pn,Tt(),Bt.current=window.setTimeout(function(){bt.current=null,Bt.current=void 0},100)}function hn(){return bt.current}return(0,_e.useEffect)(function(){return Tt},[]),[$t,hn]}function rl(){var Ye=_e.useState(-1),bt=(0,Xe.Z)(Ye,2),Bt=bt[0],Tt=bt[1],$t=_e.useState(-1),hn=(0,Xe.Z)($t,2),Pn=hn[0],Wn=hn[1],fi=_e.useCallback(function(ti,nr){Tt(ti),Wn(nr)},[]);return[Bt,Pn,fi]}var Il=_t()?window:null;function nu(Ye,bt){var Bt=(0,ht.Z)(Ye)==="object"?Ye:{},Tt=Bt.offsetHeader,$t=Tt===void 0?0:Tt,hn=Bt.offsetSummary,Pn=hn===void 0?0:hn,Wn=Bt.offsetScroll,fi=Wn===void 0?0:Wn,ti=Bt.getContainer,nr=ti===void 0?function(){return Il}:ti,li=nr()||Il,Zi=!!Ye;return _e.useMemo(function(){return{isSticky:Zi,stickyClassName:Zi?"".concat(bt,"-sticky-holder"):"",offsetHeader:$t,offsetSummary:Pn,offsetScroll:fi,container:li}},[Zi,fi,$t,Pn,bt,li])}function Mu(Ye,bt,Bt){var Tt=(0,_e.useMemo)(function(){var $t=bt.length,hn=function(ti,nr,li){for(var Zi=[],Li=0,gr=ti;gr!==nr;gr+=li)Zi.push(Li),bt[gr].fixed&&(Li+=Ye[gr]||0);return Zi},Pn=hn(0,$t,1),Wn=hn($t-1,-1,-1).reverse();return Bt==="rtl"?{left:Wn,right:Pn}:{left:Pn,right:Wn}},[Ye,bt,Bt]);return Tt}var Au=Mu;function Hu(Ye){var bt=Ye.className,Bt=Ye.children;return _e.createElement("div",{className:bt},Bt)}var ws=Hu;function Js(Ye,bt,Bt,Tt){var $t=Ve.unstable_batchedUpdates?function(Pn){Ve.unstable_batchedUpdates(Bt,Pn)}:Bt;return Ye!=null&&Ye.addEventListener&&Ye.addEventListener(bt,$t,Tt),{remove:function(){Ye!=null&&Ye.removeEventListener&&Ye.removeEventListener(bt,$t,Tt)}}}var Xr=function(bt){return+setTimeout(bt,16)},no=function(bt){return clearTimeout(bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Xr=function(bt){return window.requestAnimationFrame(bt)},no=function(bt){return window.cancelAnimationFrame(bt)});var na=0,Fn=new Map;function Bo(Ye){Fn.delete(Ye)}var io=function(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;na+=1;var Tt=na;function $t(hn){if(hn===0)Bo(Tt),bt();else{var Pn=Xr(function(){$t(hn-1)});Fn.set(Tt,Pn)}}return $t(Bt),Tt};io.cancel=function(Ye){var bt=Fn.get(Ye);return Bo(Ye),no(bt)};var Ds=io;function Ps(Ye){return Ye instanceof HTMLElement||Ye instanceof SVGElement}function ol(Ye){return Ye&&(0,ht.Z)(Ye)==="object"&&Ps(Ye.nativeElement)?Ye.nativeElement:Ps(Ye)?Ye:null}function Al(Ye){var bt=ol(Ye);if(bt)return bt;if(Ye instanceof React.Component){var Bt;return(Bt=ReactDOM.findDOMNode)===null||Bt===void 0?void 0:Bt.call(ReactDOM,Ye)}return null}function hu(Ye){var bt=ol(Ye),Bt=bt.getBoundingClientRect(),Tt=document.documentElement;return{left:Bt.left+(window.pageXOffset||Tt.scrollLeft)-(Tt.clientLeft||document.body.clientLeft||0),top:Bt.top+(window.pageYOffset||Tt.scrollTop)-(Tt.clientTop||document.body.clientTop||0)}}var eu=function(bt,Bt){var Tt,$t,hn=bt.scrollBodyRef,Pn=bt.onScroll,Wn=bt.offsetScroll,fi=bt.container,ti=bt.direction,nr=ut(Ce,"prefixCls"),li=((Tt=hn.current)===null||Tt===void 0?void 0:Tt.scrollWidth)||0,Zi=(($t=hn.current)===null||$t===void 0?void 0:$t.clientWidth)||0,Li=li&&Zi*(Zi/li),gr=_e.useRef(),Ir=il({scrollLeft:0,isHiddenScrollBar:!0}),co=(0,Xe.Z)(Ir,2),Wo=co[0],Ht=co[1],ei=_e.useRef({delta:0,x:0}),bi=_e.useState(!1),Vi=(0,Xe.Z)(bi,2),ni=Vi[0],Sr=Vi[1],xo=_e.useRef(null);_e.useEffect(function(){return function(){Ds.cancel(xo.current)}},[]);var ho=function(){Sr(!1)},Yr=function(ui){ui.persist(),ei.current.delta=ui.pageX-Wo.scrollLeft,ei.current.x=0,Sr(!0),ui.preventDefault()},$a=function(ui){var wo,sa=ui||((wo=window)===null||wo===void 0?void 0:wo.event),ke=sa.buttons;if(!ni||ke===0){ni&&Sr(!1);return}var Ie=ei.current.x+ui.pageX-ei.current.x-ei.current.delta,st=ti==="rtl";Ie=Math.max(st?Li-Zi:0,Math.min(st?0:Zi-Li,Ie));var gt=!st||Math.abs(Ie)+Math.abs(Li)<Zi;gt&&(Pn({scrollLeft:Ie/Zi*(li+2)}),ei.current.x=ui.pageX)},Go=function(){Ds.cancel(xo.current),xo.current=Ds(function(){if(hn.current){var ui=hu(hn.current).top,wo=ui+hn.current.offsetHeight,sa=fi===window?document.documentElement.scrollTop+window.innerHeight:hu(fi).top+fi.clientHeight;wo-pr()<=sa||ui>=sa-Wn?Ht(function(ke){return(0,nt.Z)((0,nt.Z)({},ke),{},{isHiddenScrollBar:!0})}):Ht(function(ke){return(0,nt.Z)((0,nt.Z)({},ke),{},{isHiddenScrollBar:!1})})}})},Qo=function(ui){Ht(function(wo){return(0,nt.Z)((0,nt.Z)({},wo),{},{scrollLeft:ui/li*Zi||0})})};return _e.useImperativeHandle(Bt,function(){return{setScrollLeft:Qo,checkScrollBarVisible:Go}}),_e.useEffect(function(){var ma=Js(document.body,"mouseup",ho,!1),ui=Js(document.body,"mousemove",$a,!1);return Go(),function(){ma.remove(),ui.remove()}},[Li,ni]),_e.useEffect(function(){if(hn.current){for(var ma=[],ui=ol(hn.current);ui;)ma.push(ui),ui=ui.parentElement;return ma.forEach(function(wo){return wo.addEventListener("scroll",Go,!1)}),window.addEventListener("resize",Go,!1),window.addEventListener("scroll",Go,!1),fi.addEventListener("scroll",Go,!1),function(){ma.forEach(function(wo){return wo.removeEventListener("scroll",Go)}),window.removeEventListener("resize",Go),window.removeEventListener("scroll",Go),fi.removeEventListener("scroll",Go)}}},[fi]),_e.useEffect(function(){Wo.isHiddenScrollBar||Ht(function(ma){var ui=hn.current;return ui?(0,nt.Z)((0,nt.Z)({},ma),{},{scrollLeft:ui.scrollLeft/ui.scrollWidth*ui.clientWidth}):ma})},[Wo.isHiddenScrollBar]),li<=Zi||!Li||Wo.isHiddenScrollBar?null:_e.createElement("div",{style:{height:pr(),width:Zi,bottom:Wn},className:"".concat(nr,"-sticky-scroll")},_e.createElement("div",{onMouseDown:Yr,ref:gr,className:Pt()("".concat(nr,"-sticky-scroll-bar"),(0,mt.Z)({},"".concat(nr,"-sticky-scroll-bar-active"),ni)),style:{width:"".concat(Li,"px"),transform:"translate3d(".concat(Wo.scrollLeft,"px, 0, 0)")}}))},Eu=_e.forwardRef(eu);function Wu(Ye){return null}var ln=Wu;function Gl(Ye){return null}var Uo=Gl,Zu="rc-table",al=[],Su={};function Jc(){return"No Data"}function Dc(Ye,bt){var Bt=(0,nt.Z)({rowKey:"key",prefixCls:Zu,emptyText:Jc},Ye),Tt=Bt.prefixCls,$t=Bt.className,hn=Bt.rowClassName,Pn=Bt.style,Wn=Bt.data,fi=Bt.rowKey,ti=Bt.scroll,nr=Bt.tableLayout,li=Bt.direction,Zi=Bt.title,Li=Bt.footer,gr=Bt.summary,Ir=Bt.caption,co=Bt.id,Wo=Bt.showHeader,Ht=Bt.components,ei=Bt.emptyText,bi=Bt.onRow,Vi=Bt.onHeaderRow,ni=Bt.onScroll,Sr=Bt.internalHooks,xo=Bt.transformColumns,ho=Bt.internalRefs,Yr=Bt.tailor,$a=Bt.getContainerWidth,Go=Bt.sticky,Qo=Bt.rowHoverable,ma=Qo===void 0?!0:Qo,ui=Wn||al,wo=!!ui.length,sa=Sr===le.R,ke=_e.useCallback(function(Is,Qa){return Nn(Ht,Is)||Qa},[Ht]),Ie=_e.useMemo(function(){return typeof fi=="function"?fi:function(Is){var Qa=Is&&Is[fi];return Qa}},[fi]),st=ke(["body"]),gt=rl(),Xt=(0,Xe.Z)(gt,3),vn=Xt[0],Dn=Xt[1],di=Xt[2],yi=sr(Bt,ui,Ie),ai=(0,Xe.Z)(yi,6),Hi=ai[0],$i=ai[1],Pr=ai[2],Ui=ai[3],zi=ai[4],cr=ai[5],Er=ti==null?void 0:ti.x,To=_e.useState(0),ea=(0,Xe.Z)(To,2),Eo=ea[0],Po=ea[1],Ma=(0,ps.Z)((0,nt.Z)((0,nt.Z)((0,nt.Z)({},Bt),Hi),{},{expandable:!!Hi.expandedRowRender,columnTitle:Hi.columnTitle,expandedKeys:Pr,getRowKey:Ie,onTriggerExpand:cr,expandIcon:Ui,expandIconColumnIndex:Hi.expandIconColumnIndex,direction:li,scrollWidth:sa&&Yr&&typeof Er=="number"?Er:null,clientWidth:Eo}),sa?xo:null),or=(0,Xe.Z)(Ma,4),_o=or[0],$r=or[1],Oo=or[2],fa=or[3],Qr=Oo!=null?Oo:Er,Na=_e.useMemo(function(){return{columns:_o,flattenColumns:$r}},[_o,$r]),ra=_e.useRef(),ns=_e.useRef(),Jo=_e.useRef(),Wa=_e.useRef();_e.useImperativeHandle(bt,function(){return{nativeElement:ra.current,scrollTo:function(Qa){var jl;if(Jo.current instanceof HTMLElement){var ic=Qa.index,Bu=Qa.top,Ku=Qa.key;if(zt(Bu)){var pu;(pu=Jo.current)===null||pu===void 0||pu.scrollTo({top:Bu})}else{var fd,Dl=Ku!=null?Ku:Ie(ui[ic]);(fd=Jo.current.querySelector('[data-row-key="'.concat(Dl,'"]')))===null||fd===void 0||fd.scrollIntoView()}}else(jl=Jo.current)!==null&&jl!==void 0&&jl.scrollTo&&Jo.current.scrollTo(Qa)}}});var ds=_e.useRef(),ys=_e.useState(!1),ls=(0,Xe.Z)(ys,2),Lo=ls[0],Ea=ls[1],Cs=_e.useState(!1),hs=(0,Xe.Z)(Cs,2),zs=hs[0],Os=hs[1],Vs=il(new Map),Gs=(0,Xe.Z)(Vs,2),nl=Gs[0],Wl=Gs[1],el=_n($r),$o=el.map(function(Is){return nl.get(Is)}),oa=_e.useMemo(function(){return $o},[$o.join("_")]),la=Au(oa,$r,li),qr=ti&&Xn(ti.y),fo=ti&&Xn(Qr)||!!Hi.fixed,Vo=fo&&$r.some(function(Is){var Qa=Is.fixed;return Qa}),Xa=_e.useRef(),ss=nu(Go,Tt),va=ss.isSticky,ll=ss.offsetHeader,Nl=ss.offsetSummary,Us=ss.offsetScroll,Zl=ss.stickyClassName,$s=ss.container,pl=_e.useMemo(function(){return gr==null?void 0:gr(ui)},[gr,ui]),xl=(qr||va)&&_e.isValidElement(pl)&&pl.type===vr&&pl.props.fixed,ru,Ll,wl;qr&&(Ll={overflowY:wo?"scroll":"auto",maxHeight:ti.y}),fo&&(ru={overflowX:"auto"},qr||(Ll={overflowY:"hidden"}),wl={width:Qr===!0?"auto":Qr,minWidth:"100%"});var Ks=_e.useCallback(function(Is,Qa){on(ra.current)&&Wl(function(jl){if(jl.get(Is)!==Qa){var ic=new Map(jl);return ic.set(Is,Qa),ic}return jl})},[]),Pl=ql(null),xu=(0,Xe.Z)(Pl,2),Cu=xu[0],ta=xu[1];function Io(Is,Qa){Qa&&(typeof Qa=="function"?Qa(Is):Qa.scrollLeft!==Is&&(Qa.scrollLeft=Is,Qa.scrollLeft!==Is&&setTimeout(function(){Qa.scrollLeft=Is},0)))}var Ko=Mt(function(Is){var Qa=Is.currentTarget,jl=Is.scrollLeft,ic=li==="rtl",Bu=typeof jl=="number"?jl:Qa.scrollLeft,Ku=Qa||Su;if(!ta()||ta()===Ku){var pu;Cu(Ku),Io(Bu,ns.current),Io(Bu,Jo.current),Io(Bu,ds.current),Io(Bu,(pu=Xa.current)===null||pu===void 0?void 0:pu.setScrollLeft)}var fd=Qa||ns.current;if(fd){var Dl=sa&&Yr&&typeof Qr=="number"?Qr:fd.scrollWidth,zc=fd.clientWidth;if(Dl===zc){Ea(!1),Os(!1);return}ic?(Ea(-Bu<Dl-zc),Os(-Bu>0)):(Ea(Bu>0),Os(Bu<Dl-zc))}}),gs=Mt(function(Is){Ko(Is),ni==null||ni(Is)}),Ml=function(){if(fo&&Jo.current){var Qa;Ko({currentTarget:ol(Jo.current),scrollLeft:(Qa=Jo.current)===null||Qa===void 0?void 0:Qa.scrollLeft})}else Ea(!1),Os(!1)},Vl=function(Qa){var jl,ic=Qa.width;(jl=Xa.current)===null||jl===void 0||jl.checkScrollBarVisible();var Bu=ra.current?ra.current.offsetWidth:ic;sa&&$a&&ra.current&&(Bu=$a(ra.current,Bu)||Bu),Bu!==Eo&&(Ml(),Po(Bu))},wu=_e.useRef(!1);_e.useEffect(function(){wu.current&&Ml()},[fo,Wn,_o.length]),_e.useEffect(function(){wu.current=!0},[]);var Gt=_e.useState(0),Uu=(0,Xe.Z)(Gt,2),Ql=Uu[0],$u=Uu[1],Ic=_e.useState(!0),tu=(0,Xe.Z)(Ic,2),Ra=tu[0],Ys=tu[1];_e.useEffect(function(){(!Yr||!sa)&&(Jo.current instanceof Element?$u(Ro(Jo.current).width):$u(Ro(Wa.current).width)),Ys(In("position","sticky"))},[]),_e.useEffect(function(){sa&&ho&&(ho.body.current=Jo.current)});var Ba=_e.useCallback(function(Is){return _e.createElement(_e.Fragment,null,_e.createElement(fl,Is),xl==="top"&&_e.createElement(Cr,Is,pl))},[xl,pl]),ou=_e.useCallback(function(Is){return _e.createElement(Cr,Is,pl)},[pl]),Nu=ke(["table"],"table"),Ua=_e.useMemo(function(){return nr||(Vo?Qr==="max-content"?"auto":"fixed":qr||va||$r.some(function(Is){var Qa=Is.ellipsis;return Qa})?"fixed":"auto")},[qr,Vo,$r,nr,va]),Ms,us={colWidths:oa,columCount:$r.length,stickyOffsets:la,onHeaderRow:Vi,fixHeader:qr,scroll:ti},fs=_e.useMemo(function(){return wo?null:typeof ei=="function"?ei():ei},[wo,ei]),gl=_e.createElement(Za,{data:ui,measureColumnWidth:qr||fo||va}),tl=_e.createElement(Un,{colWidths:$r.map(function(Is){var Qa=Is.width;return Qa}),columns:$r}),nc=Ir!=null?_e.createElement("caption",{className:"".concat(Tt,"-caption")},Ir):void 0,Rc=br(Bt,{data:!0}),_u=br(Bt,{aria:!0});if(qr||va){var au;typeof st=="function"?(au=st(ui,{scrollbarSize:Ql,ref:Jo,onScroll:Ko}),us.colWidths=$r.map(function(Is,Qa){var jl=Is.width,ic=Qa===$r.length-1?jl-Ql:jl;return typeof ic=="number"&&!Number.isNaN(ic)?ic:0})):au=_e.createElement("div",{style:(0,nt.Z)((0,nt.Z)({},ru),Ll),onScroll:gs,ref:Jo,className:Pt()("".concat(Tt,"-body"))},_e.createElement(Nu,(0,pt.Z)({style:(0,nt.Z)((0,nt.Z)({},wl),{},{tableLayout:Ua})},_u),nc,tl,gl,!xl&&pl&&_e.createElement(Cr,{stickyOffsets:la,flattenColumns:$r},pl)));var jc=(0,nt.Z)((0,nt.Z)((0,nt.Z)({noData:!ui.length,maxContentScroll:fo&&Qr==="max-content"},us),Na),{},{direction:li,stickyClassName:Zl,onScroll:Ko});Ms=_e.createElement(_e.Fragment,null,Wo!==!1&&_e.createElement(No,(0,pt.Z)({},jc,{stickyTopOffset:ll,className:"".concat(Tt,"-header"),ref:ns}),Ba),au,xl&&xl!=="top"&&_e.createElement(No,(0,pt.Z)({},jc,{stickyBottomOffset:Nl,className:"".concat(Tt,"-summary"),ref:ds}),ou),va&&Jo.current&&Jo.current instanceof Element&&_e.createElement(Eu,{ref:Xa,offsetScroll:Us,scrollBodyRef:Jo,onScroll:Ko,container:$s,direction:li}))}else Ms=_e.createElement("div",{style:(0,nt.Z)((0,nt.Z)({},ru),Ll),className:Pt()("".concat(Tt,"-content")),onScroll:Ko,ref:Jo},_e.createElement(Nu,(0,pt.Z)({style:(0,nt.Z)((0,nt.Z)({},wl),{},{tableLayout:Ua})},_u),nc,tl,Wo!==!1&&_e.createElement(fl,(0,pt.Z)({},us,Na)),gl,pl&&_e.createElement(Cr,{stickyOffsets:la,flattenColumns:$r},pl)));var Fc=_e.createElement("div",(0,pt.Z)({className:Pt()(Tt,$t,(0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)({},"".concat(Tt,"-rtl"),li==="rtl"),"".concat(Tt,"-ping-left"),Lo),"".concat(Tt,"-ping-right"),zs),"".concat(Tt,"-layout-fixed"),nr==="fixed"),"".concat(Tt,"-fixed-header"),qr),"".concat(Tt,"-fixed-column"),Vo),"".concat(Tt,"-fixed-column-gapped"),Vo&&fa),"".concat(Tt,"-scroll-horizontal"),fo),"".concat(Tt,"-has-fix-left"),$r[0]&&$r[0].fixed),"".concat(Tt,"-has-fix-right"),$r[$r.length-1]&&$r[$r.length-1].fixed==="right")),style:Pn,id:co,ref:ra},Rc),Zi&&_e.createElement(ws,{className:"".concat(Tt,"-title")},Zi(ui)),_e.createElement("div",{ref:Wa,className:"".concat(Tt,"-container")},Ms),Li&&_e.createElement(ws,{className:"".concat(Tt,"-footer")},Li(ui)));fo&&(Fc=_e.createElement(Ee.Z,{onResize:Vl},Fc));var Ou=tt($r,la,li),kd=_e.useMemo(function(){return{scrollX:Qr,prefixCls:Tt,getComponent:ke,scrollbarSize:Ql,direction:li,fixedInfoList:Ou,isSticky:va,supportSticky:Ra,componentWidth:Eo,fixHeader:qr,fixColumn:Vo,horizonScroll:fo,tableLayout:Ua,rowClassName:hn,expandedRowClassName:Hi.expandedRowClassName,expandIcon:Ui,expandableType:$i,expandRowByClick:Hi.expandRowByClick,expandedRowRender:Hi.expandedRowRender,onTriggerExpand:cr,expandIconColumnIndex:Hi.expandIconColumnIndex,indentSize:Hi.indentSize,allColumnsFixedLeft:$r.every(function(Is){return Is.fixed==="left"}),emptyNode:fs,columns:_o,flattenColumns:$r,onColumnResize:Ks,hoverStartRow:vn,hoverEndRow:Dn,onHover:di,rowExpandable:Hi.rowExpandable,onRow:bi,getRowKey:Ie,expandedKeys:Pr,childrenColumnName:zi,rowHoverable:ma}},[Qr,Tt,ke,Ql,li,Ou,va,Ra,Eo,qr,Vo,fo,Ua,hn,Hi.expandedRowClassName,Ui,$i,Hi.expandRowByClick,Hi.expandedRowRender,cr,Hi.expandIconColumnIndex,Hi.indentSize,fs,_o,$r,Ks,vn,Dn,di,Hi.rowExpandable,bi,Ie,Pr,zi,ma]);return _e.createElement(Ce.Provider,{value:kd},Fc)}var Ws=_e.forwardRef(Dc);function Oa(Ye){return se(Ws,Ye)}var Pa=Oa();Pa.EXPAND_COLUMN=le.w,Pa.INTERNAL_HOOKS=le.R,Pa.Column=ln,Pa.ColumnGroup=Uo,Pa.Summary=En;var Ga=Pa;function ts(Ye){var bt=_e.useRef();bt.current=Ye;var Bt=_e.useCallback(function(){for(var Tt,$t=arguments.length,hn=new Array($t),Pn=0;Pn<$t;Pn++)hn[Pn]=arguments[Pn];return(Tt=bt.current)===null||Tt===void 0?void 0:Tt.call.apply(Tt,[bt].concat(hn))},[]);return Bt}function sl(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var oo=sl()?_e.useLayoutEffect:_e.useEffect,$c=function(bt,Bt){var Tt=_e.useRef(!0);oo(function(){return bt(Tt.current)},Bt),oo(function(){return Tt.current=!1,function(){Tt.current=!0}},[])},Hl=function(bt,Bt){$c(function(Tt){if(!Tt)return bt()},Bt)},iu=$c;function Tc(Ye){var bt=React.useRef(!1),Bt=React.useState(Ye),Tt=_slicedToArray(Bt,2),$t=Tt[0],hn=Tt[1];React.useEffect(function(){return bt.current=!1,function(){bt.current=!0}},[]);function Pn(Wn,fi){fi&&bt.current||hn(Wn)}return[$t,Pn]}function Pc(Ye){return Ye!==void 0}function fr(Ye,bt){var Bt=bt||{},Tt=Bt.defaultValue,$t=Bt.value,hn=Bt.onChange,Pn=Bt.postState,Wn=useState(function(){return Pc($t)?$t:Pc(Tt)?typeof Tt=="function"?Tt():Tt:typeof Ye=="function"?Ye():Ye}),fi=_slicedToArray(Wn,2),ti=fi[0],nr=fi[1],li=$t!==void 0?$t:ti,Zi=Pn?Pn(li):li,Li=useEvent(hn),gr=useState([li]),Ir=_slicedToArray(gr,2),co=Ir[0],Wo=Ir[1];useLayoutUpdateEffect(function(){var ei=co[0];ti!==ei&&Li(ti,ei)},[co]),useLayoutUpdateEffect(function(){Pc($t)||nr($t)},[$t]);var Ht=useEvent(function(ei,bi){nr(ei,bi),Wo([li],bi)});return[Zi,Ht]}function El(Ye,bt,Bt){var Tt=React.useRef({});return(!("value"in Tt.current)||Bt(Tt.current.condition,bt))&&(Tt.current.value=Ye(),Tt.current.condition=bt),Tt.current.value}function Fl(Ye,bt){typeof Ye=="function"?Ye(bt):_typeof(Ye)==="object"&&Ye&&"current"in Ye&&(Ye.current=bt)}function Qu(){for(var Ye=arguments.length,bt=new Array(Ye),Bt=0;Bt<Ye;Bt++)bt[Bt]=arguments[Bt];var Tt=bt.filter(function($t){return $t});return Tt.length<=1?Tt[0]:function($t){bt.forEach(function(hn){Fl(hn,$t)})}}function Ec(){for(var Ye=arguments.length,bt=new Array(Ye),Bt=0;Bt<Ye;Bt++)bt[Bt]=arguments[Bt];return useMemo(function(){return Qu.apply(void 0,bt)},bt,function(Tt,$t){return Tt.length!==$t.length||Tt.every(function(hn,Pn){return hn!==$t[Pn]})})}function _c(Ye){var bt,Bt,Tt=isMemo(Ye)?Ye.type.type:Ye.type;return!(typeof Tt=="function"&&!((bt=Tt.prototype)!==null&&bt!==void 0&&bt.render)||typeof Ye=="function"&&!((Bt=Ye.prototype)!==null&&Bt!==void 0&&Bt.render))}function pa(Ye){return!isValidElement(Ye)||isFragment(Ye)?!1:_c(Ye)}function qc(Ye,bt,Bt,Tt){if(!bt.length)return Bt;var $t=_toArray(bt),hn=$t[0],Pn=$t.slice(1),Wn;return!Ye&&typeof hn=="number"?Wn=[]:Array.isArray(Ye)?Wn=_toConsumableArray(Ye):Wn=_objectSpread({},Ye),Tt&&Bt===void 0&&Pn.length===1?delete Wn[hn][Pn[0]]:Wn[hn]=qc(Wn[hn],Pn,Bt,Tt),Wn}function Ju(Ye,bt,Bt){var Tt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return bt.length&&Tt&&Bt===void 0&&!get(Ye,bt.slice(0,-1))?Ye:qc(Ye,bt,Bt,Tt)}function tn(Ye){return _typeof(Ye)==="object"&&Ye!==null&&Object.getPrototypeOf(Ye)===Object.prototype}function un(Ye){return Array.isArray(Ye)?[]:{}}var Gn=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function er(){for(var Ye=arguments.length,bt=new Array(Ye),Bt=0;Bt<Ye;Bt++)bt[Bt]=arguments[Bt];var Tt=un(bt[0]);return bt.forEach(function($t){function hn(Pn,Wn){var fi=new Set(Wn),ti=get($t,Pn),nr=Array.isArray(ti);if(nr||tn(ti)){if(!fi.has(ti)){fi.add(ti);var li=get(Tt,Pn);nr?Tt=Ju(Tt,Pn,[]):(!li||_typeof(li)!=="object")&&(Tt=Ju(Tt,Pn,un(ti))),Gn(ti).forEach(function(Zi){hn([].concat(_toConsumableArray(Pn),[Zi]),fi)})}}else Tt=Ju(Tt,Pn,ti)}hn([])}),Tt}var Wi={},Bi=[],ki=function(bt){Bi.push(bt)};function On(Ye,bt){if(0)var Bt}function pi(Ye,bt){if(0)var Bt}function ur(){Wi={}}function _r(Ye,bt,Bt){!bt&&!Wi[Bt]&&(Ye(!1,Bt),Wi[Bt]=!0)}function da(Ye,bt){_r(On,Ye,bt)}function ia(Ye,bt){_r(pi,Ye,bt)}da.preMessage=ki,da.resetWarned=ur,da.noteOnce=ia;var Es=null,cs=_e.forwardRef(function(Ye,bt){var Bt=Ye.height,Tt=Ye.offsetY,$t=Ye.offsetX,hn=Ye.children,Pn=Ye.prefixCls,Wn=Ye.onInnerResize,fi=Ye.innerProps,ti=Ye.rtl,nr=Ye.extra,li={},Zi={display:"flex",flexDirection:"column"};return Tt!==void 0&&(li={height:Bt,position:"relative",overflow:"hidden"},Zi=(0,nt.Z)((0,nt.Z)({},Zi),{},(0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)((0,mt.Z)({transform:"translateY(".concat(Tt,"px)")},ti?"marginRight":"marginLeft",-$t),"position","absolute"),"left",0),"right",0),"top",0))),_e.createElement("div",{style:li},_e.createElement(Ee.Z,{onResize:function(gr){var Ir=gr.offsetHeight;Ir&&Wn&&Wn()}},_e.createElement("div",(0,pt.Z)({style:Zi,className:Pt()((0,mt.Z)({},"".concat(Pn,"-holder-inner"),Pn)),ref:bt},fi),hn,nr)))});cs.displayName="Filler";var Do=cs;function jr(Ye){var bt=Ye.children,Bt=Ye.setRef,Tt=_e.useCallback(function($t){Bt($t)},[]);return _e.cloneElement(bt,{ref:Tt})}function qi(Ye,bt,Bt,Tt,$t,hn,Pn,Wn){var fi=Wn.getKey;return Ye.slice(bt,Bt+1).map(function(ti,nr){var li=bt+nr,Zi=Pn(ti,li,{style:{width:Tt},offsetX:$t}),Li=fi(ti);return _e.createElement(jr,{key:Li,setRef:function(Ir){return hn(ti,Ir)}},Zi)})}function Va(Ye,bt,Bt,Tt){var $t=Bt-Ye,hn=bt-Bt,Pn=Math.min($t,hn)*2;if(Tt<=Pn){var Wn=Math.floor(Tt/2);return Tt%2?Bt+Wn+1:Bt-Wn}return $t>hn?Bt-(Tt-hn):Bt+(Tt-$t)}function Ha(Ye,bt,Bt){var Tt=Ye.length,$t=bt.length,hn,Pn;if(Tt===0&&$t===0)return null;Tt<$t?(hn=Ye,Pn=bt):(hn=bt,Pn=Ye);var Wn={__EMPTY_ITEM__:!0};function fi(gr){return gr!==void 0?Bt(gr):Wn}for(var ti=null,nr=Math.abs(Tt-$t)!==1,li=0;li<Pn.length;li+=1){var Zi=fi(hn[li]),Li=fi(Pn[li]);if(Zi!==Li){ti=li,nr=nr||Zi!==fi(Pn[li+1]);break}}return ti===null?null:{index:ti,multiple:nr}}function Ts(Ye,bt,Bt){var Tt=_e.useState(Ye),$t=(0,Xe.Z)(Tt,2),hn=$t[0],Pn=$t[1],Wn=_e.useState(null),fi=(0,Xe.Z)(Wn,2),ti=fi[0],nr=fi[1];return _e.useEffect(function(){var li=Ha(hn||[],Ye||[],bt);(li==null?void 0:li.index)!==void 0&&(Bt==null||Bt(li.index),nr(Ye[li.index])),Pn(Ye)},[Ye]),[ti]}var _s=function(bt){return+setTimeout(bt,16)},ha=function(bt){return clearTimeout(bt)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(_s=function(bt){return window.requestAnimationFrame(bt)},ha=function(bt){return window.cancelAnimationFrame(bt)});var za=0,Ho=new Map;function zr(Ye){Ho.delete(Ye)}var Ns=function(bt){var Bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;za+=1;var Tt=za;function $t(hn){if(hn===0)zr(Tt),bt();else{var Pn=_s(function(){$t(hn-1)});Ho.set(Tt,Pn)}}return $t(Bt),Tt};Ns.cancel=function(Ye){var bt=Ho.get(Ye);return zr(bt),ha(bt)};var Aa=Ns,Ia=(typeof navigator=="undefined"?"undefined":(0,ht.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Zs=Ia,Vu=function(Ye,bt,Bt,Tt){var $t=(0,_e.useRef)(!1),hn=(0,_e.useRef)(null);function Pn(){clearTimeout(hn.current),$t.current=!0,hn.current=setTimeout(function(){$t.current=!1},50)}var Wn=(0,_e.useRef)({top:Ye,bottom:bt,left:Bt,right:Tt});return Wn.current.top=Ye,Wn.current.bottom=bt,Wn.current.left=Bt,Wn.current.right=Tt,function(fi,ti){var nr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,li=fi?ti<0&&Wn.current.left||ti>0&&Wn.current.right:ti<0&&Wn.current.top||ti>0&&Wn.current.bottom;return nr&&li?(clearTimeout(hn.current),$t.current=!1):(!li||$t.current)&&Pn(),!$t.current&&li}};function fu(Ye,bt,Bt,Tt,$t,hn,Pn){var Wn=(0,_e.useRef)(0),fi=(0,_e.useRef)(null),ti=(0,_e.useRef)(null),nr=(0,_e.useRef)(!1),li=Vu(bt,Bt,Tt,$t);function Zi(Ht,ei){if(Aa.cancel(fi.current),!li(!1,ei)){var bi=Ht;if(!bi._virtualHandled)bi._virtualHandled=!0;else return;Wn.current+=ei,ti.current=ei,Zs||bi.preventDefault(),fi.current=Aa(function(){var Vi=nr.current?10:1;Pn(Wn.current*Vi,!1),Wn.current=0})}}function Li(Ht,ei){Pn(ei,!0),Zs||Ht.preventDefault()}var gr=(0,_e.useRef)(null),Ir=(0,_e.useRef)(null);function co(Ht){if(Ye){Aa.cancel(Ir.current),Ir.current=Aa(function(){gr.current=null},2);var ei=Ht.deltaX,bi=Ht.deltaY,Vi=Ht.shiftKey,ni=ei,Sr=bi;(gr.current==="sx"||!gr.current&&Vi&&bi&&!ei)&&(ni=bi,Sr=0,gr.current="sx");var xo=Math.abs(ni),ho=Math.abs(Sr);gr.current===null&&(gr.current=hn&&xo>ho?"x":"y"),gr.current==="y"?Zi(Ht,Sr):Li(Ht,ni)}}function Wo(Ht){Ye&&(nr.current=Ht.detail===ti.current)}return[co,Wo]}function St(Ye,bt,Bt,Tt){var $t=_e.useMemo(function(){return[new Map,[]]},[Ye,Bt.id,Tt]),hn=(0,Xe.Z)($t,2),Pn=hn[0],Wn=hn[1],fi=function(nr){var li=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nr,Zi=Pn.get(nr),Li=Pn.get(li);if(Zi===void 0||Li===void 0)for(var gr=Ye.length,Ir=Wn.length;Ir<gr;Ir+=1){var co,Wo=Ye[Ir],Ht=bt(Wo);Pn.set(Ht,Ir);var ei=(co=Bt.get(Ht))!==null&&co!==void 0?co:Tt;if(Wn[Ir]=(Wn[Ir-1]||0)+ei,Ht===nr&&(Zi=Ir),Ht===li&&(Li=Ir),Zi!==void 0&&Li!==void 0)break}return{top:Wn[Zi-1]||0,bottom:Wn[Li]}};return fi}var Jt=be(15671),ze=be(43144),dt=function(){function Ye(){(0,Jt.Z)(this,Ye),(0,mt.Z)(this,"maps",void 0),(0,mt.Z)(this,"id",0),(0,mt.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,ze.Z)(Ye,[{key:"set",value:function(Bt,Tt){this.maps[Bt]=Tt,this.id+=1,this.diffKeys.add(Bt)}},{key:"get",value:function(Bt){return this.maps[Bt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),Ye}(),lr=dt;function rr(Ye){var bt=parseFloat(Ye);return isNaN(bt)?0:bt}function kr(Ye,bt,Bt){var Tt=_e.useState(0),$t=(0,Xe.Z)(Tt,2),hn=$t[0],Pn=$t[1],Wn=(0,_e.useRef)(new Map),fi=(0,_e.useRef)(new lr),ti=(0,_e.useRef)(0);function nr(){ti.current+=1}function li(){var Li=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;nr();var gr=function(){var Wo=!1;Wn.current.forEach(function(Ht,ei){if(Ht&&Ht.offsetParent){var bi=Ht.offsetHeight,Vi=getComputedStyle(Ht),ni=Vi.marginTop,Sr=Vi.marginBottom,xo=rr(ni),ho=rr(Sr),Yr=bi+xo+ho;fi.current.get(ei)!==Yr&&(fi.current.set(ei,Yr),Wo=!0)}}),Wo&&Pn(function(Ht){return Ht+1})};if(Li)gr();else{ti.current+=1;var Ir=ti.current;Promise.resolve().then(function(){Ir===ti.current&&gr()})}}function Zi(Li,gr){var Ir=Ye(Li),co=Wn.current.get(Ir);gr?(Wn.current.set(Ir,gr),li()):Wn.current.delete(Ir),!co!=!gr&&(gr?bt==null||bt(Li):Bt==null||Bt(Li))}return(0,_e.useEffect)(function(){return nr},[]),[Zi,li,fi.current,hn]}var tr=14/15;function Yn(Ye,bt,Bt){var Tt=(0,_e.useRef)(!1),$t=(0,_e.useRef)(0),hn=(0,_e.useRef)(0),Pn=(0,_e.useRef)(null),Wn=(0,_e.useRef)(null),fi,ti=function(Li){if(Tt.current){var gr=Math.ceil(Li.touches[0].pageX),Ir=Math.ceil(Li.touches[0].pageY),co=$t.current-gr,Wo=hn.current-Ir,Ht=Math.abs(co)>Math.abs(Wo);Ht?$t.current=gr:hn.current=Ir;var ei=Bt(Ht,Ht?co:Wo,!1,Li);ei&&Li.preventDefault(),clearInterval(Wn.current),ei&&(Wn.current=setInterval(function(){Ht?co*=tr:Wo*=tr;var bi=Math.floor(Ht?co:Wo);(!Bt(Ht,bi,!0)||Math.abs(bi)<=.1)&&clearInterval(Wn.current)},16))}},nr=function(){Tt.current=!1,fi()},li=function(Li){fi(),Li.touches.length===1&&!Tt.current&&(Tt.current=!0,$t.current=Math.ceil(Li.touches[0].pageX),hn.current=Math.ceil(Li.touches[0].pageY),Pn.current=Li.target,Pn.current.addEventListener("touchmove",ti,{passive:!1}),Pn.current.addEventListener("touchend",nr,{passive:!0}))};fi=function(){Pn.current&&(Pn.current.removeEventListener("touchmove",ti),Pn.current.removeEventListener("touchend",nr))},iu(function(){return Ye&&bt.current.addEventListener("touchstart",li,{passive:!0}),function(){var Zi;(Zi=bt.current)===null||Zi===void 0||Zi.removeEventListener("touchstart",li),fi(),clearInterval(Wn.current)}},[Ye])}function Tr(Ye){return Math.floor(Math.pow(Ye,.5))}function Lr(Ye,bt){var Bt="touches"in Ye?Ye.touches[0]:Ye;return Bt[bt?"pageX":"pageY"]-window[bt?"scrollX":"scrollY"]}function Vr(Ye,bt,Bt){_e.useEffect(function(){var Tt=bt.current;if(Ye&&Tt){var $t=!1,hn,Pn,Wn=function(){Aa.cancel(hn)},fi=function Zi(){Wn(),hn=Aa(function(){Bt(Pn),Zi()})},ti=function(Li){if(!(Li.target.draggable||Li.button!==0)){var gr=Li;gr._virtualHandled||(gr._virtualHandled=!0,$t=!0)}},nr=function(){$t=!1,Wn()},li=function(Li){if($t){var gr=Lr(Li,!1),Ir=Tt.getBoundingClientRect(),co=Ir.top,Wo=Ir.bottom;if(gr<=co){var Ht=co-gr;Pn=-Tr(Ht),fi()}else if(gr>=Wo){var ei=gr-Wo;Pn=Tr(ei),fi()}else Wn()}};return Tt.addEventListener("mousedown",ti),Tt.ownerDocument.addEventListener("mouseup",nr),Tt.ownerDocument.addEventListener("mousemove",li),function(){Tt.removeEventListener("mousedown",ti),Tt.ownerDocument.removeEventListener("mouseup",nr),Tt.ownerDocument.removeEventListener("mousemove",li),Wn()}}},[Ye])}var mr=10;function zo(Ye,bt,Bt,Tt,$t,hn,Pn,Wn){var fi=_e.useRef(),ti=_e.useState(null),nr=(0,Xe.Z)(ti,2),li=nr[0],Zi=nr[1];return iu(function(){if(li&&li.times<mr){if(!Ye.current){Zi(function(Ie){return(0,nt.Z)({},Ie)});return}hn();var Li=li.targetAlign,gr=li.originAlign,Ir=li.index,co=li.offset,Wo=Ye.current.clientHeight,Ht=!1,ei=Li,bi=null;if(Wo){for(var Vi=Li||gr,ni=0,Sr=0,xo=0,ho=Math.min(bt.length-1,Ir),Yr=0;Yr<=ho;Yr+=1){var $a=$t(bt[Yr]);Sr=ni;var Go=Bt.get($a);xo=Sr+(Go===void 0?Tt:Go),ni=xo}for(var Qo=Vi==="top"?co:Wo-co,ma=ho;ma>=0;ma-=1){var ui=$t(bt[ma]),wo=Bt.get(ui);if(wo===void 0){Ht=!0;break}if(Qo-=wo,Qo<=0)break}switch(Vi){case"top":bi=Sr-co;break;case"bottom":bi=xo-Wo+co;break;default:{var sa=Ye.current.scrollTop,ke=sa+Wo;Sr<sa?ei="top":xo>ke&&(ei="bottom")}}bi!==null&&Pn(bi),bi!==li.lastTop&&(Ht=!0)}Ht&&Zi((0,nt.Z)((0,nt.Z)({},li),{},{times:li.times+1,targetAlign:ei,lastTop:bi}))}},[li,Ye.current]),function(Li){if(Li==null){Wn();return}if(Aa.cancel(fi.current),typeof Li=="number")Pn(Li);else if(Li&&(0,ht.Z)(Li)==="object"){var gr,Ir=Li.align;"index"in Li?gr=Li.index:gr=bt.findIndex(function(Ht){return $t(Ht)===Li.key});var co=Li.offset,Wo=co===void 0?0:co;Zi({times:0,index:gr,offset:Wo,originAlign:Ir})}}}var Ii=_e.forwardRef(function(Ye,bt){var Bt=Ye.prefixCls,Tt=Ye.rtl,$t=Ye.scrollOffset,hn=Ye.scrollRange,Pn=Ye.onStartMove,Wn=Ye.onStopMove,fi=Ye.onScroll,ti=Ye.horizontal,nr=Ye.spinSize,li=Ye.containerSize,Zi=Ye.style,Li=Ye.thumbStyle,gr=Ye.showScrollBar,Ir=_e.useState(!1),co=(0,Xe.Z)(Ir,2),Wo=co[0],Ht=co[1],ei=_e.useState(null),bi=(0,Xe.Z)(ei,2),Vi=bi[0],ni=bi[1],Sr=_e.useState(null),xo=(0,Xe.Z)(Sr,2),ho=xo[0],Yr=xo[1],$a=!Tt,Go=_e.useRef(),Qo=_e.useRef(),ma=_e.useState(gr),ui=(0,Xe.Z)(ma,2),wo=ui[0],sa=ui[1],ke=_e.useRef(),Ie=function(){gr===!0||gr===!1||(clearTimeout(ke.current),sa(!0),ke.current=setTimeout(function(){sa(!1)},3e3))},st=hn-li||0,gt=li-nr||0,Xt=_e.useMemo(function(){if($t===0||st===0)return 0;var Ui=$t/st;return Ui*gt},[$t,st,gt]),vn=function(zi){zi.stopPropagation(),zi.preventDefault()},Dn=_e.useRef({top:Xt,dragging:Wo,pageY:Vi,startTop:ho});Dn.current={top:Xt,dragging:Wo,pageY:Vi,startTop:ho};var di=function(zi){Ht(!0),ni(Lr(zi,ti)),Yr(Dn.current.top),Pn(),zi.stopPropagation(),zi.preventDefault()};_e.useEffect(function(){var Ui=function(To){To.preventDefault()},zi=Go.current,cr=Qo.current;return zi.addEventListener("touchstart",Ui,{passive:!1}),cr.addEventListener("touchstart",di,{passive:!1}),function(){zi.removeEventListener("touchstart",Ui),cr.removeEventListener("touchstart",di)}},[]);var yi=_e.useRef();yi.current=st;var ai=_e.useRef();ai.current=gt,_e.useEffect(function(){if(Wo){var Ui,zi=function(To){var ea=Dn.current,Eo=ea.dragging,Po=ea.pageY,Ma=ea.startTop;Aa.cancel(Ui);var or=Go.current.getBoundingClientRect(),_o=li/(ti?or.width:or.height);if(Eo){var $r=(Lr(To,ti)-Po)*_o,Oo=Ma;!$a&&ti?Oo-=$r:Oo+=$r;var fa=yi.current,Qr=ai.current,Na=Qr?Oo/Qr:0,ra=Math.ceil(Na*fa);ra=Math.max(ra,0),ra=Math.min(ra,fa),Ui=Aa(function(){fi(ra,ti)})}},cr=function(){Ht(!1),Wn()};return window.addEventListener("mousemove",zi,{passive:!0}),window.addEventListener("touchmove",zi,{passive:!0}),window.addEventListener("mouseup",cr,{passive:!0}),window.addEventListener("touchend",cr,{passive:!0}),function(){window.removeEventListener("mousemove",zi),window.removeEventListener("touchmove",zi),window.removeEventListener("mouseup",cr),window.removeEventListener("touchend",cr),Aa.cancel(Ui)}}},[Wo]),_e.useEffect(function(){return Ie(),function(){clearTimeout(ke.current)}},[$t]),_e.useImperativeHandle(bt,function(){return{delayHidden:Ie}});var Hi="".concat(Bt,"-scrollbar"),$i={position:"absolute",visibility:wo?null:"hidden"},Pr={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ti?($i.height=8,$i.left=0,$i.right=0,$i.bottom=0,Pr.height="100%",Pr.width=nr,$a?Pr.left=Xt:Pr.right=Xt):($i.width=8,$i.top=0,$i.bottom=0,$a?$i.right=0:$i.left=0,Pr.width="100%",Pr.height=nr,Pr.top=Xt),_e.createElement("div",{ref:Go,className:Pt()(Hi,(0,mt.Z)((0,mt.Z)((0,mt.Z)({},"".concat(Hi,"-horizontal"),ti),"".concat(Hi,"-vertical"),!ti),"".concat(Hi,"-visible"),wo)),style:(0,nt.Z)((0,nt.Z)({},$i),Zi),onMouseDown:vn,onMouseMove:Ie},_e.createElement("div",{ref:Qo,className:Pt()("".concat(Hi,"-thumb"),(0,mt.Z)({},"".concat(Hi,"-thumb-moving"),Wo)),style:(0,nt.Z)((0,nt.Z)({},Pr),Li),onMouseDown:di}))}),vi=Ii,Ai=20;function Or(){var Ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Bt=Ye/bt*Ye;return isNaN(Bt)&&(Bt=0),Bt=Math.max(Bt,Ai),Math.floor(Bt)}var Ur=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Fr=[],ko={overflowY:"auto",overflowAnchor:"none"};function yr(Ye,bt){var Bt=Ye.prefixCls,Tt=Bt===void 0?"rc-virtual-list":Bt,$t=Ye.className,hn=Ye.height,Pn=Ye.itemHeight,Wn=Ye.fullHeight,fi=Wn===void 0?!0:Wn,ti=Ye.style,nr=Ye.data,li=Ye.children,Zi=Ye.itemKey,Li=Ye.virtual,gr=Ye.direction,Ir=Ye.scrollWidth,co=Ye.component,Wo=co===void 0?"div":co,Ht=Ye.onScroll,ei=Ye.onVirtualScroll,bi=Ye.onVisibleChange,Vi=Ye.innerProps,ni=Ye.extraRender,Sr=Ye.styles,xo=Ye.showScrollBar,ho=xo===void 0?"optional":xo,Yr=(0,Xo.Z)(Ye,Ur),$a=_e.useCallback(function(ta){return typeof Zi=="function"?Zi(ta):ta==null?void 0:ta[Zi]},[Zi]),Go=kr($a,null,null),Qo=(0,Xe.Z)(Go,4),ma=Qo[0],ui=Qo[1],wo=Qo[2],sa=Qo[3],ke=!!(Li!==!1&&hn&&Pn),Ie=_e.useMemo(function(){return Object.values(wo.maps).reduce(function(ta,Io){return ta+Io},0)},[wo.id,wo.maps]),st=ke&&nr&&(Math.max(Pn*nr.length,Ie)>hn||!!Ir),gt=gr==="rtl",Xt=Pt()(Tt,(0,mt.Z)({},"".concat(Tt,"-rtl"),gt),$t),vn=nr||Fr,Dn=(0,_e.useRef)(),di=(0,_e.useRef)(),yi=(0,_e.useRef)(),ai=(0,_e.useState)(0),Hi=(0,Xe.Z)(ai,2),$i=Hi[0],Pr=Hi[1],Ui=(0,_e.useState)(0),zi=(0,Xe.Z)(Ui,2),cr=zi[0],Er=zi[1],To=(0,_e.useState)(!1),ea=(0,Xe.Z)(To,2),Eo=ea[0],Po=ea[1],Ma=function(){Po(!0)},or=function(){Po(!1)},_o={getKey:$a};function $r(ta){Pr(function(Io){var Ko;typeof ta=="function"?Ko=ta(Io):Ko=ta;var gs=el(Ko);return Dn.current.scrollTop=gs,gs})}var Oo=(0,_e.useRef)({start:0,end:vn.length}),fa=(0,_e.useRef)(),Qr=Ts(vn,$a),Na=(0,Xe.Z)(Qr,1),ra=Na[0];fa.current=ra;var ns=_e.useMemo(function(){if(!ke)return{scrollHeight:void 0,start:0,end:vn.length-1,offset:void 0};if(!st){var ta;return{scrollHeight:((ta=di.current)===null||ta===void 0?void 0:ta.offsetHeight)||0,start:0,end:vn.length-1,offset:void 0}}for(var Io=0,Ko,gs,Ml,Vl=vn.length,wu=0;wu<Vl;wu+=1){var Gt=vn[wu],Uu=$a(Gt),Ql=wo.get(Uu),$u=Io+(Ql===void 0?Pn:Ql);$u>=$i&&Ko===void 0&&(Ko=wu,gs=Io),$u>$i+hn&&Ml===void 0&&(Ml=wu),Io=$u}return Ko===void 0&&(Ko=0,gs=0,Ml=Math.ceil(hn/Pn)),Ml===void 0&&(Ml=vn.length-1),Ml=Math.min(Ml+1,vn.length-1),{scrollHeight:Io,start:Ko,end:Ml,offset:gs}},[st,ke,$i,vn,sa,hn]),Jo=ns.scrollHeight,Wa=ns.start,ds=ns.end,ys=ns.offset;Oo.current.start=Wa,Oo.current.end=ds,_e.useLayoutEffect(function(){var ta=wo.getRecord();if(ta.size===1){var Io=Array.from(ta)[0],Ko=vn[Wa];if(Ko){var gs=$a(Ko);if(gs===Io){var Ml=wo.get(Io),Vl=Ml-Pn;$r(function(wu){return wu+Vl})}}}wo.resetRecord()},[Jo]);var ls=_e.useState({width:0,height:hn}),Lo=(0,Xe.Z)(ls,2),Ea=Lo[0],Cs=Lo[1],hs=function(Io){Cs({width:Io.offsetWidth,height:Io.offsetHeight})},zs=(0,_e.useRef)(),Os=(0,_e.useRef)(),Vs=_e.useMemo(function(){return Or(Ea.width,Ir)},[Ea.width,Ir]),Gs=_e.useMemo(function(){return Or(Ea.height,Jo)},[Ea.height,Jo]),nl=Jo-hn,Wl=(0,_e.useRef)(nl);Wl.current=nl;function el(ta){var Io=ta;return Number.isNaN(Wl.current)||(Io=Math.min(Io,Wl.current)),Io=Math.max(Io,0),Io}var $o=$i<=0,oa=$i>=nl,la=cr<=0,qr=cr>=Ir,fo=Vu($o,oa,la,qr),Vo=function(){return{x:gt?-cr:cr,y:$i}},Xa=(0,_e.useRef)(Vo()),ss=ts(function(ta){if(ei){var Io=(0,nt.Z)((0,nt.Z)({},Vo()),ta);(Xa.current.x!==Io.x||Xa.current.y!==Io.y)&&(ei(Io),Xa.current=Io)}});function va(ta,Io){var Ko=ta;Io?((0,Ve.flushSync)(function(){Er(Ko)}),ss()):$r(Ko)}function ll(ta){var Io=ta.currentTarget.scrollTop;Io!==$i&&$r(Io),Ht==null||Ht(ta),ss()}var Nl=function(Io){var Ko=Io,gs=Ir?Ir-Ea.width:0;return Ko=Math.max(Ko,0),Ko=Math.min(Ko,gs),Ko},Us=ts(function(ta,Io){Io?((0,Ve.flushSync)(function(){Er(function(Ko){var gs=Ko+(gt?-ta:ta);return Nl(gs)})}),ss()):$r(function(Ko){var gs=Ko+ta;return gs})}),Zl=fu(ke,$o,oa,la,qr,!!Ir,Us),$s=(0,Xe.Z)(Zl,2),pl=$s[0],xl=$s[1];Yn(ke,Dn,function(ta,Io,Ko,gs){var Ml=gs;return fo(ta,Io,Ko)?!1:!Ml||!Ml._virtualHandled?(Ml&&(Ml._virtualHandled=!0),pl({preventDefault:function(){},deltaX:ta?Io:0,deltaY:ta?0:Io}),!0):!1}),Vr(st,Dn,function(ta){$r(function(Io){return Io+ta})}),iu(function(){function ta(Ko){var gs=$o&&Ko.detail<0,Ml=oa&&Ko.detail>0;ke&&!gs&&!Ml&&Ko.preventDefault()}var Io=Dn.current;return Io.addEventListener("wheel",pl,{passive:!1}),Io.addEventListener("DOMMouseScroll",xl,{passive:!0}),Io.addEventListener("MozMousePixelScroll",ta,{passive:!1}),function(){Io.removeEventListener("wheel",pl),Io.removeEventListener("DOMMouseScroll",xl),Io.removeEventListener("MozMousePixelScroll",ta)}},[ke,$o,oa]),iu(function(){if(Ir){var ta=Nl(cr);Er(ta),ss({x:ta})}},[Ea.width,Ir]);var ru=function(){var Io,Ko;(Io=zs.current)===null||Io===void 0||Io.delayHidden(),(Ko=Os.current)===null||Ko===void 0||Ko.delayHidden()},Ll=zo(Dn,vn,wo,Pn,$a,function(){return ui(!0)},$r,ru);_e.useImperativeHandle(bt,function(){return{nativeElement:yi.current,getScrollInfo:Vo,scrollTo:function(Io){function Ko(gs){return gs&&(0,ht.Z)(gs)==="object"&&("left"in gs||"top"in gs)}Ko(Io)?(Io.left!==void 0&&Er(Nl(Io.left)),Ll(Io.top)):Ll(Io)}}}),iu(function(){if(bi){var ta=vn.slice(Wa,ds+1);bi(ta,vn)}},[Wa,ds,vn]);var wl=St(vn,$a,wo,Pn),Ks=ni==null?void 0:ni({start:Wa,end:ds,virtual:st,offsetX:cr,offsetY:ys,rtl:gt,getSize:wl}),Pl=qi(vn,Wa,ds,Ir,cr,ma,li,_o),xu=null;hn&&(xu=(0,nt.Z)((0,mt.Z)({},fi?"height":"maxHeight",hn),ko),ke&&(xu.overflowY="hidden",Ir&&(xu.overflowX="hidden"),Eo&&(xu.pointerEvents="none")));var Cu={};return gt&&(Cu.dir="rtl"),_e.createElement("div",(0,pt.Z)({ref:yi,style:(0,nt.Z)((0,nt.Z)({},ti),{},{position:"relative"}),className:Xt},Cu,Yr),_e.createElement(Ee.Z,{onResize:hs},_e.createElement(Wo,{className:"".concat(Tt,"-holder"),style:xu,ref:Dn,onScroll:ll,onMouseEnter:ru},_e.createElement(Do,{prefixCls:Tt,height:Jo,offsetX:cr,offsetY:ys,scrollWidth:Ir,onInnerResize:ui,ref:di,innerProps:Vi,rtl:gt,extra:Ks},Pl))),st&&Jo>hn&&_e.createElement(vi,{ref:zs,prefixCls:Tt,scrollOffset:$i,scrollRange:Jo,rtl:gt,onScroll:va,onStartMove:Ma,onStopMove:or,spinSize:Gs,containerSize:Ea.height,style:Sr==null?void 0:Sr.verticalScrollBar,thumbStyle:Sr==null?void 0:Sr.verticalScrollBarThumb,showScrollBar:ho}),st&&Ir>Ea.width&&_e.createElement(vi,{ref:Os,prefixCls:Tt,scrollOffset:cr,scrollRange:Ir,rtl:gt,onScroll:va,onStartMove:Ma,onStopMove:or,spinSize:Vs,containerSize:Ea.width,horizontal:!0,style:Sr==null?void 0:Sr.horizontalScrollBar,thumbStyle:Sr==null?void 0:Sr.horizontalScrollBarThumb,showScrollBar:ho}))}var vo=_e.forwardRef(yr);vo.displayName="List";var Xi=vo,Gr=Xi,mo=xt(null),aa=xt(null);function ka(Ye,bt,Bt){var Tt=bt||1;return Bt[Ye+Tt]-(Bt[Ye]||0)}function Fs(Ye){var bt=Ye.rowInfo,Bt=Ye.column,Tt=Ye.colIndex,$t=Ye.indent,hn=Ye.index,Pn=Ye.component,Wn=Ye.renderIndex,fi=Ye.record,ti=Ye.style,nr=Ye.className,li=Ye.inverse,Zi=Ye.getHeight,Li=Bt.render,gr=Bt.dataIndex,Ir=Bt.className,co=Bt.width,Wo=ut(aa,["columnsOffset"]),Ht=Wo.columnsOffset,ei=Qt(bt,Bt,Tt,$t,hn),bi=ei.key,Vi=ei.fixedInfo,ni=ei.appendCellNode,Sr=ei.additionalCellProps,xo=Sr.style,ho=Sr.colSpan,Yr=ho===void 0?1:ho,$a=Sr.rowSpan,Go=$a===void 0?1:$a,Qo=Tt-1,ma=ka(Qo,Yr,Ht),ui=Yr>1?co-ma:0,wo=(0,nt.Z)((0,nt.Z)((0,nt.Z)({},xo),ti),{},{flex:"0 0 ".concat(ma,"px"),width:"".concat(ma,"px"),marginRight:ui,pointerEvents:"auto"}),sa=_e.useMemo(function(){return li?Go<=1:Yr===0||Go===0||Go>1},[Go,Yr,li]);sa?wo.visibility="hidden":li&&(wo.height=Zi==null?void 0:Zi(Go));var ke=sa?function(){return null}:Li,Ie={};return(Go===0||Yr===0)&&(Ie.rowSpan=1,Ie.colSpan=1),_e.createElement(yn,(0,pt.Z)({className:Pt()(Ir,nr),ellipsis:Bt.ellipsis,align:Bt.align,scope:Bt.rowScope,component:Pn,prefixCls:bt.prefixCls,key:bi,record:fi,index:hn,renderIndex:Wn,dataIndex:gr,render:ke,shouldCellUpdate:Bt.shouldCellUpdate},Vi,{appendNode:ni,additionalProps:(0,nt.Z)((0,nt.Z)({},Sr),{},{style:wo},Ie)}))}var Kr=Fs,Xl=["data","index","className","rowKey","style","extra","getHeight"],Fo=_e.forwardRef(function(Ye,bt){var Bt=Ye.data,Tt=Ye.index,$t=Ye.className,hn=Ye.rowKey,Pn=Ye.style,Wn=Ye.extra,fi=Ye.getHeight,ti=(0,Xo.Z)(Ye,Xl),nr=Bt.record,li=Bt.indent,Zi=Bt.index,Li=ut(Ce,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),gr=Li.scrollX,Ir=Li.flattenColumns,co=Li.prefixCls,Wo=Li.fixColumn,Ht=Li.componentWidth,ei=ut(mo,["getComponent"]),bi=ei.getComponent,Vi=Ka(nr,hn,Tt,li),ni=bi(["body","row"],"div"),Sr=bi(["body","cell"],"div"),xo=Vi.rowSupportExpand,ho=Vi.expanded,Yr=Vi.rowProps,$a=Vi.expandedRowRender,Go=Vi.expandedRowClassName,Qo;if(xo&&ho){var ma=$a(nr,Tt,li+1,ho),ui=as(Go,nr,Tt,li),wo={};Wo&&(wo={style:(0,mt.Z)({},"--virtual-width","".concat(Ht,"px"))});var sa="".concat(co,"-expanded-row-cell");Qo=_e.createElement(ni,{className:Pt()("".concat(co,"-expanded-row"),"".concat(co,"-expanded-row-level-").concat(li+1),ui)},_e.createElement(yn,{component:Sr,prefixCls:co,className:Pt()(sa,(0,mt.Z)({},"".concat(sa,"-fixed"),Wo)),additionalProps:wo},ma))}var ke=(0,nt.Z)((0,nt.Z)({},Pn),{},{width:gr});Wn&&(ke.position="absolute",ke.pointerEvents="none");var Ie=_e.createElement(ni,(0,pt.Z)({},Yr,ti,{"data-row-key":hn,ref:xo?null:bt,className:Pt()($t,"".concat(co,"-row"),Yr==null?void 0:Yr.className,(0,mt.Z)({},"".concat(co,"-row-extra"),Wn)),style:(0,nt.Z)((0,nt.Z)({},ke),Yr==null?void 0:Yr.style)}),Ir.map(function(st,gt){return _e.createElement(Kr,{key:gt,component:Sr,rowInfo:Vi,column:st,colIndex:gt,indent:li,index:Tt,renderIndex:Zi,record:nr,inverse:Wn,getHeight:fi})}));return xo?_e.createElement("div",{ref:bt},Ie,Qo):Ie}),Da=ge(Fo),jo=Da,yl=_e.forwardRef(function(Ye,bt){var Bt=Ye.data,Tt=Ye.onScroll,$t=ut(Ce,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),hn=$t.flattenColumns,Pn=$t.onColumnResize,Wn=$t.getRowKey,fi=$t.expandedKeys,ti=$t.prefixCls,nr=$t.childrenColumnName,li=$t.scrollX,Zi=$t.direction,Li=ut(mo),gr=Li.sticky,Ir=Li.scrollY,co=Li.listItemHeight,Wo=Li.getComponent,Ht=Li.onScroll,ei=_e.useRef(),bi=xa(Bt,nr,fi,Wn),Vi=_e.useMemo(function(){var Qo=0;return hn.map(function(ma){var ui=ma.width,wo=ma.key;return Qo+=ui,[wo,ui,Qo]})},[hn]),ni=_e.useMemo(function(){return Vi.map(function(Qo){return Qo[2]})},[Vi]);_e.useEffect(function(){Vi.forEach(function(Qo){var ma=(0,Xe.Z)(Qo,2),ui=ma[0],wo=ma[1];Pn(ui,wo)})},[Vi]),_e.useImperativeHandle(bt,function(){var Qo,ma={scrollTo:function(wo){var sa;(sa=ei.current)===null||sa===void 0||sa.scrollTo(wo)},nativeElement:(Qo=ei.current)===null||Qo===void 0?void 0:Qo.nativeElement};return Object.defineProperty(ma,"scrollLeft",{get:function(){var wo;return((wo=ei.current)===null||wo===void 0?void 0:wo.getScrollInfo().x)||0},set:function(wo){var sa;(sa=ei.current)===null||sa===void 0||sa.scrollTo({left:wo})}}),ma});var Sr=function(ma,ui){var wo,sa=(wo=bi[ui])===null||wo===void 0?void 0:wo.record,ke=ma.onCell;if(ke){var Ie,st=ke(sa,ui);return(Ie=st==null?void 0:st.rowSpan)!==null&&Ie!==void 0?Ie:1}return 1},xo=function(ma){var ui=ma.start,wo=ma.end,sa=ma.getSize,ke=ma.offsetY;if(wo<0)return null;for(var Ie=hn.filter(function(Ui){return Sr(Ui,ui)===0}),st=ui,gt=function(zi){if(Ie=Ie.filter(function(cr){return Sr(cr,zi)===0}),!Ie.length)return st=zi,1},Xt=ui;Xt>=0&&!gt(Xt);Xt-=1);for(var vn=hn.filter(function(Ui){return Sr(Ui,wo)!==1}),Dn=wo,di=function(zi){if(vn=vn.filter(function(cr){return Sr(cr,zi)!==1}),!vn.length)return Dn=Math.max(zi-1,wo),1},yi=wo;yi<bi.length&&!di(yi);yi+=1);for(var ai=[],Hi=function(zi){var cr=bi[zi];if(!cr)return 1;hn.some(function(Er){return Sr(Er,zi)>1})&&ai.push(zi)},$i=st;$i<=Dn;$i+=1)Hi($i);var Pr=ai.map(function(Ui){var zi=bi[Ui],cr=Wn(zi.record,Ui),Er=function(Eo){var Po=Ui+Eo-1,Ma=Wn(bi[Po].record,Po),or=sa(cr,Ma);return or.bottom-or.top},To=sa(cr);return _e.createElement(jo,{key:Ui,data:zi,rowKey:cr,index:Ui,style:{top:-ke+To.top},extra:!0,getHeight:Er})});return Pr},ho=_e.useMemo(function(){return{columnsOffset:ni}},[ni]),Yr="".concat(ti,"-tbody"),$a=Wo(["body","wrapper"]),Go={};return gr&&(Go.position="sticky",Go.bottom=0,(0,ht.Z)(gr)==="object"&&gr.offsetScroll&&(Go.bottom=gr.offsetScroll)),_e.createElement(aa.Provider,{value:ho},_e.createElement(Gr,{fullHeight:!1,ref:ei,prefixCls:"".concat(Yr,"-virtual"),styles:{horizontalScrollBar:Go},className:Yr,height:Ir,itemHeight:co||24,data:bi,itemKey:function(ma){return Wn(ma.record)},component:$a,scrollWidth:li,direction:Zi,onVirtualScroll:function(ma){var ui,wo=ma.x;Tt({currentTarget:(ui=ei.current)===null||ui===void 0?void 0:ui.nativeElement,scrollLeft:wo})},onScroll:Ht,extraRender:xo},function(Qo,ma,ui){var wo=Wn(Qo.record,ma);return _e.createElement(jo,{data:Qo,rowKey:wo,index:ma,style:ui.style})}))}),Ls=ge(yl),Rl=Ls,Oc=function(bt,Bt){var Tt=Bt.ref,$t=Bt.onScroll;return _e.createElement(Rl,{ref:Tt,data:bt,onScroll:$t})};function ad(Ye,bt){var Bt=Ye.data,Tt=Ye.columns,$t=Ye.scroll,hn=Ye.sticky,Pn=Ye.prefixCls,Wn=Pn===void 0?Zu:Pn,fi=Ye.className,ti=Ye.listItemHeight,nr=Ye.components,li=Ye.onScroll,Zi=$t||{},Li=Zi.x,gr=Zi.y;typeof Li!="number"&&(Li=1),typeof gr!="number"&&(gr=500);var Ir=Mt(function(Ht,ei){return Nn(nr,Ht)||ei}),co=Mt(li),Wo=_e.useMemo(function(){return{sticky:hn,scrollY:gr,listItemHeight:ti,getComponent:Ir,onScroll:co}},[hn,gr,ti,Ir,co]);return _e.createElement(mo.Provider,{value:Wo},_e.createElement(Ga,(0,pt.Z)({},Ye,{className:Pt()(fi,"".concat(Wn,"-virtual")),scroll:(0,nt.Z)((0,nt.Z)({},$t),{},{x:Li}),components:(0,nt.Z)((0,nt.Z)({},nr),{},{body:Bt!=null&&Bt.length?Oc:void 0}),columns:Tt,internalHooks:le.R,tailor:!0,ref:bt})))}var Cc=_e.forwardRef(ad);function bc(Ye){return se(Cc,Ye)}var uo=bc(),gu=null},62978:function(Rn,$n,be){"use strict";be.d($n,{g:function(){return _e},v:function(){return wt}});var le=be(1413),Xe=be(45987),Lt=be(40830),At=["expandable"],wt="RC_TABLE_INTERNAL_COL_DEFINE";function _e(Ve){var xt=Ve.expandable,ut=(0,Xe.Z)(Ve,At),pt;return"expandable"in Ve?pt=(0,le.Z)((0,le.Z)({},ut),xt):pt=ut,pt.showExpandColumn===!1&&(pt.expandIconColumnIndex=-1),pt}},63295:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return wt}});var le=be(71002),Xe=Symbol.for("react.element"),Lt=Symbol.for("react.transitional.element"),At=Symbol.for("react.fragment");function wt(_e){return _e&&(0,le.Z)(_e)==="object"&&(_e.$$typeof===Xe||_e.$$typeof===Lt)&&_e.type===At}},40830:function(Rn,$n,be){"use strict";var le={},Xe=[],Lt=function(Rt){Xe.push(Rt)};function At(pt,Rt){if(0)var Ot}function wt(pt,Rt){if(0)var Ot}function _e(){le={}}function Ve(pt,Rt,Ot){!Rt&&!le[Ot]&&(pt(!1,Ot),le[Ot]=!0)}function xt(pt,Rt){Ve(At,pt,Rt)}function ut(pt,Rt){Ve(wt,pt,Rt)}xt.preMessage=Lt,xt.resetWarned=_e,xt.noteOnce=ut,$n.ZP=xt},46762:function(Rn,$n){"use strict";var be;var le=Symbol.for("react.element"),Xe=Symbol.for("react.portal"),Lt=Symbol.for("react.fragment"),At=Symbol.for("react.strict_mode"),wt=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),Ve=Symbol.for("react.context"),xt=Symbol.for("react.server_context"),ut=Symbol.for("react.forward_ref"),pt=Symbol.for("react.suspense"),Rt=Symbol.for("react.suspense_list"),Ot=Symbol.for("react.memo"),jt=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ce){if(typeof ce=="object"&&ce!==null){var se=ce.$$typeof;switch(se){case le:switch(ce=ce.type,ce){case Lt:case wt:case At:case pt:case Rt:return ce;default:switch(ce=ce&&ce.$$typeof,ce){case xt:case Ve:case ut:case jt:case Ot:case _e:return ce;default:return se}}case Xe:return se}}}be=Ve,be=_e,be=le,be=ut,be=Lt,be=jt,be=Ot,be=Xe,be=wt,be=At,be=pt,be=Rt,be=function(){return!1},be=function(){return!1},be=function(ce){return te(ce)===Ve},be=function(ce){return te(ce)===_e},be=function(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===le},be=function(ce){return te(ce)===ut},be=function(ce){return te(ce)===Lt},be=function(ce){return te(ce)===jt},be=function(ce){return te(ce)===Ot},be=function(ce){return te(ce)===Xe},be=function(ce){return te(ce)===wt},be=function(ce){return te(ce)===At},be=function(ce){return te(ce)===pt},be=function(ce){return te(ce)===Rt},be=function(ce){return typeof ce=="string"||typeof ce=="function"||ce===Lt||ce===wt||ce===At||ce===pt||ce===Rt||ce===Te||typeof ce=="object"&&ce!==null&&(ce.$$typeof===jt||ce.$$typeof===Ot||ce.$$typeof===_e||ce.$$typeof===Ve||ce.$$typeof===ut||ce.$$typeof===ne||ce.getModuleId!==void 0)},be=te},35110:function(Rn,$n,be){"use strict";be(46762)},86128:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return ye}});var le=be(87462),Xe=be(4942),Lt=be(1413),At=be(97685),wt=be(45987),_e=be(67294),Ve=be(94184),xt=be.n(Ve),ut=be(64217),pt=be(27822),Rt=function(Ce){for(var Re=Ce.prefixCls,We=Ce.level,lt=Ce.isStart,ht=Ce.isEnd,nt="".concat(Re,"-indent-unit"),mt=[],at=0;at<We;at+=1)mt.push(_e.createElement("span",{key:at,className:xt()(nt,(0,Xe.Z)((0,Xe.Z)({},"".concat(nt,"-start"),lt[at]),"".concat(nt,"-end"),ht[at]))}));return _e.createElement("span",{"aria-hidden":"true",className:"".concat(Re,"-indent")},mt)},Ot=_e.memo(Rt),jt=be(35381),Te=be(1089),ne=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],te="open",ce="close",se="---",ge=function(Ce){var Re,We,lt,ht=Ce.eventKey,nt=Ce.className,mt=Ce.style,at=Ce.dragOver,Pt=Ce.dragOverGapTop,Nt=Ce.dragOverGapBottom,Et=Ce.isLeaf,Ln=Ce.isStart,xn=Ce.isEnd,Nn=Ce.expanded,fn=Ce.selected,Qe=Ce.checked,Ke=Ce.halfChecked,Je=Ce.loading,_n=Ce.domRef,Xn=Ce.active,zt=Ce.data,kn=Ce.onMouseMove,bn=Ce.selectable,oi=(0,wt.Z)(Ce,ne),Yt=_e.useContext(pt.k),Mt=_e.useContext(pt.y),_t=_e.useRef(null),mn=_e.useState(!1),rn=(0,At.Z)(mn,2),He=rn[0],Me=rn[1],Fe=!!(Yt.disabled||Ce.disabled||(Re=Mt.nodeDisabled)!==null&&Re!==void 0&&Re.call(Mt,zt)),Oe=_e.useMemo(function(){return!Yt.checkable||Ce.checkable===!1?!1:Yt.checkable},[Yt.checkable,Ce.checkable]),Ue=function(gn){Fe||Yt.onNodeSelect(gn,(0,Te.F)(Ce))},Be=function(gn){Fe||!Oe||Ce.disableCheckbox||Yt.onNodeCheck(gn,(0,Te.F)(Ce),!Qe)},ot=_e.useMemo(function(){return typeof bn=="boolean"?bn:Yt.selectable},[bn,Yt.selectable]),Cn=function(gn){Yt.onNodeClick(gn,(0,Te.F)(Ce)),ot?Ue(gn):Be(gn)},ci=function(gn){Yt.onNodeDoubleClick(gn,(0,Te.F)(Ce))},si=function(gn){Yt.onNodeMouseEnter(gn,(0,Te.F)(Ce))},pn=function(gn){Yt.onNodeMouseLeave(gn,(0,Te.F)(Ce))},qn=function(gn){Yt.onNodeContextMenu(gn,(0,Te.F)(Ce))},en=_e.useMemo(function(){return!!(Yt.draggable&&(!Yt.draggable.nodeDraggable||Yt.draggable.nodeDraggable(zt)))},[Yt.draggable,zt]),wi=function(gn){gn.stopPropagation(),Me(!0),Yt.onNodeDragStart(gn,Ce);try{gn.dataTransfer.setData("text/plain","")}catch(Mn){}},Si=function(gn){gn.preventDefault(),gn.stopPropagation(),Yt.onNodeDragEnter(gn,Ce)},Di=function(gn){gn.preventDefault(),gn.stopPropagation(),Yt.onNodeDragOver(gn,Ce)},Ti=function(gn){gn.stopPropagation(),Yt.onNodeDragLeave(gn,Ce)},ro=function(gn){gn.stopPropagation(),Me(!1),Yt.onNodeDragEnd(gn,Ce)},Zr=function(gn){gn.preventDefault(),gn.stopPropagation(),Me(!1),Yt.onNodeDrop(gn,Ce)},Fi=function(gn){Je||Yt.onNodeExpand(gn,(0,Te.F)(Ce))},mi=_e.useMemo(function(){var on=(0,jt.Z)(Yt.keyEntities,ht)||{},gn=on.children;return!!(gn||[]).length},[Yt.keyEntities,ht]),Co=_e.useMemo(function(){return Et===!1?!1:Et||!Yt.loadData&&!mi||Yt.loadData&&Ce.loaded&&!mi},[Et,Yt.loadData,mi,Ce.loaded]);_e.useEffect(function(){Je||typeof Yt.loadData=="function"&&Nn&&!Co&&!Ce.loaded&&Yt.onNodeLoad((0,Te.F)(Ce))},[Je,Yt.loadData,Yt.onNodeLoad,Nn,Co,Ce]);var jn=_e.useMemo(function(){var on;return(on=Yt.draggable)!==null&&on!==void 0&&on.icon?_e.createElement("span",{className:"".concat(Yt.prefixCls,"-draggable-icon")},Yt.draggable.icon):null},[Yt.draggable]),yn=function(gn){var Mn=Ce.switcherIcon||Yt.switcherIcon;return typeof Mn=="function"?Mn((0,Lt.Z)((0,Lt.Z)({},Ce),{},{isLeaf:gn})):Mn},Jr=function(){if(Co){var gn=yn(!0);return gn!==!1?_e.createElement("span",{className:xt()("".concat(Yt.prefixCls,"-switcher"),"".concat(Yt.prefixCls,"-switcher-noop"))},gn):null}var Mn=yn(!1);return Mn!==!1?_e.createElement("span",{onClick:Fi,className:xt()("".concat(Yt.prefixCls,"-switcher"),"".concat(Yt.prefixCls,"-switcher_").concat(Nn?te:ce))},Mn):null},lo=_e.useMemo(function(){if(!Oe)return null;var on=typeof Oe!="boolean"?Oe:null;return _e.createElement("span",{className:xt()("".concat(Yt.prefixCls,"-checkbox"),(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)({},"".concat(Yt.prefixCls,"-checkbox-checked"),Qe),"".concat(Yt.prefixCls,"-checkbox-indeterminate"),!Qe&&Ke),"".concat(Yt.prefixCls,"-checkbox-disabled"),Fe||Ce.disableCheckbox)),onClick:Be,role:"checkbox","aria-checked":Ke?"mixed":Qe,"aria-disabled":Fe||Ce.disableCheckbox,"aria-label":"Select ".concat(typeof Ce.title=="string"?Ce.title:"tree node")},on)},[Oe,Qe,Ke,Fe,Ce.disableCheckbox,Ce.title]),hr=_e.useMemo(function(){return Co?null:Nn?te:ce},[Co,Nn]),Nr=_e.useMemo(function(){return _e.createElement("span",{className:xt()("".concat(Yt.prefixCls,"-iconEle"),"".concat(Yt.prefixCls,"-icon__").concat(hr||"docu"),(0,Xe.Z)({},"".concat(Yt.prefixCls,"-icon_loading"),Je))})},[Yt.prefixCls,hr,Je]),Xo=_e.useMemo(function(){var on=!!Yt.draggable,gn=!Ce.disabled&&on&&Yt.dragOverNodeKey===ht;return gn?Yt.dropIndicatorRender({dropPosition:Yt.dropPosition,dropLevelOffset:Yt.dropLevelOffset,indent:Yt.indent,prefixCls:Yt.prefixCls,direction:Yt.direction}):null},[Yt.dropPosition,Yt.dropLevelOffset,Yt.indent,Yt.prefixCls,Yt.direction,Yt.draggable,Yt.dragOverNodeKey,Yt.dropIndicatorRender]),ji=_e.useMemo(function(){var on=Ce.title,gn=on===void 0?se:on,Mn="".concat(Yt.prefixCls,"-node-content-wrapper"),In;if(Yt.showIcon){var ii=Ce.icon||Yt.icon;In=ii?_e.createElement("span",{className:xt()("".concat(Yt.prefixCls,"-iconEle"),"".concat(Yt.prefixCls,"-icon__customize"))},typeof ii=="function"?ii(Ce):ii):Nr}else Yt.loadData&&Je&&(In=Nr);var Ci;return typeof gn=="function"?Ci=gn(zt):Yt.titleRender?Ci=Yt.titleRender(zt):Ci=gn,_e.createElement("span",{ref:_t,title:typeof gn=="string"?gn:"",className:xt()(Mn,"".concat(Mn,"-").concat(hr||"normal"),(0,Xe.Z)({},"".concat(Yt.prefixCls,"-node-selected"),!Fe&&(fn||He))),onMouseEnter:si,onMouseLeave:pn,onContextMenu:qn,onClick:Cn,onDoubleClick:ci},In,_e.createElement("span",{className:"".concat(Yt.prefixCls,"-title")},Ci),Xo)},[Yt.prefixCls,Yt.showIcon,Ce,Yt.icon,Nr,Yt.titleRender,zt,hr,si,pn,qn,Cn,ci]),Mi=(0,ut.Z)(oi,{aria:!0,data:!0}),Oi=(0,jt.Z)(Yt.keyEntities,ht)||{},vr=Oi.level,Dr=xn[xn.length-1],Cr=!Fe&&en,En=Yt.draggingNodeKey===ht,Ee=bn!==void 0?{"aria-selected":!!bn}:void 0;return _e.createElement("div",(0,le.Z)({ref:_n,role:"treeitem","aria-expanded":Et?void 0:Nn,className:xt()(nt,"".concat(Yt.prefixCls,"-treenode"),(lt={},(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)(lt,"".concat(Yt.prefixCls,"-treenode-disabled"),Fe),"".concat(Yt.prefixCls,"-treenode-switcher-").concat(Nn?"open":"close"),!Et),"".concat(Yt.prefixCls,"-treenode-checkbox-checked"),Qe),"".concat(Yt.prefixCls,"-treenode-checkbox-indeterminate"),Ke),"".concat(Yt.prefixCls,"-treenode-selected"),fn),"".concat(Yt.prefixCls,"-treenode-loading"),Je),"".concat(Yt.prefixCls,"-treenode-active"),Xn),"".concat(Yt.prefixCls,"-treenode-leaf-last"),Dr),"".concat(Yt.prefixCls,"-treenode-draggable"),en),"dragging",En),(0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)((0,Xe.Z)(lt,"drop-target",Yt.dropTargetKey===ht),"drop-container",Yt.dropContainerKey===ht),"drag-over",!Fe&&at),"drag-over-gap-top",!Fe&&Pt),"drag-over-gap-bottom",!Fe&&Nt),"filter-node",(We=Yt.filterTreeNode)===null||We===void 0?void 0:We.call(Yt,(0,Te.F)(Ce))),"".concat(Yt.prefixCls,"-treenode-leaf"),Co))),style:mt,draggable:Cr,onDragStart:Cr?wi:void 0,onDragEnter:en?Si:void 0,onDragOver:en?Di:void 0,onDragLeave:en?Ti:void 0,onDrop:en?Zr:void 0,onDragEnd:en?ro:void 0,onMouseMove:kn},Ee,Mi),_e.createElement(Ot,{prefixCls:Yt.prefixCls,level:vr,isStart:Ln,isEnd:xn}),jn,Jr(),lo,ji)};ge.isTreeNode=1;var ye=ge},27822:function(Rn,$n,be){"use strict";be.d($n,{k:function(){return Xe},y:function(){return Lt}});var le=be(67294),Xe=le.createContext(null),Lt=le.createContext({})},70593:function(Rn,$n,be){"use strict";be.d($n,{OF:function(){return ht.Z},y6:function(){return ce.y},ZP:function(){return Fe}});var le=be(87462),Xe=be(71002),Lt=be(1413),At=be(74902),wt=be(15671),_e=be(43144),Ve=be(97326),xt=be(60136),ut=be(29388),pt=be(4942),Rt=be(94184),Ot=be.n(Rt),jt=be(15105),Te=be(64217),ne=be(80334),te=be(67294),ce=be(27822),se=function(Ue){var Be=Ue.dropPosition,ot=Ue.dropLevelOffset,Cn=Ue.indent,ci={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Be){case-1:ci.top=0,ci.left=-ot*Cn;break;case 1:ci.bottom=0,ci.left=-ot*Cn;break;case 0:ci.bottom=0,ci.left=Cn;break}return te.createElement("div",{style:ci})},ge=se;function ye(Oe){if(Oe==null)throw new TypeError("Cannot destructure "+Oe)}var we=be(97685),Ce=be(45987),Re=be(8410),We=be(73299),lt=be(62874),ht=be(86128);function nt(Oe,Ue){var Be=te.useState(!1),ot=(0,we.Z)(Be,2),Cn=ot[0],ci=ot[1];(0,Re.Z)(function(){if(Cn)return Oe(),function(){Ue()}},[Cn]),(0,Re.Z)(function(){return ci(!0),function(){ci(!1)}},[])}var mt=nt,at=be(1089),Pt=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Nt=te.forwardRef(function(Oe,Ue){var Be=Oe.className,ot=Oe.style,Cn=Oe.motion,ci=Oe.motionNodes,si=Oe.motionType,pn=Oe.onMotionStart,qn=Oe.onMotionEnd,en=Oe.active,wi=Oe.treeNodeRequiredProps,Si=(0,Ce.Z)(Oe,Pt),Di=te.useState(!0),Ti=(0,we.Z)(Di,2),ro=Ti[0],Zr=Ti[1],Fi=te.useContext(ce.k),mi=Fi.prefixCls,Co=ci&&si!=="hide";(0,Re.Z)(function(){ci&&Co!==ro&&Zr(Co)},[ci]);var jn=function(){ci&&pn()},yn=te.useRef(!1),Jr=function(){ci&&!yn.current&&(yn.current=!0,qn())};mt(jn,Jr);var lo=function(Nr){Co===Nr&&Jr()};return ci?te.createElement(lt.Z,(0,le.Z)({ref:Ue,visible:ro},Cn,{motionAppear:si==="show",onVisibleChanged:lo}),function(hr,Nr){var Xo=hr.className,ji=hr.style;return te.createElement("div",{ref:Nr,className:Ot()("".concat(mi,"-treenode-motion"),Xo),style:ji},ci.map(function(Mi){var Oi=Object.assign({},(ye(Mi.data),Mi.data)),vr=Mi.title,Dr=Mi.key,Cr=Mi.isStart,En=Mi.isEnd;delete Oi.children;var Ee=(0,at.H8)(Dr,wi);return te.createElement(ht.Z,(0,le.Z)({},Oi,Ee,{title:vr,active:en,data:Mi.data,key:Dr,isStart:Cr,isEnd:En}))}))}):te.createElement(ht.Z,(0,le.Z)({domRef:Ue,className:Be,style:ot},Si,{active:en}))}),Et=Nt;function Ln(){var Oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Be=Oe.length,ot=Ue.length;if(Math.abs(Be-ot)!==1)return{add:!1,key:null};function Cn(ci,si){var pn=new Map;ci.forEach(function(en){pn.set(en,!0)});var qn=si.filter(function(en){return!pn.has(en)});return qn.length===1?qn[0]:null}return Be<ot?{add:!0,key:Cn(Oe,Ue)}:{add:!1,key:Cn(Ue,Oe)}}function xn(Oe,Ue,Be){var ot=Oe.findIndex(function(pn){return pn.key===Be}),Cn=Oe[ot+1],ci=Ue.findIndex(function(pn){return pn.key===Be});if(Cn){var si=Ue.findIndex(function(pn){return pn.key===Cn.key});return Ue.slice(ci+1,si)}return Ue.slice(ci+1)}var Nn=["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"],fn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Qe=function(){},Ke="RC_TREE_MOTION_".concat(Math.random()),Je={key:Ke},_n={key:Ke,level:0,index:0,pos:"0",node:Je,nodes:[Je]},Xn={parent:null,children:[],pos:_n.pos,data:Je,title:null,key:Ke,isStart:[],isEnd:[]};function zt(Oe,Ue,Be,ot){return Ue===!1||!Be?Oe:Oe.slice(0,Math.ceil(Be/ot)+1)}function kn(Oe){var Ue=Oe.key,Be=Oe.pos;return(0,at.km)(Ue,Be)}function bn(Oe){for(var Ue=String(Oe.data.key),Be=Oe;Be.parent;)Be=Be.parent,Ue="".concat(Be.data.key," > ").concat(Ue);return Ue}var oi=te.forwardRef(function(Oe,Ue){var Be=Oe.prefixCls,ot=Oe.data,Cn=Oe.selectable,ci=Oe.checkable,si=Oe.expandedKeys,pn=Oe.selectedKeys,qn=Oe.checkedKeys,en=Oe.loadedKeys,wi=Oe.loadingKeys,Si=Oe.halfCheckedKeys,Di=Oe.keyEntities,Ti=Oe.disabled,ro=Oe.dragging,Zr=Oe.dragOverNodeKey,Fi=Oe.dropPosition,mi=Oe.motion,Co=Oe.height,jn=Oe.itemHeight,yn=Oe.virtual,Jr=Oe.scrollWidth,lo=Oe.focusable,hr=Oe.activeItem,Nr=Oe.focused,Xo=Oe.tabIndex,ji=Oe.onKeyDown,Mi=Oe.onFocus,Oi=Oe.onBlur,vr=Oe.onActiveChange,Dr=Oe.onListChangeStart,Cr=Oe.onListChangeEnd,En=(0,Ce.Z)(Oe,Nn),Ee=te.useRef(null),on=te.useRef(null);te.useImperativeHandle(Ue,function(){return{scrollTo:function(xs){Ee.current.scrollTo(xs)},getIndentWidth:function(){return on.current.offsetWidth}}});var gn=te.useState(si),Mn=(0,we.Z)(gn,2),In=Mn[0],ii=Mn[1],Ci=te.useState(ot),Ji=(0,we.Z)(Ci,2),Vt=Ji[0],Zt=Ji[1],It=te.useState(ot),dn=(0,we.Z)(It,2),Ri=dn[0],hi=dn[1],ri=te.useState([]),Kt=(0,we.Z)(ri,2),wn=Kt[0],Ki=Kt[1],wr=te.useState(null),Kn=(0,we.Z)(wr,2),Wt=Kn[0],Yi=Kn[1],pr=te.useRef(ot);pr.current=ot;function Ro(){var Pi=pr.current;Zt(Pi),hi(Pi),Ki([]),Yi(null),Cr()}(0,Re.Z)(function(){ii(si);var Pi=Ln(In,si);if(Pi.key!==null)if(Pi.add){var xs=Vt.findIndex(function(Ka){var _i=Ka.key;return _i===Pi.key}),qa=zt(xn(Vt,ot,Pi.key),yn,Co,jn),Ar=Vt.slice();Ar.splice(xs+1,0,Xn),hi(Ar),Ki(qa),Yi("show")}else{var br=ot.findIndex(function(Ka){var _i=Ka.key;return _i===Pi.key}),Rr=zt(xn(ot,Vt,Pi.key),yn,Co,jn),xa=ot.slice();xa.splice(br+1,0,Xn),hi(xa),Ki(Rr),Yi("hide")}else Vt!==ot&&(Zt(ot),hi(ot))},[si,ot]),te.useEffect(function(){ro||Ro()},[ro]);var Zn=mi?Ri:ot,Ni={expandedKeys:si,selectedKeys:pn,loadedKeys:en,loadingKeys:wi,checkedKeys:qn,halfCheckedKeys:Si,dragOverNodeKey:Zr,dropPosition:Fi,keyEntities:Di};return te.createElement(te.Fragment,null,Nr&&hr&&te.createElement("span",{style:fn,"aria-live":"assertive"},bn(hr)),te.createElement("div",null,te.createElement("input",{style:fn,disabled:lo===!1||Ti,tabIndex:lo!==!1?Xo:null,onKeyDown:ji,onFocus:Mi,onBlur:Oi,value:"",onChange:Qe,"aria-label":"for screen reader"})),te.createElement("div",{className:"".concat(Be,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},te.createElement("div",{className:"".concat(Be,"-indent")},te.createElement("div",{ref:on,className:"".concat(Be,"-indent-unit")}))),te.createElement(We.Z,(0,le.Z)({},En,{data:Zn,itemKey:kn,height:Co,fullHeight:!1,virtual:yn,itemHeight:jn,scrollWidth:Jr,prefixCls:"".concat(Be,"-list"),ref:Ee,role:"tree",onVisibleChange:function(xs){xs.every(function(qa){return kn(qa)!==Ke})&&Ro()}}),function(Pi){var xs=Pi.pos,qa=Object.assign({},(ye(Pi.data),Pi.data)),Ar=Pi.title,br=Pi.key,Rr=Pi.isStart,xa=Pi.isEnd,Ka=(0,at.km)(br,xs);delete qa.key,delete qa.children;var _i=(0,at.H8)(Ka,Ni);return te.createElement(Et,(0,le.Z)({},qa,_i,{title:Ar,active:!!hr&&br===hr.key,pos:xs,data:Pi.data,isStart:Rr,isEnd:xa,motion:mi,motionNodes:br===Ke?wn:null,motionType:Wt,onMotionStart:Dr,onMotionEnd:Ro,treeNodeRequiredProps:Ni,onMouseMove:function(){vr(null)}}))}))}),Yt=oi,Mt=be(10225),_t=be(17341),mn=be(35381),rn=10,He=function(Oe){(0,xt.Z)(Be,Oe);var Ue=(0,ut.Z)(Be);function Be(){var ot;(0,wt.Z)(this,Be);for(var Cn=arguments.length,ci=new Array(Cn),si=0;si<Cn;si++)ci[si]=arguments[si];return ot=Ue.call.apply(Ue,[this].concat(ci)),(0,pt.Z)((0,Ve.Z)(ot),"destroyed",!1),(0,pt.Z)((0,Ve.Z)(ot),"delayedDragEnterLogic",void 0),(0,pt.Z)((0,Ve.Z)(ot),"loadingRetryTimes",{}),(0,pt.Z)((0,Ve.Z)(ot),"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,at.w$)()}),(0,pt.Z)((0,Ve.Z)(ot),"dragStartMousePosition",null),(0,pt.Z)((0,Ve.Z)(ot),"dragNodeProps",null),(0,pt.Z)((0,Ve.Z)(ot),"currentMouseOverDroppableNodeKey",null),(0,pt.Z)((0,Ve.Z)(ot),"listRef",te.createRef()),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDragStart",function(pn,qn){var en=ot.state,wi=en.expandedKeys,Si=en.keyEntities,Di=ot.props.onDragStart,Ti=qn.eventKey;ot.dragNodeProps=qn,ot.dragStartMousePosition={x:pn.clientX,y:pn.clientY};var ro=(0,Mt._5)(wi,Ti);ot.setState({draggingNodeKey:Ti,dragChildrenKeys:(0,Mt.wA)(Ti,Si),indent:ot.listRef.current.getIndentWidth()}),ot.setExpandedKeys(ro),window.addEventListener("dragend",ot.onWindowDragEnd),Di==null||Di({event:pn,node:(0,at.F)(qn)})}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDragEnter",function(pn,qn){var en=ot.state,wi=en.expandedKeys,Si=en.keyEntities,Di=en.dragChildrenKeys,Ti=en.flattenNodes,ro=en.indent,Zr=ot.props,Fi=Zr.onDragEnter,mi=Zr.onExpand,Co=Zr.allowDrop,jn=Zr.direction,yn=qn.pos,Jr=qn.eventKey;if(ot.currentMouseOverDroppableNodeKey!==Jr&&(ot.currentMouseOverDroppableNodeKey=Jr),!ot.dragNodeProps){ot.resetDragState();return}var lo=(0,Mt.OM)(pn,ot.dragNodeProps,qn,ro,ot.dragStartMousePosition,Co,Ti,Si,wi,jn),hr=lo.dropPosition,Nr=lo.dropLevelOffset,Xo=lo.dropTargetKey,ji=lo.dropContainerKey,Mi=lo.dropTargetPos,Oi=lo.dropAllowed,vr=lo.dragOverNodeKey;if(Di.includes(Xo)||!Oi){ot.resetDragState();return}if(ot.delayedDragEnterLogic||(ot.delayedDragEnterLogic={}),Object.keys(ot.delayedDragEnterLogic).forEach(function(Dr){clearTimeout(ot.delayedDragEnterLogic[Dr])}),ot.dragNodeProps.eventKey!==qn.eventKey&&(pn.persist(),ot.delayedDragEnterLogic[yn]=window.setTimeout(function(){if(ot.state.draggingNodeKey!==null){var Dr=(0,At.Z)(wi),Cr=(0,mn.Z)(Si,qn.eventKey);Cr&&(Cr.children||[]).length&&(Dr=(0,Mt.L0)(wi,qn.eventKey)),ot.props.hasOwnProperty("expandedKeys")||ot.setExpandedKeys(Dr),mi==null||mi(Dr,{node:(0,at.F)(qn),expanded:!0,nativeEvent:pn.nativeEvent})}},800)),ot.dragNodeProps.eventKey===Xo&&Nr===0){ot.resetDragState();return}ot.setState({dragOverNodeKey:vr,dropPosition:hr,dropLevelOffset:Nr,dropTargetKey:Xo,dropContainerKey:ji,dropTargetPos:Mi,dropAllowed:Oi}),Fi==null||Fi({event:pn,node:(0,at.F)(qn),expandedKeys:wi})}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDragOver",function(pn,qn){var en=ot.state,wi=en.dragChildrenKeys,Si=en.flattenNodes,Di=en.keyEntities,Ti=en.expandedKeys,ro=en.indent,Zr=ot.props,Fi=Zr.onDragOver,mi=Zr.allowDrop,Co=Zr.direction;if(ot.dragNodeProps){var jn=(0,Mt.OM)(pn,ot.dragNodeProps,qn,ro,ot.dragStartMousePosition,mi,Si,Di,Ti,Co),yn=jn.dropPosition,Jr=jn.dropLevelOffset,lo=jn.dropTargetKey,hr=jn.dropContainerKey,Nr=jn.dropTargetPos,Xo=jn.dropAllowed,ji=jn.dragOverNodeKey;wi.includes(lo)||!Xo||(ot.dragNodeProps.eventKey===lo&&Jr===0?ot.state.dropPosition===null&&ot.state.dropLevelOffset===null&&ot.state.dropTargetKey===null&&ot.state.dropContainerKey===null&&ot.state.dropTargetPos===null&&ot.state.dropAllowed===!1&&ot.state.dragOverNodeKey===null||ot.resetDragState():yn===ot.state.dropPosition&&Jr===ot.state.dropLevelOffset&&lo===ot.state.dropTargetKey&&hr===ot.state.dropContainerKey&&Nr===ot.state.dropTargetPos&&Xo===ot.state.dropAllowed&&ji===ot.state.dragOverNodeKey||ot.setState({dropPosition:yn,dropLevelOffset:Jr,dropTargetKey:lo,dropContainerKey:hr,dropTargetPos:Nr,dropAllowed:Xo,dragOverNodeKey:ji}),Fi==null||Fi({event:pn,node:(0,at.F)(qn)}))}}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDragLeave",function(pn,qn){ot.currentMouseOverDroppableNodeKey===qn.eventKey&&!pn.currentTarget.contains(pn.relatedTarget)&&(ot.resetDragState(),ot.currentMouseOverDroppableNodeKey=null);var en=ot.props.onDragLeave;en==null||en({event:pn,node:(0,at.F)(qn)})}),(0,pt.Z)((0,Ve.Z)(ot),"onWindowDragEnd",function(pn){ot.onNodeDragEnd(pn,null,!0),window.removeEventListener("dragend",ot.onWindowDragEnd)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDragEnd",function(pn,qn){var en=ot.props.onDragEnd;ot.setState({dragOverNodeKey:null}),ot.cleanDragState(),en==null||en({event:pn,node:(0,at.F)(qn)}),ot.dragNodeProps=null,window.removeEventListener("dragend",ot.onWindowDragEnd)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDrop",function(pn,qn){var en,wi=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Si=ot.state,Di=Si.dragChildrenKeys,Ti=Si.dropPosition,ro=Si.dropTargetKey,Zr=Si.dropTargetPos,Fi=Si.dropAllowed;if(Fi){var mi=ot.props.onDrop;if(ot.setState({dragOverNodeKey:null}),ot.cleanDragState(),ro!==null){var Co=(0,Lt.Z)((0,Lt.Z)({},(0,at.H8)(ro,ot.getTreeNodeRequiredProps())),{},{active:((en=ot.getActiveItem())===null||en===void 0?void 0:en.key)===ro,data:(0,mn.Z)(ot.state.keyEntities,ro).node}),jn=Di.includes(ro);(0,ne.ZP)(!jn,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var yn=(0,Mt.yx)(Zr),Jr={event:pn,node:(0,at.F)(Co),dragNode:ot.dragNodeProps?(0,at.F)(ot.dragNodeProps):null,dragNodesKeys:[ot.dragNodeProps.eventKey].concat(Di),dropToGap:Ti!==0,dropPosition:Ti+Number(yn[yn.length-1])};wi||mi==null||mi(Jr),ot.dragNodeProps=null}}}),(0,pt.Z)((0,Ve.Z)(ot),"cleanDragState",function(){var pn=ot.state.draggingNodeKey;pn!==null&&ot.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),ot.dragStartMousePosition=null,ot.currentMouseOverDroppableNodeKey=null}),(0,pt.Z)((0,Ve.Z)(ot),"triggerExpandActionExpand",function(pn,qn){var en=ot.state,wi=en.expandedKeys,Si=en.flattenNodes,Di=qn.expanded,Ti=qn.key,ro=qn.isLeaf;if(!(ro||pn.shiftKey||pn.metaKey||pn.ctrlKey)){var Zr=Si.filter(function(mi){return mi.key===Ti})[0],Fi=(0,at.F)((0,Lt.Z)((0,Lt.Z)({},(0,at.H8)(Ti,ot.getTreeNodeRequiredProps())),{},{data:Zr.data}));ot.setExpandedKeys(Di?(0,Mt._5)(wi,Ti):(0,Mt.L0)(wi,Ti)),ot.onNodeExpand(pn,Fi)}}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeClick",function(pn,qn){var en=ot.props,wi=en.onClick,Si=en.expandAction;Si==="click"&&ot.triggerExpandActionExpand(pn,qn),wi==null||wi(pn,qn)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeDoubleClick",function(pn,qn){var en=ot.props,wi=en.onDoubleClick,Si=en.expandAction;Si==="doubleClick"&&ot.triggerExpandActionExpand(pn,qn),wi==null||wi(pn,qn)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeSelect",function(pn,qn){var en=ot.state.selectedKeys,wi=ot.state,Si=wi.keyEntities,Di=wi.fieldNames,Ti=ot.props,ro=Ti.onSelect,Zr=Ti.multiple,Fi=qn.selected,mi=qn[Di.key],Co=!Fi;Co?Zr?en=(0,Mt.L0)(en,mi):en=[mi]:en=(0,Mt._5)(en,mi);var jn=en.map(function(yn){var Jr=(0,mn.Z)(Si,yn);return Jr?Jr.node:null}).filter(Boolean);ot.setUncontrolledState({selectedKeys:en}),ro==null||ro(en,{event:"select",selected:Co,node:qn,selectedNodes:jn,nativeEvent:pn.nativeEvent})}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeCheck",function(pn,qn,en){var wi=ot.state,Si=wi.keyEntities,Di=wi.checkedKeys,Ti=wi.halfCheckedKeys,ro=ot.props,Zr=ro.checkStrictly,Fi=ro.onCheck,mi=qn.key,Co,jn={event:"check",node:qn,checked:en,nativeEvent:pn.nativeEvent};if(Zr){var yn=en?(0,Mt.L0)(Di,mi):(0,Mt._5)(Di,mi),Jr=(0,Mt._5)(Ti,mi);Co={checked:yn,halfChecked:Jr},jn.checkedNodes=yn.map(function(Mi){return(0,mn.Z)(Si,Mi)}).filter(Boolean).map(function(Mi){return Mi.node}),ot.setUncontrolledState({checkedKeys:yn})}else{var lo=(0,_t.S)([].concat((0,At.Z)(Di),[mi]),!0,Si),hr=lo.checkedKeys,Nr=lo.halfCheckedKeys;if(!en){var Xo=new Set(hr);Xo.delete(mi);var ji=(0,_t.S)(Array.from(Xo),{checked:!1,halfCheckedKeys:Nr},Si);hr=ji.checkedKeys,Nr=ji.halfCheckedKeys}Co=hr,jn.checkedNodes=[],jn.checkedNodesPositions=[],jn.halfCheckedKeys=Nr,hr.forEach(function(Mi){var Oi=(0,mn.Z)(Si,Mi);if(Oi){var vr=Oi.node,Dr=Oi.pos;jn.checkedNodes.push(vr),jn.checkedNodesPositions.push({node:vr,pos:Dr})}}),ot.setUncontrolledState({checkedKeys:hr},!1,{halfCheckedKeys:Nr})}Fi==null||Fi(Co,jn)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeLoad",function(pn){var qn,en=pn.key,wi=ot.state.keyEntities,Si=(0,mn.Z)(wi,en);if(!(Si!=null&&(qn=Si.children)!==null&&qn!==void 0&&qn.length)){var Di=new Promise(function(Ti,ro){ot.setState(function(Zr){var Fi=Zr.loadedKeys,mi=Fi===void 0?[]:Fi,Co=Zr.loadingKeys,jn=Co===void 0?[]:Co,yn=ot.props,Jr=yn.loadData,lo=yn.onLoad;if(!Jr||mi.includes(en)||jn.includes(en))return null;var hr=Jr(pn);return hr.then(function(){var Nr=ot.state.loadedKeys,Xo=(0,Mt.L0)(Nr,en);lo==null||lo(Xo,{event:"load",node:pn}),ot.setUncontrolledState({loadedKeys:Xo}),ot.setState(function(ji){return{loadingKeys:(0,Mt._5)(ji.loadingKeys,en)}}),Ti()}).catch(function(Nr){if(ot.setState(function(ji){return{loadingKeys:(0,Mt._5)(ji.loadingKeys,en)}}),ot.loadingRetryTimes[en]=(ot.loadingRetryTimes[en]||0)+1,ot.loadingRetryTimes[en]>=rn){var Xo=ot.state.loadedKeys;(0,ne.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),ot.setUncontrolledState({loadedKeys:(0,Mt.L0)(Xo,en)}),Ti()}ro(Nr)}),{loadingKeys:(0,Mt.L0)(jn,en)}})});return Di.catch(function(){}),Di}}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeMouseEnter",function(pn,qn){var en=ot.props.onMouseEnter;en==null||en({event:pn,node:qn})}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeMouseLeave",function(pn,qn){var en=ot.props.onMouseLeave;en==null||en({event:pn,node:qn})}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeContextMenu",function(pn,qn){var en=ot.props.onRightClick;en&&(pn.preventDefault(),en({event:pn,node:qn}))}),(0,pt.Z)((0,Ve.Z)(ot),"onFocus",function(){var pn=ot.props.onFocus;ot.setState({focused:!0});for(var qn=arguments.length,en=new Array(qn),wi=0;wi<qn;wi++)en[wi]=arguments[wi];pn==null||pn.apply(void 0,en)}),(0,pt.Z)((0,Ve.Z)(ot),"onBlur",function(){var pn=ot.props.onBlur;ot.setState({focused:!1}),ot.onActiveChange(null);for(var qn=arguments.length,en=new Array(qn),wi=0;wi<qn;wi++)en[wi]=arguments[wi];pn==null||pn.apply(void 0,en)}),(0,pt.Z)((0,Ve.Z)(ot),"getTreeNodeRequiredProps",function(){var pn=ot.state,qn=pn.expandedKeys,en=pn.selectedKeys,wi=pn.loadedKeys,Si=pn.loadingKeys,Di=pn.checkedKeys,Ti=pn.halfCheckedKeys,ro=pn.dragOverNodeKey,Zr=pn.dropPosition,Fi=pn.keyEntities;return{expandedKeys:qn||[],selectedKeys:en||[],loadedKeys:wi||[],loadingKeys:Si||[],checkedKeys:Di||[],halfCheckedKeys:Ti||[],dragOverNodeKey:ro,dropPosition:Zr,keyEntities:Fi}}),(0,pt.Z)((0,Ve.Z)(ot),"setExpandedKeys",function(pn){var qn=ot.state,en=qn.treeData,wi=qn.fieldNames,Si=(0,at.oH)(en,pn,wi);ot.setUncontrolledState({expandedKeys:pn,flattenNodes:Si},!0)}),(0,pt.Z)((0,Ve.Z)(ot),"onNodeExpand",function(pn,qn){var en=ot.state.expandedKeys,wi=ot.state,Si=wi.listChanging,Di=wi.fieldNames,Ti=ot.props,ro=Ti.onExpand,Zr=Ti.loadData,Fi=qn.expanded,mi=qn[Di.key];if(!Si){var Co=en.includes(mi),jn=!Fi;if((0,ne.ZP)(Fi&&Co||!Fi&&!Co,"Expand state not sync with index check"),en=jn?(0,Mt.L0)(en,mi):(0,Mt._5)(en,mi),ot.setExpandedKeys(en),ro==null||ro(en,{node:qn,expanded:jn,nativeEvent:pn.nativeEvent}),jn&&Zr){var yn=ot.onNodeLoad(qn);yn&&yn.then(function(){var Jr=(0,at.oH)(ot.state.treeData,en,Di);ot.setUncontrolledState({flattenNodes:Jr})}).catch(function(){var Jr=ot.state.expandedKeys,lo=(0,Mt._5)(Jr,mi);ot.setExpandedKeys(lo)})}}}),(0,pt.Z)((0,Ve.Z)(ot),"onListChangeStart",function(){ot.setUncontrolledState({listChanging:!0})}),(0,pt.Z)((0,Ve.Z)(ot),"onListChangeEnd",function(){setTimeout(function(){ot.setUncontrolledState({listChanging:!1})})}),(0,pt.Z)((0,Ve.Z)(ot),"onActiveChange",function(pn){var qn=ot.state.activeKey,en=ot.props,wi=en.onActiveChange,Si=en.itemScrollOffset,Di=Si===void 0?0:Si;qn!==pn&&(ot.setState({activeKey:pn}),pn!==null&&ot.scrollTo({key:pn,offset:Di}),wi==null||wi(pn))}),(0,pt.Z)((0,Ve.Z)(ot),"getActiveItem",function(){var pn=ot.state,qn=pn.activeKey,en=pn.flattenNodes;return qn===null?null:en.find(function(wi){var Si=wi.key;return Si===qn})||null}),(0,pt.Z)((0,Ve.Z)(ot),"offsetActiveKey",function(pn){var qn=ot.state,en=qn.flattenNodes,wi=qn.activeKey,Si=en.findIndex(function(ro){var Zr=ro.key;return Zr===wi});Si===-1&&pn<0&&(Si=en.length),Si=(Si+pn+en.length)%en.length;var Di=en[Si];if(Di){var Ti=Di.key;ot.onActiveChange(Ti)}else ot.onActiveChange(null)}),(0,pt.Z)((0,Ve.Z)(ot),"onKeyDown",function(pn){var qn=ot.state,en=qn.activeKey,wi=qn.expandedKeys,Si=qn.checkedKeys,Di=qn.fieldNames,Ti=ot.props,ro=Ti.onKeyDown,Zr=Ti.checkable,Fi=Ti.selectable;switch(pn.which){case jt.Z.UP:{ot.offsetActiveKey(-1),pn.preventDefault();break}case jt.Z.DOWN:{ot.offsetActiveKey(1),pn.preventDefault();break}}var mi=ot.getActiveItem();if(mi&&mi.data){var Co=ot.getTreeNodeRequiredProps(),jn=mi.data.isLeaf===!1||!!(mi.data[Di.children]||[]).length,yn=(0,at.F)((0,Lt.Z)((0,Lt.Z)({},(0,at.H8)(en,Co)),{},{data:mi.data,active:!0}));switch(pn.which){case jt.Z.LEFT:{jn&&wi.includes(en)?ot.onNodeExpand({},yn):mi.parent&&ot.onActiveChange(mi.parent.key),pn.preventDefault();break}case jt.Z.RIGHT:{jn&&!wi.includes(en)?ot.onNodeExpand({},yn):mi.children&&mi.children.length&&ot.onActiveChange(mi.children[0].key),pn.preventDefault();break}case jt.Z.ENTER:case jt.Z.SPACE:{Zr&&!yn.disabled&&yn.checkable!==!1&&!yn.disableCheckbox?ot.onNodeCheck({},yn,!Si.includes(en)):!Zr&&Fi&&!yn.disabled&&yn.selectable!==!1&&ot.onNodeSelect({},yn);break}}}ro==null||ro(pn)}),(0,pt.Z)((0,Ve.Z)(ot),"setUncontrolledState",function(pn){var qn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,en=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!ot.destroyed){var wi=!1,Si=!0,Di={};Object.keys(pn).forEach(function(Ti){if(ot.props.hasOwnProperty(Ti)){Si=!1;return}wi=!0,Di[Ti]=pn[Ti]}),wi&&(!qn||Si)&&ot.setState((0,Lt.Z)((0,Lt.Z)({},Di),en))}}),(0,pt.Z)((0,Ve.Z)(ot),"scrollTo",function(pn){ot.listRef.current.scrollTo(pn)}),ot}return(0,_e.Z)(Be,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Cn=this.props,ci=Cn.activeKey,si=Cn.itemScrollOffset,pn=si===void 0?0:si;ci!==void 0&&ci!==this.state.activeKey&&(this.setState({activeKey:ci}),ci!==null&&this.scrollTo({key:ci,offset:pn}))}},{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 Cn=this.state,ci=Cn.focused,si=Cn.flattenNodes,pn=Cn.keyEntities,qn=Cn.draggingNodeKey,en=Cn.activeKey,wi=Cn.dropLevelOffset,Si=Cn.dropContainerKey,Di=Cn.dropTargetKey,Ti=Cn.dropPosition,ro=Cn.dragOverNodeKey,Zr=Cn.indent,Fi=this.props,mi=Fi.prefixCls,Co=Fi.className,jn=Fi.style,yn=Fi.showLine,Jr=Fi.focusable,lo=Fi.tabIndex,hr=lo===void 0?0:lo,Nr=Fi.selectable,Xo=Fi.showIcon,ji=Fi.icon,Mi=Fi.switcherIcon,Oi=Fi.draggable,vr=Fi.checkable,Dr=Fi.checkStrictly,Cr=Fi.disabled,En=Fi.motion,Ee=Fi.loadData,on=Fi.filterTreeNode,gn=Fi.height,Mn=Fi.itemHeight,In=Fi.scrollWidth,ii=Fi.virtual,Ci=Fi.titleRender,Ji=Fi.dropIndicatorRender,Vt=Fi.onContextMenu,Zt=Fi.onScroll,It=Fi.direction,dn=Fi.rootClassName,Ri=Fi.rootStyle,hi=(0,Te.Z)(this.props,{aria:!0,data:!0}),ri;Oi&&((0,Xe.Z)(Oi)==="object"?ri=Oi:typeof Oi=="function"?ri={nodeDraggable:Oi}:ri={});var Kt={prefixCls:mi,selectable:Nr,showIcon:Xo,icon:ji,switcherIcon:Mi,draggable:ri,draggingNodeKey:qn,checkable:vr,checkStrictly:Dr,disabled:Cr,keyEntities:pn,dropLevelOffset:wi,dropContainerKey:Si,dropTargetKey:Di,dropPosition:Ti,dragOverNodeKey:ro,indent:Zr,direction:It,dropIndicatorRender:Ji,loadData:Ee,filterTreeNode:on,titleRender:Ci,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(ce.k.Provider,{value:Kt},te.createElement("div",{className:Ot()(mi,Co,dn,(0,pt.Z)((0,pt.Z)((0,pt.Z)({},"".concat(mi,"-show-line"),yn),"".concat(mi,"-focused"),ci),"".concat(mi,"-active-focused"),en!==null)),style:Ri},te.createElement(Yt,(0,le.Z)({ref:this.listRef,prefixCls:mi,style:jn,data:si,disabled:Cr,selectable:Nr,checkable:!!vr,motion:En,dragging:qn!==null,height:gn,itemHeight:Mn,virtual:ii,focusable:Jr,focused:ci,tabIndex:hr,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:Vt,onScroll:Zt,scrollWidth:In},this.getTreeNodeRequiredProps(),hi))))}}],[{key:"getDerivedStateFromProps",value:function(Cn,ci){var si=ci.prevProps,pn={prevProps:Cn};function qn(hr){return!si&&Cn.hasOwnProperty(hr)||si&&si[hr]!==Cn[hr]}var en,wi=ci.fieldNames;if(qn("fieldNames")&&(wi=(0,at.w$)(Cn.fieldNames),pn.fieldNames=wi),qn("treeData")?en=Cn.treeData:qn("children")&&((0,ne.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),en=(0,at.zn)(Cn.children)),en){pn.treeData=en;var Si=(0,at.I8)(en,{fieldNames:wi});pn.keyEntities=(0,Lt.Z)((0,pt.Z)({},Ke,_n),Si.keyEntities)}var Di=pn.keyEntities||ci.keyEntities;if(qn("expandedKeys")||si&&qn("autoExpandParent"))pn.expandedKeys=Cn.autoExpandParent||!si&&Cn.defaultExpandParent?(0,Mt.r7)(Cn.expandedKeys,Di):Cn.expandedKeys;else if(!si&&Cn.defaultExpandAll){var Ti=(0,Lt.Z)({},Di);delete Ti[Ke];var ro=[];Object.keys(Ti).forEach(function(hr){var Nr=Ti[hr];Nr.children&&Nr.children.length&&ro.push(Nr.key)}),pn.expandedKeys=ro}else!si&&Cn.defaultExpandedKeys&&(pn.expandedKeys=Cn.autoExpandParent||Cn.defaultExpandParent?(0,Mt.r7)(Cn.defaultExpandedKeys,Di):Cn.defaultExpandedKeys);if(pn.expandedKeys||delete pn.expandedKeys,en||pn.expandedKeys){var Zr=(0,at.oH)(en||ci.treeData,pn.expandedKeys||ci.expandedKeys,wi);pn.flattenNodes=Zr}if(Cn.selectable&&(qn("selectedKeys")?pn.selectedKeys=(0,Mt.BT)(Cn.selectedKeys,Cn):!si&&Cn.defaultSelectedKeys&&(pn.selectedKeys=(0,Mt.BT)(Cn.defaultSelectedKeys,Cn))),Cn.checkable){var Fi;if(qn("checkedKeys")?Fi=(0,Mt.E6)(Cn.checkedKeys)||{}:!si&&Cn.defaultCheckedKeys?Fi=(0,Mt.E6)(Cn.defaultCheckedKeys)||{}:en&&(Fi=(0,Mt.E6)(Cn.checkedKeys)||{checkedKeys:ci.checkedKeys,halfCheckedKeys:ci.halfCheckedKeys}),Fi){var mi=Fi,Co=mi.checkedKeys,jn=Co===void 0?[]:Co,yn=mi.halfCheckedKeys,Jr=yn===void 0?[]:yn;if(!Cn.checkStrictly){var lo=(0,_t.S)(jn,!0,Di);jn=lo.checkedKeys,Jr=lo.halfCheckedKeys}pn.checkedKeys=jn,pn.halfCheckedKeys=Jr}}return qn("loadedKeys")&&(pn.loadedKeys=Cn.loadedKeys),pn}}]),Be}(te.Component);(0,pt.Z)(He,"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:ge,allowDrop:function(){return!0},expandAction:!1}),(0,pt.Z)(He,"TreeNode",ht.Z);var Me=He,Fe=Me},10225:function(Rn,$n,be){"use strict";be.d($n,{BT:function(){return te},E6:function(){return ge},L0:function(){return pt},OM:function(){return ne},_5:function(){return ut},r7:function(){return ye},wA:function(){return Ot},yx:function(){return Rt}});var le=be(74902),Xe=be(71002),Lt=be(80334),At=be(67294),wt=be(86128),_e=be(35381),Ve=be(1089),xt=null;function ut(we,Ce){if(!we)return[];var Re=we.slice(),We=Re.indexOf(Ce);return We>=0&&Re.splice(We,1),Re}function pt(we,Ce){var Re=(we||[]).slice();return Re.indexOf(Ce)===-1&&Re.push(Ce),Re}function Rt(we){return we.split("-")}function Ot(we,Ce){var Re=[],We=(0,_e.Z)(Ce,we);function lt(){var ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];ht.forEach(function(nt){var mt=nt.key,at=nt.children;Re.push(mt),lt(at)})}return lt(We.children),Re}function jt(we){if(we.parent){var Ce=Rt(we.pos);return Number(Ce[Ce.length-1])===we.parent.children.length-1}return!1}function Te(we){var Ce=Rt(we.pos);return Number(Ce[Ce.length-1])===0}function ne(we,Ce,Re,We,lt,ht,nt,mt,at,Pt){var Nt,Et=we.clientX,Ln=we.clientY,xn=we.target.getBoundingClientRect(),Nn=xn.top,fn=xn.height,Qe=(Pt==="rtl"?-1:1)*(((lt==null?void 0:lt.x)||0)-Et),Ke=(Qe-12)/We,Je=at.filter(function(Fe){var Oe;return(Oe=mt[Fe])===null||Oe===void 0||(Oe=Oe.children)===null||Oe===void 0?void 0:Oe.length}),_n=(0,_e.Z)(mt,Re.eventKey);if(Ln<Nn+fn/2){var Xn=nt.findIndex(function(Fe){return Fe.key===_n.key}),zt=Xn<=0?0:Xn-1,kn=nt[zt].key;_n=(0,_e.Z)(mt,kn)}var bn=_n.key,oi=_n,Yt=_n.key,Mt=0,_t=0;if(!Je.includes(bn))for(var mn=0;mn<Ke&&jt(_n);mn+=1)_n=_n.parent,_t+=1;var rn=Ce.data,He=_n.node,Me=!0;return Te(_n)&&_n.level===0&&Ln<Nn+fn/2&&ht({dragNode:rn,dropNode:He,dropPosition:-1})&&_n.key===Re.eventKey?Mt=-1:(oi.children||[]).length&&Je.includes(Yt)?ht({dragNode:rn,dropNode:He,dropPosition:0})?Mt=0:Me=!1:_t===0?Ke>-1.5?ht({dragNode:rn,dropNode:He,dropPosition:1})?Mt=1:Me=!1:ht({dragNode:rn,dropNode:He,dropPosition:0})?Mt=0:ht({dragNode:rn,dropNode:He,dropPosition:1})?Mt=1:Me=!1:ht({dragNode:rn,dropNode:He,dropPosition:1})?Mt=1:Me=!1,{dropPosition:Mt,dropLevelOffset:_t,dropTargetKey:_n.key,dropTargetPos:_n.pos,dragOverNodeKey:Yt,dropContainerKey:Mt===0?null:((Nt=_n.parent)===null||Nt===void 0?void 0:Nt.key)||null,dropAllowed:Me}}function te(we,Ce){if(we){var Re=Ce.multiple;return Re?we.slice():we.length?[we[0]]:we}}var ce=function(Ce){return Ce};function se(we,Ce){if(!we)return[];var Re=Ce||{},We=Re.processProps,lt=We===void 0?ce:We,ht=Array.isArray(we)?we:[we];return ht.map(function(nt){var mt=nt.children,at=_objectWithoutProperties(nt,xt),Pt=se(mt,Ce);return React.createElement(TreeNode,_extends({key:at.key},lt(at)),Pt)})}function ge(we){if(!we)return null;var Ce;if(Array.isArray(we))Ce={checkedKeys:we,halfCheckedKeys:void 0};else if((0,Xe.Z)(we)==="object")Ce={checkedKeys:we.checked||void 0,halfCheckedKeys:we.halfChecked||void 0};else return(0,Lt.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return Ce}function ye(we,Ce){var Re=new Set;function We(lt){if(!Re.has(lt)){var ht=(0,_e.Z)(Ce,lt);if(ht){Re.add(lt);var nt=ht.parent,mt=ht.node;mt.disabled||nt&&We(nt.key)}}}return(we||[]).forEach(function(lt){We(lt)}),(0,le.Z)(Re)}},17341:function(Rn,$n,be){"use strict";be.d($n,{S:function(){return Ve}});var le=be(80334),Xe=be(35381);function Lt(xt,ut){var pt=new Set;return xt.forEach(function(Rt){ut.has(Rt)||pt.add(Rt)}),pt}function At(xt){var ut=xt||{},pt=ut.disabled,Rt=ut.disableCheckbox,Ot=ut.checkable;return!!(pt||Rt)||Ot===!1}function wt(xt,ut,pt,Rt){for(var Ot=new Set(xt),jt=new Set,Te=0;Te<=pt;Te+=1){var ne=ut.get(Te)||new Set;ne.forEach(function(ge){var ye=ge.key,we=ge.node,Ce=ge.children,Re=Ce===void 0?[]:Ce;Ot.has(ye)&&!Rt(we)&&Re.filter(function(We){return!Rt(We.node)}).forEach(function(We){Ot.add(We.key)})})}for(var te=new Set,ce=pt;ce>=0;ce-=1){var se=ut.get(ce)||new Set;se.forEach(function(ge){var ye=ge.parent,we=ge.node;if(!(Rt(we)||!ge.parent||te.has(ge.parent.key))){if(Rt(ge.parent.node)){te.add(ye.key);return}var Ce=!0,Re=!1;(ye.children||[]).filter(function(We){return!Rt(We.node)}).forEach(function(We){var lt=We.key,ht=Ot.has(lt);Ce&&!ht&&(Ce=!1),!Re&&(ht||jt.has(lt))&&(Re=!0)}),Ce&&Ot.add(ye.key),Re&&jt.add(ye.key),te.add(ye.key)}})}return{checkedKeys:Array.from(Ot),halfCheckedKeys:Array.from(Lt(jt,Ot))}}function _e(xt,ut,pt,Rt,Ot){for(var jt=new Set(xt),Te=new Set(ut),ne=0;ne<=Rt;ne+=1){var te=pt.get(ne)||new Set;te.forEach(function(ye){var we=ye.key,Ce=ye.node,Re=ye.children,We=Re===void 0?[]:Re;!jt.has(we)&&!Te.has(we)&&!Ot(Ce)&&We.filter(function(lt){return!Ot(lt.node)}).forEach(function(lt){jt.delete(lt.key)})})}Te=new Set;for(var ce=new Set,se=Rt;se>=0;se-=1){var ge=pt.get(se)||new Set;ge.forEach(function(ye){var we=ye.parent,Ce=ye.node;if(!(Ot(Ce)||!ye.parent||ce.has(ye.parent.key))){if(Ot(ye.parent.node)){ce.add(we.key);return}var Re=!0,We=!1;(we.children||[]).filter(function(lt){return!Ot(lt.node)}).forEach(function(lt){var ht=lt.key,nt=jt.has(ht);Re&&!nt&&(Re=!1),!We&&(nt||Te.has(ht))&&(We=!0)}),Re||jt.delete(we.key),We&&Te.add(we.key),ce.add(we.key)}})}return{checkedKeys:Array.from(jt),halfCheckedKeys:Array.from(Lt(Te,jt))}}function Ve(xt,ut,pt,Rt){var Ot=[],jt;Rt?jt=Rt:jt=At;var Te=new Set(xt.filter(function(se){var ge=!!(0,Xe.Z)(pt,se);return ge||Ot.push(se),ge})),ne=new Map,te=0;Object.keys(pt).forEach(function(se){var ge=pt[se],ye=ge.level,we=ne.get(ye);we||(we=new Set,ne.set(ye,we)),we.add(ge),te=Math.max(te,ye)}),(0,le.ZP)(!Ot.length,"Tree missing follow keys: ".concat(Ot.slice(0,100).map(function(se){return"'".concat(se,"'")}).join(", ")));var ce;return ut===!0?ce=wt(Te,ne,te,jt):ce=_e(Te,ut.halfCheckedKeys,ne,te,jt),ce}},35381:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return le}});function le(Xe,Lt){return Xe[Lt]}},1089:function(Rn,$n,be){"use strict";be.d($n,{F:function(){return ye},H8:function(){return ge},I8:function(){return se},km:function(){return Ot},oH:function(){return te},w$:function(){return jt},zn:function(){return ne}});var le=be(71002),Xe=be(74902),Lt=be(1413),At=be(45987),wt=be(50344),_e=be(98423),Ve=be(80334),xt=be(35381),ut=["children"];function pt(we,Ce){return"".concat(we,"-").concat(Ce)}function Rt(we){return we&&we.type&&we.type.isTreeNode}function Ot(we,Ce){return we!=null?we:Ce}function jt(we){var Ce=we||{},Re=Ce.title,We=Ce._title,lt=Ce.key,ht=Ce.children,nt=Re||"title";return{title:nt,_title:We||[nt],key:lt||"key",children:ht||"children"}}function Te(we,Ce){var Re=new Map;function We(lt){var ht=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(lt||[]).forEach(function(nt){var mt=nt[Ce.key],at=nt[Ce.children];warning(mt!=null,"Tree node must have a certain key: [".concat(ht).concat(mt,"]"));var Pt=String(mt);warning(!Re.has(Pt)||mt===null||mt===void 0,"Same 'key' exist in the Tree: ".concat(Pt)),Re.set(Pt,!0),We(at,"".concat(ht).concat(Pt," > "))})}We(we)}function ne(we){function Ce(Re){var We=(0,wt.Z)(Re);return We.map(function(lt){if(!Rt(lt))return(0,Ve.ZP)(!lt,"Tree/TreeNode can only accept TreeNode as children."),null;var ht=lt.key,nt=lt.props,mt=nt.children,at=(0,At.Z)(nt,ut),Pt=(0,Lt.Z)({key:ht},at),Nt=Ce(mt);return Nt.length&&(Pt.children=Nt),Pt}).filter(function(lt){return lt})}return Ce(we)}function te(we,Ce,Re){var We=jt(Re),lt=We._title,ht=We.key,nt=We.children,mt=new Set(Ce===!0?[]:Ce),at=[];function Pt(Nt){var Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Nt.map(function(Ln,xn){for(var Nn=pt(Et?Et.pos:"0",xn),fn=Ot(Ln[ht],Nn),Qe,Ke=0;Ke<lt.length;Ke+=1){var Je=lt[Ke];if(Ln[Je]!==void 0){Qe=Ln[Je];break}}var _n=Object.assign((0,_e.Z)(Ln,[].concat((0,Xe.Z)(lt),[ht,nt])),{title:Qe,key:fn,parent:Et,pos:Nn,children:null,data:Ln,isStart:[].concat((0,Xe.Z)(Et?Et.isStart:[]),[xn===0]),isEnd:[].concat((0,Xe.Z)(Et?Et.isEnd:[]),[xn===Nt.length-1])});return at.push(_n),Ce===!0||mt.has(fn)?_n.children=Pt(Ln[nt]||[],_n):_n.children=[],_n})}return Pt(we),at}function ce(we,Ce,Re){var We={};(0,le.Z)(Re)==="object"?We=Re:We={externalGetKey:Re},We=We||{};var lt=We,ht=lt.childrenPropName,nt=lt.externalGetKey,mt=lt.fieldNames,at=jt(mt),Pt=at.key,Nt=at.children,Et=ht||Nt,Ln;nt?typeof nt=="string"?Ln=function(fn){return fn[nt]}:typeof nt=="function"&&(Ln=function(fn){return nt(fn)}):Ln=function(fn,Qe){return Ot(fn[Pt],Qe)};function xn(Nn,fn,Qe,Ke){var Je=Nn?Nn[Et]:we,_n=Nn?pt(Qe.pos,fn):"0",Xn=Nn?[].concat((0,Xe.Z)(Ke),[Nn]):[];if(Nn){var zt=Ln(Nn,_n),kn={node:Nn,index:fn,pos:_n,key:zt,parentPos:Qe.node?Qe.pos:null,level:Qe.level+1,nodes:Xn};Ce(kn)}Je&&Je.forEach(function(bn,oi){xn(bn,oi,{node:Nn,pos:_n,level:Qe?Qe.level+1:-1},Xn)})}xn(null)}function se(we){var Ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Re=Ce.initWrapper,We=Ce.processEntity,lt=Ce.onProcessFinished,ht=Ce.externalGetKey,nt=Ce.childrenPropName,mt=Ce.fieldNames,at=arguments.length>2?arguments[2]:void 0,Pt=ht||at,Nt={},Et={},Ln={posEntities:Nt,keyEntities:Et};return Re&&(Ln=Re(Ln)||Ln),ce(we,function(xn){var Nn=xn.node,fn=xn.index,Qe=xn.pos,Ke=xn.key,Je=xn.parentPos,_n=xn.level,Xn=xn.nodes,zt={node:Nn,nodes:Xn,index:fn,key:Ke,pos:Qe,level:_n},kn=Ot(Ke,Qe);Nt[Qe]=zt,Et[kn]=zt,zt.parent=Nt[Je],zt.parent&&(zt.parent.children=zt.parent.children||[],zt.parent.children.push(zt)),We&&We(zt,Ln)},{externalGetKey:Pt,childrenPropName:nt,fieldNames:mt}),lt&&lt(Ln),Ln}function ge(we,Ce){var Re=Ce.expandedKeys,We=Ce.selectedKeys,lt=Ce.loadedKeys,ht=Ce.loadingKeys,nt=Ce.checkedKeys,mt=Ce.halfCheckedKeys,at=Ce.dragOverNodeKey,Pt=Ce.dropPosition,Nt=Ce.keyEntities,Et=(0,xt.Z)(Nt,we),Ln={eventKey:we,expanded:Re.indexOf(we)!==-1,selected:We.indexOf(we)!==-1,loaded:lt.indexOf(we)!==-1,loading:ht.indexOf(we)!==-1,checked:nt.indexOf(we)!==-1,halfChecked:mt.indexOf(we)!==-1,pos:String(Et?Et.pos:""),dragOver:at===we&&Pt===0,dragOverGapTop:at===we&&Pt===-1,dragOverGapBottom:at===we&&Pt===1};return Ln}function ye(we){var Ce=we.data,Re=we.expanded,We=we.selected,lt=we.checked,ht=we.loaded,nt=we.loading,mt=we.halfChecked,at=we.dragOver,Pt=we.dragOverGapTop,Nt=we.dragOverGapBottom,Et=we.pos,Ln=we.active,xn=we.eventKey,Nn=(0,Lt.Z)((0,Lt.Z)({},Ce),{},{expanded:Re,selected:We,checked:lt,loaded:ht,loading:nt,halfChecked:mt,dragOver:at,dragOverGapTop:Pt,dragOverGapBottom:Nt,pos:Et,active:Ln,key:xn});return"props"in Nn||Object.defineProperty(Nn,"props",{get:function(){return(0,Ve.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),we}}),Nn}},73299:function(Rn,$n,be){"use strict";be.d($n,{Z:function(){return Cr}});var le=be(87462),Xe=be(1413),Lt=be(71002),At=be(97685),wt=be(4942),_e=be(45987),Ve=be(67294),xt=be(73935),ut=be(94184),pt=be.n(ut),Rt=be(48555),Ot=Ve.forwardRef(function(En,Ee){var on=En.height,gn=En.offsetY,Mn=En.offsetX,In=En.children,ii=En.prefixCls,Ci=En.onInnerResize,Ji=En.innerProps,Vt=En.rtl,Zt=En.extra,It={},dn={display:"flex",flexDirection:"column"};if(gn!==void 0){var Ri;It={height:on,position:"relative",overflow:"hidden"},dn=(0,Xe.Z)((0,Xe.Z)({},dn),{},(Ri={transform:"translateY(".concat(gn,"px)")},(0,wt.Z)(Ri,Vt?"marginRight":"marginLeft",-Mn),(0,wt.Z)(Ri,"position","absolute"),(0,wt.Z)(Ri,"left",0),(0,wt.Z)(Ri,"right",0),(0,wt.Z)(Ri,"top",0),Ri))}return Ve.createElement("div",{style:It},Ve.createElement(Rt.Z,{onResize:function(ri){var Kt=ri.offsetHeight;Kt&&Ci&&Ci()}},Ve.createElement("div",(0,le.Z)({style:dn,className:pt()((0,wt.Z)({},"".concat(ii,"-holder-inner"),ii)),ref:Ee},Ji),In,Zt)))});Ot.displayName="Filler";var jt=Ot,Te=function(Ee){return+setTimeout(Ee,16)},ne=function(Ee){return clearTimeout(Ee)};typeof window!="undefined"&&"requestAnimationFrame"in window&&(Te=function(Ee){return window.requestAnimationFrame(Ee)},ne=function(Ee){return window.cancelAnimationFrame(Ee)});var te=0,ce=new Map;function se(En){ce.delete(En)}var ge=function(Ee){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;te+=1;var gn=te;function Mn(In){if(In===0)se(gn),Ee();else{var ii=Te(function(){Mn(In-1)});ce.set(gn,ii)}}return Mn(on),gn};ge.cancel=function(En){var Ee=ce.get(En);return se(Ee),ne(Ee)};var ye=ge;function we(En,Ee){var on="touches"in En?En.touches[0]:En;return on[Ee?"pageX":"pageY"]}var Ce=Ve.forwardRef(function(En,Ee){var on,gn=En.prefixCls,Mn=En.rtl,In=En.scrollOffset,ii=En.scrollRange,Ci=En.onStartMove,Ji=En.onStopMove,Vt=En.onScroll,Zt=En.horizontal,It=En.spinSize,dn=En.containerSize,Ri=En.style,hi=En.thumbStyle,ri=Ve.useState(!1),Kt=(0,At.Z)(ri,2),wn=Kt[0],Ki=Kt[1],wr=Ve.useState(null),Kn=(0,At.Z)(wr,2),Wt=Kn[0],Yi=Kn[1],pr=Ve.useState(null),Ro=(0,At.Z)(pr,2),Zn=Ro[0],Ni=Ro[1],Pi=!Mn,xs=Ve.useRef(),qa=Ve.useRef(),Ar=Ve.useState(!1),br=(0,At.Z)(Ar,2),Rr=br[0],xa=br[1],Ka=Ve.useRef(),_i=function(){clearTimeout(Ka.current),xa(!0),Ka.current=setTimeout(function(){xa(!1)},3e3)},yo=ii-dn||0,zl=dn-It||0,ms=yo>0,as=Ve.useMemo(function(){if(In===0||yo===0)return 0;var ca=In/yo;return ca*zl},[In,yo,zl]),Qt=function(Ya){Ya.stopPropagation(),Ya.preventDefault()},Br=Ve.useRef({top:as,dragging:wn,pageY:Wt,startTop:Zn});Br.current={top:as,dragging:wn,pageY:Wt,startTop:Zn};var ba=function(Ya){Ki(!0),Yi(we(Ya,Zt)),Ni(Br.current.top),Ci(),Ya.stopPropagation(),Ya.preventDefault()};Ve.useEffect(function(){var ca=function(zn){zn.preventDefault()},Ya=xs.current,Un=qa.current;return Ya.addEventListener("touchstart",ca),Un.addEventListener("touchstart",ba),function(){Ya.removeEventListener("touchstart",ca),Un.removeEventListener("touchstart",ba)}},[]);var to=Ve.useRef();to.current=yo;var vs=Ve.useRef();vs.current=zl,Ve.useEffect(function(){if(wn){var ca,Ya=function(zn){var _a=Br.current,Sl=_a.dragging,No=_a.pageY,kl=_a.startTop;if(ye.cancel(ca),Sl){var bs=we(zn,Zt)-No,ja=kl;!Pi&&Zt?ja-=bs:ja+=bs;var es=to.current,fl=vs.current,ps=fl?ja/fl:0,sr=Math.ceil(ps*es);sr=Math.max(sr,0),sr=Math.min(sr,es),ca=ye(function(){Vt(sr,Zt)})}},Un=function(){Ki(!1),Ji()};return window.addEventListener("mousemove",Ya),window.addEventListener("touchmove",Ya),window.addEventListener("mouseup",Un),window.addEventListener("touchend",Un),function(){window.removeEventListener("mousemove",Ya),window.removeEventListener("touchmove",Ya),window.removeEventListener("mouseup",Un),window.removeEventListener("touchend",Un),ye.cancel(ca)}}},[wn]),Ve.useEffect(function(){_i()},[In]),Ve.useImperativeHandle(Ee,function(){return{delayHidden:_i}});var La="".concat(gn,"-scrollbar"),Za={position:"absolute",visibility:Rr&&ms?null:"hidden"},wa={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return Zt?(Za.height=8,Za.left=0,Za.right=0,Za.bottom=0,wa.height="100%",wa.width=It,Pi?wa.left=as:wa.right=as):(Za.width=8,Za.top=0,Za.bottom=0,Pi?Za.right=0:Za.left=0,wa.width="100%",wa.height=It,wa.top=as),Ve.createElement("div",{ref:xs,className:pt()(La,(on={},(0,wt.Z)(on,"".concat(La,"-horizontal"),Zt),(0,wt.Z)(on,"".concat(La,"-vertical"),!Zt),(0,wt.Z)(on,"".concat(La,"-visible"),Rr),on)),style:(0,Xe.Z)((0,Xe.Z)({},Za),Ri),onMouseDown:Qt,onMouseMove:_i},Ve.createElement("div",{ref:qa,className:pt()("".concat(La,"-thumb"),(0,wt.Z)({},"".concat(La,"-thumb-moving"),wn)),style:(0,Xe.Z)((0,Xe.Z)({},wa),hi),onMouseDown:ba}))}),Re=Ce;function We(En){var Ee=En.children,on=En.setRef,gn=Ve.useCallback(function(Mn){on(Mn)},[]);return Ve.cloneElement(Ee,{ref:gn})}function lt(En,Ee,on,gn,Mn,In,ii){var Ci=ii.getKey;return En.slice(Ee,on+1).map(function(Ji,Vt){var Zt=Ee+Vt,It=In(Ji,Zt,{style:{width:gn}}),dn=Ci(Ji);return Ve.createElement(We,{key:dn,setRef:function(hi){return Mn(Ji,hi)}},It)})}function ht(En){return En instanceof HTMLElement||En instanceof SVGElement}function nt(En){return ht(En)?En:En instanceof Ve.Component?xt.findDOMNode(En):null}var mt=be(15671),at=be(43144),Pt=function(){function En(){(0,mt.Z)(this,En),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,at.Z)(En,[{key:"set",value:function(on,gn){this.maps[on]=gn,this.id+=1}},{key:"get",value:function(on){return this.maps[on]}}]),En}(),Nt=Pt;function Et(En,Ee,on){var gn=Ve.useState(0),Mn=(0,At.Z)(gn,2),In=Mn[0],ii=Mn[1],Ci=(0,Ve.useRef)(new Map),Ji=(0,Ve.useRef)(new Nt),Vt=(0,Ve.useRef)();function Zt(){ye.cancel(Vt.current)}function It(){var Ri=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Zt();var hi=function(){Ci.current.forEach(function(Kt,wn){if(Kt&&Kt.offsetParent){var Ki=nt(Kt),wr=Ki.offsetHeight;Ji.current.get(wn)!==wr&&Ji.current.set(wn,Ki.offsetHeight)}}),ii(function(Kt){return Kt+1})};Ri?hi():Vt.current=ye(hi)}function dn(Ri,hi){var ri=En(Ri),Kt=Ci.current.get(ri);hi?(Ci.current.set(ri,hi),It()):Ci.current.delete(ri),!Kt!=!hi&&(hi?Ee==null||Ee(Ri):on==null||on(Ri))}return(0,Ve.useEffect)(function(){return Zt},[]),[dn,It,Ji.current,In]}function Ln(){return!!(typeof window!="undefined"&&window.document&&window.document.createElement)}var xn=Ln()?Ve.useLayoutEffect:Ve.useEffect,Nn=function(Ee,on){var gn=Ve.useRef(!0);xn(function(){return Ee(gn.current)},on),xn(function(){return gn.current=!1,function(){gn.current=!0}},[])},fn=function(Ee,on){Nn(function(gn){if(!gn)return Ee()},on)},Qe=Nn;function Ke(En){var Ee=Ve.useRef();Ee.current=En;var on=Ve.useCallback(function(){for(var gn,Mn=arguments.length,In=new Array(Mn),ii=0;ii<Mn;ii++)In[ii]=arguments[ii];return(gn=Ee.current)===null||gn===void 0?void 0:gn.call.apply(gn,[Ee].concat(In))},[]);return on}function Je(En){var Ee=React.useRef(!1),on=React.useState(En),gn=_slicedToArray(on,2),Mn=gn[0],In=gn[1];React.useEffect(function(){return Ee.current=!1,function(){Ee.current=!0}},[]);function ii(Ci,Ji){Ji&&Ee.current||In(Ci)}return[Mn,ii]}function _n(En){return En!==void 0}function Xn(En,Ee){var on=Ee||{},gn=on.defaultValue,Mn=on.value,In=on.onChange,ii=on.postState,Ci=useState(function(){return _n(Mn)?Mn:_n(gn)?typeof gn=="function"?gn():gn:typeof En=="function"?En():En}),Ji=_slicedToArray(Ci,2),Vt=Ji[0],Zt=Ji[1],It=Mn!==void 0?Mn:Vt,dn=ii?ii(It):It,Ri=useEvent(In),hi=useState([It]),ri=_slicedToArray(hi,2),Kt=ri[0],wn=ri[1];useLayoutUpdateEffect(function(){var wr=Kt[0];Vt!==wr&&Ri(Vt,wr)},[Kt]),useLayoutUpdateEffect(function(){_n(Mn)||Zt(Mn)},[Mn]);var Ki=useEvent(function(wr,Kn){Zt(wr,Kn),wn([It],Kn)});return[dn,Ki]}var zt=be(31461);function kn(En,Ee,on){var gn=React.useRef({});return(!("value"in gn.current)||on(gn.current.condition,Ee))&&(gn.current.value=En(),gn.current.condition=Ee),gn.current.value}function bn(En,Ee){typeof En=="function"?En(Ee):_typeof(En)==="object"&&En&&"current"in En&&(En.current=Ee)}function oi(){for(var En=arguments.length,Ee=new Array(En),on=0;on<En;on++)Ee[on]=arguments[on];var gn=Ee.filter(function(Mn){return Mn});return gn.length<=1?gn[0]:function(Mn){Ee.forEach(function(In){bn(In,Mn)})}}function Yt(){for(var En=arguments.length,Ee=new Array(En),on=0;on<En;on++)Ee[on]=arguments[on];return useMemo(function(){return oi.apply(void 0,Ee)},Ee,function(gn,Mn){return gn.length!==Mn.length||gn.every(function(In,ii){return In!==Mn[ii]})})}function Mt(En){var Ee,on,gn=isMemo(En)?En.type.type:En.type;return!(typeof gn=="function"&&!((Ee=gn.prototype)!==null&&Ee!==void 0&&Ee.render)||typeof En=="function"&&!((on=En.prototype)!==null&&on!==void 0&&on.render))}function _t(En){return!isValidElement(En)||isFragment(En)?!1:Mt(En)}function mn(En,Ee,on,gn){if(!Ee.length)return on;var Mn=_toArray(Ee),In=Mn[0],ii=Mn.slice(1),Ci;return!En&&typeof In=="number"?Ci=[]:Array.isArray(En)?Ci=_toConsumableArray(En):Ci=_objectSpread({},En),gn&&on===void 0&&ii.length===1?delete Ci[In][ii[0]]:Ci[In]=mn(Ci[In],ii,on,gn),Ci}function rn(En,Ee,on){var gn=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Ee.length&&gn&&on===void 0&&!get(En,Ee.slice(0,-1))?En:mn(En,Ee,on,gn)}function He(En){return _typeof(En)==="object"&&En!==null&&Object.getPrototypeOf(En)===Object.prototype}function Me(En){return Array.isArray(En)?[]:{}}var Fe=typeof Reflect=="undefined"?Object.keys:Reflect.ownKeys;function Oe(){for(var En=arguments.length,Ee=new Array(En),on=0;on<En;on++)Ee[on]=arguments[on];var gn=Me(Ee[0]);return Ee.forEach(function(Mn){function In(ii,Ci){var Ji=new Set(Ci),Vt=get(Mn,ii),Zt=Array.isArray(Vt);if(Zt||He(Vt)){if(!Ji.has(Vt)){Ji.add(Vt);var It=get(gn,ii);Zt?gn=rn(gn,ii,[]):(!It||_typeof(It)!=="object")&&(gn=rn(gn,ii,Me(Vt))),Fe(Vt).forEach(function(dn){In([].concat(_toConsumableArray(ii),[dn]),Ji)})}}else gn=rn(gn,ii,Vt)}In([])}),gn}var Ue={},Be=[],ot=function(Ee){Be.push(Ee)};function Cn(En,Ee){if(0)var on}function ci(En,Ee){if(0)var on}function si(){Ue={}}function pn(En,Ee,on){!Ee&&!Ue[on]&&(En(!1,on),Ue[on]=!0)}function qn(En,Ee){pn(Cn,En,Ee)}function en(En,Ee){pn(ci,En,Ee)}qn.preMessage=ot,qn.resetWarned=si,qn.noteOnce=en;var wi=null,Si=10;function Di(En,Ee,on,gn,Mn,In,ii,Ci){var Ji=Ve.useRef(),Vt=Ve.useState(null),Zt=(0,At.Z)(Vt,2),It=Zt[0],dn=Zt[1];return Qe(function(){if(It&&It.times<Si){if(!En.current){dn(function(_i){return(0,Xe.Z)({},_i)});return}In();var Ri=It.targetAlign,hi=It.originAlign,ri=It.index,Kt=It.offset,wn=En.current.clientHeight,Ki=!1,wr=Ri,Kn=null;if(wn){for(var Wt=Ri||hi,Yi=0,pr=0,Ro=0,Zn=Math.min(Ee.length-1,ri),Ni=0;Ni<=Zn;Ni+=1){var Pi=Mn(Ee[Ni]);pr=Yi;var xs=on.get(Pi);Ro=pr+(xs===void 0?gn:xs),Yi=Ro}for(var qa=Wt==="top"?Kt:wn-Kt,Ar=Zn;Ar>=0;Ar-=1){var br=Mn(Ee[Ar]),Rr=on.get(br);if(Rr===void 0){Ki=!0;break}if(qa-=Rr,qa<=0)break}switch(Wt){case"top":Kn=pr-Kt;break;case"bottom":Kn=Ro-wn+Kt;break;default:{var xa=En.current.scrollTop,Ka=xa+wn;pr<xa?wr="top":Ro>Ka&&(wr="bottom")}}Kn!==null&&ii(Kn),Kn!==It.lastTop&&(Ki=!0)}Ki&&dn(function(_i){return(0,Xe.Z)((0,Xe.Z)({},_i),{},{times:_i.times+1,targetAlign:wr,lastTop:Kn})})}},[It,En.current]),function(Ri){if(Ri==null){Ci();return}if(ye.cancel(Ji.current),typeof Ri=="number")ii(Ri);else if(Ri&&(0,Lt.Z)(Ri)==="object"){var hi,ri=Ri.align;"index"in Ri?hi=Ri.index:hi=Ee.findIndex(function(Ki){return Mn(Ki)===Ri.key});var Kt=Ri.offset,wn=Kt===void 0?0:Kt;dn({times:0,index:hi,offset:wn,originAlign:ri})}}}function Ti(En,Ee,on,gn){var Mn=on-En,In=Ee-on,ii=Math.min(Mn,In)*2;if(gn<=ii){var Ci=Math.floor(gn/2);return gn%2?on+Ci+1:on-Ci}return Mn>In?on-(gn-In):on+(gn-Mn)}function ro(En,Ee,on){var gn=En.length,Mn=Ee.length,In,ii;if(gn===0&&Mn===0)return null;gn<Mn?(In=En,ii=Ee):(In=Ee,ii=En);var Ci={__EMPTY_ITEM__:!0};function Ji(hi){return hi!==void 0?on(hi):Ci}for(var Vt=null,Zt=Math.abs(gn-Mn)!==1,It=0;It<ii.length;It+=1){var dn=Ji(In[It]),Ri=Ji(ii[It]);if(dn!==Ri){Vt=It,Zt=Zt||dn!==Ji(ii[It+1]);break}}return Vt===null?null:{index:Vt,multiple:Zt}}function Zr(En,Ee,on){var gn=Ve.useState(En),Mn=(0,At.Z)(gn,2),In=Mn[0],ii=Mn[1],Ci=Ve.useState(null),Ji=(0,At.Z)(Ci,2),Vt=Ji[0],Zt=Ji[1];return Ve.useEffect(function(){var It=ro(In||[],En||[],Ee);(It==null?void 0:It.index)!==void 0&&(on==null||on(It.index),Zt(En[It.index])),ii(En)},[En]),[Vt]}var Fi=(typeof navigator=="undefined"?"undefined":(0,Lt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),mi=Fi,Co=function(En,Ee){var on=(0,Ve.useRef)(!1),gn=(0,Ve.useRef)(null);function Mn(){clearTimeout(gn.current),on.current=!0,gn.current=setTimeout(function(){on.current=!1},50)}var In=(0,Ve.useRef)({top:En,bottom:Ee});return In.current.top=En,In.current.bottom=Ee,function(ii){var Ci=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ji=ii<0&&In.current.top||ii>0&&In.current.bottom;return Ci&&Ji?(clearTimeout(gn.current),on.current=!1):(!Ji||on.current)&&Mn(),!on.current&&Ji}};function jn(En,Ee,on,gn,Mn){var In=(0,Ve.useRef)(0),ii=(0,Ve.useRef)(null),Ci=(0,Ve.useRef)(null),Ji=(0,Ve.useRef)(!1),Vt=Co(Ee,on);function Zt(Kt,wn){ye.cancel(ii.current),In.current+=wn,Ci.current=wn,!Vt(wn)&&(mi||Kt.preventDefault(),ii.current=ye(function(){var Ki=Ji.current?10:1;Mn(In.current*Ki),In.current=0}))}function It(Kt,wn){Mn(wn,!0),mi||Kt.preventDefault()}var dn=(0,Ve.useRef)(null),Ri=(0,Ve.useRef)(null);function hi(Kt){if(En){ye.cancel(Ri.current),Ri.current=ye(function(){dn.current=null},2);var wn=Kt.deltaX,Ki=Kt.deltaY,wr=Kt.shiftKey,Kn=wn,Wt=Ki;(dn.current==="sx"||!dn.current&&wr&&Ki&&!wn)&&(Kn=Ki,Wt=0,dn.current="sx");var Yi=Math.abs(Kn),pr=Math.abs(Wt);dn.current===null&&(dn.current=gn&&Yi>pr?"x":"y"),dn.current==="y"?Zt(Kt,Wt):It(Kt,Kn)}}function ri(Kt){En&&(Ji.current=Kt.detail===Ci.current)}return[hi,ri]}var yn=14/15;function Jr(En,Ee,on){var gn=(0,Ve.useRef)(!1),Mn=(0,Ve.useRef)(0),In=(0,Ve.useRef)(null),ii=(0,Ve.useRef)(null),Ci,Ji=function(dn){if(gn.current){var Ri=Math.ceil(dn.touches[0].pageY),hi=Mn.current-Ri;Mn.current=Ri,on(hi)&&dn.preventDefault(),clearInterval(ii.current),ii.current=setInterval(function(){hi*=yn,(!on(hi,!0)||Math.abs(hi)<=.1)&&clearInterval(ii.current)},16)}},Vt=function(){gn.current=!1,Ci()},Zt=function(dn){Ci(),dn.touches.length===1&&!gn.current&&(gn.current=!0,Mn.current=Math.ceil(dn.touches[0].pageY),In.current=dn.target,In.current.addEventListener("touchmove",Ji),In.current.addEventListener("touchend",Vt))};Ci=function(){In.current&&(In.current.removeEventListener("touchmove",Ji),In.current.removeEventListener("touchend",Vt))},Qe(function(){return En&&Ee.current.addEventListener("touchstart",Zt),function(){var It;(It=Ee.current)===null||It===void 0||It.removeEventListener("touchstart",Zt),Ci(),clearInterval(ii.current)}},[En])}var lo=20;function hr(){var En=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,on=En/Ee*100;return isNaN(on)&&(on=0),on=Math.max(on,lo),on=Math.min(on,En/2),Math.floor(on)}function Nr(En,Ee,on,gn){var Mn=Ve.useMemo(function(){return[new Map,[]]},[En,on.id,gn]),In=(0,At.Z)(Mn,2),ii=In[0],Ci=In[1],Ji=function(Zt){var It=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Zt,dn=ii.get(Zt),Ri=ii.get(It);if(dn===void 0||Ri===void 0)for(var hi=En.length,ri=Ci.length;ri<hi;ri+=1){var Kt,wn=En[ri],Ki=Ee(wn);ii.set(Ki,ri);var wr=(Kt=on.get(Ki))!==null&&Kt!==void 0?Kt:gn;if(Ci[ri]=(Ci[ri-1]||0)+wr,Ki===Zt&&(dn=ri),Ki===It&&(Ri=ri),dn!==void 0&&Ri!==void 0)break}return{top:Ci[dn-1]||0,bottom:Ci[Ri]}};return Ji}var Xo=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],ji=[],Mi={overflowY:"auto",overflowAnchor:"none"};function Oi(En,Ee){var on=En.prefixCls,gn=on===void 0?"rc-virtual-list":on,Mn=En.className,In=En.height,ii=En.itemHeight,Ci=En.fullHeight,Ji=Ci===void 0?!0:Ci,Vt=En.style,Zt=En.data,It=En.children,dn=En.itemKey,Ri=En.virtual,hi=En.direction,ri=En.scrollWidth,Kt=En.component,wn=Kt===void 0?"div":Kt,Ki=En.onScroll,wr=En.onVirtualScroll,Kn=En.onVisibleChange,Wt=En.innerProps,Yi=En.extraRender,pr=En.styles,Ro=(0,_e.Z)(En,Xo),Zn=!!(Ri!==!1&&In&&ii),Ni=Zn&&Zt&&(ii*Zt.length>In||!!ri),Pi=hi==="rtl",xs=pt()(gn,(0,wt.Z)({},"".concat(gn,"-rtl"),Pi),Mn),qa=Zt||ji,Ar=(0,Ve.useRef)(),br=(0,Ve.useRef)(),Rr=(0,Ve.useState)(0),xa=(0,At.Z)(Rr,2),Ka=xa[0],_i=xa[1],yo=(0,Ve.useState)(0),zl=(0,At.Z)(yo,2),ms=zl[0],as=zl[1],Qt=(0,Ve.useState)(!1),Br=(0,At.Z)(Qt,2),ba=Br[0],to=Br[1],vs=function(){to(!0)},La=function(){to(!1)},Za=Ve.useCallback(function(Pa){return typeof dn=="function"?dn(Pa):Pa==null?void 0:Pa[dn]},[dn]),wa={getKey:Za};function ca(Pa){_i(function(Ga){var ts;typeof Pa=="function"?ts=Pa(Ga):ts=Pa;var sl=na(ts);return Ar.current.scrollTop=sl,sl})}var Ya=(0,Ve.useRef)({start:0,end:qa.length}),Un=(0,Ve.useRef)(),js=Zr(qa,Za),zn=(0,At.Z)(js,1),_a=zn[0];Un.current=_a;var Sl=Et(Za,null,null),No=(0,At.Z)(Sl,4),kl=No[0],bs=No[1],ja=No[2],es=No[3],fl=Ve.useMemo(function(){if(!Zn)return{scrollHeight:void 0,start:0,end:qa.length-1,offset:void 0};if(!Ni){var Pa;return{scrollHeight:((Pa=br.current)===null||Pa===void 0?void 0:Pa.offsetHeight)||0,start:0,end:qa.length-1,offset:void 0}}for(var Ga=0,ts,sl,oo,$c=qa.length,Hl=0;Hl<$c;Hl+=1){var iu=qa[Hl],Tc=Za(iu),Pc=ja.get(Tc),fr=Ga+(Pc===void 0?ii:Pc);fr>=Ka&&ts===void 0&&(ts=Hl,sl=Ga),fr>Ka+In&&oo===void 0&&(oo=Hl),Ga=fr}return ts===void 0&&(ts=0,sl=0,oo=Math.ceil(In/ii)),oo===void 0&&(oo=qa.length-1),oo=Math.min(oo+1,qa.length-1),{scrollHeight:Ga,start:ts,end:oo,offset:sl}},[Ni,Zn,Ka,qa,es,In]),ps=fl.scrollHeight,sr=fl.start,tt=fl.end,il=fl.offset;Ya.current.start=sr,Ya.current.end=tt;var ql=Ve.useState({width:0,height:In}),rl=(0,At.Z)(ql,2),Il=rl[0],nu=rl[1],Mu=function(Ga){nu({width:Ga.width||Ga.offsetWidth,height:Ga.height||Ga.offsetHeight})},Au=(0,Ve.useRef)(),Hu=(0,Ve.useRef)(),ws=Ve.useMemo(function(){return hr(Il.width,ri)},[Il.width,ri]),Js=Ve.useMemo(function(){return hr(Il.height,ps)},[Il.height,ps]),Xr=ps-In,no=(0,Ve.useRef)(Xr);no.current=Xr;function na(Pa){var Ga=Pa;return Number.isNaN(no.current)||(Ga=Math.min(Ga,no.current)),Ga=Math.max(Ga,0),Ga}var Fn=Ka<=0,Bo=Ka>=Xr,io=Co(Fn,Bo),Ds=function(){return{x:Pi?-ms:ms,y:Ka}},Ps=(0,Ve.useRef)(Ds()),ol=Ke(function(){if(wr){var Pa=Ds();(Ps.current.x!==Pa.x||Ps.current.y!==Pa.y)&&(wr(Pa),Ps.current=Pa)}});function Al(Pa,Ga){var ts=Pa;Ga?((0,xt.flushSync)(function(){as(ts)}),ol()):ca(ts)}function hu(Pa){var Ga=Pa.currentTarget.scrollTop;Ga!==Ka&&ca(Ga),Ki==null||Ki(Pa),ol()}var eu=function(Ga){var ts=Ga,sl=ri-Il.width;return ts=Math.max(ts,0),ts=Math.min(ts,sl),ts},Eu=Ke(function(Pa,Ga){Ga?((0,xt.flushSync)(function(){as(function(ts){var sl=ts+(Pi?-Pa:Pa);return eu(sl)})}),ol()):ca(function(ts){var sl=ts+Pa;return sl})}),Wu=jn(Zn,Fn,Bo,!!ri,Eu),ln=(0,At.Z)(Wu,2),Gl=ln[0],Uo=ln[1];Jr(Zn,Ar,function(Pa,Ga){return io(Pa,Ga)?!1:(Gl({preventDefault:function(){},deltaY:Pa}),!0)}),Qe(function(){function Pa(ts){Zn&&ts.preventDefault()}var Ga=Ar.current;return Ga.addEventListener("wheel",Gl),Ga.addEventListener("DOMMouseScroll",Uo),Ga.addEventListener("MozMousePixelScroll",Pa),function(){Ga.removeEventListener("wheel",Gl),Ga.removeEventListener("DOMMouseScroll",Uo),Ga.removeEventListener("MozMousePixelScroll",Pa)}},[Zn]),Qe(function(){ri&&as(function(Pa){return eu(Pa)})},[Il.width,ri]);var Zu=function(){var Ga,ts;(Ga=Au.current)===null||Ga===void 0||Ga.delayHidden(),(ts=Hu.current)===null||ts===void 0||ts.delayHidden()},al=Di(Ar,qa,ja,ii,Za,function(){return bs(!0)},ca,Zu);Ve.useImperativeHandle(Ee,function(){return{getScrollInfo:Ds,scrollTo:function(Ga){function ts(sl){return sl&&(0,Lt.Z)(sl)==="object"&&("left"in sl||"top"in sl)}ts(Ga)?(Ga.left!==void 0&&as(eu(Ga.left)),al(Ga.top)):al(Ga)}}}),Qe(function(){if(Kn){var Pa=qa.slice(sr,tt+1);Kn(Pa,qa)}},[sr,tt,qa]);var Su=Nr(qa,Za,ja,ii),Jc=Yi==null?void 0:Yi({start:sr,end:tt,virtual:Ni,offsetX:ms,offsetY:il,rtl:Pi,getSize:Su}),Dc=lt(qa,sr,tt,ri,kl,It,wa),Ws=null;In&&(Ws=(0,Xe.Z)((0,wt.Z)({},Ji?"height":"maxHeight",In),Mi),Zn&&(Ws.overflowY="hidden",ri&&(Ws.overflowX="hidden"),ba&&(Ws.pointerEvents="none")));var Oa={};return Pi&&(Oa.dir="rtl"),Ve.createElement("div",(0,le.Z)({style:(0,Xe.Z)((0,Xe.Z)({},Vt),{},{position:"relative"}),className:xs},Oa,Ro),Ve.createElement(Rt.Z,{onResize:Mu},Ve.createElement(wn,{className:"".concat(gn,"-holder"),style:Ws,ref:Ar,onScroll:hu,onMouseEnter:Zu},Ve.createElement(jt,{prefixCls:gn,height:ps,offsetX:ms,offsetY:il,scrollWidth:ri,onInnerResize:bs,ref:br,innerProps:Wt,rtl:Pi,extra:Jc},Dc))),Ni&&ps>In&&Ve.createElement(Re,{ref:Au,prefixCls:gn,scrollOffset:Ka,scrollRange:ps,rtl:Pi,onScroll:Al,onStartMove:vs,onStopMove:La,spinSize:Js,containerSize:Il.height,style:pr==null?void 0:pr.verticalScrollBar,thumbStyle:pr==null?void 0:pr.verticalScrollBarThumb}),Ni&&ri&&Ve.createElement(Re,{ref:Hu,prefixCls:gn,scrollOffset:ms,scrollRange:ri,rtl:Pi,onScroll:Al,onStartMove:vs,onStopMove:La,spinSize:ws,containerSize:Il.width,horizontal:!0,style:pr==null?void 0:pr.horizontalScrollBar,thumbStyle:pr==null?void 0:pr.horizontalScrollBarThumb}))}var vr=Ve.forwardRef(Oi);vr.displayName="List";var Dr=vr,Cr=Dr},66392:function(Rn,$n){"use strict";var be;var le=Symbol.for("react.element"),Xe=Symbol.for("react.portal"),Lt=Symbol.for("react.fragment"),At=Symbol.for("react.strict_mode"),wt=Symbol.for("react.profiler"),_e=Symbol.for("react.provider"),Ve=Symbol.for("react.context"),xt=Symbol.for("react.server_context"),ut=Symbol.for("react.forward_ref"),pt=Symbol.for("react.suspense"),Rt=Symbol.for("react.suspense_list"),Ot=Symbol.for("react.memo"),jt=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),ne;ne=Symbol.for("react.module.reference");function te(ce){if(typeof ce=="object"&&ce!==null){var se=ce.$$typeof;switch(se){case le:switch(ce=ce.type,ce){case Lt:case wt:case At:case pt:case Rt:return ce;default:switch(ce=ce&&ce.$$typeof,ce){case xt:case Ve:case ut:case jt:case Ot:case _e:return ce;default:return se}}case Xe:return se}}}be=Ve,be=_e,be=le,be=ut,be=Lt,be=jt,be=Ot,be=Xe,be=wt,be=At,be=pt,be=Rt,be=function(){return!1},be=function(){return!1},be=function(ce){return te(ce)===Ve},be=function(ce){return te(ce)===_e},be=function(ce){return typeof ce=="object"&&ce!==null&&ce.$$typeof===le},be=function(ce){return te(ce)===ut},be=function(ce){return te(ce)===Lt},be=function(ce){return te(ce)===jt},be=function(ce){return te(ce)===Ot},be=function(ce){return te(ce)===Xe},be=function(ce){return te(ce)===wt},be=function(ce){return te(ce)===At},be=function(ce){return te(ce)===pt},be=function(ce){return te(ce)===Rt},be=function(ce){return typeof ce=="string"||typeof ce=="function"||ce===Lt||ce===wt||ce===At||ce===pt||ce===Rt||ce===Te||typeof ce=="object"&&ce!==null&&(ce.$$typeof===jt||ce.$$typeof===Ot||ce.$$typeof===_e||ce.$$typeof===Ve||ce.$$typeof===ut||ce.$$typeof===ne||ce.getModuleId!==void 0)},be=te},31461:function(Rn,$n,be){"use strict";be(66392)},66012:function(Rn,$n,be){"use strict";be.d($n,{Z5:function(){return Eg},_l:function(){return rc},bK:function(){return sd}});var le=be(67294),Xe=be(89611);function Lt(ve,xe){ve.prototype=Object.create(xe.prototype),ve.prototype.constructor=ve,(0,Xe.Z)(ve,xe)}var At=be(87462),wt=be(14890),_e=le.createContext(null),Ve=null;function xt(ve){ve()}var ut=xt,pt=function(xe){return ut=xe},Rt=function(){return ut};function Ot(){var ve=Rt(),xe=null,Ae=null;return{clear:function(){xe=null,Ae=null},notify:function(){ve(function(){for(var rt=xe;rt;)rt.callback(),rt=rt.next})},get:function(){for(var rt=[],it=xe;it;)rt.push(it),it=it.next;return rt},subscribe:function(rt){var it=!0,vt=Ae={callback:rt,next:null,prev:Ae};return vt.prev?vt.prev.next=vt:xe=vt,function(){!it||xe===null||(it=!1,vt.next?vt.next.prev=vt.prev:Ae=vt.prev,vt.prev?vt.prev.next=vt.next:xe=vt.next)}}}}var jt={notify:function(){},get:function(){return[]}};function Te(ve,xe){var Ae,je=jt;function rt(an){return qt(),je.subscribe(an)}function it(){je.notify()}function vt(){cn.onStateChange&&cn.onStateChange()}function Ft(){return!!Ae}function qt(){Ae||(Ae=xe?xe.addNestedSub(vt):ve.subscribe(vt),je=Ot())}function Sn(){Ae&&(Ae(),Ae=void 0,je.clear(),je=jt)}var cn={addNestedSub:rt,notifyNestedSubs:it,handleChangeWrapper:vt,isSubscribed:Ft,trySubscribe:qt,tryUnsubscribe:Sn,getListeners:function(){return je}};return cn}var ne=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect;function te(ve){var xe=ve.store,Ae=ve.context,je=ve.children,rt=(0,le.useMemo)(function(){var Ft=Te(xe);return{store:xe,subscription:Ft}},[xe]),it=(0,le.useMemo)(function(){return xe.getState()},[xe]);ne(function(){var Ft=rt.subscription;return Ft.onStateChange=Ft.notifyNestedSubs,Ft.trySubscribe(),it!==xe.getState()&&Ft.notifyNestedSubs(),function(){Ft.tryUnsubscribe(),Ft.onStateChange=null}},[rt,it]);var vt=Ae||_e;return le.createElement(vt.Provider,{value:rt},je)}var ce=te,se=be(63366),ge=be(8679),ye=be.n(ge),we=be(72973),Ce=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],Re=["reactReduxForwardedRef"],We=[],lt=[null,null],ht=function(xe){try{return JSON.stringify(xe)}catch(Ae){return String(xe)}};function nt(ve,xe){var Ae=ve[1];return[xe.payload,Ae+1]}function mt(ve,xe,Ae){ne(function(){return ve.apply(void 0,xe)},Ae)}function at(ve,xe,Ae,je,rt,it,vt){ve.current=je,xe.current=rt,Ae.current=!1,it.current&&(it.current=null,vt())}function Pt(ve,xe,Ae,je,rt,it,vt,Ft,qt,Sn){if(ve){var cn=!1,an=null,nn=function(){if(!cn){var Hr=xe.getState(),eo,So;try{eo=je(Hr,rt.current)}catch(Zo){So=Zo,an=Zo}So||(an=null),eo===it.current?vt.current||qt():(it.current=eo,Ft.current=eo,vt.current=!0,Sn({type:"STORE_UPDATED",payload:{error:So}}))}};Ae.onStateChange=nn,Ae.trySubscribe(),nn();var Bn=function(){if(cn=!0,Ae.tryUnsubscribe(),Ae.onStateChange=null,an)throw an};return Bn}}var Nt=function(){return[null,0]};function Et(ve,xe){xe===void 0&&(xe={});var Ae=xe,je=Ae.getDisplayName,rt=je===void 0?function(Hs){return"ConnectAdvanced("+Hs+")"}:je,it=Ae.methodName,vt=it===void 0?"connectAdvanced":it,Ft=Ae.renderCountProp,qt=Ft===void 0?void 0:Ft,Sn=Ae.shouldHandleStateChanges,cn=Sn===void 0?!0:Sn,an=Ae.storeKey,nn=an===void 0?"store":an,Bn=Ae.withRef,Ei=Bn===void 0?!1:Bn,Hr=Ae.forwardRef,eo=Hr===void 0?!1:Hr,So=Ae.context,Zo=So===void 0?_e:So,ya=(0,se.Z)(Ae,Ce);if(0)var ua;var Ja=Zo;return function(vl){var zu=vl.displayName||vl.name||"Component",dl=rt(zu),Du=(0,At.Z)({},ya,{getDisplayName:rt,methodName:vt,renderCountProp:qt,shouldHandleStateChanges:cn,storeKey:nn,displayName:dl,wrappedComponentName:zu,WrappedComponent:vl}),Mc=ya.pure;function Zc(Pu){return ve(Pu.dispatch,Du)}var Vd=Mc?le.useMemo:function(Pu){return Pu()};function gd(Pu){var sh=(0,le.useMemo)(function(){var bu=Pu.reactReduxForwardedRef,bd=(0,se.Z)(Pu,Re);return[Pu.context,bu,bd]},[Pu]),Tu=sh[0],Ud=sh[1],Nf=sh[2],Kd=(0,le.useMemo)(function(){return Tu&&Tu.Consumer&&(0,we.isContextConsumer)(le.createElement(Tu.Consumer,null))?Tu:Ja},[Tu,Ja]),Ca=(0,le.useContext)(Kd),af=!!Pu.store&&!!Pu.store.getState&&!!Pu.store.dispatch,Ng=!!Ca&&!!Ca.store,Yd=af?Pu.store:Ca.store,Eh=(0,le.useMemo)(function(){return Zc(Yd)},[Yd]),Hh=(0,le.useMemo)(function(){if(!cn)return lt;var bu=Te(Yd,af?null:Ca.subscription),bd=bu.notifyNestedSubs.bind(bu);return[bu,bd]},[Yd,af,Ca]),ud=Hh[0],rg=Hh[1],og=(0,le.useMemo)(function(){return af?Ca:(0,At.Z)({},Ca,{subscription:ud})},[af,Ca,ud]),op=(0,le.useReducer)(nt,We,Nt),Wp=op[0],Bg=Wp[0],Bf=op[1];if(Bg&&Bg.error)throw Bg.error;var ap=(0,le.useRef)(),kg=(0,le.useRef)(Nf),kf=(0,le.useRef)(),Df=(0,le.useRef)(!1),Dg=Vd(function(){return kf.current&&Nf===kg.current?kf.current:Eh(Yd.getState(),Nf)},[Yd,Bg,Nf]);mt(at,[kg,ap,Df,Nf,Dg,kf,rg]),mt(Pt,[cn,Yd,ud,Eh,kg,ap,Df,kf,rg,Bf],[Yd,ud,Eh]);var Ss=(0,le.useMemo)(function(){return le.createElement(vl,(0,At.Z)({},Dg,{ref:Ud}))},[Ud,vl,Dg]),Vc=(0,le.useMemo)(function(){return cn?le.createElement(Kd.Provider,{value:og},Ss):Ss},[Kd,Ss,og]);return Vc}var ld=Mc?le.memo(gd):gd;if(ld.WrappedComponent=vl,ld.displayName=gd.displayName=dl,eo){var ac=le.forwardRef(function(sh,Tu){return le.createElement(ld,(0,At.Z)({},sh,{reactReduxForwardedRef:Tu}))});return ac.displayName=dl,ac.WrappedComponent=vl,ye()(ac,vl)}return ye()(ld,vl)}}function Ln(ve,xe){return ve===xe?ve!==0||xe!==0||1/ve===1/xe:ve!==ve&&xe!==xe}function xn(ve,xe){if(Ln(ve,xe))return!0;if(typeof ve!="object"||ve===null||typeof xe!="object"||xe===null)return!1;var Ae=Object.keys(ve),je=Object.keys(xe);if(Ae.length!==je.length)return!1;for(var rt=0;rt<Ae.length;rt++)if(!Object.prototype.hasOwnProperty.call(xe,Ae[rt])||!Ln(ve[Ae[rt]],xe[Ae[rt]]))return!1;return!0}function Nn(ve,xe){var Ae={},je=function(vt){var Ft=ve[vt];typeof Ft=="function"&&(Ae[vt]=function(){return xe(Ft.apply(void 0,arguments))})};for(var rt in ve)je(rt);return Ae}function fn(ve){return function(Ae,je){var rt=ve(Ae,je);function it(){return rt}return it.dependsOnOwnProps=!1,it}}function Qe(ve){return ve.dependsOnOwnProps!==null&&ve.dependsOnOwnProps!==void 0?!!ve.dependsOnOwnProps:ve.length!==1}function Ke(ve,xe){return function(je,rt){var it=rt.displayName,vt=function(qt,Sn){return vt.dependsOnOwnProps?vt.mapToProps(qt,Sn):vt.mapToProps(qt)};return vt.dependsOnOwnProps=!0,vt.mapToProps=function(qt,Sn){vt.mapToProps=ve,vt.dependsOnOwnProps=Qe(ve);var cn=vt(qt,Sn);return typeof cn=="function"&&(vt.mapToProps=cn,vt.dependsOnOwnProps=Qe(cn),cn=vt(qt,Sn)),cn},vt}}function Je(ve){return typeof ve=="function"?Ke(ve,"mapDispatchToProps"):void 0}function _n(ve){return ve?void 0:fn(function(xe){return{dispatch:xe}})}function Xn(ve){return ve&&typeof ve=="object"?fn(function(xe){return Nn(ve,xe)}):void 0}var zt=[Je,_n,Xn];function kn(ve){return typeof ve=="function"?Ke(ve,"mapStateToProps"):void 0}function bn(ve){return ve?void 0:fn(function(){return{}})}var oi=[kn,bn];function Yt(ve,xe,Ae){return(0,At.Z)({},Ae,ve,xe)}function Mt(ve){return function(Ae,je){var rt=je.displayName,it=je.pure,vt=je.areMergedPropsEqual,Ft=!1,qt;return function(cn,an,nn){var Bn=ve(cn,an,nn);return Ft?(!it||!vt(Bn,qt))&&(qt=Bn):(Ft=!0,qt=Bn),qt}}}function _t(ve){return typeof ve=="function"?Mt(ve):void 0}function mn(ve){return ve?void 0:function(){return Yt}}var rn=[_t,mn],He=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Me(ve,xe,Ae,je){return function(it,vt){return Ae(ve(it,vt),xe(je,vt),vt)}}function Fe(ve,xe,Ae,je,rt){var it=rt.areStatesEqual,vt=rt.areOwnPropsEqual,Ft=rt.areStatePropsEqual,qt=!1,Sn,cn,an,nn,Bn;function Ei(ya,ua){return Sn=ya,cn=ua,an=ve(Sn,cn),nn=xe(je,cn),Bn=Ae(an,nn,cn),qt=!0,Bn}function Hr(){return an=ve(Sn,cn),xe.dependsOnOwnProps&&(nn=xe(je,cn)),Bn=Ae(an,nn,cn),Bn}function eo(){return ve.dependsOnOwnProps&&(an=ve(Sn,cn)),xe.dependsOnOwnProps&&(nn=xe(je,cn)),Bn=Ae(an,nn,cn),Bn}function So(){var ya=ve(Sn,cn),ua=!Ft(ya,an);return an=ya,ua&&(Bn=Ae(an,nn,cn)),Bn}function Zo(ya,ua){var Ja=!vt(ua,cn),Hs=!it(ya,Sn,ua,cn);return Sn=ya,cn=ua,Ja&&Hs?Hr():Ja?eo():Hs?So():Bn}return function(ua,Ja){return qt?Zo(ua,Ja):Ei(ua,Ja)}}function Oe(ve,xe){var Ae=xe.initMapStateToProps,je=xe.initMapDispatchToProps,rt=xe.initMergeProps,it=(0,se.Z)(xe,He),vt=Ae(ve,it),Ft=je(ve,it),qt=rt(ve,it),Sn=it.pure?Fe:Me;return Sn(vt,Ft,qt,ve,it)}var Ue=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function Be(ve,xe,Ae){for(var je=xe.length-1;je>=0;je--){var rt=xe[je](ve);if(rt)return rt}return function(it,vt){throw new Error("Invalid value of type "+typeof ve+" for "+Ae+" argument when connecting component "+vt.wrappedComponentName+".")}}function ot(ve,xe){return ve===xe}function Cn(ve){var xe=ve===void 0?{}:ve,Ae=xe.connectHOC,je=Ae===void 0?Et:Ae,rt=xe.mapStateToPropsFactories,it=rt===void 0?oi:rt,vt=xe.mapDispatchToPropsFactories,Ft=vt===void 0?zt:vt,qt=xe.mergePropsFactories,Sn=qt===void 0?rn:qt,cn=xe.selectorFactory,an=cn===void 0?Oe:cn;return function(Bn,Ei,Hr,eo){eo===void 0&&(eo={});var So=eo,Zo=So.pure,ya=Zo===void 0?!0:Zo,ua=So.areStatesEqual,Ja=ua===void 0?ot:ua,Hs=So.areOwnPropsEqual,vl=Hs===void 0?xn:Hs,zu=So.areStatePropsEqual,dl=zu===void 0?xn:zu,Du=So.areMergedPropsEqual,Mc=Du===void 0?xn:Du,Zc=(0,se.Z)(So,Ue),Vd=Be(Bn,it,"mapStateToProps"),gd=Be(Ei,Ft,"mapDispatchToProps"),ld=Be(Hr,Sn,"mergeProps");return je(an,(0,At.Z)({methodName:"connect",getDisplayName:function(Pu){return"Connect("+Pu+")"},shouldHandleStateChanges:!!Bn,initMapStateToProps:Vd,initMapDispatchToProps:gd,initMergeProps:ld,pure:ya,areStatesEqual:Ja,areOwnPropsEqual:vl,areStatePropsEqual:dl,areMergedPropsEqual:Mc},Zc))}}var ci=Cn();function si(){var ve=useContext(ReactReduxContext);return ve}function pn(ve){ve===void 0&&(ve=ReactReduxContext);var xe=ve===ReactReduxContext?useDefaultReduxContext:function(){return useContext(ve)};return function(){var je=xe(),rt=je.store;return rt}}var qn=null;function en(ve){ve===void 0&&(ve=ReactReduxContext);var xe=ve===ReactReduxContext?useDefaultStore:createStoreHook(ve);return function(){var je=xe();return je.dispatch}}var wi=null,Si=function(xe,Ae){return xe===Ae};function Di(ve,xe,Ae,je){var rt=useReducer(function(Ei){return Ei+1},0),it=rt[1],vt=useMemo(function(){return createSubscription(Ae,je)},[Ae,je]),Ft=useRef(),qt=useRef(),Sn=useRef(),cn=useRef(),an=Ae.getState(),nn;try{if(ve!==qt.current||an!==Sn.current||Ft.current){var Bn=ve(an);cn.current===void 0||!xe(Bn,cn.current)?nn=Bn:nn=cn.current}else nn=cn.current}catch(Ei){throw Ft.current&&(Ei.message+=`
The error may be correlated with this previous error:
`+Ft.current.stack+`
`),Ei}return useIsomorphicLayoutEffect(function(){qt.current=ve,Sn.current=an,cn.current=nn,Ft.current=void 0}),useIsomorphicLayoutEffect(function(){function Ei(){try{var Hr=Ae.getState();if(Hr===Sn.current)return;var eo=qt.current(Hr);if(xe(eo,cn.current))return;cn.current=eo,Sn.current=Hr}catch(So){Ft.current=So}it()}return vt.onStateChange=Ei,vt.trySubscribe(),Ei(),function(){return vt.tryUnsubscribe()}},[Ae,vt]),nn}function Ti(ve){ve===void 0&&(ve=ReactReduxContext);var xe=ve===ReactReduxContext?useDefaultReduxContext:function(){return useContext(ve)};return function(je,rt){rt===void 0&&(rt=Si);var it=xe(),vt=it.store,Ft=it.subscription,qt=Di(je,rt,vt,Ft);return useDebugValue(qt),qt}}var ro=null,Zr=be(73935);pt(Zr.unstable_batchedUpdates);function Fi(ve,xe){if(ve.length!==xe.length)return!1;for(var Ae=0;Ae<ve.length;Ae++)if(ve[Ae]!==xe[Ae])return!1;return!0}function mi(ve,xe){var Ae=(0,le.useState)(function(){return{inputs:xe,result:ve()}})[0],je=(0,le.useRef)(!0),rt=(0,le.useRef)(Ae),it=je.current||!!(xe&&rt.current.inputs&&Fi(xe,rt.current.inputs)),vt=it?rt.current:{inputs:xe,result:ve()};return(0,le.useEffect)(function(){je.current=!1,rt.current=vt},[vt]),vt.result}function Co(ve,xe){return mi(function(){return ve},xe)}var jn=mi,yn=Co,Jr=!0,lo="Invariant failed";function hr(ve,xe){if(!ve){if(Jr)throw new Error(lo);var Ae=typeof xe=="function"?xe():xe,je=Ae?"".concat(lo,": ").concat(Ae):lo;throw new Error(je)}}var Nr=function(xe){var Ae=xe.top,je=xe.right,rt=xe.bottom,it=xe.left,vt=je-it,Ft=rt-Ae,qt={top:Ae,right:je,bottom:rt,left:it,width:vt,height:Ft,x:it,y:Ae,center:{x:(je+it)/2,y:(rt+Ae)/2}};return qt},Xo=function(xe,Ae){return{top:xe.top-Ae.top,left:xe.left-Ae.left,bottom:xe.bottom+Ae.bottom,right:xe.right+Ae.right}},ji=function(xe,Ae){return{top:xe.top+Ae.top,left:xe.left+Ae.left,bottom:xe.bottom-Ae.bottom,right:xe.right-Ae.right}},Mi=function(xe,Ae){return{top:xe.top+Ae.y,left:xe.left+Ae.x,bottom:xe.bottom+Ae.y,right:xe.right+Ae.x}},Oi={top:0,right:0,bottom:0,left:0},vr=function(xe){var Ae=xe.borderBox,je=xe.margin,rt=je===void 0?Oi:je,it=xe.border,vt=it===void 0?Oi:it,Ft=xe.padding,qt=Ft===void 0?Oi:Ft,Sn=Nr(Xo(Ae,rt)),cn=Nr(ji(Ae,vt)),an=Nr(ji(cn,qt));return{marginBox:Sn,borderBox:Nr(Ae),paddingBox:cn,contentBox:an,margin:rt,border:vt,padding:qt}},Dr=function(xe){var Ae=xe.slice(0,-2),je=xe.slice(-2);if(je!=="px")return 0;var rt=Number(Ae);return isNaN(rt)&&hr(!1),rt},Cr=function(){return{x:window.pageXOffset,y:window.pageYOffset}},En=function(xe,Ae){var je=xe.borderBox,rt=xe.border,it=xe.margin,vt=xe.padding,Ft=Mi(je,Ae);return vr({borderBox:Ft,border:rt,margin:it,padding:vt})},Ee=function(xe,Ae){return Ae===void 0&&(Ae=Cr()),En(xe,Ae)},on=function(xe,Ae){var je={top:Dr(Ae.marginTop),right:Dr(Ae.marginRight),bottom:Dr(Ae.marginBottom),left:Dr(Ae.marginLeft)},rt={top:Dr(Ae.paddingTop),right:Dr(Ae.paddingRight),bottom:Dr(Ae.paddingBottom),left:Dr(Ae.paddingLeft)},it={top:Dr(Ae.borderTopWidth),right:Dr(Ae.borderRightWidth),bottom:Dr(Ae.borderBottomWidth),left:Dr(Ae.borderLeftWidth)};return vr({borderBox:xe,margin:je,padding:rt,border:it})},gn=function(xe){var Ae=xe.getBoundingClientRect(),je=window.getComputedStyle(xe);return on(Ae,je)},Mn=Number.isNaN||function(xe){return typeof xe=="number"&&xe!==xe};function In(ve,xe){return!!(ve===xe||Mn(ve)&&Mn(xe))}function ii(ve,xe){if(ve.length!==xe.length)return!1;for(var Ae=0;Ae<ve.length;Ae++)if(!In(ve[Ae],xe[Ae]))return!1;return!0}function Ci(ve,xe){xe===void 0&&(xe=ii);var Ae,je=[],rt,it=!1;function vt(){for(var Ft=[],qt=0;qt<arguments.length;qt++)Ft[qt]=arguments[qt];return it&&Ae===this&&xe(Ft,je)||(rt=ve.apply(this,Ft),it=!0,Ae=this,je=Ft),rt}return vt}var Ji=Ci,Vt=function(xe){var Ae=[],je=null,rt=function(){for(var vt=arguments.length,Ft=new Array(vt),qt=0;qt<vt;qt++)Ft[qt]=arguments[qt];Ae=Ft,!je&&(je=requestAnimationFrame(function(){je=null,xe.apply(void 0,Ae)}))};return rt.cancel=function(){je&&(cancelAnimationFrame(je),je=null)},rt},Zt=Vt,It=!0,dn=/[ \t]{2,}/g,Ri=/^[ \t]*/gm,hi=function(xe){return xe.replace(dn," ").replace(Ri,"").trim()},ri=function(xe){return hi(`
%creact-beautiful-dnd
%c`+hi(xe)+`
%c\u{1F477}\u200D This is a development only message. It will be removed in production builds.
`)},Kt=function(xe){return[ri(xe),"color: #00C584; font-size: 1.2em; font-weight: bold;","line-height: 1.5","color: #723874;"]},wn="__react-beautiful-dnd-disable-dev-warnings";function Ki(ve,xe){var Ae;It||typeof window!="undefined"&&window[wn]||(Ae=console)[ve].apply(Ae,Kt(xe))}var wr=Ki.bind(null,"warn"),Kn=Ki.bind(null,"error");function Wt(){}function Yi(ve,xe){return(0,At.Z)({},ve,{},xe)}function pr(ve,xe,Ae){var je=xe.map(function(rt){var it=Yi(Ae,rt.options);return ve.addEventListener(rt.eventName,rt.fn,it),function(){ve.removeEventListener(rt.eventName,rt.fn,it)}});return function(){je.forEach(function(it){it()})}}var Ro=!0,Zn="Invariant failed";function Ni(ve){this.message=ve}Ni.prototype.toString=function(){return this.message};function Pi(ve,xe){if(!ve)throw Ro?new Ni(Zn):new Ni(Zn+": "+(xe||""))}var xs=function(ve){Lt(xe,ve);function xe(){for(var je,rt=arguments.length,it=new Array(rt),vt=0;vt<rt;vt++)it[vt]=arguments[vt];return je=ve.call.apply(ve,[this].concat(it))||this,je.callbacks=null,je.unbind=Wt,je.onWindowError=function(Ft){var qt=je.getCallbacks();qt.isDragging()&&qt.tryAbort();var Sn=Ft.error;Sn instanceof Ni&&Ft.preventDefault()},je.getCallbacks=function(){if(!je.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return je.callbacks},je.setCallbacks=function(Ft){je.callbacks=Ft},je}var Ae=xe.prototype;return Ae.componentDidMount=function(){this.unbind=pr(window,[{eventName:"error",fn:this.onWindowError}])},Ae.componentWillUnmount=function(){this.unbind()},Ae.componentDidCatch=function(rt){if(rt instanceof Ni){this.setState({});return}throw rt},Ae.render=function(){return this.props.children(this.setCallbacks)},xe}(le.Component),qa=`
Press space bar to start a drag.
When dragging you can use the arrow keys to move the item around and escape to cancel.
Some screen readers may require you to be in focus mode or to use your pass through key
`,Ar=function(xe){return xe+1},br=function(xe){return`
You have lifted an item in position `+Ar(xe.source.index)+`
`},Rr=function(xe,Ae){var je=xe.droppableId===Ae.droppableId,rt=Ar(xe.index),it=Ar(Ae.index);return je?`
You have moved the item from position `+rt+`
to position `+it+`
`:`
You have moved the item from position `+rt+`
in list `+xe.droppableId+`
to list `+Ae.droppableId+`
in position `+it+`
`},xa=function(xe,Ae,je){var rt=Ae.droppableId===je.droppableId;return rt?`
The item `+xe+`
has been combined with `+je.draggableId:`
The item `+xe+`
in list `+Ae.droppableId+`
has been combined with `+je.draggableId+`
in list `+je.droppableId+`
`},Ka=function(xe){var Ae=xe.destination;if(Ae)return Rr(xe.source,Ae);var je=xe.combine;return je?xa(xe.draggableId,xe.source,je):"You are over an area that cannot be dropped on"},_i=function(xe){return`
The item has returned to its starting position
of `+Ar(xe.index)+`
`},yo=function(xe){if(xe.reason==="CANCEL")return`
Movement cancelled.
`+_i(xe.source)+`
`;var Ae=xe.destination,je=xe.combine;return Ae?`
You have dropped the item.
`+Rr(xe.source,Ae)+`
`:je?`
You have dropped the item.
`+xa(xe.draggableId,xe.source,je)+`
`:`
The item has been dropped while not over a drop area.
`+_i(xe.source)+`
`},zl={dragHandleUsageInstructions:qa,onDragStart:br,onDragUpdate:Ka,onDragEnd:yo},ms={x:0,y:0},as=function(xe,Ae){return{x:xe.x+Ae.x,y:xe.y+Ae.y}},Qt=function(xe,Ae){return{x:xe.x-Ae.x,y:xe.y-Ae.y}},Br=function(xe,Ae){return xe.x===Ae.x&&xe.y===Ae.y},ba=function(xe){return{x:xe.x!==0?-xe.x:0,y:xe.y!==0?-xe.y:0}},to=function(xe,Ae,je){var rt;return je===void 0&&(je=0),rt={},rt[xe]=Ae,rt[xe==="x"?"y":"x"]=je,rt},vs=function(xe,Ae){return Math.sqrt(Math.pow(Ae.x-xe.x,2)+Math.pow(Ae.y-xe.y,2))},La=function(xe,Ae){return Math.min.apply(Math,Ae.map(function(je){return vs(xe,je)}))},Za=function(xe){return function(Ae){return{x:xe(Ae.x),y:xe(Ae.y)}}},wa=function(ve,xe){var Ae=Nr({top:Math.max(xe.top,ve.top),right:Math.min(xe.right,ve.right),bottom:Math.min(xe.bottom,ve.bottom),left:Math.max(xe.left,ve.left)});return Ae.width<=0||Ae.height<=0?null:Ae},ca=function(xe,Ae){return{top:xe.top+Ae.y,left:xe.left+Ae.x,bottom:xe.bottom+Ae.y,right:xe.right+Ae.x}},Ya=function(xe){return[{x:xe.left,y:xe.top},{x:xe.right,y:xe.top},{x:xe.left,y:xe.bottom},{x:xe.right,y:xe.bottom}]},Un={top:0,right:0,bottom:0,left:0},js=function(xe,Ae){return Ae?ca(xe,Ae.scroll.diff.displacement):xe},zn=function(xe,Ae,je){if(je&&je.increasedBy){var rt;return(0,At.Z)({},xe,(rt={},rt[Ae.end]=xe[Ae.end]+je.increasedBy[Ae.line],rt))}return xe},_a=function(xe,Ae){return Ae&&Ae.shouldClipSubject?wa(Ae.pageMarginBox,xe):Nr(xe)},Sl=function(ve){var xe=ve.page,Ae=ve.withPlaceholder,je=ve.axis,rt=ve.frame,it=js(xe.marginBox,rt),vt=zn(it,je,Ae),Ft=_a(vt,rt);return{page:xe,withPlaceholder:Ae,active:Ft}},No=function(ve,xe){ve.frame||Pi(!1);var Ae=ve.frame,je=Qt(xe,Ae.scroll.initial),rt=ba(je),it=(0,At.Z)({},Ae,{scroll:{initial:Ae.scroll.initial,current:xe,diff:{value:je,displacement:rt},max:Ae.scroll.max}}),vt=Sl({page:ve.subject.page,withPlaceholder:ve.subject.withPlaceholder,axis:ve.axis,frame:it}),Ft=(0,At.Z)({},ve,{frame:it,subject:vt});return Ft};function kl(ve){return Number.isInteger?Number.isInteger(ve):typeof ve=="number"&&isFinite(ve)&&Math.floor(ve)===ve}function bs(ve){return Object.values?Object.values(ve):Object.keys(ve).map(function(xe){return ve[xe]})}function ja(ve,xe){if(ve.findIndex)return ve.findIndex(xe);for(var Ae=0;Ae<ve.length;Ae++)if(xe(ve[Ae]))return Ae;return-1}function es(ve,xe){if(ve.find)return ve.find(xe);var Ae=ja(ve,xe);if(Ae!==-1)return ve[Ae]}function fl(ve){return Array.prototype.slice.call(ve)}var ps=Ji(function(ve){return ve.reduce(function(xe,Ae){return xe[Ae.descriptor.id]=Ae,xe},{})}),sr=Ji(function(ve){return ve.reduce(function(xe,Ae){return xe[Ae.descriptor.id]=Ae,xe},{})}),tt=Ji(function(ve){return bs(ve)}),il=Ji(function(ve){return bs(ve)}),ql=Ji(function(ve,xe){var Ae=il(xe).filter(function(je){return ve===je.descriptor.droppableId}).sort(function(je,rt){return je.descriptor.index-rt.descriptor.index});return Ae});function rl(ve){return ve.at&&ve.at.type==="REORDER"?ve.at.destination:null}function Il(ve){return ve.at&&ve.at.type==="COMBINE"?ve.at.combine:null}var nu=Ji(function(ve,xe){return xe.filter(function(Ae){return Ae.descriptor.id!==ve.descriptor.id})}),Mu=function(ve){var xe=ve.isMovingForward,Ae=ve.draggable,je=ve.destination,rt=ve.insideDestination,it=ve.previousImpact;if(!je.isCombineEnabled)return null;var vt=rl(it);if(!vt)return null;function Ft(Hr){var eo={type:"COMBINE",combine:{draggableId:Hr,droppableId:je.descriptor.id}};return(0,At.Z)({},it,{at:eo})}var qt=it.displaced.all,Sn=qt.length?qt[0]:null;if(xe)return Sn?Ft(Sn):null;var cn=nu(Ae,rt);if(!Sn){if(!cn.length)return null;var an=cn[cn.length-1];return Ft(an.descriptor.id)}var nn=ja(cn,function(Hr){return Hr.descriptor.id===Sn});nn===-1&&Pi(!1);var Bn=nn-1;if(Bn<0)return null;var Ei=cn[Bn];return Ft(Ei.descriptor.id)},Au=function(ve,xe){return ve.descriptor.droppableId===xe.descriptor.id},Hu={point:ms,value:0},ws={invisible:{},visible:{},all:[]},Js={displaced:ws,displacedBy:Hu,at:null},Xr=function(ve,xe){return function(Ae){return ve<=Ae&&Ae<=xe}},no=function(ve){var xe=Xr(ve.top,ve.bottom),Ae=Xr(ve.left,ve.right);return function(je){var rt=xe(je.top)&&xe(je.bottom)&&Ae(je.left)&&Ae(je.right);if(rt)return!0;var it=xe(je.top)||xe(je.bottom),vt=Ae(je.left)||Ae(je.right),Ft=it&&vt;if(Ft)return!0;var qt=je.top<ve.top&&je.bottom>ve.bottom,Sn=je.left<ve.left&&je.right>ve.right,cn=qt&&Sn;if(cn)return!0;var an=qt&&vt||Sn&&it;return an}},na=function(ve){var xe=Xr(ve.top,ve.bottom),Ae=Xr(ve.left,ve.right);return function(je){var rt=xe(je.top)&&xe(je.bottom)&&Ae(je.left)&&Ae(je.right);return rt}},Fn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Bo={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},io=function(ve){return function(xe){var Ae=Xr(xe.top,xe.bottom),je=Xr(xe.left,xe.right);return function(rt){return ve===Fn?Ae(rt.top)&&Ae(rt.bottom):je(rt.left)&&je(rt.right)}}},Ds=function(xe,Ae){var je=Ae.frame?Ae.frame.scroll.diff.displacement:ms;return ca(xe,je)},Ps=function(xe,Ae,je){return Ae.subject.active?je(Ae.subject.active)(xe):!1},ol=function(xe,Ae,je){return je(Ae)(xe)},Al=function(xe){var Ae=xe.target,je=xe.destination,rt=xe.viewport,it=xe.withDroppableDisplacement,vt=xe.isVisibleThroughFrameFn,Ft=it?Ds(Ae,je):Ae;return Ps(Ft,je,vt)&&ol(Ft,rt,vt)},hu=function(xe){return Al((0,At.Z)({},xe,{isVisibleThroughFrameFn:no}))},eu=function(xe){return Al((0,At.Z)({},xe,{isVisibleThroughFrameFn:na}))},Eu=function(xe){return Al((0,At.Z)({},xe,{isVisibleThroughFrameFn:io(xe.destination.axis)}))},Wu=function(xe,Ae,je){if(typeof je=="boolean")return je;if(!Ae)return!0;var rt=Ae.invisible,it=Ae.visible;if(rt[xe])return!1;var vt=it[xe];return vt?vt.shouldAnimate:!0};function ln(ve,xe){var Ae=ve.page.marginBox,je={top:xe.point.y,right:0,bottom:0,left:xe.point.x};return Nr(Xo(Ae,je))}function Gl(ve){var xe=ve.afterDragging,Ae=ve.destination,je=ve.displacedBy,rt=ve.viewport,it=ve.forceShouldAnimate,vt=ve.last;return xe.reduce(function(qt,Sn){var cn=ln(Sn,je),an=Sn.descriptor.id;qt.all.push(an);var nn=hu({target:cn,destination:Ae,viewport:rt,withDroppableDisplacement:!0});if(!nn)return qt.invisible[Sn.descriptor.id]=!0,qt;var Bn=Wu(an,vt,it),Ei={draggableId:an,shouldAnimate:Bn};return qt.visible[an]=Ei,qt},{all:[],visible:{},invisible:{}})}function Uo(ve,xe){if(!ve.length)return 0;var Ae=ve[ve.length-1].descriptor.index;return xe.inHomeList?Ae:Ae+1}function Zu(ve){var xe=ve.insideDestination,Ae=ve.inHomeList,je=ve.displacedBy,rt=ve.destination,it=Uo(xe,{inHomeList:Ae});return{displaced:ws,displacedBy:je,at:{type:"REORDER",destination:{droppableId:rt.descriptor.id,index:it}}}}function al(ve){var xe=ve.draggable,Ae=ve.insideDestination,je=ve.destination,rt=ve.viewport,it=ve.displacedBy,vt=ve.last,Ft=ve.index,qt=ve.forceShouldAnimate,Sn=Au(xe,je);if(Ft==null)return Zu({insideDestination:Ae,inHomeList:Sn,displacedBy:it,destination:je});var cn=es(Ae,function(Hr){return Hr.descriptor.index===Ft});if(!cn)return Zu({insideDestination:Ae,inHomeList:Sn,displacedBy:it,destination:je});var an=nu(xe,Ae),nn=Ae.indexOf(cn),Bn=an.slice(nn),Ei=Gl({afterDragging:Bn,destination:je,displacedBy:it,last:vt,viewport:rt.frame,forceShouldAnimate:qt});return{displaced:Ei,displacedBy:it,at:{type:"REORDER",destination:{droppableId:je.descriptor.id,index:Ft}}}}function Su(ve,xe){return!!xe.effected[ve]}var Jc=function(ve){var xe=ve.isMovingForward,Ae=ve.destination,je=ve.draggables,rt=ve.combine,it=ve.afterCritical;if(!Ae.isCombineEnabled)return null;var vt=rt.draggableId,Ft=je[vt],qt=Ft.descriptor.index,Sn=Su(vt,it);return Sn?xe?qt:qt-1:xe?qt+1:qt},Dc=function(ve){var xe=ve.isMovingForward,Ae=ve.isInHomeList,je=ve.insideDestination,rt=ve.location;if(!je.length)return null;var it=rt.index,vt=xe?it+1:it-1,Ft=je[0].descriptor.index,qt=je[je.length-1].descriptor.index,Sn=Ae?qt:qt+1;return vt<Ft||vt>Sn?null:vt},Ws=function(ve){var xe=ve.isMovingForward,Ae=ve.isInHomeList,je=ve.draggable,rt=ve.draggables,it=ve.destination,vt=ve.insideDestination,Ft=ve.previousImpact,qt=ve.viewport,Sn=ve.afterCritical,cn=Ft.at;if(cn||Pi(!1),cn.type==="REORDER"){var an=Dc({isMovingForward:xe,isInHomeList:Ae,location:cn.destination,insideDestination:vt});return an==null?null:al({draggable:je,insideDestination:vt,destination:it,viewport:qt,last:Ft.displaced,displacedBy:Ft.displacedBy,index:an})}var nn=Jc({isMovingForward:xe,destination:it,displaced:Ft.displaced,draggables:rt,combine:cn.combine,afterCritical:Sn});return nn==null?null:al({draggable:je,insideDestination:vt,destination:it,viewport:qt,last:Ft.displaced,displacedBy:Ft.displacedBy,index:nn})},Oa=function(ve){var xe=ve.displaced,Ae=ve.afterCritical,je=ve.combineWith,rt=ve.displacedBy,it=!!(xe.visible[je]||xe.invisible[je]);return Su(je,Ae)?it?ms:ba(rt.point):it?rt.point:ms},Pa=function(ve){var xe=ve.afterCritical,Ae=ve.impact,je=ve.draggables,rt=Il(Ae);rt||Pi(!1);var it=rt.draggableId,vt=je[it].page.borderBox.center,Ft=Oa({displaced:Ae.displaced,afterCritical:xe,combineWith:it,displacedBy:Ae.displacedBy});return as(vt,Ft)},Ga=function(xe,Ae){return Ae.margin[xe.start]+Ae.borderBox[xe.size]/2},ts=function(xe,Ae){return Ae.margin[xe.end]+Ae.borderBox[xe.size]/2},sl=function(xe,Ae,je){return Ae[xe.crossAxisStart]+je.margin[xe.crossAxisStart]+je.borderBox[xe.crossAxisSize]/2},oo=function(xe){var Ae=xe.axis,je=xe.moveRelativeTo,rt=xe.isMoving;return to(Ae.line,je.marginBox[Ae.end]+Ga(Ae,rt),sl(Ae,je.marginBox,rt))},$c=function(xe){var Ae=xe.axis,je=xe.moveRelativeTo,rt=xe.isMoving;return to(Ae.line,je.marginBox[Ae.start]-ts(Ae,rt),sl(Ae,je.marginBox,rt))},Hl=function(xe){var Ae=xe.axis,je=xe.moveInto,rt=xe.isMoving;return to(Ae.line,je.contentBox[Ae.start]+Ga(Ae,rt),sl(Ae,je.contentBox,rt))},iu=function(ve){var xe=ve.impact,Ae=ve.draggable,je=ve.draggables,rt=ve.droppable,it=ve.afterCritical,vt=ql(rt.descriptor.id,je),Ft=Ae.page,qt=rt.axis;if(!vt.length)return Hl({axis:qt,moveInto:rt.page,isMoving:Ft});var Sn=xe.displaced,cn=xe.displacedBy,an=Sn.all[0];if(an){var nn=je[an];if(Su(an,it))return $c({axis:qt,moveRelativeTo:nn.page,isMoving:Ft});var Bn=En(nn.page,cn.point);return $c({axis:qt,moveRelativeTo:Bn,isMoving:Ft})}var Ei=vt[vt.length-1];if(Ei.descriptor.id===Ae.descriptor.id)return Ft.borderBox.center;if(Su(Ei.descriptor.id,it)){var Hr=En(Ei.page,ba(it.displacedBy.point));return oo({axis:qt,moveRelativeTo:Hr,isMoving:Ft})}return oo({axis:qt,moveRelativeTo:Ei.page,isMoving:Ft})},Tc=function(ve,xe){var Ae=ve.frame;return Ae?as(xe,Ae.scroll.diff.displacement):xe},Pc=function(xe){var Ae=xe.impact,je=xe.draggable,rt=xe.droppable,it=xe.draggables,vt=xe.afterCritical,Ft=je.page.borderBox.center,qt=Ae.at;return!rt||!qt?Ft:qt.type==="REORDER"?iu({impact:Ae,draggable:je,draggables:it,droppable:rt,afterCritical:vt}):Pa({impact:Ae,draggables:it,afterCritical:vt})},fr=function(ve){var xe=Pc(ve),Ae=ve.droppable,je=Ae?Tc(Ae,xe):xe;return je},El=function(ve,xe){var Ae=Qt(xe,ve.scroll.initial),je=ba(Ae),rt=Nr({top:xe.y,bottom:xe.y+ve.frame.height,left:xe.x,right:xe.x+ve.frame.width}),it={frame:rt,scroll:{initial:ve.scroll.initial,max:ve.scroll.max,current:xe,diff:{value:Ae,displacement:je}}};return it};function Fl(ve,xe){return ve.map(function(Ae){return xe[Ae]})}function Qu(ve,xe){for(var Ae=0;Ae<xe.length;Ae++){var je=xe[Ae].visible[ve];if(je)return je}return null}var Ec=function(ve){var xe=ve.impact,Ae=ve.viewport,je=ve.destination,rt=ve.draggables,it=ve.maxScrollChange,vt=El(Ae,as(Ae.scroll.current,it)),Ft=je.frame?No(je,as(je.frame.scroll.current,it)):je,qt=xe.displaced,Sn=Gl({afterDragging:Fl(qt.all,rt),destination:je,displacedBy:xe.displacedBy,viewport:vt.frame,last:qt,forceShouldAnimate:!1}),cn=Gl({afterDragging:Fl(qt.all,rt),destination:Ft,displacedBy:xe.displacedBy,viewport:Ae.frame,last:qt,forceShouldAnimate:!1}),an={},nn={},Bn=[qt,Sn,cn];qt.all.forEach(function(Hr){var eo=Qu(Hr,Bn);if(eo){nn[Hr]=eo;return}an[Hr]=!0});var Ei=(0,At.Z)({},xe,{displaced:{all:qt.all,invisible:an,visible:nn}});return Ei},_c=function(ve,xe){return as(ve.scroll.diff.displacement,xe)},pa=function(ve){var xe=ve.pageBorderBoxCenter,Ae=ve.draggable,je=ve.viewport,rt=_c(je,xe),it=Qt(rt,Ae.page.borderBox.center);return as(Ae.client.borderBox.center,it)},qc=function(ve){var xe=ve.draggable,Ae=ve.destination,je=ve.newPageBorderBoxCenter,rt=ve.viewport,it=ve.withDroppableDisplacement,vt=ve.onlyOnMainAxis,Ft=vt===void 0?!1:vt,qt=Qt(je,xe.page.borderBox.center),Sn=ca(xe.page.borderBox,qt),cn={target:Sn,destination:Ae,withDroppableDisplacement:it,viewport:rt};return Ft?Eu(cn):eu(cn)},Ju=function(ve){var xe=ve.isMovingForward,Ae=ve.draggable,je=ve.destination,rt=ve.draggables,it=ve.previousImpact,vt=ve.viewport,Ft=ve.previousPageBorderBoxCenter,qt=ve.previousClientSelection,Sn=ve.afterCritical;if(!je.isEnabled)return null;var cn=ql(je.descriptor.id,rt),an=Au(Ae,je),nn=Mu({isMovingForward:xe,draggable:Ae,destination:je,insideDestination:cn,previousImpact:it})||Ws({isMovingForward:xe,isInHomeList:an,draggable:Ae,draggables:rt,destination:je,insideDestination:cn,previousImpact:it,viewport:vt,afterCritical:Sn});if(!nn)return null;var Bn=fr({impact:nn,draggable:Ae,droppable:je,draggables:rt,afterCritical:Sn}),Ei=qc({draggable:Ae,destination:je,newPageBorderBoxCenter:Bn,viewport:vt.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});if(Ei){var Hr=pa({pageBorderBoxCenter:Bn,draggable:Ae,viewport:vt});return{clientSelection:Hr,impact:nn,scrollJumpRequest:null}}var eo=Qt(Bn,Ft),So=Ec({impact:nn,viewport:vt,destination:je,draggables:rt,maxScrollChange:eo});return{clientSelection:qt,impact:So,scrollJumpRequest:eo}},tn=function(xe){var Ae=xe.subject.active;return Ae||Pi(!1),Ae},un=function(ve){var xe=ve.isMovingForward,Ae=ve.pageBorderBoxCenter,je=ve.source,rt=ve.droppables,it=ve.viewport,vt=je.subject.active;if(!vt)return null;var Ft=je.axis,qt=Xr(vt[Ft.start],vt[Ft.end]),Sn=tt(rt).filter(function(an){return an!==je}).filter(function(an){return an.isEnabled}).filter(function(an){return!!an.subject.active}).filter(function(an){return no(it.frame)(tn(an))}).filter(function(an){var nn=tn(an);return xe?vt[Ft.crossAxisEnd]<nn[Ft.crossAxisEnd]:nn[Ft.crossAxisStart]<vt[Ft.crossAxisStart]}).filter(function(an){var nn=tn(an),Bn=Xr(nn[Ft.start],nn[Ft.end]);return qt(nn[Ft.start])||qt(nn[Ft.end])||Bn(vt[Ft.start])||Bn(vt[Ft.end])}).sort(function(an,nn){var Bn=tn(an)[Ft.crossAxisStart],Ei=tn(nn)[Ft.crossAxisStart];return xe?Bn-Ei:Ei-Bn}).filter(function(an,nn,Bn){return tn(an)[Ft.crossAxisStart]===tn(Bn[0])[Ft.crossAxisStart]});if(!Sn.length)return null;if(Sn.length===1)return Sn[0];var cn=Sn.filter(function(an){var nn=Xr(tn(an)[Ft.start],tn(an)[Ft.end]);return nn(Ae[Ft.line])});return cn.length===1?cn[0]:cn.length>1?cn.sort(function(an,nn){return tn(an)[Ft.start]-tn(nn)[Ft.start]})[0]:Sn.sort(function(an,nn){var Bn=La(Ae,Ya(tn(an))),Ei=La(Ae,Ya(tn(nn)));return Bn!==Ei?Bn-Ei:tn(an)[Ft.start]-tn(nn)[Ft.start]})[0]},Gn=function(xe,Ae){var je=xe.page.borderBox.center;return Su(xe.descriptor.id,Ae)?Qt(je,Ae.displacedBy.point):je},er=function(xe,Ae){var je=xe.page.borderBox;return Su(xe.descriptor.id,Ae)?ca(je,ba(Ae.displacedBy.point)):je},Wi=function(ve){var xe=ve.pageBorderBoxCenter,Ae=ve.viewport,je=ve.destination,rt=ve.insideDestination,it=ve.afterCritical,vt=rt.filter(function(Ft){return eu({target:er(Ft,it),destination:je,viewport:Ae.frame,withDroppableDisplacement:!0})}).sort(function(Ft,qt){var Sn=vs(xe,Tc(je,Gn(Ft,it))),cn=vs(xe,Tc(je,Gn(qt,it)));return Sn<cn?-1:cn<Sn?1:Ft.descriptor.index-qt.descriptor.index});return vt[0]||null},Bi=Ji(function(xe,Ae){var je=Ae[xe.line];return{value:je,point:to(xe.line,je)}}),ki=function(xe,Ae,je){var rt=xe.axis;if(xe.descriptor.mode==="virtual")return to(rt.line,Ae[rt.line]);var it=xe.subject.page.contentBox[rt.size],vt=ql(xe.descriptor.id,je),Ft=vt.reduce(function(cn,an){return cn+an.client.marginBox[rt.size]},0),qt=Ft+Ae[rt.line],Sn=qt-it;return Sn<=0?null:to(rt.line,Sn)},On=function(xe,Ae){return(0,At.Z)({},xe,{scroll:(0,At.Z)({},xe.scroll,{max:Ae})})},pi=function(xe,Ae,je){var rt=xe.frame;Au(Ae,xe)&&Pi(!1),xe.subject.withPlaceholder&&Pi(!1);var it=Bi(xe.axis,Ae.displaceBy).point,vt=ki(xe,it,je),Ft={placeholderSize:it,increasedBy:vt,oldFrameMaxScroll:xe.frame?xe.frame.scroll.max:null};if(!rt){var qt=Sl({page:xe.subject.page,withPlaceholder:Ft,axis:xe.axis,frame:xe.frame});return(0,At.Z)({},xe,{subject:qt})}var Sn=vt?as(rt.scroll.max,vt):rt.scroll.max,cn=On(rt,Sn),an=Sl({page:xe.subject.page,withPlaceholder:Ft,axis:xe.axis,frame:cn});return(0,At.Z)({},xe,{subject:an,frame:cn})},ur=function(xe){var Ae=xe.subject.withPlaceholder;Ae||Pi(!1);var je=xe.frame;if(!je){var rt=Sl({page:xe.subject.page,axis:xe.axis,frame:null,withPlaceholder:null});return(0,At.Z)({},xe,{subject:rt})}var it=Ae.oldFrameMaxScroll;it||Pi(!1);var vt=On(je,it),Ft=Sl({page:xe.subject.page,axis:xe.axis,frame:vt,withPlaceholder:null});return(0,At.Z)({},xe,{subject:Ft,frame:vt})},_r=function(ve){var xe=ve.previousPageBorderBoxCenter,Ae=ve.moveRelativeTo,je=ve.insideDestination,rt=ve.draggable,it=ve.draggables,vt=ve.destination,Ft=ve.viewport,qt=ve.afterCritical;if(!Ae){if(je.length)return null;var Sn={displaced:ws,displacedBy:Hu,at:{type:"REORDER",destination:{droppableId:vt.descriptor.id,index:0}}},cn=fr({impact:Sn,draggable:rt,droppable:vt,draggables:it,afterCritical:qt}),an=Au(rt,vt)?vt:pi(vt,rt,it),nn=qc({draggable:rt,destination:an,newPageBorderBoxCenter:cn,viewport:Ft.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0});return nn?Sn:null}var Bn=xe[vt.axis.line]<=Ae.page.borderBox.center[vt.axis.line],Ei=function(){var eo=Ae.descriptor.index;return Ae.descriptor.id===rt.descriptor.id||Bn?eo:eo+1}(),Hr=Bi(vt.axis,rt.displaceBy);return al({draggable:rt,insideDestination:je,destination:vt,viewport:Ft,displacedBy:Hr,last:ws,index:Ei})},da=function(ve){var xe=ve.isMovingForward,Ae=ve.previousPageBorderBoxCenter,je=ve.draggable,rt=ve.isOver,it=ve.draggables,vt=ve.droppables,Ft=ve.viewport,qt=ve.afterCritical,Sn=un({isMovingForward:xe,pageBorderBoxCenter:Ae,source:rt,droppables:vt,viewport:Ft});if(!Sn)return null;var cn=ql(Sn.descriptor.id,it),an=Wi({pageBorderBoxCenter:Ae,viewport:Ft,destination:Sn,insideDestination:cn,afterCritical:qt}),nn=_r({previousPageBorderBoxCenter:Ae,destination:Sn,draggable:je,draggables:it,moveRelativeTo:an,insideDestination:cn,viewport:Ft,afterCritical:qt});if(!nn)return null;var Bn=fr({impact:nn,draggable:je,droppable:Sn,draggables:it,afterCritical:qt}),Ei=pa({pageBorderBoxCenter:Bn,draggable:je,viewport:Ft});return{clientSelection:Ei,impact:nn,scrollJumpRequest:null}},ia=function(ve){var xe=ve.at;return xe?xe.type==="REORDER"?xe.destination.droppableId:xe.combine.droppableId:null},Es=function(xe,Ae){var je=ia(xe);return je?Ae[je]:null},cs=function(ve){var xe=ve.state,Ae=ve.type,je=Es(xe.impact,xe.dimensions.droppables),rt=!!je,it=xe.dimensions.droppables[xe.critical.droppable.id],vt=je||it,Ft=vt.axis.direction,qt=Ft==="vertical"&&(Ae==="MOVE_UP"||Ae==="MOVE_DOWN")||Ft==="horizontal"&&(Ae==="MOVE_LEFT"||Ae==="MOVE_RIGHT");if(qt&&!rt)return null;var Sn=Ae==="MOVE_DOWN"||Ae==="MOVE_RIGHT",cn=xe.dimensions.draggables[xe.critical.draggable.id],an=xe.current.page.borderBoxCenter,nn=xe.dimensions,Bn=nn.draggables,Ei=nn.droppables;return qt?Ju({isMovingForward:Sn,previousPageBorderBoxCenter:an,draggable:cn,destination:vt,draggables:Bn,viewport:xe.viewport,previousClientSelection:xe.current.client.selection,previousImpact:xe.impact,afterCritical:xe.afterCritical}):da({isMovingForward:Sn,previousPageBorderBoxCenter:an,draggable:cn,isOver:vt,draggables:Bn,droppables:Ei,viewport:xe.viewport,afterCritical:xe.afterCritical})};function Do(ve){return ve.phase==="DRAGGING"||ve.phase==="COLLECTING"}function jr(ve){var xe=Xr(ve.top,ve.bottom),Ae=Xr(ve.left,ve.right);return function(rt){return xe(rt.y)&&Ae(rt.x)}}function qi(ve,xe){return ve.left<xe.right&&ve.right>xe.left&&ve.top<xe.bottom&&ve.bottom>xe.top}function Va(ve){var xe=ve.pageBorderBox,Ae=ve.draggable,je=ve.candidates,rt=Ae.page.borderBox.center,it=je.map(function(vt){var Ft=vt.axis,qt=to(vt.axis.line,xe.center[Ft.line],vt.page.borderBox.center[Ft.crossAxisLine]);return{id:vt.descriptor.id,distance:vs(rt,qt)}}).sort(function(vt,Ft){return Ft.distance-vt.distance});return it[0]?it[0].id:null}function Ha(ve){var xe=ve.pageBorderBox,Ae=ve.draggable,je=ve.droppables,rt=tt(je).filter(function(it){if(!it.isEnabled)return!1;var vt=it.subject.active;if(!vt||!qi(xe,vt))return!1;if(jr(vt)(xe.center))return!0;var Ft=it.axis,qt=vt.center[Ft.crossAxisLine],Sn=xe[Ft.crossAxisStart],cn=xe[Ft.crossAxisEnd],an=Xr(vt[Ft.crossAxisStart],vt[Ft.crossAxisEnd]),nn=an(Sn),Bn=an(cn);return!nn&&!Bn?!0:nn?Sn<qt:cn>qt});return rt.length?rt.length===1?rt[0].descriptor.id:Va({pageBorderBox:xe,draggable:Ae,candidates:rt}):null}var Ts=function(xe,Ae){return Nr(ca(xe,Ae))},_s=function(ve,xe){var Ae=ve.frame;return Ae?Ts(xe,Ae.scroll.diff.value):xe};function ha(ve){var xe=ve.displaced,Ae=ve.id;return!!(xe.visible[Ae]||xe.invisible[Ae])}function za(ve){var xe=ve.draggable,Ae=ve.closest,je=ve.inHomeList;return Ae?je&&Ae.descriptor.index>xe.descriptor.index?Ae.descriptor.index-1:Ae.descriptor.index:null}var Ho=function(ve){var xe=ve.pageBorderBoxWithDroppableScroll,Ae=ve.draggable,je=ve.destination,rt=ve.insideDestination,it=ve.last,vt=ve.viewport,Ft=ve.afterCritical,qt=je.axis,Sn=Bi(je.axis,Ae.displaceBy),cn=Sn.value,an=xe[qt.start],nn=xe[qt.end],Bn=nu(Ae,rt),Ei=es(Bn,function(eo){var So=eo.descriptor.id,Zo=eo.page.borderBox.center[qt.line],ya=Su(So,Ft),ua=ha({displaced:it,id:So});return ya?ua?nn<=Zo:an<Zo-cn:ua?nn<=Zo+cn:an<Zo}),Hr=za({draggable:Ae,closest:Ei,inHomeList:Au(Ae,je)});return al({draggable:Ae,insideDestination:rt,destination:je,viewport:vt,last:it,displacedBy:Sn,index:Hr})},zr=4,Ns=function(ve){var xe=ve.draggable,Ae=ve.pageBorderBoxWithDroppableScroll,je=ve.previousImpact,rt=ve.destination,it=ve.insideDestination,vt=ve.afterCritical;if(!rt.isCombineEnabled)return null;var Ft=rt.axis,qt=Bi(rt.axis,xe.displaceBy),Sn=qt.value,cn=Ae[Ft.start],an=Ae[Ft.end],nn=nu(xe,it),Bn=es(nn,function(Hr){var eo=Hr.descriptor.id,So=Hr.page.borderBox,Zo=So[Ft.size],ya=Zo/zr,ua=Su(eo,vt),Ja=ha({displaced:je.displaced,id:eo});return ua?Ja?an>So[Ft.start]+ya&&an<So[Ft.end]-ya:cn>So[Ft.start]-Sn+ya&&cn<So[Ft.end]-Sn-ya:Ja?an>So[Ft.start]+Sn+ya&&an<So[Ft.end]+Sn-ya:cn>So[Ft.start]+ya&&cn<So[Ft.end]-ya});if(!Bn)return null;var Ei={displacedBy:qt,displaced:je.displaced,at:{type:"COMBINE",combine:{draggableId:Bn.descriptor.id,droppableId:rt.descriptor.id}}};return Ei},Aa=function(ve){var xe=ve.pageOffset,Ae=ve.draggable,je=ve.draggables,rt=ve.droppables,it=ve.previousImpact,vt=ve.viewport,Ft=ve.afterCritical,qt=Ts(Ae.page.borderBox,xe),Sn=Ha({pageBorderBox:qt,draggable:Ae,droppables:rt});if(!Sn)return Js;var cn=rt[Sn],an=ql(cn.descriptor.id,je),nn=_s(cn,qt);return Ns({pageBorderBoxWithDroppableScroll:nn,draggable:Ae,previousImpact:it,destination:cn,insideDestination:an,afterCritical:Ft})||Ho({pageBorderBoxWithDroppableScroll:nn,draggable:Ae,destination:cn,insideDestination:an,last:it.displaced,viewport:vt,afterCritical:Ft})},Ia=function(ve,xe){var Ae;return(0,At.Z)({},ve,(Ae={},Ae[xe.descriptor.id]=xe,Ae))},Zs=function(xe){var Ae=xe.previousImpact,je=xe.impact,rt=xe.droppables,it=ia(Ae),vt=ia(je);if(!it||it===vt)return rt;var Ft=rt[it];if(!Ft.subject.withPlaceholder)return rt;var qt=ur(Ft);return Ia(rt,qt)},Vu=function(ve){var xe=ve.draggable,Ae=ve.draggables,je=ve.droppables,rt=ve.previousImpact,it=ve.impact,vt=Zs({previousImpact:rt,impact:it,droppables:je}),Ft=ia(it);if(!Ft)return vt;var qt=je[Ft];if(Au(xe,qt)||qt.subject.withPlaceholder)return vt;var Sn=pi(qt,xe,Ae);return Ia(vt,Sn)},fu=function(ve){var xe=ve.state,Ae=ve.clientSelection,je=ve.dimensions,rt=ve.viewport,it=ve.impact,vt=ve.scrollJumpRequest,Ft=rt||xe.viewport,qt=je||xe.dimensions,Sn=Ae||xe.current.client.selection,cn=Qt(Sn,xe.initial.client.selection),an={offset:cn,selection:Sn,borderBoxCenter:as(xe.initial.client.borderBoxCenter,cn)},nn={selection:as(an.selection,Ft.scroll.current),borderBoxCenter:as(an.borderBoxCenter,Ft.scroll.current),offset:as(an.offset,Ft.scroll.diff.value)},Bn={client:an,page:nn};if(xe.phase==="COLLECTING")return(0,At.Z)({phase:"COLLECTING"},xe,{dimensions:qt,viewport:Ft,current:Bn});var Ei=qt.draggables[xe.critical.draggable.id],Hr=it||Aa({pageOffset:nn.offset,draggable:Ei,draggables:qt.draggables,droppables:qt.droppables,previousImpact:xe.impact,viewport:Ft,afterCritical:xe.afterCritical}),eo=Vu({draggable:Ei,impact:Hr,previousImpact:xe.impact,draggables:qt.draggables,droppables:qt.droppables}),So=(0,At.Z)({},xe,{current:Bn,dimensions:{draggables:qt.draggables,droppables:eo},impact:Hr,viewport:Ft,scrollJumpRequest:vt||null,forceShouldAnimate:vt?!1:null});return So};function St(ve,xe){return ve.map(function(Ae){return xe[Ae]})}var Jt=function(ve){var xe=ve.impact,Ae=ve.viewport,je=ve.draggables,rt=ve.destination,it=ve.forceShouldAnimate,vt=xe.displaced,Ft=St(vt.all,je),qt=Gl({afterDragging:Ft,destination:rt,displacedBy:xe.displacedBy,viewport:Ae.frame,forceShouldAnimate:it,last:vt});return(0,At.Z)({},xe,{displaced:qt})},ze=function(ve){var xe=ve.impact,Ae=ve.draggable,je=ve.droppable,rt=ve.draggables,it=ve.viewport,vt=ve.afterCritical,Ft=fr({impact:xe,draggable:Ae,draggables:rt,droppable:je,afterCritical:vt});return pa({pageBorderBoxCenter:Ft,draggable:Ae,viewport:it})},dt=function(ve){var xe=ve.state,Ae=ve.dimensions,je=ve.viewport;xe.movementMode!=="SNAP"&&Pi(!1);var rt=xe.impact,it=je||xe.viewport,vt=Ae||xe.dimensions,Ft=vt.draggables,qt=vt.droppables,Sn=Ft[xe.critical.draggable.id],cn=ia(rt);cn||Pi(!1);var an=qt[cn],nn=Jt({impact:rt,viewport:it,destination:an,draggables:Ft}),Bn=ze({impact:nn,draggable:Sn,droppable:an,draggables:Ft,viewport:it,afterCritical:xe.afterCritical});return fu({impact:nn,clientSelection:Bn,state:xe,dimensions:vt,viewport:it})},lr=function(ve){return{index:ve.index,droppableId:ve.droppableId}},rr=function(ve){var xe=ve.draggable,Ae=ve.home,je=ve.draggables,rt=ve.viewport,it=Bi(Ae.axis,xe.displaceBy),vt=ql(Ae.descriptor.id,je),Ft=vt.indexOf(xe);Ft===-1&&Pi(!1);var qt=vt.slice(Ft+1),Sn=qt.reduce(function(Bn,Ei){return Bn[Ei.descriptor.id]=!0,Bn},{}),cn={inVirtualList:Ae.descriptor.mode==="virtual",displacedBy:it,effected:Sn},an=Gl({afterDragging:qt,destination:Ae,displacedBy:it,last:null,viewport:rt.frame,forceShouldAnimate:!1}),nn={displaced:an,displacedBy:it,at:{type:"REORDER",destination:lr(xe.descriptor)}};return{impact:nn,afterCritical:cn}},kr=function(ve,xe){return{draggables:ve.draggables,droppables:Ia(ve.droppables,xe)}},tr=function(xe){},Yn=function(xe){},Tr=function(ve){var xe=ve.draggable,Ae=ve.offset,je=ve.initialWindowScroll,rt=En(xe.client,Ae),it=Ee(rt,je),vt=(0,At.Z)({},xe,{placeholder:(0,At.Z)({},xe.placeholder,{client:rt}),client:rt,page:it});return vt},Lr=function(ve){var xe=ve.frame;return xe||Pi(!1),xe},Vr=function(ve){var xe=ve.additions,Ae=ve.updatedDroppables,je=ve.viewport,rt=je.scroll.diff.value;return xe.map(function(it){var vt=it.descriptor.droppableId,Ft=Ae[vt],qt=Lr(Ft),Sn=qt.scroll.diff.value,cn=as(rt,Sn),an=Tr({draggable:it,offset:cn,initialWindowScroll:je.scroll.initial});return an})},mr=function(ve){var xe=ve.state,Ae=ve.published;tr();var je=Ae.modified.map(function(ya){var ua=xe.dimensions.droppables[ya.droppableId],Ja=No(ua,ya.scroll);return Ja}),rt=(0,At.Z)({},xe.dimensions.droppables,{},ps(je)),it=sr(Vr({additions:Ae.additions,updatedDroppables:rt,viewport:xe.viewport})),vt=(0,At.Z)({},xe.dimensions.draggables,{},it);Ae.removals.forEach(function(ya){delete vt[ya]});var Ft={droppables:rt,draggables:vt},qt=ia(xe.impact),Sn=qt?Ft.droppables[qt]:null,cn=Ft.draggables[xe.critical.draggable.id],an=Ft.droppables[xe.critical.droppable.id],nn=rr({draggable:cn,home:an,draggables:vt,viewport:xe.viewport}),Bn=nn.impact,Ei=nn.afterCritical,Hr=Sn&&Sn.isCombineEnabled?xe.impact:Bn,eo=Aa({pageOffset:xe.current.page.offset,draggable:Ft.draggables[xe.critical.draggable.id],draggables:Ft.draggables,droppables:Ft.droppables,previousImpact:Hr,viewport:xe.viewport,afterCritical:Ei});Yn();var So=(0,At.Z)({phase:"DRAGGING"},xe,{phase:"DRAGGING",impact:eo,onLiftImpact:Bn,dimensions:Ft,afterCritical:Ei,forceShouldAnimate:!1});if(xe.phase==="COLLECTING")return So;var Zo=(0,At.Z)({phase:"DROP_PENDING"},So,{phase:"DROP_PENDING",reason:xe.reason,isWaiting:!1});return Zo},zo=function(xe){return xe.movementMode==="SNAP"},Ii=function(xe,Ae,je){var rt=kr(xe.dimensions,Ae);return!zo(xe)||je?fu({state:xe,dimensions:rt}):dt({state:xe,dimensions:rt})};function vi(ve){return ve.isDragging&&ve.movementMode==="SNAP"?(0,At.Z)({phase:"DRAGGING"},ve,{scrollJumpRequest:null}):ve}var Ai={phase:"IDLE",completed:null,shouldFlush:!1},Or=function(ve,xe){if(ve===void 0&&(ve=Ai),xe.type==="FLUSH")return(0,At.Z)({},Ai,{shouldFlush:!0});if(xe.type==="INITIAL_PUBLISH"){ve.phase!=="IDLE"&&Pi(!1);var Ae=xe.payload,je=Ae.critical,rt=Ae.clientSelection,it=Ae.viewport,vt=Ae.dimensions,Ft=Ae.movementMode,qt=vt.draggables[je.draggable.id],Sn=vt.droppables[je.droppable.id],cn={selection:rt,borderBoxCenter:qt.client.borderBox.center,offset:ms},an={client:cn,page:{selection:as(cn.selection,it.scroll.initial),borderBoxCenter:as(cn.selection,it.scroll.initial),offset:as(cn.selection,it.scroll.diff.value)}},nn=tt(vt.droppables).every(function(og){return!og.isFixedOnPage}),Bn=rr({draggable:qt,home:Sn,draggables:vt.draggables,viewport:it}),Ei=Bn.impact,Hr=Bn.afterCritical,eo={phase:"DRAGGING",isDragging:!0,critical:je,movementMode:Ft,dimensions:vt,initial:an,current:an,isWindowScrollAllowed:nn,impact:Ei,afterCritical:Hr,onLiftImpact:Ei,viewport:it,scrollJumpRequest:null,forceShouldAnimate:null};return eo}if(xe.type==="COLLECTION_STARTING"){if(ve.phase==="COLLECTING"||ve.phase==="DROP_PENDING")return ve;ve.phase!=="DRAGGING"&&Pi(!1);var So=(0,At.Z)({phase:"COLLECTING"},ve,{phase:"COLLECTING"});return So}if(xe.type==="PUBLISH_WHILE_DRAGGING")return ve.phase==="COLLECTING"||ve.phase==="DROP_PENDING"||Pi(!1),mr({state:ve,published:xe.payload});if(xe.type==="MOVE"){if(ve.phase==="DROP_PENDING")return ve;Do(ve)||Pi(!1);var Zo=xe.payload.client;return Br(Zo,ve.current.client.selection)?ve:fu({state:ve,clientSelection:Zo,impact:zo(ve)?ve.impact:null})}if(xe.type==="UPDATE_DROPPABLE_SCROLL"){if(ve.phase==="DROP_PENDING"||ve.phase==="COLLECTING")return vi(ve);Do(ve)||Pi(!1);var ya=xe.payload,ua=ya.id,Ja=ya.newScroll,Hs=ve.dimensions.droppables[ua];if(!Hs)return ve;var vl=No(Hs,Ja);return Ii(ve,vl,!1)}if(xe.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(ve.phase==="DROP_PENDING")return ve;Do(ve)||Pi(!1);var zu=xe.payload,dl=zu.id,Du=zu.isEnabled,Mc=ve.dimensions.droppables[dl];Mc||Pi(!1),Mc.isEnabled===Du&&Pi(!1);var Zc=(0,At.Z)({},Mc,{isEnabled:Du});return Ii(ve,Zc,!0)}if(xe.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(ve.phase==="DROP_PENDING")return ve;Do(ve)||Pi(!1);var Vd=xe.payload,gd=Vd.id,ld=Vd.isCombineEnabled,ac=ve.dimensions.droppables[gd];ac||Pi(!1),ac.isCombineEnabled===ld&&Pi(!1);var Pu=(0,At.Z)({},ac,{isCombineEnabled:ld});return Ii(ve,Pu,!0)}if(xe.type==="MOVE_BY_WINDOW_SCROLL"){if(ve.phase==="DROP_PENDING"||ve.phase==="DROP_ANIMATING")return ve;Do(ve)||Pi(!1),ve.isWindowScrollAllowed||Pi(!1);var sh=xe.payload.newScroll;if(Br(ve.viewport.scroll.current,sh))return vi(ve);var Tu=El(ve.viewport,sh);return zo(ve)?dt({state:ve,viewport:Tu}):fu({state:ve,viewport:Tu})}if(xe.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!Do(ve))return ve;var Ud=xe.payload.maxScroll;if(Br(Ud,ve.viewport.scroll.max))return ve;var Nf=(0,At.Z)({},ve.viewport,{scroll:(0,At.Z)({},ve.viewport.scroll,{max:Ud})});return(0,At.Z)({phase:"DRAGGING"},ve,{viewport:Nf})}if(xe.type==="MOVE_UP"||xe.type==="MOVE_DOWN"||xe.type==="MOVE_LEFT"||xe.type==="MOVE_RIGHT"){if(ve.phase==="COLLECTING"||ve.phase==="DROP_PENDING")return ve;ve.phase!=="DRAGGING"&&Pi(!1);var Kd=cs({state:ve,type:xe.type});return Kd?fu({state:ve,impact:Kd.impact,clientSelection:Kd.clientSelection,scrollJumpRequest:Kd.scrollJumpRequest}):ve}if(xe.type==="DROP_PENDING"){var Ca=xe.payload.reason;ve.phase!=="COLLECTING"&&Pi(!1);var af=(0,At.Z)({phase:"DROP_PENDING"},ve,{phase:"DROP_PENDING",isWaiting:!0,reason:Ca});return af}if(xe.type==="DROP_ANIMATE"){var Ng=xe.payload,Yd=Ng.completed,Eh=Ng.dropDuration,Hh=Ng.newHomeClientOffset;ve.phase==="DRAGGING"||ve.phase==="DROP_PENDING"||Pi(!1);var ud={phase:"DROP_ANIMATING",completed:Yd,dropDuration:Eh,newHomeClientOffset:Hh,dimensions:ve.dimensions};return ud}if(xe.type==="DROP_COMPLETE"){var rg=xe.payload.completed;return{phase:"IDLE",completed:rg,shouldFlush:!1}}return ve},Ur=function(xe){return{type:"BEFORE_INITIAL_CAPTURE",payload:xe}},Fr=function(xe){return{type:"LIFT",payload:xe}},ko=function(xe){return{type:"INITIAL_PUBLISH",payload:xe}},yr=function(xe){return{type:"PUBLISH_WHILE_DRAGGING",payload:xe}},vo=function(){return{type:"COLLECTION_STARTING",payload:null}},Xi=function(xe){return{type:"UPDATE_DROPPABLE_SCROLL",payload:xe}},Gr=function(xe){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:xe}},mo=function(xe){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:xe}},aa=function(xe){return{type:"MOVE",payload:xe}},ka=function(xe){return{type:"MOVE_BY_WINDOW_SCROLL",payload:xe}},Fs=function(xe){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:xe}},Kr=function(){return{type:"MOVE_UP",payload:null}},Xl=function(){return{type:"MOVE_DOWN",payload:null}},Fo=function(){return{type:"MOVE_RIGHT",payload:null}},Da=function(){return{type:"MOVE_LEFT",payload:null}},jo=function(){return{type:"FLUSH",payload:null}},yl=function(xe){return{type:"DROP_ANIMATE",payload:xe}},Ls=function(xe){return{type:"DROP_COMPLETE",payload:xe}},Rl=function(xe){return{type:"DROP",payload:xe}},Oc=function(xe){return{type:"DROP_PENDING",payload:xe}},ad=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};function Cc(ve){if(!(ve.length<=1)){for(var xe=ve.map(function(Ft){return Ft.descriptor.index}),Ae={},je=1;je<xe.length;je++){var rt=xe[je],it=xe[je-1];rt!==it+1&&(Ae[rt]=!0)}if(Object.keys(Ae).length)var vt=xe.map(function(Ft){var qt=!!Ae[Ft];return qt?"[\u{1F525}"+Ft+"]":""+Ft}).join(", ")}}function bc(ve,xe){if(0)var Ae}var uo=function(ve){return function(xe){var Ae=xe.getState,je=xe.dispatch;return function(rt){return function(it){if(it.type!=="LIFT"){rt(it);return}var vt=it.payload,Ft=vt.id,qt=vt.clientSelection,Sn=vt.movementMode,cn=Ae();cn.phase==="DROP_ANIMATING"&&je(Ls({completed:cn.completed})),Ae().phase!=="IDLE"&&Pi(!1),je(jo()),je(Ur({draggableId:Ft,movementMode:Sn}));var an={shouldPublishImmediately:Sn==="SNAP"},nn={draggableId:Ft,scrollOptions:an},Bn=ve.startPublishing(nn),Ei=Bn.critical,Hr=Bn.dimensions,eo=Bn.viewport;bc(Ei,Hr),je(ko({critical:Ei,dimensions:Hr,clientSelection:qt,movementMode:Sn,viewport:eo}))}}}},gu=function(ve){return function(){return function(xe){return function(Ae){Ae.type==="INITIAL_PUBLISH"&&ve.dragging(),Ae.type==="DROP_ANIMATE"&&ve.dropping(Ae.payload.completed.result.reason),(Ae.type==="FLUSH"||Ae.type==="DROP_COMPLETE")&&ve.resting(),xe(Ae)}}}},Ye={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},bt={opacity:{drop:0,combining:.7},scale:{drop:.75}},Bt={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},Tt=Bt.outOfTheWay+"s "+Ye.outOfTheWay,$t={fluid:"opacity "+Tt,snap:"transform "+Tt+", opacity "+Tt,drop:function(xe){var Ae=xe+"s "+Ye.drop;return"transform "+Ae+", opacity "+Ae},outOfTheWay:"transform "+Tt,placeholder:"height "+Tt+", width "+Tt+", margin "+Tt},hn=function(xe){return Br(xe,ms)?null:"translate("+xe.x+"px, "+xe.y+"px)"},Pn={moveTo:hn,drop:function(xe,Ae){var je=hn(xe);return je?Ae?je+" scale("+bt.scale.drop+")":je:null}},Wn=Bt.minDropTime,fi=Bt.maxDropTime,ti=fi-Wn,nr=1500,li=.6,Zi=function(ve){var xe=ve.current,Ae=ve.destination,je=ve.reason,rt=vs(xe,Ae);if(rt<=0)return Wn;if(rt>=nr)return fi;var it=rt/nr,vt=Wn+ti*it,Ft=je==="CANCEL"?vt*li:vt;return Number(Ft.toFixed(2))},Li=function(ve){var xe=ve.impact,Ae=ve.draggable,je=ve.dimensions,rt=ve.viewport,it=ve.afterCritical,vt=je.draggables,Ft=je.droppables,qt=ia(xe),Sn=qt?Ft[qt]:null,cn=Ft[Ae.descriptor.droppableId],an=ze({impact:xe,draggable:Ae,draggables:vt,afterCritical:it,droppable:Sn||cn,viewport:rt}),nn=Qt(an,Ae.client.borderBox.center);return nn},gr=function(ve){var xe=ve.draggables,Ae=ve.reason,je=ve.lastImpact,rt=ve.home,it=ve.viewport,vt=ve.onLiftImpact;if(!je.at||Ae!=="DROP"){var Ft=Jt({draggables:xe,impact:vt,destination:rt,viewport:it,forceShouldAnimate:!0});return{impact:Ft,didDropInsideDroppable:!1}}if(je.at.type==="REORDER")return{impact:je,didDropInsideDroppable:!0};var qt=(0,At.Z)({},je,{displaced:ws});return{impact:qt,didDropInsideDroppable:!0}},Ir=function(ve){var xe=ve.getState,Ae=ve.dispatch;return function(je){return function(rt){if(rt.type!=="DROP"){je(rt);return}var it=xe(),vt=rt.payload.reason;if(it.phase==="COLLECTING"){Ae(Oc({reason:vt}));return}if(it.phase!=="IDLE"){var Ft=it.phase==="DROP_PENDING"&&it.isWaiting;Ft&&Pi(!1),it.phase==="DRAGGING"||it.phase==="DROP_PENDING"||Pi(!1);var qt=it.critical,Sn=it.dimensions,cn=Sn.draggables[it.critical.draggable.id],an=gr({reason:vt,lastImpact:it.impact,afterCritical:it.afterCritical,onLiftImpact:it.onLiftImpact,home:it.dimensions.droppables[it.critical.droppable.id],viewport:it.viewport,draggables:it.dimensions.draggables}),nn=an.impact,Bn=an.didDropInsideDroppable,Ei=Bn?rl(nn):null,Hr=Bn?Il(nn):null,eo={index:qt.draggable.index,droppableId:qt.droppable.id},So={draggableId:cn.descriptor.id,type:cn.descriptor.type,source:eo,reason:vt,mode:it.movementMode,destination:Ei,combine:Hr},Zo=Li({impact:nn,draggable:cn,dimensions:Sn,viewport:it.viewport,afterCritical:it.afterCritical}),ya={critical:it.critical,afterCritical:it.afterCritical,result:So,impact:nn},ua=!Br(it.current.client.offset,Zo)||!!So.combine;if(!ua){Ae(Ls({completed:ya}));return}var Ja=Zi({current:it.current.client.offset,destination:Zo,reason:vt}),Hs={newHomeClientOffset:Zo,dropDuration:Ja,completed:ya};Ae(yl(Hs))}}}},co=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Wo(ve){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(Ae){Ae.target!==window&&Ae.target!==window.document||ve()}}}function Ht(ve){var xe=ve.onWindowScroll;function Ae(){xe(co())}var je=Zt(Ae),rt=Wo(je),it=Wt;function vt(){return it!==Wt}function Ft(){vt()&&Pi(!1),it=pr(window,[rt])}function qt(){vt()||Pi(!1),je.cancel(),it(),it=Wt}return{start:Ft,stop:qt,isActive:vt}}var ei=function(xe){return xe.type==="DROP_COMPLETE"||xe.type==="DROP_ANIMATE"||xe.type==="FLUSH"},bi=function(ve){var xe=Ht({onWindowScroll:function(je){ve.dispatch(ka({newScroll:je}))}});return function(Ae){return function(je){!xe.isActive()&&je.type==="INITIAL_PUBLISH"&&xe.start(),xe.isActive()&&ei(je)&&xe.stop(),Ae(je)}}},Vi=function(ve){var xe=!1,Ae=!1,je=setTimeout(function(){Ae=!0}),rt=function(vt){xe||Ae||(xe=!0,ve(vt),clearTimeout(je))};return rt.wasCalled=function(){return xe},rt},ni=function(){var ve=[],xe=function(it){var vt=ja(ve,function(Sn){return Sn.timerId===it});vt===-1&&Pi(!1);var Ft=ve.splice(vt,1),qt=Ft[0];qt.callback()},Ae=function(it){var vt=setTimeout(function(){return xe(vt)}),Ft={timerId:vt,callback:it};ve.push(Ft)},je=function(){if(ve.length){var it=[].concat(ve);ve.length=0,it.forEach(function(vt){clearTimeout(vt.timerId),vt.callback()})}};return{add:Ae,flush:je}},Sr=function(xe,Ae){return xe==null&&Ae==null?!0:xe==null||Ae==null?!1:xe.droppableId===Ae.droppableId&&xe.index===Ae.index},xo=function(xe,Ae){return xe==null&&Ae==null?!0:xe==null||Ae==null?!1:xe.draggableId===Ae.draggableId&&xe.droppableId===Ae.droppableId},ho=function(xe,Ae){if(xe===Ae)return!0;var je=xe.draggable.id===Ae.draggable.id&&xe.draggable.droppableId===Ae.draggable.droppableId&&xe.draggable.type===Ae.draggable.type&&xe.draggable.index===Ae.draggable.index,rt=xe.droppable.id===Ae.droppable.id&&xe.droppable.type===Ae.droppable.type;return je&&rt},Yr=function(xe,Ae){tr(),Ae(),Yn()},$a=function(xe,Ae){return{draggableId:xe.draggable.id,type:xe.droppable.type,source:{droppableId:xe.droppable.id,index:xe.draggable.index},mode:Ae}},Go=function(xe,Ae,je,rt){if(!xe){je(rt(Ae));return}var it=Vi(je),vt={announce:it};xe(Ae,vt),it.wasCalled()||je(rt(Ae))},Qo=function(ve,xe){var Ae=ni(),je=null,rt=function(nn,Bn){je&&Pi(!1),Yr("onBeforeCapture",function(){var Ei=ve().onBeforeCapture;if(Ei){var Hr={draggableId:nn,mode:Bn};Ei(Hr)}})},it=function(nn,Bn){je&&Pi(!1),Yr("onBeforeDragStart",function(){var Ei=ve().onBeforeDragStart;Ei&&Ei($a(nn,Bn))})},vt=function(nn,Bn){je&&Pi(!1);var Ei=$a(nn,Bn);je={mode:Bn,lastCritical:nn,lastLocation:Ei.source,lastCombine:null},Ae.add(function(){Yr("onDragStart",function(){return Go(ve().onDragStart,Ei,xe,zl.onDragStart)})})},Ft=function(nn,Bn){var Ei=rl(Bn),Hr=Il(Bn);je||Pi(!1);var eo=!ho(nn,je.lastCritical);eo&&(je.lastCritical=nn);var So=!Sr(je.lastLocation,Ei);So&&(je.lastLocation=Ei);var Zo=!xo(je.lastCombine,Hr);if(Zo&&(je.lastCombine=Hr),!(!eo&&!So&&!Zo)){var ya=(0,At.Z)({},$a(nn,je.mode),{combine:Hr,destination:Ei});Ae.add(function(){Yr("onDragUpdate",function(){return Go(ve().onDragUpdate,ya,xe,zl.onDragUpdate)})})}},qt=function(){je||Pi(!1),Ae.flush()},Sn=function(nn){je||Pi(!1),je=null,Yr("onDragEnd",function(){return Go(ve().onDragEnd,nn,xe,zl.onDragEnd)})},cn=function(){if(je){var nn=(0,At.Z)({},$a(je.lastCritical,je.mode),{combine:null,destination:null,reason:"CANCEL"});Sn(nn)}};return{beforeCapture:rt,beforeStart:it,start:vt,update:Ft,flush:qt,drop:Sn,abort:cn}},ma=function(ve,xe){var Ae=Qo(ve,xe);return function(je){return function(rt){return function(it){if(it.type==="BEFORE_INITIAL_CAPTURE"){Ae.beforeCapture(it.payload.draggableId,it.payload.movementMode);return}if(it.type==="INITIAL_PUBLISH"){var vt=it.payload.critical;Ae.beforeStart(vt,it.payload.movementMode),rt(it),Ae.start(vt,it.payload.movementMode);return}if(it.type==="DROP_COMPLETE"){var Ft=it.payload.completed.result;Ae.flush(),rt(it),Ae.drop(Ft);return}if(rt(it),it.type==="FLUSH"){Ae.abort();return}var qt=je.getState();qt.phase==="DRAGGING"&&Ae.update(qt.critical,qt.impact)}}}},ui=function(ve){return function(xe){return function(Ae){if(Ae.type!=="DROP_ANIMATION_FINISHED"){xe(Ae);return}var je=ve.getState();je.phase!=="DROP_ANIMATING"&&Pi(!1),ve.dispatch(Ls({completed:je.completed}))}}},wo=function(ve){var xe=null,Ae=null;function je(){Ae&&(cancelAnimationFrame(Ae),Ae=null),xe&&(xe(),xe=null)}return function(rt){return function(it){if((it.type==="FLUSH"||it.type==="DROP_COMPLETE"||it.type==="DROP_ANIMATION_FINISHED")&&je(),rt(it),it.type==="DROP_ANIMATE"){var vt={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){var qt=ve.getState();qt.phase==="DROP_ANIMATING"&&ve.dispatch(ad())}};Ae=requestAnimationFrame(function(){Ae=null,xe=pr(window,[vt])})}}}},sa=function(ve){return function(){return function(xe){return function(Ae){(Ae.type==="DROP_COMPLETE"||Ae.type==="FLUSH"||Ae.type==="DROP_ANIMATE")&&ve.stopPublishing(),xe(Ae)}}}},ke=function(ve){var xe=!1;return function(){return function(Ae){return function(je){if(je.type==="INITIAL_PUBLISH"){xe=!0,ve.tryRecordFocus(je.payload.critical.draggable.id),Ae(je),ve.tryRestoreFocusRecorded();return}if(Ae(je),!!xe){if(je.type==="FLUSH"){xe=!1,ve.tryRestoreFocusRecorded();return}if(je.type==="DROP_COMPLETE"){xe=!1;var rt=je.payload.completed.result;rt.combine&&ve.tryShiftRecord(rt.draggableId,rt.combine.draggableId),ve.tryRestoreFocusRecorded()}}}}}},Ie=function(xe){return xe.type==="DROP_COMPLETE"||xe.type==="DROP_ANIMATE"||xe.type==="FLUSH"},st=function(ve){return function(xe){return function(Ae){return function(je){if(Ie(je)){ve.stop(),Ae(je);return}if(je.type==="INITIAL_PUBLISH"){Ae(je);var rt=xe.getState();rt.phase!=="DRAGGING"&&Pi(!1),ve.start(rt);return}Ae(je),ve.scroll(xe.getState())}}}},gt=function(ve){return function(xe){return function(Ae){if(xe(Ae),Ae.type==="PUBLISH_WHILE_DRAGGING"){var je=ve.getState();je.phase==="DROP_PENDING"&&(je.isWaiting||ve.dispatch(Rl({reason:je.reason})))}}}},Xt=wt.qC,vn=function(ve){var xe=ve.dimensionMarshal,Ae=ve.focusMarshal,je=ve.styleMarshal,rt=ve.getResponders,it=ve.announce,vt=ve.autoScroller;return(0,wt.MT)(Or,Xt((0,wt.md)(gu(je),sa(xe),uo(xe),Ir,ui,wo,gt,st(vt),bi,ke(Ae),ma(rt,it))))},Dn=function(){return{additions:{},removals:{},modified:{}}};function di(ve){var xe=ve.registry,Ae=ve.callbacks,je=Dn(),rt=null,it=function(){rt||(Ae.collectionStarting(),rt=requestAnimationFrame(function(){rt=null,tr();var cn=je,an=cn.additions,nn=cn.removals,Bn=cn.modified,Ei=Object.keys(an).map(function(So){return xe.draggable.getById(So).getDimension(ms)}).sort(function(So,Zo){return So.descriptor.index-Zo.descriptor.index}),Hr=Object.keys(Bn).map(function(So){var Zo=xe.droppable.getById(So),ya=Zo.callbacks.getScrollWhileDragging();return{droppableId:So,scroll:ya}}),eo={additions:Ei,removals:Object.keys(nn),modified:Hr};je=Dn(),Yn(),Ae.publish(eo)}))},vt=function(cn){var an=cn.descriptor.id;je.additions[an]=cn,je.modified[cn.descriptor.droppableId]=!0,je.removals[an]&&delete je.removals[an],it()},Ft=function(cn){var an=cn.descriptor;je.removals[an.id]=!0,je.modified[an.droppableId]=!0,je.additions[an.id]&&delete je.additions[an.id],it()},qt=function(){rt&&(cancelAnimationFrame(rt),rt=null,je=Dn())};return{add:vt,remove:Ft,stop:qt}}var yi=function(ve){var xe=ve.scrollHeight,Ae=ve.scrollWidth,je=ve.height,rt=ve.width,it=Qt({x:Ae,y:xe},{x:rt,y:je}),vt={x:Math.max(0,it.x),y:Math.max(0,it.y)};return vt},ai=function(){var ve=document.documentElement;return ve||Pi(!1),ve},Hi=function(){var ve=ai(),xe=yi({scrollHeight:ve.scrollHeight,scrollWidth:ve.scrollWidth,width:ve.clientWidth,height:ve.clientHeight});return xe},$i=function(){var ve=co(),xe=Hi(),Ae=ve.y,je=ve.x,rt=ai(),it=rt.clientWidth,vt=rt.clientHeight,Ft=je+it,qt=Ae+vt,Sn=Nr({top:Ae,left:je,right:Ft,bottom:qt}),cn={frame:Sn,scroll:{initial:ve,current:ve,max:xe,diff:{value:ms,displacement:ms}}};return cn},Pr=function(ve){var xe=ve.critical,Ae=ve.scrollOptions,je=ve.registry;tr();var rt=$i(),it=rt.scroll.current,vt=xe.droppable,Ft=je.droppable.getAllByType(vt.type).map(function(an){return an.callbacks.getDimensionAndWatchScroll(it,Ae)}),qt=je.draggable.getAllByType(xe.draggable.type).map(function(an){return an.getDimension(it)}),Sn={draggables:sr(qt),droppables:ps(Ft)};Yn();var cn={dimensions:Sn,critical:xe,viewport:rt};return cn};function Ui(ve,xe,Ae){if(Ae.descriptor.id===xe.id||Ae.descriptor.type!==xe.type)return!1;var je=ve.droppable.getById(Ae.descriptor.droppableId);return je.descriptor.mode==="virtual"}var zi=function(ve,xe){var Ae=null,je=di({callbacks:{publish:xe.publishWhileDragging,collectionStarting:xe.collectionStarting},registry:ve}),rt=function(Bn,Ei){ve.droppable.exists(Bn)||Pi(!1),Ae&&xe.updateDroppableIsEnabled({id:Bn,isEnabled:Ei})},it=function(Bn,Ei){Ae&&(ve.droppable.exists(Bn)||Pi(!1),xe.updateDroppableIsCombineEnabled({id:Bn,isCombineEnabled:Ei}))},vt=function(Bn,Ei){Ae&&(ve.droppable.exists(Bn)||Pi(!1),xe.updateDroppableScroll({id:Bn,newScroll:Ei}))},Ft=function(Bn,Ei){Ae&&ve.droppable.getById(Bn).callbacks.scroll(Ei)},qt=function(){if(Ae){je.stop();var Bn=Ae.critical.droppable;ve.droppable.getAllByType(Bn.type).forEach(function(Ei){return Ei.callbacks.dragStopped()}),Ae.unsubscribe(),Ae=null}},Sn=function(Bn){Ae||Pi(!1);var Ei=Ae.critical.draggable;Bn.type==="ADDITION"&&Ui(ve,Ei,Bn.value)&&je.add(Bn.value),Bn.type==="REMOVAL"&&Ui(ve,Ei,Bn.value)&&je.remove(Bn.value)},cn=function(Bn){Ae&&Pi(!1);var Ei=ve.draggable.getById(Bn.draggableId),Hr=ve.droppable.getById(Ei.descriptor.droppableId),eo={draggable:Ei.descriptor,droppable:Hr.descriptor},So=ve.subscribe(Sn);return Ae={critical:eo,unsubscribe:So},Pr({critical:eo,registry:ve,scrollOptions:Bn.scrollOptions})},an={updateDroppableIsEnabled:rt,updateDroppableIsCombineEnabled:it,scrollDroppable:Ft,updateDroppableScroll:vt,startPublishing:cn,stopPublishing:qt};return an},cr=function(ve,xe){return ve.phase==="IDLE"?!0:ve.phase!=="DROP_ANIMATING"||ve.completed.result.draggableId===xe?!1:ve.completed.result.reason==="DROP"},Er=function(ve){window.scrollBy(ve.x,ve.y)},To=Ji(function(ve){return tt(ve).filter(function(xe){return!(!xe.isEnabled||!xe.frame)})}),ea=function(xe,Ae){var je=es(To(Ae),function(rt){return rt.frame||Pi(!1),jr(rt.frame.pageMarginBox)(xe)});return je},Eo=function(ve){var xe=ve.center,Ae=ve.destination,je=ve.droppables;if(Ae){var rt=je[Ae];return rt.frame?rt:null}var it=ea(xe,je);return it},Po={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:function(xe){return Math.pow(xe,2)},durationDampening:{stopDampeningAt:1200,accelerateAt:360}},Ma=function(ve,xe){var Ae=ve[xe.size]*Po.startFromPercentage,je=ve[xe.size]*Po.maxScrollAtPercentage,rt={startScrollingFrom:Ae,maxScrollValueAt:je};return rt},or=function(ve){var xe=ve.startOfRange,Ae=ve.endOfRange,je=ve.current,rt=Ae-xe;if(rt===0)return 0;var it=je-xe,vt=it/rt;return vt},_o=1,$r=function(ve,xe){if(ve>xe.startScrollingFrom)return 0;if(ve<=xe.maxScrollValueAt)return Po.maxPixelScroll;if(ve===xe.startScrollingFrom)return _o;var Ae=or({startOfRange:xe.maxScrollValueAt,endOfRange:xe.startScrollingFrom,current:ve}),je=1-Ae,rt=Po.maxPixelScroll*Po.ease(je);return Math.ceil(rt)},Oo=Po.durationDampening.accelerateAt,fa=Po.durationDampening.stopDampeningAt,Qr=function(ve,xe){var Ae=xe,je=fa,rt=Date.now(),it=rt-Ae;if(it>=fa)return ve;if(it<Oo)return _o;var vt=or({startOfRange:Oo,endOfRange:je,current:it}),Ft=ve*Po.ease(vt);return Math.ceil(Ft)},Na=function(ve){var xe=ve.distanceToEdge,Ae=ve.thresholds,je=ve.dragStartTime,rt=ve.shouldUseTimeDampening,it=$r(xe,Ae);return it===0?0:rt?Math.max(Qr(it,je),_o):it},ra=function(ve){var xe=ve.container,Ae=ve.distanceToEdges,je=ve.dragStartTime,rt=ve.axis,it=ve.shouldUseTimeDampening,vt=Ma(xe,rt),Ft=Ae[rt.end]<Ae[rt.start];return Ft?Na({distanceToEdge:Ae[rt.end],thresholds:vt,dragStartTime:je,shouldUseTimeDampening:it}):-1*Na({distanceToEdge:Ae[rt.start],thresholds:vt,dragStartTime:je,shouldUseTimeDampening:it})},ns=function(ve){var xe=ve.container,Ae=ve.subject,je=ve.proposedScroll,rt=Ae.height>xe.height,it=Ae.width>xe.width;return!it&&!rt?je:it&&rt?null:{x:it?0:je.x,y:rt?0:je.y}},Jo=Za(function(ve){return ve===0?0:ve}),Wa=function(ve){var xe=ve.dragStartTime,Ae=ve.container,je=ve.subject,rt=ve.center,it=ve.shouldUseTimeDampening,vt={top:rt.y-Ae.top,right:Ae.right-rt.x,bottom:Ae.bottom-rt.y,left:rt.x-Ae.left},Ft=ra({container:Ae,distanceToEdges:vt,dragStartTime:xe,axis:Fn,shouldUseTimeDampening:it}),qt=ra({container:Ae,distanceToEdges:vt,dragStartTime:xe,axis:Bo,shouldUseTimeDampening:it}),Sn=Jo({x:qt,y:Ft});if(Br(Sn,ms))return null;var cn=ns({container:Ae,subject:je,proposedScroll:Sn});return cn?Br(cn,ms)?null:cn:null},ds=Za(function(ve){return ve===0?0:ve>0?1:-1}),ys=function(){var ve=function(Ae,je){return Ae<0?Ae:Ae>je?Ae-je:0};return function(xe){var Ae=xe.current,je=xe.max,rt=xe.change,it=as(Ae,rt),vt={x:ve(it.x,je.x),y:ve(it.y,je.y)};return Br(vt,ms)?null:vt}}(),ls=function(xe){var Ae=xe.max,je=xe.current,rt=xe.change,it={x:Math.max(je.x,Ae.x),y:Math.max(je.y,Ae.y)},vt=ds(rt),Ft=ys({max:it,current:je,change:vt});return!Ft||vt.x!==0&&Ft.x===0||vt.y!==0&&Ft.y===0},Lo=function(xe,Ae){return ls({current:xe.scroll.current,max:xe.scroll.max,change:Ae})},Ea=function(xe,Ae){if(!Lo(xe,Ae))return null;var je=xe.scroll.max,rt=xe.scroll.current;return ys({current:rt,max:je,change:Ae})},Cs=function(xe,Ae){var je=xe.frame;return je?ls({current:je.scroll.current,max:je.scroll.max,change:Ae}):!1},hs=function(xe,Ae){var je=xe.frame;return!je||!Cs(xe,Ae)?null:ys({current:je.scroll.current,max:je.scroll.max,change:Ae})},zs=function(ve){var xe=ve.viewport,Ae=ve.subject,je=ve.center,rt=ve.dragStartTime,it=ve.shouldUseTimeDampening,vt=Wa({dragStartTime:rt,container:xe.frame,subject:Ae,center:je,shouldUseTimeDampening:it});return vt&&Lo(xe,vt)?vt:null},Os=function(ve){var xe=ve.droppable,Ae=ve.subject,je=ve.center,rt=ve.dragStartTime,it=ve.shouldUseTimeDampening,vt=xe.frame;if(!vt)return null;var Ft=Wa({dragStartTime:rt,container:vt.pageMarginBox,subject:Ae,center:je,shouldUseTimeDampening:it});return Ft&&Cs(xe,Ft)?Ft:null},Vs=function(ve){var xe=ve.state,Ae=ve.dragStartTime,je=ve.shouldUseTimeDampening,rt=ve.scrollWindow,it=ve.scrollDroppable,vt=xe.current.page.borderBoxCenter,Ft=xe.dimensions.draggables[xe.critical.draggable.id],qt=Ft.page.marginBox;if(xe.isWindowScrollAllowed){var Sn=xe.viewport,cn=zs({dragStartTime:Ae,viewport:Sn,subject:qt,center:vt,shouldUseTimeDampening:je});if(cn){rt(cn);return}}var an=Eo({center:vt,destination:ia(xe.impact),droppables:xe.dimensions.droppables});if(an){var nn=Os({dragStartTime:Ae,droppable:an,subject:qt,center:vt,shouldUseTimeDampening:je});nn&&it(an.descriptor.id,nn)}},Gs=function(ve){var xe=ve.scrollWindow,Ae=ve.scrollDroppable,je=Zt(xe),rt=Zt(Ae),it=null,vt=function(cn){it||Pi(!1);var an=it,nn=an.shouldUseTimeDampening,Bn=an.dragStartTime;Vs({state:cn,scrollWindow:je,scrollDroppable:rt,dragStartTime:Bn,shouldUseTimeDampening:nn})},Ft=function(cn){tr(),it&&Pi(!1);var an=Date.now(),nn=!1,Bn=function(){nn=!0};Vs({state:cn,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:Bn,scrollDroppable:Bn}),it={dragStartTime:an,shouldUseTimeDampening:nn},Yn(),nn&&vt(cn)},qt=function(){it&&(je.cancel(),rt.cancel(),it=null)};return{start:Ft,stop:qt,scroll:vt}},nl=function(ve){var xe=ve.move,Ae=ve.scrollDroppable,je=ve.scrollWindow,rt=function(Sn,cn){var an=as(Sn.current.client.selection,cn);xe({client:an})},it=function(Sn,cn){if(!Cs(Sn,cn))return cn;var an=hs(Sn,cn);if(!an)return Ae(Sn.descriptor.id,cn),null;var nn=Qt(cn,an);Ae(Sn.descriptor.id,nn);var Bn=Qt(cn,nn);return Bn},vt=function(Sn,cn,an){if(!Sn||!Lo(cn,an))return an;var nn=Ea(cn,an);if(!nn)return je(an),null;var Bn=Qt(an,nn);je(Bn);var Ei=Qt(an,Bn);return Ei},Ft=function(Sn){var cn=Sn.scrollJumpRequest;if(cn){var an=ia(Sn.impact);an||Pi(!1);var nn=it(Sn.dimensions.droppables[an],cn);if(nn){var Bn=Sn.viewport,Ei=vt(Sn.isWindowScrollAllowed,Bn,nn);Ei&&rt(Sn,Ei)}}};return Ft},Wl=function(ve){var xe=ve.scrollDroppable,Ae=ve.scrollWindow,je=ve.move,rt=Gs({scrollWindow:Ae,scrollDroppable:xe}),it=nl({move:je,scrollWindow:Ae,scrollDroppable:xe}),vt=function(Sn){if(Sn.phase==="DRAGGING"){if(Sn.movementMode==="FLUID"){rt.scroll(Sn);return}Sn.scrollJumpRequest&&it(Sn)}},Ft={scroll:vt,start:rt.start,stop:rt.stop};return Ft},el="data-rbd",$o=function(){var ve=el+"-drag-handle";return{base:ve,draggableId:ve+"-draggable-id",contextId:ve+"-context-id"}}(),oa=function(){var ve=el+"-draggable";return{base:ve,contextId:ve+"-context-id",id:ve+"-id"}}(),la=function(){var ve=el+"-droppable";return{base:ve,contextId:ve+"-context-id",id:ve+"-id"}}(),qr={contextId:el+"-scroll-container-context-id"},fo=function(xe){return function(Ae){return"["+Ae+'="'+xe+'"]'}},Vo=function(xe,Ae){return xe.map(function(je){var rt=je.styles[Ae];return rt?je.selector+" { "+rt+" }":""}).join(" ")},Xa="pointer-events: none;",ss=function(ve){var xe=fo(ve),Ae=function(){var Ft=`
cursor: -webkit-grab;
cursor: grab;
`;return{selector:xe($o.contextId),styles:{always:`
-webkit-touch-callout: none;
-webkit-tap-highlight-color: rgba(0,0,0,0);
touch-action: manipulation;
`,resting:Ft,dragging:Xa,dropAnimating:Ft}}}(),je=function(){var Ft=`
transition: `+$t.outOfTheWay+`;
`;return{selector:xe(oa.contextId),styles:{dragging:Ft,dropAnimating:Ft,userCancel:Ft}}}(),rt={selector:xe(la.contextId),styles:{always:"overflow-anchor: none;"}},it={selector:"body",styles:{dragging:`
cursor: grabbing;
cursor: -webkit-grabbing;
user-select: none;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
overflow-anchor: none;
`}},vt=[je,Ae,rt,it];return{always:Vo(vt,"always"),resting:Vo(vt,"resting"),dragging:Vo(vt,"dragging"),dropAnimating:Vo(vt,"dropAnimating"),userCancel:Vo(vt,"userCancel")}},va=typeof window!="undefined"&&typeof window.document!="undefined"&&typeof window.document.createElement!="undefined"?le.useLayoutEffect:le.useEffect,ll=function(){var xe=document.querySelector("head");return xe||Pi(!1),xe},Nl=function(xe){var Ae=document.createElement("style");return xe&&Ae.setAttribute("nonce",xe),Ae.type="text/css",Ae};function Us(ve,xe){var Ae=jn(function(){return ss(ve)},[ve]),je=(0,le.useRef)(null),rt=(0,le.useRef)(null),it=yn(Ji(function(an){var nn=rt.current;nn||Pi(!1),nn.textContent=an}),[]),vt=yn(function(an){var nn=je.current;nn||Pi(!1),nn.textContent=an},[]);va(function(){!je.current&&!rt.current||Pi(!1);var an=Nl(xe),nn=Nl(xe);return je.current=an,rt.current=nn,an.setAttribute(el+"-always",ve),nn.setAttribute(el+"-dynamic",ve),ll().appendChild(an),ll().appendChild(nn),vt(Ae.always),it(Ae.resting),function(){var Bn=function(Hr){var eo=Hr.current;eo||Pi(!1),ll().removeChild(eo),Hr.current=null};Bn(je),Bn(rt)}},[xe,vt,it,Ae.always,Ae.resting,ve]);var Ft=yn(function(){return it(Ae.dragging)},[it,Ae.dragging]),qt=yn(function(an){if(an==="DROP"){it(Ae.dropAnimating);return}it(Ae.userCancel)},[it,Ae.dropAnimating,Ae.userCancel]),Sn=yn(function(){rt.current&&it(Ae.resting)},[it,Ae.resting]),cn=jn(function(){return{dragging:Ft,dropping:qt,resting:Sn}},[Ft,qt,Sn]);return cn}var Zl=function(ve){return ve&&ve.ownerDocument?ve.ownerDocument.defaultView:window};function $s(ve){return ve instanceof Zl(ve).HTMLElement}function pl(ve,xe){var Ae="["+$o.contextId+'="'+ve+'"]',je=fl(document.querySelectorAll(Ae));if(!je.length)return null;var rt=es(je,function(it){return it.getAttribute($o.draggableId)===xe});return!rt||!$s(rt)?null:rt}function xl(ve){var xe=(0,le.useRef)({}),Ae=(0,le.useRef)(null),je=(0,le.useRef)(null),rt=(0,le.useRef)(!1),it=yn(function(nn,Bn){var Ei={id:nn,focus:Bn};return xe.current[nn]=Ei,function(){var eo=xe.current,So=eo[nn];So!==Ei&&delete eo[nn]}},[]),vt=yn(function(nn){var Bn=pl(ve,nn);Bn&&Bn!==document.activeElement&&Bn.focus()},[ve]),Ft=yn(function(nn,Bn){Ae.current===nn&&(Ae.current=Bn)},[]),qt=yn(function(){je.current||rt.current&&(je.current=requestAnimationFrame(function(){je.current=null;var nn=Ae.current;nn&&vt(nn)}))},[vt]),Sn=yn(function(nn){Ae.current=null;var Bn=document.activeElement;Bn&&Bn.getAttribute($o.draggableId)===nn&&(Ae.current=nn)},[]);va(function(){return rt.current=!0,function(){rt.current=!1;var nn=je.current;nn&&cancelAnimationFrame(nn)}},[]);var cn=jn(function(){return{register:it,tryRecordFocus:Sn,tryRestoreFocusRecorded:qt,tryShiftRecord:Ft}},[it,Sn,qt,Ft]);return cn}function ru(){var ve={draggables:{},droppables:{}},xe=[];function Ae(an){return xe.push(an),function(){var Bn=xe.indexOf(an);Bn!==-1&&xe.splice(Bn,1)}}function je(an){xe.length&&xe.forEach(function(nn){return nn(an)})}function rt(an){return ve.draggables[an]||null}function it(an){var nn=rt(an);return nn||Pi(!1),nn}var vt={register:function(nn){ve.draggables[nn.descriptor.id]=nn,je({type:"ADDITION",value:nn})},update:function(nn,Bn){var Ei=ve.draggables[Bn.descriptor.id];Ei&&Ei.uniqueId===nn.uniqueId&&(delete ve.draggables[Bn.descriptor.id],ve.draggables[nn.descriptor.id]=nn)},unregister:function(nn){var Bn=nn.descriptor.id,Ei=rt(Bn);Ei&&nn.uniqueId===Ei.uniqueId&&(delete ve.draggables[Bn],je({type:"REMOVAL",value:nn}))},getById:it,findById:rt,exists:function(nn){return!!rt(nn)},getAllByType:function(nn){return bs(ve.draggables).filter(function(Bn){return Bn.descriptor.type===nn})}};function Ft(an){return ve.droppables[an]||null}function qt(an){var nn=Ft(an);return nn||Pi(!1),nn}var Sn={register:function(nn){ve.droppables[nn.descriptor.id]=nn},unregister:function(nn){var Bn=Ft(nn.descriptor.id);Bn&&nn.uniqueId===Bn.uniqueId&&delete ve.droppables[nn.descriptor.id]},getById:qt,findById:Ft,exists:function(nn){return!!Ft(nn)},getAllByType:function(nn){return bs(ve.droppables).filter(function(Bn){return Bn.descriptor.type===nn})}};function cn(){ve.draggables={},ve.droppables={},xe.length=0}return{draggable:vt,droppable:Sn,subscribe:Ae,clean:cn}}function Ll(){var ve=jn(ru,[]);return(0,le.useEffect)(function(){return function(){requestAnimationFrame(ve.clean)}},[ve]),ve}var wl=le.createContext(null),Ks=function(){var ve=document.body;return ve||Pi(!1),ve},Pl={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},xu=function(xe){return"rbd-announcement-"+xe};function Cu(ve){var xe=jn(function(){return xu(ve)},[ve]),Ae=(0,le.useRef)(null);(0,le.useEffect)(function(){var it=document.createElement("div");return Ae.current=it,it.id=xe,it.setAttribute("aria-live","assertive"),it.setAttribute("aria-atomic","true"),(0,At.Z)(it.style,Pl),Ks().appendChild(it),function(){setTimeout(function(){var qt=Ks();qt.contains(it)&&qt.removeChild(it),it===Ae.current&&(Ae.current=null)})}},[xe]);var je=yn(function(rt){var it=Ae.current;if(it){it.textContent=rt;return}},[]);return je}var ta=0,Io={separator:"::"};function Ko(){ta=0}function gs(ve,xe){return xe===void 0&&(xe=Io),jn(function(){return""+ve+xe.separator+ta++},[xe.separator,ve])}function Ml(ve){var xe=ve.contextId,Ae=ve.uniqueId;return"rbd-hidden-text-"+xe+"-"+Ae}function Vl(ve){var xe=ve.contextId,Ae=ve.text,je=gs("hidden-text",{separator:"-"}),rt=jn(function(){return Ml({contextId:xe,uniqueId:je})},[je,xe]);return(0,le.useEffect)(function(){var vt=document.createElement("div");return vt.id=rt,vt.textContent=Ae,vt.style.display="none",Ks().appendChild(vt),function(){var qt=Ks();qt.contains(vt)&&qt.removeChild(vt)}},[rt,Ae]),rt}var wu=le.createContext(null),Gt={react:"^16.8.5","react-dom":"^16.8.5"},Uu=/(\d+)\.(\d+)\.(\d+)/,Ql=function(xe){var Ae=Uu.exec(xe);Ae==null&&Pi(!1);var je=Number(Ae[1]),rt=Number(Ae[2]),it=Number(Ae[3]);return{major:je,minor:rt,patch:it,raw:xe}},$u=function(xe,Ae){return Ae.major>xe.major?!0:Ae.major<xe.major?!1:Ae.minor>xe.minor?!0:Ae.minor<xe.minor?!1:Ae.patch>=xe.patch},Ic=function(ve,xe){var Ae=Ql(ve),je=Ql(xe);$u(Ae,je)},tu=`
We expect a html5 doctype: <!doctype html>
This is to ensure consistent browser layout and measurement
More information: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/doctype.md
`,Ra=function(ve){var xe=ve.doctype;xe&&(xe.name.toLowerCase(),xe.publicId)};function Ys(ve){}function Ba(ve,xe){}function ou(){Ba(function(){Ic(Gt.react,le.version),Ra(document)},[])}function Nu(ve){var xe=(0,le.useRef)(ve);return(0,le.useEffect)(function(){xe.current=ve}),xe}function Ua(){var ve=null;function xe(){return!!ve}function Ae(vt){return vt===ve}function je(vt){ve&&Pi(!1);var Ft={abandon:vt};return ve=Ft,Ft}function rt(){ve||Pi(!1),ve=null}function it(){ve&&(ve.abandon(),rt())}return{isClaimed:xe,isActive:Ae,claim:je,release:rt,tryAbandon:it}}var Ms=9,us=13,fs=27,gl=32,tl=33,nc=34,Rc=35,_u=36,au=37,jc=38,Fc=39,Ou=40,kd,Is=(kd={},kd[us]=!0,kd[Ms]=!0,kd),Qa=function(ve){Is[ve.keyCode]&&ve.preventDefault()},jl=function(){var ve="visibilitychange";if(typeof document=="undefined")return ve;var xe=[ve,"ms"+ve,"webkit"+ve,"moz"+ve,"o"+ve],Ae=es(xe,function(je){return"on"+je in document});return Ae||ve}(),ic=0,Bu=5;function Ku(ve,xe){return Math.abs(xe.x-ve.x)>=Bu||Math.abs(xe.y-ve.y)>=Bu}var pu={type:"IDLE"};function fd(ve){var xe=ve.cancel,Ae=ve.completed,je=ve.getPhase,rt=ve.setPhase;return[{eventName:"mousemove",fn:function(vt){var Ft=vt.button,qt=vt.clientX,Sn=vt.clientY;if(Ft===ic){var cn={x:qt,y:Sn},an=je();if(an.type==="DRAGGING"){vt.preventDefault(),an.actions.move(cn);return}an.type!=="PENDING"&&Pi(!1);var nn=an.point;if(Ku(nn,cn)){vt.preventDefault();var Bn=an.actions.fluidLift(cn);rt({type:"DRAGGING",actions:Bn})}}}},{eventName:"mouseup",fn:function(vt){var Ft=je();if(Ft.type!=="DRAGGING"){xe();return}vt.preventDefault(),Ft.actions.drop({shouldBlockNextClick:!0}),Ae()}},{eventName:"mousedown",fn:function(vt){je().type==="DRAGGING"&&vt.preventDefault(),xe()}},{eventName:"keydown",fn:function(vt){var Ft=je();if(Ft.type==="PENDING"){xe();return}if(vt.keyCode===fs){vt.preventDefault(),xe();return}Qa(vt)}},{eventName:"resize",fn:xe},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){je().type==="PENDING"&&xe()}},{eventName:"webkitmouseforcedown",fn:function(vt){var Ft=je();if(Ft.type==="IDLE"&&Pi(!1),Ft.actions.shouldRespectForcePress()){xe();return}vt.preventDefault()}},{eventName:jl,fn:xe}]}function Dl(ve){var xe=(0,le.useRef)(pu),Ae=(0,le.useRef)(Wt),je=jn(function(){return{eventName:"mousedown",fn:function(an){if(!an.defaultPrevented&&an.button===ic&&!(an.ctrlKey||an.metaKey||an.shiftKey||an.altKey)){var nn=ve.findClosestDraggableId(an);if(nn){var Bn=ve.tryGetLock(nn,vt,{sourceEvent:an});if(Bn){an.preventDefault();var Ei={x:an.clientX,y:an.clientY};Ae.current(),Sn(Bn,Ei)}}}}}},[ve]),rt=jn(function(){return{eventName:"webkitmouseforcewillbegin",fn:function(an){if(!an.defaultPrevented){var nn=ve.findClosestDraggableId(an);if(nn){var Bn=ve.findOptionsForDraggable(nn);Bn&&(Bn.shouldRespectForcePress||ve.canGetLock(nn)&&an.preventDefault())}}}}},[ve]),it=yn(function(){var an={passive:!1,capture:!0};Ae.current=pr(window,[rt,je],an)},[rt,je]),vt=yn(function(){var cn=xe.current;cn.type!=="IDLE"&&(xe.current=pu,Ae.current(),it())},[it]),Ft=yn(function(){var cn=xe.current;vt(),cn.type==="DRAGGING"&&cn.actions.cancel({shouldBlockNextClick:!0}),cn.type==="PENDING"&&cn.actions.abort()},[vt]),qt=yn(function(){var an={capture:!0,passive:!1},nn=fd({cancel:Ft,completed:vt,getPhase:function(){return xe.current},setPhase:function(Ei){xe.current=Ei}});Ae.current=pr(window,nn,an)},[Ft,vt]),Sn=yn(function(an,nn){xe.current.type!=="IDLE"&&Pi(!1),xe.current={type:"PENDING",point:nn,actions:an},qt()},[qt]);va(function(){return it(),function(){Ae.current()}},[it])}var zc;function qh(){}var Dd=(zc={},zc[nc]=!0,zc[tl]=!0,zc[_u]=!0,zc[Rc]=!0,zc);function gh(ve,xe){function Ae(){xe(),ve.cancel()}function je(){xe(),ve.drop()}return[{eventName:"keydown",fn:function(it){if(it.keyCode===fs){it.preventDefault(),Ae();return}if(it.keyCode===gl){it.preventDefault(),je();return}if(it.keyCode===Ou){it.preventDefault(),ve.moveDown();return}if(it.keyCode===jc){it.preventDefault(),ve.moveUp();return}if(it.keyCode===Fc){it.preventDefault(),ve.moveRight();return}if(it.keyCode===au){it.preventDefault(),ve.moveLeft();return}if(Dd[it.keyCode]){it.preventDefault();return}Qa(it)}},{eventName:"mousedown",fn:Ae},{eventName:"mouseup",fn:Ae},{eventName:"click",fn:Ae},{eventName:"touchstart",fn:Ae},{eventName:"resize",fn:Ae},{eventName:"wheel",fn:Ae,options:{passive:!0}},{eventName:jl,fn:Ae}]}function rh(ve){var xe=(0,le.useRef)(qh),Ae=jn(function(){return{eventName:"keydown",fn:function(it){if(it.defaultPrevented||it.keyCode!==gl)return;var vt=ve.findClosestDraggableId(it);if(!vt)return;var Ft=ve.tryGetLock(vt,cn,{sourceEvent:it});if(!Ft)return;it.preventDefault();var qt=!0,Sn=Ft.snapLift();xe.current();function cn(){qt||Pi(!1),qt=!1,xe.current(),je()}xe.current=pr(window,gh(Sn,cn),{capture:!0,passive:!1})}}},[ve]),je=yn(function(){var it={passive:!1,capture:!0};xe.current=pr(window,[Ae],it)},[Ae]);va(function(){return je(),function(){xe.current()}},[je])}var ph={type:"IDLE"},mh=120,ef=.15;function wd(ve){var xe=ve.cancel,Ae=ve.getPhase;return[{eventName:"orientationchange",fn:xe},{eventName:"resize",fn:xe},{eventName:"contextmenu",fn:function(rt){rt.preventDefault()}},{eventName:"keydown",fn:function(rt){if(Ae().type!=="DRAGGING"){xe();return}rt.keyCode===fs&&rt.preventDefault(),xe()}},{eventName:jl,fn:xe}]}function oh(ve){var xe=ve.cancel,Ae=ve.completed,je=ve.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(it){var vt=je();if(vt.type!=="DRAGGING"){xe();return}vt.hasMoved=!0;var Ft=it.touches[0],qt=Ft.clientX,Sn=Ft.clientY,cn={x:qt,y:Sn};it.preventDefault(),vt.actions.move(cn)}},{eventName:"touchend",fn:function(it){var vt=je();if(vt.type!=="DRAGGING"){xe();return}it.preventDefault(),vt.actions.drop({shouldBlockNextClick:!0}),Ae()}},{eventName:"touchcancel",fn:function(it){if(je().type!=="DRAGGING"){xe();return}it.preventDefault(),xe()}},{eventName:"touchforcechange",fn:function(it){var vt=je();vt.type==="IDLE"&&Pi(!1);var Ft=it.touches[0];if(Ft){var qt=Ft.force>=ef;if(qt){var Sn=vt.actions.shouldRespectForcePress();if(vt.type==="PENDING"){Sn&&xe();return}if(Sn){if(vt.hasMoved){it.preventDefault();return}xe();return}it.preventDefault()}}}},{eventName:jl,fn:xe}]}function tf(ve){var xe=(0,le.useRef)(ph),Ae=(0,le.useRef)(Wt),je=yn(function(){return xe.current},[]),rt=yn(function(Bn){xe.current=Bn},[]),it=jn(function(){return{eventName:"touchstart",fn:function(Bn){if(!Bn.defaultPrevented){var Ei=ve.findClosestDraggableId(Bn);if(Ei){var Hr=ve.tryGetLock(Ei,Ft,{sourceEvent:Bn});if(Hr){var eo=Bn.touches[0],So=eo.clientX,Zo=eo.clientY,ya={x:So,y:Zo};Ae.current(),an(Hr,ya)}}}}}},[ve]),vt=yn(function(){var Bn={capture:!0,passive:!1};Ae.current=pr(window,[it],Bn)},[it]),Ft=yn(function(){var nn=xe.current;nn.type!=="IDLE"&&(nn.type==="PENDING"&&clearTimeout(nn.longPressTimerId),rt(ph),Ae.current(),vt())},[vt,rt]),qt=yn(function(){var nn=xe.current;Ft(),nn.type==="DRAGGING"&&nn.actions.cancel({shouldBlockNextClick:!0}),nn.type==="PENDING"&&nn.actions.abort()},[Ft]),Sn=yn(function(){var Bn={capture:!0,passive:!1},Ei={cancel:qt,completed:Ft,getPhase:je},Hr=pr(window,oh(Ei),Bn),eo=pr(window,wd(Ei),Bn);Ae.current=function(){Hr(),eo()}},[qt,je,Ft]),cn=yn(function(){var Bn=je();Bn.type!=="PENDING"&&Pi(!1);var Ei=Bn.actions.fluidLift(Bn.point);rt({type:"DRAGGING",actions:Ei,hasMoved:!1})},[je,rt]),an=yn(function(Bn,Ei){je().type!=="IDLE"&&Pi(!1);var Hr=setTimeout(cn,mh);rt({type:"PENDING",point:Ei,actions:Bn,longPressTimerId:Hr}),Sn()},[Sn,je,rt,cn]);va(function(){return vt(),function(){Ae.current();var Ei=je();Ei.type==="PENDING"&&(clearTimeout(Ei.longPressTimerId),rt(ph))}},[je,vt,rt]),va(function(){var Bn=pr(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}]);return Bn},[])}function nf(ve){}var _h={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function Pd(ve,xe){if(xe==null)return!1;var Ae=!!_h[xe.tagName.toLowerCase()];if(Ae)return!0;var je=xe.getAttribute("contenteditable");return je==="true"||je===""?!0:xe===ve?!1:Pd(ve,xe.parentElement)}function ml(ve,xe){var Ae=xe.target;return $s(Ae)?Pd(ve,Ae):!1}var Xs=function(ve){return Nr(ve.getBoundingClientRect()).center};function cc(ve){return ve instanceof Zl(ve).Element}var mu=function(){var ve="matches";if(typeof document=="undefined")return ve;var xe=[ve,"msMatchesSelector","webkitMatchesSelector"],Ae=es(xe,function(je){return je in Element.prototype});return Ae||ve}();function ku(ve,xe){return ve==null?null:ve[mu](xe)?ve:ku(ve.parentElement,xe)}function qu(ve,xe){return ve.closest?ve.closest(xe):ku(ve,xe)}function Gc(ve){return"["+$o.contextId+'="'+ve+'"]'}function dc(ve,xe){var Ae=xe.target;if(!cc(Ae))return null;var je=Gc(ve),rt=qu(Ae,je);return!rt||!$s(rt)?null:rt}function Td(ve,xe){var Ae=dc(ve,xe);return Ae?Ae.getAttribute($o.draggableId):null}function hc(ve,xe){var Ae="["+oa.contextId+'="'+ve+'"]',je=fl(document.querySelectorAll(Ae)),rt=es(je,function(it){return it.getAttribute(oa.id)===xe});return!rt||!$s(rt)?null:rt}function _d(ve){ve.preventDefault()}function Ed(ve){var xe=ve.expected,Ae=ve.phase,je=ve.isLockActive,rt=ve.shouldWarn;return!(!je()||xe!==Ae)}function vh(ve){var xe=ve.lockAPI,Ae=ve.store,je=ve.registry,rt=ve.draggableId;if(xe.isClaimed())return!1;var it=je.draggable.findById(rt);return!(!it||!it.options.isEnabled||!cr(Ae.getState(),rt))}function wg(ve){var xe=ve.lockAPI,Ae=ve.contextId,je=ve.store,rt=ve.registry,it=ve.draggableId,vt=ve.forceSensorStop,Ft=ve.sourceEvent,qt=vh({lockAPI:xe,store:je,registry:rt,draggableId:it});if(!qt)return null;var Sn=rt.draggable.getById(it),cn=hc(Ae,Sn.descriptor.id);if(!cn||Ft&&!Sn.options.canDragInteractiveElements&&ml(cn,Ft))return null;var an=xe.claim(vt||Wt),nn="PRE_DRAG";function Bn(){return Sn.options.shouldRespectForcePress}function Ei(){return xe.isActive(an)}function Hr(Hs,vl){Ed({expected:Hs,phase:nn,isLockActive:Ei,shouldWarn:!0})&&je.dispatch(vl())}var eo=Hr.bind(null,"DRAGGING");function So(Hs){function vl(){xe.release(),nn="COMPLETED"}nn!=="PRE_DRAG"&&(vl(),nn!=="PRE_DRAG"&&Pi(!1)),je.dispatch(Fr(Hs.liftActionArgs)),nn="DRAGGING";function zu(dl,Du){if(Du===void 0&&(Du={shouldBlockNextClick:!1}),Hs.cleanup(),Du.shouldBlockNextClick){var Mc=pr(window,[{eventName:"click",fn:_d,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(Mc)}vl(),je.dispatch(Rl({reason:dl}))}return(0,At.Z)({isActive:function(){return Ed({expected:"DRAGGING",phase:nn,isLockActive:Ei,shouldWarn:!1})},shouldRespectForcePress:Bn,drop:function(Du){return zu("DROP",Du)},cancel:function(Du){return zu("CANCEL",Du)}},Hs.actions)}function Zo(Hs){var vl=Zt(function(dl){eo(function(){return aa({client:dl})})}),zu=So({liftActionArgs:{id:it,clientSelection:Hs,movementMode:"FLUID"},cleanup:function(){return vl.cancel()},actions:{move:vl}});return(0,At.Z)({},zu,{move:vl})}function ya(){var Hs={moveUp:function(){return eo(Kr)},moveRight:function(){return eo(Fo)},moveDown:function(){return eo(Xl)},moveLeft:function(){return eo(Da)}};return So({liftActionArgs:{id:it,clientSelection:Xs(cn),movementMode:"SNAP"},cleanup:Wt,actions:Hs})}function ua(){var Hs=Ed({expected:"PRE_DRAG",phase:nn,isLockActive:Ei,shouldWarn:!0});Hs&&xe.release()}var Ja={isActive:function(){return Ed({expected:"PRE_DRAG",phase:nn,isLockActive:Ei,shouldWarn:!1})},shouldRespectForcePress:Bn,fluidLift:Zo,snapLift:ya,abort:ua};return Ja}var Pg=[Dl,rh,tf];function Hp(ve){var xe=ve.contextId,Ae=ve.store,je=ve.registry,rt=ve.customSensors,it=ve.enableDefaultSensors,vt=[].concat(it?Pg:[],rt||[]),Ft=(0,le.useState)(function(){return Ua()})[0],qt=yn(function(Zo,ya){Zo.isDragging&&!ya.isDragging&&Ft.tryAbandon()},[Ft]);va(function(){var Zo=Ae.getState(),ya=Ae.subscribe(function(){var ua=Ae.getState();qt(Zo,ua),Zo=ua});return ya},[Ft,Ae,qt]),va(function(){return Ft.tryAbandon},[Ft.tryAbandon]);var Sn=yn(function(So){return vh({lockAPI:Ft,registry:je,store:Ae,draggableId:So})},[Ft,je,Ae]),cn=yn(function(So,Zo,ya){return wg({lockAPI:Ft,registry:je,contextId:xe,store:Ae,draggableId:So,forceSensorStop:Zo,sourceEvent:ya&&ya.sourceEvent?ya.sourceEvent:null})},[xe,Ft,je,Ae]),an=yn(function(So){return Td(xe,So)},[xe]),nn=yn(function(So){var Zo=je.draggable.findById(So);return Zo?Zo.options:null},[je.draggable]),Bn=yn(function(){Ft.isClaimed()&&(Ft.tryAbandon(),Ae.getState().phase!=="IDLE"&&Ae.dispatch(jo()))},[Ft,Ae]),Ei=yn(Ft.isClaimed,[Ft]),Hr=jn(function(){return{canGetLock:Sn,tryGetLock:cn,findClosestDraggableId:an,findOptionsForDraggable:nn,tryReleaseLock:Bn,isLockClaimed:Ei}},[Sn,cn,an,nn,Bn,Ei]);nf(vt);for(var eo=0;eo<vt.length;eo++)vt[eo](Hr)}var qg=function(xe){return{onBeforeCapture:xe.onBeforeCapture,onBeforeDragStart:xe.onBeforeDragStart,onDragStart:xe.onDragStart,onDragEnd:xe.onDragEnd,onDragUpdate:xe.onDragUpdate}};function yh(ve){return ve.current||Pi(!1),ve.current}function tg(ve){var xe=ve.contextId,Ae=ve.setCallbacks,je=ve.sensors,rt=ve.nonce,it=ve.dragHandleUsageInstructions,vt=(0,le.useRef)(null);ou();var Ft=Nu(ve),qt=yn(function(){return qg(Ft.current)},[Ft]),Sn=Cu(xe),cn=Vl({contextId:xe,text:it}),an=Us(xe,rt),nn=yn(function(dl){yh(vt).dispatch(dl)},[]),Bn=jn(function(){return(0,wt.DE)({publishWhileDragging:yr,updateDroppableScroll:Xi,updateDroppableIsEnabled:Gr,updateDroppableIsCombineEnabled:mo,collectionStarting:vo},nn)},[nn]),Ei=Ll(),Hr=jn(function(){return zi(Ei,Bn)},[Ei,Bn]),eo=jn(function(){return Wl((0,At.Z)({scrollWindow:Er,scrollDroppable:Hr.scrollDroppable},(0,wt.DE)({move:aa},nn)))},[Hr.scrollDroppable,nn]),So=xl(xe),Zo=jn(function(){return vn({announce:Sn,autoScroller:eo,dimensionMarshal:Hr,focusMarshal:So,getResponders:qt,styleMarshal:an})},[Sn,eo,Hr,So,qt,an]);vt.current=Zo;var ya=yn(function(){var dl=yh(vt),Du=dl.getState();Du.phase!=="IDLE"&&dl.dispatch(jo())},[]),ua=yn(function(){var dl=yh(vt).getState();return dl.isDragging||dl.phase==="DROP_ANIMATING"},[]),Ja=jn(function(){return{isDragging:ua,tryAbort:ya}},[ua,ya]);Ae(Ja);var Hs=yn(function(dl){return cr(yh(vt).getState(),dl)},[]),vl=yn(function(){return Do(yh(vt).getState())},[]),zu=jn(function(){return{marshal:Hr,focus:So,contextId:xe,canLift:Hs,isMovementAllowed:vl,dragHandleUsageInstructionsId:cn,registry:Ei}},[xe,Hr,cn,So,Hs,vl,Ei]);return Hp({contextId:xe,store:Zo,registry:Ei,customSensors:je,enableDefaultSensors:ve.enableDefaultSensors!==!1}),(0,le.useEffect)(function(){return ya},[ya]),le.createElement(wu.Provider,{value:zu},le.createElement(ce,{context:wl,store:Zo},ve.children))}var Lf=0;function ep(){Lf=0}function ng(){return jn(function(){return""+Lf++},[])}function Oh(){ep(),Ko()}function Eg(ve){var xe=ng(),Ae=ve.dragHandleUsageInstructions||zl.dragHandleUsageInstructions;return le.createElement(xs,null,function(je){return le.createElement(tg,{nonce:ve.nonce,contextId:xe,setCallbacks:je,dragHandleUsageInstructions:Ae,enableDefaultSensors:ve.enableDefaultSensors,sensors:ve.sensors,onBeforeCapture:ve.onBeforeCapture,onBeforeDragStart:ve.onBeforeDragStart,onDragStart:ve.onDragStart,onDragUpdate:ve.onDragUpdate,onDragEnd:ve.onDragEnd},ve.children)})}var Ih=function(xe){return function(Ae){return xe===Ae}},tp=Ih("scroll"),ig=Ih("auto"),np=Ih("visible"),ul=function(xe,Ae){return Ae(xe.overflowX)||Ae(xe.overflowY)},rf=function(xe,Ae){return Ae(xe.overflowX)&&Ae(xe.overflowY)},Sh=function(xe){var Ae=window.getComputedStyle(xe),je={overflowX:Ae.overflowX,overflowY:Ae.overflowY};return ul(je,tp)||ul(je,ig)},Yu=function(){return!1;var xe,Ae,je,rt},Lc=function ve(xe){return xe==null?null:xe===document.body?Yu()?xe:null:xe===document.documentElement?null:Sh(xe)?xe:ve(xe.parentElement)},of=function(ve){if(ve)var xe=Lc(ve.parentElement)},Rh=function(ve){return{x:ve.scrollLeft,y:ve.scrollTop}},Cg=function ve(xe){if(!xe)return!1;var Ae=window.getComputedStyle(xe);return Ae.position==="fixed"?!0:ve(xe.parentElement)},bg=function(ve){var xe=Lc(ve),Ae=Cg(ve);return{closestScrollable:xe,isFixedOnPage:Ae}},Fg=function(ve){var xe=ve.descriptor,Ae=ve.isEnabled,je=ve.isCombineEnabled,rt=ve.isFixedOnPage,it=ve.direction,vt=ve.client,Ft=ve.page,qt=ve.closest,Sn=function(){if(!qt)return null;var Bn=qt.scrollSize,Ei=qt.client,Hr=yi({scrollHeight:Bn.scrollHeight,scrollWidth:Bn.scrollWidth,height:Ei.paddingBox.height,width:Ei.paddingBox.width});return{pageMarginBox:qt.page.marginBox,frameClient:Ei,scrollSize:Bn,shouldClipSubject:qt.shouldClipSubject,scroll:{initial:qt.scroll,current:qt.scroll,max:Hr,diff:{value:ms,displacement:ms}}}}(),cn=it==="vertical"?Fn:Bo,an=Sl({page:Ft,withPlaceholder:null,axis:cn,frame:Sn}),nn={descriptor:xe,isCombineEnabled:je,isFixedOnPage:rt,axis:cn,isEnabled:Ae,client:vt,page:Ft,frame:Sn,subject:an};return nn},Lg=function(xe,Ae){var je=gn(xe);if(!Ae||xe!==Ae)return je;var rt=je.paddingBox.top-Ae.scrollTop,it=je.paddingBox.left-Ae.scrollLeft,vt=rt+Ae.scrollHeight,Ft=it+Ae.scrollWidth,qt={top:rt,right:Ft,bottom:vt,left:it},Sn=Xo(qt,je.border),cn=vr({borderBox:Sn,margin:je.margin,border:je.border,padding:je.padding});return cn},Mg=function(ve){var xe=ve.ref,Ae=ve.descriptor,je=ve.env,rt=ve.windowScroll,it=ve.direction,vt=ve.isDropDisabled,Ft=ve.isCombineEnabled,qt=ve.shouldClipSubject,Sn=je.closestScrollable,cn=Lg(xe,Sn),an=Ee(cn,rt),nn=function(){if(!Sn)return null;var Ei=gn(Sn),Hr={scrollHeight:Sn.scrollHeight,scrollWidth:Sn.scrollWidth};return{client:Ei,page:Ee(Ei,rt),scroll:Rh(Sn),scrollSize:Hr,shouldClipSubject:qt}}(),Bn=Fg({descriptor:Ae,isEnabled:!vt,isCombineEnabled:Ft,isFixedOnPage:je.isFixedOnPage,direction:it,client:cn,page:an,closest:nn});return Bn},xh={passive:!1},Mf={passive:!0},ah=function(ve){return ve.shouldPublishImmediately?xh:Mf};function Cl(ve){var xe=(0,le.useContext)(ve);return xe||Pi(!1),xe}var jh=function(xe){return xe&&xe.env.closestScrollable||null};function Ag(ve){var xe=(0,le.useRef)(null),Ae=Cl(wu),je=gs("droppable"),rt=Ae.registry,it=Ae.marshal,vt=Nu(ve),Ft=jn(function(){return{id:ve.droppableId,type:ve.type,mode:ve.mode}},[ve.droppableId,ve.mode,ve.type]),qt=(0,le.useRef)(Ft),Sn=jn(function(){return Ji(function(ua,Ja){xe.current||Pi(!1);var Hs={x:ua,y:Ja};it.updateDroppableScroll(Ft.id,Hs)})},[Ft.id,it]),cn=yn(function(){var ua=xe.current;return!ua||!ua.env.closestScrollable?ms:Rh(ua.env.closestScrollable)},[]),an=yn(function(){var ua=cn();Sn(ua.x,ua.y)},[cn,Sn]),nn=jn(function(){return Zt(an)},[an]),Bn=yn(function(){var ua=xe.current,Ja=jh(ua);ua&&Ja||Pi(!1);var Hs=ua.scrollOptions;if(Hs.shouldPublishImmediately){an();return}nn()},[nn,an]),Ei=yn(function(ua,Ja){xe.current&&Pi(!1);var Hs=vt.current,vl=Hs.getDroppableRef();vl||Pi(!1);var zu=bg(vl),dl={ref:vl,descriptor:Ft,env:zu,scrollOptions:Ja};xe.current=dl;var Du=Mg({ref:vl,descriptor:Ft,env:zu,windowScroll:ua,direction:Hs.direction,isDropDisabled:Hs.isDropDisabled,isCombineEnabled:Hs.isCombineEnabled,shouldClipSubject:!Hs.ignoreContainerClipping}),Mc=zu.closestScrollable;return Mc&&(Mc.setAttribute(qr.contextId,Ae.contextId),Mc.addEventListener("scroll",Bn,ah(dl.scrollOptions))),Du},[Ae.contextId,Ft,Bn,vt]),Hr=yn(function(){var ua=xe.current,Ja=jh(ua);return ua&&Ja||Pi(!1),Rh(Ja)},[]),eo=yn(function(){var ua=xe.current;ua||Pi(!1);var Ja=jh(ua);xe.current=null,Ja&&(nn.cancel(),Ja.removeAttribute(qr.contextId),Ja.removeEventListener("scroll",Bn,ah(ua.scrollOptions)))},[Bn,nn]),So=yn(function(ua){var Ja=xe.current;Ja||Pi(!1);var Hs=jh(Ja);Hs||Pi(!1),Hs.scrollTop+=ua.y,Hs.scrollLeft+=ua.x},[]),Zo=jn(function(){return{getDimensionAndWatchScroll:Ei,getScrollWhileDragging:Hr,dragStopped:eo,scroll:So}},[eo,Ei,Hr,So]),ya=jn(function(){return{uniqueId:je,descriptor:Ft,callbacks:Zo}},[Zo,Ft,je]);va(function(){return qt.current=ya.descriptor,rt.droppable.register(ya),function(){xe.current&&eo(),rt.droppable.unregister(ya)}},[Zo,Ft,eo,ya,it,rt.droppable]),va(function(){xe.current&&it.updateDroppableIsEnabled(qt.current.id,!ve.isDropDisabled)},[ve.isDropDisabled,it]),va(function(){xe.current&&it.updateDroppableIsCombineEnabled(qt.current.id,ve.isCombineEnabled)},[ve.isCombineEnabled,it])}function wh(){}var zh={width:0,height:0,margin:Un},Af=function(xe){var Ae=xe.isAnimatingOpenOnMount,je=xe.placeholder,rt=xe.animate;return Ae||rt==="close"?zh:{height:je.client.borderBox.height,width:je.client.borderBox.width,margin:je.client.margin}},ip=function(xe){var Ae=xe.isAnimatingOpenOnMount,je=xe.placeholder,rt=xe.animate,it=Af({isAnimatingOpenOnMount:Ae,placeholder:je,animate:rt});return{display:je.display,boxSizing:"border-box",width:it.width,height:it.height,marginTop:it.margin.top,marginRight:it.margin.right,marginBottom:it.margin.bottom,marginLeft:it.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:rt!=="none"?$t.placeholder:null}};function Iu(ve){var xe=(0,le.useRef)(null),Ae=yn(function(){xe.current&&(clearTimeout(xe.current),xe.current=null)},[]),je=ve.animate,rt=ve.onTransitionEnd,it=ve.onClose,vt=ve.contextId,Ft=(0,le.useState)(ve.animate==="open"),qt=Ft[0],Sn=Ft[1];(0,le.useEffect)(function(){return qt?je!=="open"?(Ae(),Sn(!1),wh):xe.current?wh:(xe.current=setTimeout(function(){xe.current=null,Sn(!1)}),Ae):wh},[je,qt,Ae]);var cn=yn(function(nn){nn.propertyName==="height"&&(rt(),je==="close"&&it())},[je,it,rt]),an=ip({isAnimatingOpenOnMount:qt,animate:ve.animate,placeholder:ve.placeholder});return le.createElement(ve.placeholder.tagName,{style:an,"data-rbd-placeholder-context-id":vt,onTransitionEnd:cn,ref:ve.innerRef})}var rp=le.memo(Iu),Ph=le.createContext(null);function Zd(ve){ve&&$s(ve)||Pi(!1)}function Gh(ve){return typeof ve=="boolean"}function ie(ve,xe){xe.forEach(function(Ae){return Ae(ve)})}var ae=[function(xe){var Ae=xe.props;Ae.droppableId||Pi(!1),typeof Ae.droppableId!="string"&&Pi(!1)},function(xe){var Ae=xe.props;Gh(Ae.isDropDisabled)||Pi(!1),Gh(Ae.isCombineEnabled)||Pi(!1),Gh(Ae.ignoreContainerClipping)||Pi(!1)},function(xe){var Ae=xe.getDroppableRef;Zd(Ae())}],fe=[function(xe){var Ae=xe.props,je=xe.getPlaceholderRef;if(Ae.placeholder)var rt=je()}],he=[function(xe){var Ae=xe.props;Ae.renderClone||Pi(!1)},function(xe){var Ae=xe.getPlaceholderRef;Ae()&&Pi(!1)}];function me(ve){Ba(function(){ie(ve,ae),ve.props.mode==="standard"&&ie(ve,fe),ve.props.mode==="virtual"&&ie(ve,he)})}var Ne=function(ve){Lt(xe,ve);function xe(){for(var je,rt=arguments.length,it=new Array(rt),vt=0;vt<rt;vt++)it[vt]=arguments[vt];return je=ve.call.apply(ve,[this].concat(it))||this,je.state={isVisible:!!je.props.on,data:je.props.on,animate:je.props.shouldAnimate&&je.props.on?"open":"none"},je.onClose=function(){je.state.animate==="close"&&je.setState({isVisible:!1})},je}xe.getDerivedStateFromProps=function(rt,it){return rt.shouldAnimate?rt.on?{isVisible:!0,data:rt.on,animate:"open"}:it.isVisible?{isVisible:!0,data:it.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!rt.on,data:rt.on,animate:"none"}};var Ae=xe.prototype;return Ae.render=function(){if(!this.state.isVisible)return null;var rt={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(rt)},xe}(le.PureComponent),Ge={dragging:5e3,dropAnimating:4500},et=function(xe,Ae){return Ae?$t.drop(Ae.duration):xe?$t.snap:$t.fluid},$e=function(xe,Ae){return xe?Ae?bt.opacity.drop:bt.opacity.combining:null},Ct=function(xe){return xe.forceShouldAnimate!=null?xe.forceShouldAnimate:xe.mode==="SNAP"};function sn(ve){var xe=ve.dimension,Ae=xe.client,je=ve.offset,rt=ve.combineWith,it=ve.dropping,vt=!!rt,Ft=Ct(ve),qt=!!it,Sn=qt?Pn.drop(je,vt):Pn.moveTo(je),cn={position:"fixed",top:Ae.marginBox.top,left:Ae.marginBox.left,boxSizing:"border-box",width:Ae.borderBox.width,height:Ae.borderBox.height,transition:et(Ft,it),transform:Sn,opacity:$e(vt,qt),zIndex:qt?Ge.dropAnimating:Ge.dragging,pointerEvents:"none"};return cn}function Dt(ve){return{transform:Pn.moveTo(ve.offset),transition:ve.shouldAnimateDisplacement?null:"none"}}function Hn(ve){return ve.type==="DRAGGING"?sn(ve):Dt(ve)}function Tn(ve,xe,Ae){Ae===void 0&&(Ae=ms);var je=window.getComputedStyle(xe),rt=xe.getBoundingClientRect(),it=on(rt,je),vt=Ee(it,Ae),Ft={client:it,tagName:xe.tagName.toLowerCase(),display:je.display},qt={x:it.marginBox.width,y:it.marginBox.height},Sn={descriptor:ve,placeholder:Ft,displaceBy:qt,client:it,page:vt};return Sn}function ir(ve){var xe=gs("draggable"),Ae=ve.descriptor,je=ve.registry,rt=ve.getDraggableRef,it=ve.canDragInteractiveElements,vt=ve.shouldRespectForcePress,Ft=ve.isEnabled,qt=jn(function(){return{canDragInteractiveElements:it,shouldRespectForcePress:vt,isEnabled:Ft}},[it,Ft,vt]),Sn=yn(function(Bn){var Ei=rt();return Ei||Pi(!1),Tn(Ae,Ei,Bn)},[Ae,rt]),cn=jn(function(){return{uniqueId:xe,descriptor:Ae,options:qt,getDimension:Sn}},[Ae,Sn,qt,xe]),an=(0,le.useRef)(cn),nn=(0,le.useRef)(!0);va(function(){return je.draggable.register(an.current),function(){return je.draggable.unregister(an.current)}},[je.draggable]),va(function(){if(nn.current){nn.current=!1;return}var Bn=an.current;an.current=cn,je.draggable.update(cn,Bn)},[cn,je.draggable])}function dr(ve,xe,Ae){Ba(function(){function je(it){return"Draggable[id: "+it+"]: "}var rt=ve.draggableId;rt||Pi(!1),typeof rt!="string"&&Pi(!1),kl(ve.index)||Pi(!1),ve.mapped.type!=="DRAGGING"&&(Zd(Ae()),ve.isEnabled&&(pl(xe,rt)||Pi(!1)))})}function Mr(ve){}function ao(ve){ve.preventDefault()}function qo(ve){var xe=(0,le.useRef)(null),Ae=yn(function(dl){xe.current=dl},[]),je=yn(function(){return xe.current},[]),rt=Cl(wu),it=rt.contextId,vt=rt.dragHandleUsageInstructionsId,Ft=rt.registry,qt=Cl(Ph),Sn=qt.type,cn=qt.droppableId,an=jn(function(){return{id:ve.draggableId,index:ve.index,type:Sn,droppableId:cn}},[ve.draggableId,ve.index,Sn,cn]),nn=ve.children,Bn=ve.draggableId,Ei=ve.isEnabled,Hr=ve.shouldRespectForcePress,eo=ve.canDragInteractiveElements,So=ve.isClone,Zo=ve.mapped,ya=ve.dropAnimationFinished;if(dr(ve,it,je),Mr(So),!So){var ua=jn(function(){return{descriptor:an,registry:Ft,getDraggableRef:je,canDragInteractiveElements:eo,shouldRespectForcePress:Hr,isEnabled:Ei}},[an,Ft,je,eo,Hr,Ei]);ir(ua)}var Ja=jn(function(){return Ei?{tabIndex:0,role:"button","aria-describedby":vt,"data-rbd-drag-handle-draggable-id":Bn,"data-rbd-drag-handle-context-id":it,draggable:!1,onDragStart:ao}:null},[it,vt,Bn,Ei]),Hs=yn(function(dl){Zo.type==="DRAGGING"&&Zo.dropping&&dl.propertyName==="transform"&&ya()},[ya,Zo]),vl=jn(function(){var dl=Hn(Zo),Du=Zo.type==="DRAGGING"&&Zo.dropping?Hs:null,Mc={innerRef:Ae,draggableProps:{"data-rbd-draggable-context-id":it,"data-rbd-draggable-id":Bn,style:dl,onTransitionEnd:Du},dragHandleProps:Ja};return Mc},[it,Ja,Bn,Zo,Hs,Ae]),zu=jn(function(){return{draggableId:an.id,type:an.type,source:{index:an.index,droppableId:an.droppableId}}},[an.droppableId,an.id,an.index,an.type]);return nn(vl,Zo.snapshot,zu)}var Mo=function(ve,xe){return ve===xe},ga=function(ve){var xe=ve.combine,Ae=ve.destination;return Ae?Ae.droppableId:xe?xe.droppableId:null},is=function(xe){return xe.combine?xe.combine.draggableId:null},Ao=function(xe){return xe.at&&xe.at.type==="COMBINE"?xe.at.combine.draggableId:null};function Rs(){var ve=Ji(function(rt,it){return{x:rt,y:it}}),xe=Ji(function(rt,it,vt,Ft,qt){return{isDragging:!0,isClone:it,isDropAnimating:!!qt,dropAnimation:qt,mode:rt,draggingOver:vt,combineWith:Ft,combineTargetFor:null}}),Ae=Ji(function(rt,it,vt,Ft,qt,Sn,cn){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:qt,combineWith:Sn,mode:it,offset:rt,dimension:vt,forceShouldAnimate:cn,snapshot:xe(it,Ft,qt,Sn,null)}}}),je=function(it,vt){if(it.isDragging){if(it.critical.draggable.id!==vt.draggableId)return null;var Ft=it.current.client.offset,qt=it.dimensions.draggables[vt.draggableId],Sn=ia(it.impact),cn=Ao(it.impact),an=it.forceShouldAnimate;return Ae(ve(Ft.x,Ft.y),it.movementMode,qt,vt.isClone,Sn,cn,an)}if(it.phase==="DROP_ANIMATING"){var nn=it.completed;if(nn.result.draggableId!==vt.draggableId)return null;var Bn=vt.isClone,Ei=it.dimensions.draggables[vt.draggableId],Hr=nn.result,eo=Hr.mode,So=ga(Hr),Zo=is(Hr),ya=it.dropDuration,ua={duration:ya,curve:Ye.drop,moveTo:it.newHomeClientOffset,opacity:Zo?bt.opacity.drop:null,scale:Zo?bt.scale.drop:null};return{mapped:{type:"DRAGGING",offset:it.newHomeClientOffset,dimension:Ei,dropping:ua,draggingOver:So,combineWith:Zo,mode:eo,forceShouldAnimate:null,snapshot:xe(eo,Bn,So,Zo,ua)}}}return null};return je}function Ul(ve){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:ve,combineWith:null}}var Xu={mapped:{type:"SECONDARY",offset:ms,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Ul(null)}};function su(){var ve=Ji(function(vt,Ft){return{x:vt,y:Ft}}),xe=Ji(Ul),Ae=Ji(function(vt,Ft,qt){return Ft===void 0&&(Ft=null),{mapped:{type:"SECONDARY",offset:vt,combineTargetFor:Ft,shouldAnimateDisplacement:qt,snapshot:xe(Ft)}}}),je=function(Ft){return Ft?Ae(ms,Ft,!0):null},rt=function(Ft,qt,Sn,cn){var an=Sn.displaced.visible[Ft],nn=!!(cn.inVirtualList&&cn.effected[Ft]),Bn=Il(Sn),Ei=Bn&&Bn.draggableId===Ft?qt:null;if(!an){if(!nn)return je(Ei);if(Sn.displaced.invisible[Ft])return null;var Hr=ba(cn.displacedBy.point),eo=ve(Hr.x,Hr.y);return Ae(eo,Ei,!0)}if(nn)return je(Ei);var So=Sn.displacedBy.point,Zo=ve(So.x,So.y);return Ae(Zo,Ei,an.shouldAnimate)},it=function(Ft,qt){if(Ft.isDragging)return Ft.critical.draggable.id===qt.draggableId?null:rt(qt.draggableId,Ft.critical.draggable.id,Ft.impact,Ft.afterCritical);if(Ft.phase==="DROP_ANIMATING"){var Sn=Ft.completed;return Sn.result.draggableId===qt.draggableId?null:rt(qt.draggableId,Sn.result.draggableId,Sn.impact,Sn.afterCritical)}return null};return it}var Hc=function(){var xe=Rs(),Ae=su(),je=function(it,vt){return xe(it,vt)||Ae(it,vt)||Xu};return je},fc={dropAnimationFinished:ad},Ru=ci(Hc,fc,null,{context:wl,pure:!0,areStatePropsEqual:Mo})(qo);function Wc(ve){var xe=Cl(Ph),Ae=xe.isUsingCloneFor;return Ae===ve.draggableId&&!ve.isClone?null:le.createElement(Ru,ve)}function rc(ve){var xe=typeof ve.isDragDisabled=="boolean"?!ve.isDragDisabled:!0,Ae=!!ve.disableInteractiveElementBlocking,je=!!ve.shouldRespectForcePress;return le.createElement(Wc,(0,At.Z)({},ve,{isClone:!1,isEnabled:xe,canDragInteractiveElements:Ae,shouldRespectForcePress:je}))}function ju(ve){var xe=(0,le.useContext)(wu);xe||Pi(!1);var Ae=xe.contextId,je=xe.isMovementAllowed,rt=(0,le.useRef)(null),it=(0,le.useRef)(null),vt=ve.children,Ft=ve.droppableId,qt=ve.type,Sn=ve.mode,cn=ve.direction,an=ve.ignoreContainerClipping,nn=ve.isDropDisabled,Bn=ve.isCombineEnabled,Ei=ve.snapshot,Hr=ve.useClone,eo=ve.updateViewportMaxScroll,So=ve.getContainerForClone,Zo=yn(function(){return rt.current},[]),ya=yn(function(Zc){rt.current=Zc},[]),ua=yn(function(){return it.current},[]),Ja=yn(function(Zc){it.current=Zc},[]);me({props:ve,getDroppableRef:Zo,getPlaceholderRef:ua});var Hs=yn(function(){je()&&eo({maxScroll:Hi()})},[je,eo]);Ag({droppableId:Ft,type:qt,mode:Sn,direction:cn,isDropDisabled:nn,isCombineEnabled:Bn,ignoreContainerClipping:an,getDroppableRef:Zo});var vl=le.createElement(Ne,{on:ve.placeholder,shouldAnimate:ve.shouldAnimatePlaceholder},function(Zc){var Vd=Zc.onClose,gd=Zc.data,ld=Zc.animate;return le.createElement(rp,{placeholder:gd,onClose:Vd,innerRef:Ja,animate:ld,contextId:Ae,onTransitionEnd:Hs})}),zu=jn(function(){return{innerRef:ya,placeholder:vl,droppableProps:{"data-rbd-droppable-id":Ft,"data-rbd-droppable-context-id":Ae}}},[Ae,Ft,vl,ya]),dl=Hr?Hr.dragging.draggableId:null,Du=jn(function(){return{droppableId:Ft,type:qt,isUsingCloneFor:dl}},[Ft,dl,qt]);function Mc(){if(!Hr)return null;var Zc=Hr.dragging,Vd=Hr.render,gd=le.createElement(Wc,{draggableId:Zc.draggableId,index:Zc.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},function(ld,ac){return Vd(ld,ac,Zc)});return Zr.createPortal(gd,So())}return le.createElement(Ph.Provider,{value:Du},vt(zu,Ei),Mc())}var cl=function(xe,Ae){return xe===Ae.droppable.type},lu=function(xe,Ae){return Ae.draggables[xe.draggable.id]},ec=function(){var xe={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},Ae=(0,At.Z)({},xe,{shouldAnimatePlaceholder:!1}),je=Ji(function(vt){return{draggableId:vt.id,type:vt.type,source:{index:vt.index,droppableId:vt.droppableId}}}),rt=Ji(function(vt,Ft,qt,Sn,cn,an){var nn=cn.descriptor.id,Bn=cn.descriptor.droppableId===vt;if(Bn){var Ei=an?{render:an,dragging:je(cn.descriptor)}:null,Hr={isDraggingOver:qt,draggingOverWith:qt?nn:null,draggingFromThisWith:nn,isUsingPlaceholder:!0};return{placeholder:cn.placeholder,shouldAnimatePlaceholder:!1,snapshot:Hr,useClone:Ei}}if(!Ft)return Ae;if(!Sn)return xe;var eo={isDraggingOver:qt,draggingOverWith:nn,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:cn.placeholder,shouldAnimatePlaceholder:!0,snapshot:eo,useClone:null}}),it=function(Ft,qt){var Sn=qt.droppableId,cn=qt.type,an=!qt.isDropDisabled,nn=qt.renderClone;if(Ft.isDragging){var Bn=Ft.critical;if(!cl(cn,Bn))return Ae;var Ei=lu(Bn,Ft.dimensions),Hr=ia(Ft.impact)===Sn;return rt(Sn,an,Hr,Hr,Ei,nn)}if(Ft.phase==="DROP_ANIMATING"){var eo=Ft.completed;if(!cl(cn,eo.critical))return Ae;var So=lu(eo.critical,Ft.dimensions);return rt(Sn,an,ga(eo.result)===Sn,ia(eo.impact)===Sn,So,nn)}if(Ft.phase==="IDLE"&&Ft.completed&&!Ft.shouldFlush){var Zo=Ft.completed;if(!cl(cn,Zo.critical))return Ae;var ya=ia(Zo.impact)===Sn,ua=!!(Zo.impact.at&&Zo.impact.at.type==="COMBINE"),Ja=Zo.critical.droppable.id===Sn;return ya?ua?xe:Ae:Ja?xe:Ae}return Ae};return it},oc={updateViewportMaxScroll:Fs};function Cd(){return document.body||Pi(!1),document.body}var uu={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Cd},sd=ci(ec,oc,null,{context:wl,pure:!0,areStatePropsEqual:Mo})(ju);sd.defaultProps=uu},88359:function(Rn,$n){"use strict";var be;var le=60103,Xe=60106,Lt=60107,At=60108,wt=60114,_e=60109,Ve=60110,xt=60112,ut=60113,pt=60120,Rt=60115,Ot=60116,jt=60121,Te=60122,ne=60117,te=60129,ce=60131;if(typeof Symbol=="function"&&Symbol.for){var se=Symbol.for;le=se("react.element"),Xe=se("react.portal"),Lt=se("react.fragment"),At=se("react.strict_mode"),wt=se("react.profiler"),_e=se("react.provider"),Ve=se("react.context"),xt=se("react.forward_ref"),ut=se("react.suspense"),pt=se("react.suspense_list"),Rt=se("react.memo"),Ot=se("react.lazy"),jt=se("react.block"),Te=se("react.server.block"),ne=se("react.fundamental"),te=se("react.debug_trace_mode"),ce=se("react.legacy_hidden")}function ge(Pt){if(typeof Pt=="object"&&Pt!==null){var Nt=Pt.$$typeof;switch(Nt){case le:switch(Pt=Pt.type,Pt){case Lt:case wt:case At:case ut:case pt:return Pt;default:switch(Pt=Pt&&Pt.$$typeof,Pt){case Ve:case xt:case Ot:case Rt:case _e:return Pt;default:return Nt}}case Xe:return Nt}}}var ye=_e,we=le,Ce=xt,Re=Lt,We=Ot,lt=Rt,ht=Xe,nt=wt,mt=At,at=ut;be=Ve,be=ye,be=we,be=Ce,be=Re,be=We,be=lt,be=ht,be=nt,be=mt,be=at,be=function(){return!1},be=function(){return!1},$n.isContextConsumer=function(Pt){return ge(Pt)===Ve},be=function(Pt){return ge(Pt)===_e},be=function(Pt){return typeof Pt=="object"&&Pt!==null&&Pt.$$typeof===le},be=function(Pt){return ge(Pt)===xt},be=function(Pt){return ge(Pt)===Lt},be=function(Pt){return ge(Pt)===Ot},be=function(Pt){return ge(Pt)===Rt},be=function(Pt){return ge(Pt)===Xe},be=function(Pt){return ge(Pt)===wt},be=function(Pt){return ge(Pt)===At},be=function(Pt){return ge(Pt)===ut},be=function(Pt){return typeof Pt=="string"||typeof Pt=="function"||Pt===Lt||Pt===wt||Pt===te||Pt===At||Pt===ut||Pt===pt||Pt===ce||typeof Pt=="object"&&Pt!==null&&(Pt.$$typeof===Ot||Pt.$$typeof===Rt||Pt.$$typeof===_e||Pt.$$typeof===Ve||Pt.$$typeof===xt||Pt.$$typeof===ne||Pt.$$typeof===jt||Pt[0]===Te)},be=ge},72973:function(Rn,$n,be){"use strict";Rn.exports=be(88359)},32637:function(Rn,$n,be){"use strict";Rn.exports=be.p+"static/AssistantCode3.a8740efb.jpeg"},4977:function(Rn){"use strict";Rn.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=="},73631:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(Rn){"use strict";Rn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAodJREFUOBGtU0trFEEQ/qZnM5NsWBCfSEjwQdSggmAieAv4uOnFg5eIXgTvEY+ePJqToDf9AcZDFAUF8SgEQUxAjC6+QlhX4xo0G93ZnRnr697umSyKBCyY/aqqq76q6uoF/rN4lu/BmzSsLGFM7P4kAZQCiBTR64nCw/MHvRnj+fuvI7zxtDWJJD1lQulO5TPHnkAqpuAUFKZUqg8da8xI35+/cMh77AjHJ5cakh/oqHa2ZhGHpSb+STxJZA3lqesFG1CuLAdsqLfbb/dlTwQ7GdmG9VGVBuoNfT/nHGHUSnByeAN2binmmDK1gyM7aGvl6gruPvtadCOfvVlxN0PFjsF4qxMptjl7BflirsPAVxJoQjy5eUMqq6bkMgbWF7C4HGMlsnRmZE82xtEdYSwGnRTuhCvVqG3T8bGhHpweKaFWj3HpzqI7Z16SmHxHmKbcVE7yBs+k1uBm8wh6Q4VQJvrZMkEp98EGBB2h3pFUMWJmPLKniKGtXZhZiLC/L8CLhQbmqhHefmmi3pRYOwInY65gRiiM+ZEP9Ic4c7ik+Ye3dePK/W94/bmpbVNO4u2S2rmrOmRvtkEmlHraC9EUgEzo/optVwZM4IiCLivR1WhywwrT75p4WYlkqhTT7xs4vreIke2h3KWHTaUClC/ZnsR3fOTWMnarZi/QulYhr2l0MMDorhA7NhbwodbC5Xs/9FT5d+s6lJJSzHxWJ9ov9Xw8KceYX9LrQ9+6LF6pgs4luqVIIl+G69gp0id1tk+8/byJ77+AV9UEiRTJMnQMOYycuPZpNuhS+7TF+fgkiBSr55+J9eXOm1E86wjpPzrx8aI8hd3U1yryrOcejQ9cXWveP+N/A79g8eaXNDk4AAAAAElFTkSuQmCC"},96908:function(Rn){"use strict";Rn.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(Rn){"use strict";Rn.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(Rn){"use strict";Rn.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(Rn,$n,be){"use strict";be.d($n,{Z:function(){return xt}});const le=ut=>typeof ut=="object"&&ut!=null&&ut.nodeType===1,Xe=(ut,pt)=>(!pt||ut!=="hidden")&&ut!=="visible"&&ut!=="clip",Lt=(ut,pt)=>{if(ut.clientHeight<ut.scrollHeight||ut.clientWidth<ut.scrollWidth){const Rt=getComputedStyle(ut,null);return Xe(Rt.overflowY,pt)||Xe(Rt.overflowX,pt)||(Ot=>{const jt=(Te=>{if(!Te.ownerDocument||!Te.ownerDocument.defaultView)return null;try{return Te.ownerDocument.defaultView.frameElement}catch(ne){return null}})(Ot);return!!jt&&(jt.clientHeight<Ot.scrollHeight||jt.clientWidth<Ot.scrollWidth)})(ut)}return!1},At=(ut,pt,Rt,Ot,jt,Te,ne,te)=>Te<ut&&ne>pt||Te>ut&&ne<pt?0:Te<=ut&&te<=Rt||ne>=pt&&te>=Rt?Te-ut-Ot:ne>pt&&te<Rt||Te<ut&&te>Rt?ne-pt+jt:0,wt=ut=>{const pt=ut.parentElement;return pt==null?ut.getRootNode().host||null:pt},_e=(ut,pt)=>{var Rt,Ot,jt,Te;if(typeof document=="undefined")return[];const{scrollMode:ne,block:te,inline:ce,boundary:se,skipOverflowHiddenElements:ge}=pt,ye=typeof se=="function"?se:Xn=>Xn!==se;if(!le(ut))throw new TypeError("Invalid target");const we=document.scrollingElement||document.documentElement,Ce=[];let Re=ut;for(;le(Re)&&ye(Re);){if(Re=wt(Re),Re===we){Ce.push(Re);break}Re!=null&&Re===document.body&&Lt(Re)&&!Lt(document.documentElement)||Re!=null&&Lt(Re,ge)&&Ce.push(Re)}const We=(Ot=(Rt=window.visualViewport)==null?void 0:Rt.width)!=null?Ot:innerWidth,lt=(Te=(jt=window.visualViewport)==null?void 0:jt.height)!=null?Te:innerHeight,{scrollX:ht,scrollY:nt}=window,{height:mt,width:at,top:Pt,right:Nt,bottom:Et,left:Ln}=ut.getBoundingClientRect(),{top:xn,right:Nn,bottom:fn,left:Qe}=(Xn=>{const zt=window.getComputedStyle(Xn);return{top:parseFloat(zt.scrollMarginTop)||0,right:parseFloat(zt.scrollMarginRight)||0,bottom:parseFloat(zt.scrollMarginBottom)||0,left:parseFloat(zt.scrollMarginLeft)||0}})(ut);let Ke=te==="start"||te==="nearest"?Pt-xn:te==="end"?Et+fn:Pt+mt/2-xn+fn,Je=ce==="center"?Ln+at/2-Qe+Nn:ce==="end"?Nt+Nn:Ln-Qe;const _n=[];for(let Xn=0;Xn<Ce.length;Xn++){const zt=Ce[Xn],{height:kn,width:bn,top:oi,right:Yt,bottom:Mt,left:_t}=zt.getBoundingClientRect();if(ne==="if-needed"&&Pt>=0&&Ln>=0&&Et<=lt&&Nt<=We&&Pt>=oi&&Et<=Mt&&Ln>=_t&&Nt<=Yt)return _n;const mn=getComputedStyle(zt),rn=parseInt(mn.borderLeftWidth,10),He=parseInt(mn.borderTopWidth,10),Me=parseInt(mn.borderRightWidth,10),Fe=parseInt(mn.borderBottomWidth,10);let Oe=0,Ue=0;const Be="offsetWidth"in zt?zt.offsetWidth-zt.clientWidth-rn-Me:0,ot="offsetHeight"in zt?zt.offsetHeight-zt.clientHeight-He-Fe:0,Cn="offsetWidth"in zt?zt.offsetWidth===0?0:bn/zt.offsetWidth:0,ci="offsetHeight"in zt?zt.offsetHeight===0?0:kn/zt.offsetHeight:0;if(we===zt)Oe=te==="start"?Ke:te==="end"?Ke-lt:te==="nearest"?At(nt,nt+lt,lt,He,Fe,nt+Ke,nt+Ke+mt,mt):Ke-lt/2,Ue=ce==="start"?Je:ce==="center"?Je-We/2:ce==="end"?Je-We:At(ht,ht+We,We,rn,Me,ht+Je,ht+Je+at,at),Oe=Math.max(0,Oe+nt),Ue=Math.max(0,Ue+ht);else{Oe=te==="start"?Ke-oi-He:te==="end"?Ke-Mt+Fe+ot:te==="nearest"?At(oi,Mt,kn,He,Fe+ot,Ke,Ke+mt,mt):Ke-(oi+kn/2)+ot/2,Ue=ce==="start"?Je-_t-rn:ce==="center"?Je-(_t+bn/2)+Be/2:ce==="end"?Je-Yt+Me+Be:At(_t,Yt,bn,rn,Me+Be,Je,Je+at,at);const{scrollLeft:si,scrollTop:pn}=zt;Oe=ci===0?0:Math.max(0,Math.min(pn+Oe/ci,zt.scrollHeight-kn/ci+ot)),Ue=Cn===0?0:Math.max(0,Math.min(si+Ue/Cn,zt.scrollWidth-bn/Cn+Be)),Ke+=pn-Oe,Je+=si-Ue}_n.push({el:zt,top:Oe,left:Ue})}return _n},Ve=ut=>ut===!1?{block:"end",inline:"nearest"}:(pt=>pt===Object(pt)&&Object.keys(pt).length!==0)(ut)?ut:{block:"start",inline:"nearest"};function xt(ut,pt){if(!ut.isConnected||!(jt=>{let Te=jt;for(;Te&&Te.parentNode;){if(Te.parentNode===document)return!0;Te=Te.parentNode instanceof ShadowRoot?Te.parentNode.host:Te.parentNode}return!1})(ut))return;const Rt=(jt=>{const Te=window.getComputedStyle(jt);return{top:parseFloat(Te.scrollMarginTop)||0,right:parseFloat(Te.scrollMarginRight)||0,bottom:parseFloat(Te.scrollMarginBottom)||0,left:parseFloat(Te.scrollMarginLeft)||0}})(ut);if((jt=>typeof jt=="object"&&typeof jt.behavior=="function")(pt))return pt.behavior(_e(ut,pt));const Ot=typeof pt=="boolean"||pt==null?void 0:pt.behavior;for(const{el:jt,top:Te,left:ne}of _e(ut,Ve(pt))){const te=Te-Rt.top+Rt.bottom,ce=ne-Rt.left+Rt.right;jt.scroll({top:te,left:ce,behavior:Ot})}}}}]);