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__Classrooms__Lists__Shixu...

1185 lines
2.3 MiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

!(function(){var sx=Object.defineProperty,ax=Object.defineProperties;var lx=Object.getOwnPropertyDescriptors;var km=Object.getOwnPropertySymbols;var ww=Object.prototype.hasOwnProperty,xw=Object.prototype.propertyIsEnumerable;var yw=(Sn,Ve,It)=>Ve in Sn?sx(Sn,Ve,{enumerable:!0,configurable:!0,writable:!0,value:It}):Sn[Ve]=It,Pd=(Sn,Ve)=>{for(var It in Ve||(Ve={}))ww.call(Ve,It)&&yw(Sn,It,Ve[It]);if(km)for(var It of km(Ve))xw.call(Ve,It)&&yw(Sn,It,Ve[It]);return Sn},Ay=(Sn,Ve)=>ax(Sn,lx(Ve));var Sw=(Sn,Ve)=>{var It={};for(var St in Sn)ww.call(Sn,St)&&Ve.indexOf(St)<0&&(It[St]=Sn[St]);if(Sn!=null&&km)for(var St of km(Sn))Ve.indexOf(St)<0&&xw.call(Sn,St)&&(It[St]=Sn[St]);return It};(self.webpackChunk=self.webpackChunk||[]).push([[342],{95869:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return oe}});var St=It(67711),Wt=It(59301),le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M688 264c0-4.4-3.6-8-8-8H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48zm-8 136H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h384c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zM480 544H296c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h184c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8zm-48 308H208V148h560v344c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V108c0-17.7-14.3-32-32-32H168c-17.7 0-32 14.3-32 32v784c0 17.7 14.3 32 32 32h264c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm356.8-74.4c29-26.3 47.2-64.3 47.2-106.6 0-79.5-64.5-144-144-144s-144 64.5-144 144c0 42.3 18.2 80.3 47.2 106.6-57 32.5-96.2 92.7-99.2 162.1-.2 4.5 3.5 8.3 8 8.3h48.1c4.2 0 7.7-3.3 8-7.6C564 871.2 621.7 816 692 816s128 55.2 131.9 124.4c.2 4.2 3.7 7.6 8 7.6H880c4.6 0 8.2-3.8 8-8.3-2.9-69.5-42.2-129.6-99.2-162.1zM692 591c44.2 0 80 35.8 80 80s-35.8 80-80 80-80-35.8-80-80 35.8-80 80-80z"}}]},name:"solution",theme:"outlined"},ve=le,de=It(7657),Ht=function(Gt,Ie){return Wt.createElement(de.Z,(0,St.Z)({},Gt,{ref:Ie,icon:ve}))},ie=Wt.forwardRef(Ht),oe=ie},8336:function(){"use strict"},12469:function(){"use strict"},99587:function(Sn,Ve){"use strict";Ve.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},63720:function(){"use strict";function Sn(Qt,nt,et,At){et===void 0&&(et=0),At===void 0&&(At=1/0),this._name=Qt,this._defaultValue=nt,this._minimum=et,this._maximum=At}Object.defineProperty(Sn.prototype,"name",{get:function(){return this._name},set:function(Qt){if(typeof Qt!="string"||Qt==="")throw new Error("Shape name must be a valid string.");this._name=Qt}}),Object.defineProperty(Sn.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("The default value must be a real number, not: "+Qt);this._defaultValue=Qt}}),Object.defineProperty(Sn.prototype,"minimum",{get:function(){return this._minimum},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("Minimum must be a real number, not: "+Qt);this._minimum=Qt}}),Object.defineProperty(Sn.prototype,"maximum",{get:function(){return this._maximum},set:function(Qt){if(typeof Qt!="number"||isNaN(Qt))throw new Error("Maximum must be a real number, not: "+Qt);this._maximum=Qt}}),go.Shape._FigureParameters={},go.Shape.getFigureParameter=function(Qt,nt){var et=go.Shape._FigureParameters[Qt];return et?et[nt]:null},go.Shape.setFigureParameter=function(Qt,nt,et){if(!(et instanceof Sn))throw new Error("Third argument to Shape.setFigureParameter is not FigureParameter: "+et);if(et.defaultValue<et.minimum||et.defaultValue>et.maximum)throw new Error("defaultValue must be between minimum and maximum, not: "+et.defaultValue);var At=go.Shape._FigureParameters[Qt];At||(At=[],go.Shape._FigureParameters[Qt]=At),At[nt]=et};var Ve=[];function It(Qt,nt){var et=Ve.pop();return et===void 0?new go.Point(Qt,nt):(et.x=Qt,et.y=nt,et)}function St(){var Qt=Ve.pop();return Qt===void 0?new go.Point:Qt}function Wt(Qt){Ve.push(Qt)}function le(Qt,nt,et,At,at,dt,gt,xt,bt){bt||(bt=new go.Point);var Ut=Qt-et,Rt=at-gt,Zt=NaN,Yt=NaN;if(Ut===0)if(Rt===0)Qt===et&&(Zt=Qt,Yt=nt);else{var te=(dt-xt)/Rt,ye=dt-te*at;Zt=Qt,Yt=te*Zt+ye}else if(Rt===0){var fe=(nt-At)/Ut,Ke=nt-fe*Qt;Zt=at,Yt=fe*Zt+Ke}else{var fe=(nt-At)/Ut,te=(dt-xt)/Rt,Ke=nt-fe*Qt,ye=dt-te*at;Zt=(ye-Ke)/(fe-te),Yt=fe*Zt+Ke}return bt.x=Zt,bt.y=Yt,bt}function ve(Qt,nt,et,At,at,dt,gt,xt,bt,Ut,Rt,Zt,Yt,te){var ye=1-bt,fe=bt,Ke=Qt*ye+et*fe,_e=nt*ye+At*fe,nn=et*ye+at*fe,fn=At*ye+dt*fe,xn=at*ye+gt*fe,_n=dt*ye+xt*fe,Xn=Ke*ye+nn*fe,pe=_e*ye+fn*fe,ne=nn*ye+xn*fe,pn=fn*ye+_n*fe,Ai=Xn*ye+ne*fe,ai=pe*ye+pn*fe;Ut.x=Ke,Ut.y=_e,Rt.x=Xn,Rt.y=pe,Zt.x=Ai,Zt.y=ai,Yt.x=ne,Yt.y=pn,te.x=xn,te.y=_n}var de=new go.Spot(.156,.156),Ht=new go.Spot(.844,.844),ie=4*((Math.sqrt(2)-1)/3);go.Shape.setFigureParameter("RoundedRectangle",0,new Sn("CornerRounding",5)),go.Shape.defineFigureGenerator("RoundedRectangle",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=5),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,dt=new go.Geometry().add(new go.PathFigure(At,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt-At,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)).add(new go.PathSegment(go.PathSegment.Line,nt,et-At)).add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,et-at,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,At,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,at,et,0,et-at)).add(new go.PathSegment(go.PathSegment.Line,0,At)).add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,at,at,0).close()));return at>1&&(dt.spot1=new go.Spot(0,0,at,at),dt.spot2=new go.Spot(1,1,-at,-at)),dt}),go.Shape.defineFigureGenerator("Border","RoundedRectangle"),go.Shape.defineFigureGenerator("TriangleRight",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.25,.5,.75)}),go.Shape.defineFigureGenerator("TriangleDown",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close())).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("TriangleLeft",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close())).setSpots(.5,.25,1,.75)}),go.Shape.defineFigureGenerator("TriangleUp",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,et).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close())).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("Triangle","TriangleUp"),go.Shape.defineFigureGenerator("Diamond",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close())).setSpots(.25,.25,.75,.75)}),go.Shape.defineFigureGenerator("LineH",function(Qt,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=et/2,At.endX=nt,At.endY=et/2,At}),go.Shape.defineFigureGenerator("LineV",function(Qt,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt/2,At.startY=0,At.endX=nt/2,At.endY=et,At}),go.Shape.defineFigureGenerator("BarH","Rectangle"),go.Shape.defineFigureGenerator("BarV","Rectangle"),go.Shape.defineFigureGenerator("MinusLine","LineH"),go.Shape.defineFigureGenerator("PlusLine",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et/2,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("XLine",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LineRight",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.25*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)))}),go.Shape.defineFigureGenerator("LineDown",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.25*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)))}),go.Shape.defineFigureGenerator("LineLeft",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.75*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)))}),go.Shape.defineFigureGenerator("LineUp",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.75*et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)))}),go.Shape.defineFigureGenerator("AsteriskLine",function(Qt,nt,et){var At=.2/Math.SQRT2;return new go.Geometry().add(new go.PathFigure(At*nt,(1-At)*et,!1).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Move,0,et/2)).add(new go.PathSegment(go.PathSegment.Line,nt,et/2)).add(new go.PathSegment(go.PathSegment.Move,nt/2,0)).add(new go.PathSegment(go.PathSegment.Line,nt/2,et)))}),go.Shape.defineFigureGenerator("CircleLine",function(Qt,nt,et){var At=nt/2,at=new go.Geometry().add(new go.PathFigure(nt,nt/2,!1).add(new go.PathSegment(go.PathSegment.Arc,0,360,At,At,At,At).close()));return at.spot1=de,at.spot2=Ht,at.defaultStretch=go.GraphObject.Uniform,at}),go.Shape.defineFigureGenerator("Line1",function(Qt,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=0,At.startY=0,At.endX=nt,At.endY=et,At}),go.Shape.defineFigureGenerator("Line2",function(Qt,nt,et){var At=new go.Geometry(go.Geometry.Line);return At.startX=nt,At.startY=0,At.endX=0,At.endY=et,At}),go.Shape.defineFigureGenerator("Curve1",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,ie*nt,0,nt,(1-ie)*et)))}),go.Shape.defineFigureGenerator("Curve2",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,nt,et,0,ie*et,(1-ie)*nt,et)))}),go.Shape.defineFigureGenerator("Curve3",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,ie*et,ie*nt,et)))}),go.Shape.defineFigureGenerator("Curve4",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Bezier,0,et,(1-ie)*nt,0,0,(1-ie)*et)))}),go.Shape.defineFigureGenerator("TriangleDownLeft",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,.5,.5,1)}),go.Shape.defineFigureGenerator("TriangleDownRight",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(.5,.5,1,1)}),go.Shape.defineFigureGenerator("TriangleUpLeft",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())).setSpots(0,0,.5,.5)}),go.Shape.defineFigureGenerator("TriangleUpRight",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et).close())).setSpots(.5,0,1,.5)}),go.Shape.defineFigureGenerator("RightTriangle","TriangleDownLeft"),go.Shape.setFigureParameter("Parallelogram1",0,new Sn("Indent",.1,-.99,.99)),go.Shape.defineFigureGenerator("Parallelogram1",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)?At=.1:At<-1?At=-1:At>1&&(At=1);var at=Math.abs(At)*nt;if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.defineFigureGenerator("Parallelogram","Parallelogram1"),go.Shape.setFigureParameter("Parallelogram2",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("Parallelogram2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt:At>nt&&(At=nt);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.setFigureParameter("Trapezoid1",0,new Sn("Indent",.2,-.99,.99)),go.Shape.defineFigureGenerator("Trapezoid1",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)?At=.2:At<.5?At=-.5:At>.5&&(At=.5);var at=Math.abs(At)*nt;if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.defineFigureGenerator("Trapezoid","Trapezoid1"),go.Shape.setFigureParameter("Trapezoid2",0,new Sn("Indent",20,-1/0,1/0)),go.Shape.defineFigureGenerator("Trapezoid2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)?At=20:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())):dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}}),go.Shape.setFigureParameter("ManualOperation",0,new Sn("Indent",10,-1/0,1/0)),go.Shape.defineFigureGenerator("ManualOperation",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)?At=10:At<-nt?At=-nt/2:At>nt&&(At=nt/2);var at=Math.abs(At);if(At===0){var dt=new go.Geometry(go.Geometry.Rectangle);return dt.startX=0,dt.startY=0,dt.endX=nt,dt.endY=et,dt}else{var dt=new go.Geometry;return At>0?dt.add(new go.PathFigure(0,0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt-at,et)).add(new go.PathSegment(go.PathSegment.Line,at,et).close())):dt.add(new go.PathFigure(at,0).add(new go.PathSegment(go.PathSegment.Line,nt-at,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close())),at<nt/2&&dt.setSpots(at/nt,0,(nt-at)/nt,1),dt}});var oe=[];function he(){var Qt=oe.pop();return Qt===void 0?[]:Qt}function Gt(Qt){Qt.length=0,oe.push(Qt)}function Ie(Qt){for(var nt=he(),et=.5,At=.5,at=Math.PI*1.5,dt=0,gt=0;gt<Qt;gt++)dt=2*Math.PI/Qt*gt+at,nt[gt]=new go.Point(At+et*Math.cos(dt),At+et*Math.sin(dt));return nt.push(nt[0]),nt}function Xt(Qt){var nt=Me(Qt),et=he();et[0]=nt[0];for(var At=1,at=1;At<nt.length;At+=2,at+=3)et[at]=nt[At],et[at+1]=nt[At],et[at+2]=nt[At+1];return Gt(nt),et}function Me(Qt){for(var nt=Ie(Qt),et=he(),At=Math.floor(nt.length/2),at=nt.length-1,dt=Qt%2===0?2:1,gt=0;gt<at;gt++){var xt=nt[gt],bt=nt[gt+1],Ut=nt[(At+gt-1)%at],Rt=nt[(At+gt+dt)%at];et[gt*2]=xt,et[gt*2+1]=le(xt.x,xt.y,Ut.x,Ut.y,bt.x,bt.y,Rt.x,Rt.y,new go.Point)}return et[et.length]=et[0],Gt(nt),et}go.Shape.defineFigureGenerator("Pentagon",function(Qt,nt,et){var At=Ie(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<5;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.2,.22),at.spot2=new go.Spot(.8,.9),at}),go.Shape.defineFigureGenerator("Hexagon",function(Qt,nt,et){var At=Ie(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<6;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.07,.25),at.spot2=new go.Spot(.93,.75),at}),go.Shape.defineFigureGenerator("Heptagon",function(Qt,nt,et){var At=Ie(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<7;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.2,.15),at.spot2=new go.Spot(.8,.85),at}),go.Shape.defineFigureGenerator("Octagon",function(Qt,nt,et){var At=Ie(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<8;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.15,.15),at.spot2=new go.Spot(.85,.85),at}),go.Shape.defineFigureGenerator("Nonagon",function(Qt,nt,et){var At=Ie(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<9;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.17,.13),at.spot2=new go.Spot(.82,.82),at}),go.Shape.defineFigureGenerator("Decagon",function(Qt,nt,et){var At=Ie(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<10;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("Dodecagon",function(Qt,nt,et){var At=Ie(12),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<12;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.16,.16),at.spot2=new go.Spot(.84,.84),at}),go.Shape.defineFigureGenerator("FivePointedStar",function(Qt,nt,et){var At=Me(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<10;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.266,.333),at.spot2=new go.Spot(.733,.733),at}),go.Shape.defineFigureGenerator("SixPointedStar",function(Qt,nt,et){var At=Me(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<12;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.17,.25),at.spot2=new go.Spot(.83,.75),at}),go.Shape.defineFigureGenerator("SevenPointedStar",function(Qt,nt,et){var At=Me(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<14;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("EightPointedStar",function(Qt,nt,et){var At=Me(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<16;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.25,.25),at.spot2=new go.Spot(.75,.75),at}),go.Shape.defineFigureGenerator("NinePointedStar",function(Qt,nt,et){var At=Me(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<18;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.666),at}),go.Shape.defineFigureGenerator("TenPointedStar",function(Qt,nt,et){var At=Me(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<20;gt++)dt.add(new go.PathSegment(go.PathSegment.Line,At[gt].x*nt,At[gt].y*et));return dt.add(new go.PathSegment(go.PathSegment.Line,At[0].x*nt,At[0].y*et).close()),Gt(At),at.spot1=new go.Spot(.281,.261),at.spot2=new go.Spot(.723,.748),at}),go.Shape.defineFigureGenerator("FivePointedBurst",function(Qt,nt,et){var At=Xt(5),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.222,.277),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("SixPointedBurst",function(Qt,nt,et){var At=Xt(6),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.17,.222),at.spot2=new go.Spot(.833,.777),at}),go.Shape.defineFigureGenerator("SevenPointedBurst",function(Qt,nt,et){var At=Xt(7),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("EightPointedBurst",function(Qt,nt,et){var At=Xt(8),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("NinePointedBurst",function(Qt,nt,et){var At=Xt(9),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.defineFigureGenerator("TenPointedBurst",function(Qt,nt,et){var At=Xt(10),at=new go.Geometry,dt=new go.PathFigure(At[0].x*nt,At[0].y*et,!0);at.add(dt);for(var gt=1;gt<At.length;gt+=3)dt.add(new go.PathSegment(go.PathSegment.Bezier,At[gt+2].x*nt,At[gt+2].y*et,At[gt].x*nt,At[gt].y*et,At[gt+1].x*nt,At[gt+1].y*et));return dt.segments.last().close(),Gt(At),at.spot1=new go.Spot(.222,.222),at.spot2=new go.Spot(.777,.777),at}),go.Shape.setFigureParameter("FramedRectangle",0,new Sn("ThicknessX",8)),go.Shape.setFigureParameter("FramedRectangle",1,new Sn("ThicknessY",8)),go.Shape.defineFigureGenerator("FramedRectangle",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN,at=Qt?Qt.parameter2:NaN;isNaN(At)&&(At=8),isNaN(at)&&(at=8);var dt=new go.Geometry,gt=new go.PathFigure(0,0,!0);return dt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At<nt/2&&at<et/2&&(gt.add(new go.PathSegment(go.PathSegment.Move,At,at)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et-at)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,et-at)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,at).close())),dt.setSpots(0,0,1,1,At,at,-At,-at),dt}),go.Shape.setFigureParameter("Ring",0,new Sn("Thickness",8)),go.Shape.defineFigureGenerator("Ring",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=8);var at=nt/2,dt=new go.Geometry,gt=new go.PathFigure(nt,nt/2,!0);dt.add(gt),gt.add(new go.PathSegment(go.PathSegment.Arc,0,360,at,at,at,at).close());var xt=Math.max(at-At,0);return xt>0&&(gt.add(new go.PathSegment(go.PathSegment.Move,nt/2+xt,nt/2)),gt.add(new go.PathSegment(go.PathSegment.Arc,0,-360,at,at,xt,xt).close())),dt.spot1=de,dt.spot2=Ht,dt.defaultStretch=go.GraphObject.Uniform,dt}),go.Shape.defineFigureGenerator("Cloud",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.08034461*nt,.1944299*et,!0).add(new go.PathSegment(go.PathSegment.Bezier,.2008615*nt,.05349299*et,-.09239631*nt,.07836421*et,.1406031*nt,-.0542823*et)).add(new go.PathSegment(go.PathSegment.Bezier,.4338609*nt,.074219*et,.2450511*nt,-.00697547*et,.3776197*nt,-.01112067*et)).add(new go.PathSegment(go.PathSegment.Bezier,.6558228*nt,.07004196*et,.4539471*nt,0,.6066018*nt,-.02526587*et)).add(new go.PathSegment(go.PathSegment.Bezier,.8921095*nt,.08370865*et,.6914277*nt,-.01904177*et,.8921095*nt,-.01220843*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9147671*nt,.3194596*et,1.036446*nt,.04105738*et,1.020377*nt,.3022052*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9082935*nt,.562044*et,1.04448*nt,.360238*et,.992256*nt,.5219009*et)).add(new go.PathSegment(go.PathSegment.Bezier,.9212406*nt,.8217117*et,1.032337*nt,.5771781*et,1.018411*nt,.8120651*et)).add(new go.PathSegment(go.PathSegment.Bezier,.7592566*nt,.9156953*et,1.028411*nt,.9571472*et,.8556702*nt,1.052487*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5101666*nt,.9310455*et,.7431877*nt,1.009325*et,.5624123*nt,1.021761*et)).add(new go.PathSegment(go.PathSegment.Bezier,.2609328*nt,.9344623*et,.4820677*nt,1.031761*et,.3030112*nt,1.002796*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.870098*et,.2329994*nt,1.01518*et,.03213784*nt,1.01518*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06829292*nt,.6545475*et,-.02812061*nt,.9032597*et,-.01205169*nt,.6835638*et)).add(new go.PathSegment(go.PathSegment.Bezier,.06427569*nt,.4265613*et,-.01812061*nt,.6089503*et,-.00606892*nt,.4555777*et)).add(new go.PathSegment(go.PathSegment.Bezier,.08034461*nt,.1944299*et,-.01606892*nt,.3892545*et,-.01205169*nt,.1944299*et))).setSpots(.1,.1,.9,.9)}),go.Shape.defineFigureGenerator("StopSign",function(Qt,nt,et){var At=1/(Math.SQRT2+2);return new go.Geometry().add(new go.PathFigure(At*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,At*et).close())).setSpots(At/2,At/2,1-At/2,1-At/2)}),go.Shape.setFigureParameter("Pie",0,new Sn("Start",0,-360,360)),go.Shape.setFigureParameter("Pie",1,new Sn("Sweep",315,-360,360)),go.Shape.defineFigureGenerator("Pie",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN,at=Qt?Qt.parameter2:NaN;isNaN(At)&&(At=0),isNaN(at)&&(at=315);var dt=At%360;dt<0&&(dt+=360);var gt=at%360,xt=Math.min(nt,et)/2;return new go.Geometry().add(new go.PathFigure(xt,xt).add(new go.PathSegment(go.PathSegment.Arc,dt,gt,xt,xt,xt,xt).close()))}),go.Shape.defineFigureGenerator("PiePiece",function(Qt,nt,et){var At=ie/Math.SQRT2*.5,at=Math.SQRT2/2,dt=1-Math.SQRT2/2;return new go.Geometry().add(new go.PathFigure(nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,at*nt,dt*et,nt,(1-At)*et,(at+At)*nt,(dt+At)*et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()))}),go.Shape.setFigureParameter("ThickCross",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickCross",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=30);var at=Math.min(At,nt)/2,dt=nt/2,gt=et/2;return new go.Geometry().add(new go.PathFigure(dt-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,dt+at,0)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt-at)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt-at).close()))}),go.Shape.setFigureParameter("ThinCross",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinCross",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=Math.min(At,nt)/2,dt=nt/2,gt=et/2;return new go.Geometry().add(new go.PathFigure(dt-at,0,!0).add(new go.PathSegment(go.PathSegment.Line,dt+at,0)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt-at)).add(new go.PathSegment(go.PathSegment.Line,nt,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,dt+at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,et)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt+at)).add(new go.PathSegment(go.PathSegment.Line,0,gt-at)).add(new go.PathSegment(go.PathSegment.Line,dt-at,gt-at).close()))}),go.Shape.setFigureParameter("ThickX",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("ThickX",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;if((isNaN(At)||At<0)&&(At=30),nt===0||et===0){var at=new go.Geometry(go.Geometry.Rectangle);return at.startX=0,at.startY=0,at.endX=nt,at.endY=et,at}else{var dt=nt/2,gt=et/2,xt=Math.atan2(et,nt),bt=At-Math.min(Math.cos(xt)*At/2,dt),Ut=At-Math.min(Math.sin(xt)*At/2,gt),at=new go.Geometry,Rt=new go.PathFigure(bt,0,!0);return at.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,dt,.2*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt-bt,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,Ut)),Rt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt,et-Ut)),Rt.add(new go.PathSegment(go.PathSegment.Line,nt-bt,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,dt,.8*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,bt,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,et-Ut)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,Ut).close()),at}}),go.Shape.setFigureParameter("ThinX",0,new Sn("Thickness",10)),go.Shape.defineFigureGenerator("ThinX",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=10);var at=new go.Geometry,dt=new go.PathFigure(.1*nt,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et).close()),at}),go.Shape.setFigureParameter("SquareIBeam",0,new Sn("BeamWidth",.2,.1,.9)),go.Shape.defineFigureGenerator("SquareIBeam",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,dt=new go.PathFigure(0,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5+At/2)*nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,(1-At)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(.5-At/2)*nt,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,At*et).close()),at}),go.Shape.setFigureParameter("RoundedIBeam",0,new Sn("Curviness",.5,.05,.65)),go.Shape.defineFigureGenerator("RoundedIBeam",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.5);var at=new go.Geometry,dt=new go.PathFigure(0,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,Math.abs(1-At)*nt,.25*et,Math.abs(1-At)*nt,.75*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at}),go.Shape.defineFigureGenerator("HalfEllipse",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,ie*nt,0,nt,(.5-ie/2)*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,(.5+ie/2)*et,ie*nt,et).close())).setSpots(0,.156,.844,.844)}),go.Shape.defineFigureGenerator("Crescent",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,et,nt,0,nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.5*nt,.75*et,.5*nt,.25*et).close())).setSpots(.311,.266,.744,.744)}),go.Shape.defineFigureGenerator("Heart",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,.1*nt,.8*et,0,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,0,0,.45*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.55*nt,0,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.5*et,.9*nt,.8*et).close())).setSpots(.14,.29,.86,.78)}),go.Shape.defineFigureGenerator("Spade",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,0,!0).add(new go.PathSegment(go.PathSegment.Line,.51*nt,.01*et)).add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.6*nt,.2*et,nt,.25*et)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.7*et,nt,.8*et,.6*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,.5*nt,.75*et,.55*nt,.95*et)).add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)).add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.7*et,.45*nt,.95*et,.5*nt,.75*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.4*nt,.8*et,0,.8*et)).add(new go.PathSegment(go.PathSegment.Bezier,.49*nt,.01*et,0,.25*et,.4*nt,.2*et).close())).setSpots(.14,.26,.86,.78)}),go.Shape.defineFigureGenerator("Club",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.4*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.15*nt,et,.5*nt,.75*et,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.6*et,.55*nt,.95*et,.5*nt,.75*et));var dt=.2,gt=.3,xt=0,bt=dt*ie;return at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+bt+xt)*et,(.5-bt+gt)*nt,(.5+dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+dt+gt)*nt,(.5+xt)*et,(.5+bt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt)*nt,(.5-bt+xt)*et,(.5+bt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.65*nt,.36771243*et,(.5-bt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt+.05)*nt,(.5-bt+xt-.02)*et)),dt=.2,gt=0,xt=-.3,bt=dt*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+dt+gt)*nt,(.5+xt)*et,(.5+bt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt)*nt,(.5-bt+xt)*et,(.5+bt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-dt+gt)*nt,(.5+xt)*et,(.5-bt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-bt+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+bt+xt)*et,(.5-bt+gt)*nt,(.5+dt+xt)*et)),dt=.2,gt=-.3,xt=0,bt=dt*ie,at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5-dt+xt)*et,(1-.5+dt+gt-.05)*nt,(.5-bt+xt-.02)*et,(.5+bt+gt)*nt,(.5-dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5-dt+gt)*nt,(.5+xt)*et,(.5-bt+gt)*nt,(.5-dt+xt)*et,(.5-dt+gt)*nt,(.5-bt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,(.5+gt)*nt,(.5+dt+xt)*et,(.5-dt+gt)*nt,(.5+bt+xt)*et,(.5-bt+gt)*nt,(.5+dt+xt)*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.6*et,(.5+bt+gt)*nt,(.5+dt+xt)*et,(.5+dt+gt)*nt,(.5+bt+xt)*et).close()),At.setSpots(.06,.33,.93,.68),At}),go.Shape.defineFigureGenerator("YinYang",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*.5,nt*.5,nt*.5,nt*.5)),at.add(new go.PathSegment(go.PathSegment.Arc,90,-180,nt*.5,nt*.75,nt*.25,nt*.25)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,nt*.5,nt*.25,nt*.25,nt*.25));var dt=.1,gt=.5,xt=.25;return at.add(new go.PathSegment(go.PathSegment.Move,(gt+dt)*nt,xt*et)),at.add(new go.PathSegment(go.PathSegment.Arc,0,-360,nt*gt,et*xt,dt*nt,dt*nt).close()),at=new go.PathFigure(nt*.5,0,!1),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*.5,nt*.5,nt*.5,nt*.5)),xt=.75,at=new go.PathFigure((gt+dt)*nt,xt*et,!0),At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,0,360,nt*gt,et*xt,dt*nt,dt*nt).close()),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Peace",function(Qt,nt,et){var At=.8535533905932737,at=.5*nt,dt=.5*et;return new go.Geometry().add(new go.PathFigure(at,0,!1).add(new go.PathSegment(go.PathSegment.Arc,270,360,at,dt,at,dt)).add(new go.PathSegment(go.PathSegment.Line,at,et)).add(new go.PathSegment(go.PathSegment.Move,at,dt)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,At*et)).add(new go.PathSegment(go.PathSegment.Move,at,dt)).add(new go.PathSegment(go.PathSegment.Line,At*nt,At*et)))}),go.Shape.defineFigureGenerator("NotAllowed",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=.5,xt=.5,bt=new go.PathFigure(gt*nt,(xt-dt)*et);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),dt=.4,at=ie*.4;var Ut=St(),Rt=St(),Zt=St(),Yt=St();ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.42,Ut,Rt,Zt,Yt,Yt);var te=St(),ye=St(),fe=St();ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.58,Yt,Yt,fe,te,ye);var Ke=St(),_e=St(),nn=St();ve(gt,xt+dt,gt-at,xt+dt,gt-dt,xt+at,gt-dt,xt,.42,Ke,_e,nn,Yt,Yt);var fn=St(),xn=St(),_n=St();return ve(gt,xt+dt,gt-at,xt+dt,gt-dt,xt+at,gt-dt,xt,.58,Yt,Yt,_n,fn,xn),bt.add(new go.PathSegment(go.PathSegment.Move,_n.x*nt,_n.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,fn.x*nt,fn.y*et,xn.x*nt,xn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Zt.x*nt,Zt.y*et,Ut.x*nt,Ut.y*et,Rt.x*nt,Rt.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,_n.x*nt,_n.y*et).close()),bt.add(new go.PathSegment(go.PathSegment.Move,nn.x*nt,nn.y*et)),bt.add(new go.PathSegment(go.PathSegment.Line,fe.x*nt,fe.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,te.x*nt,te.y*et,ye.x*nt,ye.y*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,nn.x*nt,nn.y*et,Ke.x*nt,Ke.y*et,_e.x*nt,_e.y*et).close()),Wt(Ut),Wt(Rt),Wt(Zt),Wt(Yt),Wt(te),Wt(ye),Wt(fe),Wt(Ke),Wt(_e),Wt(nn),Wt(fn),Wt(xn),Wt(_n),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("Fragile",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.29*nt,.33*et)).add(new go.PathSegment(go.PathSegment.Line,.35*nt,.25*et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.15*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.5*et,nt,.25*et,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.5*et,0,.25*et).close()))}),go.Shape.setFigureParameter("HourGlass",0,new Sn("Thickness",30)),go.Shape.defineFigureGenerator("HourGlass",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=30),At>nt&&(At=nt);var at=(nt-At)/2,dt=at+At;return new go.Geometry().add(new go.PathFigure(dt,.5*et).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)).add(new go.PathSegment(go.PathSegment.Line,at,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,0)).add(new go.PathSegment(go.PathSegment.Line,nt,0).close()))}),go.Shape.defineFigureGenerator("Lightning",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,.55*et).add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.3*nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.45*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.55*et).close()))}),go.Shape.defineFigureGenerator("GenderMale",function(Qt,nt,et){var At=new go.Geometry,at=ie*.4,dt=.4,gt=.5,xt=.5,bt=St(),Ut=St(),Rt=St(),Zt=St(),Yt=new go.PathFigure((gt-dt)*nt,xt*et,!1);At.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.44,Rt,Zt,Ut,bt,bt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,Ut.x*nt,Ut.y*et,Rt.x*nt,Rt.y*et,Zt.x*nt,Zt.y*et));var te=It(Ut.x,Ut.y);ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.56,bt,bt,Ut,Rt,Zt);var ye=It(Ut.x,Ut.y);Yt.add(new go.PathSegment(go.PathSegment.Line,(te.x*.1+.95*.9)*nt,te.y*.1*et)),Yt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,te.y*.1*et)),Yt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,0)),Yt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),Yt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),Yt.add(new go.PathSegment(go.PathSegment.Line,(ye.x*.1+.9)*nt,.15*et)),Yt.add(new go.PathSegment(go.PathSegment.Line,(ye.x*.1+.9)*nt,(ye.y*.1+.05*.9)*et)),Yt.add(new go.PathSegment(go.PathSegment.Line,ye.x*nt,ye.y*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,Rt.x*nt,Rt.y*et,Zt.x*nt,Zt.y*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),dt=.35,at=ie*.35;var fe=new go.PathFigure(gt*nt,(xt-dt)*et,!1);At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),fe.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et));var Ke=new go.PathFigure((gt-dt)*nt,xt*et,!1);return At.add(Ke),Wt(bt),Wt(Ut),Wt(Rt),Wt(Zt),Wt(te),Wt(ye),At.spot1=new go.Spot(.202,.257),At.spot2=new go.Spot(.792,.739),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("GenderFemale",function(Qt,nt,et){var At=new go.Geometry,at=.375,dt=0,gt=-.125,xt=at*ie,bt=new go.PathFigure((.525+dt)*nt,(.5+at+gt)*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+dt)*nt,(.5+gt)*et,(.5+xt+dt)*nt,(.5+at+gt)*et,(.5+at+dt)*nt,(.5+xt+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5-at+gt)*et,(1-.5+at+dt)*nt,(.5-xt+gt)*et,(.5+xt+dt)*nt,(.5-at+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.475+dt)*nt,(.5+at+gt)*et,(.5-at+dt)*nt,(.5+xt+gt)*et,(.5-xt+dt)*nt,(.5+at+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.475*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.9*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.85*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et).close()),at=.325,dt=0,gt=-.125,xt=at*ie;var bt=new go.PathFigure((1-.5+at+dt)*nt,(.5+gt)*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5+at+gt)*et,(.5+at+dt)*nt,(.5+xt+gt)*et,(.5+xt+dt)*nt,(.5+at+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5+at+gt)*et,(.5-at+dt)*nt,(.5+xt+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(.5+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.5+at+dt)*nt,(.5+gt)*et,(.5+xt+dt)*nt,(.5-at+gt)*et,(1-.5+at+dt)*nt,(.5-xt+gt)*et));var bt=new go.PathFigure((.525+dt)*nt,(.5+at+gt)*et,!1);return At.add(bt),At.spot1=new go.Spot(.232,.136),At.spot2=new go.Spot(.682,.611),At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicImplies",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et))).setSpots(0,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicIff",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;return isNaN(At)&&(At=.2),new go.Geometry().add(new go.PathFigure((1-At)*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,(1-At)*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,At*nt,0)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,At*nt,et))).setSpots(.2,0,.8,.5)}),go.Shape.defineFigureGenerator("LogicNot",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)))}),go.Shape.defineFigureGenerator("LogicAnd",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.25,.5,.75,1)}),go.Shape.defineFigureGenerator("LogicOr",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0))).setSpots(.219,0,.78,.409)}),go.Shape.defineFigureGenerator("LogicXor",function(Qt,nt,et){var At=new go.Geometry().add(new go.PathFigure(.5*nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Arc,0,360,.5*nt,.5*et,.5*nt,.5*et)));return At.defaultStretch=go.GraphObject.Uniform,At}),go.Shape.defineFigureGenerator("LogicTruth",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)))}),go.Shape.defineFigureGenerator("LogicFalsity",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)))}),go.Shape.defineFigureGenerator("LogicThereExists",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,0,.5*et)).add(new go.PathSegment(go.PathSegment.Move,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et)))}),go.Shape.defineFigureGenerator("LogicForAll",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et))).setSpots(.25,0,.75,.5)}),go.Shape.defineFigureGenerator("LogicIsDefinedAs",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Move,0,.5*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)).add(new go.PathSegment(go.PathSegment.Move,0,et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(.01,.01,.99,.49)}),go.Shape.defineFigureGenerator("LogicIntersect",function(Qt,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(0,et,!1).add(new go.PathSegment(go.PathSegment.Line,0,At*et)).add(new go.PathSegment(go.PathSegment.Arc,180,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,nt,et))).setSpots(0,.5,1,1)}),go.Shape.defineFigureGenerator("LogicUnion",function(Qt,nt,et){var At=.5;return new go.Geometry().add(new go.PathFigure(nt,0,!1).add(new go.PathSegment(go.PathSegment.Line,nt,At*et)).add(new go.PathSegment(go.PathSegment.Arc,0,180,At*nt,At*et,At*nt,At*et)).add(new go.PathSegment(go.PathSegment.Line,0,0))).setSpots(0,0,1,.5)}),go.Shape.setFigureParameter("Arrow",0,new Sn("ArrowheadWidth",.3,.01,.99)),go.Shape.setFigureParameter("Arrow",1,new Sn("TailHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("Arrow",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.3);var at=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=.3);var dt=(1-At)*nt,gt=(.5-at/2)*et,xt=(.5+at/2)*et,bt=new go.Geometry,Ut=new go.PathFigure(0,gt,!0);bt.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,gt)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,0)),Ut.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,et)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,xt)),Ut.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,gt/et);var Rt=le(0,xt/et,1,xt/et,dt/nt,1,1,.5,St());return bt.spot2=new go.Spot(Rt.x,Rt.y),Wt(Rt),bt}),go.Shape.setFigureParameter("Arrow2",0,new Sn("ArrowheadWidth",30)),go.Shape.setFigureParameter("Arrow2",0,new Sn("TailHeight",30)),go.Shape.defineFigureGenerator("Arrow2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=30),At>nt&&(At=nt);var at=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=30),at=Math.min(at,et/2);var dt=nt-At,gt=(et-at)/2,xt=gt+at,bt=new go.Geometry,Ut=new go.PathFigure(0,gt,!0);bt.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,gt)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,0)),Ut.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,et)),Ut.add(new go.PathSegment(go.PathSegment.Line,dt,xt)),Ut.add(new go.PathSegment(go.PathSegment.Line,0,xt).close()),bt.spot1=new go.Spot(0,gt/et);var Rt=le(0,xt/et,1,xt/et,dt/nt,1,1,.5,St());return bt.spot2=new go.Spot(Rt.x,Rt.y),Wt(Rt),bt}),go.Shape.defineFigureGenerator("Chevron",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("DoubleArrow",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.214*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.786*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,1*et).close()),At}),go.Shape.setFigureParameter("DoubleEndArrow",0,new Sn("ConnecterHeight",.3,.01,.99)),go.Shape.defineFigureGenerator("DoubleEndArrow",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close());var bt=le(0,.5,.3,0,0,at/et,.1,at/et,St());return gt.spot1=new go.Spot(bt.x,bt.y),bt=le(.7,1,1,.5,0,dt/et,1,dt/et,bt),gt.spot2=new go.Spot(bt.x,bt.y),Wt(bt),gt}),go.Shape.setFigureParameter("DoubleEndArrow2",0,new Sn("ConnecterHeight",40)),go.Shape.setFigureParameter("DoubleEndArrow2",1,new Sn("ArrowHeight",100)),go.Shape.defineFigureGenerator("DoubleEndArrow2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=40);var at=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=100);var dt=(et-At)/2,gt=dt+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,dt=(et-At)/2,gt=dt+At,xt=0,bt=et):(dt=0,gt=et,xt=0,bt=et));var Ut=new go.Geometry,Rt=new go.PathFigure(nt,.5*et,!0);Ut.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,bt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.3*nt,dt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close());var Zt=le(0,.5,.3,xt/et,0,dt/et,1,dt/et,St());return Ut.spot1=new go.Spot(Zt.x,Zt.y),Zt=le(.7,bt/et,1,.5,0,gt/et,1,gt/et,Zt),Ut.spot2=new go.Spot(Zt.x,Zt.y),Wt(Zt),Ut}),go.Shape.setFigureParameter("IBeamArrow",0,new Sn("ConnectorHeight",.7,.51,.97)),go.Shape.defineFigureGenerator("IBeamArrow",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.3);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(0,at/et);var bt=le(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(bt.x,bt.y),Wt(bt),gt}),go.Shape.setFigureParameter("IBeamArrow2",0,new Sn("ConnectorHeight",40)),go.Shape.setFigureParameter("IBeamArrow2",1,new Sn("BeamArrowHeight",100)),go.Shape.defineFigureGenerator("IBeamArrow2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=40);var at=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=100);var dt=(et-At)/2,gt=dt+At,xt=(et-at)/2,bt=xt+at;(At>et||at>et)&&(at>At?(At=At*et/at,dt=(et-At)/2,gt=dt+At,xt=0,bt=et):(dt=0,gt=et,xt=0,bt=et));var Ut=new go.Geometry,Rt=new go.PathFigure(nt,.5*et,!0);Ut.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,bt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,gt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,bt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,bt)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,xt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,dt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),Rt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,xt).close()),Ut.spot1=new go.Spot(0,dt/et);var Zt=le(.7,bt/et,1,.5,0,gt/et,1,gt/et,St());return Ut.spot2=new go.Spot(Zt.x,Zt.y),Wt(Zt),Ut}),go.Shape.setFigureParameter("Pointer",0,new Sn("BackPoint",.1,0,.2)),go.Shape.defineFigureGenerator("Pointer",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.1);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0).close()),at.spot1=new go.Spot(At,.35);var gt=le(.2,.65,1,.65,0,1,1,.5,St());return at.spot2=new go.Spot(gt.x,gt.y),Wt(gt),at}),go.Shape.setFigureParameter("RoundedPointer",0,new Sn("RoundedEdge",.3,0,.5)),go.Shape.defineFigureGenerator("RoundedPointer",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.3);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,At*nt,.75*et,At*nt,.25*et).close()),at.spot1=new go.Spot(At,.35);var gt=le(0,.65,1,.65,0,1,1,.5,St());return at.spot2=new go.Spot(gt.x,gt.y),Wt(gt),at}),go.Shape.setFigureParameter("SplitEndArrow",0,new Sn("TailHeight",.4,.01,.99)),go.Shape.defineFigureGenerator("SplitEndArrow",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.4);var at=(.5-At/2)*et,dt=(.5+At/2)*et,gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(.2,.3);var bt=le(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(bt.x,bt.y),Wt(bt),gt}),go.Shape.setFigureParameter("SplitEndArrow2",0,new Sn("TailThickness",50)),go.Shape.defineFigureGenerator("SplitEndArrow2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=50);var at=(et-At)/2,dt=at+At;At>et&&(at=0,dt=et);var gt=new go.Geometry,xt=new go.PathFigure(nt,.5*et,!0);gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,0,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,0,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0).close()),gt.spot1=new go.Spot(.2,at/et);var bt=le(.7,1,1,.5,0,dt/et,1,dt/et,St());return gt.spot2=new go.Spot(bt.x,bt.y),Wt(bt),gt}),go.Shape.setFigureParameter("SquareArrow",0,new Sn("ArrowPoint",.7,.2,.9)),go.Shape.defineFigureGenerator("SquareArrow",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.7);var at=new go.Geometry,dt=new go.PathFigure(nt,.5*et,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=go.Spot.TopLeft,at.spot2=new go.Spot(At,1),at}),go.Shape.defineFigureGenerator("Cone1",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(0,.9*et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et).close()),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.97),At}),go.Shape.defineFigureGenerator("Cone2",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.9*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,et,.85/.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.9*et).close());var dt=new go.PathFigure(0,.9*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.9*et,(1-.85/.9)*nt,.8*et,.85/.9*nt,.8*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.82),At}),go.Shape.defineFigureGenerator("Cube1",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var dt=new go.PathFigure(.5*nt,et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.15*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.5,.85),At}),go.Shape.defineFigureGenerator("Cube2",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.3*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0).close());var dt=new go.PathFigure(0,.3*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Move,.7*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(.7,1),At}),go.Shape.defineFigureGenerator("Cylinder1",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(0,At,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,1*nt,At,(.5+dt)*nt,0,1*nt,ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,1*et,1*nt,et-ie*At,(.5+dt)*nt,1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-dt)*nt,1*et,0,et-ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,0,At));var xt=new go.PathFigure(nt,At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,2*At,1*nt,2*At-ie*At,(.5+dt)*nt,2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,At,(.5-dt)*nt,2*At,0,2*At-ie*At)),at.spot1=new go.Spot(0,0,0,2*At),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder2",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,et/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(0,et-At,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,ie*At,(.5-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,(.5+dt)*nt,0,nt,ie*At)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-At)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,et-ie*At,(.5+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-At,(.5-dt)*nt,et,0,et-ie*At));var xt=new go.PathFigure(0,et-At,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et-2*At,0,et-At-ie*At,(.5-dt)*nt,et-2*At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,et-At,(.5+dt)*nt,et-2*At,nt,et-At-ie*At)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,0,-2*At),at}),go.Shape.defineFigureGenerator("Cylinder3",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(At,0,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+dt)*et,nt-ie*At,et)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-dt)*et,ie*At,0));var xt=new go.PathFigure(At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,2*At,.5*et,At+ie*At,0,2*At,(.5-dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,et,2*At,(.5+dt)*et,At+ie*At,et)),at.spot1=new go.Spot(0,0,2*At,0),at.spot2=new go.Spot(1,1),at}),go.Shape.defineFigureGenerator("Cylinder4",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=5),At=Math.min(At,nt/3);var at=new go.Geometry,dt=ie*.5,gt=new go.PathFigure(nt-At,0,!0);at.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,nt-ie*At,0,nt,(.5-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt,(.5+dt)*et,nt-ie*At,et)),gt.add(new go.PathSegment(go.PathSegment.Line,At,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,ie*At,et,0,(.5+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,(.5-dt)*et,ie*At,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0));var xt=new go.PathFigure(nt-At,0,!1);return at.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-2*At,.5*et,nt-At-ie*At,0,nt-2*At,(.5-dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,et,nt-2*At,(.5+dt)*et,nt-At-ie*At,et)),at.spot1=new go.Spot(0,0),at.spot2=new go.Spot(1,1,-2*At,0),at}),go.Shape.defineFigureGenerator("Prism1",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(.25*nt,.25*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.408,.172),At.spot2=new go.Spot(.833,.662),At}),go.Shape.defineFigureGenerator("Prism2",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(0,et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.5*et)),At.spot1=new go.Spot(.25,.5),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("Pyramid1",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et).close());var dt=new go.PathFigure(.5*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Pyramid2",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.85*et).close());var dt=new go.PathFigure(.5*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.85*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),At.spot1=new go.Spot(.25,.367),At.spot2=new go.Spot(.75,.875),At}),go.Shape.defineFigureGenerator("Actor",function(Qt,nt,et){var At=new go.Geometry,at=.2,dt=.1,gt=ie*at,xt=ie*dt,bt=.5,Ut=.1,Rt=new go.PathFigure(bt*nt,(Ut+dt)*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-at)*nt,Ut*et,(bt-gt)*nt,(Ut+dt)*et,(bt-at)*nt,(Ut+xt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-dt)*et,(bt-at)*nt,(Ut-xt)*et,(bt-gt)*nt,(Ut-dt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+at)*nt,Ut*et,(bt+gt)*nt,(Ut-dt)*et,(bt+at)*nt,(Ut-xt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut+dt)*et,(bt+at)*nt,(Ut+xt)*et,(bt+gt)*nt,(Ut+dt)*et));var Zt=.05,Yt=ie*Zt;bt=.05,Ut=.25;var te=new go.PathFigure(.5*nt,.2*et,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.2*et)),bt=.95,Ut=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,(bt+Zt)*nt,Ut*et,(bt+Yt)*nt,(Ut-Zt)*et,(bt+Zt)*nt,(Ut-Yt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.35*et)),Zt=.025,Yt=ie*Zt,bt=.825,Ut=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-Zt)*et,(bt+Zt)*nt,(Ut-Yt)*et,(bt+Yt)*nt,(Ut-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Ut*et,(bt-Yt)*nt,(Ut-Zt)*et,(bt-Zt)*nt,(Ut-Yt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et)),Zt=.05,Yt=ie*Zt,bt=.5,Ut=.7,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-Zt)*et,(bt+Zt)*nt,(Ut-Yt)*et,(bt+Yt)*nt,(Ut-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Ut*et,(bt-Yt)*nt,(Ut-Zt)*et,(bt-Zt)*nt,(Ut-Yt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),te.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.35*et)),Zt=.025,Yt=ie*Zt,bt=.175,Ut=.35,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-Zt)*et,(bt+Zt)*nt,(Ut-Yt)*et,(bt+Yt)*nt,(Ut-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-Zt)*nt,Ut*et,(bt-Yt)*nt,(Ut-Zt)*et,(bt-Zt)*nt,(Ut-Yt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),te.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),Zt=.05,Yt=ie*Zt,bt=.05,Ut=.25,te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-Zt)*et,(bt-Zt)*nt,(Ut-Yt)*et,(bt-Yt)*nt,(Ut-Zt)*et)),te.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),At.spot1=new go.Spot(.2,.2),At.spot2=new go.Spot(.8,.65),At}),go.Shape.setFigureParameter("Card",0,new Sn("CornerCutoutSize",.2,.1,.9)),go.Shape.defineFigureGenerator("Card",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;isNaN(At)&&(At=.2);var at=new go.Geometry,dt=new go.PathFigure(nt,0,!0);return at.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,At*et)),dt.add(new go.PathSegment(go.PathSegment.Line,At*nt,0).close()),at.spot1=new go.Spot(0,At),at.spot2=go.Spot.BottomRight,at}),go.Shape.defineFigureGenerator("Collate",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et));var dt=new go.PathFigure(.5*nt,.5*et,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,.25),At}),go.Shape.defineFigureGenerator("CreateRequest",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,at*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),gt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("Database",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(nt,.1*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-dt)*et,(.5-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-dt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+dt)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+dt)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.4*et,nt,(.3+dt)*et,(.5+at)*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.3*et,(.5-at)*nt,.4*et,0,(.3+dt)*et)),At.spot1=new go.Spot(0,.4),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("DataStorage",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.9*et,.25*nt,.1*et).close()),At.spot1=new go.Spot(.226,0),At.spot2=new go.Spot(.81,1),At}),go.Shape.defineFigureGenerator("DiskStorage",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.1,gt=new go.PathFigure(nt,.1*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.9+dt)*et,(.5+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,(.5-at)*nt,et,0,(.9+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,(.1-dt)*et,(.5-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,(.5+at)*nt,0,nt,(.1-dt)*et));var xt=new go.PathFigure(nt,.1*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,nt,(.1+dt)*et,(.5+at)*nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.1*et,(.5-at)*nt,.2*et,0,(.1+dt)*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,.2*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.3*et,nt,(.2+dt)*et,(.5+at)*nt,.3*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,.2*et,(.5-at)*nt,.3*et,0,(.2+dt)*et)),At.spot1=new go.Spot(0,.3),At.spot2=new go.Spot(1,.9),At}),go.Shape.defineFigureGenerator("Display",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,et,nt,0,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close()),At.spot1=new go.Spot(.25,0),At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("DividedEvent",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)?at=.2:at<.15&&(at=.15);var dt=ie*.2,gt=new go.PathFigure(0,.2*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,0,(.2-dt)*et,(.2-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.2*et,(.8+dt)*nt,0,nt,(.2-dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,et,nt,(.8+dt)*et,(.8+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,.8*et,(.2-dt)*nt,et,0,(.8+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et));var xt=new go.PathFigure(0,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("DividedProcess",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;(isNaN(at)||at<.1)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(0,at*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,at*et)),At}),go.Shape.defineFigureGenerator("Document",function(Qt,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("ExternalOrganization",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;(isNaN(at)||at<.2)&&(at=.2);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,0,at*et)),gt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Move,0,(1-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,(1-at)*et)),At}),go.Shape.defineFigureGenerator("ExternalProcess",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var dt=new go.PathFigure(.1*nt,.4*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.9*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.6*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.9*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.9*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("File",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(.75*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Interrupt",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et));var dt=new go.PathFigure(nt,.5*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et));var gt=new go.PathFigure(nt,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("InternalStorage",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN,dt=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.1);var gt=new go.PathFigure(0,0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,dt*et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt*et)),At}),go.Shape.defineFigureGenerator("Junction",function(Qt,nt,et){var At=new go.Geometry,at=1/Math.SQRT2,dt=(1-1/Math.SQRT2)/2,gt=ie*.5,xt=.5,bt=new go.PathFigure(nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,et,nt,(xt+gt)*et,(xt+gt)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,xt*et,(xt-gt)*nt,et,0,(xt+gt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,0,0,(xt-gt)*et,(xt-gt)*nt,0)),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,xt*et,(xt+gt)*nt,0,nt,(xt-gt)*et));var Ut=new go.PathFigure((dt+at)*nt,(dt+at)*et,!1);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,dt*nt,dt*et)),Ut.add(new go.PathSegment(go.PathSegment.Move,dt*nt,(dt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Line,(dt+at)*nt,dt*et)),At}),go.Shape.defineFigureGenerator("LinedDocument",function(Qt,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close());var dt=new go.PathFigure(.1*nt,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.75*et)),At.spot1=new go.Spot(.1,0),At.spot2=new go.Spot(1,.6),At}),go.Shape.defineFigureGenerator("LoopLimit",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MagneticTape",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(.5*nt,et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,(dt+.1)*nt,.9*et,nt,(dt+at)*et,(dt+at)*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),At.spot1=new go.Spot(.15,.15),At.spot2=new go.Spot(.85,.8),At}),go.Shape.defineFigureGenerator("ManualInput",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et).close()),At.spot1=new go.Spot(0,.25),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("MessageFromUser",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.7);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("MicroformProcessing",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.25);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,at*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,(1-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("MicroformRecording",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("MultiDocument",function(Qt,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.44*et,.96*nt,.47*et,.93*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.54*et,.86*nt,.57*et,.83*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.4*nt,.4*et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0).close());var dt=new go.PathFigure(.1*nt,.2*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.44*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.8,.77),At}),go.Shape.defineFigureGenerator("MultiProcess",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.1*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close());var dt=new go.PathFigure(.2*nt,.1*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.1*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.9*et)),At.spot1=new go.Spot(0,.2),At.spot2=new go.Spot(.8,1),At}),go.Shape.defineFigureGenerator("OfflineStorage",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.1);var dt=1-at,gt=new go.PathFigure(0,0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close());var xt=new go.PathFigure(.5*at*nt,at*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,(1-.5*at)*nt,at*et)),At}),go.Shape.defineFigureGenerator("OffPageConnector",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.75,1),At}),go.Shape.defineFigureGenerator("Or",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(nt,dt*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,et,nt,(dt+at)*et,(dt+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et));var xt=new go.PathFigure(nt,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),At}),go.Shape.defineFigureGenerator("PaperTape",function(Qt,nt,et){var At=new go.Geometry;et=et/.8;var at=new go.PathFigure(0,.7*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.3*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.3*et,.5*nt,.6*et,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.7*et,.5*nt,.4*et,.5*nt,et).close()),At.spot1=new go.Spot(0,.49),At.spot2=new go.Spot(1,.75),At}),go.Shape.defineFigureGenerator("PrimitiveFromCall",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN,dt=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.3);var gt=new go.PathFigure(0,0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("PrimitiveToCall",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN,dt=Qt?Qt.parameter2:NaN;isNaN(at)&&(at=.1),isNaN(dt)&&(dt=.3);var gt=new go.PathFigure(0,0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Procedure",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure((1-at)*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,at*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At}),go.Shape.defineFigureGenerator("Process",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),At.spot2=go.Spot.BottomRight,At}),go.Shape.defineFigureGenerator("Sort",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et).close());var dt=new go.PathFigure(0,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),At.spot1=new go.Spot(.25,.25),At.spot2=new go.Spot(.75,.5),At}),go.Shape.defineFigureGenerator("Start",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.25);var dt=new go.PathFigure(at*nt,0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et));var gt=new go.PathFigure(at*nt,0,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,at*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Move,(1-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,(1-at)*nt,et)),At.spot1=new go.Spot(at,0),At.spot2=new go.Spot(1-at,1),At}),go.Shape.defineFigureGenerator("Terminator",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.25*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,.75*nt,.5*et,.25*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Arc,90,180,.25*nt,.5*et,.25*nt,.5*et)),At.spot1=new go.Spot(.23,0),At.spot2=new go.Spot(.77,1),At}),go.Shape.defineFigureGenerator("TransmittalTape",function(Qt,nt,et){var At=new go.Geometry,at=Qt?Qt.parameter1:NaN;isNaN(at)&&(at=.1);var dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,(1-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,(1-at)*et).close()),At.spot1=go.Spot.TopLeft,At}),go.Shape.defineFigureGenerator("AndGate",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=new go.PathFigure(0,0,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(.5+at)*nt,0,nt,(.5-at)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,(.5+at)*et,(.5+at)*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=go.Spot.TopLeft,At.spot2=new go.Spot(.55,1),At}),go.Shape.defineFigureGenerator("Buffer",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Clock",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=new go.PathFigure(nt,dt*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,et,nt,(dt+at)*et,(dt+at)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt*et,(dt-at)*nt,et,0,(dt+at)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,dt*nt,0,0,(dt-at)*et,(dt-at)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,dt*et,(dt+at)*nt,0,nt,(dt-at)*et));var xt=new go.PathFigure(nt,dt*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt*et));var bt=new go.PathFigure(.8*nt,.75*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.75*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.75*et)),At}),go.Shape.defineFigureGenerator("Ground",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Move,.3*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),At}),go.Shape.defineFigureGenerator("Inverter",function(Qt,nt,et){var At=new go.Geometry,at=ie*.1,dt=.1,gt=.9,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,0,et)),bt.add(new go.PathSegment(go.PathSegment.Line,0,0)),bt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et));var Ut=new go.PathFigure((gt+dt)*nt,xt*et,!0);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.4,.75),At}),go.Shape.defineFigureGenerator("NandGate",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=ie*.4,gt=ie*.1,xt=.1,bt=.9,Ut=.5,Rt=new go.PathFigure(.8*nt,.5*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,.8*nt,(.5+dt)*et,(.4+at)*nt,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,et)),Rt.add(new go.PathSegment(go.PathSegment.Line,0,0)),Rt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(.4+at)*nt,0,.8*nt,(.5-dt)*et));var Zt=new go.PathFigure((bt+xt)*nt,Ut*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut+xt)*et,(bt+xt)*nt,(Ut+gt)*et,(bt+gt)*nt,(Ut+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt,Ut*et,(bt-gt)*nt,(Ut+xt)*et,(bt-xt)*nt,(Ut+gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-xt)*et,(bt-xt)*nt,(Ut-gt)*et,(bt-gt)*nt,(Ut-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt,Ut*et,(bt+gt)*nt,(Ut-xt)*et,(bt+xt)*nt,(Ut-gt)*et)),At.spot1=new go.Spot(0,.05),At.spot2=new go.Spot(.55,.95),At}),go.Shape.defineFigureGenerator("NorGate",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=0,xt=.5,bt=new go.PathFigure(.8*nt,.5*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.7*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(gt+dt)*nt,(xt-at)*et,.7*nt,(xt-dt)*et)),at=.1,dt=ie*.1,gt=.9,xt=.5;var Ut=new go.PathFigure((gt-at)*nt,xt*et,!0);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.6,.75),At}),go.Shape.defineFigureGenerator("OrGate",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=0,xt=.5,bt=new go.PathFigure(0,0,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(gt+dt+dt)*nt,(xt-at)*et,.8*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.8*nt,(xt+dt)*et,(gt+dt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,0,0,.25*nt,.75*et,.25*nt,.25*et).close()),At.spot1=new go.Spot(.2,.25),At.spot2=new go.Spot(.75,.75),At}),go.Shape.defineFigureGenerator("XnorGate",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ut=new go.PathFigure(.8*nt,.5*et,!0);At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.7*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.5*et,(gt+dt)*nt,(xt-at)*et,.7*nt,(xt-dt)*et)),at=.1,dt=ie*.1,gt=.9,xt=.5;var Rt=new go.PathFigure((gt-at)*nt,xt*et,!0);return At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.65,.75),At}),go.Shape.defineFigureGenerator("XorGate",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*at,gt=.2,xt=.5,bt=new go.PathFigure(.1*nt,0,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,et,.35*nt,.25*et,.35*nt,.75*et));var Ut=new go.PathFigure(.2*nt,0,!0);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,(gt+dt)*nt,(xt-at)*et,.9*nt,(xt-dt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,et,.9*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.2*nt,0,.45*nt,.75*et,.45*nt,.25*et).close()),At.spot1=new go.Spot(.4,.25),At.spot2=new go.Spot(.8,.75),At}),go.Shape.defineFigureGenerator("Capacitor",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Resistor",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Inductor",function(Qt,nt,et){var At=new go.Geometry,at=ie*.1,dt=.1,gt=.1,xt=.5,bt=new go.PathFigure((gt-at*.5)*nt,et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.3,bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.5,bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.7,bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,0,(gt-at)*nt,et,(gt-dt)*nt,0)),gt=.9,bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at*.5)*nt,et,(gt+dt)*nt,0,(gt+at)*nt,et)),At}),go.Shape.defineFigureGenerator("ACvoltageSource",function(Qt,nt,et){var At=new go.Geometry,at=ie*.5,dt=.5,gt=.5,xt=.5,bt=new go.PathFigure((gt-dt)*nt,xt*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt-dt)*et,(gt+dt)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Move,(gt-dt+.1)*nt,xt*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt-.1)*nt,xt*et,gt*nt,(xt-dt)*et,gt*nt,(xt+dt)*et)),At}),go.Shape.defineFigureGenerator("DCvoltageSource",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("Diode",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At.spot1=new go.Spot(0,.25),At.spot2=new go.Spot(.5,.75),At}),go.Shape.defineFigureGenerator("Wifi",function(Qt,nt,et){var At=new go.Geometry,at=nt,dt=et;nt=nt*.38,et=et*.6;var gt=ie*.8,xt=.8,bt=0,Ut=.5,Rt=(at-nt)/2,Zt=(dt-et)/2,Yt=new go.PathFigure(bt*nt+Rt,(Ut+xt)*et+Zt,!0);At.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Rt,Ut*et+Zt,(bt-gt)*nt+Rt,(Ut+xt)*et+Zt,(bt-xt)*nt+Rt,(Ut+gt)*et+Zt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut-xt)*et+Zt,(bt-xt)*nt+Rt,(Ut-gt)*et+Zt,(bt-gt)*nt+Rt,(Ut-xt)*et+Zt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+gt*.5)*nt+Rt,Ut*et+Zt,bt*nt+Rt,(Ut-xt)*et+Zt,(bt-xt+gt*.5)*nt+Rt,(Ut-gt)*et+Zt)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut+xt)*et+Zt,(bt-xt+gt*.5)*nt+Rt,(Ut+gt)*et+Zt,bt*nt+Rt,(Ut+xt)*et+Zt).close()),gt=ie*.4,xt=.4,bt=.2,Ut=.5;var te=new go.PathFigure(bt*nt+Rt,(Ut+xt)*et+Zt,!0);At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Rt,Ut*et+Zt,(bt-gt)*nt+Rt,(Ut+xt)*et+Zt,(bt-xt)*nt+Rt,(Ut+gt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut-xt)*et+Zt,(bt-xt)*nt+Rt,(Ut-gt)*et+Zt,(bt-gt)*nt+Rt,(Ut-xt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt+gt*.5)*nt+Rt,Ut*et+Zt,bt*nt+Rt,(Ut-xt)*et+Zt,(bt-xt+gt*.5)*nt+Rt,(Ut-gt)*et+Zt)),te.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut+xt)*et+Zt,(bt-xt+gt*.5)*nt+Rt,(Ut+gt)*et+Zt,bt*nt+Rt,(Ut+xt)*et+Zt).close()),gt=ie*.2,xt=.2,bt=.5,Ut=.5;var ye=new go.PathFigure((bt-xt)*nt+Rt,Ut*et+Zt,!0);At.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut-xt)*et+Zt,(bt-xt)*nt+Rt,(Ut-gt)*et+Zt,(bt-gt)*nt+Rt,(Ut-xt)*et+Zt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Rt,Ut*et+Zt,(bt+gt)*nt+Rt,(Ut-xt)*et+Zt,(bt+xt)*nt+Rt,(Ut-gt)*et+Zt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut+xt)*et+Zt,(bt+xt)*nt+Rt,(Ut+gt)*et+Zt,(bt+gt)*nt+Rt,(Ut+xt)*et+Zt)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(bt-xt)*nt+Rt,Ut*et+Zt,(bt-gt)*nt+Rt,(Ut+xt)*et+Zt,(bt-xt)*nt+Rt,(Ut+gt)*et+Zt)),gt=ie*.4,xt=.4,bt=.8,Ut=.5;var fe=new go.PathFigure(bt*nt+Rt,(Ut-xt)*et+Zt,!0);At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Rt,Ut*et+Zt,(bt+gt)*nt+Rt,(Ut-xt)*et+Zt,(bt+xt)*nt+Rt,(Ut-gt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut+xt)*et+Zt,(bt+xt)*nt+Rt,(Ut+gt)*et+Zt,(bt+gt)*nt+Rt,(Ut+xt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-gt*.5)*nt+Rt,Ut*et+Zt,bt*nt+Rt,(Ut+xt)*et+Zt,(bt+xt-gt*.5)*nt+Rt,(Ut+gt)*et+Zt)),fe.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut-xt)*et+Zt,(bt+xt-gt*.5)*nt+Rt,(Ut-gt)*et+Zt,bt*nt+Rt,(Ut-xt)*et+Zt).close()),gt=ie*.8,xt=.8,bt=1,Ut=.5;var Ke=new go.PathFigure(bt*nt+Rt,(Ut-xt)*et+Zt,!0);return At.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt)*nt+Rt,Ut*et+Zt,(bt+gt)*nt+Rt,(Ut-xt)*et+Zt,(bt+xt)*nt+Rt,(Ut-gt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut+xt)*et+Zt,(bt+xt)*nt+Rt,(Ut+gt)*et+Zt,(bt+gt)*nt+Rt,(Ut+xt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,(bt+xt-gt*.5)*nt+Rt,Ut*et+Zt,bt*nt+Rt,(Ut+xt)*et+Zt,(bt+xt-gt*.5)*nt+Rt,(Ut+gt)*et+Zt)),Ke.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt+Rt,(Ut-xt)*et+Zt,(bt+xt-gt*.5)*nt+Rt,(Ut-gt)*et+Zt,bt*nt+Rt,(Ut-xt)*et+Zt).close()),At}),go.Shape.defineFigureGenerator("Email",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,0,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,0)),dt.add(new go.PathSegment(go.PathSegment.Move,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Move,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Ethernet",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.35*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,0).close());var dt=new go.PathFigure(.1*nt,et,!0,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var gt=new go.PathFigure(.6*nt,et,!0,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,et).close());var xt=new go.PathFigure(0,.5*et,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.4*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.75*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.6*et)),xt.add(new go.PathSegment(go.PathSegment.Move,.25*nt,.5*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Power",function(Qt,nt,et){var At=new go.Geometry,at=ie*.4,dt=.4,gt=.5,xt=.5,bt=St(),Ut=St(),Rt=St(),Zt=St();ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.5,bt,bt,Ut,Rt,Zt);var Yt=It(Ut.x,Ut.y),te=new go.PathFigure(Ut.x*nt,Ut.y*et,!0);At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,Rt.x*nt,Rt.y*et,Zt.x*nt,Zt.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,(gt-at)*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et)),ve(gt-dt,xt,gt-dt,xt-at,gt-at,xt-dt,gt,xt-dt,.5,Rt,Zt,Ut,bt,bt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ut.x*nt,Ut.y*et,Rt.x*nt,Rt.y*et,Zt.x*nt,Zt.y*et)),at=ie*.3,dt=.3,ve(gt-dt,xt,gt-dt,xt-at,gt-at,xt-dt,gt,xt-dt,.5,Rt,Zt,Ut,bt,bt),te.add(new go.PathSegment(go.PathSegment.Line,Ut.x*nt,Ut.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt-dt)*nt,xt*et,Zt.x*nt,Zt.y*et,Rt.x*nt,Rt.y*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+dt)*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(gt+dt)*nt,xt*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),ve(gt,xt-dt,gt+at,xt-dt,gt+dt,xt-at,gt+dt,xt,.5,bt,bt,Ut,Rt,Zt),te.add(new go.PathSegment(go.PathSegment.Bezier,Ut.x*nt,Ut.y*et,Zt.x*nt,Zt.y*et,Rt.x*nt,Rt.y*et).close());var te=new go.PathFigure(.45*nt,0,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.5*et)),te.add(new go.PathSegment(go.PathSegment.Line,.55*nt,0).close()),Wt(bt),Wt(Ut),Wt(Rt),Wt(Zt),Wt(Yt),At.spot1=new go.Spot(.25,.45),At.spot2=new go.Spot(.75,.8),At}),go.Shape.defineFigureGenerator("Fallout",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et/2,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,180,360,nt/2,et/2,nt/2,et/2));function dt(gt,xt,bt){gt.add(new go.PathSegment(go.PathSegment.Move,(.3+xt)*nt,(.8+bt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.5+xt)*nt,(.5+bt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.1+xt)*nt,(.5+bt)*et)),gt.add(new go.PathSegment(go.PathSegment.Line,(.3+xt)*nt,(.8+bt)*et).close())}return dt(at,0,0),dt(at,.4,0),dt(at,.2,-.3),At}),go.Shape.defineFigureGenerator("IrritationHazard",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close()),At.spot1=new go.Spot(.3,.3),At.spot2=new go.Spot(.7,.7),At}),go.Shape.defineFigureGenerator("ElectricalHazard",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.37*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.11*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.04*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.49*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.37*et)),at.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.86*et)),at.add(new go.PathSegment(go.PathSegment.Line,.77*nt,.91*et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.34*nt,.78*et)),at.add(new go.PathSegment(go.PathSegment.Line,.44*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.56*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.68*et).close()),At}),go.Shape.defineFigureGenerator("FireHazard",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.29*nt,0,-.25*nt,.63*et,.45*nt,.44*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.51*nt,.42*et,.48*nt,.17*et,.54*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.59*nt,.18*et,.59*nt,.29*et,.58*nt,.28*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.75*nt,.6*et,.8*nt,.34*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.88*nt,.31*et,.87*nt,.48*et,.88*nt,.43*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,1.17*nt,.76*et,.82*nt,.8*et).close()),At.spot1=new go.Spot(.07,.445),At.spot2=new go.Spot(.884,.958),At}),go.Shape.defineFigureGenerator("BpmnActivityLoop",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=0,gt=0,xt=at*ie,bt=.4*Math.SQRT2/2+.5,Ut=.5-.5*Math.SQRT2/2,Rt=1,Zt=.5,Yt=.5,te=0,ye=new go.PathFigure(bt*nt,(1-Ut)*et,!1);return At.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,Zt*et,Rt*nt,.7*et,Rt*nt,Zt*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+dt)*nt,(te+dt)*et,(.5+at+dt)*nt,(.5-xt+dt)*et,(.5+xt+dt)*nt,(.5-at+dt)*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(.5-at+dt)*nt,(.5+gt)*et,(.5-xt+dt)*nt,(.5-at+gt)*et,(.5-at+dt)*nt,(.5-xt+gt)*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(.35+dt)*nt,.9*et,(.5-at+dt)*nt,(.5+xt+gt)*et,(.5-xt+dt)*nt,.9*et)),ye.add(new go.PathSegment(go.PathSegment.Move,(.25+dt)*nt,.8*et)),ye.add(new go.PathSegment(go.PathSegment.Line,(.35+dt)*nt,.9*et)),ye.add(new go.PathSegment(go.PathSegment.Line,(.2+dt)*nt,.95*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityParallel",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivitySequential",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),At}),go.Shape.defineFigureGenerator("BpmnActivityAdHoc",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(nt,et,!1);At.add(dt);var gt=new go.PathFigure(0,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.2*nt,.35*et,.3*nt,.35*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.7*nt,.65*et,.8*nt,.65*et)),At}),go.Shape.defineFigureGenerator("BpmnActivityCompensation",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et).close()),At}),go.Shape.defineFigureGenerator("BpmnTaskMessage",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et).close());var at=new go.PathFigure(0,.2*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskScript",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.7*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,0,.6*nt,.5*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,et,.4*nt,.5*et,nt,.5*et).close());var dt=new go.PathFigure(.45*nt,.73*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.73*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.38*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.63*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.31*nt,.27*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.56*nt,.27*et)),At}),go.Shape.defineFigureGenerator("BpmnTaskUser",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(.335*nt,(1-.555)*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,nt,.68*et,(1-.12)*nt,.46*et,(1-.02)*nt,.54*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.68*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.335*nt,(1-.555)*et,.02*nt,.54*et,.12*nt,.46*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.365*nt,(1-.595)*et));var gt=.5-.285,xt=.5,bt=gt,Ut=Math.PI/4,Rt=4*(1-Math.cos(Ut))/(3*Math.sin(Ut)),Zt=Rt*.5,Yt=gt,te=gt,ye=Rt*Yt,fe=Rt*te;dt.add(new go.PathSegment(go.PathSegment.Bezier,(xt-Yt)*nt,bt*et,(xt-(ye+Yt)/2)*nt,(bt+(te+fe)/2)*et,(xt-Yt)*nt,(bt+fe)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,xt*nt,(bt-te)*et,(xt-Yt)*nt,(bt-fe)*et,(xt-ye)*nt,(bt-te)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(xt+Yt)*nt,bt*et,(xt+ye)*nt,(bt-te)*et,(xt+Yt)*nt,(bt-fe)*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,(1-.365)*nt,(1-.595)*et,(xt+Yt)*nt,(bt+fe)*et,(xt+(ye+Yt)/2)*nt,(bt+(te+fe)/2)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.365)*nt,(1-.595)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.555)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,(1-.335)*nt,(1-.405)*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.335*nt,(1-.405)*et));var Ke=new go.PathFigure(.2*nt,et,!1);At.add(Ke),Ke.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.8*et));var _e=new go.PathFigure(.8*nt,et,!1);return At.add(_e),_e.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventConditional",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,et).close());var dt=new go.PathFigure(.2*nt,.2*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.8*et)),At}),go.Shape.defineFigureGenerator("BpmnEventError",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("BpmnEventEscalation",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at);var dt=new go.PathFigure(nt,et,!1);At.add(dt);var gt=new go.PathFigure(.1*nt,et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Caution",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.05*nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.8*et,0,et,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.55*nt,.1*et,.5*nt,0,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.95*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,et,nt,et,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,et));var dt=.05;return at.add(new go.PathSegment(go.PathSegment.Move,(.5-dt)*nt,.875*et)),at.add(new go.PathSegment(go.PathSegment.Arc,180,-360,.5*nt,.875*et,dt*nt,dt*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.325*et,.575*nt,.725*et,.625*nt,.375*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.75*et,.375*nt,.375*et,.425*nt,.725*et)),At}),go.Shape.defineFigureGenerator("Recycle",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.45*nt,.95*et,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.185*nt,.85*et,.17*nt,.95*et,.15*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.235*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,.3*nt,.625*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.05*nt,.575*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.1875*nt,.95*et,0,.675*et,0,.7*et)),at.add(new go.PathSegment(go.PathSegment.Move,.45*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.775*et)),at.add(new go.PathSegment(go.PathSegment.Line,.22*nt,.775*et));var dt=new go.PathFigure(.475*nt,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.225*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.275*nt,.175*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.325*nt,.05*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,.05*et,.35*nt,0,.375*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.375*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.475*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.315*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.32*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.05*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,0,.65*nt,.05*et,.625*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.38*nt,.0105*et));var gt=new go.PathFigure(.675*nt,.575*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.875*nt,.525*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,.85*nt,.95*et,nt,.8*et,nt,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.95*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.85*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.725*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.775*et)),gt.add(new go.PathSegment(go.PathSegment.Move,.675*nt,.575*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.775*nt,.775*et)),At}),go.Shape.defineFigureGenerator("BpmnEventTimer",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=new go.PathFigure(nt,at*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,et,nt,(at+dt)*et,(at+dt)*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,at*et,(at-dt)*nt,et,0,(at+dt)*et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,at*nt,0,0,(at-dt)*et,(at-dt)*nt,0)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt,at*et,(at+dt)*nt,0,nt,(at-dt)*et));var xt=new go.PathFigure(at*nt,0,!1);return At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.15*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,et)),xt.add(new go.PathSegment(go.PathSegment.Line,at*nt,.85*et)),xt.add(new go.PathSegment(go.PathSegment.Move,0,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.58*nt,.1*et)),xt.add(new go.PathSegment(go.PathSegment.Move,at*nt,at*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.78*nt,.54*et)),At}),go.Shape.defineFigureGenerator("Package",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.15*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close());var dt=new go.PathFigure(0,.15*et,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.15*et).close()),At.spot1=new go.Spot(0,.1),At.spot2=new go.Spot(1,1),At}),go.Shape.defineFigureGenerator("Class",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var gt=new go.PathFigure(0,.5*et,!1);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et).close()),At}),go.Shape.defineFigureGenerator("Component",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close());var dt=new go.PathFigure(0,.2*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.2*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.2*et).close());var gt=new go.PathFigure(0,.6*et,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.6*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,0,.6*et).close()),At}),go.Shape.defineFigureGenerator("Boat Shipment",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.15*nt,.6*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.6*et));var dt=new go.PathFigure(.15*nt,.6*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.6*et)),At}),go.Shape.defineFigureGenerator("Customer/Supplier",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.66*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,.33*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Workcell",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.65*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.35*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),At}),go.Shape.defineFigureGenerator("Supermarket",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.33*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.33*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.66*et)),at.add(new go.PathSegment(go.PathSegment.Move,nt,.66*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),At}),go.Shape.defineFigureGenerator("TruckShipment",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(nt,.8*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et).close());var gt=.1,xt=ie*.1,bt=.2,Ut=.9,Rt=new go.PathFigure((bt-gt)*nt,Ut*et,!0);At.add(Rt),Rt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-gt)*et,(bt-gt)*nt,(Ut-xt)*et,(bt-xt)*nt,(Ut-gt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+gt)*nt,Ut*et,(bt+xt)*nt,(Ut-gt)*et,(bt+gt)*nt,(Ut-xt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut+gt)*et,(bt+gt)*nt,(Ut+xt)*et,(bt+xt)*nt,(Ut+gt)*et)),Rt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-gt)*nt,Ut*et,(bt-xt)*nt,(Ut+gt)*et,(bt-gt)*nt,(Ut+xt)*et).close()),gt=.1,xt=ie*.1,bt=.8,Ut=.9;var Zt=new go.PathFigure((bt-gt)*nt,Ut*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut-gt)*et,(bt-gt)*nt,(Ut-xt)*et,(bt-xt)*nt,(Ut-gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt+gt)*nt,Ut*et,(bt+xt)*nt,(Ut-gt)*et,(bt+gt)*nt,(Ut-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,bt*nt,(Ut+gt)*et,(bt+gt)*nt,(Ut+xt)*et,(bt+xt)*nt,(Ut+gt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(bt-gt)*nt,Ut*et,(bt-xt)*nt,(Ut+gt)*et,(bt-gt)*nt,(Ut+xt)*et).close()),At}),go.Shape.defineFigureGenerator("KanbanPost",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.2*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,0)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,et)),At}),go.Shape.defineFigureGenerator("Forklift",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0));var dt=new go.PathFigure(0,.5*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var gt=new go.PathFigure(.5*nt,.8*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.1*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.8*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.8*et));var xt=new go.PathFigure(.5*nt,.7*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt,.7*et));var bt=.1,Ut=ie*.1,Rt=.1,Zt=.9,Yt=new go.PathFigure((Rt-bt)*nt,Zt*et,!0);At.add(Yt),Yt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Zt-bt)*et,(Rt-bt)*nt,(Zt-Ut)*et,(Rt-Ut)*nt,(Zt-bt)*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+bt)*nt,Zt*et,(Rt+Ut)*nt,(Zt-bt)*et,(Rt+bt)*nt,(Zt-Ut)*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Zt+bt)*et,(Rt+bt)*nt,(Zt+Ut)*et,(Rt+Ut)*nt,(Zt+bt)*et)),Yt.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-bt)*nt,Zt*et,(Rt-Ut)*nt,(Zt+bt)*et,(Rt-bt)*nt,(Zt+Ut)*et)),bt=.1,Ut=ie*.1,Rt=.4,Zt=.9;var te=new go.PathFigure((Rt-bt)*nt,Zt*et,!0);return At.add(te),te.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Zt-bt)*et,(Rt-bt)*nt,(Zt-Ut)*et,(Rt-Ut)*nt,(Zt-bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Rt+bt)*nt,Zt*et,(Rt+Ut)*nt,(Zt-bt)*et,(Rt+bt)*nt,(Zt-Ut)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,Rt*nt,(Zt+bt)*et,(Rt+bt)*nt,(Zt+Ut)*et,(Rt+Ut)*nt,(Zt+bt)*et)),te.add(new go.PathSegment(go.PathSegment.Bezier,(Rt-bt)*nt,Zt*et,(Rt-Ut)*nt,(Zt+bt)*et,(Rt-bt)*nt,(Zt+Ut)*et)),At}),go.Shape.defineFigureGenerator("RailShipment",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.1*nt,.4*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.45*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.4*et).close());var dt=new go.PathFigure(.45*nt,.7*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.7*et));var gt=new go.PathFigure(.55*nt,.4*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.9*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.55*nt,.4*et).close());var Rt=.05,Zt=ie*.05,Yt=.175,te=.95,xt=new go.PathFigure((Yt-Rt)*nt,te*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te-Rt)*et,(Yt-Rt)*nt,(te-Zt)*et,(Yt-Zt)*nt,(te-Rt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+Rt)*nt,te*et,(Yt+Zt)*nt,(te-Rt)*et,(Yt+Rt)*nt,(te-Zt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te+Rt)*et,(Yt+Rt)*nt,(te+Zt)*et,(Yt+Zt)*nt,(te+Rt)*et)),xt.add(new go.PathSegment(go.PathSegment.Bezier,(Yt-Rt)*nt,te*et,(Yt-Zt)*nt,(te+Rt)*et,(Yt-Rt)*nt,(te+Zt)*et));var Rt=.05,Zt=ie*.05,Yt=.375,te=.95,bt=new go.PathFigure((Yt-Rt)*nt,te*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te-Rt)*et,(Yt-Rt)*nt,(te-Zt)*et,(Yt-Zt)*nt,(te-Rt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+Rt)*nt,te*et,(Yt+Zt)*nt,(te-Rt)*et,(Yt+Rt)*nt,(te-Zt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te+Rt)*et,(Yt+Rt)*nt,(te+Zt)*et,(Yt+Zt)*nt,(te+Rt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(Yt-Rt)*nt,te*et,(Yt-Zt)*nt,(te+Rt)*et,(Yt-Rt)*nt,(te+Zt)*et));var Rt=.05,Zt=ie*.05,Yt=.625,te=.95,Ut=new go.PathFigure((Yt-Rt)*nt,te*et,!0);At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te-Rt)*et,(Yt-Rt)*nt,(te-Zt)*et,(Yt-Zt)*nt,(te-Rt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+Rt)*nt,te*et,(Yt+Zt)*nt,(te-Rt)*et,(Yt+Rt)*nt,(te-Zt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te+Rt)*et,(Yt+Rt)*nt,(te+Zt)*et,(Yt+Zt)*nt,(te+Rt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(Yt-Rt)*nt,te*et,(Yt-Zt)*nt,(te+Rt)*et,(Yt-Rt)*nt,(te+Zt)*et));var Rt=.05,Zt=ie*.05,Yt=.825,te=.95,ye=new go.PathFigure((Yt-Rt)*nt,te*et,!0);At.add(ye),ye.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te-Rt)*et,(Yt-Rt)*nt,(te-Zt)*et,(Yt-Zt)*nt,(te-Rt)*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(Yt+Rt)*nt,te*et,(Yt+Zt)*nt,(te-Rt)*et,(Yt+Rt)*nt,(te-Zt)*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,Yt*nt,(te+Rt)*et,(Yt+Rt)*nt,(te+Zt)*et,(Yt+Zt)*nt,(te+Rt)*et)),ye.add(new go.PathSegment(go.PathSegment.Bezier,(Yt-Rt)*nt,te*et,(Yt-Zt)*nt,(te+Rt)*et,(Yt-Rt)*nt,(te+Zt)*et).close());var fe=new go.PathFigure(0,et,!1);return At.add(fe),fe.add(new go.PathSegment(go.PathSegment.Line,nt,et).close()),At}),go.Shape.defineFigureGenerator("Warehouse",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,0).close());var dt=new go.PathFigure(0,.2*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et).close());var gt=new go.PathFigure(.15*nt,et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.5*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.4*nt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,.15*nt,et).close());var xt=.05,bt=ie*.05,Ut=.35,Rt=.775,Zt=new go.PathFigure((Ut-xt)*nt,Rt*et,!0);return At.add(Zt),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ut*nt,(Rt-xt)*et,(Ut-xt)*nt,(Rt-bt)*et,(Ut-bt)*nt,(Rt-xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ut+xt)*nt,Rt*et,(Ut+bt)*nt,(Rt-xt)*et,(Ut+xt)*nt,(Rt-bt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,Ut*nt,(Rt+xt)*et,(Ut+xt)*nt,(Rt+bt)*et,(Ut+bt)*nt,(Rt+xt)*et)),Zt.add(new go.PathSegment(go.PathSegment.Bezier,(Ut-xt)*nt,Rt*et,(Ut-bt)*nt,(Rt+xt)*et,(Ut-xt)*nt,(Rt+bt)*et).close()),At}),go.Shape.defineFigureGenerator("ControlCenter",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et).close()),At}),go.Shape.defineFigureGenerator("Bluetooth",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.75*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.25*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Bookmark",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,0,0)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.4*et)),At}),go.Shape.defineFigureGenerator("Globe",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.5*et,.75*nt,0,nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,nt,.75*et,.75*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.25*nt,et,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,0,.25*et,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,et,.15*nt,.25*et,.15*nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.85*nt,.75*et,.85*nt,.25*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.15*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.15*et,.35*nt,.3*et,.65*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.1675*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8325*nt,.85*et,.35*nt,.7*et,.65*nt,.7*et)),At}),go.Shape.defineFigureGenerator("Wave",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.25*et,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.25*et,.1*nt,0,.2*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.25*et,.425*nt,.5*et,.575*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.25*et,.8*nt,0,.9*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.75*et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.25*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.75*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.75*et,.1*nt,.5*et,.2*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.7*nt,.75*et,.425*nt,et,.575*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.75*et,.8*nt,.5*et,.9*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Operator",function(Qt,nt,et){var At=new go.Geometry,at=.3,dt=ie*.3,gt=.5,xt=.7,bt=new go.PathFigure((gt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et));var Ut=new go.PathFigure(0,.7*et,!1);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,nt,.7*et,0,0,nt,0)),At}),go.Shape.defineFigureGenerator("TripleFanBlades",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.5*nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.65*nt,.3*et,.65*nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.35*nt,.5*et,.35*nt,.3*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,et,.3*nt,.6*et,.1*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.2*nt,et,.35*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.65*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,et,.7*nt,.6*et,.9*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.65*et,.8*nt,et,.65*nt,.95*et)),At}),go.Shape.defineFigureGenerator("CentrifugalPump",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt,0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,0,.075*et,0,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.4*nt,et,0,et,.4*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.4*et,.8*nt,et,.85*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,0)),At}),go.Shape.defineFigureGenerator("Battery",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,.4*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.1*et));var dt=new go.PathFigure(0,.6*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,0,.4*et)),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.4*et)),At}),go.Shape.defineFigureGenerator("Delete",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=.5,xt=.5,bt=new go.PathFigure((gt-at)*nt,xt*et,!0);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et));var Ut=new go.PathFigure(.15*nt,.5*et,!1);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.5*et)),At}),go.Shape.defineFigureGenerator("Flag",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.1*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Move,0,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.1*et,.15*nt,0,.35*nt,0)),at.add(new go.PathSegment(go.PathSegment.Bezier,nt,.1*et,.65*nt,.2*et,.85*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.5*et,.85*nt,.6*et,.65*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.5*et,.35*nt,.4*et,.15*nt,.4*et).close()),At}),go.Shape.defineFigureGenerator("Help",function(Qt,nt,et){var At=new go.Geometry,at=.5,dt=ie*.5,gt=.5,xt=.5,bt=new go.PathFigure((gt-at)*nt,xt*et,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),bt.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et).close()),at=.05,dt=ie*.05,gt=.5,xt=.8;var Ut=new go.PathFigure((gt-at)*nt,xt*et,!1);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt-at)*et,(gt-at)*nt,(xt-dt)*et,(gt-dt)*nt,(xt-at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt+at)*nt,xt*et,(gt+dt)*nt,(xt-at)*et,(gt+at)*nt,(xt-dt)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,gt*nt,(xt+at)*et,(gt+at)*nt,(xt+dt)*et,(gt+dt)*nt,(xt+at)*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,(gt-at)*nt,xt*et,(gt-dt)*nt,(xt+at)*et,(gt-at)*nt,(xt+dt)*et).close()),Ut.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.7*et)),Ut.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.5*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,.2*et,.75*nt,.475*et,.75*nt,.225*et)),Ut.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.35*et,.4*nt,.2*et,.3*nt,.25*et)),At}),go.Shape.defineFigureGenerator("Location",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.5*nt,et,!0).add(new go.PathSegment(go.PathSegment.Line,.75*nt,.5*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5*nt,0,.975*nt,.025*et,.5*nt,0)).add(new go.PathSegment(go.PathSegment.Bezier,.25*nt,.5*et,.5*nt,0,.025*nt,.025*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)).add(new go.PathSegment(go.PathSegment.Arc,270,360,.5*nt,.3*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Lock",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var dt=new go.PathFigure(.2*nt,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.3*et)),At}),go.Shape.defineFigureGenerator("Unlocked",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.5*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.5*et));var dt=new go.PathFigure(.2*nt,.5*et,!1);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Move,.2*nt,.5*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.3*et)),dt.add(new go.PathSegment(go.PathSegment.Bezier,.8*nt,.3*et,.25*nt,0,.75*nt,0)),dt.add(new go.PathSegment(go.PathSegment.Line,.8*nt,.35*et)),At}),go.Shape.defineFigureGenerator("Gear",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(.9375*nt,.56246875*et,!0).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.80621875*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.763*nt,.3316875*et,.79840625*nt,.39915625*et,.7834375*nt,.3635*et)).add(new go.PathSegment(go.PathSegment.Line,.8566875*nt,.23796875*et)).add(new go.PathSegment(go.PathSegment.Line,.76825*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.67596875*nt,.24184375*et)).add(new go.PathSegment(go.PathSegment.Bezier,.5625*nt,.19378125*et,.64228125*nt,.2188125*et,.603875*nt,.2021875*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.0625*et)).add(new go.PathSegment(go.PathSegment.Line,.4375*nt,.19378125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.32775*nt,.239375*et,.39759375*nt,.20190625*et,.36053125*nt,.2176875*et)).add(new go.PathSegment(go.PathSegment.Line,.2379375*nt,.14959375*et)).add(new go.PathSegment(go.PathSegment.Line,.14953125*nt,.2379375*et)).add(new go.PathSegment(go.PathSegment.Line,.23934375*nt,.3278125*et)).add(new go.PathSegment(go.PathSegment.Bezier,.19378125*nt,.4375*et,.21765625*nt,.36059375*et,.201875*nt,.397625*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.4375*et)).add(new go.PathSegment(go.PathSegment.Line,.0625*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Line,.1938125*nt,.5625*et)).add(new go.PathSegment(go.PathSegment.Bezier,.241875*nt,.67596875*et,.20221875*nt,.603875*et,.21884375*nt,.64228125*et)).add(new go.PathSegment(go.PathSegment.Line,.1495625*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.238*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.3316875*nt,.76296875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.43753125*nt,.80621875*et,.36353125*nt,.78340625*et,.3991875*nt,.79840625*et)).add(new go.PathSegment(go.PathSegment.Line,.43753125*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.9375*et)).add(new go.PathSegment(go.PathSegment.Line,.5625*nt,.80621875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.67225*nt,.760625*et,.602375*nt,.79809375*et,.63946875*nt,.78234375*et)).add(new go.PathSegment(go.PathSegment.Line,.76828125*nt,.8566875*et)).add(new go.PathSegment(go.PathSegment.Line,.85671875*nt,.76825*et)).add(new go.PathSegment(go.PathSegment.Line,.76065625*nt,.67221875*et)).add(new go.PathSegment(go.PathSegment.Bezier,.80621875*nt,.56246875*et,.78234375*nt,.63940625*et,.798125*nt,.602375*et)).add(new go.PathSegment(go.PathSegment.Line,.9375*nt,.56246875*et).close()).add(new go.PathSegment(go.PathSegment.Move,.5*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Arc,90,360,.5*nt,.5*et,.1*nt,.1*et).close()))}),go.Shape.defineFigureGenerator("Hand",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.5*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Bezier,.1*nt,.3*et,0,.375*et,.05*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.45*nt,.075*et,.3*nt,.225*et,.4*nt,.175*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.525*nt,.075*et,.46*nt,.05*et,.525*nt,.05*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.3*nt,.4*et,.525*nt,.275*et,.475*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.55*et,nt,.4*et,nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.425*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.55*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.6*nt,.7*et,.675*nt,.55*et,.675*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.575*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.575*nt,.85*et,.65*nt,.7*et,.65*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Line,.525*nt,.85*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.535*nt,et,.61*nt,.85*et,.61*nt,et)),at.add(new go.PathSegment(go.PathSegment.Bezier,0,.9*et,.435*nt,et,0,et).close()),At}),go.Shape.defineFigureGenerator("Map",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,.2*et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.25*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.25*nt,.8*et)),at.add(new go.PathSegment(go.PathSegment.Move,.5*nt,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et)),at.add(new go.PathSegment(go.PathSegment.Move,.75*nt,0)),at.add(new go.PathSegment(go.PathSegment.Line,.75*nt,.8*et)),At}),go.Shape.defineFigureGenerator("Eject",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt,et)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.7)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.7).close());var dt=new go.PathFigure(0,et*.6,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt,.6*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.5*nt,0).close()),At}),go.Shape.defineFigureGenerator("Pencil",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.2*et).close()))}),go.Shape.defineFigureGenerator("Building",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.046*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.3)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,(1-.046)*nt,et*.85)),at.add(new go.PathSegment(go.PathSegment.Line,nt,et*.85).close());var dt=new go.PathFigure(.126*nt,.85*et,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,.126*nt,.45*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.45*et)),dt.add(new go.PathSegment(go.PathSegment.Line,.322*nt,.85*et).close());var gt=new go.PathFigure(.402*nt,.85*et,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,.402*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.45*et)),gt.add(new go.PathSegment(go.PathSegment.Line,.598*nt,.85*et).close());var xt=new go.PathFigure(.678*nt,.85*et,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,.678*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.45*et)),xt.add(new go.PathSegment(go.PathSegment.Line,.874*nt,.85*et).close());var bt=new go.PathFigure(.5*nt,.1*et,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,(.046+.15)*nt,.3*et)),bt.add(new go.PathSegment(go.PathSegment.Line,(1-(.046+.15))*nt,.3*et).close()),At}),go.Shape.defineFigureGenerator("Staircase",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.8)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.6)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.4)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.2)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.15)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*.95).close()),At}),go.Shape.defineFigureGenerator("5Bars",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,et*1,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.184,et*(1-.184)).close());var dt=new go.PathFigure(nt*.204,et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.204,et*(1-.184))),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*(1-.184*2))),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.388,et*1).close());var gt=new go.PathFigure(nt*.408,et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.408,et*(1-.184*2))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*(1-.184*3))),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.592,et*1).close());var xt=new go.PathFigure(nt*.612,et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.612,et*(1-.184*3))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*(1-.184*4))),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.796,et*1).close());var bt=new go.PathFigure(nt*.816,et,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.816,et*(1-.184*4))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-.184*5))),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1).close()),At}),go.Shape.defineFigureGenerator("PC",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,0).close());var dt=new go.PathFigure(nt*.055,.07*et,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.07)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.1).close());var gt=new go.PathFigure(nt*.055,.13*et,!0);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.13)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.16)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.16).close());var xt=new go.PathFigure(nt*.055,.18*et,!0);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.18)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.245,et*.21)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.055,et*.21).close());var bt=new go.PathFigure(nt*1,0,!0);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,0)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.65)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.65).close()),At}),go.Shape.defineFigureGenerator("Plane",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(.55*nt,et,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.7*et)),at.add(new go.PathSegment(go.PathSegment.Line,.1*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.35*nt,.525*et,0,.4*et,.225*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.4*nt,.475*et)),at.add(new go.PathSegment(go.PathSegment.Line,.15*nt,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,.2*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.325*et)),at.add(new go.PathSegment(go.PathSegment.Line,.85*nt,.1*et)),at.add(new go.PathSegment(go.PathSegment.Bezier,.9*nt,.2*et,.975*nt,0,nt,.08*et)),at.add(new go.PathSegment(go.PathSegment.Line,.7*nt,.45*et)),at.add(new go.PathSegment(go.PathSegment.Line,.6*nt,.95*et)),at.add(new go.PathSegment(go.PathSegment.Line,.55*nt,et).close()),At}),go.Shape.defineFigureGenerator("Key",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*1,et*.5,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.4*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.2*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.35*et)),at.add(new go.PathSegment(go.PathSegment.Line,0,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.15,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,.8*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.65*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,.55*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,.6*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,.575*et)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.9,.6*et).close()),at.add(new go.PathSegment(go.PathSegment.Move,.17*nt,.425*et)),at.add(new go.PathSegment(go.PathSegment.Arc,270,360,.17*nt,.5*et,.075*nt,.075*et).close()),At}),go.Shape.defineFigureGenerator("FilmTape",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(0,0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Arc,270,180,nt*0,nt*.3,nt*.055)),at.add(new go.PathSegment(go.PathSegment.Line,0,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.08,et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*1),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*2),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*3),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*4),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*5),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*6),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*7),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*8),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*9),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*10),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*11),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*12),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*13),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*14),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*.95)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(.08+.056*15),et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var dt=new go.PathFigure(0,0,!1);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*0)),dt.add(new go.PathSegment(go.PathSegment.Arc,270,-180,nt*1,nt*.3,nt*.055)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1));var gt=new go.PathFigure(nt*.11,et*.1,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.1)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*0),et*.8)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.11,et*.8).close());var xt=new go.PathFigure(nt*(.11+.24133333*1+.028*1),et*.1,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.1)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*1),et*.8)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*1+.028*1),et*.8).close());var bt=new go.PathFigure(nt*(.11+.24133333*2+.028*2),et*.1,!1);return At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.1)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*3+.028*2),et*.8)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*(.11+.24133333*2+.028*2),et*.8).close()),At}),go.Shape.defineFigureGenerator("FloppyDisk",function(Qt,nt,et){var At=new go.Geometry,at=8,dt=at*ie,gt=new go.PathFigure(at,0,!1);At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.86,0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.14)),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-dt,nt-dt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,at,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,dt,et,0,et-dt)),gt.add(new go.PathSegment(go.PathSegment.Line,0,at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,at,0,0,dt,dt,0).close());var xt=new go.PathFigure(nt*.83,0,!1);At.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.3)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*0).close());var bt=new go.PathFigure(nt*.83,et*1,!1);At.add(bt),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.83,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*.5)),bt.add(new go.PathSegment(go.PathSegment.Line,nt*.17,et*1).close());var Ut=new go.PathFigure(nt*.78,et*.05,!1);return At.add(Ut),Ut.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.05)),Ut.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.25)),Ut.add(new go.PathSegment(go.PathSegment.Line,nt*.78,et*.25).close()),At}),go.Shape.defineFigureGenerator("SpeechBubble",function(Qt,nt,et){var At=Qt?Qt.parameter1:NaN;(isNaN(At)||At<0)&&(At=15),At=Math.min(At,nt/3),At=Math.min(At,et/3);var at=At*ie,dt=et*.8,gt=new go.Geometry,xt=new go.PathFigure(At,0,!0);return gt.add(xt),xt.add(new go.PathSegment(go.PathSegment.Line,nt-At,0)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt,At,nt-at,0,nt,at)),xt.add(new go.PathSegment(go.PathSegment.Line,nt,dt-At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,nt-At,dt,nt,dt-at,nt-at,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et)),xt.add(new go.PathSegment(go.PathSegment.Line,nt*.55,dt)),xt.add(new go.PathSegment(go.PathSegment.Line,At,dt)),xt.add(new go.PathSegment(go.PathSegment.Bezier,0,dt-At,at,dt,0,dt-at)),xt.add(new go.PathSegment(go.PathSegment.Line,0,At)),xt.add(new go.PathSegment(go.PathSegment.Bezier,At,0,0,at,at,0).close()),at>1?(gt.spot1=new go.Spot(0,0,at,at),gt.spot2=new go.Spot(1,.8,-at,-at)):(gt.spot1=go.Spot.TopLeft,gt.spot2=new go.Spot(1,.8)),gt}),go.Shape.defineFigureGenerator("Repeat",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.45,!0);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.2,et*.45).close());var dt=new go.PathFigure(nt*1,et*.55,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.55)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.55)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.1)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*.55).close()),At}),go.Shape.defineFigureGenerator("Windows",function(Qt,nt,et){return new go.Geometry().add(new go.PathFigure(0,0,!0).add(new go.PathSegment(go.PathSegment.Line,nt,0)).add(new go.PathSegment(go.PathSegment.Line,nt,et)).add(new go.PathSegment(go.PathSegment.Line,0,et).close()).add(new go.PathSegment(go.PathSegment.Move,.4*nt,.4*et)).add(new go.PathSegment(go.PathSegment.Line,.4*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.8*et)).add(new go.PathSegment(go.PathSegment.Line,.9*nt,.4*et).close()).add(new go.PathSegment(go.PathSegment.Move,.2*nt,.1*et)).add(new go.PathSegment(go.PathSegment.Line,.2*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.7*nt,.1*et).close()).add(new go.PathSegment(go.PathSegment.Move,.1*nt,.6*et)).add(new go.PathSegment(go.PathSegment.Line,.1*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.9*et)).add(new go.PathSegment(go.PathSegment.Line,.5*nt,.6*et).close()))}),go.Shape.defineFigureGenerator("Terminal",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*.1,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.9)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.9).close());var dt=new go.PathFigure(nt*.1,et*.2,!0);At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.25)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.22,et*.285)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.32)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.1,et*.37)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.32)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.275,et*.25).close());var gt=new go.PathFigure(nt*.28,et*.37,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.37)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.41)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.28,et*.41).close()),At}),go.Shape.defineFigureGenerator("Beaker",function(Qt,nt,et){var At=new go.Geometry,at=15,dt=at*ie,gt=new go.PathFigure(nt*.62,et*.475,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt,et-at)),gt.add(new go.PathSegment(go.PathSegment.Bezier,nt-at,et,nt,et-dt,nt-dt,et)),gt.add(new go.PathSegment(go.PathSegment.Line,at,et)),gt.add(new go.PathSegment(go.PathSegment.Bezier,0,et-at,dt,et,0,et-dt)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.475)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.38,et*.03)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*0)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.62,et*.03).close()),dt>1?(At.spot1=new go.Spot(0,0,dt,dt),At.spot2=new go.Spot(1,1,-dt,-dt)):(At.spot1=go.Spot.TopLeft,At.spot2=go.Spot.BottomRight),At}),go.Shape.defineFigureGenerator("Download",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close());var gt=new go.PathFigure(nt*.4,et*0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.66)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.26),et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.44)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*0).close()),At}),go.Shape.defineFigureGenerator("Bin",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;return at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close()),At}),go.Shape.defineFigureGenerator("Upload",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*0,et*1,!0);At.add(at);var dt=.1/.3;at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.8,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.66,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.755,et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.93,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.64,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.61,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.39,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.36,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*.07,et*(1-dt))),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.755),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*.055)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.66),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*(1-.8),et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*(1-dt)).close());var gt=new go.PathFigure(nt*.5,et*0,!0);return At.add(gt),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.26,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.4,et*.63)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.63)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.6,et*.25)),gt.add(new go.PathSegment(go.PathSegment.Line,nt*.74,et*.25).close()),At}),go.Shape.defineFigureGenerator("EmptyDrink",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close()),At}),go.Shape.defineFigureGenerator("Drink",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.15,et*0,!1);At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.85,et*0)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.7,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.3,et*1).close());var dt=new go.PathFigure(nt*.235,et*.28,!0);return At.add(dt),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.765,et*.28)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.655,et*.97)),dt.add(new go.PathSegment(go.PathSegment.Line,nt*.345,et*.97).close()),At}),go.Shape.defineFigureGenerator("4Arrows",function(Qt,nt,et){var At=new go.Geometry,at=new go.PathFigure(nt*.5,et*0,!0);return At.add(at),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*1,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.75,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.55,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.65,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.5,et*1)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.75)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.55)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.65)),at.add(new go.PathSegment(go.PathSegment.Line,nt*0,et*.5)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.35)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.25,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.45)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.45,et*.25)),at.add(new go.PathSegment(go.PathSegment.Line,nt*.35,et*.25).close()),At}),go.Shape.defineFigureGenerator("Connector","Ellipse"),go.Shape.defineFigureGenerator("Alternative","TriangleUp"),go.Shape.defineFigureGenerator("Merge","TriangleUp"),go.Shape.defineFigureGenerator("Decision","Diamond"),go.Shape.defineFigureGenerator("DataTransmissions","Hexagon"),go.Shape.defineFigureGenerator("Gate","Crescent"),go.Shape.defineFigureGenerator("Delay","HalfEllipse"),go.Shape.defineFigureGenerator("Input","Parallelogram1"),go.Shape.defineFigureGenerator("ManualLoop","ManualOperation"),go.Shape.defineFigureGenerator("ISOProcess","Chevron"),go.Shape.defineFigureGenerator("MessageToUser","SquareArrow"),go.Shape.defineFigureGenerator("MagneticData","Cylinder1"),go.Shape.defineFigureGenerator("DirectData","Cylinder4"),go.Shape.defineFigureGenerator("StoredData","DataStorage"),go.Shape.defineFigureGenerator("SequentialData","MagneticTape"),go.Shape.defineFigureGenerator("Subroutine","Procedure")},43001:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var Sn={},Ve="5.0",It={},St=null,Wt=!1,le=!1,ve=null,de=!1,Ht=null,ie=null,oe=0;oe<arguments.length;oe++){var he=arguments[oe];if(he!==null)switch(typeof he){case"number":Ve=he.toFixed(1);break;case"string":he.match(new RegExp("^[0-9]\\.[0-9]+$"))?Ve=he:ve=he;break;case"object":typeof he.is3D!="undefined"?St=he:It=he;break;case"boolean":Wt=he,le=!0;break}}St===null&&(St={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},It.material_id!==void 0&&!le&&(Wt=!0)),ve!==null&&It.id===void 0&&(It.id=ve);var Gt="",Ie="",Xt=!1,Me=null,Qt=null,nt=null,et=!1,At=null,at=null,dt=null,gt=null,xt=null;It.height!==void 0&&(It.height=Math.round(It.height)),It.width!==void 0&&(It.width=Math.round(It.width));var bt=function(sn){return parseFloat(sn)>4?parseFloat(sn):5};Sn.setHTML5Codebase=function(sn,Qn){ie=sn,pn(sn,Qn)},Sn.setJavaCodebase=Sn.setJavaCodebaseVersion=Sn.isCompiledInstalled=Sn.setPreCompiledScriptPath=Sn.setPreCompiledResourcePath=function(){},Sn.setHTML5CodebaseVersion=function(sn,Qn){var jn=parseFloat(sn);if(jn!==NaN&&jn<5){console.log("The GeoGebra HTML5 codebase version "+jn+" is deprecated. Using version latest instead.");return}Ht=sn,ne(sn,Qn)},Sn.getHTML5CodebaseVersion=function(){return Qt},Sn.getParameters=function(){return It},Sn.setFontsCSSURL=function(sn){gt=sn},Sn.setGiacJSURL=function(sn){},Sn.setJNLPFile=function(sn){Gt=sn},Sn.setJNLPBaseDir=function(sn){},Sn.inject=function(){function sn(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var Qn="auto",jn=It.id,Ti,$e=!1,Le=0;Le<arguments.length;Le++){var tn=arguments[Le];typeof tn=="string"?(tn=tn.toLowerCase(),tn.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?Qn=tn:jn=arguments[Le]):typeof tn=="boolean"?$e=tn:tn instanceof HTMLElement&&(Ti=tn)}hi();function hi(){if(!de){setTimeout(hi,200);return}Qn=Xn(Qn);var ni=Ti||document.getElementById(jn);if(!ni){console.log("possibly bug on ajax loading? ");return}if(Sn.removeExistingApplet(ni,!1),It.width===void 0&&ni.clientWidth&&(It.width=ni.clientWidth),It.height===void 0&&ni.clientHeight&&(It.height=ni.clientHeight),!(It.width&&It.height)&&Qn==="html5"&&(delete It.width,delete It.height),Me=Qn,Qn==="screenshot")_e(ni,It);else{var zt=!1;It.hasOwnProperty("playButton")&&It.playButton||It.hasOwnProperty("clickToLoad")&&It.clickToLoad?zt=!0:It.hasOwnProperty("playButtonAutoDecide")&&It.playButtonAutoDecide&&(zt=(!Ut()||sn())&&Rt()),zt?(Me="screenshot",fn(ni,It,$e,Qn)):Ke(ni,It,$e)}}};function Ut(){try{return window.self!==window.top}catch(sn){return!0}}function Rt(){return It.hasOwnProperty("screenshotGenerator")&&It.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}Sn.getViews=function(){return St},Sn.isJavaInstalled=function(){return!1};var Zt=function(sn){var Qn=function(Le){var tn=JSON.parse(Le),hi=function(Ft){return Ft.type=="G"||Ft.type=="E"},ni=tn.elements?tn.elements.filter(hi)[0]:tn;if(!ni||!ni.url){jn();return}It.fileName=ni.url,Yt(ni.settings||{}),St.is3D=!0;var zt="https://www.geogebra.org/images/";Sn.setPreviewImage(At||ni.previewUrl,zt+"GeoGebra_loading.png",zt+"applet_play.png"),sn()},jn=function(){It.onError&&It.onError(),Ai("Error: Fetching material (id "+It.material_id+") failed.",It)},Ti=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",$e="/materials/"+It.material_id+"?scope=basic";te("https://"+Ti+"/api/proxy.php?path="+encodeURIComponent($e),Qn,jn)};function Yt(sn){var Qn=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(jn){sn[jn]=!!sn[jn]}),Qn.forEach(function(jn){It[jn]===void 0&&sn[jn]!==void 0&&(It[jn]=sn[jn])}),It.showToolBarHelp===void 0&&(It.showToolBarHelp=It.showToolBar)}function te(sn,Qn,jn){var Ti=new XMLHttpRequest;Ti.open("GET",sn),Ti.onload=function(){Qn(Ti.responseText)},Ti.onerror=jn,Ti.send()}Sn.isHTML5Installed=function(){return!0},Sn.getLoadedAppletType=function(){return Me},Sn.setPreviewImage=function(sn,Qn,jn){At=sn,at=Qn,dt=jn},Sn.removeExistingApplet=function(sn,Qn){var jn;typeof sn=="string"&&(sn=document.getElementById(sn)),Me=null;var Ti=null;for(jn=0;jn<sn.childNodes.length;jn++){var $e=sn.childNodes[jn],Le=$e.className;Le==="applet_screenshot"?Qn?($e.style.display="block",Me="screenshot"):$e.style.display="none":Le!=="applet_scaler prerender"&&(sn.removeChild($e),Ti=Le&&Le.indexOf("appletParameters")!=-1?$e.id:null,jn--)}var tn=It.id!==void 0?It.id:Ti,hi=window[tn];hi&&typeof hi.getBase64=="function"&&(hi.remove(),window[tn]=null)},Sn.refreshHitPoints=function(){if(bt(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var sn=Sn.getAppletObject();return sn&&typeof sn.recalculateEnvironments=="function"?(sn.recalculateEnvironments(),!0):!1},Sn.startAnimation=function(){var sn=Sn.getAppletObject();return sn&&typeof sn.startAnimation=="function"?(sn.startAnimation(),!0):!1},Sn.stopAnimation=function(){var sn=Sn.getAppletObject();return sn&&typeof sn.stopAnimation=="function"?(sn.stopAnimation(),!0):!1},Sn.getAppletObject=function(){var sn=It.id!==void 0?It.id:"ggbApplet";return window[sn]},Sn.resize=function(){};var ye=function(sn,Qn,jn){var Ti=document.createElement("param");Ti.setAttribute("name",Qn),Ti.setAttribute("value",jn),sn.appendChild(Ti)},fe=function(sn){return sn&&sn!=="false"},Ke=function(sn,Qn,jn){bt(Qt)<=4.2&&(jn=!0);var Ti=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==Qt||ggbHTML5LoadedCodebaseIsWebSimple&&!et)&&(Ti=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var $e=document.createElement("div");$e.classList.add("appletParameters","notranslate");var Le=Qn.width,tn=Qn.height;if(Qn.disableAutoScale=Qn.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():Qn.disableAutoScale,Qn.width!==void 0)if(bt(Qt)<=4.4)fe(Qn.showToolBar)&&(Qn.height-=7),fe(Qn.showAlgebraInput)&&(Qn.height-=37),Qn.width<605&&fe(Qn.showToolBar)&&(Qn.width=605,Le=605);else{var hi=100;(fe(Qn.showToolBar)||fe(Qn.showMenuBar))&&(Qn.hasOwnProperty("customToolBar")&&(Qn.customToolbar=Qn.customToolBar),hi=fe(Qn.showMenuBar)?245:155),Le<hi&&(Qn.width=hi,Le=hi)}$e.style.border="none",$e.style.display="inline-block";for(var ni in Qn)Qn.hasOwnProperty(ni)&&ni!=="appletOnLoad"&&$e.setAttribute("data-param-"+ni,Qn[ni]);gt&&$e.setAttribute("data-param-fontscssurl",gt),Sn.resize=function(){GGBAppletUtils.responsiveResize(sn,Qn)},window.addEventListener("resize",function(Xe){Sn.resize()});var zt=typeof Qn.appletOnLoad=="function"?Qn.appletOnLoad:function(){};if(!jn&&Qn.width!==void 0){Qn.hasOwnProperty("showSplash")||$e.setAttribute("data-param-showSplash","false");var Ft=sn.querySelector(".applet_scaler.prerender"),mt=Ft!==null;if(mt)var vt=Ft.querySelector(".ggb_preview");else{var vt=_n(Le,tn,Qn.borderColor,!1);Ft=document.createElement("div"),Ft.className="applet_scaler",Ft.style.position="relative",Ft.style.display="block",Ft.style.width=Le+"px",Ft.style.height=tn+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ft,"66%"),bt(Qt)>=5?(Qn.appletOnLoad=function(Xe){var dn=sn.querySelector(".ggb_preview");dn&&dn.parentNode.removeChild(dn),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ft),window.GGBT_wsf_view&&$(window).trigger("resize"),zt(Xe)},mt||Ft.appendChild(vt)):$e.appendChild(vt),Ft.appendChild($e),mt||sn.appendChild(Ft),setTimeout(function(){Sn.resize()},1)}else{var Et=document.createElement("div");Et.className="applet_scaler",Et.style.position="relative",Et.style.display="block",Et.appendChild($e),sn.appendChild(Et),Qn.appletOnLoad=function(Xe){Sn.resize(),zt(Xe)}}function Ct(Xe,dn){dn&&typeof dn.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(Xe,dn.appletOnLoad):renderGGBElement(Xe),Ai("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",dn)}function _t(Xe,dn){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:Xe,params:dn}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Kn){Ct(Kn.article,Kn.params)}),html5AppletsToProcess=null)},bt(Qt)<5&&(Xe.className+=" geogebraweb")):Ct(Xe,dn)}if(Ti){scriptLoadStarted=!0;for(var Ce=0;Ce<$e.childNodes.length;Ce++){var Ze=$e.childNodes[Ce].tagName;Ze==="TABLE"&&($e.removeChild($e.childNodes[Ce]),Ce--)}if(ggbHTML5LoadedScript!==null){var Bn=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Bn!=null&&Bn.parentNode.removeChild(Bn)}var ze=document.createElement("script"),Ue=function(){_t($e,Qn)};ze.src=Ie+nt,ggbHTML5LoadedCodebaseIsWebSimple=et,ggbHTML5LoadedCodebaseVersion=Qt,ggbHTML5LoadedScript=ze.src,Ai("GeoGebra HTML5 codebase loaded: '"+Ie+"'.",Qn),!ie&&(!Ht||Ht=="5.0")?(et?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Ue()):Ie.requirejs?__webpack_require__.e(7963).then(function(){var Xe=[__webpack_require__(87963)];Ue.apply(null,Xe)}.bind(this)).catch(__webpack_require__.oe):(ze.onload=Ue,sn.appendChild(ze))}else _t($e,Qn);Qn.height=tn,Qn.width=Le},_e=function(sn,Qn,jn){var Ti=_n(Qn.width,Qn.height,Qn.borderColor,jn),$e=document.createElement("div");$e.style.position="relative",$e.style.display="block",$e.style.width=Qn.width+"px",$e.style.height=Qn.height+"px",$e.className="applet_screenshot applet_scaler"+(jn?" applet_screenshot_play":""),$e.appendChild(Ti);var Le=GGBAppletUtils.getScale(Qn,sn,jn);jn?(sn.appendChild(xn()),window.GGBT_wsf_view||(sn.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner($e,"66%"),sn.appendChild($e),Le!==1&&!isNaN(Le)&&(GGBAppletUtils.scaleElement($e,Le),$e.style.width=Qn.width+"px",$e.style.height=Qn.height+"px",$e.parentNode.style.width=Qn.width*Le+"px",$e.parentNode.style.height=Qn.height*Le+"px"),Sn.resize=function(){nn(sn,Ti,$e,jn)},window.addEventListener("resize",function(tn){Sn.resize()}),Sn.resize()};function nn(sn,Qn,jn,Ti){if(sn.contains(Qn)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(sn.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(sn)}var $e=GGBAppletUtils.getScale(It,sn,Ti);jn.parentNode!==null&&(!isNaN($e)&&$e!==1?(GGBAppletUtils.scaleElement(jn,$e),jn.parentNode.style.width=It.width*$e+"px",jn.parentNode.style.height=It.height*$e+"px"):(GGBAppletUtils.scaleElement(jn,1),jn.parentNode.style.width=It.width+"px",jn.parentNode.style.height=It.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(sn),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}Sn.onExitFullscreen=function(sn,Qn){Qn.appendChild(sn)};var fn=function(sn,Qn,jn,Ti){_e(sn,Qn,!0);for(var $e=function(){var hi=[];for(tn=0;tn<sn.childNodes.length;tn++)hi.push(sn.childNodes[tn]);if(window.GGBT_wsf_view){var ni=window.GGBT_wsf_view.renderFullScreen(sn,Qn.id),zt=document.getElementById("fullscreencontainer"),Ft=jQuery(sn).find(".fullscreencontent");Ft.length>0?(ni.remove(),Ft.attr("id","fullscreencontent").show(),jQuery(zt).append(Ft),window.dispatchEvent(new Event("resize"))):Ke(ni,Qn,!1),window.GGBT_wsf_view.launchFullScreen(zt)}else Me=Ti,Ke(sn,Qn,!1);if(!window.GGBT_wsf_view)for(tn=0;tn<hi.length;tn++)sn.removeChild(hi[tn])},Le=sn.getElementsByClassName("ggb_preview_play"),tn=0;tn<Le.length;tn++)Le[tn].addEventListener("click",$e,!1),Le[tn].addEventListener("ontouchstart",$e,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(sn),Rt()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},xn=function(){var sn=document.createElement("div");if(sn.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var Qn='.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");}',jn=document.createElement("style");jn.styleSheet?jn.styleSheet.cssText=Qn:jn.appendChild(document.createTextNode(Qn)),document.getElementsByTagName("head")[0].appendChild(jn)}return sn},_n=function(sn,Qn,jn,Ti){var $e=document.createElement("div");$e.className="ggb_preview",$e.style.position="absolute",$e.style.zIndex="90",$e.style.width=sn-2+"px",$e.style.height=Qn-2+"px",$e.style.top="0px",$e.style.left="0px",$e.style.overflow="hidden",$e.style.backgroundColor="white";var Le="lightgrey";jn!==void 0&&(jn==="none"?Le="transparent":Le=jn),$e.style.border="1px solid "+Le;var tn=document.createElement("img");if(tn.style.position="relative",tn.style.zIndex="1000",tn.style.top="-1px",tn.style.left="-1px",At!==null&&tn.setAttribute("src",At),tn.style.opacity=.7,at!==null){var hi,ni,zt;if(!Ti){hi=document.createElement("img"),hi.style.position="absolute",hi.style.zIndex="1001",hi.style.opacity=1,tn.style.opacity=.3,ni=360,ni>sn/4*3&&(ni=sn/4*3),zt=ni/5.8,hi.setAttribute("src",at),hi.setAttribute("width",ni),hi.setAttribute("height",zt);var Ft=(sn-ni)/2,mt=(Qn-zt)/2;hi.style.left=Ft+"px",hi.style.top=mt+"px",$e.appendChild(hi)}}return $e.appendChild(tn),$e},Xn=function(sn){return sn=sn.toLowerCase(),sn==="html5"||sn==="screenshot"?sn:"html5"},pe=["web","webSimple","web3d","tablet","tablet3d","phone"],ne=function(sn,Qn){if(Qt=sn,Qn){pn(Qt,!0);return}var jn=!Wt;if(jn){var Ti=bt(Qt);!isNaN(Ti)&&Ti<4.4&&(jn=!1)}var $e,Le;window.location.protocol.substr(0,4)==="http"?$e=window.location.protocol:$e="http:";var tn=Qt.indexOf("//");tn>0?Le=Qt:tn===0?Le=$e+Qt:Le="https://www.geogebra.org/apps/5.2.814.0/";for(var hi in pe)if(Qt.slice(pe[hi].length*-1)===pe[hi]||Qt.slice((pe[hi].length+1)*-1)===pe[hi]+"/"){pn(Le,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&jn&&!St.is3D&&!St.AV&&!St.SV&&!St.CV&&!St.EV2&&!St.CP&&!St.PC&&!St.DA&&!St.FI&&!St.PV&&!fe(It.showToolBar)&&!fe(It.showMenuBar)&&!fe(It.showAlgebraInput)&&!fe(It.enableRightClick)&&(!It.appName||It.appName=="classic")?Le+="webSimple/":Le+="web3d/",pn(Le,!1)},pn=function(sn,Qn){if(sn.requirejs){Ie=sn;return}sn.slice(-1)!=="/"&&(sn+="/"),Ie=sn,Qn===null&&(Qn=sn.indexOf("http")===-1),Xt=Qn,nt="web.nocache.js",et=!1;var jn=Ie.split("/");jn.length>1&&(!Qn&&jn[jn.length-2]==="webSimple"?(nt="webSimple.nocache.js",et=!0):pe.indexOf(jn[jn.length-2])>=0&&(nt=jn[jn.length-2]+".nocache.js")),jn=sn.split("/"),Qt=jn[jn.length-3],Qt.substr(0,4)==="test"?Qt=Qt.substr(4,1)+"."+Qt.substr(5,1):(Qt.substr(0,3)==="war"||Qt.substr(0,4)==="beta")&&(Qt="5.0");var Ti=parseFloat(Qt);Ti!==NaN&&Ti<5&&sn.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+Ti+" is deprecated. Using version latest instead."),ne("5.0",Qn))},Ai=function(sn,Qn){window.console&&window.console.log&&(!Qn||typeof Qn.showLogging=="undefined"||Qn.showLogging&&Qn.showLogging!=="false")&&console.log(sn)};It.material_id!==void 0?Zt(ai):ai();function ai(){var sn=Ve;Ht!==null?sn=Ht:parseFloat(sn)<5&&(sn="5.0"),ne(sn,!1),ie!==null&&pn(ie,Xt),de=!0}return Sn},GGBAppletUtils=function(){"use strict";function Sn(){return window.GGBT_wsf_edit!==void 0}function Ve(de,Ht){Ht!=1?(de.style.transformOrigin="0% 0% 0px",de.style.webkitTransformOrigin="0% 0% 0px",de.style.transform="scale("+Ht+","+Ht+")",de.style.webkitTransform="scale("+Ht+","+Ht+")",de.style.maxWidth="initial",de.querySelector(".ggb_preview")!==null&&(de.querySelector(".ggb_preview").style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[0]!==void 0&&(de.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),de.querySelectorAll(".ggb_preview img")[1]!==void 0&&(de.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(de.style.transform="none",de.style.webkitTransform="none")}function It(de,Ht,ie,oe,he,Gt){var Ie=null;if(Gt!=null&&Gt!="")for(var Xt=de.parentNode;Xt!=null;)if((" "+Xt.className+" ").indexOf(" "+Gt+" ")>-1){Ie=Xt;break}else Xt=Xt.parentNode;var Me=0,Qt=0,nt=0,et=0,At=0,at=0,dt=0;if(Ie)Me=Ie.offsetWidth,Qt=Math.max(oe?Ie.offsetWidth:0,Ie.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(Me=Math.min(window.innerWidth,document.documentElement.clientWidth),Qt=Math.min(window.innerHeight,document.documentElement.clientHeight),nt=Me):(Me=window.innerWidth,Qt=window.innerHeight,nt=window.innerWidth),de){var gt=de.getBoundingClientRect();gt.left>0&&gt.left<=Me&&(he===void 0||!he)&&(document.dir==="rtl"?(At=Me-gt.width-gt.left,at=nt<=480?10:30):(at=gt.left,At=nt<=480?10:30),et=at+At)}if(de&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var xt=de.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(et=40,dt=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(et=0,dt=40)}}return de&&((ie===void 0||!ie)&&Ht>0&&Ht+et<Me?Me=Ht:Me-=et,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(ie===void 0||!ie)&&(Qt-=dt)),{width:Me,height:Qt}}function St(de,Ht,ie,oe,he){if(de.isScreenshoGenerator)return 1;var Gt=oe!==void 0&&oe,Ie=de.noScaleMargin!=null&&de.noScaleMargin,Xt=function(xt){return xt&&xt!=="false"},Me=Xt(de.autoHeight),Qt=It(Ht,de.width,ie,Me,Gt&&window.GGBT_wsf_view||Ie,he),nt=parseInt(Qt.width),et=de.width,At=de.height;if(et===void 0){var at=Ht.querySelector(".appletParameters");at&&(et=at.offsetWidth,At=at.offsetHeight)}var dt=nt/et,gt=Gt?1:Qt.height/At;return ie!==void 0&&!ie&&(dt=Math.min(1,dt),gt=Math.min(1,gt)),Math.min(dt,gt)}function Wt(de,Ht,ie){var oe=1,he,Gt=!1;if(de.hasOwnProperty("allowUpscale")&&(Gt=de.allowUpscale),de.hasOwnProperty("scale")&&(oe=parseFloat(de.scale),(isNaN(oe)||oe===null||oe===0)&&(oe=1),oe>1&&(Gt=!0)),Ht&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(Gt=!0),!(de.hasOwnProperty("disableAutoScale")&&de.disableAutoScale))he=St(de,Ht,Gt,ie,de.scaleContainerClass);else return oe;return Gt&&(!de.hasOwnProperty("scale")||oe===1)?he:Math.min(oe,he)}function le(de){var Ht=Math.min(window.innerWidth,document.documentElement.clientWidth),ie=Math.min(window.innerHeight,document.documentElement.clientHeight),oe=de.getBoundingClientRect(),he=(Ht-oe.width)/2,Gt=(ie-oe.height)/2;Gt<0&&(Gt=0),de.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(he<40?de.style.left="40px":de.style.left=he+"px",de.style.top=Gt+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(Gt<40?de.style.top="40px":de.style.top=Gt+"px",de.style.left=he+"px")}function ve(de,Ht){var ie=de.querySelector(".appletParameters");if(ie){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(Ht.id!==ie.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(de)}if(ie.parentElement&&/fullscreen/.test(ie.parentElement.className))return;var oe=Wt(Ht,de);Sn()&&ie.setAttribute("data-param-scale",oe);for(var he=null,Gt=0;Gt<de.childNodes.length;Gt++)if(de.childNodes[Gt].className!==void 0&&de.childNodes[Gt].className.match(/^applet_scaler/)){he=de.childNodes[Gt];break}if(he!==null&&he.querySelector(".noscale")!==null)return;var Ie=Ht.id!==void 0?Ht.id:"ggbApplet",Xt=window[Ie];(Xt==null||!Xt.recalculateEnvironments)&&he!==null&&!he.className.match(/fullscreen/)&&(he.parentNode.style.transform="",!isNaN(oe)&&oe!==1?(he.parentNode.style.width=Ht.width*oe+"px",he.parentNode.style.height=Ht.height*oe+"px",Ve(he,oe)):(Ve(he,1),he.parentNode.style.width=Ht.width+"px",he.parentNode.style.height=Ht.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&le(de),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(ie).parents(".content-added-content"))}}return{responsiveResize:ve,isFlexibleWorksheetEditor:Sn,positionCenter:le,getScale:Wt,scaleElement:Ve}}();__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 Sn=n.location.search;return Sn.indexOf(J)!=-1||Sn.indexOf(K)!=-1}function q(Sn,Ve){}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(Sn){var Ve=s[L].bindings;s[L].bindings=function(){for(var It=Ve?Ve():{},St=Sn[webModule.__softPermutationId],Wt=O;Wt<St.length;Wt++){var le=St[Wt];It[le[O]]=le[P]}return It}};var t;function u(){return v(),t}function v(){if(!t){var Sn=o.createElement(Q);if(Sn.id=L,Sn.style.cssText=R+S,Sn.tabIndex=-1,o.body.appendChild(Sn),t=Sn.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Ve=document.compatMode==U?V:W;t.write(Ve+X),t.close()}}}function w(Sn){function Ve(St){function Wt(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var le=Wt();if(le){St();return}function ve(){if(!le){if(!Wt())return;le=!0,St(),o.removeEventListener&&o.removeEventListener(Z,ve,!1),de&&clearInterval(de)}}o.addEventListener&&o.addEventListener(Z,ve,!1);var de=setInterval(function(){ve()},$)}function It(St){var Wt=u(),le=Wt.body,ve=Wt.createElement(_);ve.language=ab,ve.crossOrigin=W,ve.src=St,webModule.__errFn&&(ve.onerror=function(){webModule.__errFn(L,new Error(bb+St))}),le.appendChild(ve)}Ve(function(){It(Sn)})}webModule.__startLoadingFragment=function(Sn){return C(Sn)},webModule.__installRunAsyncCode=function(Sn){var Ve=u(),It=Ve.body,St=Ve.createElement(_);St.language=ab,St.text=Sn,It.appendChild(St),It.removeChild(St)};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(Sn){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(Sn){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(Sn){var Ve=c[Sn];return Ve==null?null:Ve},r=d,webModule.__errFn=e}function B(){function Sn(de){var Ht=de.lastIndexOf(rb);Ht==-1&&(Ht=de.length);var ie=de.indexOf(sb);ie==-1&&(ie=de.length);var oe=de.lastIndexOf(tb,Math.min(ie,Ht));return oe>=O?de.substring(O,oe+P):W}function Ve(de){if(!de.match(/^\w+:\/\//)){var Ht=o.createElement(ub);Ht.src=de+vb,de=Sn(Ht.src)}return de}function It(){var de=__gwt_getMetaProperty(wb);return de!=null?de:W}function St(){for(var de=o.getElementsByTagName(_),Ht=O;Ht<de.length;++Ht)if(de[Ht].src.indexOf(xb)!=-1)return Sn(de[Ht].src);return W}function Wt(){var de=o.getElementsByTagName(yb);return de.length>O?de[de.length-P].href:W}function le(){var de=o.location;return de.href==de.protocol+zb+de.host+de.pathname+de.search+de.hash}var ve=It();return ve==W&&(ve=St()),ve==W&&(ve=Wt()),ve==W&&le()&&(ve=Sn(o.location.href)),ve=Ve(ve),ve}function C(Sn){return Sn.match(/^\//)||Sn.match(/^[a-zA-Z]+:\/\//)?Sn:webModule.__moduleBase+Sn}function D(){var Sn=[],Ve=O,It=[],St=[];function Wt(de){var Ht=St[de](),ie=It[de];if(Ht in ie)return Ht;var oe=[];for(var he in ie)oe[ie[he]]=he;throw r&&r(de,oe,Ht),null}if(__gwt_isKnownPropertyValue=function(de,Ht){return Ht in It[de]},webModule.__getPropMap=function(){var de={};for(var Ht in It)It.hasOwnProperty(Ht)&&(de[Ht]=Wt(Ht));return de},webModule.__computePropValue=Wt,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var le;try{le=Cb;var ve=le.indexOf(Db);ve!=-1&&(Ve=parseInt(le.substring(ve+P),$),le=le.substring(O,ve))}catch(de){}return webModule.__softPermutationId=Ve,C(le+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},46699:function(Sn,Ve,It){"use strict";It.d(Ve,{Ax:function(){return ve},Ds:function(){return de},KI:function(){return ie},SI:function(){return le},f1:function(){return Wt}});var St=It(346);function Wt(oe){let he=!0;if(oe.length>0){for(let Gt=0;Gt<oe.length;Gt++)if(oe[Gt].compile_success==0||!oe[Gt].compile_success){he=!1;break}}else he=!1;return he}function le(oe,he=""){let Gt=[];for(let Ie=0;Ie<oe.length;Ie++){let Xt=oe[Ie],Me=he?`${he}/${Xt.name}`:`${Xt.name}`;Gt.push({title:Xt.name,type:Xt.type,isLeaf:Xt.type!=="tree",key:Me})}return Gt}function ve(oe,he,Gt){for(let Ie=0;Ie<oe.length;Ie++){let Xt=oe[Ie];if(Xt.key===he){Xt.children=Gt;break}Xt.children&&ve(Xt.children,he,Gt)}return oe}function de(oe,he,Gt){let Ie;return function(){let Xt=this,Me=arguments,Qt=function(){Ie=null,Gt||oe.apply(Xt,Me)},nt=Gt&&!Ie;clearTimeout(Ie),Ie=setTimeout(Qt,he),nt&&oe.apply(Xt,Me)}}const Ht=!0,ie=St.Z.API_SERVER},1546:function(Sn,Ve,It){"use strict";It.d(Ve,{ij:function(){return dt},_s:function(){return at},Uf:function(){return At},ZP:function(){return xt}});var St=It(59301),Wt={flex_box_center:"flex_box_center___swvFl",flex_space_between:"flex_space_between___AqPFV",flex_box_vertical_center:"flex_box_vertical_center___XWInJ",flex_box_center_end:"flex_box_center_end___GB61t",flex_box_column:"flex_box_column___dJnz1",analysis:"analysis___xyV_c",title:"title___DQ3VK",itemWrap:"itemWrap___vFE5r",item:"item___NjeOt",list:"list___BbMrm",wrap:"wrap___UQTTb",img:"img___tNvUo",tips:"tips___Eu4wH",footer:"footer___ZbR9W",noData:"noData___mLlw0"},le=It(92310),ve=It.n(le),de=It(42441),Ht=It(25399),ie=It(458),oe=It(29787),he=It(28426),Gt=It(346),Ie=Object.defineProperty,Xt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,nt=(bt,Ut,Rt)=>Ut in bt?Ie(bt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):bt[Ut]=Rt,et=(bt,Ut)=>{for(var Rt in Ut||(Ut={}))Me.call(Ut,Rt)&&nt(bt,Rt,Ut[Rt]);if(Xt)for(var Rt of Xt(Ut))Qt.call(Ut,Rt)&&nt(bt,Rt,Ut[Rt]);return bt};const At=(bt={})=>{var Ut,Rt,Zt,Yt;let te=(Ut=bt==null?void 0:bt.emotion)==null?void 0:Ut.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),ye=(Rt=bt==null?void 0:bt.focus)==null?void 0:Rt.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),fe=(Zt=bt==null?void 0:bt.action)==null?void 0:Zt.map(_e=>et({value:_e==null?void 0:_e.rate},_e)),Ke=(Yt=bt==null?void 0:bt.intention)==null?void 0:Yt.map(_e=>et({value:_e==null?void 0:_e.rate},_e));return[{title:"\u8868\u60C5\u5360\u6BD4",color:["#f7ca2e","#4ccf71","#3791ee","#f9ac95","#4f74ee","#f0e999"],data:te||[]},{title:"\u4E13\u6CE8\u5EA6\u5360\u6BD4",color:["#4f74ee","#f9ac95","#9cb5fe","#eaa170","#3791ee","#a39bed"],data:ye||[]},{title:"\u884C\u4E3A\u5360\u6BD4\u60C5\u51B5",color:["#5eca9c","#a39bed","#f68238","#f0e999","#eaa170","#f9ac95"],data:fe||[]},{title:"\u610F\u56FE\u5360\u6BD4\u60C5\u51B5",color:["#eaa170","#739fcb","#f0e999","#f9ac95","#4f74ee","#5eca9c"],data:Ke||[]}]},at=({className:bt,dataSource:Ut=[],col:Rt=4,right:Zt,bottom:Yt=23,precision:te=0,wrapWidth:ye=1200})=>{const fe=(_e="",nn,fn="--")=>_e?(_e==null?void 0:_e.length)>nn?(_e==null?void 0:_e.slice(0,nn-1))+"...":_e:fn,Ke=Math.floor((ye-(Rt-1)*Zt)/Rt);return St.createElement("div",{className:ve()(Wt.list,bt)},!!(Ut!=null&&Ut.length)&&(Ut==null?void 0:Ut.map((_e,nn)=>{const{cover_pic:fn,created_at:xn,emotion:_n,action:Xn,intention:pe,focus:ne}=_e;return St.createElement("div",{key:nn,className:Wt.wrap,style:{width:Ke,marginRight:(1+nn)%Rt===0?0:Zt+te,marginBottom:Yt}},St.createElement("div",{className:Wt.img},St.createElement("img",{src:`${Gt.Z.API_SERVER}${fn}`}),St.createElement("div",{className:Wt.tips},St.createElement("div",null,St.createElement("i",{className:"iconfont icon-paisheshijian mr5 font14"})," \u62CD\u6444\u65F6\u95F4"),St.createElement("span",null,xn))),St.createElement("div",{className:Wt.footer},St.createElement("ul",null,St.createElement("li",null,St.createElement("i",{className:"iconfont icon-biaoqing"}),St.createElement("span",null,"\u8868\u60C5\uFF1A",St.createElement(Ht.Z,{title:_n},St.createElement("span",{className:"c-grey-333"},fe(_n,4))))),St.createElement("li",null,St.createElement("i",{className:"iconfont icon-hangwei"}),St.createElement("span",null,"\u884C\u4E3A\uFF1A",St.createElement(Ht.Z,{title:Xn},St.createElement("span",{className:"c-grey-333"},fe(Xn,4)))))),St.createElement("ul",null,St.createElement("li",null,St.createElement("i",{className:"iconfont icon-yitu"}),St.createElement("span",null,"\u610F\u56FE\uFF1A",St.createElement(Ht.Z,{title:pe},St.createElement("span",{className:"c-grey-333"},fe(pe,4))))),St.createElement("li",null,St.createElement("i",{className:"iconfont icon-zhuangtai"}),St.createElement("span",null,"\u4E13\u6CE8\u5EA6\uFF1A",St.createElement(Ht.Z,{title:ne},St.createElement("span",{className:"c-grey-333"},fe(ne,3))))))))})))},dt=({className:bt,style:Ut,title:Rt,hideBar:Zt=!1,children:Yt,customText:te="",noDataText:ye="",emptyData:fe=[],loading:Ke,actionAnalysis:_e})=>{var nn,fn;const xn=((nn=fe==null?void 0:fe[0])==null?void 0:nn.every(Xn=>{var pe;return!((pe=Xn==null?void 0:Xn.data)!=null&&pe.length)}))&&!((fn=fe==null?void 0:fe[1])!=null&&fn.length)||!_e,_n=_e?ye:te;return St.createElement(ie.Z,{loading:Ke,active:!0},xn&&St.createElement("div",{className:ve()(Wt.noData,bt),style:Ut},!!Rt&&St.createElement("div",{className:Wt.title},!Zt&&St.createElement("b",null),St.createElement("span",null,Rt)),St.createElement("div",{className:Wt.itemWrap},St.createElement(he.Z,{customText:_n}))),!xn&&Yt)};var xt=({className:bt,style:Ut,data:Rt=[],title:Zt,hideBar:Yt=!1,loading:te=!1})=>St.createElement("div",{className:ve()(Wt.analysis,bt),style:Ut},!!Zt&&St.createElement("div",{className:Wt.title},!Yt&&St.createElement("b",null),St.createElement("span",null,Zt)),St.createElement(oe.Z,{spinning:te},St.createElement("div",{className:Wt.itemWrap},Rt==null?void 0:Rt.map((ye,fe)=>St.createElement("div",{className:Wt.item,key:fe},St.createElement(de.Z,{option:{tooltip:{trigger:"item",formatter:"{a} <br/>{b}: {c}%"},title:{left:"center",bottom:15,text:ye==null?void 0:ye.title},legend:{top:10,right:10,orient:"vertical",show:!0,align:"left",icon:"circle",itemWidth:10,itemHeight:10,formatter:function(Ke){for(let _e in ye==null?void 0:ye.data)if(Ke==(ye==null?void 0:ye.data[_e].name))return Ke+" "+(ye==null?void 0:ye.data[_e].value)+"%"},textStyle:{color:"#767676",fontSize:12}},color:ye==null?void 0:ye.color,series:[{type:"pie",radius:["20%","35%"],center:["20%","40%"],avoidLabelOverlap:!1,label:{show:!1},labelLine:{show:!1},data:ye==null?void 0:ye.data}]},style:{height:145}}))))))},85788:function(Sn,Ve,It){"use strict";var St=It(86204),Wt=It.n(St),le=Object.defineProperty,ve=(oe,he,Gt)=>he in oe?le(oe,he,{enumerable:!0,configurable:!0,writable:!0,value:Gt}):oe[he]=Gt,de=(oe,he,Gt)=>ve(oe,typeof he!="symbol"?he+"":he,Gt),Ht=(oe,he,Gt)=>new Promise((Ie,Xt)=>{var Me=et=>{try{nt(Gt.next(et))}catch(At){Xt(At)}},Qt=et=>{try{nt(Gt.throw(et))}catch(At){Xt(At)}},nt=et=>et.done?Ie(et.value):Promise.resolve(et.value).then(Me,Qt);nt((Gt=Gt.apply(oe,he)).next())});class ie extends St.EventEmitter{constructor(he,Gt){super(),de(this,"url"),de(this,"body"),de(this,"fullContent",""),de(this,"controller",null),de(this,"buffer",""),this.url=he,this.body=Gt}startStream(){return Ht(this,null,function*(){this.controller=new AbortController;const{signal:he}=this.controller;try{const Gt=yield fetch(this.url,{method:"POST",headers:{"Content-Type":"application/json; charset=utf-8"},credentials:"include",body:JSON.stringify(this.body),signal:he});if(!Gt.ok)throw new Error(`\u8BF7\u6C42\u5931\u8D25: ${Gt.status}`);const Ie=Gt.headers.get("content-type");if(!Ie)throw new Error("\u54CD\u5E94\u5934\u7F3A\u5C11 content-type");if(Ie.includes("application/json")){const Qt=yield Gt.json();this.emit("error",Qt);return}if(!Ie.includes("text/event-stream"))throw new Error("\u54CD\u5E94\u6570\u636E\u683C\u5F0F\u9519\u8BEF");const Xt=Gt.body.getReader(),Me=new TextDecoder("utf-8");for(;;){const{done:Qt,value:nt}=yield Xt.read();if(Qt)break;const et=Me.decode(nt,{stream:!0});this.buffer+=et;const At=this.buffer.split(`
`);this.buffer=At.pop()||"";for(const at of At)if(at.startsWith("data:")){const dt=at.slice(5).trim();if(dt==="[DONE]")break;try{const gt=JSON.parse(dt);gt.data&&this.handleData(gt.data)}catch(gt){this.buffer=at+`
`+this.buffer,console.error("\u89E3\u6790 JSON \u5931\u8D25:",gt)}}}this.emit("done",this.fullContent)}catch(Gt){Gt.name==="AbortError"?this.emit("cancelled",this.fullContent):this.emit("error",Gt.message)}})}handleData(he){he.content&&(this.fullContent+=he.content,this.emit("data",{chunk:he,full:this.fullContent}))}cancelRequest(){var he;(he=this.controller)==null||he.abort()}}Ve.Z=ie},23344:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return nt}});var St=It(59301),Wt={flex_box_center:"flex_box_center___A3pzf",flex_space_between:"flex_space_between___JBoa5",flex_box_vertical_center:"flex_box_vertical_center___MJuIO",flex_box_center_end:"flex_box_center_end___OcjUA",flex_box_column:"flex_box_column___zSH4A",list:"list___KhJas",middle:"middle___IjlYi",row:"row___GGtIx",title:"title___o_xqf",size:"size___OVRoL",download:"download___ZLcIH",preview:"preview___gi0kI",annotation:"annotation___KVSwj"},le=It(92310),ve=It.n(le),de=It(45677),Ht=It(9507),ie=It(51257),oe=It(346),he=It(38986),Gt=It(48790),Ie=It(25690),Xt=It(6767),Me=(et,At,at)=>new Promise((dt,gt)=>{var xt=Rt=>{try{Ut(at.next(Rt))}catch(Zt){gt(Zt)}},bt=Rt=>{try{Ut(at.throw(Rt))}catch(Zt){gt(Zt)}},Ut=Rt=>Rt.done?dt(Rt.value):Promise.resolve(Rt.value).then(xt,bt);Ut((at=at.apply(et,At)).next())});const Qt=({className:et,style:At,dataSource:at=[],authority:dt=!1,callback:gt,showDimensions:xt=!0,classroomList:bt})=>{var Ut;const[Rt,Zt]=(0,St.useState)({content:"",type:""}),[Yt,te]=(0,St.useState)({}),[ye,fe]=(0,St.useState)(!1),[Ke,_e]=(0,St.useState)({title:"",visible:!1,src:"",snapshotData:{}}),nn=(0,St.useRef)(),fn=pe=>Me(void 0,null,function*(){if(te(pe),pe.file_type==="txt"){const ne=yield(0,he.ZP)(pe.url,{method:"get",headers:{"Content-Type":"application/xml"}});nn.current=ne}Zt({type:pe.file_type,content:oe.Z.API_SERVER+pe.url})}),xn=pe=>{var ne;_e({visible:!0,src:oe.Z.API_SERVER+pe.url,id:pe.id,title:pe.title,snapshotData:(ne=pe==null?void 0:pe.subitem)==null?void 0:ne.settings})},_n=pe=>Me(void 0,null,function*(){var ne;Zt({type:pe.file_type,content:oe.Z.API_SERVER+((ne=pe==null?void 0:pe.subitem)==null?void 0:ne.url)})}),Xn=()=>{gt(),_e({visible:!1})};return at!=null&&at.length?St.createElement(St.Fragment,null,St.createElement("div",{className:ve()(Wt.list,et),style:At},at.map((pe,ne)=>{var pn,Ai,ai;return St.createElement("div",{key:ne,className:Wt.row},St.createElement("div",{className:Wt.title,onClick:()=>fn(pe)},St.createElement("i",{className:"iconfont icon-fujian1"}),St.createElement("span",{title:pe.title},pe.title)),St.createElement("div",{className:Wt.size},pe.filesize),St.createElement("div",{className:Wt.download,onClick:()=>{var sn,Qn;if((0,Gt.Rm)()&&!((sn=bt.AssistantObject.normal)!=null&&sn.can_download)){Xt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}(0,ie.Nd)("",`${oe.Z.API_SERVER}${(Qn=pe.url)==null?void 0:Qn.replace("disposition=inline","")}`)}},St.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D"),!["other","download"].includes(pe==null?void 0:pe.file_type)&&St.createElement("div",{className:Wt.preview,onClick:()=>fn(pe)},St.createElement("i",{className:"iconfont icon-yulan"}),"\u9884\u89C8"),["image"].includes(pe==null?void 0:pe.file_type)&&xt&&(dt?St.createElement("div",{className:Wt.annotation,onClick:()=>xn(pe)},St.createElement("i",{className:"iconfont icon-pizhu"}),(pn=pe.subitem)!=null&&pn.id?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"):((Ai=pe.subitem)==null?void 0:Ai.id)&&St.createElement("div",{className:Wt.annotation,onClick:()=>_n(pe)},St.createElement("i",{className:"iconfont icon-chakanlaoshipizhu1"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8")),["image"].includes(pe==null?void 0:pe.file_type)&&((ai=pe.subitem)==null?void 0:ai.id)&&St.createElement("div",{className:Wt.download,style:{marginLeft:20},onClick:()=>{var sn,Qn;(0,ie.Nd)("",`${oe.Z.API_SERVER}${(Qn=(sn=pe==null?void 0:pe.subitem)==null?void 0:sn.url)==null?void 0:Qn.replace("disposition=inline","")}`)}},St.createElement("i",{className:"iconfont icon-xiazai4"}),"\u4E0B\u8F7D\u6279\u6CE8\u6587\u4EF6"),["office"].includes(pe==null?void 0:pe.file_type)&&(0,Gt.eB)()&&["xlsx","docx","pptx"].includes(pe==null?void 0:pe.file_sub)&&xt&&St.createElement("div",{className:Wt.annotation,onClick:()=>{fe(!0),fn(pe)}},St.createElement("i",{className:"iconfont icon-pizhu"}),pe.is_edit?"\u4FEE\u6539\u6279\u6CE8":"\u6279\u6CE8"),pe.is_edit&&(0,Gt.dE)()&&xt&&St.createElement("div",{className:Wt.annotation,onClick:()=>{fn(pe)}},St.createElement("i",{className:"iconfont icon-sousuo7"}),"\u67E5\u770B\u8001\u5E08\u6279\u6CE8"))})),St.createElement(de.Z,{close:!0,data:Rt==null?void 0:Rt.content,type:Rt==null?void 0:Rt.type,hasMask:!0,disabledDownload:(0,Gt.Rm)()&&!((Ut=bt.AssistantObject.normal)!=null&&Ut.can_download),editOffice:ye?"edit":"view",monacoEditor:{value:nn.current,language:"txt",onChange:()=>{},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}},onImgDimensions:dt&&xt&&Rt.type==="image"?()=>xn(Yt):null,onClose:()=>{gt(),fe(!1),Zt({content:"",type:""})}}),St.createElement(Ht.Z,{onOk:Xn,onClose:()=>_e({visible:!1}),data:Ke,showFullTools:!0})):null};var nt=(0,Ie.connect)(({classroomList:et})=>({classroomList:et}))(Qt)},9507:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Ie}});var St=It(59301),Wt={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},le=It(92310),ve=It.n(le),de=It(29787),Ht=It(2859),ie=It(38986),oe=It(51257),he=(Xt,Me,Qt)=>new Promise((nt,et)=>{var At=gt=>{try{dt(Qt.next(gt))}catch(xt){et(xt)}},at=gt=>{try{dt(Qt.throw(gt))}catch(xt){et(xt)}},dt=gt=>gt.done?nt(gt.value):Promise.resolve(gt.value).then(At,at);dt((Qt=Qt.apply(Xt,Me)).next())}),Ie=({data:Xt,className:Me,fullWidth:Qt,style:nt={},onClose:et,onOk:At,showFullTools:at,noAssociationId:dt})=>{const gt=(0,St.useRef)(null),xt=(0,St.useRef)(null),bt=(0,St.useRef)(null),Ut=(0,St.useRef)(null),[Rt,Zt]=(0,St.useState)(!1),[Yt,te]=(0,St.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,St.useEffect)(()=>(bt.current||(bt.current=document.createElement("style"),document.head.appendChild(bt.current)),Xt!=null&&Xt.visible?(document.body.setAttribute("data-custom","y-hidden"),bt.current.innerHTML=" html { overflow-y: hidden; }",Xt!=null&&Xt.src&&ye()):(document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)),()=>{document.body.removeAttribute("data-custom"),bt.current&&(document.head.removeChild(bt.current),bt.current=null)}),[Xt==null?void 0:Xt.visible]);const ye=()=>he(void 0,null,function*(){Zt(!0),te("\u6B63\u5728\u52A0\u8F7D\u4E2D");const nn=yield(0,oe.ZJ)(Xt==null?void 0:Xt.src);gt.current.src="",gt.current.src=nn,gt.current.onload=function(){_e()},Zt(!1),te("")}),fe=nn=>he(void 0,null,function*(){Zt(!0),te("\u6B63\u5728\u4FDD\u5B58\u4E2D");const fn=yield(0,ie.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Xt.title,file:nn.dataUrl}});fn!=null&&fn.id&&!dt?(yield(0,ie.ZP)(`/api/attachments/${Xt.id}/add_subitem.json`,{method:"post",body:{subitem_id:fn==null?void 0:fn.id,settings:JSON.stringify(nn.state)}})).status===0&&At():fn!=null&&fn.id&&At(fn),Zt(!1),te("")}),Ke=()=>{const nn=document.querySelector('a[href="https://markerjs.com/"]');nn&&nn.parentNode&&(nn.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 _n=document.querySelector(xn.name);_n&&_n.setAttribute("title",xn.title)})},_e=()=>{xt.current=new Ht.hP(gt.current),xt.current.targetRoot=Ut.current,xt.current.addEventListener("render",fe),xt.current.addEventListener("beforeclose",et),at&&(xt.current.availableMarkerTypes=xt.current.ALL_MARKER_TYPES,xt.current.uiStyleSettings.redoButtonVisible=!0,xt.current.uiStyleSettings.notesButtonVisible=!0,xt.current.uiStyleSettings.zoomButtonVisible=!0,xt.current.uiStyleSettings.zoomOutButtonVisible=!0,xt.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=xt.current.uiStyleSettings,xt.current.show(),Xt!=null&&Xt.snapshotData&&xt.current.restoreState(Xt.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Ke()},300)};return St.createElement(St.Fragment,null,(Xt==null?void 0:Xt.visible)&&St.createElement(de.Z,{spinning:Rt,tip:Yt,style:{position:"absolute",width:"100vw"}},St.createElement("div",{ref:Ut,className:ve()(Wt.imageDimensions,Me,Qt?Wt.fullWidth:""),style:nt},St.createElement("img",{className:Wt.img,ref:gt}))))}},76562:function(Sn,Ve,It){"use strict";var St=It(59301),Wt=It(77019),le=It(5269),ve=It(20554),de=It(99571),Ht=It(76902),ie=It(99587),oe=It(48136),he=It(59301);const Gt=(0,St.forwardRef)(({callback:Ie,showSaveButton:Xt,value:Me=""},Qt)=>{const nt=(0,St.useRef)(),et=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],At=[{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}`}]}]}],at=xt=>{nt.current.setValue(nt.current.getValue()+" "+xt.value+" ")},dt=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:he.createElement(Wt.Z,{className:ie.Z.lists,gutter:[10,10]},et.map((xt,bt)=>he.createElement(le.Z,{flex:"110px",className:ie.Z.item},he.createElement("div",null,he.createElement(Ht.Z,{value:`$$${xt.value}$$`}),xt.name),he.createElement("div",{className:ie.Z.children},xt.children.map((Ut,Rt)=>he.createElement("div",{key:Rt},he.createElement("h1",null,Ut.name),he.createElement(Wt.Z,{gutter:[10,10]},Ut.data.map((Zt,Yt)=>he.createElement(le.Z,{key:Yt,onClick:()=>at(Zt),className:ie.Z.diamond},he.createElement(Ht.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:he.createElement(Wt.Z,{className:ie.Z.lists,gutter:[10,10]},At.map((xt,bt)=>he.createElement(le.Z,{flex:"110px",className:ie.Z.item},he.createElement("div",null,he.createElement(Ht.Z,{value:"`$$"+xt.value+"$$`"}),xt.name),he.createElement("div",{className:ie.Z.children},xt.children.map((Ut,Rt)=>he.createElement("div",{key:Rt},Ut.name&&he.createElement("h1",null,Ut.name),he.createElement(Wt.Z,{gutter:[10,10]},Ut.data.map((Zt,Yt)=>he.createElement(le.Z,{key:Yt,onClick:()=>at(Zt),className:ie.Z.diamond},he.createElement(Ht.Z,{value:"`$$"+Zt.value+"$$`"}))))))))))}],gt=()=>{var xt=document.createElement("div");xt.innerHTML=nt.current.getValue();var bt=xt.innerText;return Ie&&Ie(bt),bt};return(0,St.useImperativeHandle)(Qt,()=>({getData:gt})),he.createElement("div",{className:ie.Z.mathWrap},he.createElement(ve.default,{defaultActiveKey:"1",items:dt}),he.createElement("math-field",{locale:"zh_cn",className:ie.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:nt,style:{width:800,marginTop:30,fontSize:18}},Me||""),Xt&&he.createElement("div",{className:ie.Z.button},he.createElement(de.ZP,{size:"large",onClick:gt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Ve.Z=Gt},28426:function(Sn,Ve,It){"use strict";var St=It(59301),Wt=It(93314),le=It(99571),ve=Object.defineProperty,de=Object.defineProperties,Ht=Object.getOwnPropertyDescriptors,ie=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,Gt=(Qt,nt,et)=>nt in Qt?ve(Qt,nt,{enumerable:!0,configurable:!0,writable:!0,value:et}):Qt[nt]=et,Ie=(Qt,nt)=>{for(var et in nt||(nt={}))oe.call(nt,et)&&Gt(Qt,et,nt[et]);if(ie)for(var et of ie(nt))he.call(nt,et)&&Gt(Qt,et,nt[et]);return Qt},Xt=(Qt,nt)=>de(Qt,Ht(nt));const Me=({img:Qt,buttonProps:nt={},styles:et={},customText:At,ButtonText:at,ButtonClick:dt,Buttonclass:gt,ButtonTwo:xt,imgStyles:bt,loading:Ut=!1,className:Rt=""})=>St.createElement("section",{className:`tc animated fadeIn ${Rt}`,style:Ie({color:"#999",margin:"100px auto",visibility:Ut?"hidden":"visible"},et)},St.createElement("img",{src:Qt||Wt,style:Xt(Ie({},bt),{pointerEvents:"none",userSelect:"none"})}),St.createElement("p",{className:"mt20 font14"},At||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),at&&St.createElement(le.ZP,Ie({className:gt,onClick:dt},nt),at),xt&&xt);Ve.Z=Me},45677:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return gt}});var St=It(59301),Wt={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},le=It(99571),ve=It(70557),de=It(75975),Ht=It(25399),ie=It(51257),oe=It(81722),he=It(28426),Gt=It(346),Ie=It(44203),Xt=It(59301),Me=Object.defineProperty,Qt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(xt,bt,Ut)=>bt in xt?Me(xt,bt,{enumerable:!0,configurable:!0,writable:!0,value:Ut}):xt[bt]=Ut,at=(xt,bt)=>{for(var Ut in bt||(bt={}))nt.call(bt,Ut)&&At(xt,Ut,bt[Ut]);if(Qt)for(var Ut of Qt(bt))et.call(bt,Ut)&&At(xt,Ut,bt[Ut]);return xt},dt=(xt,bt,Ut)=>new Promise((Rt,Zt)=>{var Yt=fe=>{try{ye(Ut.next(fe))}catch(Ke){Zt(Ke)}},te=fe=>{try{ye(Ut.throw(fe))}catch(Ke){Zt(Ke)}},ye=fe=>fe.done?Rt(fe.value):Promise.resolve(fe.value).then(Yt,te);ye((Ut=Ut.apply(xt,bt)).next())}),gt=({editOffice:xt="view",data:bt,issaver:Ut,onSaver:Rt,theme:Zt,type:Yt,filename:te,monacoEditor:ye,className:fe,style:Ke,close:_e,onClose:nn,hasMask:fn,disabledDownload:xn,onImgDimensions:_n,showNodata:Xn,recordInfo:pe})=>{const[ne,pn]=(0,St.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Ai,ai]=(0,St.useState)(""),[sn,Qn]=(0,St.useState)(),jn=window.ENV==="build"?"/react/build":"",Ti=location.host.startsWith("localhost")?Gt.Z.PROXY_SERVER:Gt.Z.API_SERVER,Le=10*(1024*1024),tn=(0,St.useRef)();bt!=null&&bt.startsWith("/api")&&Yt!=="txt"&&(bt=Gt.Z.API_SERVER+bt);const hi=vt=>vt.substring(vt.lastIndexOf("/")+1).split(".").pop();te&&ye&&(ye.filename=te),(0,St.useEffect)(()=>{var vt,Et;const Ct=(Et=(vt=document.cookie)==null?void 0:vt.replace(/\s/g,""))==null?void 0:Et.split(";");Ct==null||Ct.map(_t=>{let Ce=_t.split("=");Ce[0]==="_educoder_session"&&ai(Ce[1])})},[]),(0,St.useEffect)(()=>{Yt==="office"&&(bt.indexOf("bigfilescdn.")>-1||bt.indexOf("bigfiles1")>-1?Qn({url:bt,fileType:hi(bt),model:bt.indexOf("model=edit")?"edit":"view"}):zt())},[Yt,bt]);function ni(vt){return dt(this,null,function*(){vt.data.type==="pdfdata"&&(Rt(vt.data.data),window.removeEventListener("message",ni,!1)),console.log("mess---:",vt.data)})}const zt=()=>dt(void 0,null,function*(){console.log("data:",bt);let vt=bt;bt.startsWith("http")||(vt=location.origin+vt);let Et=new URL(vt).pathname.split("/").pop();const Ct=yield(0,oe.gJ)({attachment_id:Et});Ct.url=Ti+Ct.url,Qn(Ct)}),Ft=()=>{if(bt.startsWith("http")||bt.startsWith("blob:")){mt();return}(0,ie.Sv)(te||"educoder",bt,te)},mt=()=>{pe&&(0,Ie.fc)({id:pe==null?void 0:pe.id,watch_type:1,course_id:pe==null?void 0:pe.course_id}),(0,ie.Nd)(te||"educoder",decodeURIComponent(bt))};return Xt.createElement("div",{style:at({},Ke||{}),className:`${fn&&Wt.bgBlack} ${Yt?Wt.wrp:"hide"}`},_e&&Xt.createElement("div",{className:Wt.close,ref:tn},!!_n&&Xt.createElement(Ht.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>tn.current},Xt.createElement("span",{onClick:()=>{nn(),_n()}},Xt.createElement("i",{className:"icon-yulanpizhu"}))),!xn&&Xt.createElement(Ht.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>tn.current},Xt.createElement("span",{onClick:mt},Xt.createElement("i",{className:"icon-quxiaozhiding"}))),Ut&&Xt.createElement(Ht.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>tn.current},Xt.createElement("span",{className:"",onClick:()=>{const vt=document.getElementById("pdfiframe");window.addEventListener("message",ni,!1),setTimeout(()=>{vt.contentWindow.postMessage("getData","*")},300)}},Xt.createElement("i",{className:"icon-baocun"}))),Xt.createElement(Ht.Z,{title:"\u5173\u95ED",getPopupContainer:()=>tn.current},Xt.createElement("span",{className:"",onClick:()=>{nn()}},Xt.createElement("i",{className:"icon-guanbi1"})))),Xt.createElement("div",{className:`${Wt[fe]} ${fe} ${Wt.monaco} ${Yt==="txt"?"show":"hide"}`},Yt==="txt"&&Xt.createElement(Xt.Fragment,null,Xt.createElement(de.ZP,at({},ye)))),Yt==="audio"&&Xt.createElement("audio",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${bt}`,autoPlay:!0}),Yt==="video"&&Xt.createElement(Xt.Fragment,null,(bt==null?void 0:bt.indexOf("http"))>-1?Xt.createElement("video",{controls:!0,src:`${bt}`,autoPlay:!0}):Xt.createElement("video",{controls:!0,src:`data:video/mp4;base64,${bt}`,autoPlay:!0})),Yt==="office"&&sn&&Xt.createElement("iframe",{src:`${jn}/office.html?key=${sn.key}&url=${btoa(sn.url)}&callbackUrl=${Ti+(sn.callbackUrl||"")}&fileType=${sn.fileType}&title=${sn.title||""}&model=${xt}&officeServer=${Gt.Z.ONLYOFFICE}&disabledDownload=${!!xn}`}),Yt==="html"&&Xt.createElement("iframe",{src:bt+"&disposition=inline"}),Yt==="pdf"&&Xt.createElement("iframe",{id:"pdfiframe",src:`${jn}/js/pdfview/index.html?filename=${te||"educoder.pdf"}&url=${encodeURIComponent(bt)}&disabledDownload=${!!xn}&model=${xt}`}),Yt==="image"&&Xt.createElement("img",{src:`${(bt==null?void 0:bt.indexOf("http://"))>-1||(bt==null?void 0:bt.indexOf("https://"))>-1?"":"data:image/png;base64,"}${bt}`}),(Yt==="other"||Yt==="download")&&Xt.createElement(Xt.Fragment,null,Xn?Xt.createElement(he.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:Xt.createElement(le.ZP,{icon:Xt.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ft,disabled:xn},"\u4E0B\u8F7D")}):Xt.createElement(le.ZP,{type:"primary",size:"middle",onClick:Ft,disabled:xn},Xt.createElement(ve.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(Sn,Ve,It){"use strict";It.d(Ve,{z:function(){return Zt},Z:function(){return Yt}});var St=It(59301),Wt=It(8944),le=It(81428),ve=It(64018),de=It(81168),Ht=It(346),ie=It(51257),oe=It(15342),he=It(1012),Gt=It(45677),Ie=It(59301),Me=({html:te})=>{const ye=(0,St.useRef)(null),fe=(0,St.useRef)(null),Ke=`.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,St.useEffect)(()=>{const _e=ye.current.attachShadow({mode:"open"});fe.current=document.createElement("div"),fe.current.className="markdown-body",fe.current.innerHTML=te,_e.appendChild(fe.current);const nn=document.createElement("style");return nn.textContent=Ke,_e.appendChild(nn),()=>{_e.innerHTML=""}},[]),(0,St.useEffect)(()=>{fe.current&&(fe.current.innerHTML=te)},[te]),Ie.createElement("div",{ref:ye})};function Qt(te){const ye=["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"],fe=new RegExp(`\\b(${ye.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return te.replace(fe,"").trim()}var nt=Object.defineProperty,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,dt=(te,ye,fe)=>ye in te?nt(te,ye,{enumerable:!0,configurable:!0,writable:!0,value:fe}):te[ye]=fe,gt=(te,ye)=>{for(var fe in ye||(ye={}))At.call(ye,fe)&&dt(te,fe,ye[fe]);if(et)for(var fe of et(ye))at.call(ye,fe)&&dt(te,fe,ye[fe]);return te};const xt="@\u2581\u2581@",bt="@\u2581@",Ut=/<pre[^>]*>/g;function Rt(te){let ye=document.createElement("div");return ye.innerHTML=te,ye.childNodes.length===0?"":ye.childNodes[0].nodeValue}const Zt=(te,ye)=>{te=te||"";const fe=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ke=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,_e=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,nn=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ye?te.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(fe,(fn,xn,_n,Xn,pe,ne,pn)=>{const Ai=xn||Xn||ne,ai=_n||pe||pn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+Ai+ai+"&t="+(0,ie.Jn)(Ai,Date.now())+(fn.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(te=te.replace(nn,(fn,xn,_n,Xn,pe,ne,pn)=>{const Ai=xn||Xn||ne,ai=_n||pe||pn||"?";return Ht.Z.API_SERVER+"/attachments/download/"+Ai+ai+"&t="+(0,ie.Jn)(Ai,Date.now())+(fn.indexOf(")")>-1?")":"&")}).replace(fe,(fn,xn,_n,Xn,pe,ne,pn)=>{const Ai=xn||Xn||ne,ai=_n||pe||pn||"?";return Ht.Z.API_SERVER+"/api/attachments/"+Ai+ai+"&t="+(0,ie.Jn)(Ai,Date.now())+(fn.indexOf(")")>-1?")":"&")}).replace(Ke,(fn,xn,_n,Xn,pe)=>{const ne=xn||Xn,pn=_n||pe||"";return'"'+Ht.Z.API_SERVER+"/api/attachments/"+ne+pn+ne+pn+"&t="+(0,ie.Jn)(ne,Date.now())}).replace(_e,(fn,xn,_n,Xn,pe)=>{const ne=xn||Xn,pn=_n||pe||"";return"("+Ht.Z.API_SERVER+"/files/uploads/"+ne+pn+ne+pn+"&t="+(0,ie.Jn)(ne,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,`
`),te)};var Yt=({value:te="",className:ye,showTextOnly:fe,showLines:Ke,style:_e={},stylesPrev:nn={},highlightKeywords:fn,showProgramFill:xn,isProgramFill:_n,disabledFill:Xn=!1,programFillValue:pe,onFillChange:ne=ai=>{},onFillBlur:pn=()=>{},onFillFocus:Ai=()=>{}})=>{let ai=Qt(String(te||""));const[sn,Qn]=(0,St.useState)(""),[jn,Ti]=(0,St.useState)("office"),[$e,Le]=(0,St.useState)([]),tn=(0,St.useRef)("a"+(0,he.Z)()),hi={},ni=Ue=>/<style[\s\S]*?>/i.test(Ue||""),zt=(Ue,Xe,dn)=>{const Kn=document.createElement(Ue===bt?"input":"textarea");Kn.style.width="100%",Kn.style.height=Ue===bt?"40px":"151px",Kn.rows=5,Kn.spellcheck=!1,Kn.name="edu-program-fill",Kn.placeholder="\u8BF7\u8F93\u5165",Kn.dataset.id=Xe;const mn=Object.keys(hi).length;return hi[mn]=Kn,`<span class="edu-program-fill-wrap ${Ue===bt?"":"show"}" style="width:${Ue===bt?"600px":"100%"}" title=${dn||""}><span>${Kn.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Ft(Ue){return Ue=Ue.replace(/!\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(/\[.*?\]\(.*?\)/g,""),Ue=Ue.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),Ue=Ue.replace(/<embed.*?>/g,""),Ue=Ue.replace(/<img.*?>/g,""),Ue=Ue.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),Ue=Ue.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),Ue=Ue.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),Ue=Ue.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),Ue}const mt=Ue=>!fe&&ni(ai)?Ue:Ue.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Xe,dn){let Kn=dn.replace(/(\n|\r)/g,"").split("}"),mn=[];return Kn.map(be=>{be!=""&&mn.push(`.${tn.current} ${be}`)}),`<style>${mn.join("}")}</style>`}),vt=(0,St.useMemo)(()=>{try{const Kn=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,mn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,be=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,ei=/\(\/attachments\/download\//g;ai=ai.replace(ei,"("+Ht.Z.API_SERVER+"/attachments/download/").replace(Kn,"("+Ht.Z.API_SERVER+"/api/attachments/").replace(mn,'"'+Ht.Z.API_SERVER+"/api/attachments/").replace(be,'"'+Ht.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(Kn){}if(xn){let Kn=-1;return ai=ai.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(mn,be,ei){var kn;return++Kn,zt(mn,Kn,(kn=pe==null?void 0:pe[Kn])==null?void 0:kn.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${mt(ai||"")}</pre>`}let Ue=mt(ai);Ue=(0,le.ZP)(Ue);const Xe=(0,le.ez)();ai.match(/\[TOC\]/)&&(Ue=Ue.replace("<p>[TOC]</p>",(0,le.Qv)()),(0,le.Iy)()),Ue=Ue.replace(/(__special_katext_id_\d+__)/g,(Kn,mn)=>{const{type:be,expression:ei}=Xe[mn];return(0,oe.renderToString)(Rt(ei)||"",{displayMode:be==="block",throwOnError:!1,output:"html"})}),Ue=Ue.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,le.AL)();const dn=document.createElement("div");if(dn.innerHTML=Ue,fe)return dn.innerText;if(fn){const Kn=fn.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Ce(dn,Kn),dn.innerHTML}return setTimeout(()=>ze(),500),dn.innerHTML},[ai,fn]);(0,St.useEffect)(()=>{Ze.current&&Ze.current.querySelectorAll(["input","textarea"]).forEach(Xe=>{Xe.oninput=Et,Xe.onblur=Ct,Xe.onfocus=_t})},[$e]),(0,St.useEffect)(()=>{var Ue,Xe,dn,Kn,mn;if(pe!=null&&pe.length)try{const be=Ze.current.querySelectorAll(".edu-program-fill-score"),ei=Ze.current.querySelectorAll('[name="edu-program-fill"]');for(const[kn,On]of ei.entries())On.value=((Ue=pe==null?void 0:pe[kn])==null?void 0:Ue.value)||"",((Xe=pe==null?void 0:pe[kn])==null?void 0:Xe.type)==="warning"?On.className="program-fill-warning":((dn=pe==null?void 0:pe[kn])==null?void 0:dn.type)==="success"?On.className="program-fill-success":On.className="";for(const[kn,On]of be.entries())On.innerHTML=(Kn=pe==null?void 0:pe[kn])!=null&&Kn.score?`${(mn=pe==null?void 0:pe[kn])==null?void 0:mn.score}\u5206`:"";Le(pe)}catch(be){console.log(be,"error")}},[pe]);const Et=Ue=>{$e[Ue.target.dataset.id]=$e[Ue.target.dataset.id]||{},$e[Ue.target.dataset.id].value=Ue.target.value,Le([...$e]),ne($e,Ue.target.dataset.id)},Ct=Ue=>{$e[Ue.target.dataset.id]=$e[Ue.target.dataset.id]||{},$e[Ue.target.dataset.id].value=Ue.target.value,Le([...$e]),pn($e,Ue.target.dataset.id)},_t=Ue=>{$e[Ue.target.dataset.id]=$e[Ue.target.dataset.id]||{},$e[Ue.target.dataset.id].value=Ue.target.value,Le([...$e]),Ai($e,Ue.target.dataset.id)};function Ce(Ue,Xe){return Ue.childNodes.forEach(dn=>{var Kn;if(dn.childNodes.length>0)Ce(dn,Xe);else if(dn.nodeName!=="IMG")if(dn.innerHTML)dn.innerHTML=(Kn=dn.innerHTML)==null?void 0:Kn.replace(new RegExp(Xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const mn=document.createElement("span");mn.innerHTML=dn.textContent.replace(new RegExp(Xe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),dn.replaceWith(mn)}})}const Ze=(0,St.useRef)();le.jb.WebkitLineClamp=Ke,Ke&&(_e=gt(gt({},_e),le.jb));function Bn(Ue){let Xe=Ue.target;if(Xe.tagName.toUpperCase()==="A"){let dn=Xe.getAttribute("href");if(dn.indexOf("office")>-1)Ue.preventDefault(),Qn(dn),Ti("office");else if(dn.indexOf("application/pdf")>-1)Ue.preventDefault(),Qn(dn),Ti("pdf");else if(dn.indexOf("text/html")>-1)Ue.preventDefault(),Qn(dn),Ti("html");else if(dn.startsWith("#")){Ue.preventDefault();let Kn=document.getElementById(dn.replace("#",""));Kn&&Kn.scrollIntoView(!0)}}}const ze=()=>{var Ue;const Xe=(Ue=Ze.current)==null?void 0:Ue.querySelectorAll("video");Xe==null||Xe.forEach(dn=>{if(dn.oncontextmenu=()=>!1,dn.src.indexOf(".m3u8")>-1&&!dn.canPlayType("application/vnd.apple.mpegurl")){if(de.ZP.isSupported()){var Kn=new de.ZP;Kn.loadSource(dn.src),Kn.attachMedia(dn)}}})};return(0,St.useEffect)(()=>{if(Ze.current&&vt&&vt.match(Ut)&&window.PR.prettyPrint(),Ze.current)return Ze.current.addEventListener("click",Bn),()=>{var Ue;(Ue=Ze.current)==null||Ue.removeEventListener("click",Bn),(0,le.AL)(),(0,le.Iy)()}},[vt,Ze.current,Bn]),(0,St.useEffect)(()=>{var Ue;const Xe=dn=>{dn.preventDefault(),dn.clipboardData.setData("text",window.getSelection().toString())};return(Ue=Ze.current)==null||Ue.addEventListener("copy",Xe),()=>{var dn;(dn=Ze.current)==null||dn.removeEventListener("copy",Xe)}},[Ze.current]),St.createElement(St.Fragment,null,fe&&St.createElement("div",{ref:Ze},vt),!fe&&!ni(vt)&&St.createElement("div",{ref:Ze,style:gt({},_e),className:`${ye||""} ${Xn?"disabled-fill":""} markdown-body ${tn.current}`,dangerouslySetInnerHTML:{__html:vt}}),!fe&&ni(vt)&&St.createElement(Me,{html:vt}),St.createElement(Gt.Z,{close:!0,data:sn,type:sn!=null&&sn.length?jn:"",style:gt({},nn),onClose:()=>Qn("")}))}},6701:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Ke}});var St=It(59301),Wt=It(25690),le=It(62957),ve=It(28284),de=It(6767),Ht=It(29787),ie=It(18287),oe=It(77019),he=It(5269),Gt=It(25399),Ie=It(37568),Xt={currentPrimary:"currentPrimary___NPWiR",currentDelete:"currentDelete___UEfhf",DirectoryTree:"DirectoryTree___xPxCY",EditDom:"EditDom___seNxC"},Me=It(45937),Qt=It(86245),nt=It(28426),et=It(9148),At=Object.defineProperty,at=Object.defineProperties,dt=Object.getOwnPropertyDescriptors,gt=Object.getOwnPropertySymbols,xt=Object.prototype.hasOwnProperty,bt=Object.prototype.propertyIsEnumerable,Ut=(_e,nn,fn)=>nn in _e?At(_e,nn,{enumerable:!0,configurable:!0,writable:!0,value:fn}):_e[nn]=fn,Rt=(_e,nn)=>{for(var fn in nn||(nn={}))xt.call(nn,fn)&&Ut(_e,fn,nn[fn]);if(gt)for(var fn of gt(nn))bt.call(nn,fn)&&Ut(_e,fn,nn[fn]);return _e},Zt=(_e,nn)=>at(_e,dt(nn)),Yt=(_e,nn)=>{var fn={};for(var xn in _e)xt.call(_e,xn)&&nn.indexOf(xn)<0&&(fn[xn]=_e[xn]);if(_e!=null&&gt)for(var xn of gt(_e))nn.indexOf(xn)<0&&bt.call(_e,xn)&&(fn[xn]=_e[xn]);return fn},te=(_e,nn,fn)=>new Promise((xn,_n)=>{var Xn=pn=>{try{ne(fn.next(pn))}catch(Ai){_n(Ai)}},pe=pn=>{try{ne(fn.throw(pn))}catch(Ai){_n(Ai)}},ne=pn=>pn.done?xn(pn.value):Promise.resolve(pn.value).then(Xn,pe);ne((fn=fn.apply(_e,nn)).next())});const ye=(_e=[])=>_e==null?void 0:_e.map(nn=>Zt(Rt({},nn),{title:(nn==null?void 0:nn.value)||"",key:nn==null?void 0:nn.id,isLeaf:!0})),fe=_e=>{var nn=_e,{user:fn,children:xn,isShowComponent:_n=!0,ModalProps:Xn={},onDataSelect:pe}=nn,ne=Yt(nn,["user","children","isShowComponent","ModalProps","onDataSelect"]);const[pn,Ai]=le.default.useModal(),[ai]=ve.default.useForm(),[sn,Qn]=(0,St.useState)([]),[jn,Ti]=(0,St.useState)(!1),[$e,Le]=(0,St.useState)(!1),[,tn,hi,ni]=(0,Me.U)(Qt.qE,{page:1,limit:9999}),[,,zt]=(0,Me.U)(Qt.V8,{}),[,,Ft]=(0,Me.U)(Qt.B$,{}),[,,mt]=(0,Me.U)(Qt.DH,{}),[,,vt]=(0,Me.U)(Qt.bJ,{}),Et=()=>{Ti(!1),ai.resetFields(),Le(!1)},Ct=Ce=>te(void 0,null,function*(){const{node:Ze,dragNode:Bn,event:ze}=Ce,Ue=Ce.node.pos.split("-"),Xe=Ce.dropPosition-Number(Ue[Ue.length-1]);if(Xe==0){de.ZP.warning("\u65E0\u6CD5\u79FB\u52A8\u5230\u5185\u90E8\u4F4D\u7F6E");return}if(Xe==1&&(Bn==null?void 0:Bn.item_index)==(Ze==null?void 0:Ze.item_index)+1){de.ZP.warning("\u672A\u79FB\u52A8\u4F4D\u7F6E");return}const dn=yield vt({id:Bn==null?void 0:Bn.key,position:Xe==-1?1:(Bn==null?void 0:Bn.item_index)>(Ze==null?void 0:Ze.item_index)?(Ze==null?void 0:Ze.item_index)+1:Ze==null?void 0:Ze.item_index});(dn==null?void 0:dn.status)===0&&(de.ZP.success("\u79FB\u52A8\u6210\u529F"),hi({},!0))}),_t=Ce=>te(void 0,null,function*(){let Ze={};$e?Ze=yield Ft(Rt({},Ce)):Ze=yield mt(Rt({},Ce)),(Ze==null?void 0:Ze.status)==0&&(de.ZP.success((Ze==null?void 0:Ze.message)||($e?"\u6DFB\u52A0\u6210\u529F":"\u66F4\u65B0\u6210\u529F")),hi({},!0),Et())});return(0,St.useEffect)(()=>{Xn!=null&&Xn.open&&hi({},!0)},[Xn==null?void 0:Xn.open]),(0,St.useEffect)(()=>{var Ce;Qn(ye((Ce=ni==null?void 0:ni.data)==null?void 0:Ce.list))},[ni]),_n?St.createElement(St.Fragment,null,Ai,xn,St.createElement(le.default,Rt({},Rt({title:"\u5E38\u7528\u8BC4\u8BED",width:640,centered:!0,footer:null,bodyStyle:{padding:"10px 5px 25px"}},Xn)),St.createElement(Ht.Z,{spinning:tn},(sn==null?void 0:sn.length)>0?St.createElement(St.Fragment,null,St.createElement(ie.default.DirectoryTree,{height:500,className:Xt.DirectoryTree,multiple:!0,draggable:{icon:!1},defaultExpandAll:!0,switcherIcon:!1,showIcon:!1,onSelect:pe,treeData:sn,onDrop:Ct,titleRender:Ce=>St.createElement(St.Fragment,null,St.createElement("span",{className:"multi_ellipsis1",style:{flex:1,marginRight:"32px"}},Ce==null?void 0:Ce.title),St.createElement("div",{className:`${Xt.EditDom}`},St.createElement(oe.Z,{wrap:!1,align:"middle",gutter:16},St.createElement(he.Z,null,St.createElement(Gt.Z,{title:"\u957F\u6309\u53EF\u8FDB\u884C\u62D6\u62FD\u6392\u5E8F"},St.createElement("i",{className:`iconfont icon-tuodong1 font12 ${Xt.currentPrimary}`}))),St.createElement(he.Z,null,St.createElement(Gt.Z,{title:"\u7F16\u8F91"},St.createElement("i",{className:`iconfont icon-bianji11 font12 ${Xt.currentPrimary}`,onClick:Ze=>{Ze.stopPropagation(),ai.setFieldsValue(Rt({},Ce)),Ti(!0)}}))),St.createElement(he.Z,null,St.createElement(Gt.Z,{title:"\u5220\u9664"},St.createElement("i",{className:`iconfont icon-shanchu14 font12 ${Xt.currentDelete}`,onClick:Ze=>{Ze.stopPropagation(),pn.confirm({icon:null,title:"\u5220\u9664\u5E38\u7528\u8BC4\u8BED",centered:!0,content:"\u4F60\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u5E38\u7528\u8BC4\u8BED\u5417\uFF1F",onOk:()=>te(void 0,null,function*(){const Bn=yield zt({id:Ce==null?void 0:Ce.key});(Bn==null?void 0:Bn.status)==0&&(de.ZP.success((Bn==null?void 0:Bn.message)||"\u5220\u9664\u6210\u529F"),hi({},!0))})})}}))))))}),St.createElement(et.op,{className:"ml20 mt20",icon:St.createElement("i",{className:"iconfont icon-xiaojiahao"}),style:{borderRadius:"4px"},onClick:()=>{Le(!0),Ti(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED")):St.createElement(nt.Z,{styles:{margin:"30px auto"},customText:St.createElement("span",null,"\u6682\u65E0\u5E38\u7528\u8BC4\u8BED\uFF0C\u4F60\u53EF\u4EE5",St.createElement("a",{onClick:()=>{Le(!0),Ti(!0)}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED"))}))),St.createElement(le.default,{title:$e?"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED":"\u7F16\u8F91\u5E38\u7528\u8BC4\u8BED",open:jn,okText:$e?"\u6DFB\u52A0":"\u786E\u5B9A",onCancel:()=>{Et()},onOk:()=>{ai.submit()}},St.createElement(ve.default,{form:ai,onFinish:_t},$e&&St.createElement("span",{className:"font14",style:{color:"#191919"}},"\u6DFB\u52A0\u5E38\u7528\u8BC4\u8BED\uFF0C\u53EF\u4EE5\u5E2E\u52A9\u4F60\u63D0\u9AD8\u8BC4\u9605\u4F5C\u4E1A\u7684\u6548\u7387"),St.createElement(ve.default.Item,{hidden:!0,name:"id"}),St.createElement(ve.default.Item,{className:"mt10",name:"value"},St.createElement(Ie.default.TextArea,{placeholder:"\u8F93\u5165\u5E38\u7528\u8BC4\u8BED\u3002\u4F8B\u5982\uFF1A\u4F60\u7684\u7F16\u7A0B\u4F5C\u4E1A\u6574\u4F53\u8868\u73B0\u826F\u597D\uFF0C\u4F46\u4ECD\u6709\u4E00\u4E9B\u5C0F\u7684\u6539\u8FDB\u7A7A\u95F4\u3002",autoSize:{minRows:8,maxRows:9},maxLength:100,showCount:!0}))))):null};var Ke=(0,Wt.connect)(({loading:_e,user:nn})=>({user:nn,loading:_e.effects}))(fe)},87320:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return ve}});var St=It(59301),Wt=It(49535),le=It(90083),ve=()=>{const[de,Ht]=(0,St.useState)(""),[ie,oe]=(0,St.useState)(0);let[he,Gt]=(0,St.useState)(),[Ie,Xt]=(0,St.useState)();const[Me,Qt]=(0,St.useState)(!1),nt=(0,St.useRef)("");(0,St.useEffect)(()=>Wt.Z.subscribe("preview-image",Yt=>{Ht(Yt),console.log(Ut.current)}),[]),(0,St.useEffect)(()=>(document.addEventListener("keydown",et),()=>{document.removeEventListener("keydown",et)}),[]),(0,St.useEffect)(()=>{nt.current=de},[de]);function et(Zt){console.log("e====",Zt),Zt.keyCode==27&&nt.current&&At()}function At(){document.body.style.overflow="auto",Gt(void 0),Xt(void 0),oe(0),Ht("")}function at(){oe(ie+90)}function dt(){he=Ut.current.width*1.1,Ie=Ut.current.height*1.1,Xt(Ie),Gt(he)}function gt(){he=Ut.current.width/1.1,Ie=Ut.current.height/1.1,Xt(Ie),Gt(he)}const xt=(0,St.useRef)(),bt=(0,St.useRef)(),Ut=(0,St.useRef)(),Rt=Zt=>{(Zt.nativeEvent.target===xt.current||Zt.nativeEvent.target===bt.current)&&At()};return St.createElement(St.Fragment,null,de?St.createElement("div",null,St.createElement("div",{className:"preview-wrp-group",ref:bt},St.createElement(le.Z,{className:"image-preview",src:de,style:{display:"none"},preview:{visible:!0,src:de,onVisibleChange:Zt=>{Ht("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},69720:function(Sn,Ve,It){"use strict";It.d(Ve,{h:function(){return xt}});var St=It(59301),Wt=It(82326),le=It(28284),ve=It(99571),de=It(89780),Ht=It.n(de),ie=It(8336),oe=It(12469),he=Object.defineProperty,Gt=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,Xt=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Qt=Object.prototype.propertyIsEnumerable,nt=(bt,Ut,Rt)=>Ut in bt?he(bt,Ut,{enumerable:!0,configurable:!0,writable:!0,value:Rt}):bt[Ut]=Rt,et=(bt,Ut)=>{for(var Rt in Ut||(Ut={}))Me.call(Ut,Rt)&&nt(bt,Rt,Ut[Rt]);if(Xt)for(var Rt of Xt(Ut))Qt.call(Ut,Rt)&&nt(bt,Rt,Ut[Rt]);return bt},At=(bt,Ut)=>Gt(bt,Ie(Ut));const at=Wt.default.Option,dt={labelCol:{span:4},wrapperCol:{span:20}},gt={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"]};Ve.Z=({callback:bt,onCancel:Ut})=>{const[Rt,Zt]=(0,St.useState)("python");function Yt(ye){Zt(gt[ye][1])}function te(ye){bt(ye)}return St.createElement(le.default,At(et({},dt),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:te,style:{width:500}}),St.createElement(le.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},St.createElement(Wt.default,{getPopupContainer:ye=>ye.parentNode,onChange:Yt},Object.keys(gt).map(ye=>St.createElement(at,{key:ye,value:ye},gt[ye][0])))),St.createElement(le.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},St.createElement(xt,{mode:Rt})),St.createElement("div",{className:"flex-container flex-end"},St.createElement(ve.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(ve.ZP,{type:"ghost",onClick:Ut},"\u53D6\u6D88")))};function xt({value:bt,onChange:Ut,mode:Rt,options:Zt={}}){const Yt=(0,St.useRef)(),[te,ye]=(0,St.useState)();return(0,St.useEffect)(()=>{if(te){let fe=function(Ke){const _e=Ke.getValue();Ut&&Ut(_e)};return te.on("change",fe),()=>{te.off("change",fe)}}},[te,Ut]),(0,St.useEffect)(()=>{te&&te.setOption("mode",Rt)},[te,Rt]),(0,St.useEffect)(()=>{te&&(bt!==te.getValue()||bt==="")&&setTimeout(()=>{te.setValue(bt||"")},300)},[te,bt]),(0,St.useEffect)(()=>{if(Yt.current&&!te){const fe=Ht().fromTextArea(Yt.current,et({mode:Rt,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Zt));ye(fe)}},[Yt.current,te]),St.createElement("div",{className:"my-codemirror-container"},St.createElement("textarea",{ref:Yt}))}},39793:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Lr}});var St=It(59301),Wt=It(89780),le=It.n(Wt),ve=It(76374),de=It(8336),Ht=It(6313),ie=It(25717),oe=It(99498),he=It(25419),Gt=It(67549),Ie=It(76902),Xt=({value:an="",className:rn,showTextOnly:Ge,showLines:yn,style:ji={}})=>{const Mi=(0,St.useMemo)(()=>"",[an]);return St.createElement(St.Fragment,null,St.createElement("div",{dangerouslySetInnerHTML:{__html:Mi}}))},Me=Object.defineProperty,Qt=Object.defineProperties,nt=Object.getOwnPropertyDescriptors,et=Object.getOwnPropertySymbols,At=Object.prototype.hasOwnProperty,at=Object.prototype.propertyIsEnumerable,dt=(an,rn,Ge)=>rn in an?Me(an,rn,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):an[rn]=Ge,gt=(an,rn)=>{for(var Ge in rn||(rn={}))At.call(rn,Ge)&&dt(an,Ge,rn[Ge]);if(et)for(var Ge of et(rn))at.call(rn,Ge)&&dt(an,Ge,rn[Ge]);return an},xt=(an,rn)=>Qt(an,nt(rn));let bt=[{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 Ut({onActionCallback:an,title:rn,icon:Ge,actionName:yn,className:ji="",children:Mi}){function or(){an(yn)}return St.createElement("a",{title:rn,className:ji,onClick:or},St.createElement("i",{className:`${Ge}`}),Mi)}var Rt=({watch:an,showNullButton:rn,showNullProgramButton:Ge,onActionCallback:yn,fullScreen:ji,insertTemp:Mi,hidetoolBar:or,extraUse:ln})=>{const Ln=[...bt,{title:`${an?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${an?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return St.createElement("ul",{className:"markdown-toolbar-container"},!or&&Ln.map((Pe,sr)=>St.createElement("li",{key:sr},Pe.actionName?St.createElement(Ut,xt(gt({},Pe),{onActionCallback:yn})):St.createElement("span",{className:"v-line"}))),rn?St.createElement("li",null,St.createElement(Ut,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:yn},St.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u63D2\u5165\b\u586B\u7A7A\u9879"))):null,Ge?St.createElement(St.Fragment,null,St.createElement("li",null,St.createElement(Ut,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:yn},St.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),St.createElement("li",null,St.createElement(Ut,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:yn},St.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Mi&&St.createElement("li",null,St.createElement(Ut,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Mi}`,onActionCallback:yn},St.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),ln&&St.createElement("li",null,ln),St.createElement("li",{className:"btn-full-screen"},St.createElement(Ut,{icon:`${ji?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:ji?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:yn})))},Zt=It(91558),Yt=It(28284),te=It(37568),ye=It(99571),fe=Object.defineProperty,Ke=Object.defineProperties,_e=Object.getOwnPropertyDescriptors,nn=Object.getOwnPropertySymbols,fn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,_n=(an,rn,Ge)=>rn in an?fe(an,rn,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):an[rn]=Ge,Xn=(an,rn)=>{for(var Ge in rn||(rn={}))fn.call(rn,Ge)&&_n(an,Ge,rn[Ge]);if(nn)for(var Ge of nn(rn))xn.call(rn,Ge)&&_n(an,Ge,rn[Ge]);return an},pe=(an,rn)=>Ke(an,_e(rn));const ne={labelCol:{span:4},wrapperCol:{span:20}};var pn=({callback:an,onCancel:rn})=>{function Ge(yn){an(yn)}return St.createElement(Yt.default,pe(Xn({},ne),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:Ge,style:{width:500}}),St.createElement(Yt.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},St.createElement(te.default,null)),St.createElement(Yt.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},St.createElement(te.default,null)),St.createElement("div",{className:"flex-container flex-end"},St.createElement(ye.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(ye.ZP,{type:"ghost",onClick:rn},"\u53D6\u6D88")))},Ai=It(69720),ai=It(17077),sn=It(62957),Qn=It(77019),jn=It(9507),Ti=It(59301),$e=({callback:an,onCancel:rn})=>{const Ge=document.createElement("canvas"),yn=Ge.getContext("2d");Ge.width=1e3,Ge.height=800,yn.fillStyle="#ffffff",yn.fillRect(0,0,Ge.width,Ge.height);const ji=Ge.toDataURL("image/png");return Ti.createElement(sn.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},Ti.createElement(Qn.Z,{style:{height:"100vh"}},Ti.createElement(jn.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:ji,visible:!0,title:String(Date.now())},onOk:Mi=>{an({src:Mi.url})},onClose:rn})))},Le=It(12378);function tn(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(tn,go.CommandHandler),tn.prototype.canAlignSelection=function(){var an=this.diagram;return!(an===null||an.isReadOnly||an.isModelReadOnly||an.selection.count<2)},tn.prototype.alignLeft=function(){var an=this.diagram;an.startTransaction("aligning left");var rn=1/0;an.selection.each(function(Ge){Ge instanceof go.Link||(rn=Math.min(Ge.position.x,rn))}),an.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(rn,Ge.position.y))}),an.commitTransaction("aligning left")},tn.prototype.alignRight=function(){var an=this.diagram;an.startTransaction("aligning right");var rn=-1/0;an.selection.each(function(Ge){if(!(Ge instanceof go.Link)){var yn=Ge.actualBounds.x+Ge.actualBounds.width;rn=Math.max(yn,rn)}}),an.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(rn-Ge.actualBounds.width,Ge.position.y))}),an.commitTransaction("aligning right")},tn.prototype.alignTop=function(){var an=this.diagram;an.startTransaction("alignTop");var rn=1/0;an.selection.each(function(Ge){Ge instanceof go.Link||(rn=Math.min(Ge.position.y,rn))}),an.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(Ge.position.x,rn))}),an.commitTransaction("alignTop")},tn.prototype.alignBottom=function(){var an=this.diagram;an.startTransaction("aligning bottom");var rn=-1/0;an.selection.each(function(Ge){if(!(Ge instanceof go.Link)){var yn=Ge.actualBounds.y+Ge.actualBounds.height;rn=Math.max(yn,rn)}}),an.selection.each(function(Ge){Ge instanceof go.Link||Ge.move(new go.Point(Ge.actualBounds.x,rn-Ge.actualBounds.height))}),an.commitTransaction("aligning bottom")},tn.prototype.alignCenterX=function(){var an=this.diagram,rn=an.selection.first();if(rn){an.startTransaction("aligning Center X");var Ge=rn.actualBounds.x+rn.actualBounds.width/2;an.selection.each(function(yn){yn instanceof go.Link||yn.move(new go.Point(Ge-yn.actualBounds.width/2,yn.actualBounds.y))}),an.commitTransaction("aligning Center X")}},tn.prototype.alignCenterY=function(){var an=this.diagram,rn=an.selection.first();if(rn){an.startTransaction("aligning Center Y");var Ge=rn.actualBounds.y+rn.actualBounds.height/2;an.selection.each(function(yn){yn instanceof go.Link||yn.move(new go.Point(yn.actualBounds.x,Ge-yn.actualBounds.height/2))}),an.commitTransaction("aligning Center Y")}},tn.prototype.alignColumn=function(an){var rn=this.diagram;rn.startTransaction("align Column"),an===void 0&&(an=0),an=parseFloat(an);var Ge=new Array;rn.selection.each(function(ln){ln instanceof go.Link||Ge.push(ln)});for(var yn=0;yn<Ge.length-1;yn++){var ji=Ge[yn],Mi=ji.actualBounds.y+ji.actualBounds.height+an,or=Ge[yn+1];or.move(new go.Point(ji.actualBounds.x,Mi))}rn.commitTransaction("align Column")},tn.prototype.alignRow=function(an){an===void 0&&(an=0),an=parseFloat(an);var rn=this.diagram;rn.startTransaction("align Row");var Ge=new Array;rn.selection.each(function(ln){ln instanceof go.Link||Ge.push(ln)});for(var yn=0;yn<Ge.length-1;yn++){var ji=Ge[yn],Mi=ji.actualBounds.x+ji.actualBounds.width+an,or=Ge[yn+1];or.move(new go.Point(Mi,ji.actualBounds.y))}rn.commitTransaction("align Row")},tn.prototype.canRotate=function(an){var rn=this.diagram;return!(rn===null||rn.isReadOnly||rn.isModelReadOnly||rn.selection.count<1)},tn.prototype.rotate=function(an){an===void 0&&(an=90);var rn=this.diagram;rn.startTransaction("rotate "+an.toString());var rn=this.diagram;rn.selection.each(function(Ge){Ge instanceof go.Link||Ge instanceof go.Group||(Ge.angle+=an)}),rn.commitTransaction("rotate "+an.toString())},tn.prototype.pullToFront=function(){var an=this.diagram;an.startTransaction("pullToFront");var rn=new go.Map;an.selection.each(function(Ge){rn.set(Ge.layer,0)}),rn.iteratorKeys.each(function(Ge){var yn=0;Ge.parts.each(function(ji){if(!ji.isSelected){var Mi=ji.zOrder;isNaN(Mi)?ji.zOrder=0:yn=Math.max(yn,Mi)}}),rn.set(Ge,yn)}),an.selection.each(function(Ge){tn._assignZOrder(Ge,rn.get(Ge.layer)+1)}),an.commitTransaction("pullToFront")},tn.prototype.pushToBack=function(){var an=this.diagram;an.startTransaction("pushToBack");var rn=new go.Map;an.selection.each(function(Ge){rn.set(Ge.layer,0)}),rn.iteratorKeys.each(function(Ge){var yn=0;Ge.parts.each(function(ji){if(!ji.isSelected){var Mi=ji.zOrder;isNaN(Mi)?ji.zOrder=0:yn=Math.min(yn,Mi)}}),rn.set(Ge,yn)}),an.selection.each(function(Ge){tn._assignZOrder(Ge,rn.get(Ge.layer)-1-tn._findGroupDepth(Ge))}),an.commitTransaction("pushToBack")},tn._assignZOrder=function(an,rn,Ge){Ge===void 0&&(Ge=an),an.layer===Ge.layer&&(an.zOrder=rn),an instanceof go.Group&&an.memberParts.each(function(yn){tn._assignZOrder(yn,rn+1,Ge)})},tn._findGroupDepth=function(an){if(an instanceof go.Group){var rn=0;return an.memberParts.each(function(Ge){rn=Math.max(rn,tn._findGroupDepth(Ge))}),rn+1}else return 0},tn.prototype.doKeyDown=function(){var an=this.diagram;if(an!==null){var rn=an.lastInput;if(rn.key==="Up"||rn.key==="Down"||rn.key==="Left"||rn.key==="Right"){var Ge=this.arrowKeyBehavior;if(Ge==="none")return;if(Ge==="select"){this._arrowKeySelect();return}else if(Ge==="move"){this._arrowKeyMove();return}else if(Ge==="tree"){this._arrowKeyTree();return}}go.CommandHandler.prototype.doKeyDown.call(this)}},tn.prototype._getAllParts=function(){var an=new Array;return this.diagram.nodes.each(function(rn){an.push(rn)}),this.diagram.parts.each(function(rn){an.push(rn)}),an},tn.prototype._arrowKeyMove=function(){var an=this.diagram,rn=an.lastInput,Ge=0,yn=0;if(rn.control||rn.meta)Ge=1,yn=1;else if(an.grid!==null){var ji=an.grid.gridCellSize;yn=ji.width,Ge=ji.height}an.startTransaction("arrowKeyMove"),an.selection.each(function(Mi){rn.key==="Up"?Mi.move(new go.Point(Mi.actualBounds.x,Mi.actualBounds.y-Ge)):rn.key==="Down"?Mi.move(new go.Point(Mi.actualBounds.x,Mi.actualBounds.y+Ge)):rn.key==="Left"?Mi.move(new go.Point(Mi.actualBounds.x-yn,Mi.actualBounds.y)):rn.key==="Right"&&Mi.move(new go.Point(Mi.actualBounds.x+yn,Mi.actualBounds.y))}),an.commitTransaction("arrowKeyMove")},tn.prototype._arrowKeySelect=function(){var an=this.diagram,rn=an.lastInput,Ge=null;rn.key==="Up"?Ge=this._findNearestPartTowards(270):rn.key==="Down"?Ge=this._findNearestPartTowards(90):rn.key==="Left"?Ge=this._findNearestPartTowards(180):rn.key==="Right"&&(Ge=this._findNearestPartTowards(0)),Ge!==null&&(rn.shift?Ge.isSelected=!0:rn.control||rn.meta?Ge.isSelected=!Ge.isSelected:an.select(Ge))},tn.prototype._findNearestPartTowards=function(an){var rn=this.diagram.selection.first();if(rn===null)return null;for(var Ge=rn.actualBounds.center,yn=this._getAllParts(),ji=1/0,Mi=rn,or=0;or<yn.length;or++){var ln=yn[or];if(ln!==rn&&ln.canSelect()){var Ln=ln.actualBounds.center,Pe=Ge.directionPoint(Ln),sr=this._angleCloseness(Pe,an);if(sr<=45){var $n=Ge.distanceSquaredPoint(Ln);$n*=1+Math.sin(sr*Math.PI/180),$n<ji&&(ji=$n,Mi=ln)}}}return Mi},tn.prototype._angleCloseness=function(an,rn){return Math.min(Math.abs(rn-an),Math.min(Math.abs(rn+360-an),Math.abs(rn-360-an)))},tn.prototype._arrowKeyTree=function(){var an=this.diagram,rn=an.selection.first();if(rn instanceof go.Node){var Ge=an.lastInput;if(Ge.key==="Right"){if(!rn.isTreeLeaf)if(!rn.isTreeExpanded)an.commandHandler.canExpandTree(rn)&&an.commandHandler.expandTree(rn);else{var yn=this._sortTreeChildrenByY(rn).first();yn!==null&&an.select(yn)}}else if(Ge.key==="Left")if(!rn.isTreeLeaf&&rn.isTreeExpanded)an.commandHandler.canCollapseTree(rn)&&an.commandHandler.collapseTree(rn);else{var ji=rn.findTreeParentNode();ji!==null&&an.select(ji)}else if(Ge.key==="Up"){var ji=rn.findTreeParentNode();if(ji!==null){var Mi=this._sortTreeChildrenByY(ji),or=Mi.indexOf(rn);if(or>0){for(var ln=Mi.elt(or-1);ln!==null&&ln.isTreeExpanded&&!ln.isTreeLeaf;){var Ln=this._sortTreeChildrenByY(ln);ln=Ln.last()}ln!==null&&an.select(ln)}else an.select(ji)}}else if(Ge.key==="Down")if(rn.isTreeExpanded&&!rn.isTreeLeaf){var yn=this._sortTreeChildrenByY(rn).first();yn!==null&&an.select(yn)}else for(;rn!==null;){var ji=rn.findTreeParentNode();if(ji===null)break;var Mi=this._sortTreeChildrenByY(ji),or=Mi.indexOf(rn);if(or<Mi.length-1){an.select(Mi.elt(or+1));break}else rn=ji}var Pe=an.selection.first();Pe!==null&&an.scrollToRect(Pe.actualBounds)}},tn.prototype._sortTreeChildrenByY=function(an){var rn=new go.List().addAll(an.findTreeChildrenNodes());return rn.sort(function(Ge,yn){var ji=Ge.location,Mi=yn.location;return ji.y<Mi.y?-1:ji.y>Mi.y?1:ji.x<Mi.x?-1:ji.x>Mi.x?1:0}),rn},tn.prototype.copyToClipboard=function(an){go.CommandHandler.prototype.copyToClipboard.call(this,an),this._lastPasteOffset.set(this.pasteOffset)},tn.prototype.pasteFromClipboard=function(){var an=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(an,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),an},Object.defineProperty(tn.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(an){if(an!=="move"&&an!=="select"&&an!=="scroll"&&an!=="tree"&&an!=="none")throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+an);this._arrowKeyBehavior=an}}),Object.defineProperty(tn.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(an){if(!(an instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+an);this._pasteOffset.set(an)}});var hi=tn,ni=It(63720),zt=It(5269),Ft=It(38986),mt={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re"},vt=It(48790),Et=It(59301),Ct=(an,rn,Ge)=>new Promise((yn,ji)=>{var Mi=Ln=>{try{ln(Ge.next(Ln))}catch(Pe){ji(Pe)}},or=Ln=>{try{ln(Ge.throw(Ln))}catch(Pe){ji(Pe)}},ln=Ln=>Ln.done?yn(Ln.value):Promise.resolve(Ln.value).then(Mi,or);ln((Ge=Ge.apply(an,rn)).next())});function _t({onCancel:an,callback:rn}){let Ge=(0,St.useRef)(),yn=(0,St.useRef)(),ji=(0,St.useRef)(),Mi=(0,St.useRef)(!1);const or=(0,St.useRef)(!1),[ln,Ln]=(0,St.useState)(0);function Pe(){const $n=Le.bx.make,se={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"};Ge.current=new Le.S0(yn.current,{padding:20,grid:$n(Le.s_,"Grid",$n(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$n(Le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:Te=>{var xi=Te.diagram.commandHandler.addTopLevelParts(Te.diagram.selection,!0);xi||Te.diagram.currentTool.doCancel()},commandHandler:$n(hi),"clickCreatingTool.archetypeNodeData":{text:"\u672A\u547D\u540D",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:Te=>{var xi=Te.subject;xi.location=xi.location.copy().snapToGridPoint(Te.diagram.grid.gridOrigin,Te.diagram.grid.gridCellSize),setTimeout(()=>{Te.diagram.commandHandler.editTextBlock()},20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:Te=>{var xi=Te.subject;setTimeout(()=>{Te.diagram.commandHandler.editTextBlock()})},LinkRelinked:Te=>{var xi=Te.parameter.part;xi.invalidateConnectedLinks();var er=Te.subject;Te.diagram.toolManager.linkingTool.isForwards?er.toNode.invalidateConnectedLinks():er.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),Ge.current.nodeTemplate=$n(Le.NB,"Auto",{locationSpot:Le.z6.Center,locationObjectName:"SHAPE",desiredSize:new Le.$u(120,60),minSize:new Le.$u(40,40),resizable:!0,resizeCellSize:new Le.$u(10,10),rotatable:!0},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),new Le.KX("desiredSize","size",Le.$u.parse).makeTwoWay(Le.$u.stringify),$n(Le.bn,{name:"SHAPE",fill:se.white,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("figure"),new Le.KX("fill"),new Le.KX("stroke","borderColor"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),$n(Le.bn,{width:100,height:20,strokeWidth:0,fill:"transparent"}),$n(Le.al,{margin:1,textAlign:"center",overflow:Le.al.OverflowEllipsis,editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),Ge.current.nodeTemplate.toolTip=$n("ToolTip",$n(Le.s_,"Vertical",{maxSize:new Le.$u(200,NaN)},$n(Le.al,{font:"bold 10pt sans-serif",textAlign:"center"},new Le.KX("text")),$n(Le.al,{font:"10pt sans-serif",textAlign:"center"},new Le.KX("text","details"))));function De(Te,xi){var er=(Si,Mr)=>{Si.handled=!0,Si.diagram.model.commit(ur=>{var Tr=Mr.part.adornedPart,gr=new Le.E9().setRectSpot(Tr.actualBounds,Te);gr.subtract(Tr.location),gr.scale(2,2),gr.x+=Math.sign(gr.x)*130,gr.y+=Math.sign(gr.y)*130,gr.add(Tr.location),gr.snapToGridPoint(Si.diagram.grid.gridOrigin,Si.diagram.grid.gridCellSize);var ue=ur.copyNodeData(Tr.data);ur.setGroupKeyForNodeData(ue,ur.getGroupKeyForNodeData(Tr.data)),ur.addNodeData(ue);var re={from:Tr.key,to:ur.getKeyForNodeData(ue)};ur.addLinkData(re);var ee=Si.diagram.findNodeForData(ue);ee.location=gr,Si.diagram.select(ee),setTimeout(()=>{Si.diagram.commandHandler.editTextBlock()},20)})};return $n(Le.bn,{figure:xi,alignment:Te,alignmentFocus:Te.opposite(),width:Te.equals(Le.z6.Top)||Te.equals(Le.z6.Bottom)?25:18,height:Te.equals(Le.z6.Top)||Te.equals(Le.z6.Bottom)?18:25,fill:"orange",stroke:se.white,strokeWidth:4,mouseEnter:(Si,Mr)=>Mr.fill="dodgerblue",mouseLeave:(Si,Mr)=>Mr.fill="orange",isActionable:!0,click:er,contextClick:er})}function qn(Te){return $n(Le.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:(xi,er)=>er.fill="dodgerblue",mouseLeave:(xi,er)=>er.fill="orange",click:(xi,er)=>{xi.diagram.commandHandler.showContextMenu(er.part.adornedPart)}},Te||{})}Ge.current.nodeTemplate.selectionAdornmentTemplate=$n(Le.uz,"Spot",$n(Le.Vm,{padding:10}),De(Le.z6.Top,"TriangleUp"),De(Le.z6.Left,"TriangleLeft"),De(Le.z6.Right,"TriangleRight"),De(Le.z6.Bottom,"TriangleDown"),qn({alignment:new Le.z6(.75,0)}));function Zn(Te,xi){return(er,Si)=>{er.handled=!0,er.diagram.model.commit(Mr=>{Mr.set(Si.part.adornedPart.data,Te,xi)})}}function Ye(Te,xi){return xi||(xi="color"),$n(Le.bn,{width:16,height:16,stroke:"lightgray",fill:Te,margin:1,background:"transparent",mouseEnter:(er,Si)=>Si.stroke="dodgerblue",mouseLeave:(er,Si)=>Si.stroke="lightgray",click:Zn(xi,Te),contextClick:Zn(xi,Te)})}function Dn(){return[$n("ContextMenuButton",$n(Le.s_,"Horizontal",Ye(se.white,"fill"),Ye(se.beige,"fill"),Ye(se.extralightblue,"fill"),Ye(se.extralightred,"fill"))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",Ye(se.lightgray,"fill"),Ye(se.lightgreen,"fill"),Ye(se.lightblue,"fill"),Ye(se.lightred,"fill")))]}function bi(){return[$n("ContextMenuButton",$n(Le.s_,"Horizontal",Ye(se.black),Ye(se.green),Ye(se.blue),Ye(se.red))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",Ye(se.white),Ye(se.magenta),Ye(se.purple),Ye(se.orange)))]}function ki(Te,xi){return xi||(xi="thickness"),$n(Le.bn,"LineH",{width:16,height:16,strokeWidth:Te,margin:1,background:"transparent",mouseEnter:(er,Si)=>Si.background="dodgerblue",mouseLeave:(er,Si)=>Si.background="transparent",click:Zn(xi,Te),contextClick:Zn(xi,Te)})}function Ni(Te,xi){return xi||(xi="dash"),$n(Le.bn,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:Te,margin:1,background:"transparent",mouseEnter:(er,Si)=>Si.background="dodgerblue",mouseLeave:(er,Si)=>Si.background="transparent",click:Zn(xi,Te),contextClick:Zn(xi,Te)})}function li(){return[$n("ContextMenuButton",$n(Le.s_,"Horizontal",ki(1),ki(2),ki(3),ki(4))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",Ni(null),Ni([2,4]),Ni([4,4])))]}function ci(Te,xi){return xi||(xi="figure"),$n(Le.bn,{width:32,height:32,scale:.5,fill:"lightgray",figure:Te,margin:1,background:"transparent",mouseEnter:(er,Si)=>Si.fill="dodgerblue",mouseLeave:(er,Si)=>Si.fill="lightgray",click:Zn(xi,Te),contextClick:Zn(xi,Te)})}Ge.current.nodeTemplate.contextMenu=$n("ContextMenu",$n("ContextMenuButton",$n(Le.s_,"Horizontal",ci("Rectangle"),ci("RoundedRectangle"),ci("Ellipse"),ci("Diamond"))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",ci("Parallelogram2"),ci("ManualOperation"),ci("Procedure"),ci("Cylinder1"))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",ci("Terminator"),ci("CreateRequest"),ci("Document"),ci("TriangleDown"))),Dn(),bi(),li()),Ge.current.groupTemplate=$n(Le.ZA,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Le.z6.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:(Te,xi)=>{var er=xi.addMembers(xi.diagram.selection,!0);er||xi.diagram.currentTool.doCancel()},avoidable:!1},new Le.KX("location","loc",Le.E9.parse).makeTwoWay(Le.E9.stringify),$n(Le.s_,"Auto",{name:"BODY"},$n(Le.bn,{parameter1:10,fill:se.white,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Le.z6.AllSides,toSpot:Le.z6.AllSides},new Le.KX("fill"),new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),$n(Le.Vm,{background:"transparent",margin:20})),$n(Le.al,{alignment:Le.z6.Top,alignmentFocus:Le.z6.Bottom,font:"bold 12pt sans-serif",editable:!0},new Le.KX("text"),new Le.KX("stroke","color"))),Ge.current.groupTemplate.selectionAdornmentTemplate=$n(Le.uz,"Spot",$n(Le.s_,"Auto",$n(Le.bn,{fill:null,stroke:"dodgerblue",strokeWidth:3}),$n(Le.Vm,{margin:1.5})),qn({alignment:Le.z6.TopRight,alignmentFocus:Le.z6.BottomRight})),Ge.current.groupTemplate.contextMenu=$n("ContextMenu",Dn(),bi(),li()),Ge.current.linkTemplate=$n(Le.rU,{layerName:"Foreground",routing:Le.rU.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Le.KX("fromSpot","fromSpot",Le.z6.parse),new Le.KX("toSpot","toSpot",Le.z6.parse),new Le.KX("fromShortLength","dir",Te=>Te>=1?10:0),new Le.KX("toShortLength","dir",Te=>Te>=1?10:0),new Le.KX("points").makeTwoWay(),$n(Le.bn,{strokeWidth:2},new Le.KX("stroke","color"),new Le.KX("strokeWidth","thickness"),new Le.KX("strokeDashArray","dash")),$n(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,0),segmentOrientation:Le.rU.OrientAlong,alignmentFocus:Le.z6.Right,figure:"circle",width:10,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Te=>Te===1)),$n(Le.bn,{segmentIndex:-1,segmentOffset:new Le.E9(-10,6),segmentOrientation:Le.rU.OrientPlus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Te=>Te>=1),new Le.KX("width","thickness",Te=>7+3*Te),new Le.KX("height","thickness",Te=>7+3*Te),new Le.KX("segmentOffset","thickness",Te=>new Le.E9(-15,4+1.5*Te))),$n(Le.bn,{segmentIndex:0,segmentOffset:new Le.E9(15,-6),segmentOrientation:Le.rU.OrientMinus90,alignmentFocus:Le.z6.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Le.KX("fill","color"),new Le.KX("visible","dir",Te=>Te===2),new Le.KX("width","thickness",Te=>7+3*Te),new Le.KX("height","thickness",Te=>7+3*Te),new Le.KX("segmentOffset","thickness",Te=>new Le.E9(-15,4+1.5*Te))),$n(Le.al,{alignmentFocus:new Le.z6(0,1,-4,0),editable:!0},new Le.KX("text").makeTwoWay(),new Le.KX("stroke","color"))),Ge.current.linkTemplate.selectionAdornmentTemplate=$n(Le.uz,$n(Le.bn,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:fi(2)},new Le.KX("pathPattern","thickness",fi)),qn({alignmentFocus:new Le.z6(0,0,-6,-4)}));function fi(Te){return $n(Le.bn,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(Te+4).toString()+" H3"})}function Fn(Te){var xi="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return Te===0?xi="M0 0 M16 16 M0 8 L16 8":Te===2&&(xi="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),$n(Le.bn,{geometryString:xi,margin:2,background:"transparent",mouseEnter:(er,Si)=>Si.background="dodgerblue",mouseLeave:(er,Si)=>Si.background="transparent",click:Zn("dir",Te),contextClick:Zn("dir",Te)})}function un(Te){var xi=(er,Si)=>{er.handled=!0,er.diagram.model.commit(Mr=>{var ur=Si.part.adornedPart;Mr.set(ur.data,Te?"toSpot":"fromSpot",Le.z6.stringify(Le.z6.AllSides)),(Te?ur.toNode:ur.fromNode).invalidateConnectedLinks()})};return $n(Le.bn,{width:12,height:12,fill:"transparent",mouseEnter:(er,Si)=>Si.background="dodgerblue",mouseLeave:(er,Si)=>Si.background="transparent",click:xi,contextClick:xi})}function We(Te,xi){var er=0,Si=Le.z6.RightSide;Te.equals(Le.z6.Top)?(er=270,Si=Le.z6.TopSide):Te.equals(Le.z6.Left)?(er=180,Si=Le.z6.LeftSide):Te.equals(Le.z6.Bottom)&&(er=90,Si=Le.z6.BottomSide),xi||(er-=180);var Mr=(ur,Tr)=>{ur.handled=!0,ur.diagram.model.commit(gr=>{var ue=Tr.part.adornedPart;gr.set(ue.data,xi?"toSpot":"fromSpot",Le.z6.stringify(Si)),(xi?ue.toNode:ue.fromNode).invalidateConnectedLinks()})};return $n(Le.bn,{alignment:Te,alignmentFocus:Te.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:er,background:"transparent",mouseEnter:(ur,Tr)=>Tr.background="dodgerblue",mouseLeave:(ur,Tr)=>Tr.background="transparent",click:Mr,contextClick:Mr})}Ge.current.linkTemplate.contextMenu=$n("ContextMenu",bi(),li(),$n("ContextMenuButton",$n(Le.s_,"Horizontal",Fn(0),Fn(1),Fn(2))),$n("ContextMenuButton",$n(Le.s_,"Horizontal",$n(Le.s_,"Spot",un(!1),We(Le.z6.Top,!1),We(Le.z6.Left,!1),We(Le.z6.Right,!1),We(Le.z6.Bottom,!1)),$n(Le.s_,"Spot",{margin:new Le.Zt(0,0,0,2)},un(!0),We(Le.z6.Top,!0),We(Le.z6.Left,!0),We(Le.z6.Right,!0),We(Le.z6.Bottom,!0)))));const Mn=`{ "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 $i=["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 hr(Te){return console.log("shapeName:",Te),$i.indexOf(Te)>=0}var vr=new Le.YI(ji.current,{maxSelectionCount:1,linkTemplate:$n(Le.rU,{locationSpot:Le.z6.Center,selectionAdornmentTemplate:$n(Le.uz,"Link",{locationSpot:Le.z6.Center},$n(Le.bn,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),$n(Le.bn,{toArrow:"Standard",stroke:null}))},{routing:Le.rU.AvoidsNodes,curve:Le.rU.JumpOver,corner:5,toShortLength:4},new Le.KX("points"),$n(Le.bn,{isPanelMain:!0,strokeWidth:2}),$n(Le.bn,{toArrow:"Standard",stroke:null})),model:new Le.FJ([{text:"\u672A\u547D\u540D",size:"100 100",fill:null,stroke:"#000"},...Le.bn.getFigureGenerators().toArray().map(Te=>({text:"\u672A\u547D\u540D",size:"100 100",figure:Te.key,fill:"white",stroke:"#666",borderColor:"#000"}))])});return Ge.current.addDiagramListener("TextEdited",function(Te){var xi;const er=Te.subject.part;var Si=(xi=document.activeElement)==null?void 0:xi.value;typeof Si=="string"&&Si.trim()===""&&Ge.current.model.commit(function(Mr){Mr.set(er.data,"text","\u672A\u547D\u540D"),Ge.current.commandHandler.stopCommand()},"increment")}),vr.nodeTemplate=$n(Le.NB,"Auto",{locationSpot:Le.z6.Center},new Le.KX("location","location",Le.E9.parse).makeTwoWay(Le.E9.stringify),$n(Le.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 Le.KX("stroke").makeTwoWay(),new Le.KX("fill").makeTwoWay(),new Le.KX("figure")),$n(Le.al,{margin:new Le.Zt(5,5,3,5),font:"10pt sans-serif",minSize:new Le.$u(16,16),maxSize:new Le.$u(10,NaN),textAlign:"center",editable:!0},new Le.KX("key").makeTwoWay())),setTimeout(()=>{Ge.current.grid=$n(Le.s_,"Grid",$n(Le.bn,"LineH",{stroke:"lightgray",strokeWidth:.5}),$n(Le.bn,"LineV",{stroke:"lightgray",strokeWidth:.5})),Ge.current.grid.visible=!0,Ge.current.grid.gridCellStroke="darkgray",Ge.current.grid.gridCellStrokeWidth=1},300),window.myDiagrams=Ge.current,Ge.current}const sr=()=>Ct(this,null,function*(){var $n,se=Ge.current.makeImage();const De=yield(0,Ft.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:se.src,file_data:JSON.stringify({login:($n=(0,vt.eY)())==null?void 0:$n.login,data:JSON.parse(Ge.current.model.toJson())})}});rn({src:De.url})});return(0,St.useEffect)(()=>(setTimeout(()=>{Pe()},500),Ln(ln+1),()=>{Ge.current=null}),[]),Et.createElement("div",{ref:or,className:"body-overflow-initial"},Et.createElement(sn.default,{width:1200,icon:null,footer:null,closable:!0,visible:!!ln,destroyOnClose:!0,maskClosable:!1,rootClassName:"zIndex-9999",title:Et.createElement(Qn.Z,null,Et.createElement(zt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Et.createElement(zt.Z,{onClick:()=>{var $n,se,De=Ge.current.selection.first();if(Mi.current=!Mi.current,document.activeElement&&De){let qn=(se=($n=document.activeElement)==null?void 0:$n.value)==null?void 0:se.trim();typeof qn=="string"&&Ge.current.model.commit(function(Zn){Zn.set(De.data,"text",qn||"\u672A\u547D\u540D"),Ge.current.commandHandler.stopCommand()},"increment")}Ln(ln+1)}},Et.createElement("span",{className:"current c-blue mr30",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77"))),onCancel:an},Et.createElement("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative",display:Mi.current?"none":"block"},className:mt.flowChartWrp},Et.createElement("div",{style:{display:"flex",height:"100%"}},Et.createElement("div",{style:{width:"300px",height:"100%"}},Et.createElement("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"}},"\u56FE\u5F62\u5E93"),Et.createElement("div",{style:{height:"calc(100% - 50px)"},className:mt.myPaletteDiv,ref:ji})),Et.createElement("div",{style:{flex:1,position:"relative"}},Et.createElement("div",{ref:yn,style:{height:"80vh"}}))),Et.createElement("div",{className:"tr"},Et.createElement(ye.ZP,{size:"large",onClick:sr,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))))}var Ce=_t,Ze=It(47889),Bn=It(71051);const ze=Ze.ZP.Group,Ue={margin:"0 8px"};var Xe=({callback:an,onCancel:rn})=>{function Ge(yn){an(yn)}return St.createElement(Yt.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:Ge},St.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},St.createElement("span",{style:Ue},"\u5355\u5143\u683C\u6570\uFF1A"),St.createElement("span",{style:Ue},"\u884C\u6570"),St.createElement(Yt.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},St.createElement(Bn.Z,null)),St.createElement("span",{style:Ue},"\u5217\u6570"),St.createElement(Yt.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},St.createElement(Bn.Z,null))),St.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},St.createElement("span",{style:Ue},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),St.createElement(Yt.default.Item,{name:"align"},St.createElement(ze,null,St.createElement(Ze.ZP,{value:"default"},St.createElement("i",{className:"fa fa-align-justify"})),St.createElement(Ze.ZP,{value:"left"},St.createElement("i",{className:"fa fa-align-left"})),St.createElement(Ze.ZP,{value:"center"},St.createElement("i",{className:"fa fa-align-center"})),St.createElement(Ze.ZP,{value:"right"},St.createElement("i",{className:"fa fa-align-right"}))))),St.createElement("div",{className:"flex-container flex-end"},St.createElement(ye.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),St.createElement(ye.ZP,{type:"ghost",onClick:rn},"\u53D6\u6D88")))},dn=It(71411),Kn=It(43001),mn=It.n(Kn),ei=(0,St.forwardRef)(({use3d:an,width:rn,height:Ge,callback:yn,showSaveButton:ji},Mi)=>{const or=(0,St.useRef)(),ln=(0,St.useRef)(),[Ln,Pe]=(0,St.useState)(!1),sr=(0,St.useRef)({id:or,appName:"graphing",width:rn||1e3,height:Ge||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,St.useEffect)(()=>{ln.current=new(mn())(sr.current,!0),window.onload=function(){ln.current.inject("applet_container")}},[]);const $n=()=>{var se=window.ggbApplet.getPNGBase64(1,!0,72);return yn&&yn(se),se};return(0,St.useEffect)(()=>{sr.current.appName=Ln?"3D":"graphing",ln.current.inject("applet_container")},[Ln]),(0,St.useEffect)(()=>{Pe(an)},[an]),(0,St.useImperativeHandle)(Mi,()=>({getImgData:$n})),St.createElement(St.Fragment,null,St.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:or}),St.createElement(Qn.Z,{align:"middle"},St.createElement(zt.Z,{flex:1},St.createElement(dn.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:Ln,onChange:se=>Pe(se)})),St.createElement(zt.Z,null,St.createElement(ye.ZP,{size:"large",onClick:$n,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),kn=It(76562),On=It(6767);const Vn="link",Ki="upload-image",si="add-flowchart",yi="draw-image",Ei="add-flowchart",qi="code-block",ii="add-table",ar="------------",Xi={default:ar,left:`:${ar}`,center:`:${ar}:`,right:`${ar}:`};var lr=It(37808);function zi(){}let Kr=0;const Ir=1e4,Or="\u2581",Yi="@\u2581\u2581@",kr="@\u2581@",kt=`
**\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`,tr=["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 Fi(an){return/^\d+$/.test(an)?`${an}px`:an}const Li=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Ui={[Li+"-B"]:"bold",[Li+"-I"]:"italic"},Ri={[Vn]:"\u6DFB\u52A0\u94FE\u63A5",[qi]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ki]:"\u6DFB\u52A0\u56FE\u7247",[yi]:"\u6DFB\u52A0\u753B\u56FE",[si]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[ii]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var Lr=({defaultValue:an="",onChange:rn,width:Ge="100%",height:yn=400,miniToolbar:ji=!1,isFocus:Mi=!1,watch:or,insertTemp:ln,mode:Ln="markdown",id:Pe="markdown-editor-id",showResizeBar:sr=!1,noStorage:$n=!1,showNullButton:se=!1,showNullProgramButton:De=!1,hidetoolBar:qn=!1,fullScreen:Zn=!1,onBlur:Ye,onCMBeforeChange:Dn,onFullScreen:bi,className:ki="",disablePaste:Ni=!1,disabled:li=!1,disabledFill:ci=!1,placeholder:fi="",values:Fn="",extraUse:un})=>{const[We,Mn]=(0,St.useState)(null),[$i,hr]=(0,St.useState)(an),[vr,Te]=(0,St.useState)(or),[xi,er]=(0,St.useState)(Zn),[Si,Mr]=(0,St.useState)(""),[ur,Tr]=(0,St.useState)(0),[gr,ue]=(0,St.useState)(yn),[re,ee]=(0,St.useState)(!1),[je,xe]=(0,St.useState)(0),[An,ui]=(0,St.useState)(0),ti=(0,St.useRef)(),Bi=(0,St.useRef)(),mi=(0,St.useRef)(),oi=(0,St.useRef)();(0,St.useEffect)(()=>{const Tn=window.scrollY||window.pageYOffset;hr(Fn),We==null||We.setValue(Fn),window.scrollTo(0,Tn)},[Fn]),(0,St.useEffect)(()=>{bi==null||bi(xi)},[xi]),(0,St.useEffect)(()=>{if(ti.current){let Tn=function(In,on){var _i;if(Ni){on.preventDefault();return}const Qi=on.clipboardData;if(Qi){const nr=Qi.types.toString(),Gi=Qi.items;if(nr==="Files"||Qi.types.indexOf("Files")>-1){if(on.preventDefault(),Ln=="stex")return;try{let Fr=Gi[1];((_i=Gi[0])==null?void 0:_i.kind)==="file"&&(Fr=Gi[0]);const yr=Fr.getAsFile(),Zr=yr.name.split(".").pop();(0,ai.I)(yr,_r=>{var Wr,no,Oe;_r.id?((Wr=yr==null?void 0:yr.type)==null?void 0:Wr.indexOf("image"))>-1?qe.replaceSelection(`<img width="100%" src="/api/attachments/${_r.id}?type=${_r.content_type})" alt="" />`):((no=yr==null?void 0:yr.type)==null?void 0:no.indexOf("video"))>-1?qe.replaceSelection(`<video width="100%" controls src="/api/attachments/${_r.id}"></video>`):((Oe=yr==null?void 0:yr.type)==null?void 0:Oe.indexOf("pdf"))>-1?qe.replaceSelection(`<a href="/api/attachments/${_r.id}?type=${yr.type}&disposition=inline" target="_blank">${yr.name}</a>`):tr.includes(Zr)?qe.replaceSelection(`<a href="/api/attachments/${_r.id}?type=office&disposition=inline" target="_blank">${yr.name}</a>`):qe.replaceSelection(`[${yr.name}](/api/attachments/${_r.id}?type=${_r.content_type})`):(_r==null?void 0:_r.status)===401&&(document.location.href="/user/login")})}catch(Fr){On.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const qe=le().fromTextArea(ti.current,{mode:Ln,lineNumbers:!ji,lineWrapping:!0,value:an,autoCloseTags:!0,autoCloseBrackets:!0});return qe.on("keyup",function(In,on){on.keyCode===8&&(In.getValue()==""?qe.setOption("placeholder",fi):qe.setOption("placeholder",null))}),qe.on("keydown",function(In,on){if(on.keyCode===8){var _i=Ne(In);_i&&on.preventDefault()}}),Mi&&qe.focus(),qe.on("paste",Tn),li&&qe.on("beforeChange",function(In,on){(on.origin==="paste"||on.origin==="+input")&&on.cancel()}),Mn(qe),()=>{qe.off("paste",Tn)}}},[]);const Di=(0,St.useCallback)(()=>{if(Bi.current)try{}catch(Tn){console.log(Tn,"---- to set md editor body height")}},[gr,Bi,xi]);(0,St.useEffect)(()=>{function Tn(){let qe=new ve.Z(In=>{for(let on of In)(on.target.offsetHeight>0||on.target.offsetWidth>0)&&(Di(),We.setSize("100%","100%"),We.refresh())});return qe.observe(ti.current.parentElement),qe}if(We){const qe=Tn();return()=>{var In,on;(In=ti.current)!=null&&In.parentElement&&qe.unobserve((on=ti.current)==null?void 0:on.parentElement)}}},[We,Di]),(0,St.useEffect)(()=>{if(We){let Tn=[];for(const[qe,In]of Object.entries(Ui)){let on={[qe]:()=>{hn(In)}};Tn.push(on),We.addKeyMap(on)}return()=>{for(let qe of Tn)We.removeKeyMap(qe)}}},[We]),(0,St.useEffect)(()=>{Zn!==xi&&er(Zn)},[Zn]),(0,lr.Z)(()=>{if(!$n&&ur>0){let Tn=new Date().getTime(),qe=window.sessionStorage.getItem(Pe);Tn>=ur+Ir&&(!qe||qe!==$i)&&(window.sessionStorage.setItem(Pe,$i),ee(!0))}},Ir),(0,St.useEffect)(()=>{Te(or)},[We,or]),(0,St.useEffect)(()=>{We&&Mi&&We.focus()},[We,Mi]),(0,St.useEffect)(()=>{if(vr&&We){let Tn=function(In){let on=In.target;if(oi.current){let _i=on.scrollTop/on.scrollHeight;oi.current.scrollTop=oi.current.scrollHeight*_i}};const qe=We.getScrollerElement();return qe.addEventListener("scroll",Tn),()=>{qe.removeEventListener("scroll",Tn)}}},[We,vr]),(0,St.useEffect)(()=>{if(We&&Dn){let Tn=function(qe,In){Dn(qe,In)};return We.on("beforeChange",Tn),()=>{We.off("beforeChange",Tn)}}},[We,Dn]),(0,St.useEffect)(()=>{if(We&&Ye){let Tn=function(){Ye(We.getValue())};return We.on("blur",Tn),()=>{We.off("blur",Tn)}}},[We,Ye]);function Ne(Tn,qe){var In=Tn.getDoc(),on=In.getCursor(),_i=In.getLine(on.line),Qi=_i.charAt(on.ch-1),nr=_i.lastIndexOf("@\u2581@",on.ch),Gi=_i.lastIndexOf("@\u2581\u2581@",on.ch),Fr=nr>Gi?nr:Gi,yr=nr>Gi?3:4;if(Yi.indexOf(Qi)===-1)return null;if(console.log("change1:",qe,Tn,_i,on,Fr,nr,Gi,Qi),Fr>=0&&on.ch-Fr<5){var Zr=Fr+yr;return In.replaceRange("",{line:on.line,ch:Fr},{line:on.line,ch:Zr}),{line:on.line,ch:Zr}}return null}(0,St.useEffect)(()=>{if(We){let Tn=function(qe,In){const on=qe.getValue();hr(on),Tr(new Date().getTime()),qe.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),rn&&(De?rn(on,cn(on)):rn(on))};return We.on("change",Tn),()=>{We.off("change",Tn)}}},[We,rn]),(0,St.useEffect)(()=>{if(We)if(an==null)We.setValue(""),hr("");else{const Tn=window.scrollY||window.pageYOffset;an!==We.getValue()&&(We.setValue(an),hr(an),We.setCursor(li?1:We.lineCount(),0),window.scrollTo(0,Tn))}},[We,an]);const hn=(0,St.useCallback)(Tn=>{const qe=We.getCursor(),In=We.getSelection();let on=In.split(`
`);switch(Tn){case"bold":return We.replaceSelection("**"+In+"**"),In===""&&We.setCursor(qe.line,qe.ch+2),We.focus();case"italic":return We.replaceSelection("*"+In+"*"),In===""&&We.setCursor(qe.line,qe.ch+1),We.focus();case"code":return We.replaceSelection("`"+In+"`"),In===""&&We.setCursor(qe.line,qe.ch+1),We.focus();case"inline-latex":return Mr("inline-latex"),We.focus();case"latex":return We.replaceSelection("```latex\n"+In+"\n```"),We.setCursor(qe.line+1,In.length+1),We.focus();case"line-break":return We.replaceSelection(`<br/>
`),We.focus();case"list-ul":return In===""?We.replaceSelection("- "+In):We.replaceSelection(on.map(_i=>_i===""?"":`- ${_i}`).join(`
`)),We.focus();case"list-ol":return In===""?We.replaceSelection("1. "+In):We.replaceSelection(on.map((_i,Qi)=>_i===""?"":`${Qi+1}. ${_i}`).join(`
`)),We.focus();case"add-null-ch":return In===""&&We.setCursor(qe.line,qe.ch),We.replaceSelection(Or),We.focus();case"add-signal":return In===""&&We.setCursor(qe.line,qe.ch),We.replaceSelection(kr),We.focus();case"add-multiple":return In===""&&We.setCursor(qe.line,qe.ch),We.replaceSelection(Yi),We.focus();case"inster-template-1":return In===""&&We.setCursor(qe.line,qe.ch),We.replaceSelection(kt),We.focus();case"eraser":return We.setValue(""),We.focus();case"trigger-watch":return Te(!vr),We.focus();case"trigger-full-screen":return er(!xi),We.focus();case Vn:Mr(Vn);return;case qi:Mr(qi);return;case Ki:Mr(Ki);return;case yi:Mr(yi);return;case"maths-latex":Mr("maths-latex");return;case si:Mr(si);return;case ii:Mr(ii);return;default:throw new Error}},[We,vr,xi]),ke=(0,St.useCallback)((Tn,qe)=>{var In,on,_i,Qi,nr,Gi;switch(Mr(""),Si){case Vn:const{title:Wr,link:no}=Tn;return We.replaceSelection(`[${Wr}](${no})`),We.focus();case qi:const{language:Oe,content:Nr}=Tn;return We.replaceSelection(["```"+Oe,Nr,"```"].join(`
`)),We.focus();case"maths-latex":for(var Fr=atob(Tn),yr=new Uint8Array(Fr.length),Zr=0;Zr<Fr.length;Zr++)yr[Zr]=Fr.charCodeAt(Zr);var _r=new Blob([yr],{type:"image/png"});(0,ai.I)(_r,es=>{es.id?We.replaceSelection(`![,](/api/attachments/${es.id}?type=${es.content_type})`):(es==null?void 0:es.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":We.replaceSelection("`$$"+Tn+"$$`");break;case Ki:case yi:case Ei:const{src:Ur,alt:Sr}=Tn,Ar=qe,Jr=(_i=(on=(In=Ar==null?void 0:Ar.name)==null?void 0:In.split("."))==null?void 0:on.pop)==null?void 0:_i.call(on);return((Qi=Ar==null?void 0:Ar.type)==null?void 0:Qi.indexOf("image"))>-1||!(Ar!=null&&Ar.type)?Ar!=null&&Ar.align||Ar!=null&&Ar.width?We.replaceSelection(`<p style="text-align:${Ar.align||"initial"}"><img width="${Ar.width?Ar.width+"%":"initial"}" src="${Ur}" alt="${Sr||""}" /></p>`):We.replaceSelection(`<img width="100%" src="${Ur}" alt="${Sr||""}" />`):((nr=Ar==null?void 0:Ar.type)==null?void 0:nr.indexOf("video"))>-1?We.replaceSelection(`<video width="100%" controls src="${Ur}"></video>`):((Gi=Ar==null?void 0:Ar.type)==null?void 0:Gi.indexOf("pdf"))>-1?We.replaceSelection(`<a href="${Ur}?type=${Ar.type}&disposition=inline" target="_blank">${Ar.name}</a>`):tr.includes(Jr)?We.replaceSelection(`<a href="${Ur}?type=office&disposition=inline" target="_blank">${Ar.name}</a>`):We.replaceSelection(`[${Ar.name}](${Ur})`),We.focus();case ii:const{row:Ao,col:io,align:Dr}=Tn;let fo=`
`;for(let es=0;es<Ao;es++){let Zs=[],Ua=[];for(let us=0;us<io;us++)es===1&&Ua.push(Xi[Dr]),Zs.push(" ");es===1&&(fo+=`| ${Ua.join(" | ")} |
`),fo+=`| ${Zs.join(io===1?"":" | ")} |
`}return We.replaceSelection(fo+`
`),We.focus();default:throw new Error}},[We,Si]),Ot=(0,St.useMemo)(()=>{switch(Si){case Vn:return St.createElement(pn,{callback:ke,onCancel:vn});case qi:return St.createElement(Ai.Z,{callback:ke,onCancel:vn});case Ki:return St.createElement(ai.Z,{callback:ke,onCancel:vn});case si:return St.createElement(Ce,{callback:ke,onCancel:vn});case ii:return St.createElement(Xe,{callback:ke,onCancel:vn});case"maths-latex":return St.createElement(ei,{showSaveButton:!0,callback:ke});case"inline-latex":return St.createElement(kn.Z,{showSaveButton:!0,callback:ke});default:return null}},[Si]);function vn(){Mr("")}(0,St.useEffect)(()=>{if(mi.current){let Tn=function(nr){_i=!0,Qi=nr.pageY},qe=function(){_i=!1},In=function(nr){if(_i){let Gi=nr.pageY-Qi;Gi<0&&(Gi=0),Gi>300&&(Gi=300);let Fr=yn+Gi+"px";ue(Fr)}},on=mi.current,_i=!1,Qi=0;return on.addEventListener("mousedown",Tn),document.addEventListener("mousemove",In),document.addEventListener("mouseup",qe),()=>{on.removeEventListener("mousedown",Tn),document.removeEventListener("mousemove",In),document.removeEventListener("mouseup",qe)}}},[We,mi]),(0,St.useEffect)(()=>{ue(yn)},[yn]);const Jn=Fi(Ge),vi=Fi(gr),Ee={width:Jn,height:vi},Wn=(0,St.useMemo)(()=>{if(ur){let Tn=new Date(ur),qe=Tn.getHours(),In=Tn.getMinutes(),on=Tn.getSeconds();return qe=qe<10?"0"+qe:qe,In=In<10?"0"+In:In,on=on<10?"0"+on:on,`${qe}:${In}:${on}`}return 0},[ur]),cn=Tn=>{const qe=[];if(De){let In=-1;Tn=Tn.replace(/(@▁▁@|@▁@)/g,function(on,_i,Qi){qe.push({multiLine:on!==kr})})}return qe};function Un(){window.sessionStorage.removeItem(Pe),ee(!1),Tr(0)}function Rn(){ee(!1),Tr(0),We.setValue(window.sessionStorage.getItem(Pe))}(0,St.useEffect)(()=>{Ri[Si]&&Si!==yi&&Si!==si&&setTimeout(()=>{const Tn=document.getElementsByClassName("markdown-popup-form")[0],qe=window.innerWidth/2-Tn.offsetWidth/2,In=window.innerHeight/2-Tn.offsetHeight/2;xe(qe),ui(In)},0)},[Si]);const gn=Tn=>{Tn.preventDefault();const qe=Tn.clientX-je,In=Tn.clientY-An;document.body.onmousemove=on=>{let _i=on.clientX-qe,Qi=on.clientY-In;const nr=document.getElementsByClassName("markdown-popup-form")[0],Gi=window.innerWidth-nr.offsetWidth,Fr=window.innerHeight-nr.offsetHeight;_i=Math.max(0,Math.min(_i,Gi)),Qi=Math.max(0,Math.min(Qi,Fr)),Cn(on.clientX,on.clientY,qe,In)&&(xe(_i),ui(Qi))},document.body.onmouseup=function(){document.body.onmousemove=null}},Cn=(Tn,qe,In,on)=>{const _i=document.body.clientHeight,Qi=document.body.clientWidth;return Tn<20&&In>Tn||Tn>Qi-20&&In<Tn||qe<20&&on>qe||qe>_i-20&&on<qe?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return St.createElement(St.Fragment,null,St.createElement("div",{className:"markdown-editor-wrapper",ref:Bi},St.createElement("div",{className:`markdown-editor-container ${ki} ${vr?"on-preview":""} ${ji?"mini":""} ${xi?"full-screen":""}`,style:Ee},St.createElement(Rt,{insertTemp:ln,watch:vr,fullScreen:xi,showNullButton:se,showNullProgramButton:De,onActionCallback:hn,hidetoolBar:qn,extraUse:un}),St.createElement("div",{className:"markdown-editor-body"},St.createElement("div",{className:"codemirror-container"},St.createElement("textarea",{ref:ti,placeholder:fi})),vr?St.createElement("div",{ref:oi,className:"preview-container"},Ln==="stex"&&St.createElement(Xt,{value:$i}),Ln!=="stex"&&St.createElement(Ie.Z,{disabledFill:ci,showProgramFill:De,value:$i})):null))),sr?St.createElement("a",{ref:mi,className:"editor-resize"}):null,Si===yi&&St.createElement($e,{callback:ke,onCancel:vn}),Si===si&&St.createElement(Ce,{callback:ke,onCancel:vn}),St.createElement(Zt.Z,null,Ri[Si]&&Si!==yi&&Si!==si?St.createElement(sn.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:je,top:An},title:St.createElement("div",{style:{cursor:"move"},onMouseDown:gn},Ri[Si]),open:!0,onCancel:vn,footer:null,destroyOnClose:!0,width:Si===si?"1200px":null,height:Si===si?"80vh":null,className:"markdown-popup-form"},Ot):null))}},17077:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Ut},I:function(){return Zt}});var St=It(28284),Wt=It(6767),le=It(37568),ve=It(77736),de=It(71051),Ht=It(47889),ie=It(99571),oe=It(46699),he=It(59301),Gt=It(59301),Ie=Object.defineProperty,Xt=Object.defineProperties,Me=Object.getOwnPropertyDescriptors,Qt=Object.getOwnPropertySymbols,nt=Object.prototype.hasOwnProperty,et=Object.prototype.propertyIsEnumerable,At=(Yt,te,ye)=>te in Yt?Ie(Yt,te,{enumerable:!0,configurable:!0,writable:!0,value:ye}):Yt[te]=ye,at=(Yt,te)=>{for(var ye in te||(te={}))nt.call(te,ye)&&At(Yt,ye,te[ye]);if(Qt)for(var ye of Qt(te))et.call(te,ye)&&At(Yt,ye,te[ye]);return Yt},dt=(Yt,te)=>Xt(Yt,Me(te));const{useForm:gt}=St.default,xt={width:280,marginRight:10},bt={labelCol:{span:5},wrapperCol:{span:19}};var Ut=({callback:Yt,onCancel:te})=>{const[ye]=gt();let fe=(0,he.useRef)();function Ke(fn){fe.current.width=ye.getFieldValue("width"),fe.current.align=ye.getFieldValue("align"),Yt(fn,fe.current)}function _e(fn,xn){if(fn.status===-1){Wt.ZP.error(fn.message);return}ye.setFieldsValue({src:`/api/attachments/${fn.id}`,type:xn.type})}function nn(fn){let xn=fn.target.files[0];fe.current=xn,Zt(xn,_e)}return Gt.createElement(St.default,dt(at({form:ye},bt),{className:"upload-image-panel",onFinish:Ke,style:{width:470,overflow:"hidden"}}),Gt.createElement(St.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},Gt.createElement("div",{className:"flex-container"},Gt.createElement(St.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},Gt.createElement(le.default,{style:xt})),Gt.createElement(Rt,{onFileChange:nn}))),Gt.createElement(St.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},Gt.createElement(le.default,{style:{width:264}})),Gt.createElement(St.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},Gt.createElement(ve.Z,null,Gt.createElement(St.default.Item,{name:"width",style:{margin:0}},Gt.createElement(de.Z,{style:{width:264}})),Gt.createElement("span",{className:"ml8"},"%"))),Gt.createElement(St.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},Gt.createElement(Ht.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"}]})),Gt.createElement("aside",null,Gt.createElement(St.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},Gt.createElement(ie.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),Gt.createElement(ie.ZP,{type:"default",onClick:te},"\u53D6\u6D88"))))};function Rt({onFileChange:Yt}){return Gt.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",Gt.createElement("input",{type:"file",onChange:Yt}))}function Zt(Yt,te){if(!Yt)throw new String("\u6CA1\u6709\u6587\u4EF6");let ye=new FormData;ye.append("editormd-image-file",Yt),ye.append("file_param_name","editormd-image-file"),ye.append("byxhr","true");var fe=new window.XMLHttpRequest;fe.withCredentials=!0,fe.addEventListener("load",function(Ke){te(JSON.parse(Ke.target.responseText),Yt)},!1),fe.addEventListener("error",function(Ke){console.error(Ke)},!1),fe.open("POST",`${oe.KI}/api/attachments.json`),fe.send(ye)}},91558:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return le}});var St=It(59301),Wt=It(4676);class le extends St.Component{constructor(de){super(de);const Ht=window.document;this.node=Ht.createElement("div"),Ht.body.appendChild(this.node)}render(){const{children:de}=this.props;return(0,Wt.createPortal)(de,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},75975:function(Sn,Ve,It){"use strict";It.d(Ve,{SV:function(){return Le},ZP:function(){return $e}});var St=It(59301),Wt=It(76374);const le={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"]},ve={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"]},de={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(`
`)}]},Ht={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(`
`)}]},ie={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 oe=It(53184),he=It.n(oe),Gt=(tn,hi,ni)=>new Promise((zt,Ft)=>{var mt=Ct=>{try{Et(ni.next(Ct))}catch(_t){Ft(_t)}},vt=Ct=>{try{Et(ni.throw(Ct))}catch(_t){Ft(_t)}},Et=Ct=>Ct.done?zt(Ct.value):Promise.resolve(Ct.value).then(mt,vt);Et((ni=ni.apply(tn,hi)).next())});const Ie={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"]}},Xt=(tn,hi,ni,zt)=>{const Ft=hi.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:ni.lineNumber,endColumn:ni.column});return Array.from(new Set(Ft.match(/\b\w{2,}\b/g)||[])).map(vt=>({label:vt,kind:tn.languages.CompletionItemKind.Text,insertText:vt,range:zt}))},Me=(tn,hi,ni,zt)=>{tn.languages.registerCompletionItemProvider(hi,{provideCompletionItems(Ft,mt){const vt=Ft.getWordUntilPosition(mt),Et={startLineNumber:mt.lineNumber,endLineNumber:mt.lineNumber,startColumn:vt.startColumn,endColumn:vt.endColumn},Ct=Ft.getLineContent(mt.lineNumber).substring(vt.startColumn-2,vt.endColumn);return{suggestions:[...Xt(tn,Ft,mt,Et),...ni.map(Ce=>({label:Ce,kind:tn.languages.CompletionItemKind.Keyword,documentation:Ce,insertText:Ce,insertTextRules:tn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Et})),...zt.map(Ce=>({label:Ce.label,kind:tn.languages.CompletionItemKind.Snippet,documentation:Ce.content,insertText:Ct.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:tn.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Et}))]}}})};var Qt=tn=>{Ie.languages.forEach(hi=>{tn.languages.registerDocumentFormattingEditProvider(hi,{provideDocumentFormattingEdits(ni){return Gt(this,null,function*(){const zt=he()(ni.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:ni.getFullModelRange(),text:zt}]})}})}),Me(tn,"java",ve.keywords,ve.quickKey),Me(tn,"cpp",de.keywords,de.quickKey),Me(tn,"c",le.keywords,[]),Me(tn,"python",Ht.keywords,Ht.quickKey),Me(tn,"scala",ie.keywords,ie.quickKey)};const nt="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var et=Object.defineProperty,At=(tn,hi,ni)=>hi in tn?et(tn,hi,{enumerable:!0,configurable:!0,writable:!0,value:ni}):tn[hi]=ni,at=(tn,hi,ni)=>At(tn,typeof hi!="symbol"?hi+"":hi,ni);const dt=class Bw{constructor(hi,ni,zt){this.placeholder=hi,this.editor=ni,this.monaco=zt,ni.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Bw.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)}};at(dt,"ID","editor.widget.placeholderHint");var xt=dt,bt=It(96236),Ut=It(6767),Rt=It(25399),Zt=It(89392),Yt=It(49535),te=It(56102),ye=Object.defineProperty,fe=Object.defineProperties,Ke=Object.getOwnPropertyDescriptors,_e=Object.getOwnPropertySymbols,nn=Object.prototype.hasOwnProperty,fn=Object.prototype.propertyIsEnumerable,xn=(tn,hi,ni)=>hi in tn?ye(tn,hi,{enumerable:!0,configurable:!0,writable:!0,value:ni}):tn[hi]=ni,_n=(tn,hi)=>{for(var ni in hi||(hi={}))nn.call(hi,ni)&&xn(tn,ni,hi[ni]);if(_e)for(var ni of _e(hi))fn.call(hi,ni)&&xn(tn,ni,hi[ni]);return tn},Xn=(tn,hi)=>fe(tn,Ke(hi)),pe=(tn,hi)=>{var ni={};for(var zt in tn)nn.call(tn,zt)&&hi.indexOf(zt)<0&&(ni[zt]=tn[zt]);if(tn!=null&&_e)for(var zt of _e(tn))hi.indexOf(zt)<0&&fn.call(tn,zt)&&(ni[zt]=tn[zt]);return ni},ne=(tn,hi,ni)=>new Promise((zt,Ft)=>{var mt=Ct=>{try{Et(ni.next(Ct))}catch(_t){Ft(_t)}},vt=Ct=>{try{Et(ni.throw(Ct))}catch(_t){Ft(_t)}},Et=Ct=>Ct.done?zt(Ct.value):Promise.resolve(Ct.value).then(mt,vt);Et((ni=ni.apply(tn,hi)).next())});function pn(tn){return/^\d+$/.test(tn)?`${tn}px`:tn}function Ai(){}let ai=!1;const sn={"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 Qn(tn=[]){let hi=tn;if(Array.isArray(tn)){for(let ni=0;ni<tn.length;ni++){let zt=sn[tn[ni]];if(zt)return zt}return hi[0]}return sn[hi]||hi}let jn=null;const Ti=()=>ne(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(tn){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",tn)}});var $e=tn=>{var hi=tn,{width:ni="100%",height:zt="100%",value:Ft,language:mt="javascript",style:vt={},options:Et={},overrideServices:Ct={},theme:_t="vs-dark",onEditBlur:Ce,isCopy:Ze=!1,onSave:Bn,autoHeight:ze=!1,forbidCopy:Ue=!1,onChange:Xe=Ai,editorDidMount:dn=Ai,onFocus:Kn=Ai,onBreakPoint:mn=Ai,breakPointValue:be=[],filename:ei="educoder.txt",errorLine:kn,errorContent:On="",highlightLine:Vn,openBreakPoint:Ki=!1,placeholder:si="",showMiniMap:yi=!0}=hi,Ei=pe(hi,["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 qi=(0,St.useRef)(),ii=(0,St.useRef)({}),ar=(0,St.useRef)(),Xi=(0,St.useRef)(),lr=(0,St.useRef)([]),zi=(0,St.useRef)(!1),Kr=(0,St.useRef)(),Ir=(0,St.useRef)(),Or=(0,St.useRef)(!1),[Yi,kr]=(0,St.useState)(!1);function kt(){let ln;return qi.current&&(ln=new Wt.Z(Ln=>{for(let Pe of Ln)(Pe.target.offsetHeight>0||Pe.target.offsetWidth>0)&&ii.current.instance.layout()}),ln.observe(qi.current)),ln}function tr(){Ut.ZP.warning({content:decodeURIComponent(nt),key:"monaco-editor-tip"})}const Fi=()=>{let ln=ii.current.instance;if(Ft!=null&&ln&&Yi){const Ln=ln.getModel();Ln&&Ft!==Ln.getValue()&&(ai=!0,Ln.setValue(Ft),ln.layout(),ai=!1)}};(0,St.useEffect)(()=>{const ln=Yt.Z.subscribe("formatDocument",Ln=>{var Pe;let sr=ii.current.instance;(Pe=sr==null?void 0:sr.getAction)==null||Pe.call(sr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Ln=>{Xe(Ln)},ln},[]),(0,St.useEffect)(()=>{var ln;let Ln=ii.current.instance;Xi.current&&clearTimeout(Xi.current),Xi.current=setTimeout(()=>{Fi()},500),Ft&&(Ft!=null&&Ft.length)&&((ln=Ln==null?void 0:Ln.updateOptions)==null||ln.call(Ln,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ft.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ft,Yi,ii.current]),(0,St.useEffect)(()=>{if(kn&&ii.current&&ii.current.instance){let Ln=ii.current.instance;Ln.changeViewZones(function(Pe){var sr=document.createElement("div");sr.style.padding="10px 20px",sr.style.width="calc(100% - 20px)",sr.className="my-error-line-wrp",sr.innerHTML=On,Pe.addZone({afterLineNumber:kn||11,heightInLines:3,domNode:sr})});var ln={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Ln.addOverlayWidget(ln),Ln.revealPositionInCenter({lineNumber:20,column:1})}},[kn,ii.current,Yi]);const ri=(ln="",Ln)=>{if(!ln||ln.trim()==="")return!0;const sr=ii.current.instance.getModel().getLineTokens(Ln);let $n=!1;for(let se=0;se<2;se++)sr.getStandardTokenType(se)===1&&($n=!0);return $n};(0,St.useEffect)(()=>{var ln;const Ln=(ln=ii.current)==null?void 0:ln.instance;if(Ln&&Yi&&Ue){const Pe=Ln.onDidBlurEditorWidget(()=>{Or.current=!1}),sr=Ln.onDidFocusEditorText(()=>{Or.current=!0});return()=>{Pe.dispose(),sr.dispose()}}},[ii.current,Yi,Ue]),(0,St.useEffect)(()=>{var ln;if((ln=ii.current)!=null&&ln.instance&&Yi&&Ki){let Ln=ii.current.instance,Pe=Ln.getModel();if(!Pe)return;(()=>{var li;let ci=[],fi=[];const Fn=Pe.getAllDecorations();for(let We of Fn)We.options.className==="highlighted-line"&&(ci.push((li=We==null?void 0:We.range)==null?void 0:li.startLineNumber),fi.push(We==null?void 0:We.id));if(Vn===ci[0])return;Pe.deltaDecorations(fi,[]);const un=Pe.getLineCount();Vn&&Vn<=un&&(Ln.deltaDecorations([],[{range:new jn.Range(Vn,1,Vn,Pe.getLineMaxColumn(Vn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Ln.revealLineInCenter(Vn))})();const $n=(li=!1)=>{var ci;let fi=[],Fn=[];const un=Pe.getAllDecorations();for(let We of un)We.options.linesDecorationsClassName==="breakpoints-select"&&(fi.push((ci=We==null?void 0:We.range)==null?void 0:ci.startLineNumber),Fn.push(We==null?void 0:We.id));if(li)return{lines:fi,ids:Fn};mn(fi)},se=li=>ne(void 0,null,function*(){let ci={range:new jn.Range(li,1,li,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Pe.deltaDecorations([],[ci]),$n()}),De=li=>ne(void 0,null,function*(){let ci=[];const fi=Ln.getLineDecorations(li);for(let Fn of fi)Fn.options.linesDecorationsClassName==="breakpoints-select"&&ci.push(Fn.id);yield Pe.deltaDecorations(ci,[]),$n()}),qn=li=>{let ci=Ln.getLineDecorations(li);for(let fi of ci)if(fi.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Zt.isEqual)(be,$n(!0).lines)){Pe.deltaDecorations($n(!0).ids,[]);const li=be.map(ci=>({range:new jn.Range(ci,1,ci,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Pe.deltaDecorations([],li)}const Zn=Ln.onDidChangeModelContent(li=>{let ci=Ln.getPosition();if(ci){let fi=ci.lineNumber;clearTimeout(Ir.current),Ir.current=setTimeout(()=>{ri(Pe.getLineContent(fi),fi)?De(fi):qn(fi)?(De(fi),se(fi)):$n()},100)}}),Ye=Ln.onMouseDown(li=>{var ci,fi,Fn;if(li.target.detail&&((Fn=(fi=(ci=li.target)==null?void 0:ci.element)==null?void 0:fi.className)!=null&&Fn.includes("line-numbers"))){let un=li.target.position.lineNumber;if(ri(Pe.getLineContent(un),un))return;qn(un)?De(un):se(un)}}),Dn=li=>{let ci={range:new jn.Range(li,1,li,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};lr.current=Ln.deltaDecorations(lr.current,[ci])},bi=()=>{lr.current=Ln.deltaDecorations(lr.current,[])},ki=Ln.onMouseMove(li=>{var ci,fi,Fn;if(bi(),li.target.detail&&((Fn=(fi=(ci=li.target)==null?void 0:ci.element)==null?void 0:fi.className)!=null&&Fn.includes("line-numbers"))){let un=li.target.position.lineNumber;if(ri(Pe.getLineContent(un),un))return;Dn(un)}}),Ni=Ln.onMouseLeave(()=>{bi()});return()=>{Zn.dispose(),Ye.dispose(),ki.dispose(),Ni.dispose()}}},[ii.current,Yi,be,Vn,Ki,mt]),(0,St.useEffect)(()=>{var ln;(ln=ii.current)!=null&&ln.instance&&Ki&&ii.current.instance.setPosition({lineNumber:0,column:0})},[Vn]);function Li(){let ln=ii.current.instance;if(ln){const Ln=ln.getSelection(),Pe=ii.current.pastePos||{},sr=new jn.Range(Pe.startLineNumber||Ln.endLineNumber,Pe.startColumn||Ln.endColumn,Pe.endLineNumber||Ln.endLineNumber,Pe.endColumn||Ln.endColumn);setTimeout(()=>{ln.executeEdits("",[{range:sr,text:""}])},300)}}function Ui(ln){(window.navigator.platform.match("Mac")?ln.metaKey:ln.ctrlKey)&&ln.keyCode==83&&(ln.preventDefault(),Bn())}const Ri=()=>{if(ze&&ii.current.instance){const ln=ii.current.instance.getContentHeight();Mi(ln<zt?zt:ln)}else Mi(zt)};function Lr(ln){var Ln=document.createEvent("MouseEvents");Ln.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ln.dispatchEvent(Ln)}const an=ln=>{if(!Or.current)return;const{keyCode:Ln,ctrlKey:Pe,metaKey:sr,target:$n,type:se}=ln;return(se==="paste"||(Ln===67||Ln===86)&&(sr||Pe))&&$n.nodeName==="TEXTAREA"&&(tr(),ln.preventDefault()),!1};function rn(ln,Ln){var Pe=window.URL||window.webkitURL||window,sr=new Blob([Ln]),$n=document.createElementNS("http://www.w3.org/1999/xhtml","a");$n.href=Pe.createObjectURL(sr),$n.download=ln,Lr($n)}(0,St.useEffect)(()=>{Ri()},[Ri]),(0,St.useEffect)(()=>{qi.current&&!Yi&&Promise.all([It.e(8909),It.e(6656)]).then(It.bind(It,71448)).then(ln=>{try{jn=ln,ii.current.instance=jn.editor.create(qi.current,{value:Ft,language:Qn(mt),theme:_t,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:yi||!1}},Ct);const Ln=ii.current.instance;let $n=[...bt.BH._menuItems].find(Zn=>Zn[0]._debugName=="EditorContext")[1],se=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],De=(Zn,Ye)=>{var Dn,bi;let ki=Zn._first;do Ye.includes((bi=(Dn=ki.element)==null?void 0:Dn.command)==null?void 0:bi.id)&&Zn._remove(ki);while(ki=ki.next)};if(dn(Ln,jn),setTimeout(()=>{Ri(),ii.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{rn(ei||"educoder.txt",Ln.getValue())}})},500),ii.current.subscription=Ln.onDidChangeModelContent(Zn=>{zi.current?clearTimeout(Kr.current):(Ri(),Xe(Ln.getValue(),Zn)),Kr.current=setTimeout(()=>{zi.current=!1},500)}),window.Monaco||Qt(jn,Qn(mt)),Ue&&(De($n,se),qi.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",an),window.removeEventListener("paste",an),window.addEventListener("keydown",an),window.addEventListener("paste",an)),window.Monaco=jn,Ce&&Ln.onDidBlurEditorWidget(()=>{Ce(Ln.getValue())}),Kn&&Ln.onDidFocusEditorText(()=>{Ue&&Ti(),Kn(Ln.getValue())}),Ue){Ti();try{Ln.onDidPaste(Zn=>{const Ye=Ln.getSelection(),Dn=ii.current.pastePos||{},bi=new jn.Range(Dn.startLineNumber||Ye.endLineNumber,Dn.startColumn||Ye.endColumn,Dn.endLineNumber||Ye.endLineNumber,Dn.endColumn||Ye.endColumn);Ln.executeEdits("",[{range:Zn.range,text:""}])})}catch(Zn){}}let qn=kt();return si&&typeof si=="string"&&new xt(si,Ln,jn),kr(!0),()=>{const Zn=ii.current.instance;Zn.dispose();const Ye=Zn.getModel();Ye&&Ye.dispose(),ii.current.subscription&&ii.current.subscription.dispose(),qn.unobserve(qi.current)}}catch(Ln){}})},[]),(0,St.useEffect)(()=>{if(ii.current.instance&&Yi)return document.addEventListener("keydown",Ui,!1),()=>{document.removeEventListener("keydown",Ui)}},[Bn,Yi]),(0,St.useEffect)(()=>{let ln=ii.current.instance;if(ln&&Yi){let Ln=Qn(mt);jn.editor.setModelLanguage(ln.getModel(),Ln)}},[mt,Yi]),(0,St.useEffect)(()=>{ii.current.instance&&Yi&&jn.editor.setTheme(_t)},[_t,Yi]),(0,St.useEffect)(()=>{let ln=ii.current.instance;ar.current=Et,ln&&Yi&&(ln.updateOptions(_n({},Et)),setTimeout(()=>{ln.getModel().updateOptions(_n({},Et))},200))},[JSON.stringify(Et),Yi]),(0,St.useEffect)(()=>{let ln=ii.current.instance;ln&&Yi&&ln.layout()},[ni,zt,Yi]);const[Ge,yn]=(0,St.useState)(pn(ni)),[ji,Mi]=(0,St.useState)(pn(zt)),or=Xn(_n({},vt),{width:Ge,height:ji,position:"relative"});return St.createElement("div",{className:"my-monaco-editor",ref:qi,style:or},Ze&&St.createElement(te.CopyToClipboard,{text:Ft,onCopy:()=>Ut.ZP.success("\u590D\u5236\u6210\u529F")},St.createElement(Rt.Z,{title:"\u590D\u5236\u4EE3\u7801"},St.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},St.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Le({width:tn="100%",height:hi="100%",original:ni,modified:zt,language:Ft,options:mt={}}){const vt=(0,St.useRef)(),[Et,Ct]=(0,St.useState)(null);function _t(ze){let Ue;return vt.current&&(Ue=new Wt.Z(Xe=>{for(let dn of Xe)(dn.target.offsetHeight>0||dn.target.offsetWidth>0)&&ze.layout()}),Ue.observe(vt.current)),Ue}(0,St.useEffect)(()=>(vt.current&&Promise.all([It.e(8909),It.e(9404)]).then(It.bind(It,2550)).then(ze=>{jn=ze;const Ue=jn.editor.createDiffEditor(vt.current,Xn(_n({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},mt),{wordWrap:!0}));Ct(Ue);let Xe=_t(Ue);return()=>{Ue.dispose();const dn=Ue.getModel();dn&&dn.dispose(),Xe.unobserve(vt.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,St.useEffect)(()=>{Et&&Et.setModel({original:jn.editor.createModel(ni,Ft),modified:jn.editor.createModel(zt,Ft)})},[ni,zt,Ft,Et]);const Ce=pn(tn),Ze=pn(hi),Bn={width:Ce,height:Ze};return St.createElement("div",{className:"my-diff-editor",ref:vt,style:Bn})}},10661:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Xt}});var St={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf",wrapisCurrent:"wrapisCurrent___qIfQT"},Wt=It(29787),le=It(25399),ve=It(60242),de=It(92310),Ht=It.n(de),ie=It(51257),oe=It(28426),he=It(48790),Gt=It(59301),Xt=({className:Me,dataSource:Qt=[],col:nt=4,right:et,bottom:At=23,precision:at=0,wrapWidth:dt=1200,trackEventItems:gt,loading:xt,onRemove:bt=()=>{},isCurrent:Ut=!0,showProgress:Rt=!1,showAlias:Zt=!1})=>{const Yt=Math.floor((dt-(nt-1)*et)/nt),te=[{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 Gt.createElement(Wt.Z,{spinning:xt},Gt.createElement("div",{className:Ht()(St.list,Me)},!!(Qt!=null&&Qt.length)&&(Qt==null?void 0:Qt.map((ye,fe)=>{var Ke,_e,nn,fn,xn,_n;const{name:Xn,id:pe,identifier:ne,featured:pn,school_name:Ai,image_url:ai,excellent:sn,is_plan:Qn}=ye;return Gt.createElement("div",{key:pe,className:Ut&&Rt?St.wrapisCurrent:St.wrap,style:{width:Yt,marginRight:(1+fe)%nt===0?0:et+at,marginBottom:At}},Gt.createElement("a",{className:St.li,onClick:jn=>{jn.preventDefault(),jn.stopPropagation(),gt&&(0,ie.L9)([gt]),(0,ie.xg)(`/paths/${ne}`)}},Gt.createElement("div",{className:St.img},Gt.createElement("img",{className:St.cover,src:`${ai}`}),Ut&&(0,he.bg)()&&(ye==null?void 0:ye.studying)&&Gt.createElement("div",{className:`${St.movebq} user-path-items`,onClick:jn=>{jn.stopPropagation(),bt(ye)}},Gt.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),Gt.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ke=ye==null?void 0:ye.subject_tags)==null?void 0:Ke.map((jn,Ti)=>{var $e,Le;if(Ti===0){const hi=($e=te.find(ni=>ni.name==jn))==null?void 0:$e.swimg;return Gt.createElement("img",{className:St.sign,src:hi,style:{left:"-4px"}})}const tn=(Le=te.find(hi=>hi.name==jn))==null?void 0:Le.ptimg;return Gt.createElement("img",{className:St.sign,src:tn,style:{left:`${48+52*(Ti-1)+2*Ti}px`}})}),Gt.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(ye==null?void 0:ye.excellent)&&Gt.createElement("div",{className:St.bq},"\u5F00\u653E\u8BFE\u7A0B"))),Gt.createElement("div",{className:St.name},Gt.createElement(le.Z,{title:Zt&&(ye!=null&&ye.excellent_alias_name)?Gt.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Xn}`,Gt.createElement("br",null),Gt.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${ye==null?void 0:ye.excellent_alias_name}`)):Xn},Gt.createElement("span",{className:St.e},Zt&&(ye==null?void 0:ye.excellent_alias_name)||Xn))),Ut&&Rt&&((_e=ye==null?void 0:ye.progress)==null?void 0:_e.all_score)!=0&&Gt.createElement("div",{style:{padding:"0px 10px",color:"#333",marginTop:10}},Gt.createElement(ve.Z,{strokeColor:"#44d7b6",gap:"small",percent:(((nn=ye==null?void 0:ye.progress)==null?void 0:nn.my_score)/((fn=ye==null?void 0:ye.progress)==null?void 0:fn.all_score)*100).toFixed(),showInfo:!1}),"\u5DF2\u5B8C\u6210 ",(xn=ye==null?void 0:ye.progress)==null?void 0:xn.my_score,"/",(_n=ye==null?void 0:ye.progress)==null?void 0:_n.all_score),(!Ut||!Rt)&&Gt.createElement(le.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${Ai}`},Gt.createElement("div",{className:St.unit},Gt.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),Ai)),(!Ut||!Rt)&&Gt.createElement("div",{className:St.tags},Gt.createElement("div",null,Gt.createElement(le.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},Gt.createElement("span",null,Gt.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),Gt.createElement("span",null,ye.stages_count))),Gt.createElement(le.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},Gt.createElement("span",null,Gt.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),Gt.createElement("span",null,ye.members_count)))))))})),!Qt.length&&Gt.createElement(oe.Z,null)))}},9148:function(Sn,Ve,It){"use strict";It.d(Ve,{jL:function(){return de},w9:function(){return pn},QD:function(){return kn},cQ:function(){return xn.Z},op:function(){return Xe},O5:function(){return Fi},_b:function(){return Ei},t7:function(){return at},Gi:function(){return Ti},YG:function(){return Qn},qp:function(){return Ie},vr:function(){return Ki},qE:function(){return mn},Je:function(){return xt},wb:function(){return fn},cq:function(){return zt},tp:function(){return Qt}});var St=It(59301),Wt={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"},le="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==",de=({dataSource:ri=[],img:Li,imgWidth:Ui=346,title:Ri,sunTitle:Lr,bannerExtraContent:an})=>St.createElement("div",{className:Wt.banner},St.createElement("div",{className:Wt.content},St.createElement("aside",null,St.createElement("p",null,St.createElement("b",null,Ri),St.createElement("span",null,Lr)),ri.length>0&&St.createElement("div",{className:Wt.btns},ri.map((rn,Ge)=>St.createElement("div",{key:Ge,onClick:rn.click},rn.name,rn.sign?St.createElement("img",{src:le,width:39}):null))),an),Li&&St.createElement("img",{style:{marginTop:33,marginRight:38},src:Li,width:Ui}))),Ht={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"},ie=It(92310),oe=It.n(ie),he=It(89392),Ie=({dataSource:ri=[],value:Li,onChange:Ui,onTitleChange:Ri,className:Lr,title:an,titleWidth:rn=41,style:Ge={},fontColor:yn="#6A7283",showCount:ji})=>{const[Mi,or]=(0,St.useState)(0),[ln,Ln]=(0,St.useState)(!1),Pe=(0,St.useRef)(null),sr=(0,St.useRef)(null);return(0,St.useEffect)(()=>{var $n;ri.length!==0&&((($n=Pe==null?void 0:Pe.current)==null?void 0:$n.clientHeight)>97?or(1):or(0)),ri.length===0&&or(0),Ln(!1)},[ri]),St.createElement("div",{className:oe()(Ht.row,Lr),style:Ge},St.createElement("div",{onClick:(0,he.throttle)(()=>Ri==null?void 0:Ri(),2e3),style:{width:rn,marginTop:ln?12:4},className:`${Ht.title} ${Ri?"current":""}`},an),St.createElement("div",{className:ln?`${Ht.tagsWrap} ${Ht.tagsBorderWrap}`:Ht.tagsWrap},St.createElement("div",{className:Ht.bar,ref:sr,style:Mi>0?{height:Mi===1?97:"auto",overflow:Mi===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},St.createElement("div",{className:Ht.tag,ref:Pe},ri==null?void 0:ri.map($n=>St.createElement("span",{onClick:()=>Ui($n.id),key:$n.id,style:{color:yn},className:Li===$n.id?Ht.active:""},St.createElement("span",{title:$n.name,className:Ht.name},$n.name),!!ji&&St.createElement("span",{className:Ht.num},$n.count))))),!!Mi&&St.createElement(St.Fragment,null,Mi===1?St.createElement("div",{onClick:()=>{var $n;or(2),(($n=Pe==null?void 0:Pe.current)==null?void 0:$n.clientHeight)>245?Ln(!0):Ln(!1)},className:Ht.action},"\u5C55\u5F00",St.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):St.createElement("div",{onClick:()=>{sr.current.scrollTop=0,or(1),Ln(!1)},className:Ht.action},"\u6536\u8D77",St.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},Xt={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"},Qt=({dataSource:ri=[],value:Li,onChange:Ui,className:Ri,style:Lr={}})=>St.createElement("div",{style:Lr,className:oe()(Xt.tabs,Ri)},ri.map(an=>St.createElement("span",{onClick:()=>Ui(an.id),className:Li===an.id?Xt.active:"",key:an.id},an.name))),nt={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"},et=It(37568),at=({dataSource:ri=[],value:Li="",onChange:Ui,onInputChange:Ri=()=>{},className:Lr,style:an={},placeholder:rn,allowClear:Ge=!1})=>{var yn;const[ji,Mi]=(0,St.useState)(""),[or,ln]=(0,St.useState)("");(0,St.useEffect)(()=>{var sr;let $n=Li;(sr=JSON.stringify(Li))!=null&&sr.includes("{")&&(Mi(Li.id),$n=Li.value||"");try{ln(decodeURIComponent($n||""))}catch(se){ln(decodeURIComponent($n||""))}},[Li]);const Ln=()=>{Ui(encodeURIComponent(or),ji||null)},Pe=sr=>{sr!==ji&&(Mi(sr),Ui(encodeURIComponent(or),sr))};return St.createElement("div",{className:oe()(nt.input,Lr),style:an},!!ri.length&&St.createElement("div",{className:nt.dropdown},St.createElement("div",{className:nt.text},(yn=ri.find(sr=>sr.id===ji))==null?void 0:yn.name,St.createElement("i",{className:"iconfont icon-zhankai4"}),St.createElement("b",{className:nt.b1}),St.createElement("b",{className:nt.b2})),St.createElement("div",{className:nt.menu},ri.map((sr,$n)=>St.createElement("div",{key:$n,onClick:()=>Pe(sr.id)},sr.name)))),St.createElement(et.default,{onPressEnter:Ln,value:or,onChange:sr=>{ln(sr.target.value),Ri(encodeURIComponent(sr.target.value),ji||null)},bordered:!1,placeholder:rn}),St.createElement("i",{onClick:Ln,className:"iconfont icon-sousuo9 font14 pl10 current"}))},dt={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"},xt=({value:ri,onChange:Li,className:Ui,total:Ri,pageSize:Lr,style:an={}})=>{const rn=ri<2,Ge=ri>=Math.ceil(Ri/Lr);return Ri<=Lr?St.createElement(St.Fragment,null):St.createElement("div",{className:oe()(dt.quickPager,Ui),style:an},St.createElement("div",{onClick:()=>{rn||Li(ri-1,"prev")},className:rn?dt.disabled:""},"\u4E0A\u4E00\u9875"),St.createElement("div",{onClick:()=>{Ge||Li(ri+1,"next")},className:Ge?dt.disabled:""},"\u4E0B\u4E00\u9875"))},bt={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"},Ut=It(29787),Rt=It(25399),Zt=It(58018),Yt=It(346),te=It(51257),ye=It(96908),fe=It(57177),Ke=It(81378),_e=It(28426),fn=({className:ri,dataSource:Li=[],col:Ui=4,right:Ri,bottom:Lr=23,precision:an=0,wrapWidth:rn=1200,trackEventItems:Ge,loading:yn})=>{const ji=Math.floor((rn-(Ui-1)*Ri)/Ui);return St.createElement(Ut.Z,{spinning:yn},St.createElement("div",{className:oe()(bt.list,ri)},!!Li.length&&Li.map((Mi,or)=>{const{name:ln,id:Ln,identifier:Pe,power:sr,cover_image_id:$n,pic:se}=Mi;return St.createElement("div",{className:bt.wrap,key:Ln,style:{width:ji,marginRight:(1+or)%Ui===0?0:Ri+an,marginBottom:Lr}},St.createElement("a",{target:"_blank",href:`/shixuns/${Pe}/challenges`,className:bt.li,onClick:De=>{De.preventDefault(),Ge&&(0,te.L9)([Ge]),sr&&(0,te.xg)(`/shixuns/${Pe}/challenges`)}},St.createElement("div",{className:bt.img},St.createElement("img",{className:bt.cover,src:`${se}`}),Mi.is_jupyter&&St.createElement("img",{className:bt.sign,src:ye}),Mi.is_jupyter_lab&&St.createElement("img",{className:bt.sign,src:fe}),Mi.is_unity_3d&&St.createElement("img",{className:bt.sign,src:Ke})),St.createElement("div",{className:bt.name},St.createElement(Rt.Z,{title:ln||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},St.createElement("span",{className:bt.e},ln||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),St.createElement("div",{className:bt.tags},St.createElement(Rt.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),St.createElement("span",null,Mi.challenges_count))),!!Mi.myshixuns_count&&St.createElement(Rt.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},St.createElement("span",null,St.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),St.createElement("span",null,Mi.myshixuns_count))),St.createElement(Rt.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},St.createElement("span",null,St.createElement("span",null,Mi.level))),St.createElement("div",{className:bt.rate},St.createElement(Zt.Z,{allowHalf:!0,disabled:!0,defaultValue:Mi.score_info}),St.createElement("span",null,"\xA0",Mi.score_info?`${Mi.score_info}\u5206`:"5\u5206")))),!sr&&St.createElement("div",{className:bt.lockWrap},St.createElement("img",{src:`${Yt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),St.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Li.length&&St.createElement(_e.Z,null)))},xn=It(10661),_n={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"},Xn="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",pe=It(59301),pn=({className:ri,dataSource:Li=[],col:Ui=4,right:Ri,bottom:Lr=23,precision:an=0,wrapWidth:rn=1200,trackEventItems:Ge,loading:yn,handleVery:ji=()=>!0})=>{const Mi=Math.floor((rn-(Ui-1)*Ri)/Ui);return pe.createElement(Ut.Z,{spinning:yn},pe.createElement("div",{className:oe()(_n.list,ri)},!!Li.length&&Li.map((or,ln)=>{const{subject_identifier:Ln,id:Pe,identifier:sr,power:$n}=or,se=or.is_public!=0&&or.is_public;return pe.createElement("div",{className:_n.wrap,key:Pe,style:{width:Mi,marginRight:(1+ln)%Ui===0?0:Ri+an,marginBottom:Lr}},pe.createElement("a",{className:_n.li,onClick:De=>{De.preventDefault(),ji(or==null?void 0:or.first_category_url)&&(Ge&&(0,te.L9)([Ge]),(0,te.xg)(or.first_category_url))}},pe.createElement("div",{className:_n.top},pe.createElement(Rt.Z,{title:or.name},pe.createElement("div",{className:_n.name},or.name)),pe.createElement("img",{className:_n.img,src:Yt.Z.IMG_SERVER+"/images/"+or.avatar_url}),pe.createElement("div",{className:_n.text,title:or.creator},or.creator),Ln&&pe.createElement("div",{className:_n.btns},pe.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),pe.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),se&&pe.createElement("div",{className:_n.sign},"\u516C\u5F00")),pe.createElement("div",{className:_n.bottom},or.visits>0&&pe.createElement(Rt.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},pe.createElement("span",null,pe.createElement("i",{className:"iconfont icon-liulanyan"}),pe.createElement("span",null,or.visits))),or.course_members_count>0&&pe.createElement(Rt.Z,{title:"\u6210\u5458",placement:"bottom"},pe.createElement("span",null,pe.createElement("i",{className:"iconfont icon-chengyuan"}),or.course_members_count)),or.tasks_count>0&&pe.createElement(Rt.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},pe.createElement("span",null,pe.createElement("i",{className:"iconfont icon-zuoye"}),or.tasks_count)),or.is_end?pe.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):pe.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!or.is_accessible&&pe.createElement("div",{className:_n.lockWrap},pe.createElement("img",{src:`${Yt.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),pe.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Li.length&&pe.createElement(_e.Z,null)))},Ai={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},ai=It(25690),Qn=({dataSource:ri=[],value:Li,onChange:Ui,className:Ri,style:Lr={},tabBarExtraContent:an})=>St.createElement("div",{className:oe()(Ai.tabs,Ri),style:Lr},St.createElement("div",{className:Ai.tabsWrap},ri.map((rn,Ge)=>!(rn!=null&&rn.hide)&&St.createElement("aside",{className:Ai.tab,onClick:()=>{Ui(rn.id),rn.link&&ai.history.push(rn.link)},key:Ge},St.createElement("div",{className:Li===rn.id?Ai.active:""},rn.name),(rn==null?void 0:rn.resetCount)==null&&(rn==null?void 0:rn.total)!==void 0&&St.createElement("span",null,"\uFF08",rn==null?void 0:rn.total,"\uFF09"),(rn==null?void 0:rn.resetCount)!==void 0&&(rn==null?void 0:rn.total)!==void 0&&St.createElement(Rt.Z,{title:(rn==null?void 0:rn.tip)!=null?rn==null?void 0:rn.tip:""},St.createElement("span",{style:{color:"#9096A3"}},"\uFF08",St.createElement("span",{style:{color:"#000"}},rn==null?void 0:rn.resetCount),"/",St.createElement("span",null,rn==null?void 0:rn.total),"\uFF09"))))),St.createElement("div",{className:Ai.tabBar},an)),Ti=({className:ri,style:Li={},children:Ui})=>St.createElement("div",{className:oe()(ri),style:Li},Ui),$e={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"},Le=It(75727),tn=It(93041);const hi=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var zt=({sortValue:ri,dropValue:Li,className:Ui,onSort:Ri,onDrop:Lr,dataSource:an=hi})=>{var rn;return St.createElement("div",{className:oe()($e.orderWrap,Ui)},St.createElement(Le.Z,{dropdownRender:()=>St.createElement(tn.default,null,an.map((Ge,yn)=>St.createElement(tn.default.Item,{key:yn,onClick:()=>Lr(Ge.id)},Ge.name)))},St.createElement("span",{className:$e.orderTextWrap},(rn=an.find(Ge=>Li===Ge.id))==null?void 0:rn.name)),St.createElement("span",{className:$e.orderIconWrap},St.createElement("span",{className:$e.orderAsc},St.createElement("i",{className:ri==="asc"?`iconfont icon-sanjiaoxing-up font12 ${$e.cursorPointer} ${$e.active}`:`iconfont icon-sanjiaoxing-up font12 ${$e.cursorPointer}`,onClick:()=>Ri(ri==="asc"?"desc":"asc")})),St.createElement("span",{className:$e.orderDesc},St.createElement("i",{className:ri==="desc"?`iconfont icon-sanjiaoxing-down font12 ${$e.cursorPointer} ${$e.active}`:`iconfont icon-sanjiaoxing-down font12 ${$e.cursorPointer}`,onClick:()=>Ri(ri==="asc"?"desc":"asc")}))))},Ft={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"},mt=It(99571),vt=Object.defineProperty,Et=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,Ce=(ri,Li,Ui)=>Li in ri?vt(ri,Li,{enumerable:!0,configurable:!0,writable:!0,value:Ui}):ri[Li]=Ui,Ze=(ri,Li)=>{for(var Ui in Li||(Li={}))Ct.call(Li,Ui)&&Ce(ri,Ui,Li[Ui]);if(Et)for(var Ui of Et(Li))_t.call(Li,Ui)&&Ce(ri,Ui,Li[Ui]);return ri},Bn=(ri,Li)=>{var Ui={};for(var Ri in ri)Ct.call(ri,Ri)&&Li.indexOf(Ri)<0&&(Ui[Ri]=ri[Ri]);if(ri!=null&&Et)for(var Ri of Et(ri))Li.indexOf(Ri)<0&&_t.call(ri,Ri)&&(Ui[Ri]=ri[Ri]);return Ui},ze=(ri,Li,Ui)=>new Promise((Ri,Lr)=>{var an=yn=>{try{Ge(Ui.next(yn))}catch(ji){Lr(ji)}},rn=yn=>{try{Ge(Ui.throw(yn))}catch(ji){Lr(ji)}},Ge=yn=>yn.done?Ri(yn.value):Promise.resolve(yn.value).then(an,rn);Ge((Ui=Ui.apply(ri,Li)).next())}),Xe=ri=>{var Li=ri,{className:Ui,style:Ri,children:Lr,loading:an=!1,openLoading:rn,onClick:Ge=()=>{},size:yn="middle",shape:ji="round"}=Li,Mi=Bn(Li,["className","style","children","loading","openLoading","onClick","size","shape"]);const[or,ln]=(0,St.useState)(!1);return St.createElement(mt.ZP,Ze({onClick:(0,he.throttle)(Ln=>ze(void 0,null,function*(){rn&&ln(!0);try{yield Ge(Ln)}catch(Pe){console.log("error",Pe)}rn&&ln(!1)}),2e3,{leading:!0,trailing:!1}),className:oe()(Ft.btn,Ft[`${yn}-${ji}`],Ui),style:Ri,size:yn,shape:ji,loading:or||an},Mi),Lr)},dn={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},mn=({className:ri,style:Li,children:Ui=null,onClick:Ri,title:Lr})=>St.createElement("div",{className:oe()(dn.head,ri),style:Li},St.createElement("span",{className:"primary-hover",onClick:Ri},St.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),St.createElement("b",{title:Lr},Lr),St.createElement("div",{className:dn.node},Ui)),be={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"},kn=({confirmShow:ri=!0,confirmTitle:Li,confirmClick:Ui,cancelShow:Ri=!0,cancelTitle:Lr,cancelClick:an,className:rn,style:Ge,confirmLoading:yn=!1})=>St.createElement("div",{className:oe()(be.btns,rn),style:Ge},ri&&St.createElement(mt.ZP,{loading:yn,onClick:Ui,type:"primary",className:be.confirm},Li),Ri&&St.createElement(mt.ZP,{onClick:an,className:be.cancel},Lr)),On={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"},Ki=({className:ri,style:Li={},LeftContent:Ui,children:Ri,RightContent:Lr})=>St.createElement("div",{className:oe()(On.fixedBottom,ri),style:Li},St.createElement("div",{className:On.wrap},St.createElement("div",{className:On.left},Ui),St.createElement("div",{className:On.center},Ri),St.createElement("div",{className:On.right},Lr))),si={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"},Ei=({className:ri,style:Li={},dataSource:Ui=[]})=>St.createElement("div",{className:oe()(si.crumbs,ri),style:Li},Ui.map((Ri,Lr)=>Lr<Ui.length-1?St.createElement(St.Fragment,{key:Lr},Ri.path||Ri.onClick?St.createElement("span",{className:si.hover,onClick:Ri!=null&&Ri.onClick?Ri.onClick:()=>ai.history.push(Ri.path)},Ri.name):St.createElement("span",null,Ri.name),St.createElement("span",null,"\xA0",">","\xA0")):St.createElement("span",{key:Lr,style:{color:"#5F6368"}},Ri.name))),qi=It(11938),ii=Object.defineProperty,ar=Object.defineProperties,Xi=Object.getOwnPropertyDescriptors,lr=Object.getOwnPropertySymbols,zi=Object.prototype.hasOwnProperty,Kr=Object.prototype.propertyIsEnumerable,Ir=(ri,Li,Ui)=>Li in ri?ii(ri,Li,{enumerable:!0,configurable:!0,writable:!0,value:Ui}):ri[Li]=Ui,Or=(ri,Li)=>{for(var Ui in Li||(Li={}))zi.call(Li,Ui)&&Ir(ri,Ui,Li[Ui]);if(lr)for(var Ui of lr(Li))Kr.call(Li,Ui)&&Ir(ri,Ui,Li[Ui]);return ri},Yi=(ri,Li)=>ar(ri,Xi(Li)),kr=(ri,Li)=>{var Ui={};for(var Ri in ri)zi.call(ri,Ri)&&Li.indexOf(Ri)<0&&(Ui[Ri]=ri[Ri]);if(ri!=null&&lr)for(var Ri of lr(ri))Li.indexOf(Ri)<0&&Kr.call(ri,Ri)&&(Ui[Ri]=ri[Ri]);return Ui};const{Countdown:kt}=qi.default;var Fi=ri=>{var Li=ri,{onChange:Ui}=Li,Ri=kr(Li,["onChange"]);const[Lr,an]=(0,St.useState)(null);(0,St.useEffect)(()=>{typeof Lr=="number"&&Lr>=0&&Ui(Lr)},[Lr]);const rn=Ge=>{const yn=Math.floor(Ge/1e3);an(yn)};return St.createElement(kt,Yi(Or({},Ri),{onChange:rn}))}},37808:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Wt}});var St=It(59301);function Wt(le,ve){const de=(0,St.useRef)();(0,St.useEffect)(()=>{de.current=le}),(0,St.useEffect)(()=>{function Ht(){de.current()}if(ve!==null){let ie=setInterval(Ht,ve);return()=>clearInterval(ie)}},[ve])}},96954:function(Sn,Ve,It){"use strict";It.r(Ve),It.d(Ve,{default:function(){return fi}});var St=It(59301),Wt=It(61186),le=It.n(Wt),ve=It(86129),de=It.n(ve),Ht=It(38986),ie=It(25690),oe=It(62957),he=It(6767),Gt=It(458),Ie=It(91882),Xt=It(77019),Me=It(5269),Qt=It(99571),nt=It(25399),et=It(37285),At=It(37568),at=It(54172),dt=It(82326),gt=It(13747),xt=It(27812),bt=It(95869),Ut=It(87169),Rt=It(26227),Zt=It(346),Yt=It(48790),te=It(51257),ye=It(42441),fe={flex_box_center:"flex_box_center___KJUhi",flex_space_between:"flex_space_between____N4uH",flex_box_vertical_center:"flex_box_vertical_center___yOdsz",flex_box_center_end:"flex_box_center_end___seJB9",flex_box_column:"flex_box_column___ihHC5",title:"title___JSmnB",score:"score___ERcuI",export:"export___pgR1H",title1_right:"title1_right___MdWJo",userPic:"userPic___UeG3e",userInfo:"userInfo___TNu6l",listItem:"listItem___wdbM_",rightInfo:"rightInfo___Swqk5",shixunTitle:"shixunTitle___L2Tc4",shixunWrp:"shixunWrp___ZoaTc",footerBar:"footerBar___QW5rq",footerBarStatic:"footerBarStatic___CRq8b",exitComment:"exitComment___u4Rqt",nextComment:"nextComment___lvaID",modal:"modal___g3B3L",footer:"footer___eJCnt",pingjia:"pingjia___X_ooM",pj_close:"pj_close___PHP4h",pj_save:"pj_save___COfQy"},Ke={normal:{opacity:.8,shadowBlur:10,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",color:"#2e65ad"}};const _e=({shixunHomeworks:Fn,data:un,globalSetting:We,loading:Mn,dispatch:$i})=>{var hr;const{shixunWorkReport:vr}=Fn;let Te=((hr=un==null?void 0:un.efficiency_list)==null?void 0:hr.length)-parseInt(un==null?void 0:un.myself_eff[0]);const xi=()=>({title:{text:"\u5B66\u4E60\u6548\u7387",subtext:"\u5B66\u4E60\u6548\u7387=log(\u5B9E\u8BAD\u603B\u5F97\u5206/\u5B9E\u8BAD\u603B\u8017\u65F6)"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{left:"3%",right:"9%",bottom:"3%",containLabel:!0},tooltip:{showDelay:0,formatter:function(Si){return Si.name===vr.username?"\u59D3\u540D\uFF1A"+vr.username+"<br/>\u5B66\u53F7\uFF1A "+vr.user_id+"<br/>\u6548\u7387\uFF1A"+(un==null?void 0:un.myself_eff[1]):Si.name+":"+Si.value+" "},axisPointer:{show:!0,type:"cross",lineStyle:{type:"dashed",width:1}}},xAxis:[{type:"value",name:"\u5B66\u751F\u4F4D\u7F6E",nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:""},axisTick:{show:!1},splitLine:{show:!1}}],yAxis:[{type:"value",name:" ",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},scale:!0,axisLabel:{formatter:"{value}"},splitLine:{show:!1}}],series:[{name:"",type:"scatter",data:un==null?void 0:un.efficiency_list,itemStyle:{normal:{color:"#2e65ad"}},markArea:{silent:!0,itemStyle:{normal:{color:"transparent",borderWidth:1,borderType:"dashed"}},data:[[{name:"\u5B66\u4E60\u6548\u7387\u5206\u5E03\u533A\u95F4",xAxis:"min",yAxis:"min"},{xAxis:"max",yAxis:"max"}]]},markPoint:{data:[{name:vr.username,xAxis:Te,yAxis:un==null?void 0:un.myself_eff[1],value:un==null?void 0:un.myself_eff[1]}],itemStyle:{normal:{color:"#c23531"}}},markLine:{lineStyle:{normal:{type:"solid",color:"#ff6800"}},data:[{type:"average",name:"\u4E2D\u4F4D\u503C"}]}}]}),er=()=>({title:{text:"\u80FD\u529B\u503C",subtext:"\u80FD\u529B\u503C\uFF08\u5B9E\u8BAD\u83B7\u5F97\u7ECF\u9A8C\u503C/\u5B9E\u8BAD\u8BC4\u6D4B\u6B21\u6570\uFF09"},backgroundColor:"#fff",color:["#dd4444","#fec42c","#80F1BE"],grid:{x:"10%",x2:150,y:"18%",y2:"10%"},tooltip:{padding:10,backgroundColor:"#222",borderColor:"#777",borderWidth:1,formatter:function(Si){var Mr=Si.value;if(Si.name===vr.username)return"\u59D3\u540D\uFF1A"+vr.username+"<br/>\u5B66\u53F7\uFF1A "+vr.user_id+"<br/>\u5F97\u5206\uFF1A"+(un==null?void 0:un.myself_object[1])}},xAxis:{type:"value",name:"log(\u5B9E\u8BAD\u7684\u603B\u65F6\u95F4)",nameGap:16,nameTextStyle:{color:"#000",fontSize:14},splitLine:{show:!1},axisLine:{lineStyle:{color:"#000"}}},yAxis:{type:"value",name:" ",nameLocation:"end",nameGap:20,nameTextStyle:{color:"#000",fontSize:12},axisLine:{lineStyle:{color:"#000"}},splitLine:{show:!1}},series:[{name:"\u80FD\u529B",type:"scatter",itemStyle:Ke,data:un==null?void 0:un.consume_list,symbolSize:function(Si){return Math.round(Si[2])},markPoint:{data:[{name:vr.username,xAxis:un==null?void 0:un.myself_object[0],yAxis:un==null?void 0:un.myself_object[1],value:un==null?void 0:un.myself_object[1]}],itemStyle:{normal:{color:"#c23531"}}}}]});return St.createElement(St.Fragment,null,St.createElement("aside",{className:"ml60 pr30"},St.createElement(Xt.Z,null,St.createElement(Me.Z,{flex:"800px"},St.createElement(ye.Z,{style:{width:750,height:580},option:xi()})),St.createElement(Me.Z,{flex:"1"},St.createElement("aside",{className:fe.rightInfo},St.createElement("ul",null,St.createElement("li",null,St.createElement("span",null,"\u59D3\u540D")," ",St.createElement("span",{className:"ml30"},vr.username)),St.createElement("li",null,St.createElement("span",null,"\u5B66\u53F7")," ",St.createElement("span",{className:"ml30"},vr.student_id||"--")),St.createElement("li",null,St.createElement("span",null,"\u5B66\u4E60\u6548\u7387")," ",St.createElement("span",{className:"ml30 c-orange"},un==null?void 0:un.myself_eff[1])),St.createElement("li",null,St.createElement("span",null,"\u5F53\u524D\u6392\u540D")," ",St.createElement("span",{className:"ml30 c-orange"},un==null?void 0:un.myself_eff[0]))),St.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387",St.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u5B66\u4E60\u6548\u7387\u503C",St.createElement("br",null),"\u5C0F\u5706\u70B9\u8D8A\u9AD8\uFF0C\u5B66\u4E60\u6548\u7387\u8D8A\u9AD8",St.createElement("br",null),"\u6A59\u8272\u6A2A\u5411\u7BAD\u5934\uFF1A\u4E2D\u4F4D\u503C\uFF0C\u8868\u793A\u6574\u4E2A\u8BFE\u5802\u5B66\u751F\u8868\u73B0\u7684\u5E73\u5747\u503C"))))),St.createElement("aside",{className:"ml60 pr30"},St.createElement(Xt.Z,null,St.createElement(Me.Z,{flex:"800px"},St.createElement(ye.Z,{style:{width:750,height:580},option:er()})),St.createElement(Me.Z,{flex:"1"},St.createElement("aside",{className:fe.rightInfo},St.createElement("ul",null,St.createElement("li",null,St.createElement("span",null,"\u59D3\u540D")," ",St.createElement("span",{className:"ml30"},vr.username)),St.createElement("li",null,St.createElement("span",null,"\u5B66\u53F7")," ",St.createElement("span",{className:"ml30"},vr.student_id||"--")),St.createElement("li",null,St.createElement("span",null,"\u80FD\u529B")," ",St.createElement("span",{className:"ml30 c-orange"},un==null?void 0:un.myself_object[1]))),St.createElement("p",null,"1\u4E2A\u5C0F\u5706\u70B9\u4EE3\u88681\u4E2A\u5B66\u751F\u7684\u80FD\u529B\u503C",St.createElement("br",null),"\u7EA2\u8272\u6C34\u6EF4\u8868\u793A\u5F53\u524D\u5B66\u751F\u7684\u80FD\u529B\u503C",St.createElement("br",null),"\u5C0F\u5706\u5708\u8D8A\u5927\uFF0C\u8BC4\u6D4B\u6B21\u6570\u8D8A\u5C11",St.createElement("br",null)))))))};var nn=(0,ie.connect)(({shixunHomeworks:Fn,loading:un,globalSetting:We})=>({shixunHomeworks:Fn,globalSetting:We,loading:un.effects}))(_e),fn=It(75975),xn=It(71051),_n=({defaultValue:Fn,onBlur:un,max:We,className:Mn="game-score"})=>{const[$i,hr]=(0,St.useState)(Fn);(0,St.useEffect)(()=>{hr(Fn)},[Fn]);function vr(xi){hr(xi)}function Te(){$i!==Fn&&un($i>We?We:$i)}return St.createElement(xn.Z,{max:We,min:0,className:Mn,value:$i,onChange:vr,onBlur:Te})},Xn=It(39793),pe={md:"md___TEmcT"},ne=It(59301),pn=Object.defineProperty,Ai=Object.defineProperties,ai=Object.getOwnPropertyDescriptors,sn=Object.getOwnPropertySymbols,Qn=Object.prototype.hasOwnProperty,jn=Object.prototype.propertyIsEnumerable,Ti=(Fn,un,We)=>un in Fn?pn(Fn,un,{enumerable:!0,configurable:!0,writable:!0,value:We}):Fn[un]=We,$e=(Fn,un)=>{for(var We in un||(un={}))Qn.call(un,We)&&Ti(Fn,We,un[We]);if(sn)for(var We of sn(un))jn.call(un,We)&&Ti(Fn,We,un[We]);return Fn},Le=(Fn,un)=>Ai(Fn,ai(un));const tn=dt.default.Option,hi={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var ni=(Fn=>(Fn[Fn.SET_PATH=0]="SET_PATH",Fn[Fn.GET_PASSED_CONTENT=1]="GET_PASSED_CONTENT",Fn))(ni||{});function zt(Fn,un){switch(un.type){case 0:return Le($e({},Fn),{selectedPath:un.payload});case 1:return Le($e({},Fn),{passedContent:un.payload});default:throw new Error}}var Ft=({path:Fn,game_id:un,onPathChange:We,autoHeight:Mn,diff_code_count:$i,data:hr,game_codes_cn:vr})=>{var Te,xi,er,Si;const Mr=Fn.split("\uFF1B").filter(je=>!!je),[ur,Tr]=(0,St.useReducer)(zt,{selectedPath:Mr[0],passedContent:{language:"python",content:""}}),{selectedPath:gr,passedContent:ue}=ur;function re(je){Tr({type:0,payload:je})}const ee={\u6700\u540E\u901A\u5173\u4EE3\u7801:"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u7684\u901A\u5173\u4EE3\u7801",\u6700\u65B0\u4EE3\u7801:"\u672A\u901A\u8FC7\u672C\u9898\uFF0C\u5C55\u793A\u6700\u65B0\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5",\u622A\u6B62\u540E\u901A\u5173\u4EE3\u7801:"\u5728\u4F5C\u4E1A\u65F6\u95F4\u7ED3\u675F\u540E\u901A\u5173\u8BE5\u9898\u7684\u4EE3\u7801\u8BE6\u60C5"};return ne.createElement(ne.Fragment,null,ne.createElement("h2",null," ",ne.createElement("span",null,vr,ne.createElement(nt.Z,{title:ne.createElement("div",null,ne.createElement("div",null,"\u4EE3\u7801\u5C55\u793A\u89C4\u5219\uFF1A"),ne.createElement("div",null,"1.\u5C55\u793A\u5B66\u5458\u5728\u4F5C\u4E1A\u622A\u6B62\u524D\u5F97\u5206\u6700\u9AD8\u7684\u4EE3\u7801\u7248\u672C\u3002"),ne.createElement("div",null," 2.\u82E5\u6709\u591A\u4E2A\u6700\u9AD8\u5206\u7248\u672C\uFF0C\u5C55\u793A\u63D0\u4EA4\u65F6\u95F4\u6700\u665A\u7684\u7248\u672C\u3002"),ne.createElement("div",null," 3.\u4F5C\u4E1A\u622A\u6B62\u540E\u63D0\u4EA4\u7684\u4EE3\u7801\u5C06\u4E0D\u4E88\u5C55\u793A\u3002"))},ne.createElement("i",{style:{marginLeft:10,color:"#3061D0",fontSize:16},className:"iconfont icon-tishixiaowenhao"}))),$i&&ne.createElement("span",{style:{marginLeft:"50px"}},"\u4EE3\u7801\u4FEE\u6539\u884C\u6570 ",$i),ne.createElement("span",null,ne.createElement(dt.default,{style:{width:200},value:gr,onChange:re}," ",Mr.map(je=>ne.createElement(tn,{key:je,value:je},je))," "))," "),(gr==null?void 0:gr.split(".")[1])==="md"&&ne.createElement(Xn.Z,{height:300,autoHeight:Mn,defaultValue:((xi=(Te=hr==null?void 0:hr.filter(je=>je.path===gr))==null?void 0:Te[0])==null?void 0:xi.content)||"",className:pe.md}),(gr==null?void 0:gr.split(".")[1])!=="md"&&ne.createElement(fn.ZP,{height:300,language:ue.language,value:((Si=(er=hr==null?void 0:hr.filter(je=>je.path===gr))==null?void 0:er[0])==null?void 0:Si.content)||"",autoHeight:Mn,theme:"default",isCopy:!0,options:hi}))},mt=It(82264),vt=It(96249),Et=It.n(vt),Ct=Object.defineProperty,_t=Object.getOwnPropertySymbols,Ce=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Bn=(Fn,un,We)=>un in Fn?Ct(Fn,un,{enumerable:!0,configurable:!0,writable:!0,value:We}):Fn[un]=We,ze=(Fn,un)=>{for(var We in un||(un={}))Ce.call(un,We)&&Bn(Fn,We,un[We]);if(_t)for(var We of _t(un))Ze.call(un,We)&&Bn(Fn,We,un[We]);return Fn};const Ue=Fn=>React.createElement("svg",ze({className:"scai_svg__icon",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg",width:16,height:16},Fn),React.createElement("path",{d:"M512 327.68c245.76 0 445.44 153.6 445.44 348.16C957.44 870.4 757.76 1024 512 1024c-245.76-5.12-445.44-153.6-445.44-348.16 0-194.56 199.68-348.16 445.44-348.16z",fill:"#DBDCFF"}),React.createElement("path",{d:"M645.12 947.2c117.76-10.24 158.72-143.36 163.84-266.24 0-128-128-174.08-291.84-174.08-163.84 0-291.84 46.08-291.84 174.08 0 112.64 35.84 240.64 143.36 261.12 30.72 5.12 261.12 10.24 276.48 5.12z",fill:"#111ACC"}),React.createElement("path",{d:"M404.48 686.08c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c-5.12-10.24 10.24-25.6 25.6-25.6zm220.16 0c15.36 0 25.6 10.24 25.6 25.6v61.44c0 15.36-10.24 25.6-25.6 25.6-15.36 0-25.6-10.24-25.6-25.6v-61.44c0-10.24 10.24-25.6 25.6-25.6z",fill:"#FFF"}),React.createElement("path",{d:"M916.48 527.36c56.32 0 107.52 71.68 107.52 153.6 0 87.04-61.44 153.6-117.76 153.6 0 0 51.2-76.8 51.2-158.72s-40.96-148.48-40.96-148.48zm-808.96 5.12-5.12 5.12c-10.24 20.48-35.84 76.8-35.84 138.24 0 76.8 35.84 138.24 51.2 158.72C61.44 834.56 0 768 0 680.96c0-81.92 51.2-148.48 107.52-148.48z",fill:"#8187FF"}),React.createElement("path",{d:"M512 0c20.48 0 30.72 15.36 30.72 30.72v220.16c0 20.48-15.36 30.72-30.72 30.72s-30.72-10.24-30.72-30.72V30.72C481.28 15.36 496.64 0 512 0z",fill:"#701CDC"}),React.createElement("path",{d:"M384 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-35.84-15.36-35.84-30.72V76.8c0-20.48 15.36-30.72 35.84-30.72z",fill:"#371CDC"}),React.createElement("path",{d:"M645.12 46.08c20.48 0 30.72 15.36 30.72 30.72v133.12c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72V76.8c0-20.48 15.36-30.72 30.72-30.72z",fill:"#AB2FF0"}),React.createElement("path",{d:"M250.88 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-35.84-10.24-35.84-30.72v-40.96c0-20.48 15.36-35.84 35.84-35.84z",fill:"#6D57F2"}),React.createElement("path",{d:"M778.24 87.04c20.48 0 30.72 15.36 30.72 30.72v46.08c0 20.48-15.36 30.72-30.72 30.72s-30.72-15.36-30.72-30.72v-40.96c0-20.48 15.36-35.84 30.72-35.84z",fill:"#C86FFA"}));var Xe="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxwYXRoIGQ9Ik01MTIgMzI3LjY4YzI0NS43NiAwIDQ0NS40NCAxNTMuNiA0NDUuNDQgMzQ4LjE2Qzk1Ny40NCA4NzAuNCA3NTcuNzYgMTAyNCA1MTIgMTAyNGMtMjQ1Ljc2LTUuMTItNDQ1LjQ0LTE1My42LTQ0NS40NC0zNDguMTYgMC0xOTQuNTYgMTk5LjY4LTM0OC4xNiA0NDUuNDQtMzQ4LjE2eiIgZmlsbD0iI0RCRENGRiIvPjxwYXRoIGQ9Ik02NDUuMTIgOTQ3LjJjMTE3Ljc2LTEwLjI0IDE1OC43Mi0xNDMuMzYgMTYzLjg0LTI2Ni4yNCAwLTEyOC0xMjgtMTc0LjA4LTI5MS44NC0xNzQuMDgtMTYzLjg0IDAtMjkxLjg0IDQ2LjA4LTI5MS44NCAxNzQuMDggMCAxMTIuNjQgMzUuODQgMjQwLjY0IDE0My4zNiAyNjEuMTIgMzAuNzIgNS4xMiAyNjEuMTIgMTAuMjQgMjc2LjQ4IDUuMTJ6IiBmaWxsPSIjMTExQUNDIi8+PHBhdGggZD0iTTQwNC40OCA2ODYuMDhjMTUuMzYgMCAyNS42IDEwLjI0IDI1LjYgMjUuNnY2MS40NGMwIDE1LjM2LTEwLjI0IDI1LjYtMjUuNiAyNS42LTE1LjM2IDAtMjUuNi0xMC4yNC0yNS42LTI1LjZ2LTYxLjQ0Yy01LjEyLTEwLjI0IDEwLjI0LTI1LjYgMjUuNi0yNS42em0yMjAuMTYgMGMxNS4zNiAwIDI1LjYgMTAuMjQgMjUuNiAyNS42djYxLjQ0YzAgMTUuMzYtMTAuMjQgMjUuNi0yNS42IDI1LjYtMTUuMzYgMC0yNS42LTEwLjI0LTI1LjYtMjUuNnYtNjEuNDRjMC0xMC4yNCAxMC4yNC0yNS42IDI1LjYtMjUuNnoiIGZpbGw9IiNGRkYiLz48cGF0aCBkPSJNOTE2LjQ4IDUyNy4zNmM1Ni4zMiAwIDEwNy41MiA3MS42OCAxMDcuNTIgMTUzLjYgMCA4Ny4wNC02MS40NCAxNTMuNi0xMTcuNzYgMTUzLjYgMCAwIDUxLjItNzYuOCA1MS4yLTE1OC43MnMtNDAuOTYtMTQ4LjQ4LTQwLjk2LTE0OC40OHptLTgwOC45NiA1LjEyLTUuMTIgNS4xMmMtMTAuMjQgMjAuNDgtMzUuODQgNzYuOC0zNS44NCAxMzguMjQgMCA3Ni44IDM1Ljg0IDEzOC4yNCA1MS4yIDE1OC43MkM2MS40NCA4MzQuNTYgMCA3NjggMCA2ODAuOTZjMC04MS45MiA1MS4yLTE0OC40OCAxMDcuNTItMTQ4LjQ4eiIgZmlsbD0iIzgxODdGRiIvPjxwYXRoIGQ9Ik01MTIgMGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjIyMC4xNmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xMC4yNC0zMC43Mi0zMC43MlYzMC43MkM0ODEuMjggMTUuMzYgNDk2LjY0IDAgNTEyIDB6IiBmaWxsPSIjNzAxQ0RDIi8+PHBhdGggZD0iTTM4NCA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zNS44NC0xNS4zNi0zNS44NC0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzUuODQtMzAuNzJ6IiBmaWxsPSIjMzcxQ0RDIi8+PHBhdGggZD0iTTY0NS4xMiA0Ni4wOGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjEzMy4xMmMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MlY3Ni44YzAtMjAuNDggMTUuMzYtMzAuNzIgMzAuNzItMzAuNzJ6IiBmaWxsPSIjQUIyRkYwIi8+PHBhdGggZD0iTTI1MC44OCA4Ny4wNGMyMC40OCAwIDMwLjcyIDE1LjM2IDMwLjcyIDMwLjcydjQ2LjA4YzAgMjAuNDgtMTUuMzYgMzAuNzItMzAuNzIgMzAuNzJzLTM1Ljg0LTEwLjI0LTM1Ljg0LTMwLjcydi00MC45NmMwLTIwLjQ4IDE1LjM2LTM1Ljg0IDM1Ljg0LTM1Ljg0eiIgZmlsbD0iIzZENTdGMiIvPjxwYXRoIGQ9Ik03NzguMjQgODcuMDRjMjAuNDggMCAzMC43MiAxNS4zNiAzMC43MiAzMC43MnY0Ni4wOGMwIDIwLjQ4LTE1LjM2IDMwLjcyLTMwLjcyIDMwLjcycy0zMC43Mi0xNS4zNi0zMC43Mi0zMC43MnYtNDAuOTZjMC0yMC40OCAxNS4zNi0zNS44NCAzMC43Mi0zNS44NHoiIGZpbGw9IiNDODZGRkEiLz48L3N2Zz4=",dn=It(85788),Kn=It(76902),mn=Object.defineProperty,be=Object.defineProperties,ei=Object.getOwnPropertyDescriptors,kn=Object.getOwnPropertySymbols,On=Object.prototype.hasOwnProperty,Vn=Object.prototype.propertyIsEnumerable,Ki=(Fn,un,We)=>un in Fn?mn(Fn,un,{enumerable:!0,configurable:!0,writable:!0,value:We}):Fn[un]=We,si=(Fn,un)=>{for(var We in un||(un={}))On.call(un,We)&&Ki(Fn,We,un[We]);if(kn)for(var We of kn(un))Vn.call(un,We)&&Ki(Fn,We,un[We]);return Fn},yi=(Fn,un)=>be(Fn,ei(un)),Ei=(Fn,un,We)=>new Promise((Mn,$i)=>{var hr=xi=>{try{Te(We.next(xi))}catch(er){$i(er)}},vr=xi=>{try{Te(We.throw(xi))}catch(er){$i(er)}},Te=xi=>xi.done?Mn(xi.value):Promise.resolve(xi.value).then(hr,vr);Te((We=We.apply(Fn,un)).next())});const qi=({shixunHomeworks:Fn,autoHeight:un,classroomList:We,dispatch:Mn})=>{var $i,hr,vr,Te,xi,er,Si,Mr;const{shixunWorkReport:ur}=Fn,{stage_list:Tr,work_id:gr,ai_code_evaluation_promote:ue}=ur,[re,ee]=(0,St.useState)(!1),[je,xe]=(0,St.useState)(!0),[An,ui]=(0,St.useState)({left:0,top:0,bottom:0,right:0}),ti=(0,St.useRef)(null),[Bi,mi]=(0,St.useState)(!1),[oi,Di]=(0,St.useState)(""),Ne=(0,St.useRef)(null),hn=(qe,In)=>{var on;const{clientWidth:_i,clientHeight:Qi}=window.document.documentElement,nr=(on=ti.current)==null?void 0:on.getBoundingClientRect();nr&&ui({left:-nr.left+In.x,right:_i-(nr.right-In.x),top:-nr.top+In.y,bottom:Qi-(nr.bottom-In.y)})},ke=(0,ie.useParams)(),Ot=(0,Yt.GJ)(),vn={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};(0,St.useEffect)(()=>{console.log(ke)},[]);const Jn=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"position",width:"100px"},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"output_detail",render:(qe,In,on)=>St.createElement("div",null,qe,In.is_work_end_evaluate&&St.createElement(te.vA,{status:5}))},{title:"\u8BC4\u6D4B\u8017\u65F6(S)",dataIndex:"ts_time",width:"130px"},{title:"\u5185\u5B58\u6D88\u8017(MB)",width:"150px",dataIndex:"ts_mem"},{title:"\u8BC4\u6D4B\u65F6\u95F4",width:"170px",dataIndex:"created_at",render:qe=>le()(qe).format("YYYY-MM-DD HH:mm")},{title:"\u64CD\u4F5C",width:"80px",dataIndex:"query_index",render:(qe,In)=>St.createElement("span",{className:"c-blue current",onClick:()=>Ei(void 0,null,function*(){var on,_i;const Qi=yield(0,mt.Lk)(In.game_identifier,{path:(_i=(on=In.path)==null?void 0:on.replace(/\/g,";"))==null?void 0:_i.split(";")[0],query_index:In.query_index,homework_common_id:ke.categoryId});(Qi==null?void 0:Qi.status)===0&&(mi(Qi),ee(!0))})},In.query_index?"\u67E5\u770B\u4EE3\u7801":"")}],vi=[{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"],width:350,render:(qe,In)=>{var on;return St.createElement("span",null,St.createElement("img",{width:30,height:30,style:{borderRadius:"50%",marginRight:"10px"},src:Zt.Z.IMG_SERVER+"/images/"+((on=In==null?void 0:In.user)==null?void 0:on.image_url)}),qe)}},{title:"\u8C03\u5206\u524D",dataIndex:"old_score",width:270,render:qe=>St.createElement("span",null,"\u4FEE\u6B63\u524D\u5206\u6570\uFF1A",qe,"\u5206")},{title:"\u8C03\u5206\u540E",dataIndex:"score",width:270,render:qe=>St.createElement("span",null,"\u4FEE\u6B63\u540E\u5206\u6570\uFF1A",qe,"\u5206")},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",align:"right",render:qe=>St.createElement("span",null,"\u4FEE\u6B63\u65F6\u95F4\uFF1A",qe?le()(qe).format("YYYY-MM-DD HH:mm"):"--")}];function Ee(qe,In){return Ei(this,null,function*(){const{challenge_id:on}=Tr[qe],_i=yield Mn({type:"shixunHomeworks/changeScore",payload:{categoryId:ke.homeworkId,type:"report",score:In,challenge_id:on}});yield Mn({type:"shixunHomeworks/getShixunWorkReport",payload:si({},ke)}),_i.status===0&&he.ZP.success("\u64CD\u4F5C\u6210\u529F")})}function Wn(qe,In){return(0,Ht.U2)(`student_works/${gr}/rep_passed_content.json`,{path:In,game_id:qe})}const[cn,Un]=(0,St.useState)(($i=ur==null?void 0:ur.shixun_detail)==null?void 0:$i.map(qe=>yi(si({},qe),{commentEdit:!1}))),Rn=qe=>qe.replace(/\\\(([\s\S]*?)\\\)/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/\\\[([\s\S]*?)\\\]/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/`(\$\$.*?\$\$)`/g,"<mathx data-text='$1'>$$$$$1$$$$</mathx>").replace(/_{2,}/g,"`$&`"),[gn,Cn]=(0,St.useState)(!1),Tn=(qe,In)=>Ei(void 0,null,function*(){var on,_i;Cn(!0),Ne.current=new dn.Z(Zt.Z.API_SERVER+"/api/stream/intelligent_imports/chat_messages.json",{response_mode:"streaming",model:"qwen-max",scene_awareness:!1,thinking_enabled:!1,image_generator:!1,file_ids:[],history:[],prompt:ue,shixun_id:ur==null?void 0:ur.myshixun_identifier,game_id:qe==null?void 0:qe.id,source:"shixun",is_chat:!1,type:9,description:qe==null?void 0:qe.challenge_description,query:(_i=(on=qe==null?void 0:qe.game_codes)==null?void 0:on[0])==null?void 0:_i.content,homework_common_id:ke.categoryId}),yield new Promise((Qi,nr)=>{Ne.current.on("data",Gi=>{const Fr=[...cn];Fr[In].comment=Rn(Gi==null?void 0:Gi.full),Un(Fr)}),Ne.current.on("done",()=>Ei(void 0,null,function*(){var Gi;Cn(!1);const Fr=[...cn],yr=yield(0,Ht.ZP)(`/api/student_works/${ke==null?void 0:ke.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:qe==null?void 0:qe.challenge_id,comment:Fr[In].comment}});if((yr==null?void 0:yr.status)==0){he.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Zr=[...cn];Zr[In].comment_updated_at=(Gi=yr==null?void 0:yr.data)==null?void 0:Gi.comment_updated_at,Un(Zr)}})),Ne.current.startStream()})});return St.createElement(St.Fragment,null,cn==null?void 0:cn.map(function(qe,In){var on,_i;return St.createElement("div",{key:In},St.createElement("aside",{className:"pl30 pr30",key:In},St.createElement("div",{className:`${fe.shixunTitle} mt10`},St.createElement("div",null,St.createElement("span",{className:"fa fa-code "}),St.createElement("strong",{className:"c-black"},"\u7B2C",In+1,"\u5173 ",St.createElement(ie.Link,{className:"c-black",target:"_blank",to:`/tasks/${ke.coursesId}/${ke.categoryId}/${qe.game_identifier}`},qe.subject))),Ot?St.createElement("span",null,"\u8C03\u5206\uFF1A",St.createElement(_n,{className:"game-score",max:Tr[In].game_score_full,defaultValue:Tr[In].game_score,onBlur:Qi=>{var nr;if((0,Yt.Rm)()&&!((nr=We.AssistantObject.practice)!=null&&nr.can_appraise)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Ee(In,Qi)}})):null),St.createElement("div",{className:"font16 mt10"},qe.st===0&&(qe.path?typeof(qe==null?void 0:qe.game_codes_cn)=="string"?St.createElement("aside",{className:fe.shixunWrp},St.createElement(Ft,{game_codes_cn:qe==null?void 0:qe.game_codes_cn,autoHeight:un,path:qe.path,game_id:qe.id,data:qe.game_codes,diff_code_count:qe.diff_code_count,onPathChange:Wn})):St.createElement("div",{className:"font14",style:{border:"1px solid #d9d9d9",padding:"6px 10px"}}," \u63D0\u793A\uFF1A\u7EAF\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u7684\u5B9E\u8BAD\u4E0D\u5C55\u793A\u901A\u5173\u4EE3\u7801\uFF0C\u5982\u9700\u67E5\u770B\u5B66\u751F\u4EE3\u7801\u8BF7\u524D\u5F80\u4F5C\u4E1A\u5217\u8868\u5BFC\u51FA\u5B9E\u9A8C\u6587\u4EF6\u3002"):"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD"),qe.st===1&&(qe.complete_status===0?"\u672C\u5173\u6682\u672A\u901A\u8FC7\uFF0C\u65E0\u901A\u5173\u4EE3\u7801":"\u76EE\u524D\u56FE\u5F62\u5316\u3001\u547D\u4EE4\u884C\u3001Vscode\u7F16\u8F91\u5668\u3001\u7406\u8BBA\u9898\u6A21\u5F0F\u7684\u5B9E\u9A8C\uFF0C\u6682\u65F6\u65E0\u6CD5\u4F7F\u7528\u6B64\u529F\u80FD")),St.createElement("aside",{className:"mt10 font16"},(on=qe.outputs)!=null&&on.length?St.createElement(at.default,{columns:Jn,pagination:{hideOnSinglePage:!0},dataSource:qe.outputs.map(Qi=>si(si({},qe),Qi))}):"\u672C\u5173\u65E0\u8BC4\u6D4B\u8BB0\u5F55"),St.createElement("aside",{className:"mt10"},St.createElement("div",null,St.createElement("div",{style:{display:"flex",alignItems:"center"}},St.createElement("strong",{className:"c-black font14"},"\u4EE3\u7801\u8BC4\u4EF7"),!(qe!=null&&qe.commentEdit)&&!(0,Yt.dE)()&&(qe!=null&&qe.comment?St.createElement(St.Fragment,null,St.createElement("div",{style:{color:"#666666",fontSize:"12px",marginLeft:"auto"}},"\u6700\u65B0\u8BC4\u4EF7\u65F6\u95F4\uFF1A",qe!=null&&qe.comment_updated_at?le()(qe==null?void 0:qe.comment_updated_at).format("YYYY-MM-DD HH:mm:ss"):"--"),St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"40px",cursor:"pointer"},onClick:()=>Ei(this,null,function*(){gn?he.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):oe.default.confirm({title:"\u63D0\u793A",content:"\u786E\u8BA4\u662F\u5426\u91CD\u65B0\u751F\u6210\u8BC4\u8BBA\uFF1F",okText:"\u786E\u8BA4",icon:null,cancelText:"\u53D6\u6D88",onOk:()=>Ei(this,null,function*(){Tn(qe,In)})})})},St.createElement("i",{className:"iconfont icon-zhongxinshengcheng1 mr8 font14"}),"\u91CD\u65B0\u751F\u6210")):St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"auto",cursor:"pointer"},onClick:()=>Ei(this,null,function*(){gn?he.ZP.warning("\u6B63\u5728\u751F\u6210\u8BC4\u8BBA\u4E2D\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5\u3002"):Tn(qe,In)})},St.createElement("img",{src:Xe,className:"mr8"}),"\u4E00\u952EAI\u751F\u6210")),!(qe!=null&&qe.commentEdit)&&!(0,Yt.dE)()&&St.createElement("div",{style:{color:"#3061D0",fontSize:"14px",marginLeft:"20px",cursor:"pointer"},onClick:()=>{const Qi=[...cn];Qi[In].commentEdit=!0,Un(Qi),Di(qe==null?void 0:qe.comment)}},St.createElement("i",{className:"iconfont icon-bianji-moren mr8 font14"}),"\u7F16\u8F91"),(qe==null?void 0:qe.commentEdit)&&St.createElement(St.Fragment,null,St.createElement("div",{className:fe.pj_close,onClick:()=>{const Qi=[...cn];Qi[In].commentEdit=!1,Un(Qi)}},"\u53D6\u6D88"),St.createElement("div",{className:fe.pj_save,onClick:()=>Ei(this,null,function*(){var Qi;const nr=yield(0,Ht.ZP)(`/api/student_works/${ke==null?void 0:ke.homeworkId}/challenge_comment`,{method:"put",body:{challenge_id:qe==null?void 0:qe.challenge_id,comment:oi}});if((nr==null?void 0:nr.status)==0){he.ZP.success("\u8BC4\u4EF7\u6210\u529F");const Gi=[...cn];Gi[In].commentEdit=!1,Gi[In].comment=oi,Gi[In].comment_updated_at=(Qi=nr==null?void 0:nr.data)==null?void 0:Qi.comment_updated_at,Un(Gi)}})},"\u4FDD\u5B58"))),!(qe!=null&&qe.commentEdit)&&St.createElement("div",{className:fe.pingjia},qe!=null&&qe.comment?St.createElement(Kn.Z,{value:qe==null?void 0:qe.comment,style:{fontSize:"14px"}}):"\u6682\u65E0\u8BC4\u4EF7~"),(qe==null?void 0:qe.commentEdit)&&St.createElement(At.default.TextArea,{defaultValue:oi,style:{borderRadius:"5px",marginTop:"10px"},rows:5,onChange:Qi=>Di(Qi.target.value)}))),St.createElement("aside",{className:"mt10 font16"},((_i=qe==null?void 0:qe.adjust_review_score_list)==null?void 0:_i.length)>0&&(0,Yt.GJ)()&&St.createElement("div",null,St.createElement("strong",{className:"c-black font14"},"\u8C03\u5206\u8BB0\u5F55"),St.createElement(at.default,{columns:vi,pagination:{hideOnSinglePage:!0},dataSource:qe.adjust_review_score_list,showHeader:!1})))))}),St.createElement(oe.default,{open:re,width:900,okText:"\u5173\u95ED",cancelButtonProps:{style:{display:"none"}},onOk:()=>{mi({}),ee(!1)},onCancel:()=>{mi({}),ee(!1)},title:St.createElement("div",{style:{width:"100%",cursor:"move"},onMouseOver:()=>{je&&xe(!1)},onMouseOut:()=>{xe(!0)},onFocus:()=>{},onBlur:()=>{}},"\u4EE3\u7801\u5185\u5BB9"),modalRender:qe=>St.createElement(Et(),{disabled:je,bounds:An,nodeRef:ti,onStart:(In,on)=>hn(In,on)},St.createElement("div",{ref:ti},qe))},St.createElement("div",{style:{background:"#F6F7F9",padding:"30px 20px",marginBottom:20}},St.createElement("div",{style:{display:"flex",alignItems:"center"}},((hr=Bi==null?void 0:Bi.data)==null?void 0:hr.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?St.createElement("i",{style:{color:"#0B9953",fontSize:18,marginRight:10},className:"iconfont icon-duigou1"}):St.createElement("i",{style:{color:"#E21010",fontSize:18,marginRight:10},className:"iconfont icon-jinggao1"}),St.createElement("div",{style:{color:((vr=Bi==null?void 0:Bi.data)==null?void 0:vr.output_detail)==="\u8BC4\u6D4B\u901A\u8FC7"?"#0B9953":"#E21010",fontSize:16,fontWeight:600}},(Te=Bi==null?void 0:Bi.data)==null?void 0:Te.output_detail)),St.createElement("div",{style:{display:"flex",justifyContent:"space-between",marginTop:20}},St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u8BC4\u6D4B\u65F6\u95F4"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},le()((xi=Bi==null?void 0:Bi.data)==null?void 0:xi.created_at).format("YYYY-MM-DD HH:mm:ss"))),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u7528\u65F6"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(er=Bi==null?void 0:Bi.data)==null?void 0:er.ts_time,"s")),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u5185\u5B58"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},(Si=Bi==null?void 0:Bi.data)==null?void 0:Si.ts_mem,"mb")),St.createElement("div",null,St.createElement("span",{style:{color:"#6A7283"}},"\u7528\u4F8B\u901A\u8FC7\u7387"),St.createElement("span",{style:{marginLeft:8,color:"#232B40"}},((Mr=Bi==null?void 0:Bi.data)==null?void 0:Mr.test_set_passed_rate)*100,"%")))),St.createElement(fn.ZP,{height:500,autoHeight:un,language:"python",theme:"default",isCopy:!0,value:decodeURIComponent(escape(window.atob((Bi==null?void 0:Bi.content)||""))),options:vn})))};var ii=(0,ie.connect)(({shixunHomeworks:Fn,loading:un,globalSetting:We,classroomList:Mn})=>({shixunHomeworks:Fn,globalSetting:We,loading:un.effects,classroomList:Mn}))(qi),ar=It(28284),Xi={greyText:"greyText___nOpNq",info:"info___nBB3c",label:"label___P6my8",blackContent:"blackContent___O4HnS",orangeContent:"orangeContent___JBF44",inputLabel:"inputLabel___B2GAs",tableTitle:"tableTitle___IqAxM",scoreTable:"scoreTable___RJvpU"},lr=It(6701),zi=It(59301),Kr=Object.defineProperty,Ir=Object.getOwnPropertySymbols,Or=Object.prototype.hasOwnProperty,Yi=Object.prototype.propertyIsEnumerable,kr=(Fn,un,We)=>un in Fn?Kr(Fn,un,{enumerable:!0,configurable:!0,writable:!0,value:We}):Fn[un]=We,kt=(Fn,un)=>{for(var We in un||(un={}))Or.call(un,We)&&kr(Fn,We,un[We]);if(Ir)for(var We of Ir(un))Yi.call(un,We)&&kr(Fn,We,un[We]);return Fn},tr=(Fn,un,We)=>new Promise((Mn,$i)=>{var hr=xi=>{try{Te(We.next(xi))}catch(er){$i(er)}},vr=xi=>{try{Te(We.throw(xi))}catch(er){$i(er)}},Te=xi=>xi.done?Mn(xi.value):Promise.resolve(xi.value).then(hr,vr);Te((We=We.apply(Fn,un)).next())});const Fi=({shixunHomeworks:Fn,dispatch:un,classroomList:We})=>{const{shixunWorkReport:Mn}=Fn,$i=(0,ie.useParams)(),[hr,vr]=(0,St.useState)(!1),[Te]=ar.default.useForm(),[xi,er]=oe.default.useModal(),[Si,Mr]=(0,St.useState)(!1),[ur,Tr]=(0,St.useState)(!1);(0,St.useEffect)(()=>{var re,ee,je,xe;Fn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4"&&Te.setFieldsValue({comment:(ee=(re=Fn.actionTabs.selectArrs)==null?void 0:re.data)==null?void 0:ee.work_comment,hidden_comment:(xe=(je=Fn.actionTabs.selectArrs)==null?void 0:je.data)==null?void 0:xe.work_comment_hidden})},[Fn.actionTabs.key]);const gr=()=>tr(void 0,null,function*(){const re=Te.getFieldsValue();(yield(0,Ht.ZP)(`/api/student_works/${$i.homeworkId}/shixun_work_comment.json`,{method:"post",body:{hidden_comment:re.hidden_comment,comment:re.comment}})).status===0&&(he.ZP.success("\u8BC4\u9605\u6210\u529F"),Te.resetFields(),un({type:"shixunHomeworks/setActionTabs",payload:{}}),un({type:"shixunHomeworks/getShixunWorkReport",payload:kt({},$i)}))}),ue=[{title:"\u5173\u5361",dataIndex:"name",render:(re,ee,je)=>je+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(re,ee,je)=>zi.createElement("div",null,re,ee.complete_status===4&&zi.createElement(te.vA,{status:ee.complete_status}))},{title:"\u5F00\u59CB\u65F6\u95F4",dataIndex:"open_time"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",align:"center"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",align:"center",render:re=>re?"\u662F":"\u5426"},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",align:"center",render:(re,ee)=>zi.createElement("div",null,zi.createElement("span",{style:{color:parseFloat(ee.game_score_full)!==parseFloat(re)?"#E30000":"#53C41B"}},re),"/",ee.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",align:"center",fixed:"right",render:(re,ee)=>(0,Yt.GJ)()?zi.createElement(_n,{max:ee.game_score_full,defaultValue:parseFloat(re),onBlur:je=>tr(void 0,null,function*(){var xe,An;if((0,Yt.Rm)()&&!((xe=We.AssistantObject.practice)!=null&&xe.can_appraise)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const ui=yield un({type:"shixunHomeworks/changeScore",payload:{categoryId:$i.homeworkId,type:"report",score:je,challenge_id:ee.challenge_id}});(An=Fn==null?void 0:Fn.actionTabs)==null||An.fn(),yield un({type:"shixunHomeworks/getShixunWorkReport",payload:kt({},$i)}),ui.status===0&&he.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):re}];return zi.createElement(zi.Fragment,null,er,zi.createElement(oe.default,{centered:!0,width:1080,title:"\u70B9\u8BC4\u4F5C\u4E1A",open:Fn.actionTabs.key==="\u66F4\u6539\u70B9\u8BC4",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>tr(void 0,null,function*(){var re;if((0,Yt.Rm)()&&!((re=We.AssistantObject.practice)!=null&&re.can_appraise)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const ee=Te.getFieldsValue();JSON.stringify(ee)==="{}"||ee.hidden_comment===""&&ee.comment===""?vr(!0):gr()}),onCancel:()=>{un({type:"shixunHomeworks/setActionTabs",payload:{}})}},zi.createElement(Xt.Z,{justify:"space-between",className:Xi.info},zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u59D3\u540D"),zi.createElement("span",{className:Xi.blackContent},Mn==null?void 0:Mn.username)),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u5B66\u53F7"),zi.createElement("span",{className:Xi.blackContent},(Mn==null?void 0:Mn.student_id)||"--")),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u73ED\u7EA7"),zi.createElement("span",{className:Xi.blackContent},(Mn==null?void 0:Mn.group_name)||"--")),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u5173\u5361\u5F97\u5206"),zi.createElement("span",{className:Xi.orangeContent},(Mn==null?void 0:Mn.challenge_score)||"--")),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u6548\u7387\u5206"),zi.createElement("span",{className:Xi.orangeContent},(Mn==null?void 0:Mn.eff_score)||"--")),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u8865\u4EA4\u6263\u5206"),zi.createElement("span",{className:Xi.orangeContent},(Mn==null?void 0:Mn.late_penalty)||"--")),zi.createElement(Me.Z,null,zi.createElement("span",{className:`${Xi.label} ${Xi.greyText}`},"\u6700\u7EC8\u6210\u7EE9"),zi.createElement("span",{className:Xi.orangeContent},(Mn==null?void 0:Mn.work_score)||"--"))),zi.createElement(ar.default,{form:Te,onChange:()=>{hr&&vr(!1)}},zi.createElement(Xt.Z,{wrap:!1,align:"middle",justify:"space-between"},zi.createElement(Me.Z,null,zi.createElement("div",{className:`${Xi.inputLabel} ${Xi.greyText}`},"\u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),zi.createElement(Me.Z,null,zi.createElement(lr.Z,{isShowComponent:(0,Yt.G5)(),ModalProps:{open:Si,onCancel:()=>{Mr(!1)}},onDataSelect:(re,ee)=>tr(void 0,[re,ee],function*(je,{node:xe}){const An=()=>{Te.setFieldsValue({comment:xe==null?void 0:xe.value}),Mr(!1)};if(Te.getFieldValue("comment")){xi.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:An});return}An()})},zi.createElement(Qt.ZP,{style:{padding:0,height:"auto"},icon:zi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:re=>{Mr(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),zi.createElement(ar.default.Item,{name:"comment"},zi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3})),zi.createElement(Xt.Z,{wrap:!1,align:"middle",justify:"space-between"},zi.createElement(Me.Z,null,zi.createElement("div",{className:`${Xi.inputLabel} ${Xi.greyText}`},"\u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1")),zi.createElement(Me.Z,null,zi.createElement(lr.Z,{isShowComponent:(0,Yt.G5)(),ModalProps:{open:ur,onCancel:()=>{Tr(!1)}},onDataSelect:(re,ee)=>tr(void 0,[re,ee],function*(je,{node:xe}){const An=()=>{Te.setFieldsValue({hidden_comment:xe==null?void 0:xe.value}),Tr(!1)};if(Te.getFieldValue("hidden_comment")){xi.confirm({icon:null,title:"\u63D0\u793A",centered:!0,content:"\u7CFB\u7EDF\u68C0\u6D4B\u5230\u8BC4\u8BED\u8F93\u5165\u6846\u4E2D\u5DF2\u6709\u5185\u5BB9\uFF0C\u4F7F\u7528\u5E38\u7528\u8BC4\u8BED\u5C06\u4F1A\u8986\u76D6\u539F\u6709\u5185\u5BB9\u3002\u662F\u5426\u4F7F\u7528\uFF1F",okText:"\u4F7F\u7528",onOk:An});return}An()})},zi.createElement(Qt.ZP,{style:{padding:0,height:"auto"},icon:zi.createElement("i",{className:"iconfont icon-changyongpingyu"}),type:"link",onClick:re=>{Tr(!0)}},"\u5E38\u7528\u8BC4\u8BED")))),zi.createElement(ar.default.Item,{name:"hidden_comment"},zi.createElement(At.default.TextArea,{placeholder:"\u8BF7\u8F93\u5165\u8BC4\u9605\u5185\u5BB9",rows:3}))),hr&&zi.createElement("p",{className:"c-red"},"\u8BC4\u9605\u5185\u5BB9\u81F3\u5C11\u6709\u4E00\u4E2A\u4E0D\u4E3A\u7A7A"),zi.createElement("div",{className:Xi.tableTitle},"\u5173\u5361\u6210\u7EE9"),zi.createElement(at.default,{className:Xi.scoreTable,dataSource:Mn.stage_list,rowKey:"challenge_id",pagination:!1,columns:ue,scroll:{x:"max-content"}})))};var ri=(0,ie.connect)(({shixunHomeworks:Fn,classroomList:un})=>({shixunHomeworks:Fn,classroomList:un}))(Fi),Li=It(97610),Ui=It(1247),Ri=It(44164),Lr=It.n(Ri),an={wrap:"wrap___LZOi9",line:"line___oju0L"},rn=It(1546),yn=({detailData:Fn})=>{var un;return St.createElement("div",{className:an.wrap},St.createElement(rn.ij,{hideBar:!0,actionAnalysis:!0,loading:!1,emptyData:[(0,rn.Uf)(Fn),(Fn==null?void 0:Fn.photos)||[]],title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",noDataText:"\u8BE5\u5B66\u751F\u65E0\u5B66\u4E60\u884C\u4E3A\u5206\u6790\u6570\u636E"},St.createElement(rn.ZP,{hideBar:!0,title:"\u5B9E\u8BAD\u5B66\u4E60\u5206\u6790",data:(0,rn.Uf)(Fn)}),!!((un=Fn==null?void 0:Fn.photos)!=null&&un.length)&&St.createElement(St.Fragment,null,St.createElement("div",{className:an.line}),St.createElement(rn._s,{dataSource:Fn==null?void 0:Fn.photos,right:21,col:4,wrapWidth:1140}))))},ji=It(40133),Mi=It(23344),or=It(28426),ln=It(87320),Ln=It(49535),Pe=It(59301),sr=Object.defineProperty,$n=Object.defineProperties,se=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,Zn=Object.prototype.propertyIsEnumerable,Ye=(Fn,un,We)=>un in Fn?sr(Fn,un,{enumerable:!0,configurable:!0,writable:!0,value:We}):Fn[un]=We,Dn=(Fn,un)=>{for(var We in un||(un={}))qn.call(un,We)&&Ye(Fn,We,un[We]);if(De)for(var We of De(un))Zn.call(un,We)&&Ye(Fn,We,un[We]);return Fn},bi=(Fn,un)=>$n(Fn,se(un)),ki=(Fn,un)=>{var We={};for(var Mn in Fn)qn.call(Fn,Mn)&&un.indexOf(Mn)<0&&(We[Mn]=Fn[Mn]);if(Fn!=null&&De)for(var Mn of De(Fn))un.indexOf(Mn)<0&&Zn.call(Fn,Mn)&&(We[Mn]=Fn[Mn]);return We},Ni=(Fn,un,We)=>new Promise((Mn,$i)=>{var hr=xi=>{try{Te(We.next(xi))}catch(er){$i(er)}},vr=xi=>{try{Te(We.throw(xi))}catch(er){$i(er)}},Te=xi=>xi.done?Mn(xi.value):Promise.resolve(xi.value).then(hr,vr);Te((We=We.apply(Fn,un)).next())});function li(Fn){const un=($i,hr)=>{if($i.localName===hr)return $i;for(let vr=0,Te=$i;Te=Te.parentNode;vr++){if(Te.localName===hr)return Te;if(Te==document.documentElement)return!1}},We=Fn.target,Mn=un(We,"a");if(console.log([Mn],Mn==null?void 0:Mn.href,44),!(Mn!=null&&Mn.href)&&We.tagName.toUpperCase()==="IMG"){let $i=We.src||We.getAttribute("src");$i&&$i.indexOf("/images/avatars/User")===-1&&(Fn.stopPropagation(),Fn.preventDefault(),Ln.Z.publish("preview-image",$i))}}const ci=Fn=>{var un=Fn,{shixunHomeworks:We,classroomList:Mn,globalSetting:$i,loading:hr,user:vr,dispatch:Te}=un,xi=ki(un,["shixunHomeworks","classroomList","globalSetting","loading","user","dispatch"]),er,Si,Mr,ur,Tr,gr,ue;const[re,ee]=(0,St.useState)(Dn({},(0,ie.useParams)())),je=(0,ie.useParams)(),[xe,An]=(0,St.useState)({page:1,page_size:10}),ui=(0,ie.useLocation)(),[]=(0,St.useState)([]),[ti,Bi]=(0,St.useState)(),mi=(0,St.useRef)(),oi=(0,St.useRef)(),[Di,Ne]=(0,St.useState)(!1),[hn,ke]=(0,St.useState)(!0),[Ot,vn]=(0,St.useState)(!1),[Jn,vi]=(0,St.useState)(!1),{shixunWorkReport:Ee}=We,[Wn,cn]=(0,St.useState)(),[Un,Rn]=(0,St.useState)([]),[gn,Cn]=(0,St.useState)(),[Tn,qe]=(0,St.useState)("all"),In=(0,Yt.GJ)(),[on,_i]=(0,St.useState)(new(de())),[Qi,nr]=(0,St.useState)(0),[Gi,Fr]=(0,St.useState)(!1),[yr,Zr]=(0,St.useState)(!1),[_r,Wr]=(0,St.useState)(!1),[no,Oe]=(0,St.useState)(""),[Nr,Ur]=(0,St.useState)(!1),[Sr,Ar]=(0,St.useState)(!0),[Jr,Ao]=(0,St.useState)(0),io=(0,St.useRef)(JSON.parse(sessionStorage.all_student_works_params||"{}")),Dr=(0,St.useRef)(),[fo,es]=(0,St.useState)(!1),[Zs,Ua]=(0,St.useState)(!1),us=(0,St.useRef)(null),wr=()=>Ni(void 0,null,function*(){(vr.userInfo.is_teacher||vr.userInfo.admin)&&(Ur(!0),Ar(!1))});(0,St.useEffect)(()=>{var Wi;(0,Yt.Rm)()&&Mn.AssistantObject.practice&&!((Wi=Mn.AssistantObject.practice)!=null&&Wi.can_view)&&ie.history.replace("/403")},[(er=Mn.AssistantObject.practice)==null?void 0:er.can_view]),(0,St.useEffect)(()=>{wr(),console.log("\u6253\u5370\u7684------",Ee),Dr.current=Ee==null?void 0:Ee.next_student_work_id,Oe(Ee.repeat_minus_score)},[Ee,vr]),(0,St.useEffect)(()=>{console.log("\u89E6\u53D1\u8FD9",Ee.work_score),Ao(Ee.work_score)},[Ee.work_score,no]),(0,St.useEffect)(()=>(Te({type:"globalSetting/footerToggle",payload:!1}),()=>{Te({type:"globalSetting/footerToggle",payload:!0})}),[]),(0,St.useEffect)(()=>{if(us.current)return us.current.addEventListener("mousedown",li),()=>{var Wi;(Wi=us.current)==null||Wi.removeEventListener("mousedown",li)}},[us.current]),(0,St.useEffect)(()=>{setTimeout(()=>{us.current&&us.current.clientHeight>=500&&Ua(!0)},500)},[(Si=Ee==null?void 0:Ee.student_work_test_result_info)==null?void 0:Si.content,us.current]),(0,St.useEffect)(()=>{var Wi;if(Ee){let zr=[];(Wi=Ee==null?void 0:Ee.target_test_sets)==null||Wi.map((eo,xs)=>{var Ko;(Ko=eo==null?void 0:eo.targets)==null||Ko.map((Ds,Po)=>{var dl;Ds.name=eo==null?void 0:eo.name,Ds.total_target_score=eo==null?void 0:eo.total_target_score,Ds.actual_target_score=eo==null?void 0:eo.actual_target_score,Ds.rowSpan=Po===0?(dl=eo==null?void 0:eo.targets)==null?void 0:dl.length:0,Ds.order=xs+1,zr.push(Ds)})}),cn(zr),(0,Yt.Rm)()&&Te({type:"classroomList/getAssistantPermissions",payload:{course_id:re.coursesId}})}},[Ee]),(0,St.useEffect)(()=>{We.actionTabs.key==="\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"&&(Ee==null?void 0:Ee.students_count)>0&&!hn&&setTimeout(()=>{Qr("all")},800)},[Ee==null?void 0:Ee.homework_common_id,hn]),(0,St.useEffect)(()=>{ee(Dn({},je))},[ui.pathname]);const ns=()=>{document.body.scrollIntoView()},rs=Wi=>{xe.page=Wi,An(Dn({},xe)),fs(xe,Tn)},fs=(Wi,zr)=>Ni(void 0,null,function*(){vn(!0);const eo=yield(0,Ht.ZP)(`/api/student_works/${re==null?void 0:re.homeworkId}/adjust_review_score_histories.json`,{method:"get",params:bi(Dn({},Wi),{challenge_id:zr=="all"?null:zr})});(eo==null?void 0:eo.status)===0&&(Rn(eo==null?void 0:eo.list),Cn(eo==null?void 0:eo.count)),vn(!1)});function As(){return Ni(this,null,function*(){io.current=JSON.parse(sessionStorage.all_student_works_params||"{}")})}const Cs=()=>{document.querySelectorAll("canvas").forEach(Wi=>{(!Wi.clientWidth||!Wi.clientHeight)&&Wi.remove()})},Ci=()=>{mi.current.offsetHeight>62e3?vi(!1):vi(!0)},pr=Wi=>Ni(void 0,null,function*(){const zr=yield(0,Ui.t1)({homeworkId:Wi||re.homeworkId});Bi(zr==null?void 0:zr.data)}),Qr=Wi=>Ni(void 0,null,function*(){var zr,eo,xs,Ko;es(!0);let Ds=0,Po;Po=oe.default.info({width:460,title:Pe.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A,",Pe.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:Pe.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",Pe.createElement("span",{className:"c-blue"},Ds+1),"/",Wi!=="all"?1:Ee==null?void 0:Ee.students_count,Pe.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3"),maskClosable:!1,className:fe.modal,onOk:()=>{}});const dl={margin:[0,0],filename:`${Ee!=null&&Ee.student_id&&(Ee==null?void 0:Ee.student_id)!="--"?Ee==null?void 0:Ee.student_id:""}${Ee.username}.pdf`,html2canvas:{useCORS:!0,letterRendering:!0},jsPDF:{unit:"mm",format:"a4",orientation:"landscape"}},Qa=on.folder(Ee==null?void 0:Ee.shixun_name);function Ca(zo){return Ni(this,null,function*(){yield pr(zo||Dr.current);const ko=yield Te({type:"shixunHomeworks/getShixunWorkReport",payload:Dn({homeworkId:zo||Dr.current},io.current||{})});Dr.current=ko==null?void 0:ko.next_student_work_id,ns(),Ds++,setTimeout(()=>Ni(this,null,function*(){var fl,Ll,pa,Io;Cs();const Ml=Qa.folder(`${ko==null?void 0:ko.group_name}`).folder(`${ko!=null&&ko.student_id&&(ko==null?void 0:ko.student_id)!="--"?ko.student_id+"+":""}${ko==null?void 0:ko.username}`),Qs=document.querySelector("#export-all").children;let ma=Lr()();for(let Yo=0;Yo<Qs.length;Yo++)yield ma.set(dl).from(Qs[Yo]).toContainer().toCanvas().toPdf().get("pdf").then(Fo=>Ni(this,null,function*(){Yo<Qs.length-1&&(yield Fo.addPage())}));if(Ml.file(`${ko!=null&&ko.student_id&&(ko==null?void 0:ko.student_id)!="--"?ko.student_id+"+":""}${ko==null?void 0:ko.username}.pdf`,ma.output("blob")),((fl=ko==null?void 0:ko.shixun_detail)==null?void 0:fl.length)>0&&((pa=(Ll=ko==null?void 0:ko.shixun_detail)==null?void 0:Ll.filter(Yo=>{var Fo;return((Fo=Yo==null?void 0:Yo.game_codes)==null?void 0:Fo.length)>0}))==null?void 0:pa.length)>0){const Yo=Ml.folder("\u4EE3\u7801\u6587\u4EF6");(Io=ko==null?void 0:ko.shixun_detail)==null||Io.map((Fo,hs)=>{var js,bl;if(((js=Fo==null?void 0:Fo.game_codes)==null?void 0:js.length)>0){const ia=Yo.folder(`\u7B2C${hs+1}\u5173-${Fo.subject}-${Fo.id}`);(bl=Fo==null?void 0:Fo.game_codes)==null||bl.map(Uo=>{ia.file(`${Uo.filename}.txt`,Uo==null?void 0:Uo.content)})}})}Po.update({content:Pe.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",Pe.createElement("span",{className:"c-blue"},Ds),"/",ko==null?void 0:ko.students_count,Pe.createElement("br",null),"\u8BF7\u52FF\u5173\u95ED\u6D4F\u89C8\u5668\u7A97\u53E3")}),Ds==(ko==null?void 0:ko.students_count)?(Po.destroy(),$r()):Ca()}),2200)})}if(Wi!=="all"||(Ee==null?void 0:Ee.students_count)<2){Cs(),ns();const zo=oi.current.children;let ko=Lr()();const Ll=Qa.folder(`${Ee==null?void 0:Ee.group_name}`).folder(`${Ee!=null&&Ee.student_id&&(Ee==null?void 0:Ee.student_id)!="--"?(Ee==null?void 0:Ee.student_id)+"+":""}${Ee==null?void 0:Ee.username}`);for(let pa=0;pa<zo.length;pa++)yield ko.set(dl).from(zo[pa]).toContainer().toCanvas().toPdf().get("pdf").then(Io=>Ni(void 0,null,function*(){pa<zo.length-1&&(yield Io.addPage())}));if(Ne(!1),Ll.file(`${Ee!=null&&Ee.student_id&&(Ee==null?void 0:Ee.student_id)!="--"?(Ee==null?void 0:Ee.student_id)+"+":""}${Ee.username}.pdf`,ko.output("blob"),{base64:!1}),((zr=Ee==null?void 0:Ee.shixun_detail)==null?void 0:zr.length)>0&&((xs=(eo=Ee==null?void 0:Ee.shixun_detail)==null?void 0:eo.filter(pa=>{var Io;return((Io=pa==null?void 0:pa.game_codes)==null?void 0:Io.length)>0}))==null?void 0:xs.length)>0){const pa=Ll.folder("\u4EE3\u7801\u6587\u4EF6");(Ko=Ee==null?void 0:Ee.shixun_detail)==null||Ko.map((Io,nu)=>{var Ml,Qs;if(((Ml=Io==null?void 0:Io.game_codes)==null?void 0:Ml.length)>0){const ma=pa.folder(`\u7B2C${nu+1}\u5173-${Io.subject}-${Io.id}`);(Qs=Io==null?void 0:Io.game_codes)==null||Qs.map(Yo=>{ma.file(`${Yo.filename}.txt`,Yo==null?void 0:Yo.content)})}})}Po.destroy(),$r();return}else Ca(Ee==null?void 0:Ee.first_student_work_id)}),$r=()=>{on.generateAsync({type:"blob"}).then(function(Wi){console.log(Ee,"shixunWorkReport");const zr=document.createElement("a");zr.href=window.URL.createObjectURL(Wi),zr.download=(Ee==null?void 0:Ee.shixun_name)+".zip",document.body.appendChild(zr);const eo=document.createEvent("MouseEvents");eo.initEvent("click",!1,!1),zr.dispatchEvent(eo),document.body.removeChild(zr),_i(new(de()))}),vi(!1)};(0,St.useEffect)(()=>{so()},[re.homeworkId]);const so=()=>Ni(void 0,null,function*(){ke(!0),yield Te({type:"shixunHomeworks/getShixunWorkReport",payload:Dn(Dn({},re),io.current||{})}),pr(),(0,Yt.GJ)()&&As(),ke(!1)}),xo=[{title:"\u5173\u5361",dataIndex:"name",render:(Wi,zr,eo)=>eo+1},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",render:(Wi,zr,eo)=>Pe.createElement("div",null,Wi,zr.complete_status===4&&Pe.createElement(te.vA,{status:zr.complete_status}))},{title:"\u5F00\u542F\u65F6\u95F4",dataIndex:"open_time"},{title:"\u4EE3\u7801\u4FEE\u6539\u884C\u6570",dataIndex:"diff_code_count",render:(Wi,zr,eo)=>Wi||"- -"},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count"},{title:"\u5B8C\u6210\u65F6\u95F4",dataIndex:"finished_time"},{title:"\u5B9E\u8BAD\u8017\u65F6",dataIndex:"time_consuming"},{title:"\u662F\u5426\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",render:Wi=>Wi?"\u662F":"\u5426"},{title:"\u7ECF\u9A8C\u503C",dataIndex:"experience",render:(Wi,zr)=>Pe.createElement("div",null,Pe.createElement("span",{style:{color:parseFloat(zr.myself_experience)!==parseFloat(Wi)?"red":"green"}},zr.myself_experience),"/",Wi)},{title:"\u5173\u5361\u5F97\u5206",dataIndex:"game_score",render:(Wi,zr)=>Pe.createElement("div",null,Pe.createElement("span",{style:{color:parseFloat(zr.game_score_full)!==parseFloat(Wi)?"red":"green"}},Wi),"/",zr.game_score_full)},{title:"\u8C03\u5206",dataIndex:"game_score",render:(Wi,zr)=>In?Pe.createElement(_n,{max:zr.game_score_full,defaultValue:parseFloat(Wi),onBlur:eo=>Ni(void 0,null,function*(){var xs;if((0,Yt.Rm)()&&!((xs=Mn.AssistantObject.practice)!=null&&xs.can_appraise)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const Ko=yield Te({type:"shixunHomeworks/changeScore",payload:{categoryId:re.homeworkId,type:"report",score:eo,challenge_id:zr.challenge_id}});fs({page:1,page_size:10},"all"),yield Te({type:"shixunHomeworks/getShixunWorkReport",payload:Dn(Dn({},re),io.current||{})}),Ko.status===0&&he.ZP.success("\u64CD\u4F5C\u6210\u529F")})}):Wi}];let cr=[{title:"\u5173\u5361",dataIndex:"order",key:"order",render:(Wi,zr,eo)=>({children:Wi,props:{rowSpan:zr.rowSpan}})},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",render:(Wi,zr,eo)=>({children:Wi,props:{rowSpan:zr.rowSpan}})},{title:"\u6307\u6807\u540D\u79F0",dataIndex:"target_name",key:"target_name"},{title:"\u6307\u6807\u9884\u671F\u7ED3\u679C",dataIndex:"output",key:"output"},{title:"\u6307\u6807\u5B9E\u9645\u7ED3\u679C",dataIndex:"actual_output",key:"actual_output"},{title:"\u6307\u6807\u5F97\u5206",dataIndex:"test_score",key:"test_score",render:(Wi,zr,eo)=>Pe.createElement("div",null,Pe.createElement("span",{style:{color:parseFloat(zr.actual_test_score)!==parseFloat(Wi)?"red":"green"}},zr.actual_test_score),"/",Wi)},{title:"\u6307\u6807\u603B\u5206",render:(Wi,zr,eo)=>({children:Pe.createElement("div",null,Pe.createElement("span",{style:{color:parseFloat(zr.actual_target_score)!==parseFloat(Wi)?"red":"green"}},zr.actual_target_score),"/",Wi),props:{rowSpan:zr.rowSpan}}),dataIndex:"total_target_score",key:"total_target_score"}];const Co=[{title:"\u5173\u5361",dataIndex:"challenge_num",width:220},{title:"\u8C03\u5206\u7528\u6237",dataIndex:["user","name"]},{title:"\u8C03\u5206\u524D",dataIndex:"old_score"},{title:"\u8C03\u5206\u540E",dataIndex:"score"},{title:"\u8C03\u5206\u65F6\u95F4",dataIndex:"created_at",render:Wi=>Pe.createElement("span",null,Wi?le()(Wi).format("YYYY-MM-DD HH:mm"):"--")}],gs=Wi=>{Te({type:"shixunHomeworks/setActionTabs",payload:{key:"",type:2}}),setTimeout(()=>{Wi==="next"?ie.history.push(`/classrooms/${re.coursesId}/shixun_homework/${re.categoryId}/${Ee==null?void 0:Ee.next_student_work_id}/comment`):ie.history.push(`/classrooms/${re.coursesId}/shixun_homework/${re.categoryId}/${Ee==null?void 0:Ee.pre_student_work_id}/comment`)},200)},os=Wi=>{Oe(""),Wi.target.value&&(console.log("\u8FDB\u6765",Ee),Wi.target.value=Wi.target.value>Ee.repeat_setting_score?Ee.repeat_setting_score:Wi.target.value,Oe(Wi.target.value))},lo=()=>Ni(void 0,null,function*(){const Wi=yield(0,Ht.ZP)(`/api/student_works/${Ee==null?void 0:Ee.work_id}/update_repeat_score`,{method:"put",body:{score:no}});yield Te({type:"shixunHomeworks/getShixunWorkReport",payload:Dn(Dn({},re),io.current||{})}),Wi.status===0&&he.ZP.info("\u64CD\u4F5C\u6210\u529F")});return Pe.createElement("section",{className:"bg-fafafa",style:{position:"sticky",top:0}},Pe.createElement("div",{className:"edu-container mt10",style:{paddingBottom:100}},Pe.createElement(Gt.Z,{loading:hr["shixunHomeworks/getShixunWorkReport"],active:!0,avatar:{size:40},paragraph:{rows:5}},Pe.createElement("div",{className:"edu-container"},Ee.course_id&&Pe.createElement("section",{className:"animated fadeIn"},Pe.createElement("aside",{className:""},Ee.category&&Pe.createElement(Ie.Z,{separator:">"},Pe.createElement(Ie.Z.Item,null,Pe.createElement(ie.Link,{to:`/classrooms/${Ee.course_id}/shixun_homework`},Ee.course_name)),Pe.createElement(Ie.Z.Item,null,Pe.createElement(ie.Link,{to:`/classrooms/${Ee.course_id}/shixun_homework/${Ee.category.main?"":Ee.category.category_id}`},Ee.category.category_name)),Pe.createElement(Ie.Z.Item,null,Pe.createElement(ie.Link,{to:`/classrooms/${Ee.course_id}/shixun_homework/${Ee.homework_common_id}/detail${(0,Yt.dE)()?"?tabs=1":""}`},"\u4F5C\u4E1A\u8BE6\u60C5")),Pe.createElement(Ie.Z.Item,null,Ee.username))),Pe.createElement("aside",{className:[fe.title1,"mt20"].join(" ")},Pe.createElement(Xt.Z,{align:"middle"},Pe.createElement(Me.Z,{flex:1},Pe.createElement(ie.Link,{to:`/classrooms/${Ee.course_id}/shixun_homework/${Ee.homework_common_id}/detail`},Pe.createElement(xt.Z,{className:"font16 c-black"})),Pe.createElement("strong",{className:"font20 ml5"},Ee==null?void 0:Ee.homework_name),Pe.createElement(te.VV,{temporary:!0,status:Ee.homework_status})),Pe.createElement(Me.Z,{className:fe.title1_right},Ee.view_tpi&&Pe.createElement(Qt.ZP,{onClick:()=>{var Wi,zr;(0,te.xg)(`/tasks/${Ee==null?void 0:Ee.course_id}/${Ee==null?void 0:Ee.homework_common_id}/${(zr=(Wi=Ee==null?void 0:Ee.shixun_detail)==null?void 0:Wi[0])==null?void 0:zr.game_identifier}`)}},Pe.createElement("span",{className:"iconfont icon-yijiandianping mr5"}),"\u67E5\u770B\u5B66\u5458\u5B9E\u8BAD"),(0,Yt.GJ)()&&Ee.homework_end===!1&&!!Ee.myshixun_id&&Pe.createElement(Qt.ZP,{className:"ml10",onClick:()=>Ni(void 0,null,function*(){yield Te({type:"shixunHomeworks/setActionTabs",payload:{key:"\u6253\u56DE\u91CD\u505A",selectArrs:{myshixun_identifier:Ee.myshixun_identifier},homework_common_id:je.categoryId}})})},Pe.createElement("span",{className:"iconfont icon-dahuizhongzuo3x mr5"}),"\u6253\u56DE\u91CD\u505A"),Pe.createElement(Qt.ZP,{className:"ml10",onClick:()=>{var Wi;if((0,Yt.Rm)()&&!((Wi=Mn.AssistantObject.practice)!=null&&Wi.can_download)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}Qr("")},loading:Di},Pe.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5B9E\u8BAD\u62A5\u544A"),(0,Yt.GJ)()&&(Ee==null?void 0:Ee.students_count)>1&&Pe.createElement(Qt.ZP,{className:"ml10",onClick:()=>{var Wi;if((0,Yt.Rm)()&&!((Wi=Mn.AssistantObject.practice)!=null&&Wi.can_download)){he.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}oe.default.confirm({title:"\u9009\u62E9\u5BFC\u51FA\u65B9\u5F0F",closable:!0,icon:null,centered:!0,okText:Pe.createElement(nt.Z,{title:"\u5BFC\u51FA\u65F6\u4E0D\u80FD\u9000\u51FA\u6216\u5173\u95ED\u5BFC\u51FA\u9875\u9762\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u524D\u7AEF\u5BFC\u51FA"),cancelText:Pe.createElement(nt.Z,{title:"\u751F\u6210\u5BFC\u51FA\u4EFB\u52A1\u540E\u53EF\u5173\u95ED\u9875\u9762\uFF0C\u540E\u53F0\u5BFC\u51FA\u6210\u529F\u540E\u5728\u5386\u53F2\u5BFC\u51FA\u9875\u9762\u81EA\u884C\u4E0B\u8F7D\uFF0C\u4E0D\u5F71\u54CD\u5176\u4ED6\u64CD\u4F5C"},"\u540E\u53F0\u5BFC\u51FA"),onOk:()=>{Qr("all")},onCancel:()=>{},cancelButtonProps:{onClick:()=>{(0,ji.jj)({categoryId:re.categoryId,coursesId:re.coursesId},"shixun_report")}}})}},Pe.createElement("span",{className:"iconfont icon-daochu mr5"}),"\u5BFC\u51FA\u5168\u90E8\u5B66\u751F\u5B9E\u8BAD\u62A5\u544A"))))),Pe.createElement("aside",{className:"mt30 relative"})),Pe.createElement("aside",{className:"edu-container bg-white",ref:mi},Pe.createElement("div",{id:"export-all",ref:oi},Pe.createElement("div",{id:"export-all-1"},Pe.createElement("div",{className:fe.title},Pe.createElement("h1",null,"\u603B\u4F53\u8BC4\u4EF7"),Pe.createElement("div",null,(0,Yt.GJ)()&&Pe.createElement(Qt.ZP,{className:"mr20",type:"primary",onClick:()=>{Te({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ee.user_id,data:Dn({},Ee)},fn:()=>fs({page:1,page_size:10},"all")}})}},Pe.createElement(bt.Z,null),Ee.has_shixun_work_comment?"\u66F4\u6539\u70B9\u8BC4":"\u70B9\u8BC4\u4F5C\u4E1A"))),Pe.createElement(et.Z,{style:{marginTop:0}}),Pe.createElement(Xt.Z,{className:"pl30 pr30"},Pe.createElement(Me.Z,null,Pe.createElement("img",{className:fe.userPic,src:`${Zt.Z.IMG_SERVER}/images/${Ee.image_url}`,alt:Ee.username})),Pe.createElement(Me.Z,null,Pe.createElement("span",{className:"font16 ml40"},Ee.username),Pe.createElement(te.vA,{status:Ee.compelete_status}),Pe.createElement("ul",{className:fe.userInfo},Pe.createElement("li",null,"\u5B66\u53F7\uFF1A",Ee.student_id||"--"),Pe.createElement("li",null,"\u5206\u73ED\uFF1A",Ee.group_name||"--"),Pe.createElement("br",null),Pe.createElement("li",null,"\u622A\u6B62\u524D\u5B8C\u6210\u5173\u5361\uFF1A",Pe.createElement("span",{className:"c-red"},Ee.complete_count),"/",Pe.createElement("span",{className:"c-red"},Ee.challenges_count)),Pe.createElement("li",null,"\u6700\u65B0\u5B8C\u6210\u5173\u5361\uFF1A",Pe.createElement("span",{className:"c-red"},Ee.current_complete_count||"-"),"/",Pe.createElement("span",{className:"c-red"},Ee.challenges_count)),Pe.createElement("li",null,"\u5B8C\u6210\u6548\u7387\uFF1A",Ee&&Ee.efficiency===null?"--":Ee&&Ee.efficiency),Pe.createElement("li",null,"\u8BFE\u5802\u6700\u9AD8\u5B8C\u6210\u6548\u7387\uFF1A",Ee&&Ee.max_efficiency===null?"--":Ee&&Ee.max_efficiency))),Pe.createElement("ul",{className:[fe.listItem,"mt10"].join(" ")},Pe.createElement("li",null,Pe.createElement("strong",null,"\u901A\u5173\u65F6\u95F4"),Pe.createElement("div",{className:"c-light-black mt20"},Ee&&Ee.passed_time===null||Ee&&Ee.passed_time==="--"?"--":le()(Ee&&Ee.passed_time).format("YYYY-MM-DD HH:mm"))),Pe.createElement("li",null,Pe.createElement("strong",null,"\u8BA1\u65F6\u89C4\u5219",Pe.createElement("i",{onClick:Wi=>{Wi.stopPropagation(),Wi.preventDefault(),Fr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Pe.createElement("div",{className:"c-light-black mt20"},Ee==null?void 0:Ee.human_training_time_rules)),Pe.createElement("li",null,Pe.createElement("strong",null,"\u5B9E\u8BAD\u603B\u8017\u65F6",Pe.createElement("i",{onClick:Wi=>{Wi.stopPropagation(),Wi.preventDefault(),Zr(!0)},style:{marginLeft:4,color:"#145DFF",fontSize:16,cursor:"pointer"},className:"iconfont icon-tishixiaowenhao"})),Pe.createElement("div",{className:"c-light-black mt20"},Ee.time_consuming)),Pe.createElement("li",null,Pe.createElement("strong",null,"\u8BC4\u6D4B\u6B21\u6570"),Pe.createElement("div",{className:"mt20"},Ee.evaluate_count)),(Ee==null?void 0:Ee.eff_score_full)&&Pe.createElement(Pe.Fragment,null,Pe.createElement("li",null,Pe.createElement("strong",null,"\u5173\u5361\u5F97\u5206"),Pe.createElement("div",{className:"mt20"},Pe.createElement("span",{className:"c-orange"},Ee.challenge_score),"/",Pe.createElement("span",{className:"c-light-black"},Ee.challenge_score_full))),Pe.createElement("li",null,Pe.createElement("strong",null,"\u6548\u7387\u5206"),Pe.createElement("div",{className:"mt20"},Pe.createElement("span",{className:"c-orange"},Ee.eff_score),"/",Pe.createElement("span",{className:"c-light-black"},Ee.eff_score_full)))),(Ee==null?void 0:Ee.have_repeat)&&(Ee==null?void 0:Ee.repeat_minus_score)!==0&&Pe.createElement("li",{style:{position:"relative"}},Pe.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},Pe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Pe.createElement("div",{style:{position:"absolute",fontSize:"10px",color:"white",left:"57px",width:"46px",bottom:"72px"}},Ee!=null&&Ee.review_rate?Pe.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0",cursor:"pointer"},onClick:()=>{if(Ee!=null&&Ee.review_id&&Nr)localStorage.setItem("studentDetial",window.location.pathname),ie.history.push({pathname:`/classrooms/:coursesId/shixun_homework/${re.categoryId}/review_detail/${Ee==null?void 0:Ee.review_id}`});else return}},Ee.review_rate.toFixed(1),"%"):Pe.createElement("span",{style:{background:"#0152d9",borderRadius:"6px 6px 6px 0"}},"- -"))),Nr?Pe.createElement("div",{className:"mt20"},Pe.createElement(At.default,{style:{width:"45px",height:"22px"},value:no,onChange:Wi=>{os(Wi)},onBlur:lo,disabled:Sr})," / ",Ee==null?void 0:Ee.repeat_setting_score):Pe.createElement("div",{className:"mt20"},Ee==null?void 0:Ee.repeat_minus_score," / ",Ee==null?void 0:Ee.repeat_setting_score)),console.log("sssssssssssssssssssssss",Ee==null?void 0:Ee.have_repeat,Ee==null?void 0:Ee.repeat_minus_score),(Ee==null?void 0:Ee.have_repeat)&&(Ee==null?void 0:Ee.repeat_minus_score)===0&&Pe.createElement("li",null,Pe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Pe.createElement("div",{className:"mt20"}," - -")),!(Ee!=null&&Ee.have_repeat)&&Pe.createElement("li",null,Pe.createElement("strong",null,"\u67E5\u91CD\u6263\u5206"),Pe.createElement("div",{className:"mt20"}," - -")),Pe.createElement("li",null,Pe.createElement("strong",null,"\u8865\u4EA4\u6263\u5206"),Pe.createElement("div",{className:"mt20"},Pe.createElement("span",null,Ee.late_penalty||"- -"))),Pe.createElement("li",null,Pe.createElement("strong",null,"\u6700\u7EC8\u6210\u7EE9"),Pe.createElement("div",{className:"mt20"},Pe.createElement("span",{className:"c-orange"},Jr),"/",Pe.createElement("span",{className:"c-light-black"},Ee.all_work_score))),Pe.createElement("li",null,Pe.createElement("strong",null,"\u603B\u8BC4"),Pe.createElement("div",{className:"mt20"},Pe.createElement("span",{className:"c-orange"},Ee.overall_appraisal))))),Pe.createElement(et.Z,{style:{margin:0}}),(Ee.work_comment_hidden||Ee.work_comment)&&Pe.createElement("div",null,Pe.createElement(Xt.Z,{align:"middle"},Pe.createElement(Me.Z,{flex:1},Pe.createElement("h1",{className:fe.title},"\u70B9\u8BC4\u5185\u5BB9")),Pe.createElement(Me.Z,{className:"pr30"},(0,Yt.GJ)()&&Pe.createElement(Qt.ZP,{onClick:()=>Ni(void 0,null,function*(){oe.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:Pe.createElement(Ut.Z,null),content:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onOk(){return Ni(this,null,function*(){(yield(0,Ui.gZ)({comment_id:Ee.comment_id,homeworkId:re.homeworkId})).status===0&&(he.ZP.success("\u5220\u9664\u6210\u529F"),Te({type:"shixunHomeworks/getShixunWorkReport",payload:Dn(Dn({},re),io.current||{})}))})}})})},Pe.createElement(Rt.Z,null),"\u5220\u9664"))),Pe.createElement(et.Z,{style:{margin:0}}),Ee.work_comment&&Pe.createElement("aside",{className:"pl30 pr30 mt20"},Pe.createElement("span",{className:"c-light-black font12"},"# \u5B66\u751F\u548C\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),Pe.createElement("br",null),Pe.createElement(Kn.Z,{value:Ee.work_comment})),Ee.work_comment_hidden&&Pe.createElement("aside",{className:"pl30 pr30 mt20"},Pe.createElement("span",{className:"c-light-black font12"},"# \u4EC5\u8BFE\u5802\u8001\u5E08\u53EF\u89C1"),Pe.createElement("br",null),Pe.createElement(Kn.Z,{value:Ee.work_comment_hidden}))),(Ee==null?void 0:Ee.action_analysis)&&Pe.createElement(yn,{detailData:Ee}),Pe.createElement("div",{className:fe.score},Pe.createElement("h1",{className:fe.title},"\u9636\u6BB5\u6210\u7EE9"),(Ee==null?void 0:Ee.adjust_review_score_count)>0&&(0,Yt.GJ)()&&Pe.createElement("div",{style:{color:"#0152d9",cursor:"pointer"},onClick:()=>{Wr(!0),fs({page:1,page_size:10},"all")}},"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55\uFF08",Ee==null?void 0:Ee.adjust_review_score_count,"\u6B21\uFF09")),Pe.createElement("aside",{className:"pl30 pr30"},Pe.createElement(at.default,{dataSource:Ee.stage_list,rowKey:Wi=>Wi==null?void 0:Wi.challenge_id,pagination:!1,columns:xo})),((Mr=Ee==null?void 0:Ee.target_test_sets)==null?void 0:Mr.length)>0&&Pe.createElement("div",null,Pe.createElement("h1",{className:fe.title},"\u6307\u6807\u6210\u7EE9"),Pe.createElement("aside",{className:"pl30 pr30"},Pe.createElement(at.default,{dataSource:Wn,rowKey:Wi=>Wi==null?void 0:Wi.challenge_id,pagination:!1,bordered:!0,columns:cr}))),(Ee==null?void 0:Ee.work_description)&&Pe.createElement(Pe.Fragment,null,Pe.createElement("h1",{className:fe.title},"\u4E2A\u4EBA\u603B\u7ED3"),Pe.createElement("aside",{className:"pl30 pr30"},Pe.createElement(Kn.Z,{value:Ee==null?void 0:Ee.work_description}))),Pe.createElement("h1",{className:fe.title},"\u56FE\u5F62\u7EDF\u8BA1"),Pe.createElement(nn,{data:ti}),(Ee==null?void 0:Ee.is_open_submit_test_result)&&Pe.createElement(Pe.Fragment,null,Pe.createElement(ln.Z,null),Pe.createElement("h1",{className:fe.title},"\u5B9E\u9A8C\u7ED3\u679C"),(ur=Ee==null?void 0:Ee.student_work_test_result_info)!=null&&ur.is_submit_test_result?Pe.createElement("div",{className:"px-30px"},Pe.createElement("div",{className:"py-20px px-36px",style:{background:"#F6F7F9"}},Pe.createElement("div",{ref:us,style:{maxHeight:!fo&&"500px",overflow:"hidden"}},Pe.createElement(Kn.Z,{value:(Tr=Ee==null?void 0:Ee.student_work_test_result_info)==null?void 0:Tr.content})),Zs&&Pe.createElement("div",{className:"w-full current",onClick:()=>{es(!fo)}},Pe.createElement(et.Z,{variant:"dashed",style:{borderColor:"#3061D0",marginBottom:"0px"},dashed:!0},Pe.createElement("span",{style:{color:"#3061D0"}},fo?"\u6536\u8D77":"\u5C55\u5F00")))),Pe.createElement(Mi.Z,{className:"px-36px",showDimensions:!1,dataSource:(gr=Ee==null?void 0:Ee.student_work_test_result_info)==null?void 0:gr.test_result_files,callback:()=>{}})):Pe.createElement(or.Z,{customText:"\u5B66\u751F\u672A\u63D0\u4EA4\u5B9E\u9A8C\u7ED3\u679C"})),Pe.createElement("h1",{className:fe.title},"\u5B9E\u8BAD\u8BE6\u60C5")),Pe.createElement(ii,{autoHeight:Jn}))),(0,Yt.GJ)()&&Pe.createElement("aside",{className:`${fe.footerBar} ${Di?fe.footerBarStatic:""}`},Pe.createElement("aside",{className:"edu-container"},Pe.createElement(Xt.Z,{align:"middle"},Pe.createElement(Me.Z,{flex:"1"},Pe.createElement(ie.Link,{className:fe.exitComment,to:`/classrooms/${re.coursesId}/shixun_homework/${re.categoryId}/detail`},"\u8FD4\u56DE\u5217\u8868")),Pe.createElement(Me.Z,{flex:"1",className:"tr"},Pe.createElement(Qt.ZP,{type:"default",disabled:!(Ee!=null&&Ee.pre_student_work_id),onClick:()=>gs()},"\u4E0A\u4E00\u4E2A"),Pe.createElement(Qt.ZP,{type:"default",style:{marginLeft:"20px",marginRight:"20px"},disabled:!(Ee!=null&&Ee.next_student_work_id),onClick:()=>gs("next")},"\u4E0B\u4E00\u4E2A"),(0,Yt.GJ)()&&Pe.createElement(Qt.ZP,{type:"primary",onClick:()=>Ni(void 0,null,function*(){Te({type:"shixunHomeworks/setActionTabs",payload:{key:"\u66F4\u6539\u70B9\u8BC4",selectArrs:{myshixun_identifier:Ee.user_id,data:Dn({},Ee)},fn:()=>fs({page:1,page_size:10},"all")}})})},"\u70B9\u8BC4\u4F5C\u4E1A"))))))),Pe.createElement(ri,null),Pe.createElement(Li.Z,null),Pe.createElement(oe.default,{open:Gi,width:860,centered:!0,onCancel:()=>{Fr(!1)},title:"\u8BA1\u65F6\u89C4\u5219\u8BF4\u660E",footer:null},Pe.createElement("div",{style:{color:"#333333",fontWeight:400}},Pe.createElement("span",{style:{fontWeight:500}},"1\u3001\u9875\u9762\u505C\u7559\u65F6\u957F"),Pe.createElement("br",null),Pe.createElement("span",null,"\u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),Pe.createElement("br",null),Pe.createElement("span",null," \u5B66\u751F\u8FDB\u5165\u5173\u5361\u7684\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u82E5\u5B66\u751F\u5173\u95ED/\u9000\u51FA\u7B54\u9898\u9875\u9762\uFF0C\u5219\u8BA1\u65F6\u6682\u505C\uFF0C\u518D\u6B21\u8FDB\u5165\u7B54\u9898\u9875\u9762\u65F6\u5F00\u59CB\u7D2F\u8BA1\u8BA1\u65F6\u76F4\u81F3\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\uFF1B"),Pe.createElement("span",{style:{color:"#FA6400",display:"flex",height:34,alignItems:"center"}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),Pe.createElement("span",null,"a\u3001\u5B66\u751F\u8FDB\u5165\u5173\u5361\u770B\u5B8C\u9898\u540E\uFF0C\u9000\u51FA\u7B54\u9898\u9875\u9762\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u590D\u5236\u8FDB\u5E73\u53F0\u7B54\u9898\u9875\u9762\u8FDB\u884C\u8BC4\u6D4B\uFF0C\u65E0\u6CD5\u8BC4\u4F30\u5B66\u751F\u7684\u5B66\u4E60\u548C\u601D\u8003\u65F6\u95F4\u3002")),Pe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Pe.createElement("span",{style:{fontWeight:500}},"2\u3001\u5173\u5361\u603B\u8017\u65F6"),Pe.createElement("br",null),Pe.createElement("span",{style:{}},"\u5B66\u751F\u7B2C\u4E00\u6B21\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u8BC4\u6D4B\u901A\u8FC7\uFF0C\u5219\u8BA1\u65F6\u7ED3\u675F\u3002 "),Pe.createElement("br",null),Pe.createElement("span",null," \u53E6\uFF0C\u5373\u4F7F\u5173\u5361\u95EF\u5173\u8FC7\u7A0B\u4E2D\uFF0C\u5B66\u751F\u9000\u51FA/\u5173\u95ED\u7B54\u9898\u9875\u9762\uFF0C\u4E5F\u5C06\u6301\u7EED\u8BA1\u65F6\uFF0C\u76F4\u81F3\u8BE5\u5173\u5361\u901A\u8FC7\u3002"),Pe.createElement("span",{style:{color:"#FA6400",display:"flex",height:44,paddingTop:10}}," \u53EF\u80FD\u4F1A\u9020\u6210\u65F6\u957F\u8BC4\u4F30\u4E0E\u5B9E\u9645\u505A\u9898\u80FD\u529B\u4E0D\u7B26\u7684\u60C5\u51B5 "),Pe.createElement("span",null,"a\u3001\u5B66\u751F\u4ECE\u5176\u4ED6\u540C\u5B66\u5904\u770B\u5230\u9898\u76EE\u540E\uFF0C\u5B8C\u6210\u4EE3\u7801\u8BBE\u8BA1\uFF0C\u518D\u8FDB\u5165\u5173\u5361\u7B54\u9898\u9875\u9762\uFF0C\u5C06\u5DF2\u5B8C\u6210\u7684\u4EE3\u7801\u590D\u5236\u81F3\u5E73\u53F0\u8FDB\u884C\u8BC4\u6D4B\uFF1B"),Pe.createElement("br",null),Pe.createElement("span",null,"b\u3001\u5B66\u751F\u7B2C\u4E00\u6B21\u6253\u5F00\u5173\u5361\u540E\uFF0C\u56E0\u4E3A\u67D0\u79CD\u539F\u56E0\u79BB\u5F00\u9875\u9762\uFF0C\u65F6\u9694\u591A\u65E5\u624D\u518D\u6B21\u8FDB\u5165\u5E73\u53F0\u95EF\u5173\uFF0C\u5C31\u4F1A\u5BFC\u81F4\u5B66\u751F\u5173\u5361\u603B\u8017\u65F6\u8FC7\u957F\uFF1B")),Pe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Pe.createElement("span",{style:{fontWeight:500}},"3\u3001\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),Pe.createElement("br",null),Pe.createElement("span",{style:{}},"\u4ECE\u8001\u5E08\u53D1\u5E03\u7684\u5B9E\u8BAD\u4F5C\u4E1A\u5F00\u59CB\u65F6\u95F4\uFF0C\u5F00\u59CB\u8BA1\u65F6\uFF0C\u76F4\u81F3\u5B66\u751F\u5B9E\u8BAD\u901A\u5173\uFF08\u5305\u62EC\u8FDF\u4EA4\u901A\u5173\uFF09\uFF0C\u7ED3\u675F\u8BA1\u65F6\u3002\u5982\u679C\u5B66\u751F\u672A\u901A\u5173\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u8001\u5E08\u8BBE\u7F6E\u7684\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\uFF0C\u5982\u679C\u8001\u5E08\u5F00\u542F\u4E86\u8865\u4EA4\uFF0C\u5219\u8BE5\u751F\u7684\u95EF\u5173\u8017\u65F6\u4E3A\u5B9E\u8BAD\u5F00\u59CB\u65F6\u95F4\u81F3\u5B9E\u8BAD\u8865\u4EA4\u622A\u6B62\u65F6\u95F4\u3002")),Pe.createElement("div",{style:{color:"#333333",marginTop:20,fontWeight:400}},Pe.createElement("span",{style:{fontWeight:500}},"\u89C4\u5219\u76EE\u7684"),Pe.createElement("br",null),Pe.createElement("span",{style:{}},"\u9F13\u52B1\u5B66\u751F\u5728\u5B9E\u8BAD\u4F5C\u4E1A\u53D1\u5E03\u7684\u7B2C\u4E00\u65F6\u95F4\uFF0C\u7ACB\u5373\u767B\u5F55\u5E73\u53F0\u5B8C\u6210\u5B9E\u8BAD\u4F5C\u4E1A\u7684\u901A\u5173\u3002"))),Pe.createElement(oe.default,{open:yr,title:"\u5B9E\u8BAD\u603B\u8017\u65F6\u8BF4\u660E",centered:!0,footer:null,onCancel:()=>{Zr(!1)},width:600},Pe.createElement("div",{style:{fontWeight:400,color:"#333333"}},Pe.createElement("div",null,"1\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Pe.createElement("span",{style:{color:"#145DFF"}},"\u9875\u9762\u505C\u7559\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),Pe.createElement("div",{style:{margin:"20px 0px"}},"2\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Pe.createElement("span",{style:{color:"#145DFF"}},"\u5173\u5361\u603B\u8017\u65F6"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u6240\u6709\u5173\u5361\u8017\u65F6\u76F8\u52A0\u4E4B\u548C\uFF1B"),Pe.createElement("div",null,"3\u3001\u5F53\u8BA1\u65F6\u89C4\u5219\u4E3A\u201C",Pe.createElement("span",{style:{color:"#145DFF"}},"\u4F5C\u4E1A\u901A\u5173\u65F6\u957F"),"\u201D\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u901A\u5173\u65F6\u95F4\uFF0C\u5F53\u5B66\u751F\u672A\u901A\u5173\u65F6\uFF0C\u5B9E\u8BAD\u603B\u8017\u65F6\u4E3A\u5B9E\u8BAD\u53D1\u5E03\u65F6\u95F4\u81F3\u5B9E\u8BAD\u622A\u6B62\u65F6\u95F4\u3002"))),Pe.createElement(oe.default,{open:_r,title:"\u6210\u7EE9\u8C03\u5206\u8BB0\u5F55",centered:!0,footer:null,onCancel:()=>{qe("all"),Wr(!1)},destroyOnClose:!0,width:900},Pe.createElement("div",{style:{fontWeight:400,color:"#333333"}},Pe.createElement("div",null,Pe.createElement("span",null,"\u5173\u5361\uFF1A"),Pe.createElement(dt.default,{style:{width:300},value:Tn,placeholder:"\u8BF7\u9009\u62E9\u5173\u5361",defaultValue:"all",onChange:Wi=>Ni(void 0,null,function*(){qe(Wi),fs({page:1,page_size:10},Wi)})},Pe.createElement(dt.default.Option,{value:"all"}," \u5168\u90E8 "),(ue=Ee==null?void 0:Ee.stage_list)==null?void 0:ue.map((Wi,zr)=>Pe.createElement(dt.default.Option,{key:zr,value:Wi==null?void 0:Wi.challenge_id},"\u7B2C",(0,te.EM)(zr+1),"\u5173")))),Pe.createElement("div",{className:"mt20"},Pe.createElement(at.default,{dataSource:Un,rowKey:Wi=>Wi==null?void 0:Wi.id,pagination:!1,columns:Co,loading:Ot})),Pe.createElement("div",{className:fe.footer},Pe.createElement("div",null,Pe.createElement("span",{style:{color:"#656F87"}},"\u5171",Pe.createElement("span",{className:"c-light-primary"},gn),"\u6761\u6570\u636E")),Pe.createElement(gt.Z,{defaultCurrent:1,defaultPageSize:10,current:(xe==null?void 0:xe.page)||1,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,total:gn,onChange:rs})))))};var fi=(0,ie.connect)(({shixunHomeworks:Fn,classroomList:un,loading:We,globalSetting:Mn,user:$i})=>({shixunHomeworks:Fn,classroomList:un,globalSetting:Mn,loading:We.effects,user:$i}))(ci)},97610:function(Sn,Ve,It){"use strict";var St=It(62957),Wt=It(6767),le=It(38986),ve=It(25690),de=It(48790),Ht=It(59301),ie=(he,Gt,Ie)=>new Promise((Xt,Me)=>{var Qt=At=>{try{et(Ie.next(At))}catch(at){Me(at)}},nt=At=>{try{et(Ie.throw(At))}catch(at){Me(at)}},et=At=>At.done?Xt(At.value):Promise.resolve(At.value).then(Qt,nt);et((Ie=Ie.apply(he,Gt)).next())});const oe=({shixunHomeworks:he,classroomList:Gt,dispatch:Ie})=>{const Xt=(0,ve.useParams)();return Ht.createElement(St.default,{centered:!0,title:"\u63D0\u793A",open:he.actionTabs.key==="\u6253\u56DE\u91CD\u505A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>ie(void 0,null,function*(){var Me,Qt,nt,et;if((0,de.Rm)()&&!((Me=Gt.AssistantObject.practice)!=null&&Me.can_redo)){Wt.ZP.warning("\u60A8\u672A\u83B7\u53D6\u6B64\u6743\u9650\uFF0C\u9700\u5411\u8BFE\u5802\u7BA1\u7406\u5458\u7533\u8BF7\u6743\u9650\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD");return}const At=yield(0,le.ZP)(`/api/myshixuns/${he.actionTabs.selectArrs.myshixun_identifier}/reset_my_game.json`,{method:"GET",params:{course_id:Xt.coursesId,homework_common_id:he.actionTabs.homework_common_id}});if(At.shixun_identifier){Wt.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ie({type:"shixunHomeworks/setActionTabs",payload:{}});const at=(nt=(Qt=At==null?void 0:At.new_works)==null?void 0:Qt.find(dt=>`${dt.homework_common_id}`===Xt.categoryId))==null?void 0:nt.id;if((0,de.Rm)()&&!((et=Gt.AssistantObject.practice)!=null&&et.can_view))return;ve.history.replace(`/classrooms/${Xt.coursesId}/shixun_homework/${Xt.categoryId}/${at}/comment`)}}),onCancel:()=>{Ie({type:"shixunHomeworks/setActionTabs",payload:{}})}},Ht.createElement("p",null,"\u8BE5\u4F5C\u4E1A\u5C06\u88AB\u6253\u56DE\u91CD\u505A\uFF0C\u5B66\u751F\u5B9E\u8BAD\u8BB0\u5F55\u5C06\u88AB\u6E05\u7A7A!"),Ht.createElement("p",null,"\u786E\u5B9A\u6253\u56DE?"))};Ve.Z=(0,ve.connect)(({shixunHomeworks:he,classroomList:Gt})=>({shixunHomeworks:he,classroomList:Gt}))(oe)},40133:function(Sn,Ve,It){"use strict";It.d(Ve,{AD:function(){return nn},D9:function(){return pn},Hp:function(){return Ut},IM:function(){return ai},Iy:function(){return Zt},KM:function(){return zt},MJ:function(){return Rt},Ne:function(){return Ai},ON:function(){return $e},Uj:function(){return hi},VY:function(){return jn},YO:function(){return tn},YX:function(){return Le},Zn:function(){return nt},_g:function(){return gt},_k:function(){return pe},c6:function(){return Ke},cr:function(){return et},eV:function(){return _e},fi:function(){return At},gh:function(){return ye},hS:function(){return sn},iA:function(){return at},j6:function(){return xt},je:function(){return _n},jj:function(){return bt},kS:function(){return Ti},lS:function(){return Xn},o6:function(){return fe},pO:function(){return ni},rQ:function(){return fn},sA:function(){return te},xm:function(){return ne},xo:function(){return Qn},y8:function(){return xn},yd:function(){return dt}});var St=It(82264),Wt=It(25690),le=It(51257),ve=It(6767),de=It(346),Ht=Object.defineProperty,ie=Object.getOwnPropertySymbols,oe=Object.prototype.hasOwnProperty,he=Object.prototype.propertyIsEnumerable,Gt=(Ft,mt,vt)=>mt in Ft?Ht(Ft,mt,{enumerable:!0,configurable:!0,writable:!0,value:vt}):Ft[mt]=vt,Ie=(Ft,mt)=>{for(var vt in mt||(mt={}))oe.call(mt,vt)&&Gt(Ft,vt,mt[vt]);if(ie)for(var vt of ie(mt))he.call(mt,vt)&&Gt(Ft,vt,mt[vt]);return Ft},Xt=(Ft,mt,vt)=>new Promise((Et,Ct)=>{var _t=Bn=>{try{Ze(vt.next(Bn))}catch(ze){Ct(ze)}},Ce=Bn=>{try{Ze(vt.throw(Bn))}catch(ze){Ct(ze)}},Ze=Bn=>Bn.done?Et(Bn.value):Promise.resolve(Bn.value).then(_t,Ce);Ze((vt=vt.apply(Ft,mt)).next())});const Me=()=>{(0,Wt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u751F\u6210\u6587\u4EF6\uFF0C\u8BF7\u7A0D\u540E..."}})},Qt=()=>{(0,Wt.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},nt=Ft=>Xt(void 0,null,function*(){Me(),(yield(0,St.YR)(Ie({},Ft))).status===0&&(yield(0,le.QH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_couser_info.json`,query:Ft}))),Qt()}),et=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.yS)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_member_act_score`);else{if(mt.status===-2)return mt;mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_member_act_score`))}}),At=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.W0)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_score`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_score`))}}),at=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.Nl)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`))}}),dt=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.IU)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/export_star_user`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/export_star_user`))}}),gt=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.td)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else{if(mt.status===-2)return mt;if(mt.status===-3)(0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_exercise_and_other`);else if(mt.status===-4)return mt}}),xt=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.QX)(Ie({},Ft));if(mt.status===0)ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_homework`);else{if(mt.status===-4)return mt;mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/course_total_homework`))}}),bt=(Ft,mt)=>Xt(void 0,null,function*(){const vt=yield(0,St.o_)(Ie({},Ft));vt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Ut=(Ft,mt)=>Xt(void 0,null,function*(){const vt=yield(0,St.ZL)(Ie({},Ft));vt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Rt=(Ft,mt)=>Xt(void 0,null,function*(){const vt=yield(0,St.vV)(Ie({},Ft));vt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F\uFF01\u5BFC\u51FA\u540E\u6587\u4EF6\u4FDD\u5B58\u65F6\u95F4\u4E3A7\u5929\uFF0C\u8BF7\u53CA\u65F6\u4E0B\u8F7D"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Zt=(Ft,mt)=>Xt(void 0,null,function*(){const vt=yield(0,St.aP)(Ie({},Ft));vt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`)):vt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/${mt}`))}),Yt=Ft=>Xt(void 0,null,function*(){Me(),(yield exportCourseWorkListAppendix(Ie({},Ft))).status===0&&(yield downLoadFileIframe("",setUrlQuery({url:ENV.API_SERVER+`/api/homework_commons/${Ft.categoryId}/works_list.zip`,query:Ft}))),Qt()}),te=Ft=>Xt(void 0,null,function*(){Me(),yield(0,le.QH)("",de.Z.API_SERVER+`/api/polls/${Ft.categoryId}/commit_result.xlsx`),Qt()}),ye=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft.coursesId}/attendances/export_xlsx_data.xlsx`,query:Ft}))}),fe=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft.coursesId}/video_study_statics.xlsx`,query:Ft}))}),Ke=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_video_study.xlsx`,query:Ft}))}),_e=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft.coursesId}/export_course_students_info.xlsx`,query:Ft}))}),nn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/school_manages/students.xlsx",query:Ft}))}),fn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/item_banks/export.xlsx",query:Ft}))}),xn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:Ft}))}),_n=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.Uy)(Ie({},Ft));mt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_users`)):mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_users`))}),Xn=Ft=>Xt(void 0,null,function*(){const mt=yield(0,St.tg)(Ie({},Ft));mt.status===0?(ve.ZP.info("\u5BFC\u51FA\u4EFB\u52A1\u751F\u6210\u6210\u529F"),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_report`)):mt.status===-3&&((0,Wt.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"\u5BFC\u51FA\u63D0\u9192"}}),Wt.history.push(`/classrooms/${Ft.coursesId}/exportlist/exercise_score,export_exercise_report`))}),pe=Ft=>Xt(void 0,null,function*(){console.log("----------","\u8C03\u7528\u4E0B\u8F7D"),yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/export_records/${Ft.id}.xlsx`,query:Ft}))}),ne=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:Ft}))}),pn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/courses/${Ft==null?void 0:Ft.coursesId}/${Ft.menuKey}_statistic.xlsx?${Ft.checkedList.map(mt=>`course_group_id[]=${mt}`).join("&")}`,query:Ft}))}),Ai=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_training_objectives.xlsx`,query:Ft}))}),ai=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)(Ft==null?void 0:Ft.name,(0,le.NY)({url:de.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:Ft}))}),sn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_courses.xlsx`,query:Ft}))}),Qn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/ec_years/${Ft==null?void 0:Ft.ec_year_id}/ec_graduation_requirements.xlsx`,query:Ft}))}),jn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:Ft}))}),Ti=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:Ft}))}),$e=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/examination_banks/${Ft.id}.json`,query:Ft}))}),Le=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/exercises/${Ft.categoryId}.json`,query:Ft}))}),tn=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/polls/${Ft==null?void 0:Ft.id}/commit_result.json`,query:Ft}))}),hi=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+"/api/paths/get_task_pass.json",query:Ft}))}),ni=(Ft,mt)=>Xt(void 0,null,function*(){yield(0,le.FH)(mt||"",(0,le.NY)({url:de.Z.API_SERVER+`/api/exercises/${Ft==null?void 0:Ft.exercise_id}/consult_exercise.json`,query:Ft}))}),zt=Ft=>Xt(void 0,null,function*(){yield(0,le.FH)("",(0,le.NY)({url:de.Z.API_SERVER+`/api/competitions/${Ft==null?void 0:Ft.identifier}/competition_commit_records/member_works.xlsx`,query:Ft}))})},45937:function(Sn,Ve,It){"use strict";It.d(Ve,{U:function(){return he}});var St=It(59301),Wt=Object.defineProperty,le=Object.getOwnPropertySymbols,ve=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable,Ht=(Gt,Ie,Xt)=>Ie in Gt?Wt(Gt,Ie,{enumerable:!0,configurable:!0,writable:!0,value:Xt}):Gt[Ie]=Xt,ie=(Gt,Ie)=>{for(var Xt in Ie||(Ie={}))ve.call(Ie,Xt)&&Ht(Gt,Xt,Ie[Xt]);if(le)for(var Xt of le(Ie))de.call(Ie,Xt)&&Ht(Gt,Xt,Ie[Xt]);return Gt},oe=(Gt,Ie,Xt)=>new Promise((Me,Qt)=>{var nt=at=>{try{At(Xt.next(at))}catch(dt){Qt(dt)}},et=at=>{try{At(Xt.throw(at))}catch(dt){Qt(dt)}},At=at=>at.done?Me(at.value):Promise.resolve(at.value).then(nt,et);At((Xt=Xt.apply(Gt,Ie)).next())});function he(Gt,Ie){const[Xt,Me]=(0,St.useState)(Ie),[Qt,nt]=(0,St.useState)(!1),[et,At]=(0,St.useState)();return[Xt,Qt,(dt,gt=!1)=>oe(this,null,function*(){const xt=gt?Ie:ie(ie({},Xt),dt);nt(!0),Me(xt);const bt=yield Gt(xt);return nt(!1),At(bt),bt}),et,At]}},81428:function(Sn,Ve,It){"use strict";It.d(Ve,{AL:function(){return xt},Iy:function(){return Ie},Qv:function(){return Qt},ez:function(){return gt},jb:function(){return Xt}});var St=It(32834),Wt=It.n(St),le=It(11690),ve=It.n(le);let de=1;function Ht(Yt,te){const ye=Yt.match(/^(\s+)(?:```)/);if(ye===null)return te;const fe=ye[1];return te.split(`
`).map(Ke=>{const _e=Ke.match(/^\s+/);if(_e===null)return Ke;const[nn]=_e;return nn.length>=fe.length?Ke.slice(fe.length):Ke}).join(`
`)}let ie=[],oe=["<ul>"];const he=new(Wt()).Renderer,Gt=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Ie(){ie.length=0,oe=["<ul>"]}const Xt={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function Me(Yt,te,ye,fe){if(te>=Yt.length||Yt[te].level<=ye)return te;var Ke=Yt[te];fe.push("<li><a href='#"+de+Ke.anchor+"'>"+Ke.text+"</a>"),te++;var _e=[];return te=Me(Yt,te,Ke.level,_e),_e.length>0&&(fe.push("<ul>"),_e.forEach(function(nn){fe.push(nn)}),fe.push("</ul>")),fe.push("</li>"),te=Me(Yt,te,ye,fe),te}function Qt(){return Me(ie,0,0,oe),oe.push("</ul>"),oe.join("")}const nt={heading(Yt){const te=Gt.exec(Yt);if(de+=1,te)return{type:"heading",raw:te[0],depth:te[1].length,text:te[2]}},fences(Yt){const te=this.rules.block.fences.exec(Yt);if(te){const ye=te[0];let fe=Ht(ye,te[3]||"");const Ke=te[2]?te[2].trim():te[2];if(["latex","katex","math"].indexOf(Ke)>=0){const _e=at(),nn=fe;fe=_e,dt[_e]={type:"block",expression:nn}}return{type:"code",raw:ye,lang:Ke,text:fe}}}},et=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let At=0;const at=()=>`__special_katext_id_${At++}__`;let dt={};function gt(){return dt}function xt(){At=0,dt={}}function bt(Yt){return Yt=Yt.replace(et,(te,ye)=>{const fe=at();return dt[fe]={type:"inline",expression:ye},fe}),Yt}const Ut=he.listitem;he.listitem=function(Yt){return Ut(bt(Yt))};const Rt=he.paragraph;he.paragraph=function(Yt){return Rt(bt(Yt))};const Zt=he.tablecell;he.tablecell=function(Yt,te){return Zt(bt(Yt),te)},he.code=function(Yt,te,ye){const fe=(te||"").match(/\S*/)[0];return fe?["latex","katex","math"].indexOf(fe)>=0?`<p class='editormd-tex'>${Yt}</p>`:`<pre class="prettyprint linenums"><code class="language-${te}">${ye?Yt:(0,le.escape)(Yt,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ye?Yt:(0,le.escape)(Yt,!0))+"</code></pre>"},he.heading=function(Yt,te,ye){let fe=this.options.headerPrefix+ye.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ie.push({anchor:fe,level:te,text:Yt}),"<h"+te+' id="'+de+fe+'">'+Yt+"</h"+te+">"},Wt().setOptions({silent:!0,gfm:!0,pedantic:!1}),Wt().use({tokenizer:nt,renderer:he}),Ve.ZP=Wt()},86251:function(Sn,Ve){"use strict";Ve.byteLength=ie,Ve.toByteArray=he,Ve.fromByteArray=Xt;for(var It=[],St=[],Wt=typeof Uint8Array!="undefined"?Uint8Array:Array,le="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ve=0,de=le.length;ve<de;++ve)It[ve]=le[ve],St[le.charCodeAt(ve)]=ve;St[45]=62,St[95]=63;function Ht(Me){var Qt=Me.length;if(Qt%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var nt=Me.indexOf("=");nt===-1&&(nt=Qt);var et=nt===Qt?0:4-nt%4;return[nt,et]}function ie(Me){var Qt=Ht(Me),nt=Qt[0],et=Qt[1];return(nt+et)*3/4-et}function oe(Me,Qt,nt){return(Qt+nt)*3/4-nt}function he(Me){var Qt,nt=Ht(Me),et=nt[0],At=nt[1],at=new Wt(oe(Me,et,At)),dt=0,gt=At>0?et-4:et,xt;for(xt=0;xt<gt;xt+=4)Qt=St[Me.charCodeAt(xt)]<<18|St[Me.charCodeAt(xt+1)]<<12|St[Me.charCodeAt(xt+2)]<<6|St[Me.charCodeAt(xt+3)],at[dt++]=Qt>>16&255,at[dt++]=Qt>>8&255,at[dt++]=Qt&255;return At===2&&(Qt=St[Me.charCodeAt(xt)]<<2|St[Me.charCodeAt(xt+1)]>>4,at[dt++]=Qt&255),At===1&&(Qt=St[Me.charCodeAt(xt)]<<10|St[Me.charCodeAt(xt+1)]<<4|St[Me.charCodeAt(xt+2)]>>2,at[dt++]=Qt>>8&255,at[dt++]=Qt&255),at}function Gt(Me){return It[Me>>18&63]+It[Me>>12&63]+It[Me>>6&63]+It[Me&63]}function Ie(Me,Qt,nt){for(var et,At=[],at=Qt;at<nt;at+=3)et=(Me[at]<<16&16711680)+(Me[at+1]<<8&65280)+(Me[at+2]&255),At.push(Gt(et));return At.join("")}function Xt(Me){for(var Qt,nt=Me.length,et=nt%3,At=[],at=16383,dt=0,gt=nt-et;dt<gt;dt+=at)At.push(Ie(Me,dt,dt+at>gt?gt:dt+at));return et===1?(Qt=Me[nt-1],At.push(It[Qt>>2]+It[Qt<<4&63]+"==")):et===2&&(Qt=(Me[nt-2]<<8)+Me[nt-1],At.push(It[Qt>>10]+It[Qt>>4&63]+It[Qt<<2&63]+"=")),At.join("")}},19208:function(Sn,Ve,It){"use strict";var St;var Wt=It(86251),le=It(67467),ve=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;Ve.lW=oe,St=dt,Ve.h2=50;var de=2147483647;St=de,oe.TYPED_ARRAY_SUPPORT=Ht(),!oe.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function Ht(){try{var mt=new Uint8Array(1),vt={foo:function(){return 42}};return Object.setPrototypeOf(vt,Uint8Array.prototype),Object.setPrototypeOf(mt,vt),mt.foo()===42}catch(Et){return!1}}Object.defineProperty(oe.prototype,"parent",{enumerable:!0,get:function(){if(oe.isBuffer(this))return this.buffer}}),Object.defineProperty(oe.prototype,"offset",{enumerable:!0,get:function(){if(oe.isBuffer(this))return this.byteOffset}});function ie(mt){if(mt>de)throw new RangeError('The value "'+mt+'" is invalid for option "size"');var vt=new Uint8Array(mt);return Object.setPrototypeOf(vt,oe.prototype),vt}function oe(mt,vt,Et){if(typeof mt=="number"){if(typeof vt=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return Xt(mt)}return he(mt,vt,Et)}oe.poolSize=8192;function he(mt,vt,Et){if(typeof mt=="string")return Me(mt,vt);if(ArrayBuffer.isView(mt))return nt(mt);if(mt==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt);if(ni(mt,ArrayBuffer)||mt&&ni(mt.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ni(mt,SharedArrayBuffer)||mt&&ni(mt.buffer,SharedArrayBuffer)))return et(mt,vt,Et);if(typeof mt=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ct=mt.valueOf&&mt.valueOf();if(Ct!=null&&Ct!==mt)return oe.from(Ct,vt,Et);var _t=At(mt);if(_t)return _t;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof mt[Symbol.toPrimitive]=="function")return oe.from(mt[Symbol.toPrimitive]("string"),vt,Et);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof mt)}oe.from=function(mt,vt,Et){return he(mt,vt,Et)},Object.setPrototypeOf(oe.prototype,Uint8Array.prototype),Object.setPrototypeOf(oe,Uint8Array);function Gt(mt){if(typeof mt!="number")throw new TypeError('"size" argument must be of type number');if(mt<0)throw new RangeError('The value "'+mt+'" is invalid for option "size"')}function Ie(mt,vt,Et){return Gt(mt),mt<=0?ie(mt):vt!==void 0?typeof Et=="string"?ie(mt).fill(vt,Et):ie(mt).fill(vt):ie(mt)}oe.alloc=function(mt,vt,Et){return Ie(mt,vt,Et)};function Xt(mt){return Gt(mt),ie(mt<0?0:at(mt)|0)}oe.allocUnsafe=function(mt){return Xt(mt)},oe.allocUnsafeSlow=function(mt){return Xt(mt)};function Me(mt,vt){if((typeof vt!="string"||vt==="")&&(vt="utf8"),!oe.isEncoding(vt))throw new TypeError("Unknown encoding: "+vt);var Et=gt(mt,vt)|0,Ct=ie(Et),_t=Ct.write(mt,vt);return _t!==Et&&(Ct=Ct.slice(0,_t)),Ct}function Qt(mt){for(var vt=mt.length<0?0:at(mt.length)|0,Et=ie(vt),Ct=0;Ct<vt;Ct+=1)Et[Ct]=mt[Ct]&255;return Et}function nt(mt){if(ni(mt,Uint8Array)){var vt=new Uint8Array(mt);return et(vt.buffer,vt.byteOffset,vt.byteLength)}return Qt(mt)}function et(mt,vt,Et){if(vt<0||mt.byteLength<vt)throw new RangeError('"offset" is outside of buffer bounds');if(mt.byteLength<vt+(Et||0))throw new RangeError('"length" is outside of buffer bounds');var Ct;return vt===void 0&&Et===void 0?Ct=new Uint8Array(mt):Et===void 0?Ct=new Uint8Array(mt,vt):Ct=new Uint8Array(mt,vt,Et),Object.setPrototypeOf(Ct,oe.prototype),Ct}function At(mt){if(oe.isBuffer(mt)){var vt=at(mt.length)|0,Et=ie(vt);return Et.length===0||mt.copy(Et,0,0,vt),Et}if(mt.length!==void 0)return typeof mt.length!="number"||zt(mt.length)?ie(0):Qt(mt);if(mt.type==="Buffer"&&Array.isArray(mt.data))return Qt(mt.data)}function at(mt){if(mt>=de)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+de.toString(16)+" bytes");return mt|0}function dt(mt){return+mt!=mt&&(mt=0),oe.alloc(+mt)}oe.isBuffer=function(vt){return vt!=null&&vt._isBuffer===!0&&vt!==oe.prototype},oe.compare=function(vt,Et){if(ni(vt,Uint8Array)&&(vt=oe.from(vt,vt.offset,vt.byteLength)),ni(Et,Uint8Array)&&(Et=oe.from(Et,Et.offset,Et.byteLength)),!oe.isBuffer(vt)||!oe.isBuffer(Et))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(vt===Et)return 0;for(var Ct=vt.length,_t=Et.length,Ce=0,Ze=Math.min(Ct,_t);Ce<Ze;++Ce)if(vt[Ce]!==Et[Ce]){Ct=vt[Ce],_t=Et[Ce];break}return Ct<_t?-1:_t<Ct?1:0},oe.isEncoding=function(vt){switch(String(vt).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},oe.concat=function(vt,Et){if(!Array.isArray(vt))throw new TypeError('"list" argument must be an Array of Buffers');if(vt.length===0)return oe.alloc(0);var Ct;if(Et===void 0)for(Et=0,Ct=0;Ct<vt.length;++Ct)Et+=vt[Ct].length;var _t=oe.allocUnsafe(Et),Ce=0;for(Ct=0;Ct<vt.length;++Ct){var Ze=vt[Ct];if(ni(Ze,Uint8Array))Ce+Ze.length>_t.length?oe.from(Ze).copy(_t,Ce):Uint8Array.prototype.set.call(_t,Ze,Ce);else if(oe.isBuffer(Ze))Ze.copy(_t,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=Ze.length}return _t};function gt(mt,vt){if(oe.isBuffer(mt))return mt.length;if(ArrayBuffer.isView(mt)||ni(mt,ArrayBuffer))return mt.byteLength;if(typeof mt!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof mt);var Et=mt.length,Ct=arguments.length>2&&arguments[2]===!0;if(!Ct&&Et===0)return 0;for(var _t=!1;;)switch(vt){case"ascii":case"latin1":case"binary":return Et;case"utf8":case"utf-8":return Ti(mt).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Et*2;case"hex":return Et>>>1;case"base64":return tn(mt).length;default:if(_t)return Ct?-1:Ti(mt).length;vt=(""+vt).toLowerCase(),_t=!0}}oe.byteLength=gt;function xt(mt,vt,Et){var Ct=!1;if((vt===void 0||vt<0)&&(vt=0),vt>this.length||((Et===void 0||Et>this.length)&&(Et=this.length),Et<=0)||(Et>>>=0,vt>>>=0,Et<=vt))return"";for(mt||(mt="utf8");;)switch(mt){case"hex":return Xn(this,vt,Et);case"utf8":case"utf-8":return _e(this,vt,Et);case"ascii":return xn(this,vt,Et);case"latin1":case"binary":return _n(this,vt,Et);case"base64":return Ke(this,vt,Et);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pe(this,vt,Et);default:if(Ct)throw new TypeError("Unknown encoding: "+mt);mt=(mt+"").toLowerCase(),Ct=!0}}oe.prototype._isBuffer=!0;function bt(mt,vt,Et){var Ct=mt[vt];mt[vt]=mt[Et],mt[Et]=Ct}oe.prototype.swap16=function(){var vt=this.length;if(vt%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Et=0;Et<vt;Et+=2)bt(this,Et,Et+1);return this},oe.prototype.swap32=function(){var vt=this.length;if(vt%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Et=0;Et<vt;Et+=4)bt(this,Et,Et+3),bt(this,Et+1,Et+2);return this},oe.prototype.swap64=function(){var vt=this.length;if(vt%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Et=0;Et<vt;Et+=8)bt(this,Et,Et+7),bt(this,Et+1,Et+6),bt(this,Et+2,Et+5),bt(this,Et+3,Et+4);return this},oe.prototype.toString=function(){var vt=this.length;return vt===0?"":arguments.length===0?_e(this,0,vt):xt.apply(this,arguments)},oe.prototype.toLocaleString=oe.prototype.toString,oe.prototype.equals=function(vt){if(!oe.isBuffer(vt))throw new TypeError("Argument must be a Buffer");return this===vt?!0:oe.compare(this,vt)===0},oe.prototype.inspect=function(){var vt="",Et=Ve.h2;return vt=this.toString("hex",0,Et).replace(/(.{2})/g,"$1 ").trim(),this.length>Et&&(vt+=" ... "),"<Buffer "+vt+">"},ve&&(oe.prototype[ve]=oe.prototype.inspect),oe.prototype.compare=function(vt,Et,Ct,_t,Ce){if(ni(vt,Uint8Array)&&(vt=oe.from(vt,vt.offset,vt.byteLength)),!oe.isBuffer(vt))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof vt);if(Et===void 0&&(Et=0),Ct===void 0&&(Ct=vt?vt.length:0),_t===void 0&&(_t=0),Ce===void 0&&(Ce=this.length),Et<0||Ct>vt.length||_t<0||Ce>this.length)throw new RangeError("out of range index");if(_t>=Ce&&Et>=Ct)return 0;if(_t>=Ce)return-1;if(Et>=Ct)return 1;if(Et>>>=0,Ct>>>=0,_t>>>=0,Ce>>>=0,this===vt)return 0;for(var Ze=Ce-_t,Bn=Ct-Et,ze=Math.min(Ze,Bn),Ue=this.slice(_t,Ce),Xe=vt.slice(Et,Ct),dn=0;dn<ze;++dn)if(Ue[dn]!==Xe[dn]){Ze=Ue[dn],Bn=Xe[dn];break}return Ze<Bn?-1:Bn<Ze?1:0};function Ut(mt,vt,Et,Ct,_t){if(mt.length===0)return-1;if(typeof Et=="string"?(Ct=Et,Et=0):Et>2147483647?Et=2147483647:Et<-2147483648&&(Et=-2147483648),Et=+Et,zt(Et)&&(Et=_t?0:mt.length-1),Et<0&&(Et=mt.length+Et),Et>=mt.length){if(_t)return-1;Et=mt.length-1}else if(Et<0)if(_t)Et=0;else return-1;if(typeof vt=="string"&&(vt=oe.from(vt,Ct)),oe.isBuffer(vt))return vt.length===0?-1:Rt(mt,vt,Et,Ct,_t);if(typeof vt=="number")return vt=vt&255,typeof Uint8Array.prototype.indexOf=="function"?_t?Uint8Array.prototype.indexOf.call(mt,vt,Et):Uint8Array.prototype.lastIndexOf.call(mt,vt,Et):Rt(mt,[vt],Et,Ct,_t);throw new TypeError("val must be string, number or Buffer")}function Rt(mt,vt,Et,Ct,_t){var Ce=1,Ze=mt.length,Bn=vt.length;if(Ct!==void 0&&(Ct=String(Ct).toLowerCase(),Ct==="ucs2"||Ct==="ucs-2"||Ct==="utf16le"||Ct==="utf-16le")){if(mt.length<2||vt.length<2)return-1;Ce=2,Ze/=2,Bn/=2,Et/=2}function ze(mn,be){return Ce===1?mn[be]:mn.readUInt16BE(be*Ce)}var Ue;if(_t){var Xe=-1;for(Ue=Et;Ue<Ze;Ue++)if(ze(mt,Ue)===ze(vt,Xe===-1?0:Ue-Xe)){if(Xe===-1&&(Xe=Ue),Ue-Xe+1===Bn)return Xe*Ce}else Xe!==-1&&(Ue-=Ue-Xe),Xe=-1}else for(Et+Bn>Ze&&(Et=Ze-Bn),Ue=Et;Ue>=0;Ue--){for(var dn=!0,Kn=0;Kn<Bn;Kn++)if(ze(mt,Ue+Kn)!==ze(vt,Kn)){dn=!1;break}if(dn)return Ue}return-1}oe.prototype.includes=function(vt,Et,Ct){return this.indexOf(vt,Et,Ct)!==-1},oe.prototype.indexOf=function(vt,Et,Ct){return Ut(this,vt,Et,Ct,!0)},oe.prototype.lastIndexOf=function(vt,Et,Ct){return Ut(this,vt,Et,Ct,!1)};function Zt(mt,vt,Et,Ct){Et=Number(Et)||0;var _t=mt.length-Et;Ct?(Ct=Number(Ct),Ct>_t&&(Ct=_t)):Ct=_t;var Ce=vt.length;Ct>Ce/2&&(Ct=Ce/2);for(var Ze=0;Ze<Ct;++Ze){var Bn=parseInt(vt.substr(Ze*2,2),16);if(zt(Bn))return Ze;mt[Et+Ze]=Bn}return Ze}function Yt(mt,vt,Et,Ct){return hi(Ti(vt,mt.length-Et),mt,Et,Ct)}function te(mt,vt,Et,Ct){return hi($e(vt),mt,Et,Ct)}function ye(mt,vt,Et,Ct){return hi(tn(vt),mt,Et,Ct)}function fe(mt,vt,Et,Ct){return hi(Le(vt,mt.length-Et),mt,Et,Ct)}oe.prototype.write=function(vt,Et,Ct,_t){if(Et===void 0)_t="utf8",Ct=this.length,Et=0;else if(Ct===void 0&&typeof Et=="string")_t=Et,Ct=this.length,Et=0;else if(isFinite(Et))Et=Et>>>0,isFinite(Ct)?(Ct=Ct>>>0,_t===void 0&&(_t="utf8")):(_t=Ct,Ct=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ce=this.length-Et;if((Ct===void 0||Ct>Ce)&&(Ct=Ce),vt.length>0&&(Ct<0||Et<0)||Et>this.length)throw new RangeError("Attempt to write outside buffer bounds");_t||(_t="utf8");for(var Ze=!1;;)switch(_t){case"hex":return Zt(this,vt,Et,Ct);case"utf8":case"utf-8":return Yt(this,vt,Et,Ct);case"ascii":case"latin1":case"binary":return te(this,vt,Et,Ct);case"base64":return ye(this,vt,Et,Ct);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,vt,Et,Ct);default:if(Ze)throw new TypeError("Unknown encoding: "+_t);_t=(""+_t).toLowerCase(),Ze=!0}},oe.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Ke(mt,vt,Et){return vt===0&&Et===mt.length?Wt.fromByteArray(mt):Wt.fromByteArray(mt.slice(vt,Et))}function _e(mt,vt,Et){Et=Math.min(mt.length,Et);for(var Ct=[],_t=vt;_t<Et;){var Ce=mt[_t],Ze=null,Bn=Ce>239?4:Ce>223?3:Ce>191?2:1;if(_t+Bn<=Et){var ze,Ue,Xe,dn;switch(Bn){case 1:Ce<128&&(Ze=Ce);break;case 2:ze=mt[_t+1],(ze&192)===128&&(dn=(Ce&31)<<6|ze&63,dn>127&&(Ze=dn));break;case 3:ze=mt[_t+1],Ue=mt[_t+2],(ze&192)===128&&(Ue&192)===128&&(dn=(Ce&15)<<12|(ze&63)<<6|Ue&63,dn>2047&&(dn<55296||dn>57343)&&(Ze=dn));break;case 4:ze=mt[_t+1],Ue=mt[_t+2],Xe=mt[_t+3],(ze&192)===128&&(Ue&192)===128&&(Xe&192)===128&&(dn=(Ce&15)<<18|(ze&63)<<12|(Ue&63)<<6|Xe&63,dn>65535&&dn<1114112&&(Ze=dn))}}Ze===null?(Ze=65533,Bn=1):Ze>65535&&(Ze-=65536,Ct.push(Ze>>>10&1023|55296),Ze=56320|Ze&1023),Ct.push(Ze),_t+=Bn}return fn(Ct)}var nn=4096;function fn(mt){var vt=mt.length;if(vt<=nn)return String.fromCharCode.apply(String,mt);for(var Et="",Ct=0;Ct<vt;)Et+=String.fromCharCode.apply(String,mt.slice(Ct,Ct+=nn));return Et}function xn(mt,vt,Et){var Ct="";Et=Math.min(mt.length,Et);for(var _t=vt;_t<Et;++_t)Ct+=String.fromCharCode(mt[_t]&127);return Ct}function _n(mt,vt,Et){var Ct="";Et=Math.min(mt.length,Et);for(var _t=vt;_t<Et;++_t)Ct+=String.fromCharCode(mt[_t]);return Ct}function Xn(mt,vt,Et){var Ct=mt.length;(!vt||vt<0)&&(vt=0),(!Et||Et<0||Et>Ct)&&(Et=Ct);for(var _t="",Ce=vt;Ce<Et;++Ce)_t+=Ft[mt[Ce]];return _t}function pe(mt,vt,Et){for(var Ct=mt.slice(vt,Et),_t="",Ce=0;Ce<Ct.length-1;Ce+=2)_t+=String.fromCharCode(Ct[Ce]+Ct[Ce+1]*256);return _t}oe.prototype.slice=function(vt,Et){var Ct=this.length;vt=~~vt,Et=Et===void 0?Ct:~~Et,vt<0?(vt+=Ct,vt<0&&(vt=0)):vt>Ct&&(vt=Ct),Et<0?(Et+=Ct,Et<0&&(Et=0)):Et>Ct&&(Et=Ct),Et<vt&&(Et=vt);var _t=this.subarray(vt,Et);return Object.setPrototypeOf(_t,oe.prototype),_t};function ne(mt,vt,Et){if(mt%1!==0||mt<0)throw new RangeError("offset is not uint");if(mt+vt>Et)throw new RangeError("Trying to access beyond buffer length")}oe.prototype.readUintLE=oe.prototype.readUIntLE=function(vt,Et,Ct){vt=vt>>>0,Et=Et>>>0,Ct||ne(vt,Et,this.length);for(var _t=this[vt],Ce=1,Ze=0;++Ze<Et&&(Ce*=256);)_t+=this[vt+Ze]*Ce;return _t},oe.prototype.readUintBE=oe.prototype.readUIntBE=function(vt,Et,Ct){vt=vt>>>0,Et=Et>>>0,Ct||ne(vt,Et,this.length);for(var _t=this[vt+--Et],Ce=1;Et>0&&(Ce*=256);)_t+=this[vt+--Et]*Ce;return _t},oe.prototype.readUint8=oe.prototype.readUInt8=function(vt,Et){return vt=vt>>>0,Et||ne(vt,1,this.length),this[vt]},oe.prototype.readUint16LE=oe.prototype.readUInt16LE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,2,this.length),this[vt]|this[vt+1]<<8},oe.prototype.readUint16BE=oe.prototype.readUInt16BE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,2,this.length),this[vt]<<8|this[vt+1]},oe.prototype.readUint32LE=oe.prototype.readUInt32LE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),(this[vt]|this[vt+1]<<8|this[vt+2]<<16)+this[vt+3]*16777216},oe.prototype.readUint32BE=oe.prototype.readUInt32BE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),this[vt]*16777216+(this[vt+1]<<16|this[vt+2]<<8|this[vt+3])},oe.prototype.readIntLE=function(vt,Et,Ct){vt=vt>>>0,Et=Et>>>0,Ct||ne(vt,Et,this.length);for(var _t=this[vt],Ce=1,Ze=0;++Ze<Et&&(Ce*=256);)_t+=this[vt+Ze]*Ce;return Ce*=128,_t>=Ce&&(_t-=Math.pow(2,8*Et)),_t},oe.prototype.readIntBE=function(vt,Et,Ct){vt=vt>>>0,Et=Et>>>0,Ct||ne(vt,Et,this.length);for(var _t=Et,Ce=1,Ze=this[vt+--_t];_t>0&&(Ce*=256);)Ze+=this[vt+--_t]*Ce;return Ce*=128,Ze>=Ce&&(Ze-=Math.pow(2,8*Et)),Ze},oe.prototype.readInt8=function(vt,Et){return vt=vt>>>0,Et||ne(vt,1,this.length),this[vt]&128?(255-this[vt]+1)*-1:this[vt]},oe.prototype.readInt16LE=function(vt,Et){vt=vt>>>0,Et||ne(vt,2,this.length);var Ct=this[vt]|this[vt+1]<<8;return Ct&32768?Ct|4294901760:Ct},oe.prototype.readInt16BE=function(vt,Et){vt=vt>>>0,Et||ne(vt,2,this.length);var Ct=this[vt+1]|this[vt]<<8;return Ct&32768?Ct|4294901760:Ct},oe.prototype.readInt32LE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),this[vt]|this[vt+1]<<8|this[vt+2]<<16|this[vt+3]<<24},oe.prototype.readInt32BE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),this[vt]<<24|this[vt+1]<<16|this[vt+2]<<8|this[vt+3]},oe.prototype.readFloatLE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),le.read(this,vt,!0,23,4)},oe.prototype.readFloatBE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,4,this.length),le.read(this,vt,!1,23,4)},oe.prototype.readDoubleLE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,8,this.length),le.read(this,vt,!0,52,8)},oe.prototype.readDoubleBE=function(vt,Et){return vt=vt>>>0,Et||ne(vt,8,this.length),le.read(this,vt,!1,52,8)};function pn(mt,vt,Et,Ct,_t,Ce){if(!oe.isBuffer(mt))throw new TypeError('"buffer" argument must be a Buffer instance');if(vt>_t||vt<Ce)throw new RangeError('"value" argument is out of bounds');if(Et+Ct>mt.length)throw new RangeError("Index out of range")}oe.prototype.writeUintLE=oe.prototype.writeUIntLE=function(vt,Et,Ct,_t){if(vt=+vt,Et=Et>>>0,Ct=Ct>>>0,!_t){var Ce=Math.pow(2,8*Ct)-1;pn(this,vt,Et,Ct,Ce,0)}var Ze=1,Bn=0;for(this[Et]=vt&255;++Bn<Ct&&(Ze*=256);)this[Et+Bn]=vt/Ze&255;return Et+Ct},oe.prototype.writeUintBE=oe.prototype.writeUIntBE=function(vt,Et,Ct,_t){if(vt=+vt,Et=Et>>>0,Ct=Ct>>>0,!_t){var Ce=Math.pow(2,8*Ct)-1;pn(this,vt,Et,Ct,Ce,0)}var Ze=Ct-1,Bn=1;for(this[Et+Ze]=vt&255;--Ze>=0&&(Bn*=256);)this[Et+Ze]=vt/Bn&255;return Et+Ct},oe.prototype.writeUint8=oe.prototype.writeUInt8=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,1,255,0),this[Et]=vt&255,Et+1},oe.prototype.writeUint16LE=oe.prototype.writeUInt16LE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,2,65535,0),this[Et]=vt&255,this[Et+1]=vt>>>8,Et+2},oe.prototype.writeUint16BE=oe.prototype.writeUInt16BE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,2,65535,0),this[Et]=vt>>>8,this[Et+1]=vt&255,Et+2},oe.prototype.writeUint32LE=oe.prototype.writeUInt32LE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,4,4294967295,0),this[Et+3]=vt>>>24,this[Et+2]=vt>>>16,this[Et+1]=vt>>>8,this[Et]=vt&255,Et+4},oe.prototype.writeUint32BE=oe.prototype.writeUInt32BE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,4,4294967295,0),this[Et]=vt>>>24,this[Et+1]=vt>>>16,this[Et+2]=vt>>>8,this[Et+3]=vt&255,Et+4},oe.prototype.writeIntLE=function(vt,Et,Ct,_t){if(vt=+vt,Et=Et>>>0,!_t){var Ce=Math.pow(2,8*Ct-1);pn(this,vt,Et,Ct,Ce-1,-Ce)}var Ze=0,Bn=1,ze=0;for(this[Et]=vt&255;++Ze<Ct&&(Bn*=256);)vt<0&&ze===0&&this[Et+Ze-1]!==0&&(ze=1),this[Et+Ze]=(vt/Bn>>0)-ze&255;return Et+Ct},oe.prototype.writeIntBE=function(vt,Et,Ct,_t){if(vt=+vt,Et=Et>>>0,!_t){var Ce=Math.pow(2,8*Ct-1);pn(this,vt,Et,Ct,Ce-1,-Ce)}var Ze=Ct-1,Bn=1,ze=0;for(this[Et+Ze]=vt&255;--Ze>=0&&(Bn*=256);)vt<0&&ze===0&&this[Et+Ze+1]!==0&&(ze=1),this[Et+Ze]=(vt/Bn>>0)-ze&255;return Et+Ct},oe.prototype.writeInt8=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,1,127,-128),vt<0&&(vt=255+vt+1),this[Et]=vt&255,Et+1},oe.prototype.writeInt16LE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,2,32767,-32768),this[Et]=vt&255,this[Et+1]=vt>>>8,Et+2},oe.prototype.writeInt16BE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,2,32767,-32768),this[Et]=vt>>>8,this[Et+1]=vt&255,Et+2},oe.prototype.writeInt32LE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,4,2147483647,-2147483648),this[Et]=vt&255,this[Et+1]=vt>>>8,this[Et+2]=vt>>>16,this[Et+3]=vt>>>24,Et+4},oe.prototype.writeInt32BE=function(vt,Et,Ct){return vt=+vt,Et=Et>>>0,Ct||pn(this,vt,Et,4,2147483647,-2147483648),vt<0&&(vt=4294967295+vt+1),this[Et]=vt>>>24,this[Et+1]=vt>>>16,this[Et+2]=vt>>>8,this[Et+3]=vt&255,Et+4};function Ai(mt,vt,Et,Ct,_t,Ce){if(Et+Ct>mt.length)throw new RangeError("Index out of range");if(Et<0)throw new RangeError("Index out of range")}function ai(mt,vt,Et,Ct,_t){return vt=+vt,Et=Et>>>0,_t||Ai(mt,vt,Et,4,34028234663852886e22,-34028234663852886e22),le.write(mt,vt,Et,Ct,23,4),Et+4}oe.prototype.writeFloatLE=function(vt,Et,Ct){return ai(this,vt,Et,!0,Ct)},oe.prototype.writeFloatBE=function(vt,Et,Ct){return ai(this,vt,Et,!1,Ct)};function sn(mt,vt,Et,Ct,_t){return vt=+vt,Et=Et>>>0,_t||Ai(mt,vt,Et,8,17976931348623157e292,-17976931348623157e292),le.write(mt,vt,Et,Ct,52,8),Et+8}oe.prototype.writeDoubleLE=function(vt,Et,Ct){return sn(this,vt,Et,!0,Ct)},oe.prototype.writeDoubleBE=function(vt,Et,Ct){return sn(this,vt,Et,!1,Ct)},oe.prototype.copy=function(vt,Et,Ct,_t){if(!oe.isBuffer(vt))throw new TypeError("argument should be a Buffer");if(Ct||(Ct=0),!_t&&_t!==0&&(_t=this.length),Et>=vt.length&&(Et=vt.length),Et||(Et=0),_t>0&&_t<Ct&&(_t=Ct),_t===Ct||vt.length===0||this.length===0)return 0;if(Et<0)throw new RangeError("targetStart out of bounds");if(Ct<0||Ct>=this.length)throw new RangeError("Index out of range");if(_t<0)throw new RangeError("sourceEnd out of bounds");_t>this.length&&(_t=this.length),vt.length-Et<_t-Ct&&(_t=vt.length-Et+Ct);var Ce=_t-Ct;return this===vt&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(Et,Ct,_t):Uint8Array.prototype.set.call(vt,this.subarray(Ct,_t),Et),Ce},oe.prototype.fill=function(vt,Et,Ct,_t){if(typeof vt=="string"){if(typeof Et=="string"?(_t=Et,Et=0,Ct=this.length):typeof Ct=="string"&&(_t=Ct,Ct=this.length),_t!==void 0&&typeof _t!="string")throw new TypeError("encoding must be a string");if(typeof _t=="string"&&!oe.isEncoding(_t))throw new TypeError("Unknown encoding: "+_t);if(vt.length===1){var Ce=vt.charCodeAt(0);(_t==="utf8"&&Ce<128||_t==="latin1")&&(vt=Ce)}}else typeof vt=="number"?vt=vt&255:typeof vt=="boolean"&&(vt=Number(vt));if(Et<0||this.length<Et||this.length<Ct)throw new RangeError("Out of range index");if(Ct<=Et)return this;Et=Et>>>0,Ct=Ct===void 0?this.length:Ct>>>0,vt||(vt=0);var Ze;if(typeof vt=="number")for(Ze=Et;Ze<Ct;++Ze)this[Ze]=vt;else{var Bn=oe.isBuffer(vt)?vt:oe.from(vt,_t),ze=Bn.length;if(ze===0)throw new TypeError('The value "'+vt+'" is invalid for argument "value"');for(Ze=0;Ze<Ct-Et;++Ze)this[Ze+Et]=Bn[Ze%ze]}return this};var Qn=/[^+/0-9A-Za-z-_]/g;function jn(mt){if(mt=mt.split("=")[0],mt=mt.trim().replace(Qn,""),mt.length<2)return"";for(;mt.length%4!==0;)mt=mt+"=";return mt}function Ti(mt,vt){vt=vt||1/0;for(var Et,Ct=mt.length,_t=null,Ce=[],Ze=0;Ze<Ct;++Ze){if(Et=mt.charCodeAt(Ze),Et>55295&&Et<57344){if(!_t){if(Et>56319){(vt-=3)>-1&&Ce.push(239,191,189);continue}else if(Ze+1===Ct){(vt-=3)>-1&&Ce.push(239,191,189);continue}_t=Et;continue}if(Et<56320){(vt-=3)>-1&&Ce.push(239,191,189),_t=Et;continue}Et=(_t-55296<<10|Et-56320)+65536}else _t&&(vt-=3)>-1&&Ce.push(239,191,189);if(_t=null,Et<128){if((vt-=1)<0)break;Ce.push(Et)}else if(Et<2048){if((vt-=2)<0)break;Ce.push(Et>>6|192,Et&63|128)}else if(Et<65536){if((vt-=3)<0)break;Ce.push(Et>>12|224,Et>>6&63|128,Et&63|128)}else if(Et<1114112){if((vt-=4)<0)break;Ce.push(Et>>18|240,Et>>12&63|128,Et>>6&63|128,Et&63|128)}else throw new Error("Invalid code point")}return Ce}function $e(mt){for(var vt=[],Et=0;Et<mt.length;++Et)vt.push(mt.charCodeAt(Et)&255);return vt}function Le(mt,vt){for(var Et,Ct,_t,Ce=[],Ze=0;Ze<mt.length&&!((vt-=2)<0);++Ze)Et=mt.charCodeAt(Ze),Ct=Et>>8,_t=Et%256,Ce.push(_t),Ce.push(Ct);return Ce}function tn(mt){return Wt.toByteArray(jn(mt))}function hi(mt,vt,Et,Ct){for(var _t=0;_t<Ct&&!(_t+Et>=vt.length||_t>=mt.length);++_t)vt[_t+Et]=mt[_t];return _t}function ni(mt,vt){return mt instanceof vt||mt!=null&&mt.constructor!=null&&mt.constructor.name!=null&&mt.constructor.name===vt.name}function zt(mt){return mt!==mt}var Ft=function(){for(var mt="0123456789abcdef",vt=new Array(256),Et=0;Et<16;++Et)for(var Ct=Et*16,_t=0;_t<16;++_t)vt[Ct+_t]=mt[Et]+mt[_t];return vt}()},14625:function(Sn){function Ve(St){var Wt,le,ve="";if(typeof St=="string"||typeof St=="number")ve+=St;else if(typeof St=="object")if(Array.isArray(St)){var de=St.length;for(Wt=0;Wt<de;Wt++)St[Wt]&&(le=Ve(St[Wt]))&&(ve&&(ve+=" "),ve+=le)}else for(le in St)St[le]&&(ve&&(ve+=" "),ve+=le);return ve}function It(){for(var St,Wt,le=0,ve="",de=arguments.length;le<de;le++)(St=arguments[le])&&(Wt=Ve(St))&&(ve&&(ve+=" "),ve+=Wt);return ve}Sn.exports=It,Sn.exports.clsx=It},99498:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){St.defineOption("placeholder","",function(oe,he,Gt){var Ie=Gt&&Gt!=St.Init;if(he&&!Ie)oe.on("blur",de),oe.on("change",Ht),oe.on("swapDoc",Ht),St.on(oe.getInputField(),"compositionupdate",oe.state.placeholderCompose=function(){ve(oe)}),Ht(oe);else if(!he&&Ie){oe.off("blur",de),oe.off("change",Ht),oe.off("swapDoc",Ht),St.off(oe.getInputField(),"compositionupdate",oe.state.placeholderCompose),Wt(oe);var Xt=oe.getWrapperElement();Xt.className=Xt.className.replace(" CodeMirror-empty","")}he&&!oe.hasFocus()&&de(oe)});function Wt(oe){oe.state.placeholder&&(oe.state.placeholder.parentNode.removeChild(oe.state.placeholder),oe.state.placeholder=null)}function le(oe){Wt(oe);var he=oe.state.placeholder=document.createElement("pre");he.style.cssText="height: 0; overflow: visible",he.style.direction=oe.getOption("direction"),he.className="CodeMirror-placeholder CodeMirror-line-like";var Gt=oe.getOption("placeholder");typeof Gt=="string"&&(Gt=document.createTextNode(Gt)),he.appendChild(Gt),oe.display.lineSpace.insertBefore(he,oe.display.lineSpace.firstChild)}function ve(oe){setTimeout(function(){var he=!1,Gt=oe.getInputField();Gt.nodeName=="TEXTAREA"?he=!Gt.value:oe.lineCount()==1&&(he=!/[^\u200b]/.test(Gt.querySelector(".CodeMirror-line").textContent)),he?le(oe):Wt(oe)},20)}function de(oe){ie(oe)&&le(oe)}function Ht(oe){var he=oe.getWrapperElement(),Gt=ie(oe);he.className=he.className.replace(" CodeMirror-empty","")+(Gt?" CodeMirror-empty":""),Gt?le(oe):Wt(oe)}function ie(oe){return oe.lineCount()===1&&oe.getLine(0)===""}})},25717:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){var Wt={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},le=St.Pos;St.defineOption("autoCloseBrackets",!1,function(nt,et,At){At&&At!=St.Init&&(nt.removeKeyMap(de),nt.state.closeBrackets=null),et&&(Ht(ve(et,"pairs")),nt.state.closeBrackets=et,nt.addKeyMap(de))});function ve(nt,et){return et=="pairs"&&typeof nt=="string"?nt:typeof nt=="object"&&nt[et]!=null?nt[et]:Wt[et]}var de={Backspace:he,Enter:Gt};function Ht(nt){for(var et=0;et<nt.length;et++){var At=nt.charAt(et),at="'"+At+"'";de[at]||(de[at]=ie(At))}}Ht(Wt.pairs+"`");function ie(nt){return function(et){return Xt(et,nt)}}function oe(nt){var et=nt.state.closeBrackets;if(!et||et.override)return et;var At=nt.getModeAt(nt.getCursor());return At.closeBrackets||et}function he(nt){var et=oe(nt);if(!et||nt.getOption("disableInput"))return St.Pass;for(var At=ve(et,"pairs"),at=nt.listSelections(),dt=0;dt<at.length;dt++){if(!at[dt].empty())return St.Pass;var gt=Me(nt,at[dt].head);if(!gt||At.indexOf(gt)%2!=0)return St.Pass}for(var dt=at.length-1;dt>=0;dt--){var xt=at[dt].head;nt.replaceRange("",le(xt.line,xt.ch-1),le(xt.line,xt.ch+1),"+delete")}}function Gt(nt){var et=oe(nt),At=et&&ve(et,"explode");if(!At||nt.getOption("disableInput"))return St.Pass;for(var at=nt.listSelections(),dt=0;dt<at.length;dt++){if(!at[dt].empty())return St.Pass;var gt=Me(nt,at[dt].head);if(!gt||At.indexOf(gt)%2!=0)return St.Pass}nt.operation(function(){var xt=nt.lineSeparator()||`
`;nt.replaceSelection(xt+xt,null),nt.execCommand("goCharLeft"),at=nt.listSelections();for(var bt=0;bt<at.length;bt++){var Ut=at[bt].head.line;nt.indentLine(Ut,null,!0),nt.indentLine(Ut+1,null,!0)}})}function Ie(nt){var et=St.cmpPos(nt.anchor,nt.head)>0;return{anchor:new le(nt.anchor.line,nt.anchor.ch+(et?-1:1)),head:new le(nt.head.line,nt.head.ch+(et?1:-1))}}function Xt(nt,et){var At=oe(nt);if(!At||nt.getOption("disableInput"))return St.Pass;var at=ve(At,"pairs"),dt=at.indexOf(et);if(dt==-1)return St.Pass;for(var gt=ve(At,"closeBefore"),xt=ve(At,"triples"),bt=at.charAt(dt+1)==et,Ut=nt.listSelections(),Rt=dt%2==0,Zt,Yt=0;Yt<Ut.length;Yt++){var te=Ut[Yt],ye=te.head,fe,Ke=nt.getRange(ye,le(ye.line,ye.ch+1));if(Rt&&!te.empty())fe="surround";else if((bt||!Rt)&&Ke==et)bt&&Qt(nt,ye)?fe="both":xt.indexOf(et)>=0&&nt.getRange(ye,le(ye.line,ye.ch+3))==et+et+et?fe="skipThree":fe="skip";else if(bt&&ye.ch>1&&xt.indexOf(et)>=0&&nt.getRange(le(ye.line,ye.ch-2),ye)==et+et){if(ye.ch>2&&/\bstring/.test(nt.getTokenTypeAt(le(ye.line,ye.ch-2))))return St.Pass;fe="addFour"}else if(bt){var _e=ye.ch==0?" ":nt.getRange(le(ye.line,ye.ch-1),ye);if(!St.isWordChar(Ke)&&_e!=et&&!St.isWordChar(_e))fe="both";else return St.Pass}else if(Rt&&(Ke.length===0||/\s/.test(Ke)||gt.indexOf(Ke)>-1))fe="both";else return St.Pass;if(!Zt)Zt=fe;else if(Zt!=fe)return St.Pass}var nn=dt%2?at.charAt(dt-1):et,fn=dt%2?et:at.charAt(dt+1);nt.operation(function(){if(Zt=="skip")nt.execCommand("goCharRight");else if(Zt=="skipThree")for(var xn=0;xn<3;xn++)nt.execCommand("goCharRight");else if(Zt=="surround"){for(var _n=nt.getSelections(),xn=0;xn<_n.length;xn++)_n[xn]=nn+_n[xn]+fn;nt.replaceSelections(_n,"around"),_n=nt.listSelections().slice();for(var xn=0;xn<_n.length;xn++)_n[xn]=Ie(_n[xn]);nt.setSelections(_n)}else Zt=="both"?(nt.replaceSelection(nn+fn,null),nt.triggerElectric(nn+fn),nt.execCommand("goCharLeft")):Zt=="addFour"&&(nt.replaceSelection(nn+nn+nn+nn,"before"),nt.execCommand("goCharRight"))})}function Me(nt,et){var At=nt.getRange(le(et.line,et.ch-1),le(et.line,et.ch+1));return At.length==2?At:null}function Qt(nt,et){var At=nt.getTokenAt(le(et.line,et.ch+1));return/\bstring/.test(At.type)&&At.start==et.ch&&(et.ch==0||!/\bstring/.test(nt.getTokenTypeAt(et)))}})},6313:function(Sn,Ve,It){(function(St){St(It(89780),It(32855))})(function(St){St.defineOption("autoCloseTags",!1,function(he,Gt,Ie){if(Ie!=St.Init&&Ie&&he.removeKeyMap("autoCloseTags"),!!Gt){var Xt={name:"autoCloseTags"};(typeof Gt!="object"||Gt.whenClosing!==!1)&&(Xt["'/'"]=function(Me){return Ht(Me)}),(typeof Gt!="object"||Gt.whenOpening!==!1)&&(Xt["'>'"]=function(Me){return ve(Me)}),he.addKeyMap(Xt)}});var Wt=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],le=["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 ve(he){if(he.getOption("disableInput"))return St.Pass;for(var Gt=he.listSelections(),Ie=[],Xt=he.getOption("autoCloseTags"),Me=0;Me<Gt.length;Me++){if(!Gt[Me].empty())return St.Pass;var Qt=Gt[Me].head,nt=he.getTokenAt(Qt),et=St.innerMode(he.getMode(),nt.state),At=et.state,at=et.mode.xmlCurrentTag&&et.mode.xmlCurrentTag(At),dt=at&&at.name;if(!dt)return St.Pass;var gt=et.mode.configuration=="html",xt=typeof Xt=="object"&&Xt.dontCloseTags||gt&&Wt,bt=typeof Xt=="object"&&Xt.indentTags||gt&&le;nt.end>Qt.ch&&(dt=dt.slice(0,dt.length-nt.end+Qt.ch));var Ut=dt.toLowerCase();if(!dt||nt.type=="string"&&(nt.end!=Qt.ch||!/[\"\']/.test(nt.string.charAt(nt.string.length-1))||nt.string.length==1)||nt.type=="tag"&&at.close||nt.string.indexOf("/")==Qt.ch-nt.start-1||xt&&ie(xt,Ut)>-1||oe(he,et.mode.xmlCurrentContext&&et.mode.xmlCurrentContext(At)||[],dt,Qt,!0))return St.Pass;var Rt=typeof Xt=="object"&&Xt.emptyTags;if(Rt&&ie(Rt,dt)>-1){Ie[Me]={text:"/>",newPos:St.Pos(Qt.line,Qt.ch+2)};continue}var Zt=bt&&ie(bt,Ut)>-1;Ie[Me]={indent:Zt,text:">"+(Zt?`
`:"")+"</"+dt+">",newPos:Zt?St.Pos(Qt.line+1,0):St.Pos(Qt.line,Qt.ch+1)}}for(var Yt=typeof Xt=="object"&&Xt.dontIndentOnAutoClose,Me=Gt.length-1;Me>=0;Me--){var te=Ie[Me];he.replaceRange(te.text,Gt[Me].head,Gt[Me].anchor,"+insert");var ye=he.listSelections().slice(0);ye[Me]={head:te.newPos,anchor:te.newPos},he.setSelections(ye),!Yt&&te.indent&&(he.indentLine(te.newPos.line,null,!0),he.indentLine(te.newPos.line+1,null,!0))}}function de(he,Gt){for(var Ie=he.listSelections(),Xt=[],Me=Gt?"/":"</",Qt=he.getOption("autoCloseTags"),nt=typeof Qt=="object"&&Qt.dontIndentOnSlash,et=0;et<Ie.length;et++){if(!Ie[et].empty())return St.Pass;var At=Ie[et].head,at=he.getTokenAt(At),dt=St.innerMode(he.getMode(),at.state),gt=dt.state;if(Gt&&(at.type=="string"||at.string.charAt(0)!="<"||at.start!=At.ch-1))return St.Pass;var xt,bt=dt.mode.name!="xml"&&he.getMode().name=="htmlmixed";if(bt&&dt.mode.name=="javascript")xt=Me+"script";else if(bt&&dt.mode.name=="css")xt=Me+"style";else{var Ut=dt.mode.xmlCurrentContext&&dt.mode.xmlCurrentContext(gt);if(!Ut||Ut.length&&oe(he,Ut,Ut[Ut.length-1],At))return St.Pass;xt=Me+Ut[Ut.length-1]}he.getLine(At.line).charAt(at.end)!=">"&&(xt+=">"),Xt[et]=xt}if(he.replaceSelections(Xt),Ie=he.listSelections(),!nt)for(var et=0;et<Ie.length;et++)(et==Ie.length-1||Ie[et].head.line<Ie[et+1].head.line)&&he.indentLine(Ie[et].head.line)}function Ht(he){return he.getOption("disableInput")?St.Pass:de(he,!0)}St.commands.closeTag=function(he){return de(he)};function ie(he,Gt){if(he.indexOf)return he.indexOf(Gt);for(var Ie=0,Xt=he.length;Ie<Xt;++Ie)if(he[Ie]==Gt)return Ie;return-1}function oe(he,Gt,Ie,Xt,Me){if(!St.scanForClosingTag)return!1;var Qt=Math.min(he.lastLine()+1,Xt.line+500),nt=St.scanForClosingTag(he,Xt,null,Qt);if(!nt||nt.tag!=Ie)return!1;for(var et=Me?1:0,At=Gt.length-1;At>=0&&Gt[At]==Ie;At--)++et;Xt=nt.to;for(var At=1;At<et;At++){var at=St.scanForClosingTag(he,Xt,null,Qt);if(!at||at.tag!=Ie)return!1;Xt=at.to}return!0}})},32855:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){"use strict";var Wt=St.Pos;function le(At,at){return At.line-at.line||At.ch-at.ch}var ve="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",de=ve+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",Ht=new RegExp("<(/?)(["+ve+"]["+de+"]*)","g");function ie(At,at,dt,gt){this.line=at,this.ch=dt,this.cm=At,this.text=At.getLine(at),this.min=gt?Math.max(gt.from,At.firstLine()):At.firstLine(),this.max=gt?Math.min(gt.to-1,At.lastLine()):At.lastLine()}function oe(At,at){var dt=At.cm.getTokenTypeAt(Wt(At.line,at));return dt&&/\btag\b/.test(dt)}function he(At){if(!(At.line>=At.max))return At.ch=0,At.text=At.cm.getLine(++At.line),!0}function Gt(At){if(!(At.line<=At.min))return At.text=At.cm.getLine(--At.line),At.ch=At.text.length,!0}function Ie(At){for(;;){var at=At.text.indexOf(">",At.ch);if(at==-1){if(he(At))continue;return}if(!oe(At,at+1)){At.ch=at+1;continue}var dt=At.text.lastIndexOf("/",at),gt=dt>-1&&!/\S/.test(At.text.slice(dt+1,at));return At.ch=at+1,gt?"selfClose":"regular"}}function Xt(At){for(;;){var at=At.ch?At.text.lastIndexOf("<",At.ch-1):-1;if(at==-1){if(Gt(At))continue;return}if(!oe(At,at+1)){At.ch=at;continue}Ht.lastIndex=at,At.ch=at;var dt=Ht.exec(At.text);if(dt&&dt.index==at)return dt}}function Me(At){for(;;){Ht.lastIndex=At.ch;var at=Ht.exec(At.text);if(!at){if(he(At))continue;return}if(!oe(At,at.index+1)){At.ch=at.index+1;continue}return At.ch=at.index+at[0].length,at}}function Qt(At){for(;;){var at=At.ch?At.text.lastIndexOf(">",At.ch-1):-1;if(at==-1){if(Gt(At))continue;return}if(!oe(At,at+1)){At.ch=at;continue}var dt=At.text.lastIndexOf("/",at),gt=dt>-1&&!/\S/.test(At.text.slice(dt+1,at));return At.ch=at+1,gt?"selfClose":"regular"}}function nt(At,at){for(var dt=[];;){var gt=Me(At),xt,bt=At.line,Ut=At.ch-(gt?gt[0].length:0);if(!gt||!(xt=Ie(At)))return;if(xt!="selfClose")if(gt[1]){for(var Rt=dt.length-1;Rt>=0;--Rt)if(dt[Rt]==gt[2]){dt.length=Rt;break}if(Rt<0&&(!at||at==gt[2]))return{tag:gt[2],from:Wt(bt,Ut),to:Wt(At.line,At.ch)}}else dt.push(gt[2])}}function et(At,at){for(var dt=[];;){var gt=Qt(At);if(!gt)return;if(gt=="selfClose"){Xt(At);continue}var xt=At.line,bt=At.ch,Ut=Xt(At);if(!Ut)return;if(Ut[1])dt.push(Ut[2]);else{for(var Rt=dt.length-1;Rt>=0;--Rt)if(dt[Rt]==Ut[2]){dt.length=Rt;break}if(Rt<0&&(!at||at==Ut[2]))return{tag:Ut[2],from:Wt(At.line,At.ch),to:Wt(xt,bt)}}}}St.registerHelper("fold","xml",function(At,at){for(var dt=new ie(At,at.line,0);;){var gt=Me(dt);if(!gt||dt.line!=at.line)return;var xt=Ie(dt);if(!xt)return;if(!gt[1]&&xt!="selfClose"){var bt=Wt(dt.line,dt.ch),Ut=nt(dt,gt[2]);return Ut&&le(Ut.from,bt)>0?{from:bt,to:Ut.from}:null}}}),St.findMatchingTag=function(At,at,dt){var gt=new ie(At,at.line,at.ch,dt);if(!(gt.text.indexOf(">")==-1&&gt.text.indexOf("<")==-1)){var xt=Ie(gt),bt=xt&&Wt(gt.line,gt.ch),Ut=xt&&Xt(gt);if(!(!xt||!Ut||le(gt,at)>0)){var Rt={from:Wt(gt.line,gt.ch),to:bt,tag:Ut[2]};return xt=="selfClose"?{open:Rt,close:null,at:"open"}:Ut[1]?{open:et(gt,Ut[2]),close:Rt,at:"close"}:(gt=new ie(At,bt.line,bt.ch,dt),{open:Rt,close:nt(gt,Ut[2]),at:"open"})}}},St.findEnclosingTag=function(At,at,dt,gt){for(var xt=new ie(At,at.line,at.ch,dt);;){var bt=et(xt,gt);if(!bt)break;var Ut=new ie(At,at.line,at.ch,dt),Rt=nt(Ut,bt.tag);if(Rt)return{open:bt,close:Rt}}},St.scanForClosingTag=function(At,at,dt,gt){var xt=new ie(At,at.line,at.ch,gt?{from:0,to:gt}:null);return nt(xt,dt)}})},89780:function(Sn){(function(Ve,It){Sn.exports=It()})(this,function(){"use strict";var Ve=navigator.userAgent,It=navigator.platform,St=/gecko\/\d/i.test(Ve),Wt=/MSIE \d/.test(Ve),le=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Ve),ve=/Edge\/(\d+)/.exec(Ve),de=Wt||le||ve,Ht=de&&(Wt?document.documentMode||6:+(ve||le)[1]),ie=!ve&&/WebKit\//.test(Ve),oe=ie&&/Qt\/\d+\.\d+/.test(Ve),he=!ve&&/Chrome\//.test(Ve),Gt=/Opera\//.test(Ve),Ie=/Apple Computer/.test(navigator.vendor),Xt=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Ve),Me=/PhantomJS/.test(Ve),Qt=!ve&&/AppleWebKit/.test(Ve)&&/Mobile\/\w+/.test(Ve),nt=/Android/.test(Ve),et=Qt||nt||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Ve),At=Qt||/Mac/.test(It),at=/\bCrOS\b/.test(Ve),dt=/win/i.test(It),gt=Gt&&Ve.match(/Version\/(\d*\.\d*)/);gt&&(gt=Number(gt[1])),gt&&gt>=15&&(Gt=!1,ie=!0);var xt=At&&(oe||Gt&&(gt==null||gt<12.11)),bt=St||de&&Ht>=9;function Ut(it){return new RegExp("(^|\\s)"+it+"(?:$|\\s)\\s*")}var Rt=function(it,st){var ct=it.className,ht=Ut(st).exec(ct);if(ht){var pt=ct.slice(ht.index+ht[0].length);it.className=ct.slice(0,ht.index)+(pt?ht[1]+pt:"")}};function Zt(it){for(var st=it.childNodes.length;st>0;--st)it.removeChild(it.firstChild);return it}function Yt(it,st){return Zt(it).appendChild(st)}function te(it,st,ct,ht){var pt=document.createElement(it);if(ct&&(pt.className=ct),ht&&(pt.style.cssText=ht),typeof st=="string")pt.appendChild(document.createTextNode(st));else if(st)for(var Nt=0;Nt<st.length;++Nt)pt.appendChild(st[Nt]);return pt}function ye(it,st,ct,ht){var pt=te(it,st,ct,ht);return pt.setAttribute("role","presentation"),pt}var fe;document.createRange?fe=function(it,st,ct,ht){var pt=document.createRange();return pt.setEnd(ht||it,ct),pt.setStart(it,st),pt}:fe=function(it,st,ct){var ht=document.body.createTextRange();try{ht.moveToElementText(it.parentNode)}catch(pt){return ht}return ht.collapse(!0),ht.moveEnd("character",ct),ht.moveStart("character",st),ht};function Ke(it,st){if(st.nodeType==3&&(st=st.parentNode),it.contains)return it.contains(st);do if(st.nodeType==11&&(st=st.host),st==it)return!0;while(st=st.parentNode)}function _e(){var it;try{it=document.activeElement}catch(st){it=document.body||null}for(;it&&it.shadowRoot&&it.shadowRoot.activeElement;)it=it.shadowRoot.activeElement;return it}function nn(it,st){var ct=it.className;Ut(st).test(ct)||(it.className+=(ct?" ":"")+st)}function fn(it,st){for(var ct=it.split(" "),ht=0;ht<ct.length;ht++)ct[ht]&&!Ut(ct[ht]).test(st)&&(st+=" "+ct[ht]);return st}var xn=function(it){it.select()};Qt?xn=function(it){it.selectionStart=0,it.selectionEnd=it.value.length}:de&&(xn=function(it){try{it.select()}catch(st){}});function _n(it){var st=Array.prototype.slice.call(arguments,1);return function(){return it.apply(null,st)}}function Xn(it,st,ct){st||(st={});for(var ht in it)it.hasOwnProperty(ht)&&(ct!==!1||!st.hasOwnProperty(ht))&&(st[ht]=it[ht]);return st}function pe(it,st,ct,ht,pt){st==null&&(st=it.search(/[^\s\u00a0]/),st==-1&&(st=it.length));for(var Nt=ht||0,Kt=pt||0;;){var qt=it.indexOf(" ",Nt);if(qt<0||qt>=st)return Kt+(st-Nt);Kt+=qt-Nt,Kt+=ct-Kt%ct,Nt=qt+1}}var ne=function(){this.id=null,this.f=null,this.time=0,this.handler=_n(this.onTimeout,this)};ne.prototype.onTimeout=function(it){it.id=0,it.time<=+new Date?it.f():setTimeout(it.handler,it.time-+new Date)},ne.prototype.set=function(it,st){this.f=st;var ct=+new Date+it;(!this.id||ct<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,it),this.time=ct)};function pn(it,st){for(var ct=0;ct<it.length;++ct)if(it[ct]==st)return ct;return-1}var Ai=50,ai={toString:function(){return"CodeMirror.Pass"}},sn={scroll:!1},Qn={origin:"*mouse"},jn={origin:"+move"};function Ti(it,st,ct){for(var ht=0,pt=0;;){var Nt=it.indexOf(" ",ht);Nt==-1&&(Nt=it.length);var Kt=Nt-ht;if(Nt==it.length||pt+Kt>=st)return ht+Math.min(Kt,st-pt);if(pt+=Nt-ht,pt+=ct-pt%ct,ht=Nt+1,pt>=st)return ht}}var $e=[""];function Le(it){for(;$e.length<=it;)$e.push(tn($e)+" ");return $e[it]}function tn(it){return it[it.length-1]}function hi(it,st){for(var ct=[],ht=0;ht<it.length;ht++)ct[ht]=st(it[ht],ht);return ct}function ni(it,st,ct){for(var ht=0,pt=ct(st);ht<it.length&&ct(it[ht])<=pt;)ht++;it.splice(ht,0,st)}function zt(){}function Ft(it,st){var ct;return Object.create?ct=Object.create(it):(zt.prototype=it,ct=new zt),st&&Xn(st,ct),ct}var mt=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function vt(it){return/\w/.test(it)||it>"\x80"&&(it.toUpperCase()!=it.toLowerCase()||mt.test(it))}function Et(it,st){return st?st.source.indexOf("\\w")>-1&&vt(it)?!0:st.test(it):vt(it)}function Ct(it){for(var st in it)if(it.hasOwnProperty(st)&&it[st])return!1;return!0}var _t=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function Ce(it){return it.charCodeAt(0)>=768&&_t.test(it)}function Ze(it,st,ct){for(;(ct<0?st>0:st<it.length)&&Ce(it.charAt(st));)st+=ct;return st}function Bn(it,st,ct){for(var ht=st>ct?-1:1;;){if(st==ct)return st;var pt=(st+ct)/2,Nt=ht<0?Math.ceil(pt):Math.floor(pt);if(Nt==st)return it(Nt)?st:ct;it(Nt)?ct=Nt:st=Nt+ht}}function ze(it,st,ct,ht){if(!it)return ht(st,ct,"ltr",0);for(var pt=!1,Nt=0;Nt<it.length;++Nt){var Kt=it[Nt];(Kt.from<ct&&Kt.to>st||st==ct&&Kt.to==st)&&(ht(Math.max(Kt.from,st),Math.min(Kt.to,ct),Kt.level==1?"rtl":"ltr",Nt),pt=!0)}pt||ht(st,ct,"ltr")}var Ue=null;function Xe(it,st,ct){var ht;Ue=null;for(var pt=0;pt<it.length;++pt){var Nt=it[pt];if(Nt.from<st&&Nt.to>st)return pt;Nt.to==st&&(Nt.from!=Nt.to&&ct=="before"?ht=pt:Ue=pt),Nt.from==st&&(Nt.from!=Nt.to&&ct!="before"?ht=pt:Ue=pt)}return ht!=null?ht:Ue}var dn=function(){var it="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",st="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function ct(me){return me<=247?it.charAt(me):1424<=me&&me<=1524?"R":1536<=me&&me<=1785?st.charAt(me-1536):1774<=me&&me<=2220?"r":8192<=me&&me<=8203?"w":me==8204?"b":"L"}var ht=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,pt=/[stwN]/,Nt=/[LRr]/,Kt=/[Lb1n]/,qt=/[1n]/;function Jt(me,en,Se){this.level=me,this.from=en,this.to=Se}return function(me,en){var Se=en=="ltr"?"L":"R";if(me.length==0||en=="ltr"&&!ht.test(me))return!1;for(var bn=me.length,Pn=[],Ii=0;Ii<bn;++Ii)Pn.push(ct(me.charCodeAt(Ii)));for(var Hi=0,Ji=Se;Hi<bn;++Hi){var dr=Pn[Hi];dr=="m"?Pn[Hi]=Ji:Ji=dr}for(var Rr=0,Er=Se;Rr<bn;++Rr){var jr=Pn[Rr];jr=="1"&&Er=="r"?Pn[Rr]="n":Nt.test(jr)&&(Er=jr,jr=="r"&&(Pn[Rr]="R"))}for(var po=1,Pr=Pn[0];po<bn-1;++po){var No=Pn[po];No=="+"&&Pr=="1"&&Pn[po+1]=="1"?Pn[po]="1":No==","&&Pr==Pn[po+1]&&(Pr=="1"||Pr=="n")&&(Pn[po]=Pr),Pr=No}for(var _s=0;_s<bn;++_s){var Fa=Pn[_s];if(Fa==",")Pn[_s]="N";else if(Fa=="%"){var Ys=void 0;for(Ys=_s+1;Ys<bn&&Pn[Ys]=="%";++Ys);for(var yl=_s&&Pn[_s-1]=="!"||Ys<bn&&Pn[Ys]=="1"?"1":"N",Da=_s;Da<Ys;++Da)Pn[Da]=yl;_s=Ys-1}}for(var xa=0,al=Se;xa<bn;++xa){var Ha=Pn[xa];al=="L"&&Ha=="1"?Pn[xa]="L":Nt.test(Ha)&&(al=Ha)}for(var Br=0;Br<bn;++Br)if(pt.test(Pn[Br])){var Xo=void 0;for(Xo=Br+1;Xo<bn&&pt.test(Pn[Xo]);++Xo);for(var Ks=(Br?Pn[Br-1]:Se)=="L",Ns=(Xo<bn?Pn[Xo]:Se)=="L",_a=Ks==Ns?Ks?"L":"R":Se,$o=Br;$o<Xo;++$o)Pn[$o]=_a;Br=Xo-1}for(var Lo=[],wl,na=0;na<bn;)if(Kt.test(Pn[na])){var XA=na;for(++na;na<bn&&Kt.test(Pn[na]);++na);Lo.push(new Jt(0,XA,na))}else{var Xl=na,Za=Lo.length,xl=en=="rtl"?1:0;for(++na;na<bn&&Pn[na]!="L";++na);for(var Ls=Xl;Ls<na;)if(qt.test(Pn[Ls])){Xl<Ls&&(Lo.splice(Za,0,new Jt(1,Xl,Ls)),Za+=xl);var Ea=Ls;for(++Ls;Ls<na&&qt.test(Pn[Ls]);++Ls);Lo.splice(Za,0,new Jt(2,Ea,Ls)),Za+=xl,Xl=Ls}else++Ls;Xl<na&&Lo.splice(Za,0,new Jt(1,Xl,na))}return en=="ltr"&&(Lo[0].level==1&&(wl=me.match(/^\s+/))&&(Lo[0].from=wl[0].length,Lo.unshift(new Jt(0,0,wl[0].length))),tn(Lo).level==1&&(wl=me.match(/\s+$/))&&(tn(Lo).to-=wl[0].length,Lo.push(new Jt(0,bn-wl[0].length,bn)))),en=="rtl"?Lo.reverse():Lo}}();function Kn(it,st){var ct=it.order;return ct==null&&(ct=it.order=dn(it.text,st)),ct}var mn=[],be=function(it,st,ct){if(it.addEventListener)it.addEventListener(st,ct,!1);else if(it.attachEvent)it.attachEvent("on"+st,ct);else{var ht=it._handlers||(it._handlers={});ht[st]=(ht[st]||mn).concat(ct)}};function ei(it,st){return it._handlers&&it._handlers[st]||mn}function kn(it,st,ct){if(it.removeEventListener)it.removeEventListener(st,ct,!1);else if(it.detachEvent)it.detachEvent("on"+st,ct);else{var ht=it._handlers,pt=ht&&ht[st];if(pt){var Nt=pn(pt,ct);Nt>-1&&(ht[st]=pt.slice(0,Nt).concat(pt.slice(Nt+1)))}}}function On(it,st){var ct=ei(it,st);if(ct.length)for(var ht=Array.prototype.slice.call(arguments,2),pt=0;pt<ct.length;++pt)ct[pt].apply(null,ht)}function Vn(it,st,ct){return typeof st=="string"&&(st={type:st,preventDefault:function(){this.defaultPrevented=!0}}),On(it,ct||st.type,it,st),ii(st)||st.codemirrorIgnore}function Ki(it){var st=it._handlers&&it._handlers.cursorActivity;if(st)for(var ct=it.curOp.cursorActivityHandlers||(it.curOp.cursorActivityHandlers=[]),ht=0;ht<st.length;++ht)pn(ct,st[ht])==-1&&ct.push(st[ht])}function si(it,st){return ei(it,st).length>0}function yi(it){it.prototype.on=function(st,ct){be(this,st,ct)},it.prototype.off=function(st,ct){kn(this,st,ct)}}function Ei(it){it.preventDefault?it.preventDefault():it.returnValue=!1}function qi(it){it.stopPropagation?it.stopPropagation():it.cancelBubble=!0}function ii(it){return it.defaultPrevented!=null?it.defaultPrevented:it.returnValue==!1}function ar(it){Ei(it),qi(it)}function Xi(it){return it.target||it.srcElement}function lr(it){var st=it.which;return st==null&&(it.button&1?st=1:it.button&2?st=3:it.button&4&&(st=2)),At&&it.ctrlKey&&st==1&&(st=3),st}var zi=function(){if(de&&Ht<9)return!1;var it=te("div");return"draggable"in it||"dragDrop"in it}(),Kr;function Ir(it){if(Kr==null){var st=te("span","\u200B");Yt(it,te("span",[st,document.createTextNode("x")])),it.firstChild.offsetHeight!=0&&(Kr=st.offsetWidth<=1&&st.offsetHeight>2&&!(de&&Ht<8))}var ct=Kr?te("span","\u200B"):te("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return ct.setAttribute("cm-text",""),ct}var Or;function Yi(it){if(Or!=null)return Or;var st=Yt(it,document.createTextNode("A\u062EA")),ct=fe(st,0,1).getBoundingClientRect(),ht=fe(st,1,2).getBoundingClientRect();return Zt(it),!ct||ct.left==ct.right?!1:Or=ht.right-ct.right<3}var kr=`
b`.split(/\n/).length!=3?function(it){for(var st=0,ct=[],ht=it.length;st<=ht;){var pt=it.indexOf(`
`,st);pt==-1&&(pt=it.length);var Nt=it.slice(st,it.charAt(pt-1)=="\r"?pt-1:pt),Kt=Nt.indexOf("\r");Kt!=-1?(ct.push(Nt.slice(0,Kt)),st+=Kt+1):(ct.push(Nt),st=pt+1)}return ct}:function(it){return it.split(/\r\n?|\n/)},kt=window.getSelection?function(it){try{return it.selectionStart!=it.selectionEnd}catch(st){return!1}}:function(it){var st;try{st=it.ownerDocument.selection.createRange()}catch(ct){}return!st||st.parentElement()!=it?!1:st.compareEndPoints("StartToEnd",st)!=0},tr=function(){var it=te("div");return"oncopy"in it?!0:(it.setAttribute("oncopy","return;"),typeof it.oncopy=="function")}(),Fi=null;function ri(it){if(Fi!=null)return Fi;var st=Yt(it,te("span","x")),ct=st.getBoundingClientRect(),ht=fe(st,0,1).getBoundingClientRect();return Fi=Math.abs(ct.left-ht.left)>1}var Li={},Ui={};function Ri(it,st){arguments.length>2&&(st.dependencies=Array.prototype.slice.call(arguments,2)),Li[it]=st}function Lr(it,st){Ui[it]=st}function an(it){if(typeof it=="string"&&Ui.hasOwnProperty(it))it=Ui[it];else if(it&&typeof it.name=="string"&&Ui.hasOwnProperty(it.name)){var st=Ui[it.name];typeof st=="string"&&(st={name:st}),it=Ft(st,it),it.name=st.name}else{if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(it))return an("application/xml");if(typeof it=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(it))return an("application/json")}return typeof it=="string"?{name:it}:it||{name:"null"}}function rn(it,st){st=an(st);var ct=Li[st.name];if(!ct)return rn(it,"text/plain");var ht=ct(it,st);if(Ge.hasOwnProperty(st.name)){var pt=Ge[st.name];for(var Nt in pt)pt.hasOwnProperty(Nt)&&(ht.hasOwnProperty(Nt)&&(ht["_"+Nt]=ht[Nt]),ht[Nt]=pt[Nt])}if(ht.name=st.name,st.helperType&&(ht.helperType=st.helperType),st.modeProps)for(var Kt in st.modeProps)ht[Kt]=st.modeProps[Kt];return ht}var Ge={};function yn(it,st){var ct=Ge.hasOwnProperty(it)?Ge[it]:Ge[it]={};Xn(st,ct)}function ji(it,st){if(st===!0)return st;if(it.copyState)return it.copyState(st);var ct={};for(var ht in st){var pt=st[ht];pt instanceof Array&&(pt=pt.concat([])),ct[ht]=pt}return ct}function Mi(it,st){for(var ct;it.innerMode&&(ct=it.innerMode(st),!(!ct||ct.mode==it));)st=ct.state,it=ct.mode;return ct||{mode:it,state:st}}function or(it,st,ct){return it.startState?it.startState(st,ct):!0}var ln=function(it,st,ct){this.pos=this.start=0,this.string=it,this.tabSize=st||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=ct};ln.prototype.eol=function(){return this.pos>=this.string.length},ln.prototype.sol=function(){return this.pos==this.lineStart},ln.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},ln.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},ln.prototype.eat=function(it){var st=this.string.charAt(this.pos),ct;if(typeof it=="string"?ct=st==it:ct=st&&(it.test?it.test(st):it(st)),ct)return++this.pos,st},ln.prototype.eatWhile=function(it){for(var st=this.pos;this.eat(it););return this.pos>st},ln.prototype.eatSpace=function(){for(var it=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>it},ln.prototype.skipToEnd=function(){this.pos=this.string.length},ln.prototype.skipTo=function(it){var st=this.string.indexOf(it,this.pos);if(st>-1)return this.pos=st,!0},ln.prototype.backUp=function(it){this.pos-=it},ln.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=pe(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},ln.prototype.indentation=function(){return pe(this.string,null,this.tabSize)-(this.lineStart?pe(this.string,this.lineStart,this.tabSize):0)},ln.prototype.match=function(it,st,ct){if(typeof it=="string"){var ht=function(Kt){return ct?Kt.toLowerCase():Kt},pt=this.string.substr(this.pos,it.length);if(ht(pt)==ht(it))return st!==!1&&(this.pos+=it.length),!0}else{var Nt=this.string.slice(this.pos).match(it);return Nt&&Nt.index>0?null:(Nt&&st!==!1&&(this.pos+=Nt[0].length),Nt)}},ln.prototype.current=function(){return this.string.slice(this.start,this.pos)},ln.prototype.hideFirstChars=function(it,st){this.lineStart+=it;try{return st()}finally{this.lineStart-=it}},ln.prototype.lookAhead=function(it){var st=this.lineOracle;return st&&st.lookAhead(it)},ln.prototype.baseToken=function(){var it=this.lineOracle;return it&&it.baseToken(this.pos)};function Ln(it,st){if(st-=it.first,st<0||st>=it.size)throw new Error("There is no line "+(st+it.first)+" in the document.");for(var ct=it;!ct.lines;)for(var ht=0;;++ht){var pt=ct.children[ht],Nt=pt.chunkSize();if(st<Nt){ct=pt;break}st-=Nt}return ct.lines[st]}function Pe(it,st,ct){var ht=[],pt=st.line;return it.iter(st.line,ct.line+1,function(Nt){var Kt=Nt.text;pt==ct.line&&(Kt=Kt.slice(0,ct.ch)),pt==st.line&&(Kt=Kt.slice(st.ch)),ht.push(Kt),++pt}),ht}function sr(it,st,ct){var ht=[];return it.iter(st,ct,function(pt){ht.push(pt.text)}),ht}function $n(it,st){var ct=st-it.height;if(ct)for(var ht=it;ht;ht=ht.parent)ht.height+=ct}function se(it){if(it.parent==null)return null;for(var st=it.parent,ct=pn(st.lines,it),ht=st.parent;ht;st=ht,ht=ht.parent)for(var pt=0;ht.children[pt]!=st;++pt)ct+=ht.children[pt].chunkSize();return ct+st.first}function De(it,st){var ct=it.first;t:do{for(var ht=0;ht<it.children.length;++ht){var pt=it.children[ht],Nt=pt.height;if(st<Nt){it=pt;continue t}st-=Nt,ct+=pt.chunkSize()}return ct}while(!it.lines);for(var Kt=0;Kt<it.lines.length;++Kt){var qt=it.lines[Kt],Jt=qt.height;if(st<Jt)break;st-=Jt}return ct+Kt}function qn(it,st){return st>=it.first&&st<it.first+it.size}function Zn(it,st){return String(it.lineNumberFormatter(st+it.firstLineNumber))}function Ye(it,st,ct){if(ct===void 0&&(ct=null),!(this instanceof Ye))return new Ye(it,st,ct);this.line=it,this.ch=st,this.sticky=ct}function Dn(it,st){return it.line-st.line||it.ch-st.ch}function bi(it,st){return it.sticky==st.sticky&&Dn(it,st)==0}function ki(it){return Ye(it.line,it.ch)}function Ni(it,st){return Dn(it,st)<0?st:it}function li(it,st){return Dn(it,st)<0?it:st}function ci(it,st){return Math.max(it.first,Math.min(st,it.first+it.size-1))}function fi(it,st){if(st.line<it.first)return Ye(it.first,0);var ct=it.first+it.size-1;return st.line>ct?Ye(ct,Ln(it,ct).text.length):Fn(st,Ln(it,st.line).text.length)}function Fn(it,st){var ct=it.ch;return ct==null||ct>st?Ye(it.line,st):ct<0?Ye(it.line,0):it}function un(it,st){for(var ct=[],ht=0;ht<st.length;ht++)ct[ht]=fi(it,st[ht]);return ct}var We=function(it,st){this.state=it,this.lookAhead=st},Mn=function(it,st,ct,ht){this.state=st,this.doc=it,this.line=ct,this.maxLookAhead=ht||0,this.baseTokens=null,this.baseTokenPos=1};Mn.prototype.lookAhead=function(it){var st=this.doc.getLine(this.line+it);return st!=null&&it>this.maxLookAhead&&(this.maxLookAhead=it),st},Mn.prototype.baseToken=function(it){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=it;)this.baseTokenPos+=2;var st=this.baseTokens[this.baseTokenPos+1];return{type:st&&st.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-it}},Mn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Mn.fromSaved=function(it,st,ct){return st instanceof We?new Mn(it,ji(it.mode,st.state),ct,st.lookAhead):new Mn(it,ji(it.mode,st),ct)},Mn.prototype.save=function(it){var st=it!==!1?ji(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new We(st,this.maxLookAhead):st};function $i(it,st,ct,ht){var pt=[it.state.modeGen],Nt={};Tr(it,st.text,it.doc.mode,ct,function(me,en){return pt.push(me,en)},Nt,ht);for(var Kt=ct.state,qt=function(me){ct.baseTokens=pt;var en=it.state.overlays[me],Se=1,bn=0;ct.state=!0,Tr(it,st.text,en.mode,ct,function(Pn,Ii){for(var Hi=Se;bn<Pn;){var Ji=pt[Se];Ji>Pn&&pt.splice(Se,1,Pn,pt[Se+1],Ji),Se+=2,bn=Math.min(Pn,Ji)}if(Ii)if(en.opaque)pt.splice(Hi,Se-Hi,Pn,"overlay "+Ii),Se=Hi+2;else for(;Hi<Se;Hi+=2){var dr=pt[Hi+1];pt[Hi+1]=(dr?dr+" ":"")+"overlay "+Ii}},Nt),ct.state=Kt,ct.baseTokens=null,ct.baseTokenPos=1},Jt=0;Jt<it.state.overlays.length;++Jt)qt(Jt);return{styles:pt,classes:Nt.bgClass||Nt.textClass?Nt:null}}function hr(it,st,ct){if(!st.styles||st.styles[0]!=it.state.modeGen){var ht=vr(it,se(st)),pt=st.text.length>it.options.maxHighlightLength&&ji(it.doc.mode,ht.state),Nt=$i(it,st,ht);pt&&(ht.state=pt),st.stateAfter=ht.save(!pt),st.styles=Nt.styles,Nt.classes?st.styleClasses=Nt.classes:st.styleClasses&&(st.styleClasses=null),ct===it.doc.highlightFrontier&&(it.doc.modeFrontier=Math.max(it.doc.modeFrontier,++it.doc.highlightFrontier))}return st.styles}function vr(it,st,ct){var ht=it.doc,pt=it.display;if(!ht.mode.startState)return new Mn(ht,!0,st);var Nt=gr(it,st,ct),Kt=Nt>ht.first&&Ln(ht,Nt-1).stateAfter,qt=Kt?Mn.fromSaved(ht,Kt,Nt):new Mn(ht,or(ht.mode),Nt);return ht.iter(Nt,st,function(Jt){Te(it,Jt.text,qt);var me=qt.line;Jt.stateAfter=me==st-1||me%5==0||me>=pt.viewFrom&&me<pt.viewTo?qt.save():null,qt.nextLine()}),ct&&(ht.modeFrontier=qt.line),qt}function Te(it,st,ct,ht){var pt=it.doc.mode,Nt=new ln(st,it.options.tabSize,ct);for(Nt.start=Nt.pos=ht||0,st==""&&xi(pt,ct.state);!Nt.eol();)er(pt,Nt,ct.state),Nt.start=Nt.pos}function xi(it,st){if(it.blankLine)return it.blankLine(st);if(it.innerMode){var ct=Mi(it,st);if(ct.mode.blankLine)return ct.mode.blankLine(ct.state)}}function er(it,st,ct,ht){for(var pt=0;pt<10;pt++){ht&&(ht[0]=Mi(it,ct).mode);var Nt=it.token(st,ct);if(st.pos>st.start)return Nt}throw new Error("Mode "+it.name+" failed to advance stream.")}var Si=function(it,st,ct){this.start=it.start,this.end=it.pos,this.string=it.current(),this.type=st||null,this.state=ct};function Mr(it,st,ct,ht){var pt=it.doc,Nt=pt.mode,Kt;st=fi(pt,st);var qt=Ln(pt,st.line),Jt=vr(it,st.line,ct),me=new ln(qt.text,it.options.tabSize,Jt),en;for(ht&&(en=[]);(ht||me.pos<st.ch)&&!me.eol();)me.start=me.pos,Kt=er(Nt,me,Jt.state),ht&&en.push(new Si(me,Kt,ji(pt.mode,Jt.state)));return ht?en:new Si(me,Kt,Jt.state)}function ur(it,st){if(it)for(;;){var ct=it.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!ct)break;it=it.slice(0,ct.index)+it.slice(ct.index+ct[0].length);var ht=ct[1]?"bgClass":"textClass";st[ht]==null?st[ht]=ct[2]:new RegExp("(?:^|\\s)"+ct[2]+"(?:$|\\s)").test(st[ht])||(st[ht]+=" "+ct[2])}return it}function Tr(it,st,ct,ht,pt,Nt,Kt){var qt=ct.flattenSpans;qt==null&&(qt=it.options.flattenSpans);var Jt=0,me=null,en=new ln(st,it.options.tabSize,ht),Se,bn=it.options.addModeClass&&[null];for(st==""&&ur(xi(ct,ht.state),Nt);!en.eol();){if(en.pos>it.options.maxHighlightLength?(qt=!1,Kt&&Te(it,st,ht,en.pos),en.pos=st.length,Se=null):Se=ur(er(ct,en,ht.state,bn),Nt),bn){var Pn=bn[0].name;Pn&&(Se="m-"+(Se?Pn+" "+Se:Pn))}if(!qt||me!=Se){for(;Jt<en.start;)Jt=Math.min(en.start,Jt+5e3),pt(Jt,me);me=Se}en.start=en.pos}for(;Jt<en.pos;){var Ii=Math.min(en.pos,Jt+5e3);pt(Ii,me),Jt=Ii}}function gr(it,st,ct){for(var ht,pt,Nt=it.doc,Kt=ct?-1:st-(it.doc.mode.innerMode?1e3:100),qt=st;qt>Kt;--qt){if(qt<=Nt.first)return Nt.first;var Jt=Ln(Nt,qt-1),me=Jt.stateAfter;if(me&&(!ct||qt+(me instanceof We?me.lookAhead:0)<=Nt.modeFrontier))return qt;var en=pe(Jt.text,null,it.options.tabSize);(pt==null||ht>en)&&(pt=qt-1,ht=en)}return pt}function ue(it,st){if(it.modeFrontier=Math.min(it.modeFrontier,st),!(it.highlightFrontier<st-10)){for(var ct=it.first,ht=st-1;ht>ct;ht--){var pt=Ln(it,ht).stateAfter;if(pt&&(!(pt instanceof We)||ht+pt.lookAhead<st)){ct=ht+1;break}}it.highlightFrontier=Math.min(it.highlightFrontier,ct)}}var re=!1,ee=!1;function je(){re=!0}function xe(){ee=!0}function An(it,st,ct){this.marker=it,this.from=st,this.to=ct}function ui(it,st){if(it)for(var ct=0;ct<it.length;++ct){var ht=it[ct];if(ht.marker==st)return ht}}function ti(it,st){for(var ct,ht=0;ht<it.length;++ht)it[ht]!=st&&(ct||(ct=[])).push(it[ht]);return ct}function Bi(it,st){it.markedSpans=it.markedSpans?it.markedSpans.concat([st]):[st],st.marker.attachLine(it)}function mi(it,st,ct){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=Nt.marker,qt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!ct||!Nt.marker.insertLeft)){var Jt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);(ht||(ht=[])).push(new An(Kt,Nt.from,Jt?null:Nt.to))}}return ht}function oi(it,st,ct){var ht;if(it)for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=Nt.marker,qt=Nt.to==null||(Kt.inclusiveRight?Nt.to>=st:Nt.to>st);if(qt||Nt.from==st&&Kt.type=="bookmark"&&(!ct||Nt.marker.insertLeft)){var Jt=Nt.from==null||(Kt.inclusiveLeft?Nt.from<=st:Nt.from<st);(ht||(ht=[])).push(new An(Kt,Jt?null:Nt.from-st,Nt.to==null?null:Nt.to-st))}}return ht}function Di(it,st){if(st.full)return null;var ct=qn(it,st.from.line)&&Ln(it,st.from.line).markedSpans,ht=qn(it,st.to.line)&&Ln(it,st.to.line).markedSpans;if(!ct&&!ht)return null;var pt=st.from.ch,Nt=st.to.ch,Kt=Dn(st.from,st.to)==0,qt=mi(ct,pt,Kt),Jt=oi(ht,Nt,Kt),me=st.text.length==1,en=tn(st.text).length+(me?pt:0);if(qt)for(var Se=0;Se<qt.length;++Se){var bn=qt[Se];if(bn.to==null){var Pn=ui(Jt,bn.marker);Pn?me&&(bn.to=Pn.to==null?null:Pn.to+en):bn.to=pt}}if(Jt)for(var Ii=0;Ii<Jt.length;++Ii){var Hi=Jt[Ii];if(Hi.to!=null&&(Hi.to+=en),Hi.from==null){var Ji=ui(qt,Hi.marker);Ji||(Hi.from=en,me&&(qt||(qt=[])).push(Hi))}else Hi.from+=en,me&&(qt||(qt=[])).push(Hi)}qt&&(qt=Ne(qt)),Jt&&Jt!=qt&&(Jt=Ne(Jt));var dr=[qt];if(!me){var Rr=st.text.length-2,Er;if(Rr>0&&qt)for(var jr=0;jr<qt.length;++jr)qt[jr].to==null&&(Er||(Er=[])).push(new An(qt[jr].marker,null,null));for(var po=0;po<Rr;++po)dr.push(Er);dr.push(Jt)}return dr}function Ne(it){for(var st=0;st<it.length;++st){var ct=it[st];ct.from!=null&&ct.from==ct.to&&ct.marker.clearWhenEmpty!==!1&&it.splice(st--,1)}return it.length?it:null}function hn(it,st,ct){var ht=null;if(it.iter(st.line,ct.line+1,function(Pn){if(Pn.markedSpans)for(var Ii=0;Ii<Pn.markedSpans.length;++Ii){var Hi=Pn.markedSpans[Ii].marker;Hi.readOnly&&(!ht||pn(ht,Hi)==-1)&&(ht||(ht=[])).push(Hi)}}),!ht)return null;for(var pt=[{from:st,to:ct}],Nt=0;Nt<ht.length;++Nt)for(var Kt=ht[Nt],qt=Kt.find(0),Jt=0;Jt<pt.length;++Jt){var me=pt[Jt];if(!(Dn(me.to,qt.from)<0||Dn(me.from,qt.to)>0)){var en=[Jt,1],Se=Dn(me.from,qt.from),bn=Dn(me.to,qt.to);(Se<0||!Kt.inclusiveLeft&&!Se)&&en.push({from:me.from,to:qt.from}),(bn>0||!Kt.inclusiveRight&&!bn)&&en.push({from:qt.to,to:me.to}),pt.splice.apply(pt,en),Jt+=en.length-3}}return pt}function ke(it){var st=it.markedSpans;if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.detachLine(it);it.markedSpans=null}}function Ot(it,st){if(st){for(var ct=0;ct<st.length;++ct)st[ct].marker.attachLine(it);it.markedSpans=st}}function vn(it){return it.inclusiveLeft?-1:0}function Jn(it){return it.inclusiveRight?1:0}function vi(it,st){var ct=it.lines.length-st.lines.length;if(ct!=0)return ct;var ht=it.find(),pt=st.find(),Nt=Dn(ht.from,pt.from)||vn(it)-vn(st);if(Nt)return-Nt;var Kt=Dn(ht.to,pt.to)||Jn(it)-Jn(st);return Kt||st.id-it.id}function Ee(it,st){var ct=ee&&it.markedSpans,ht;if(ct)for(var pt=void 0,Nt=0;Nt<ct.length;++Nt)pt=ct[Nt],pt.marker.collapsed&&(st?pt.from:pt.to)==null&&(!ht||vi(ht,pt.marker)<0)&&(ht=pt.marker);return ht}function Wn(it){return Ee(it,!0)}function cn(it){return Ee(it,!1)}function Un(it,st){var ct=ee&&it.markedSpans,ht;if(ct)for(var pt=0;pt<ct.length;++pt){var Nt=ct[pt];Nt.marker.collapsed&&(Nt.from==null||Nt.from<st)&&(Nt.to==null||Nt.to>st)&&(!ht||vi(ht,Nt.marker)<0)&&(ht=Nt.marker)}return ht}function Rn(it,st,ct,ht,pt){var Nt=Ln(it,st),Kt=ee&&Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;++qt){var Jt=Kt[qt];if(Jt.marker.collapsed){var me=Jt.marker.find(0),en=Dn(me.from,ct)||vn(Jt.marker)-vn(pt),Se=Dn(me.to,ht)||Jn(Jt.marker)-Jn(pt);if(!(en>=0&&Se<=0||en<=0&&Se>=0)&&(en<=0&&(Jt.marker.inclusiveRight&&pt.inclusiveLeft?Dn(me.to,ct)>=0:Dn(me.to,ct)>0)||en>=0&&(Jt.marker.inclusiveRight&&pt.inclusiveLeft?Dn(me.from,ht)<=0:Dn(me.from,ht)<0)))return!0}}}function gn(it){for(var st;st=Wn(it);)it=st.find(-1,!0).line;return it}function Cn(it){for(var st;st=cn(it);)it=st.find(1,!0).line;return it}function Tn(it){for(var st,ct;st=cn(it);)it=st.find(1,!0).line,(ct||(ct=[])).push(it);return ct}function qe(it,st){var ct=Ln(it,st),ht=gn(ct);return ct==ht?st:se(ht)}function In(it,st){if(st>it.lastLine())return st;var ct=Ln(it,st),ht;if(!on(it,ct))return st;for(;ht=cn(ct);)ct=ht.find(1,!0).line;return se(ct)+1}function on(it,st){var ct=ee&&st.markedSpans;if(ct){for(var ht=void 0,pt=0;pt<ct.length;++pt)if(ht=ct[pt],!!ht.marker.collapsed){if(ht.from==null)return!0;if(!ht.marker.widgetNode&&ht.from==0&&ht.marker.inclusiveLeft&&_i(it,st,ht))return!0}}}function _i(it,st,ct){if(ct.to==null){var ht=ct.marker.find(1,!0);return _i(it,ht.line,ui(ht.line.markedSpans,ct.marker))}if(ct.marker.inclusiveRight&&ct.to==st.text.length)return!0;for(var pt=void 0,Nt=0;Nt<st.markedSpans.length;++Nt)if(pt=st.markedSpans[Nt],pt.marker.collapsed&&!pt.marker.widgetNode&&pt.from==ct.to&&(pt.to==null||pt.to!=ct.from)&&(pt.marker.inclusiveLeft||ct.marker.inclusiveRight)&&_i(it,st,pt))return!0}function Qi(it){it=gn(it);for(var st=0,ct=it.parent,ht=0;ht<ct.lines.length;++ht){var pt=ct.lines[ht];if(pt==it)break;st+=pt.height}for(var Nt=ct.parent;Nt;ct=Nt,Nt=ct.parent)for(var Kt=0;Kt<Nt.children.length;++Kt){var qt=Nt.children[Kt];if(qt==ct)break;st+=qt.height}return st}function nr(it){if(it.height==0)return 0;for(var st=it.text.length,ct,ht=it;ct=Wn(ht);){var pt=ct.find(0,!0);ht=pt.from.line,st+=pt.from.ch-pt.to.ch}for(ht=it;ct=cn(ht);){var Nt=ct.find(0,!0);st-=ht.text.length-Nt.from.ch,ht=Nt.to.line,st+=ht.text.length-Nt.to.ch}return st}function Gi(it){var st=it.display,ct=it.doc;st.maxLine=Ln(ct,ct.first),st.maxLineLength=nr(st.maxLine),st.maxLineChanged=!0,ct.iter(function(ht){var pt=nr(ht);pt>st.maxLineLength&&(st.maxLineLength=pt,st.maxLine=ht)})}var Fr=function(it,st,ct){this.text=it,Ot(this,st),this.height=ct?ct(this):1};Fr.prototype.lineNo=function(){return se(this)},yi(Fr);function yr(it,st,ct,ht){it.text=st,it.stateAfter&&(it.stateAfter=null),it.styles&&(it.styles=null),it.order!=null&&(it.order=null),ke(it),Ot(it,ct);var pt=ht?ht(it):1;pt!=it.height&&$n(it,pt)}function Zr(it){it.parent=null,ke(it)}var _r={},Wr={};function no(it,st){if(!it||/^\s*$/.test(it))return null;var ct=st.addModeClass?Wr:_r;return ct[it]||(ct[it]=it.replace(/\S+/g,"cm-$&"))}function Oe(it,st){var ct=ye("span",null,null,ie?"padding-right: .1px":null),ht={pre:ye("pre",[ct],"CodeMirror-line"),content:ct,col:0,pos:0,cm:it,trailingSpace:!1,splitSpaces:it.getOption("lineWrapping")};st.measure={};for(var pt=0;pt<=(st.rest?st.rest.length:0);pt++){var Nt=pt?st.rest[pt-1]:st.line,Kt=void 0;ht.pos=0,ht.addToken=Ur,Yi(it.display.measure)&&(Kt=Kn(Nt,it.doc.direction))&&(ht.addToken=Ar(ht.addToken,Kt)),ht.map=[];var qt=st!=it.display.externalMeasured&&se(Nt);Ao(Nt,ht,hr(it,Nt,qt)),Nt.styleClasses&&(Nt.styleClasses.bgClass&&(ht.bgClass=fn(Nt.styleClasses.bgClass,ht.bgClass||"")),Nt.styleClasses.textClass&&(ht.textClass=fn(Nt.styleClasses.textClass,ht.textClass||""))),ht.map.length==0&&ht.map.push(0,0,ht.content.appendChild(Ir(it.display.measure))),pt==0?(st.measure.map=ht.map,st.measure.cache={}):((st.measure.maps||(st.measure.maps=[])).push(ht.map),(st.measure.caches||(st.measure.caches=[])).push({}))}if(ie){var Jt=ht.content.lastChild;(/\bcm-tab\b/.test(Jt.className)||Jt.querySelector&&Jt.querySelector(".cm-tab"))&&(ht.content.className="cm-tab-wrap-hack")}return On(it,"renderLine",it,st.line,ht.pre),ht.pre.className&&(ht.textClass=fn(ht.pre.className,ht.textClass||"")),ht}function Nr(it){var st=te("span","\u2022","cm-invalidchar");return st.title="\\u"+it.charCodeAt(0).toString(16),st.setAttribute("aria-label",st.title),st}function Ur(it,st,ct,ht,pt,Nt,Kt){if(st){var qt=it.splitSpaces?Sr(st,it.trailingSpace):st,Jt=it.cm.state.specialChars,me=!1,en;if(!Jt.test(st))it.col+=st.length,en=document.createTextNode(qt),it.map.push(it.pos,it.pos+st.length,en),de&&Ht<9&&(me=!0),it.pos+=st.length;else{en=document.createDocumentFragment();for(var Se=0;;){Jt.lastIndex=Se;var bn=Jt.exec(st),Pn=bn?bn.index-Se:st.length-Se;if(Pn){var Ii=document.createTextNode(qt.slice(Se,Se+Pn));de&&Ht<9?en.appendChild(te("span",[Ii])):en.appendChild(Ii),it.map.push(it.pos,it.pos+Pn,Ii),it.col+=Pn,it.pos+=Pn}if(!bn)break;Se+=Pn+1;var Hi=void 0;if(bn[0]==" "){var Ji=it.cm.options.tabSize,dr=Ji-it.col%Ji;Hi=en.appendChild(te("span",Le(dr),"cm-tab")),Hi.setAttribute("role","presentation"),Hi.setAttribute("cm-text"," "),it.col+=dr}else bn[0]=="\r"||bn[0]==`
`?(Hi=en.appendChild(te("span",bn[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Hi.setAttribute("cm-text",bn[0]),it.col+=1):(Hi=it.cm.options.specialCharPlaceholder(bn[0]),Hi.setAttribute("cm-text",bn[0]),de&&Ht<9?en.appendChild(te("span",[Hi])):en.appendChild(Hi),it.col+=1);it.map.push(it.pos,it.pos+1,Hi),it.pos++}}if(it.trailingSpace=qt.charCodeAt(st.length-1)==32,ct||ht||pt||me||Nt||Kt){var Rr=ct||"";ht&&(Rr+=ht),pt&&(Rr+=pt);var Er=te("span",[en],Rr,Nt);if(Kt)for(var jr in Kt)Kt.hasOwnProperty(jr)&&jr!="style"&&jr!="class"&&Er.setAttribute(jr,Kt[jr]);return it.content.appendChild(Er)}it.content.appendChild(en)}}function Sr(it,st){if(it.length>1&&!/ /.test(it))return it;for(var ct=st,ht="",pt=0;pt<it.length;pt++){var Nt=it.charAt(pt);Nt==" "&&ct&&(pt==it.length-1||it.charCodeAt(pt+1)==32)&&(Nt="\xA0"),ht+=Nt,ct=Nt==" "}return ht}function Ar(it,st){return function(ct,ht,pt,Nt,Kt,qt,Jt){pt=pt?pt+" cm-force-border":"cm-force-border";for(var me=ct.pos,en=me+ht.length;;){for(var Se=void 0,bn=0;bn<st.length&&(Se=st[bn],!(Se.to>me&&Se.from<=me));bn++);if(Se.to>=en)return it(ct,ht,pt,Nt,Kt,qt,Jt);it(ct,ht.slice(0,Se.to-me),pt,Nt,null,qt,Jt),Nt=null,ht=ht.slice(Se.to-me),me=Se.to}}}function Jr(it,st,ct,ht){var pt=!ht&&ct.widgetNode;pt&&it.map.push(it.pos,it.pos+st,pt),!ht&&it.cm.display.input.needsContentAttribute&&(pt||(pt=it.content.appendChild(document.createElement("span"))),pt.setAttribute("cm-marker",ct.id)),pt&&(it.cm.display.input.setUneditable(pt),it.content.appendChild(pt)),it.pos+=st,it.trailingSpace=!1}function Ao(it,st,ct){var ht=it.markedSpans,pt=it.text,Nt=0;if(!ht){for(var Kt=1;Kt<ct.length;Kt+=2)st.addToken(st,pt.slice(Nt,Nt=ct[Kt]),no(ct[Kt+1],st.cm.options));return}for(var qt=pt.length,Jt=0,me=1,en="",Se,bn,Pn=0,Ii,Hi,Ji,dr,Rr;;){if(Pn==Jt){Ii=Hi=Ji=bn="",Rr=null,dr=null,Pn=1/0;for(var Er=[],jr=void 0,po=0;po<ht.length;++po){var Pr=ht[po],No=Pr.marker;if(No.type=="bookmark"&&Pr.from==Jt&&No.widgetNode)Er.push(No);else if(Pr.from<=Jt&&(Pr.to==null||Pr.to>Jt||No.collapsed&&Pr.to==Jt&&Pr.from==Jt)){if(Pr.to!=null&&Pr.to!=Jt&&Pn>Pr.to&&(Pn=Pr.to,Hi=""),No.className&&(Ii+=" "+No.className),No.css&&(bn=(bn?bn+";":"")+No.css),No.startStyle&&Pr.from==Jt&&(Ji+=" "+No.startStyle),No.endStyle&&Pr.to==Pn&&(jr||(jr=[])).push(No.endStyle,Pr.to),No.title&&((Rr||(Rr={})).title=No.title),No.attributes)for(var _s in No.attributes)(Rr||(Rr={}))[_s]=No.attributes[_s];No.collapsed&&(!dr||vi(dr.marker,No)<0)&&(dr=Pr)}else Pr.from>Jt&&Pn>Pr.from&&(Pn=Pr.from)}if(jr)for(var Fa=0;Fa<jr.length;Fa+=2)jr[Fa+1]==Pn&&(Hi+=" "+jr[Fa]);if(!dr||dr.from==Jt)for(var Ys=0;Ys<Er.length;++Ys)Jr(st,0,Er[Ys]);if(dr&&(dr.from||0)==Jt){if(Jr(st,(dr.to==null?qt+1:dr.to)-Jt,dr.marker,dr.from==null),dr.to==null)return;dr.to==Jt&&(dr=!1)}}if(Jt>=qt)break;for(var yl=Math.min(qt,Pn);;){if(en){var Da=Jt+en.length;if(!dr){var xa=Da>yl?en.slice(0,yl-Jt):en;st.addToken(st,xa,Se?Se+Ii:Ii,Ji,Jt+xa.length==Pn?Hi:"",bn,Rr)}if(Da>=yl){en=en.slice(yl-Jt),Jt=yl;break}Jt=Da,Ji=""}en=pt.slice(Nt,Nt=ct[me++]),Se=no(ct[me++],st.cm.options)}}}function io(it,st,ct){this.line=st,this.rest=Tn(st),this.size=this.rest?se(tn(this.rest))-ct+1:1,this.node=this.text=null,this.hidden=on(it,st)}function Dr(it,st,ct){for(var ht=[],pt,Nt=st;Nt<ct;Nt=pt){var Kt=new io(it.doc,Ln(it.doc,Nt),Nt);pt=Nt+Kt.size,ht.push(Kt)}return ht}var fo=null;function es(it){fo?fo.ops.push(it):it.ownsGroup=fo={ops:[it],delayedCallbacks:[]}}function Zs(it){var st=it.delayedCallbacks,ct=0;do{for(;ct<st.length;ct++)st[ct].call(null);for(var ht=0;ht<it.ops.length;ht++){var pt=it.ops[ht];if(pt.cursorActivityHandlers)for(;pt.cursorActivityCalled<pt.cursorActivityHandlers.length;)pt.cursorActivityHandlers[pt.cursorActivityCalled++].call(null,pt.cm)}}while(ct<st.length)}function Ua(it,st){var ct=it.ownsGroup;if(ct)try{Zs(ct)}finally{fo=null,st(ct)}}var us=null;function wr(it,st){var ct=ei(it,st);if(ct.length){var ht=Array.prototype.slice.call(arguments,2),pt;fo?pt=fo.delayedCallbacks:us?pt=us:(pt=us=[],setTimeout(ns,0));for(var Nt=function(qt){pt.push(function(){return ct[qt].apply(null,ht)})},Kt=0;Kt<ct.length;++Kt)Nt(Kt)}}function ns(){var it=us;us=null;for(var st=0;st<it.length;++st)it[st]()}function rs(it,st,ct,ht){for(var pt=0;pt<st.changes.length;pt++){var Nt=st.changes[pt];Nt=="text"?Ci(it,st):Nt=="gutter"?Qr(it,st,ct,ht):Nt=="class"?pr(it,st):Nt=="widget"&&$r(it,st,ht)}st.changes=null}function fs(it){return it.node==it.text&&(it.node=te("div",null,null,"position: relative"),it.text.parentNode&&it.text.parentNode.replaceChild(it.node,it.text),it.node.appendChild(it.text),de&&Ht<8&&(it.node.style.zIndex=2)),it.node}function As(it,st){var ct=st.bgClass?st.bgClass+" "+(st.line.bgClass||""):st.line.bgClass;if(ct&&(ct+=" CodeMirror-linebackground"),st.background)ct?st.background.className=ct:(st.background.parentNode.removeChild(st.background),st.background=null);else if(ct){var ht=fs(st);st.background=ht.insertBefore(te("div",null,ct),ht.firstChild),it.display.input.setUneditable(st.background)}}function Cs(it,st){var ct=it.display.externalMeasured;return ct&&ct.line==st.line?(it.display.externalMeasured=null,st.measure=ct.measure,ct.built):Oe(it,st)}function Ci(it,st){var ct=st.text.className,ht=Cs(it,st);st.text==st.node&&(st.node=ht.pre),st.text.parentNode.replaceChild(ht.pre,st.text),st.text=ht.pre,ht.bgClass!=st.bgClass||ht.textClass!=st.textClass?(st.bgClass=ht.bgClass,st.textClass=ht.textClass,pr(it,st)):ct&&(st.text.className=ct)}function pr(it,st){As(it,st),st.line.wrapClass?fs(st).className=st.line.wrapClass:st.node!=st.text&&(st.node.className="");var ct=st.textClass?st.textClass+" "+(st.line.textClass||""):st.line.textClass;st.text.className=ct||""}function Qr(it,st,ct,ht){if(st.gutter&&(st.node.removeChild(st.gutter),st.gutter=null),st.gutterBackground&&(st.node.removeChild(st.gutterBackground),st.gutterBackground=null),st.line.gutterClass){var pt=fs(st);st.gutterBackground=te("div",null,"CodeMirror-gutter-background "+st.line.gutterClass,"left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px; width: "+ht.gutterTotalWidth+"px"),it.display.input.setUneditable(st.gutterBackground),pt.insertBefore(st.gutterBackground,st.text)}var Nt=st.line.gutterMarkers;if(it.options.lineNumbers||Nt){var Kt=fs(st),qt=st.gutter=te("div",null,"CodeMirror-gutter-wrapper","left: "+(it.options.fixedGutter?ht.fixedPos:-ht.gutterTotalWidth)+"px");if(it.display.input.setUneditable(qt),Kt.insertBefore(qt,st.text),st.line.gutterClass&&(qt.className+=" "+st.line.gutterClass),it.options.lineNumbers&&(!Nt||!Nt["CodeMirror-linenumbers"])&&(st.lineNumber=qt.appendChild(te("div",Zn(it.options,ct),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+ht.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+it.display.lineNumInnerWidth+"px"))),Nt)for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var me=it.display.gutterSpecs[Jt].className,en=Nt.hasOwnProperty(me)&&Nt[me];en&&qt.appendChild(te("div",[en],"CodeMirror-gutter-elt","left: "+ht.gutterLeft[me]+"px; width: "+ht.gutterWidth[me]+"px"))}}}function $r(it,st,ct){st.alignable&&(st.alignable=null);for(var ht=Ut("CodeMirror-linewidget"),pt=st.node.firstChild,Nt=void 0;pt;pt=Nt)Nt=pt.nextSibling,ht.test(pt.className)&&st.node.removeChild(pt);xo(it,st,ct)}function so(it,st,ct,ht){var pt=Cs(it,st);return st.text=st.node=pt.pre,pt.bgClass&&(st.bgClass=pt.bgClass),pt.textClass&&(st.textClass=pt.textClass),pr(it,st),Qr(it,st,ct,ht),xo(it,st,ht),st.node}function xo(it,st,ct){if(cr(it,st.line,st,ct,!0),st.rest)for(var ht=0;ht<st.rest.length;ht++)cr(it,st.rest[ht],st,ct,!1)}function cr(it,st,ct,ht,pt){if(st.widgets)for(var Nt=fs(ct),Kt=0,qt=st.widgets;Kt<qt.length;++Kt){var Jt=qt[Kt],me=te("div",[Jt.node],"CodeMirror-linewidget"+(Jt.className?" "+Jt.className:""));Jt.handleMouseEvents||me.setAttribute("cm-ignore-events","true"),Co(Jt,me,ct,ht),it.display.input.setUneditable(me),pt&&Jt.above?Nt.insertBefore(me,ct.gutter||ct.text):Nt.appendChild(me),wr(Jt,"redraw")}}function Co(it,st,ct,ht){if(it.noHScroll){(ct.alignable||(ct.alignable=[])).push(st);var pt=ht.wrapperWidth;st.style.left=ht.fixedPos+"px",it.coverGutter||(pt-=ht.gutterTotalWidth,st.style.paddingLeft=ht.gutterTotalWidth+"px"),st.style.width=pt+"px"}it.coverGutter&&(st.style.zIndex=5,st.style.position="relative",it.noHScroll||(st.style.marginLeft=-ht.gutterTotalWidth+"px"))}function gs(it){if(it.height!=null)return it.height;var st=it.doc.cm;if(!st)return 0;if(!Ke(document.body,it.node)){var ct="position: relative;";it.coverGutter&&(ct+="margin-left: -"+st.display.gutters.offsetWidth+"px;"),it.noHScroll&&(ct+="width: "+st.display.wrapper.clientWidth+"px;"),Yt(st.display.measure,te("div",[it.node],null,ct))}return it.height=it.node.parentNode.offsetHeight}function os(it,st){for(var ct=Xi(st);ct!=it.wrapper;ct=ct.parentNode)if(!ct||ct.nodeType==1&&ct.getAttribute("cm-ignore-events")=="true"||ct.parentNode==it.sizer&&ct!=it.mover)return!0}function lo(it){return it.lineSpace.offsetTop}function Wi(it){return it.mover.offsetHeight-it.lineSpace.offsetHeight}function zr(it){if(it.cachedPaddingH)return it.cachedPaddingH;var st=Yt(it.measure,te("pre","x","CodeMirror-line-like")),ct=window.getComputedStyle?window.getComputedStyle(st):st.currentStyle,ht={left:parseInt(ct.paddingLeft),right:parseInt(ct.paddingRight)};return!isNaN(ht.left)&&!isNaN(ht.right)&&(it.cachedPaddingH=ht),ht}function eo(it){return Ai-it.display.nativeBarWidth}function xs(it){return it.display.scroller.clientWidth-eo(it)-it.display.barWidth}function Ko(it){return it.display.scroller.clientHeight-eo(it)-it.display.barHeight}function Ds(it,st,ct){var ht=it.options.lineWrapping,pt=ht&&xs(it);if(!st.measure.heights||ht&&st.measure.width!=pt){var Nt=st.measure.heights=[];if(ht){st.measure.width=pt;for(var Kt=st.text.firstChild.getClientRects(),qt=0;qt<Kt.length-1;qt++){var Jt=Kt[qt],me=Kt[qt+1];Math.abs(Jt.bottom-me.bottom)>2&&Nt.push((Jt.bottom+me.top)/2-ct.top)}}Nt.push(ct.bottom-ct.top)}}function Po(it,st,ct){if(it.line==st)return{map:it.measure.map,cache:it.measure.cache};for(var ht=0;ht<it.rest.length;ht++)if(it.rest[ht]==st)return{map:it.measure.maps[ht],cache:it.measure.caches[ht]};for(var pt=0;pt<it.rest.length;pt++)if(se(it.rest[pt])>ct)return{map:it.measure.maps[pt],cache:it.measure.caches[pt],before:!0}}function dl(it,st){st=gn(st);var ct=se(st),ht=it.display.externalMeasured=new io(it.doc,st,ct);ht.lineN=ct;var pt=ht.built=Oe(it,ht);return ht.text=pt.pre,Yt(it.display.lineMeasure,pt.pre),ht}function Qa(it,st,ct,ht){return ko(it,zo(it,st),ct,ht)}function Ca(it,st){if(st>=it.display.viewFrom&&st<it.display.viewTo)return it.display.view[il(it,st)];var ct=it.display.externalMeasured;if(ct&&st>=ct.lineN&&st<ct.lineN+ct.size)return ct}function zo(it,st){var ct=se(st),ht=Ca(it,ct);ht&&!ht.text?ht=null:ht&&ht.changes&&(rs(it,ht,ct,zl(it)),it.curOp.forceUpdate=!0),ht||(ht=dl(it,st));var pt=Po(ht,st,ct);return{line:st,view:ht,rect:null,map:pt.map,cache:pt.cache,before:pt.before,hasHeights:!1}}function ko(it,st,ct,ht,pt){st.before&&(ct=-1);var Nt=ct+(ht||""),Kt;return st.cache.hasOwnProperty(Nt)?Kt=st.cache[Nt]:(st.rect||(st.rect=st.view.text.getBoundingClientRect()),st.hasHeights||(Ds(it,st.view,st.rect),st.hasHeights=!0),Kt=Io(it,st,ct,ht),Kt.bogus||(st.cache[Nt]=Kt)),{left:Kt.left,right:Kt.right,top:pt?Kt.rtop:Kt.top,bottom:pt?Kt.rbottom:Kt.bottom}}var fl={left:0,right:0,top:0,bottom:0};function Ll(it,st,ct){for(var ht,pt,Nt,Kt,qt,Jt,me=0;me<it.length;me+=3)if(qt=it[me],Jt=it[me+1],st<qt?(pt=0,Nt=1,Kt="left"):st<Jt?(pt=st-qt,Nt=pt+1):(me==it.length-3||st==Jt&&it[me+3]>st)&&(Nt=Jt-qt,pt=Nt-1,st>=Jt&&(Kt="right")),pt!=null){if(ht=it[me+2],qt==Jt&&ct==(ht.insertLeft?"left":"right")&&(Kt=ct),ct=="left"&&pt==0)for(;me&&it[me-2]==it[me-3]&&it[me-1].insertLeft;)ht=it[(me-=3)+2],Kt="left";if(ct=="right"&&pt==Jt-qt)for(;me<it.length-3&&it[me+3]==it[me+4]&&!it[me+5].insertLeft;)ht=it[(me+=3)+2],Kt="right";break}return{node:ht,start:pt,end:Nt,collapse:Kt,coverStart:qt,coverEnd:Jt}}function pa(it,st){var ct=fl;if(st=="left")for(var ht=0;ht<it.length&&(ct=it[ht]).left==ct.right;ht++);else for(var pt=it.length-1;pt>=0&&(ct=it[pt]).left==ct.right;pt--);return ct}function Io(it,st,ct,ht){var pt=Ll(st.map,ct,ht),Nt=pt.node,Kt=pt.start,qt=pt.end,Jt=pt.collapse,me;if(Nt.nodeType==3){for(var en=0;en<4;en++){for(;Kt&&Ce(st.line.text.charAt(pt.coverStart+Kt));)--Kt;for(;pt.coverStart+qt<pt.coverEnd&&Ce(st.line.text.charAt(pt.coverStart+qt));)++qt;if(de&&Ht<9&&Kt==0&&qt==pt.coverEnd-pt.coverStart?me=Nt.parentNode.getBoundingClientRect():me=pa(fe(Nt,Kt,qt).getClientRects(),ht),me.left||me.right||Kt==0)break;qt=Kt,Kt=Kt-1,Jt="right"}de&&Ht<11&&(me=nu(it.display.measure,me))}else{Kt>0&&(Jt=ht="right");var Se;it.options.lineWrapping&&(Se=Nt.getClientRects()).length>1?me=Se[ht=="right"?Se.length-1:0]:me=Nt.getBoundingClientRect()}if(de&&Ht<9&&!Kt&&(!me||!me.left&&!me.right)){var bn=Nt.parentNode.getClientRects()[0];bn?me={left:bn.left,right:bn.left+gl(it.display),top:bn.top,bottom:bn.bottom}:me=fl}for(var Pn=me.top-st.rect.top,Ii=me.bottom-st.rect.top,Hi=(Pn+Ii)/2,Ji=st.view.measure.heights,dr=0;dr<Ji.length-1&&!(Hi<Ji[dr]);dr++);var Rr=dr?Ji[dr-1]:0,Er=Ji[dr],jr={left:(Jt=="right"?me.right:me.left)-st.rect.left,right:(Jt=="left"?me.left:me.right)-st.rect.left,top:Rr,bottom:Er};return!me.left&&!me.right&&(jr.bogus=!0),it.options.singleCursorHeightPerLine||(jr.rtop=Pn,jr.rbottom=Ii),jr}function nu(it,st){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!ri(it))return st;var ct=screen.logicalXDPI/screen.deviceXDPI,ht=screen.logicalYDPI/screen.deviceYDPI;return{left:st.left*ct,right:st.right*ct,top:st.top*ht,bottom:st.bottom*ht}}function Ml(it){if(it.measure&&(it.measure.cache={},it.measure.heights=null,it.rest))for(var st=0;st<it.rest.length;st++)it.measure.caches[st]={}}function Qs(it){it.display.externalMeasure=null,Zt(it.display.lineMeasure);for(var st=0;st<it.display.view.length;st++)Ml(it.display.view[st])}function ma(it){Qs(it),it.display.cachedCharWidth=it.display.cachedTextHeight=it.display.cachedPaddingH=null,it.options.lineWrapping||(it.display.maxLineChanged=!0),it.display.lineNumChars=null}function Yo(){return he&&nt?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Fo(){return he&&nt?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function hs(it){var st=0;if(it.widgets)for(var ct=0;ct<it.widgets.length;++ct)it.widgets[ct].above&&(st+=gs(it.widgets[ct]));return st}function js(it,st,ct,ht,pt){if(!pt){var Nt=hs(st);ct.top+=Nt,ct.bottom+=Nt}if(ht=="line")return ct;ht||(ht="local");var Kt=Qi(st);if(ht=="local"?Kt+=lo(it.display):Kt-=it.display.viewOffset,ht=="page"||ht=="window"){var qt=it.display.lineSpace.getBoundingClientRect();Kt+=qt.top+(ht=="window"?0:Fo());var Jt=qt.left+(ht=="window"?0:Yo());ct.left+=Jt,ct.right+=Jt}return ct.top+=Kt,ct.bottom+=Kt,ct}function bl(it,st,ct){if(ct=="div")return st;var ht=st.left,pt=st.top;if(ct=="page")ht-=Yo(),pt-=Fo();else if(ct=="local"||!ct){var Nt=it.display.sizer.getBoundingClientRect();ht+=Nt.left,pt+=Nt.top}var Kt=it.display.lineSpace.getBoundingClientRect();return{left:ht-Kt.left,top:pt-Kt.top}}function ia(it,st,ct,ht,pt){return ht||(ht=Ln(it.doc,st.line)),js(it,ht,Qa(it,ht,st.ch,pt),ct)}function Uo(it,st,ct,ht,pt,Nt){ht=ht||Ln(it.doc,st.line),pt||(pt=zo(it,ht));function Kt(Ii,Hi){var Ji=ko(it,pt,Ii,Hi?"right":"left",Nt);return Hi?Ji.left=Ji.right:Ji.right=Ji.left,js(it,ht,Ji,ct)}var qt=Kn(ht,it.doc.direction),Jt=st.ch,me=st.sticky;if(Jt>=ht.text.length?(Jt=ht.text.length,me="before"):Jt<=0&&(Jt=0,me="after"),!qt)return Kt(me=="before"?Jt-1:Jt,me=="before");function en(Ii,Hi,Ji){var dr=qt[Hi],Rr=dr.level==1;return Kt(Ji?Ii-1:Ii,Rr!=Ji)}var Se=Xe(qt,Jt,me),bn=Ue,Pn=en(Jt,Se,me=="before");return bn!=null&&(Pn.other=en(Jt,bn,me!="before")),Pn}function Ro(it,st){var ct=0;st=fi(it.doc,st),it.options.lineWrapping||(ct=gl(it.display)*st.ch);var ht=Ln(it.doc,st.line),pt=Qi(ht)+lo(it.display);return{left:ct,right:ct,top:pt,bottom:pt+ht.height}}function wo(it,st,ct,ht,pt){var Nt=Ye(it,st,ct);return Nt.xRel=pt,ht&&(Nt.outside=ht),Nt}function ps(it,st,ct){var ht=it.doc;if(ct+=it.display.viewOffset,ct<0)return wo(ht.first,0,null,-1,-1);var pt=De(ht,ct),Nt=ht.first+ht.size-1;if(pt>Nt)return wo(ht.first+ht.size-1,Ln(ht,Nt).text.length,null,1,1);st<0&&(st=0);for(var Kt=Ln(ht,pt);;){var qt=Hn(it,Kt,pt,st,ct),Jt=Un(Kt,qt.ch+(qt.xRel>0||qt.outside>0?1:0));if(!Jt)return qt;var me=Jt.find(1);if(me.line==pt)return me;Kt=Ln(ht,pt=me.line)}}function ir(it,st,ct,ht){ht-=hs(st);var pt=st.text.length,Nt=Bn(function(Kt){return ko(it,ct,Kt-1).bottom<=ht},pt,0);return pt=Bn(function(Kt){return ko(it,ct,Kt).top>ht},Nt,pt),{begin:Nt,end:pt}}function ea(it,st,ct,ht){ct||(ct=zo(it,st));var pt=js(it,st,ko(it,ct,ht),"line").top;return ir(it,st,ct,pt)}function Be(it,st,ct,ht){return it.bottom<=ct?!1:it.top>ct?!0:(ht?it.left:it.right)>st}function Hn(it,st,ct,ht,pt){pt-=Qi(st);var Nt=zo(it,st),Kt=hs(st),qt=0,Jt=st.text.length,me=!0,en=Kn(st,it.doc.direction);if(en){var Se=(it.options.lineWrapping?du:kl)(it,st,ct,Nt,en,ht,pt);me=Se.level!=1,qt=me?Se.from:Se.to-1,Jt=me?Se.to:Se.from-1}var bn=null,Pn=null,Ii=Bn(function(po){var Pr=ko(it,Nt,po);return Pr.top+=Kt,Pr.bottom+=Kt,Be(Pr,ht,pt,!1)?(Pr.top<=pt&&Pr.left<=ht&&(bn=po,Pn=Pr),!0):!1},qt,Jt),Hi,Ji,dr=!1;if(Pn){var Rr=ht-Pn.left<Pn.right-ht,Er=Rr==me;Ii=bn+(Er?0:1),Ji=Er?"after":"before",Hi=Rr?Pn.left:Pn.right}else{!me&&(Ii==Jt||Ii==qt)&&Ii++,Ji=Ii==0?"after":Ii==st.text.length?"before":ko(it,Nt,Ii-(me?1:0)).bottom+Kt<=pt==me?"after":"before";var jr=Uo(it,Ye(ct,Ii,Ji),"line",st,Nt);Hi=jr.left,dr=pt<jr.top?-1:pt>=jr.bottom?1:0}return Ii=Ze(st.text,Ii,1),wo(ct,Ii,Ji,dr,ht-Hi)}function kl(it,st,ct,ht,pt,Nt,Kt){var qt=Bn(function(Se){var bn=pt[Se],Pn=bn.level!=1;return Be(Uo(it,Ye(ct,Pn?bn.to:bn.from,Pn?"before":"after"),"line",st,ht),Nt,Kt,!0)},0,pt.length-1),Jt=pt[qt];if(qt>0){var me=Jt.level!=1,en=Uo(it,Ye(ct,me?Jt.from:Jt.to,me?"after":"before"),"line",st,ht);Be(en,Nt,Kt,!0)&&en.top>Kt&&(Jt=pt[qt-1])}return Jt}function du(it,st,ct,ht,pt,Nt,Kt){var qt=ir(it,st,ht,Kt),Jt=qt.begin,me=qt.end;/\s/.test(st.text.charAt(me-1))&&me--;for(var en=null,Se=null,bn=0;bn<pt.length;bn++){var Pn=pt[bn];if(!(Pn.from>=me||Pn.to<=Jt)){var Ii=Pn.level!=1,Hi=ko(it,ht,Ii?Math.min(me,Pn.to)-1:Math.max(Jt,Pn.from)).right,Ji=Hi<Nt?Nt-Hi+1e9:Hi-Nt;(!en||Se>Ji)&&(en=Pn,Se=Ji)}}return en||(en=pt[pt.length-1]),en.from<Jt&&(en={from:Jt,to:en.to,level:en.level}),en.to>me&&(en={from:en.from,to:me,level:en.level}),en}var is;function ra(it){if(it.cachedTextHeight!=null)return it.cachedTextHeight;if(is==null){is=te("pre",null,"CodeMirror-line-like");for(var st=0;st<49;++st)is.appendChild(document.createTextNode("x")),is.appendChild(te("br"));is.appendChild(document.createTextNode("x"))}Yt(it.measure,is);var ct=is.offsetHeight/50;return ct>3&&(it.cachedTextHeight=ct),Zt(it.measure),ct||1}function gl(it){if(it.cachedCharWidth!=null)return it.cachedCharWidth;var st=te("span","xxxxxxxxxx"),ct=te("pre",[st],"CodeMirror-line-like");Yt(it.measure,ct);var ht=st.getBoundingClientRect(),pt=(ht.right-ht.left)/10;return pt>2&&(it.cachedCharWidth=pt),pt||10}function zl(it){for(var st=it.display,ct={},ht={},pt=st.gutters.clientLeft,Nt=st.gutters.firstChild,Kt=0;Nt;Nt=Nt.nextSibling,++Kt){var qt=it.display.gutterSpecs[Kt].className;ct[qt]=Nt.offsetLeft+Nt.clientLeft+pt,ht[qt]=Nt.clientWidth}return{fixedPos:fu(st),gutterTotalWidth:st.gutters.offsetWidth,gutterLeft:ct,gutterWidth:ht,wrapperWidth:st.wrapper.clientWidth}}function fu(it){return it.scroller.getBoundingClientRect().left-it.sizer.getBoundingClientRect().left}function Ps(it){var st=ra(it.display),ct=it.options.lineWrapping,ht=ct&&Math.max(5,it.display.scroller.clientWidth/gl(it.display)-3);return function(pt){if(on(it.doc,pt))return 0;var Nt=0;if(pt.widgets)for(var Kt=0;Kt<pt.widgets.length;Kt++)pt.widgets[Kt].height&&(Nt+=pt.widgets[Kt].height);return ct?Nt+(Math.ceil(pt.text.length/ht)||1)*st:Nt+st}}function Xr(it){var st=it.doc,ct=Ps(it);st.iter(function(ht){var pt=ct(ht);pt!=ht.height&&$n(ht,pt)})}function Pa(it,st,ct,ht){var pt=it.display;if(!ct&&Xi(st).getAttribute("cm-not-content")=="true")return null;var Nt,Kt,qt=pt.lineSpace.getBoundingClientRect();try{Nt=st.clientX-qt.left,Kt=st.clientY-qt.top}catch(Se){return null}var Jt=ps(it,Nt,Kt),me;if(ht&&Jt.xRel>0&&(me=Ln(it.doc,Jt.line).text).length==Jt.ch){var en=pe(me,me.length,it.options.tabSize)-me.length;Jt=Ye(Jt.line,Math.max(0,Math.round((Nt-zr(it.display).left)/gl(it.display))-en))}return Jt}function il(it,st){if(st>=it.display.viewTo||(st-=it.display.viewFrom,st<0))return null;for(var ct=it.display.view,ht=0;ht<ct.length;ht++)if(st-=ct[ht].size,st<0)return ht}function Ss(it,st,ct,ht){st==null&&(st=it.doc.first),ct==null&&(ct=it.doc.first+it.doc.size),ht||(ht=0);var pt=it.display;if(ht&&ct<pt.viewTo&&(pt.updateLineNumbers==null||pt.updateLineNumbers>st)&&(pt.updateLineNumbers=st),it.curOp.viewChanged=!0,st>=pt.viewTo)ee&&qe(it.doc,st)<pt.viewTo&&Fs(it);else if(ct<=pt.viewFrom)ee&&In(it.doc,ct+ht)>pt.viewFrom?Fs(it):(pt.viewFrom+=ht,pt.viewTo+=ht);else if(st<=pt.viewFrom&&ct>=pt.viewTo)Fs(it);else if(st<=pt.viewFrom){var Nt=Oa(it,ct,ct+ht,1);Nt?(pt.view=pt.view.slice(Nt.index),pt.viewFrom=Nt.lineN,pt.viewTo+=ht):Fs(it)}else if(ct>=pt.viewTo){var Kt=Oa(it,st,st,-1);Kt?(pt.view=pt.view.slice(0,Kt.index),pt.viewTo=Kt.lineN):Fs(it)}else{var qt=Oa(it,st,st,-1),Jt=Oa(it,ct,ct+ht,1);qt&&Jt?(pt.view=pt.view.slice(0,qt.index).concat(Dr(it,qt.lineN,Jt.lineN)).concat(pt.view.slice(Jt.index)),pt.viewTo+=ht):Fs(it)}var me=pt.externalMeasured;me&&(ct<me.lineN?me.lineN+=ht:st<me.lineN+me.size&&(pt.externalMeasured=null))}function yo(it,st,ct){it.curOp.viewChanged=!0;var ht=it.display,pt=it.display.externalMeasured;if(pt&&st>=pt.lineN&&st<pt.lineN+pt.size&&(ht.externalMeasured=null),!(st<ht.viewFrom||st>=ht.viewTo)){var Nt=ht.view[il(it,st)];if(Nt.node!=null){var Kt=Nt.changes||(Nt.changes=[]);pn(Kt,ct)==-1&&Kt.push(ct)}}}function Fs(it){it.display.viewFrom=it.display.viewTo=it.doc.first,it.display.view=[],it.display.viewOffset=0}function Oa(it,st,ct,ht){var pt=il(it,st),Nt,Kt=it.display.view;if(!ee||ct==it.doc.first+it.doc.size)return{index:pt,lineN:ct};for(var qt=it.display.viewFrom,Jt=0;Jt<pt;Jt++)qt+=Kt[Jt].size;if(qt!=st){if(ht>0){if(pt==Kt.length-1)return null;Nt=qt+Kt[pt].size-st,pt++}else Nt=qt-st;st+=Nt,ct+=Nt}for(;qe(it.doc,ct)!=ct;){if(pt==(ht<0?0:Kt.length-1))return null;ct+=ht*Kt[pt-(ht<0?1:0)].size,pt+=ht}return{index:pt,lineN:ct}}function ss(it,st,ct){var ht=it.display,pt=ht.view;pt.length==0||st>=ht.viewTo||ct<=ht.viewFrom?(ht.view=Dr(it,st,ct),ht.viewFrom=st):(ht.viewFrom>st?ht.view=Dr(it,st,ht.viewFrom).concat(ht.view):ht.viewFrom<st&&(ht.view=ht.view.slice(il(it,st))),ht.viewFrom=st,ht.viewTo<ct?ht.view=ht.view.concat(Dr(it,ht.viewTo,ct)):ht.viewTo>ct&&(ht.view=ht.view.slice(0,il(it,ct)))),ht.viewTo=ct}function rl(it){for(var st=it.display.view,ct=0,ht=0;ht<st.length;ht++){var pt=st[ht];!pt.hidden&&(!pt.node||pt.changes)&&++ct}return ct}function Ws(it){it.display.input.showSelection(it.display.input.prepareSelection())}function Wu(it,st){st===void 0&&(st=!0);for(var ct=it.doc,ht={},pt=ht.cursors=document.createDocumentFragment(),Nt=ht.selection=document.createDocumentFragment(),Kt=0;Kt<ct.sel.ranges.length;Kt++)if(!(!st&&Kt==ct.sel.primIndex)){var qt=ct.sel.ranges[Kt];if(!(qt.from().line>=it.display.viewTo||qt.to().line<it.display.viewFrom)){var Jt=qt.empty();(Jt||it.options.showCursorWhenSelecting)&&Ho(it,qt.head,pt),Jt||Qo(it,qt,Nt)}}return ht}function Ho(it,st,ct){var ht=Uo(it,st,"div",null,null,!it.options.singleCursorHeightPerLine),pt=ct.appendChild(te("div","\xA0","CodeMirror-cursor"));if(pt.style.left=ht.left+"px",pt.style.top=ht.top+"px",pt.style.height=Math.max(0,ht.bottom-ht.top)*it.options.cursorHeight+"px",ht.other){var Nt=ct.appendChild(te("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Nt.style.display="",Nt.style.left=ht.other.left+"px",Nt.style.top=ht.other.top+"px",Nt.style.height=(ht.other.bottom-ht.other.top)*.85+"px"}}function oa(it,st){return it.top-st.top||it.left-st.left}function Qo(it,st,ct){var ht=it.display,pt=it.doc,Nt=document.createDocumentFragment(),Kt=zr(it.display),qt=Kt.left,Jt=Math.max(ht.sizerWidth,xs(it)-ht.sizer.offsetLeft)-Kt.right,me=pt.direction=="ltr";function en(Er,jr,po,Pr){jr<0&&(jr=0),jr=Math.round(jr),Pr=Math.round(Pr),Nt.appendChild(te("div",null,"CodeMirror-selected","position: absolute; left: "+Er+`px;
top: `+jr+"px; width: "+(po==null?Jt-Er:po)+`px;
height: `+(Pr-jr)+"px"))}function Se(Er,jr,po){var Pr=Ln(pt,Er),No=Pr.text.length,_s,Fa;function Ys(xa,al){return ia(it,Ye(Er,xa),"div",Pr,al)}function yl(xa,al,Ha){var Br=ea(it,Pr,null,xa),Xo=al=="ltr"==(Ha=="after")?"left":"right",Ks=Ha=="after"?Br.begin:Br.end-(/\s/.test(Pr.text.charAt(Br.end-1))?2:1);return Ys(Ks,Xo)[Xo]}var Da=Kn(Pr,pt.direction);return ze(Da,jr||0,po==null?No:po,function(xa,al,Ha,Br){var Xo=Ha=="ltr",Ks=Ys(xa,Xo?"left":"right"),Ns=Ys(al-1,Xo?"right":"left"),_a=jr==null&&xa==0,$o=po==null&&al==No,Lo=Br==0,wl=!Da||Br==Da.length-1;if(Ns.top-Ks.top<=3){var na=(me?_a:$o)&&Lo,XA=(me?$o:_a)&&wl,Xl=na?qt:(Xo?Ks:Ns).left,Za=XA?Jt:(Xo?Ns:Ks).right;en(Xl,Ks.top,Za-Xl,Ks.bottom)}else{var xl,Ls,Ea,nA;Xo?(xl=me&&_a&&Lo?qt:Ks.left,Ls=me?Jt:yl(xa,Ha,"before"),Ea=me?qt:yl(al,Ha,"after"),nA=me&&$o&&wl?Jt:Ns.right):(xl=me?yl(xa,Ha,"before"):qt,Ls=!me&&_a&&Lo?Jt:Ks.right,Ea=!me&&$o&&wl?qt:Ns.left,nA=me?yl(al,Ha,"after"):Jt),en(xl,Ks.top,Ls-xl,Ks.bottom),Ks.bottom<Ns.top&&en(qt,Ks.bottom,null,Ns.top),en(Ea,Ns.top,nA-Ea,Ns.bottom)}(!_s||oa(Ks,_s)<0)&&(_s=Ks),oa(Ns,_s)<0&&(_s=Ns),(!Fa||oa(Ks,Fa)<0)&&(Fa=Ks),oa(Ns,Fa)<0&&(Fa=Ns)}),{start:_s,end:Fa}}var bn=st.from(),Pn=st.to();if(bn.line==Pn.line)Se(bn.line,bn.ch,Pn.ch);else{var Ii=Ln(pt,bn.line),Hi=Ln(pt,Pn.line),Ji=gn(Ii)==gn(Hi),dr=Se(bn.line,bn.ch,Ji?Ii.text.length+1:null).end,Rr=Se(Pn.line,Ji?0:null,Pn.ch).start;Ji&&(dr.top<Rr.top-2?(en(dr.right,dr.top,null,dr.bottom),en(qt,Rr.top,Rr.left,Rr.bottom)):en(dr.right,dr.top,Rr.left-dr.right,dr.bottom)),dr.bottom<Rr.top&&en(qt,dr.bottom,null,Rr.top)}ct.appendChild(Nt)}function as(it){if(it.state.focused){var st=it.display;clearInterval(st.blinker);var ct=!0;st.cursorDiv.style.visibility="",it.options.cursorBlinkRate>0?st.blinker=setInterval(function(){it.hasFocus()||dA(it),st.cursorDiv.style.visibility=(ct=!ct)?"":"hidden"},it.options.cursorBlinkRate):it.options.cursorBlinkRate<0&&(st.cursorDiv.style.visibility="hidden")}}function ms(it){it.state.focused||(it.display.input.focus(),Vo(it))}function Ts(it){it.state.delayingBlurEvent=!0,setTimeout(function(){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1,dA(it))},100)}function Vo(it,st){it.state.delayingBlurEvent&&(it.state.delayingBlurEvent=!1),it.options.readOnly!="nocursor"&&(it.state.focused||(On(it,"focus",it,st),it.state.focused=!0,nn(it.display.wrapper,"CodeMirror-focused"),!it.curOp&&it.display.selForContextMenu!=it.doc.sel&&(it.display.input.reset(),ie&&setTimeout(function(){return it.display.input.reset(!0)},20)),it.display.input.receivedFocus()),as(it))}function dA(it,st){it.state.delayingBlurEvent||(it.state.focused&&(On(it,"blur",it,st),it.state.focused=!1,Rt(it.display.wrapper,"CodeMirror-focused")),clearInterval(it.display.blinker),setTimeout(function(){it.state.focused||(it.display.shift=!1)},150))}function Yr(it){for(var st=it.display,ct=st.lineDiv.offsetTop,ht=0;ht<st.view.length;ht++){var pt=st.view[ht],Nt=it.options.lineWrapping,Kt=void 0,qt=0;if(!pt.hidden){if(de&&Ht<8){var Jt=pt.node.offsetTop+pt.node.offsetHeight;Kt=Jt-ct,ct=Jt}else{var me=pt.node.getBoundingClientRect();Kt=me.bottom-me.top,!Nt&&pt.text.firstChild&&(qt=pt.text.firstChild.getBoundingClientRect().right-me.left-1)}var en=pt.line.height-Kt;if((en>.005||en<-.005)&&($n(pt.line,Kt),Yu(pt.line),pt.rest))for(var Se=0;Se<pt.rest.length;Se++)Yu(pt.rest[Se]);if(qt>it.display.sizerWidth){var bn=Math.ceil(qt/gl(it.display));bn>it.display.maxLineLength&&(it.display.maxLineLength=bn,it.display.maxLine=pt.line,it.display.maxLineChanged=!0)}}}}function Yu(it){if(it.widgets)for(var st=0;st<it.widgets.length;++st){var ct=it.widgets[st],ht=ct.node.parentNode;ht&&(ct.height=ht.offsetHeight)}}function Eo(it,st,ct){var ht=ct&&ct.top!=null?Math.max(0,ct.top):it.scroller.scrollTop;ht=Math.floor(ht-lo(it));var pt=ct&&ct.bottom!=null?ct.bottom:ht+it.wrapper.clientHeight,Nt=De(st,ht),Kt=De(st,pt);if(ct&&ct.ensure){var qt=ct.ensure.from.line,Jt=ct.ensure.to.line;qt<Nt?(Nt=qt,Kt=De(st,Qi(Ln(st,qt))+it.wrapper.clientHeight)):Math.min(Jt,st.lastLine())>=Kt&&(Nt=De(st,Qi(Ln(st,Jt))-it.wrapper.clientHeight),Kt=Jt)}return{from:Nt,to:Math.max(Kt,Nt+1)}}function Oh(it,st){if(!Vn(it,"scrollCursorIntoView")){var ct=it.display,ht=ct.sizer.getBoundingClientRect(),pt=null;if(st.top+ht.top<0?pt=!0:st.bottom+ht.top>(window.innerHeight||document.documentElement.clientHeight)&&(pt=!1),pt!=null&&!Me){var Nt=te("div","\u200B",null,`position: absolute;
top: `+(st.top-ct.viewOffset-lo(it.display))+`px;
height: `+(st.bottom-st.top+eo(it)+ct.barHeight)+`px;
left: `+st.left+"px; width: "+Math.max(2,st.right-st.left)+"px;");it.display.lineSpace.appendChild(Nt),Nt.scrollIntoView(pt),it.display.lineSpace.removeChild(Nt)}}}function iu(it,st,ct,ht){ht==null&&(ht=0);var pt;!it.options.lineWrapping&&st==ct&&(st=st.ch?Ye(st.line,st.sticky=="before"?st.ch-1:st.ch,"after"):st,ct=st.sticky=="before"?Ye(st.line,st.ch+1,"before"):st);for(var Nt=0;Nt<5;Nt++){var Kt=!1,qt=Uo(it,st),Jt=!ct||ct==st?qt:Uo(it,ct);pt={left:Math.min(qt.left,Jt.left),top:Math.min(qt.top,Jt.top)-ht,right:Math.max(qt.left,Jt.left),bottom:Math.max(qt.bottom,Jt.bottom)+ht};var me=Rh(it,pt),en=it.doc.scrollTop,Se=it.doc.scrollLeft;if(me.scrollTop!=null&&(Pu(it,me.scrollTop),Math.abs(it.doc.scrollTop-en)>1&&(Kt=!0)),me.scrollLeft!=null&&(Fu(it,me.scrollLeft),Math.abs(it.doc.scrollLeft-Se)>1&&(Kt=!0)),!Kt)break}return pt}function TA(it,st){var ct=Rh(it,st);ct.scrollTop!=null&&Pu(it,ct.scrollTop),ct.scrollLeft!=null&&Fu(it,ct.scrollLeft)}function Rh(it,st){var ct=it.display,ht=ra(it.display);st.top<0&&(st.top=0);var pt=it.curOp&&it.curOp.scrollTop!=null?it.curOp.scrollTop:ct.scroller.scrollTop,Nt=Ko(it),Kt={};st.bottom-st.top>Nt&&(st.bottom=st.top+Nt);var qt=it.doc.height+Wi(ct),Jt=st.top<ht,me=st.bottom>qt-ht;if(st.top<pt)Kt.scrollTop=Jt?0:st.top;else if(st.bottom>pt+Nt){var en=Math.min(st.top,(me?qt:st.bottom)-Nt);en!=pt&&(Kt.scrollTop=en)}var Se=it.options.fixedGutter?0:ct.gutters.offsetWidth,bn=it.curOp&&it.curOp.scrollLeft!=null?it.curOp.scrollLeft:ct.scroller.scrollLeft-Se,Pn=xs(it)-ct.gutters.offsetWidth,Ii=st.right-st.left>Pn;return Ii&&(st.right=st.left+Pn),st.left<10?Kt.scrollLeft=0:st.left<bn?Kt.scrollLeft=Math.max(0,st.left+Se-(Ii?0:10)):st.right>Pn+bn-3&&(Kt.scrollLeft=st.right+(Ii?0:10)-Pn),Kt}function ch(it,st){st!=null&&(Gl(it),it.curOp.scrollTop=(it.curOp.scrollTop==null?it.doc.scrollTop:it.curOp.scrollTop)+st)}function gu(it){Gl(it);var st=it.getCursor();it.curOp.scrollToPos={from:st,to:st,margin:it.options.cursorScrollMargin}}function pu(it,st,ct){(st!=null||ct!=null)&&Gl(it),st!=null&&(it.curOp.scrollLeft=st),ct!=null&&(it.curOp.scrollTop=ct)}function Go(it,st){Gl(it),it.curOp.scrollToPos=st}function Gl(it){var st=it.curOp.scrollToPos;if(st){it.curOp.scrollToPos=null;var ct=Ro(it,st.from),ht=Ro(it,st.to);dh(it,ct,ht,st.margin)}}function dh(it,st,ct,ht){var pt=Rh(it,{left:Math.min(st.left,ct.left),top:Math.min(st.top,ct.top)-ht,right:Math.max(st.right,ct.right),bottom:Math.max(st.bottom,ct.bottom)+ht});pu(it,pt.scrollLeft,pt.scrollTop)}function Pu(it,st){Math.abs(it.doc.scrollTop-st)<2||(St||Lu(it,{top:st}),fA(it,st,!0),St&&Lu(it),DA(it,100))}function fA(it,st,ct){st=Math.max(0,Math.min(it.display.scroller.scrollHeight-it.display.scroller.clientHeight,st)),!(it.display.scroller.scrollTop==st&&!ct)&&(it.doc.scrollTop=st,it.display.scrollbars.setScrollTop(st),it.display.scroller.scrollTop!=st&&(it.display.scroller.scrollTop=st))}function Fu(it,st,ct,ht){st=Math.max(0,Math.min(st,it.display.scroller.scrollWidth-it.display.scroller.clientWidth)),!((ct?st==it.doc.scrollLeft:Math.abs(it.doc.scrollLeft-st)<2)&&!ht)&&(it.doc.scrollLeft=st,Ed(it),it.display.scroller.scrollLeft!=st&&(it.display.scroller.scrollLeft=st),it.display.scrollbars.setScrollLeft(st))}function So(it){var st=it.display,ct=st.gutters.offsetWidth,ht=Math.round(it.doc.height+Wi(it.display));return{clientHeight:st.scroller.clientHeight,viewHeight:st.wrapper.clientHeight,scrollWidth:st.scroller.scrollWidth,clientWidth:st.scroller.clientWidth,viewWidth:st.wrapper.clientWidth,barLeft:it.options.fixedGutter?ct:0,docHeight:ht,scrollHeight:ht+eo(it)+st.barHeight,nativeBarWidth:st.nativeBarWidth,gutterWidth:ct}}var _o=function(it,st,ct){this.cm=ct;var ht=this.vert=te("div",[te("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),pt=this.horiz=te("div",[te("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");ht.tabIndex=pt.tabIndex=-1,it(ht),it(pt),be(ht,"scroll",function(){ht.clientHeight&&st(ht.scrollTop,"vertical")}),be(pt,"scroll",function(){pt.clientWidth&&st(pt.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,de&&Ht<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};_o.prototype.update=function(it){var st=it.scrollWidth>it.clientWidth+1,ct=it.scrollHeight>it.clientHeight+1,ht=it.nativeBarWidth;if(ct){this.vert.style.display="block",this.vert.style.bottom=st?ht+"px":"0";var pt=it.viewHeight-(st?ht:0);this.vert.firstChild.style.height=Math.max(0,it.scrollHeight-it.clientHeight+pt)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(st){this.horiz.style.display="block",this.horiz.style.right=ct?ht+"px":"0",this.horiz.style.left=it.barLeft+"px";var Nt=it.viewWidth-it.barLeft-(ct?ht:0);this.horiz.firstChild.style.width=Math.max(0,it.scrollWidth-it.clientWidth+Nt)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&it.clientHeight>0&&(ht==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:ct?ht:0,bottom:st?ht:0}},_o.prototype.setScrollLeft=function(it){this.horiz.scrollLeft!=it&&(this.horiz.scrollLeft=it),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},_o.prototype.setScrollTop=function(it){this.vert.scrollTop!=it&&(this.vert.scrollTop=it),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},_o.prototype.zeroWidthHack=function(){var it=At&&!Xt?"12px":"18px";this.horiz.style.height=this.vert.style.width=it,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ne,this.disableVert=new ne},_o.prototype.enableZeroWidthBar=function(it,st,ct){it.style.pointerEvents="auto";function ht(){var pt=it.getBoundingClientRect(),Nt=ct=="vert"?document.elementFromPoint(pt.right-1,(pt.top+pt.bottom)/2):document.elementFromPoint((pt.right+pt.left)/2,pt.bottom-1);Nt!=it?it.style.pointerEvents="none":st.set(1e3,ht)}st.set(1e3,ht)},_o.prototype.clear=function(){var it=this.horiz.parentNode;it.removeChild(this.horiz),it.removeChild(this.vert)};var Os=function(){};Os.prototype.update=function(){return{bottom:0,right:0}},Os.prototype.setScrollLeft=function(){},Os.prototype.setScrollTop=function(){},Os.prototype.clear=function(){};function sa(it,st){st||(st=So(it));var ct=it.display.barWidth,ht=it.display.barHeight;va(it,st);for(var pt=0;pt<4&&ct!=it.display.barWidth||ht!=it.display.barHeight;pt++)ct!=it.display.barWidth&&it.options.lineWrapping&&Yr(it),va(it,So(it)),ct=it.display.barWidth,ht=it.display.barHeight}function va(it,st){var ct=it.display,ht=ct.scrollbars.update(st);ct.sizer.style.paddingRight=(ct.barWidth=ht.right)+"px",ct.sizer.style.paddingBottom=(ct.barHeight=ht.bottom)+"px",ct.heightForcer.style.borderBottom=ht.bottom+"px solid transparent",ht.right&&ht.bottom?(ct.scrollbarFiller.style.display="block",ct.scrollbarFiller.style.height=ht.bottom+"px",ct.scrollbarFiller.style.width=ht.right+"px"):ct.scrollbarFiller.style.display="",ht.bottom&&it.options.coverGutterNextToScrollbar&&it.options.fixedGutter?(ct.gutterFiller.style.display="block",ct.gutterFiller.style.height=ht.bottom+"px",ct.gutterFiller.style.width=st.gutterWidth+"px"):ct.gutterFiller.style.display=""}var Xu={native:_o,null:Os};function Eu(it){it.display.scrollbars&&(it.display.scrollbars.clear(),it.display.scrollbars.addClass&&Rt(it.display.wrapper,it.display.scrollbars.addClass)),it.display.scrollbars=new Xu[it.options.scrollbarStyle](function(st){it.display.wrapper.insertBefore(st,it.display.scrollbarFiller),be(st,"mousedown",function(){it.state.focused&&setTimeout(function(){return it.display.input.focus()},0)}),st.setAttribute("cm-not-content","true")},function(st,ct){ct=="horizontal"?Fu(it,st):Pu(it,st)},it),it.display.scrollbars.addClass&&nn(it.display.wrapper,it.display.scrollbars.addClass)}var Ju=0;function jl(it){it.curOp={cm:it,viewChanged:!1,startHeight:it.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Ju},es(it.curOp)}function mu(it){var st=it.curOp;st&&Ua(st,function(ct){for(var ht=0;ht<ct.ops.length;ht++)ct.ops[ht].cm.curOp=null;$g(ct)})}function $g(it){for(var st=it.ops,ct=0;ct<st.length;ct++)qg(st[ct]);for(var ht=0;ht<st.length;ht++)tp(st[ht]);for(var pt=0;pt<st.length;pt++)sg(st[pt]);for(var Nt=0;Nt<st.length;Nt++)Rs(st[Nt]);for(var Kt=0;Kt<st.length;Kt++)NA(st[Kt])}function qg(it){var st=it.cm,ct=st.display;ag(st),it.updateMaxLine&&Gi(st),it.mustUpdate=it.viewChanged||it.forceUpdate||it.scrollTop!=null||it.scrollToPos&&(it.scrollToPos.from.line<ct.viewFrom||it.scrollToPos.to.line>=ct.viewTo)||ct.maxLineChanged&&st.options.lineWrapping,it.update=it.mustUpdate&&new fh(st,it.mustUpdate&&{top:it.scrollTop,ensure:it.scrollToPos},it.forceUpdate)}function tp(it){it.updatedDisplay=it.mustUpdate&&Fd(it.cm,it.update)}function sg(it){var st=it.cm,ct=st.display;it.updatedDisplay&&Yr(st),it.barMeasure=So(st),ct.maxLineChanged&&!st.options.lineWrapping&&(it.adjustWidthTo=Qa(st,ct.maxLine,ct.maxLine.text.length).left+3,st.display.sizerWidth=it.adjustWidthTo,it.barMeasure.scrollWidth=Math.max(ct.scroller.clientWidth,ct.sizer.offsetLeft+it.adjustWidthTo+eo(st)+st.display.barWidth),it.maxScrollLeft=Math.max(0,ct.sizer.offsetLeft+it.adjustWidthTo-xs(st))),(it.updatedDisplay||it.selectionChanged)&&(it.preparedSelection=ct.input.prepareSelection())}function Rs(it){var st=it.cm;it.adjustWidthTo!=null&&(st.display.sizer.style.minWidth=it.adjustWidthTo+"px",it.maxScrollLeft<st.doc.scrollLeft&&Fu(st,Math.min(st.display.scroller.scrollLeft,it.maxScrollLeft),!0),st.display.maxLineChanged=!1);var ct=it.focus&&it.focus==_e();it.preparedSelection&&st.display.input.showSelection(it.preparedSelection,ct),(it.updatedDisplay||it.startHeight!=st.doc.height)&&sa(st,it.barMeasure),it.updatedDisplay&&UA(st,it.barMeasure),it.selectionChanged&&as(st),st.state.focused&&it.updateInput&&st.display.input.reset(it.typing),ct&&ms(it.cm)}function NA(it){var st=it.cm,ct=st.display,ht=st.doc;if(it.updatedDisplay&&vs(st,it.update),ct.wheelStartX!=null&&(it.scrollTop!=null||it.scrollLeft!=null||it.scrollToPos)&&(ct.wheelStartX=ct.wheelStartY=null),it.scrollTop!=null&&fA(st,it.scrollTop,it.forceScroll),it.scrollLeft!=null&&Fu(st,it.scrollLeft,!0,!0),it.scrollToPos){var pt=iu(st,fi(ht,it.scrollToPos.from),fi(ht,it.scrollToPos.to),it.scrollToPos.margin);Oh(st,pt)}var Nt=it.maybeHiddenMarkers,Kt=it.maybeUnhiddenMarkers;if(Nt)for(var qt=0;qt<Nt.length;++qt)Nt[qt].lines.length||On(Nt[qt],"hide");if(Kt)for(var Jt=0;Jt<Kt.length;++Jt)Kt[Jt].lines.length&&On(Kt[Jt],"unhide");ct.wrapper.offsetHeight&&(ht.scrollTop=st.display.scroller.scrollTop),it.changeObjs&&On(st,"changes",st,it.changeObjs),it.update&&it.update.finish()}function ls(it,st){if(it.curOp)return st();jl(it);try{return st()}finally{mu(it)}}function ya(it,st){return function(){if(it.curOp)return st.apply(it,arguments);jl(it);try{return st.apply(it,arguments)}finally{mu(it)}}}function Ma(it){return function(){if(this.curOp)return it.apply(this,arguments);jl(this);try{return it.apply(this,arguments)}finally{mu(this)}}}function ba(it){return function(){var st=this.cm;if(!st||st.curOp)return it.apply(this,arguments);jl(st);try{return it.apply(this,arguments)}finally{mu(st)}}}function DA(it,st){it.doc.highlightFrontier<it.display.viewTo&&it.state.highlight.set(st,_n(ca,it))}function ca(it){var st=it.doc;if(!(st.highlightFrontier>=it.display.viewTo)){var ct=+new Date+it.options.workTime,ht=vr(it,st.highlightFrontier),pt=[];st.iter(ht.line,Math.min(st.first+st.size,it.display.viewTo+500),function(Nt){if(ht.line>=it.display.viewFrom){var Kt=Nt.styles,qt=Nt.text.length>it.options.maxHighlightLength?ji(st.mode,ht.state):null,Jt=$i(it,Nt,ht,!0);qt&&(ht.state=qt),Nt.styles=Jt.styles;var me=Nt.styleClasses,en=Jt.classes;en?Nt.styleClasses=en:me&&(Nt.styleClasses=null);for(var Se=!Kt||Kt.length!=Nt.styles.length||me!=en&&(!me||!en||me.bgClass!=en.bgClass||me.textClass!=en.textClass),bn=0;!Se&&bn<Kt.length;++bn)Se=Kt[bn]!=Nt.styles[bn];Se&&pt.push(ht.line),Nt.stateAfter=ht.save(),ht.nextLine()}else Nt.text.length<=it.options.maxHighlightLength&&Te(it,Nt.text,ht),Nt.stateAfter=ht.line%5==0?ht.save():null,ht.nextLine();if(+new Date>ct)return DA(it,it.options.workDelay),!0}),st.highlightFrontier=ht.line,st.modeFrontier=Math.max(st.modeFrontier,ht.line),pt.length&&ls(it,function(){for(var Nt=0;Nt<pt.length;Nt++)yo(it,pt[Nt],"text")})}}var fh=function(it,st,ct){var ht=it.display;this.viewport=st,this.visible=Eo(ht,it.doc,st),this.editorIsHidden=!ht.wrapper.offsetWidth,this.wrapperHeight=ht.wrapper.clientHeight,this.wrapperWidth=ht.wrapper.clientWidth,this.oldDisplayWidth=xs(it),this.force=ct,this.dims=zl(it),this.events=[]};fh.prototype.signal=function(it,st){si(it,st)&&this.events.push(arguments)},fh.prototype.finish=function(){for(var it=0;it<this.events.length;it++)On.apply(null,this.events[it])};function ag(it){var st=it.display;!st.scrollbarsClipped&&st.scroller.offsetWidth&&(st.nativeBarWidth=st.scroller.offsetWidth-st.scroller.clientWidth,st.heightForcer.style.height=eo(it)+"px",st.sizer.style.marginBottom=-st.nativeBarWidth+"px",st.sizer.style.borderRightWidth=eo(it)+"px",st.scrollbarsClipped=!0)}function lg(it){if(it.hasFocus())return null;var st=_e();if(!st||!Ke(it.display.lineDiv,st))return null;var ct={activeElt:st};if(window.getSelection){var ht=window.getSelection();ht.anchorNode&&ht.extend&&Ke(it.display.lineDiv,ht.anchorNode)&&(ct.anchorNode=ht.anchorNode,ct.anchorOffset=ht.anchorOffset,ct.focusNode=ht.focusNode,ct.focusOffset=ht.focusOffset)}return ct}function pl(it){if(!(!it||!it.activeElt||it.activeElt==_e())&&(it.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(it.activeElt.nodeName)&&it.anchorNode&&Ke(document.body,it.anchorNode)&&Ke(document.body,it.focusNode))){var st=window.getSelection(),ct=document.createRange();ct.setEnd(it.anchorNode,it.anchorOffset),ct.collapse(!1),st.removeAllRanges(),st.addRange(ct),st.extend(it.focusNode,it.focusOffset)}}function Fd(it,st){var ct=it.display,ht=it.doc;if(st.editorIsHidden)return Fs(it),!1;if(!st.force&&st.visible.from>=ct.viewFrom&&st.visible.to<=ct.viewTo&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo)&&ct.renderedView==ct.view&&rl(it)==0)return!1;da(it)&&(Fs(it),st.dims=zl(it));var pt=ht.first+ht.size,Nt=Math.max(st.visible.from-it.options.viewportMargin,ht.first),Kt=Math.min(pt,st.visible.to+it.options.viewportMargin);ct.viewFrom<Nt&&Nt-ct.viewFrom<20&&(Nt=Math.max(ht.first,ct.viewFrom)),ct.viewTo>Kt&&ct.viewTo-Kt<20&&(Kt=Math.min(pt,ct.viewTo)),ee&&(Nt=qe(it.doc,Nt),Kt=In(it.doc,Kt));var qt=Nt!=ct.viewFrom||Kt!=ct.viewTo||ct.lastWrapHeight!=st.wrapperHeight||ct.lastWrapWidth!=st.wrapperWidth;ss(it,Nt,Kt),ct.viewOffset=Qi(Ln(it.doc,ct.viewFrom)),it.display.mover.style.top=ct.viewOffset+"px";var Jt=rl(it);if(!qt&&Jt==0&&!st.force&&ct.renderedView==ct.view&&(ct.updateLineNumbers==null||ct.updateLineNumbers>=ct.viewTo))return!1;var me=lg(it);return Jt>4&&(ct.lineDiv.style.display="none"),cf(it,ct.updateLineNumbers,st.dims),Jt>4&&(ct.lineDiv.style.display=""),ct.renderedView=ct.view,pl(me),Zt(ct.cursorDiv),Zt(ct.selectionDiv),ct.gutters.style.height=ct.sizer.style.minHeight=0,qt&&(ct.lastWrapHeight=st.wrapperHeight,ct.lastWrapWidth=st.wrapperWidth,DA(it,400)),ct.updateLineNumbers=null,!0}function vs(it,st){for(var ct=st.viewport,ht=!0;;ht=!1){if(!ht||!it.options.lineWrapping||st.oldDisplayWidth==xs(it)){if(ct&&ct.top!=null&&(ct={top:Math.min(it.doc.height+Wi(it.display)-Ko(it),ct.top)}),st.visible=Eo(it.display,it.doc,ct),st.visible.from>=it.display.viewFrom&&st.visible.to<=it.display.viewTo)break}else ht&&(st.visible=Eo(it.display,it.doc,ct));if(!Fd(it,st))break;Yr(it);var pt=So(it);Ws(it),sa(it,pt),UA(it,pt),st.force=!1}st.signal(it,"update",it),(it.display.viewFrom!=it.display.reportedViewFrom||it.display.viewTo!=it.display.reportedViewTo)&&(st.signal(it,"viewportChange",it,it.display.viewFrom,it.display.viewTo),it.display.reportedViewFrom=it.display.viewFrom,it.display.reportedViewTo=it.display.viewTo)}function Lu(it,st){var ct=new fh(it,st);if(Fd(it,ct)){Yr(it),vs(it,ct);var ht=So(it);Ws(it),sa(it,ht),UA(it,ht),ct.finish()}}function cf(it,st,ct){var ht=it.display,pt=it.options.lineNumbers,Nt=ht.lineDiv,Kt=Nt.firstChild;function qt(Ii){var Hi=Ii.nextSibling;return ie&&At&&it.display.currentWheelTarget==Ii?Ii.style.display="none":Ii.parentNode.removeChild(Ii),Hi}for(var Jt=ht.view,me=ht.viewFrom,en=0;en<Jt.length;en++){var Se=Jt[en];if(!Se.hidden)if(!Se.node||Se.node.parentNode!=Nt){var bn=so(it,Se,me,ct);Nt.insertBefore(bn,Kt)}else{for(;Kt!=Se.node;)Kt=qt(Kt);var Pn=pt&&st!=null&&st<=me&&Se.lineNumber;Se.changes&&(pn(Se.changes,"gutter")>-1&&(Pn=!1),rs(it,Se,me,ct)),Pn&&(Zt(Se.lineNumber),Se.lineNumber.appendChild(document.createTextNode(Zn(it.options,me)))),Kt=Se.node.nextSibling}me+=Se.size}for(;Kt;)Kt=qt(Kt)}function IA(it){var st=it.gutters.offsetWidth;it.sizer.style.marginLeft=st+"px"}function UA(it,st){it.display.sizer.style.minHeight=st.docHeight+"px",it.display.heightForcer.style.top=st.docHeight+"px",it.display.gutters.style.height=st.docHeight+it.display.barHeight+eo(it)+"px"}function Ed(it){var st=it.display,ct=st.view;if(!(!st.alignWidgets&&(!st.gutters.firstChild||!it.options.fixedGutter))){for(var ht=fu(st)-st.scroller.scrollLeft+it.doc.scrollLeft,pt=st.gutters.offsetWidth,Nt=ht+"px",Kt=0;Kt<ct.length;Kt++)if(!ct[Kt].hidden){it.options.fixedGutter&&(ct[Kt].gutter&&(ct[Kt].gutter.style.left=Nt),ct[Kt].gutterBackground&&(ct[Kt].gutterBackground.style.left=Nt));var qt=ct[Kt].alignable;if(qt)for(var Jt=0;Jt<qt.length;Jt++)qt[Jt].style.left=Nt}it.options.fixedGutter&&(st.gutters.style.left=ht+pt+"px")}}function da(it){if(!it.options.lineNumbers)return!1;var st=it.doc,ct=Zn(it.options,st.first+st.size-1),ht=it.display;if(ct.length!=ht.lineNumChars){var pt=ht.measure.appendChild(te("div",[te("div",ct)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Nt=pt.firstChild.offsetWidth,Kt=pt.offsetWidth-Nt;return ht.lineGutter.style.width="",ht.lineNumInnerWidth=Math.max(Nt,ht.lineGutter.offsetWidth-Kt)+1,ht.lineNumWidth=ht.lineNumInnerWidth+Kt,ht.lineNumChars=ht.lineNumInnerWidth?ct.length:-1,ht.lineGutter.style.width=ht.lineNumWidth+"px",IA(it.display),!0}return!1}function ka(it,st){for(var ct=[],ht=!1,pt=0;pt<it.length;pt++){var Nt=it[pt],Kt=null;if(typeof Nt!="string"&&(Kt=Nt.style,Nt=Nt.className),Nt=="CodeMirror-linenumbers")if(st)ht=!0;else continue;ct.push({className:Nt,style:Kt})}return st&&!ht&&ct.push({className:"CodeMirror-linenumbers",style:null}),ct}function gh(it){var st=it.gutters,ct=it.gutterSpecs;Zt(st),it.lineGutter=null;for(var ht=0;ht<ct.length;++ht){var pt=ct[ht],Nt=pt.className,Kt=pt.style,qt=st.appendChild(te("div",null,"CodeMirror-gutter "+Nt));Kt&&(qt.style.cssText=Kt),Nt=="CodeMirror-linenumbers"&&(it.lineGutter=qt,qt.style.width=(it.lineNumWidth||1)+"px")}st.style.display=ct.length?"":"none",IA(it)}function Vl(it){gh(it.display),Ss(it),Ed(it)}function QA(it,st,ct,ht){var pt=this;this.input=ct,pt.scrollbarFiller=te("div",null,"CodeMirror-scrollbar-filler"),pt.scrollbarFiller.setAttribute("cm-not-content","true"),pt.gutterFiller=te("div",null,"CodeMirror-gutter-filler"),pt.gutterFiller.setAttribute("cm-not-content","true"),pt.lineDiv=ye("div",null,"CodeMirror-code"),pt.selectionDiv=te("div",null,null,"position: relative; z-index: 1"),pt.cursorDiv=te("div",null,"CodeMirror-cursors"),pt.measure=te("div",null,"CodeMirror-measure"),pt.lineMeasure=te("div",null,"CodeMirror-measure"),pt.lineSpace=ye("div",[pt.measure,pt.lineMeasure,pt.selectionDiv,pt.cursorDiv,pt.lineDiv],null,"position: relative; outline: none");var Nt=ye("div",[pt.lineSpace],"CodeMirror-lines");pt.mover=te("div",[Nt],null,"position: relative"),pt.sizer=te("div",[pt.mover],"CodeMirror-sizer"),pt.sizerWidth=null,pt.heightForcer=te("div",null,null,"position: absolute; height: "+Ai+"px; width: 1px;"),pt.gutters=te("div",null,"CodeMirror-gutters"),pt.lineGutter=null,pt.scroller=te("div",[pt.sizer,pt.heightForcer,pt.gutters],"CodeMirror-scroll"),pt.scroller.setAttribute("tabIndex","-1"),pt.wrapper=te("div",[pt.scrollbarFiller,pt.gutterFiller,pt.scroller],"CodeMirror"),de&&Ht<8&&(pt.gutters.style.zIndex=-1,pt.scroller.style.paddingRight=0),!ie&&!(St&&et)&&(pt.scroller.draggable=!0),it&&(it.appendChild?it.appendChild(pt.wrapper):it(pt.wrapper)),pt.viewFrom=pt.viewTo=st.first,pt.reportedViewFrom=pt.reportedViewTo=st.first,pt.view=[],pt.renderedView=null,pt.externalMeasured=null,pt.viewOffset=0,pt.lastWrapHeight=pt.lastWrapWidth=0,pt.updateLineNumbers=null,pt.nativeBarWidth=pt.barHeight=pt.barWidth=0,pt.scrollbarsClipped=!1,pt.lineNumWidth=pt.lineNumInnerWidth=pt.lineNumChars=null,pt.alignWidgets=!1,pt.cachedCharWidth=pt.cachedTextHeight=pt.cachedPaddingH=null,pt.maxLine=null,pt.maxLineLength=0,pt.maxLineChanged=!1,pt.wheelDX=pt.wheelDY=pt.wheelStartX=pt.wheelStartY=null,pt.shift=!1,pt.selForContextMenu=null,pt.activeTouch=null,pt.gutterSpecs=ka(ht.gutters,ht.lineNumbers),gh(pt),ct.init(pt)}var Tl=0,aa=null;de?aa=-.53:St?aa=15:he?aa=-.7:Ie&&(aa=-1/3);function Mu(it){var st=it.wheelDeltaX,ct=it.wheelDeltaY;return st==null&&it.detail&&it.axis==it.HORIZONTAL_AXIS&&(st=it.detail),ct==null&&it.detail&&it.axis==it.VERTICAL_AXIS?ct=it.detail:ct==null&&(ct=it.wheelDelta),{x:st,y:ct}}function Nl(it){var st=Mu(it);return st.x*=aa,st.y*=aa,st}function Ta(it,st){var ct=Mu(st),ht=ct.x,pt=ct.y,Nt=it.display,Kt=Nt.scroller,qt=Kt.scrollWidth>Kt.clientWidth,Jt=Kt.scrollHeight>Kt.clientHeight;if(ht&&qt||pt&&Jt){if(pt&&At&&ie){t:for(var me=st.target,en=Nt.view;me!=Kt;me=me.parentNode)for(var Se=0;Se<en.length;Se++)if(en[Se].node==me){it.display.currentWheelTarget=me;break t}}if(ht&&!St&&!Gt&&aa!=null){pt&&Jt&&Pu(it,Math.max(0,Kt.scrollTop+pt*aa)),Fu(it,Math.max(0,Kt.scrollLeft+ht*aa)),(!pt||pt&&Jt)&&Ei(st),Nt.wheelStartX=null;return}if(pt&&aa!=null){var bn=pt*aa,Pn=it.doc.scrollTop,Ii=Pn+Nt.wrapper.clientHeight;bn<0?Pn=Math.max(0,Pn+bn-50):Ii=Math.min(it.doc.height,Ii+bn+50),Lu(it,{top:Pn,bottom:Ii})}Tl<20&&(Nt.wheelStartX==null?(Nt.wheelStartX=Kt.scrollLeft,Nt.wheelStartY=Kt.scrollTop,Nt.wheelDX=ht,Nt.wheelDY=pt,setTimeout(function(){if(Nt.wheelStartX!=null){var Hi=Kt.scrollLeft-Nt.wheelStartX,Ji=Kt.scrollTop-Nt.wheelStartY,dr=Ji&&Nt.wheelDY&&Ji/Nt.wheelDY||Hi&&Nt.wheelDX&&Hi/Nt.wheelDX;Nt.wheelStartX=Nt.wheelStartY=null,dr&&(aa=(aa*Tl+dr)/(Tl+1),++Tl)}},200)):(Nt.wheelDX+=ht,Nt.wheelDY+=pt))}}var ru=function(it,st){this.ranges=it,this.primIndex=st};ru.prototype.primary=function(){return this.ranges[this.primIndex]},ru.prototype.equals=function(it){if(it==this)return!0;if(it.primIndex!=this.primIndex||it.ranges.length!=this.ranges.length)return!1;for(var st=0;st<this.ranges.length;st++){var ct=this.ranges[st],ht=it.ranges[st];if(!bi(ct.anchor,ht.anchor)||!bi(ct.head,ht.head))return!1}return!0},ru.prototype.deepCopy=function(){for(var it=[],st=0;st<this.ranges.length;st++)it[st]=new ys(ki(this.ranges[st].anchor),ki(this.ranges[st].head));return new ru(it,this.primIndex)},ru.prototype.somethingSelected=function(){for(var it=0;it<this.ranges.length;it++)if(!this.ranges[it].empty())return!0;return!1},ru.prototype.contains=function(it,st){st||(st=it);for(var ct=0;ct<this.ranges.length;ct++){var ht=this.ranges[ct];if(Dn(st,ht.from())>=0&&Dn(it,ht.to())<=0)return ct}return-1};var ys=function(it,st){this.anchor=it,this.head=st};ys.prototype.from=function(){return li(this.anchor,this.head)},ys.prototype.to=function(){return Ni(this.anchor,this.head)},ys.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function ml(it,st,ct){var ht=it&&it.options.selectionsMayTouch,pt=st[ct];st.sort(function(bn,Pn){return Dn(bn.from(),Pn.from())}),ct=pn(st,pt);for(var Nt=1;Nt<st.length;Nt++){var Kt=st[Nt],qt=st[Nt-1],Jt=Dn(qt.to(),Kt.from());if(ht&&!Kt.empty()?Jt>0:Jt>=0){var me=li(qt.from(),Kt.from()),en=Ni(qt.to(),Kt.to()),Se=qt.empty()?Kt.from()==Kt.head:qt.from()==qt.head;Nt<=ct&&--ct,st.splice(--Nt,2,new ys(Se?en:me,Se?me:en))}}return new ru(st,ct)}function gA(it,st){return new ru([new ys(it,st||it)],0)}function OA(it){return it.text?Ye(it.from.line+it.text.length-1,tn(it.text).length+(it.text.length==1?it.from.ch:0)):it.to}function RA(it,st){if(Dn(it,st.from)<0)return it;if(Dn(it,st.to)<=0)return OA(st);var ct=it.line+st.text.length-(st.to.line-st.from.line)-1,ht=it.ch;return it.line==st.to.line&&(ht+=OA(st).ch-st.to.ch),Ye(ct,ht)}function Qc(it,st){for(var ct=[],ht=0;ht<it.sel.ranges.length;ht++){var pt=it.sel.ranges[ht];ct.push(new ys(RA(pt.anchor,st),RA(pt.head,st)))}return ml(it.cm,ct,it.sel.primIndex)}function Hh(it,st,ct){return it.line==st.line?Ye(ct.line,it.ch-st.ch+ct.ch):Ye(ct.line+(it.line-st.line),it.ch)}function Oc(it,st,ct){for(var ht=[],pt=Ye(it.first,0),Nt=pt,Kt=0;Kt<st.length;Kt++){var qt=st[Kt],Jt=Hh(qt.from,pt,Nt),me=Hh(OA(qt),pt,Nt);if(pt=qt.to,Nt=me,ct=="around"){var en=it.sel.ranges[Kt],Se=Dn(en.head,en.anchor)<0;ht[Kt]=new ys(Se?me:Jt,Se?Jt:me)}else ht[Kt]=new ys(Jt,Jt)}return new ru(ht,it.sel.primIndex)}function To(it){it.doc.mode=rn(it.options,it.doc.modeOption),Rc(it)}function Rc(it){it.doc.iter(function(st){st.stateAfter&&(st.stateAfter=null),st.styles&&(st.styles=null)}),it.doc.modeFrontier=it.doc.highlightFrontier=it.doc.first,DA(it,100),it.state.modeGen++,it.curOp&&Ss(it)}function df(it,st){return st.from.ch==0&&st.to.ch==0&&tn(st.text)==""&&(!it.cm||it.cm.options.wholeLineUpdateBefore)}function Ld(it,st,ct,ht){function pt(Rr){return ct?ct[Rr]:null}function Nt(Rr,Er,jr){yr(Rr,Er,jr,ht),wr(Rr,"change",Rr,st)}function Kt(Rr,Er){for(var jr=[],po=Rr;po<Er;++po)jr.push(new Fr(me[po],pt(po),ht));return jr}var qt=st.from,Jt=st.to,me=st.text,en=Ln(it,qt.line),Se=Ln(it,Jt.line),bn=tn(me),Pn=pt(me.length-1),Ii=Jt.line-qt.line;if(st.full)it.insert(0,Kt(0,me.length)),it.remove(me.length,it.size-me.length);else if(df(it,st)){var Hi=Kt(0,me.length-1);Nt(Se,Se.text,Pn),Ii&&it.remove(qt.line,Ii),Hi.length&&it.insert(qt.line,Hi)}else if(en==Se)if(me.length==1)Nt(en,en.text.slice(0,qt.ch)+bn+en.text.slice(Jt.ch),Pn);else{var Ji=Kt(1,me.length-1);Ji.push(new Fr(bn+en.text.slice(Jt.ch),Pn,ht)),Nt(en,en.text.slice(0,qt.ch)+me[0],pt(0)),it.insert(qt.line+1,Ji)}else if(me.length==1)Nt(en,en.text.slice(0,qt.ch)+me[0]+Se.text.slice(Jt.ch),pt(0)),it.remove(qt.line+1,Ii);else{Nt(en,en.text.slice(0,qt.ch)+me[0],pt(0)),Nt(Se,bn+Se.text.slice(Jt.ch),Pn);var dr=Kt(1,me.length-1);Ii>1&&it.remove(qt.line+1,Ii-1),it.insert(qt.line+1,dr)}wr(it,"change",it,st)}function bu(it,st,ct){function ht(pt,Nt,Kt){if(pt.linked)for(var qt=0;qt<pt.linked.length;++qt){var Jt=pt.linked[qt];if(Jt.doc!=Nt){var me=Kt&&Jt.sharedHist;ct&&!me||(st(Jt.doc,me),ht(Jt.doc,pt,me))}}}ht(it,null,!0)}function wa(it,st){if(st.cm)throw new Error("This document is already in use.");it.doc=st,st.cm=it,Xr(it),To(it),Hc(it),it.options.lineWrapping||Gi(it),it.options.mode=st.modeOption,Ss(it)}function Hc(it){(it.doc.direction=="rtl"?nn:Rt)(it.display.lineDiv,"CodeMirror-rtl")}function ep(it){ls(it,function(){Hc(it),Ss(it)})}function _h(it){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=it||1}function Md(it,st){var ct={from:ki(st.from),to:OA(st),text:Pe(it,st.from,st.to)};return HA(it,ct,st.from.line,st.to.line+1),bu(it,function(ht){return HA(ht,ct,st.from.line,st.to.line+1)},!0),ct}function Kh(it){for(;it.length;){var st=tn(it);if(st.ranges)it.pop();else break}}function zh(it,st){if(st)return Kh(it.done),tn(it.done);if(it.done.length&&!tn(it.done).ranges)return tn(it.done);if(it.done.length>1&&!it.done[it.done.length-2].ranges)return it.done.pop(),tn(it.done)}function _c(it,st,ct,ht){var pt=it.history;pt.undone.length=0;var Nt=+new Date,Kt,qt;if((pt.lastOp==ht||pt.lastOrigin==st.origin&&st.origin&&(st.origin.charAt(0)=="+"&&pt.lastModTime>Nt-(it.cm?it.cm.options.historyEventDelay:500)||st.origin.charAt(0)=="*"))&&(Kt=zh(pt,pt.lastOp==ht)))qt=tn(Kt.changes),Dn(st.from,st.to)==0&&Dn(st.from,qt.to)==0?qt.to=OA(st):Kt.changes.push(Md(it,st));else{var Jt=tn(pt.done);for((!Jt||!Jt.ranges)&&Gh(it.sel,pt.done),Kt={changes:[Md(it,st)],generation:pt.generation},pt.done.push(Kt);pt.done.length>pt.undoDepth;)pt.done.shift(),pt.done[0].ranges||pt.done.shift()}pt.done.push(ct),pt.generation=++pt.maxGeneration,pt.lastModTime=pt.lastSelTime=Nt,pt.lastOp=pt.lastSelOp=ht,pt.lastOrigin=pt.lastSelOrigin=st.origin,qt||On(it,"historyAdded")}function ff(it,st,ct,ht){var pt=st.charAt(0);return pt=="*"||pt=="+"&&ct.ranges.length==ht.ranges.length&&ct.somethingSelected()==ht.somethingSelected()&&new Date-it.history.lastSelTime<=(it.cm?it.cm.options.historyEventDelay:500)}function Kc(it,st,ct,ht){var pt=it.history,Nt=ht&&ht.origin;ct==pt.lastSelOp||Nt&&pt.lastSelOrigin==Nt&&(pt.lastModTime==pt.lastSelTime&&pt.lastOrigin==Nt||ff(it,Nt,tn(pt.done),st))?pt.done[pt.done.length-1]=st:Gh(st,pt.done),pt.lastSelTime=+new Date,pt.lastSelOrigin=Nt,pt.lastSelOp=ct,ht&&ht.clearRedo!==!1&&Kh(pt.undone)}function Gh(it,st){var ct=tn(st);ct&&ct.ranges&&ct.equals(it)||st.push(it)}function HA(it,st,ct,ht){var pt=st["spans_"+it.id],Nt=0;it.iter(Math.max(it.first,ct),Math.min(it.first+it.size,ht),function(Kt){Kt.markedSpans&&((pt||(pt=st["spans_"+it.id]={}))[Nt]=Kt.markedSpans),++Nt})}function ol(it){if(!it)return null;for(var st,ct=0;ct<it.length;++ct)it[ct].marker.explicitlyCleared?st||(st=it.slice(0,ct)):st&&st.push(it[ct]);return st?st.length?st:null:it}function ku(it,st){var ct=st["spans_"+it.id];if(!ct)return null;for(var ht=[],pt=0;pt<st.text.length;++pt)ht.push(ol(ct[pt]));return ht}function qr(it,st){var ct=ku(it,st),ht=Di(it,st);if(!ct)return ht;if(!ht)return ct;for(var pt=0;pt<ct.length;++pt){var Nt=ct[pt],Kt=ht[pt];if(Nt&&Kt)t:for(var qt=0;qt<Kt.length;++qt){for(var Jt=Kt[qt],me=0;me<Nt.length;++me)if(Nt[me].marker==Jt.marker)continue t;Nt.push(Jt)}else Kt&&(ct[pt]=Kt)}return ct}function pA(it,st,ct){for(var ht=[],pt=0;pt<it.length;++pt){var Nt=it[pt];if(Nt.ranges){ht.push(ct?ru.prototype.deepCopy.call(Nt):Nt);continue}var Kt=Nt.changes,qt=[];ht.push({changes:qt});for(var Jt=0;Jt<Kt.length;++Jt){var me=Kt[Jt],en=void 0;if(qt.push({from:me.from,to:me.to,text:me.text}),st)for(var Se in me)(en=Se.match(/^spans_(\d+)$/))&&pn(st,Number(en[1]))>-1&&(tn(qt)[Se]=me[Se],delete me[Se])}}return ht}function bd(it,st,ct,ht){if(ht){var pt=it.anchor;if(ct){var Nt=Dn(st,pt)<0;Nt!=Dn(ct,pt)<0?(pt=st,st=ct):Nt!=Dn(st,ct)<0&&(st=ct)}return new ys(pt,st)}else return new ys(ct||st,st)}function jh(it,st,ct,ht,pt){pt==null&&(pt=it.cm&&(it.cm.display.shift||it.extend)),Va(it,new ru([bd(it.sel.primary(),st,ct,pt)],0),ht)}function Tu(it,st,ct){for(var ht=[],pt=it.cm&&(it.cm.display.shift||it.extend),Nt=0;Nt<it.sel.ranges.length;Nt++)ht[Nt]=bd(it.sel.ranges[Nt],st[Nt],null,pt);var Kt=ml(it.cm,ht,it.sel.primIndex);Va(it,Kt,ct)}function _A(it,st,ct,ht){var pt=it.sel.ranges.slice(0);pt[st]=ct,Va(it,ml(it.cm,pt,it.sel.primIndex),ht)}function KA(it,st,ct,ht){Va(it,gA(st,ct),ht)}function Vh(it,st,ct){var ht={ranges:st.ranges,update:function(pt){this.ranges=[];for(var Nt=0;Nt<pt.length;Nt++)this.ranges[Nt]=new ys(fi(it,pt[Nt].anchor),fi(it,pt[Nt].head))},origin:ct&&ct.origin};return On(it,"beforeSelectionChange",it,ht),it.cm&&On(it.cm,"beforeSelectionChange",it.cm,ht),ht.ranges!=st.ranges?ml(it.cm,ht.ranges,ht.ranges.length-1):st}function ph(it,st,ct){var ht=it.history.done,pt=tn(ht);pt&&pt.ranges?(ht[ht.length-1]=st,mh(it,st,ct)):Va(it,st,ct)}function Va(it,st,ct){mh(it,st,ct),Kc(it,it.sel,it.cm?it.cm.curOp.id:NaN,ct)}function mh(it,st,ct){(si(it,"beforeSelectionChange")||it.cm&&si(it.cm,"beforeSelectionChange"))&&(st=Vh(it,st,ct));var ht=ct&&ct.bias||(Dn(st.primary().head,it.sel.primary().head)<0?-1:1);gf(it,vh(it,st,ht,!0)),!(ct&&ct.scroll===!1)&&it.cm&&gu(it.cm)}function gf(it,st){st.equals(it.sel)||(it.sel=st,it.cm&&(it.cm.curOp.updateInput=1,it.cm.curOp.selectionChanged=!0,Ki(it.cm)),wr(it,"cursorActivity",it))}function Nu(it){gf(it,vh(it,it.sel,null,!1))}function vh(it,st,ct,ht){for(var pt,Nt=0;Nt<st.ranges.length;Nt++){var Kt=st.ranges[Nt],qt=st.ranges.length==it.sel.ranges.length&&it.sel.ranges[Nt],Jt=zc(it,Kt.anchor,qt&&qt.anchor,ct,ht),me=zc(it,Kt.head,qt&&qt.head,ct,ht);(pt||Jt!=Kt.anchor||me!=Kt.head)&&(pt||(pt=st.ranges.slice(0,Nt)),pt[Nt]=new ys(Jt,me))}return pt?ml(it.cm,pt,st.primIndex):st}function Du(it,st,ct,ht,pt){var Nt=Ln(it,st.line);if(Nt.markedSpans)for(var Kt=0;Kt<Nt.markedSpans.length;++Kt){var qt=Nt.markedSpans[Kt],Jt=qt.marker,me="selectLeft"in Jt?!Jt.selectLeft:Jt.inclusiveLeft,en="selectRight"in Jt?!Jt.selectRight:Jt.inclusiveRight;if((qt.from==null||(me?qt.from<=st.ch:qt.from<st.ch))&&(qt.to==null||(en?qt.to>=st.ch:qt.to>st.ch))){if(pt&&(On(Jt,"beforeCursorEnter"),Jt.explicitlyCleared))if(Nt.markedSpans){--Kt;continue}else break;if(!Jt.atomic)continue;if(ct){var Se=Jt.find(ht<0?1:-1),bn=void 0;if((ht<0?en:me)&&(Se=kd(it,Se,-ht,Se&&Se.line==st.line?Nt:null)),Se&&Se.line==st.line&&(bn=Dn(Se,ct))&&(ht<0?bn<0:bn>0))return Du(it,Se,st,ht,pt)}var Pn=Jt.find(ht<0?-1:1);return(ht<0?me:en)&&(Pn=kd(it,Pn,ht,Pn.line==st.line?Nt:null)),Pn?Du(it,Pn,st,ht,pt):null}}return st}function zc(it,st,ct,ht,pt){var Nt=ht||1,Kt=Du(it,st,ct,Nt,pt)||!pt&&Du(it,st,ct,Nt,!0)||Du(it,st,ct,-Nt,pt)||!pt&&Du(it,st,ct,-Nt,!0);return Kt||(it.cantEdit=!0,Ye(it.first,0))}function kd(it,st,ct,ht){return ct<0&&st.ch==0?st.line>it.first?fi(it,Ye(st.line-1)):null:ct>0&&st.ch==(ht||Ln(it,st.line)).text.length?st.line<it.first+it.size-1?Ye(st.line+1,0):null:new Ye(st.line,st.ch+ct)}function la(it){it.setSelection(Ye(it.firstLine(),0),Ye(it.lastLine()),sn)}function yh(it,st,ct){var ht={canceled:!1,from:st.from,to:st.to,text:st.text,origin:st.origin,cancel:function(){return ht.canceled=!0}};return ct&&(ht.update=function(pt,Nt,Kt,qt){pt&&(ht.from=fi(it,pt)),Nt&&(ht.to=fi(it,Nt)),Kt&&(ht.text=Kt),qt!==void 0&&(ht.origin=qt)}),On(it,"beforeChange",it,ht),it.cm&&On(it.cm,"beforeChange",it.cm,ht),ht.canceled?(it.cm&&(it.cm.curOp.updateInput=2),null):{from:ht.from,to:ht.to,text:ht.text,origin:ht.origin}}function zA(it,st,ct){if(it.cm){if(!it.cm.curOp)return ya(it.cm,zA)(it,st,ct);if(it.cm.state.suppressEdits)return}if(!((si(it,"beforeChange")||it.cm&&si(it.cm,"beforeChange"))&&(st=yh(it,st,!0),!st))){var ht=re&&!ct&&hn(it,st.from,st.to);if(ht)for(var pt=ht.length-1;pt>=0;--pt)wh(it,{from:ht[pt].from,to:ht[pt].to,text:pt?[""]:st.text,origin:st.origin});else wh(it,st)}}function wh(it,st){if(!(st.text.length==1&&st.text[0]==""&&Dn(st.from,st.to)==0)){var ct=Qc(it,st);_c(it,st,ct,it.cm?it.cm.curOp.id:NaN),Zh(it,st,ct,Di(it,st));var ht=[];bu(it,function(pt,Nt){!Nt&&pn(ht,pt.history)==-1&&(vf(pt.history,st),ht.push(pt.history)),Zh(pt,st,null,Di(pt,st))})}}function Gc(it,st,ct){var ht=it.cm&&it.cm.state.suppressEdits;if(!(ht&&!ct)){for(var pt=it.history,Nt,Kt=it.sel,qt=st=="undo"?pt.done:pt.undone,Jt=st=="undo"?pt.undone:pt.done,me=0;me<qt.length&&(Nt=qt[me],!(ct?Nt.ranges&&!Nt.equals(it.sel):!Nt.ranges));me++);if(me!=qt.length){for(pt.lastOrigin=pt.lastSelOrigin=null;;)if(Nt=qt.pop(),Nt.ranges){if(Gh(Nt,Jt),ct&&!Nt.equals(it.sel)){Va(it,Nt,{clearRedo:!1});return}Kt=Nt}else if(ht){qt.push(Nt);return}else break;var en=[];Gh(Kt,Jt),Jt.push({changes:en,generation:pt.generation}),pt.generation=Nt.generation||++pt.maxGeneration;for(var Se=si(it,"beforeChange")||it.cm&&si(it.cm,"beforeChange"),bn=function(Hi){var Ji=Nt.changes[Hi];if(Ji.origin=st,Se&&!yh(it,Ji,!1))return qt.length=0,{};en.push(Md(it,Ji));var dr=Hi?Qc(it,Ji):tn(qt);Zh(it,Ji,dr,qr(it,Ji)),!Hi&&it.cm&&it.cm.scrollIntoView({from:Ji.from,to:OA(Ji)});var Rr=[];bu(it,function(Er,jr){!jr&&pn(Rr,Er.history)==-1&&(vf(Er.history,Ji),Rr.push(Er.history)),Zh(Er,Ji,null,qr(Er,Ji))})},Pn=Nt.changes.length-1;Pn>=0;--Pn){var Ii=bn(Pn);if(Ii)return Ii.v}}}}function pf(it,st){if(st!=0&&(it.first+=st,it.sel=new ru(hi(it.sel.ranges,function(pt){return new ys(Ye(pt.anchor.line+st,pt.anchor.ch),Ye(pt.head.line+st,pt.head.ch))}),it.sel.primIndex),it.cm)){Ss(it.cm,it.first,it.first-st,st);for(var ct=it.cm.display,ht=ct.viewFrom;ht<ct.viewTo;ht++)yo(it.cm,ht,"gutter")}}function Zh(it,st,ct,ht){if(it.cm&&!it.cm.curOp)return ya(it.cm,Zh)(it,st,ct,ht);if(st.to.line<it.first){pf(it,st.text.length-1-(st.to.line-st.from.line));return}if(!(st.from.line>it.lastLine())){if(st.from.line<it.first){var pt=st.text.length-1-(it.first-st.from.line);pf(it,pt),st={from:Ye(it.first,0),to:Ye(st.to.line+pt,st.to.ch),text:[tn(st.text)],origin:st.origin}}var Nt=it.lastLine();st.to.line>Nt&&(st={from:st.from,to:Ye(Nt,Ln(it,Nt).text.length),text:[st.text[0]],origin:st.origin}),st.removed=Pe(it,st.from,st.to),ct||(ct=Qc(it,st)),it.cm?ug(it.cm,st,ht):Ld(it,st,ht),mh(it,ct,sn),it.cantEdit&&zc(it,Ye(it.firstLine(),0))&&(it.cantEdit=!1)}}function ug(it,st,ct){var ht=it.doc,pt=it.display,Nt=st.from,Kt=st.to,qt=!1,Jt=Nt.line;it.options.lineWrapping||(Jt=se(gn(Ln(ht,Nt.line))),ht.iter(Jt,Kt.line+1,function(Pn){if(Pn==pt.maxLine)return qt=!0,!0})),ht.sel.contains(st.from,st.to)>-1&&Ki(it),Ld(ht,st,ct,Ps(it)),it.options.lineWrapping||(ht.iter(Jt,Nt.line+st.text.length,function(Pn){var Ii=nr(Pn);Ii>pt.maxLineLength&&(pt.maxLine=Pn,pt.maxLineLength=Ii,pt.maxLineChanged=!0,qt=!1)}),qt&&(it.curOp.updateMaxLine=!0)),ue(ht,Nt.line),DA(it,400);var me=st.text.length-(Kt.line-Nt.line)-1;st.full?Ss(it):Nt.line==Kt.line&&st.text.length==1&&!df(it.doc,st)?yo(it,Nt.line,"text"):Ss(it,Nt.line,Kt.line+1,me);var en=si(it,"changes"),Se=si(it,"change");if(Se||en){var bn={from:Nt,to:Kt,text:st.text,removed:st.removed,origin:st.origin};Se&&wr(it,"change",it,bn),en&&(it.curOp.changeObjs||(it.curOp.changeObjs=[])).push(bn)}it.display.selForContextMenu=null}function xh(it,st,ct,ht,pt){var Nt;ht||(ht=ct),Dn(ht,ct)<0&&(Nt=[ht,ct],ct=Nt[0],ht=Nt[1]),typeof st=="string"&&(st=it.splitLines(st)),zA(it,{from:ct,to:ht,text:st,origin:pt})}function ou(it,st,ct,ht){ct<it.line?it.line+=ht:st<it.line&&(it.line=st,it.ch=0)}function mf(it,st,ct,ht){for(var pt=0;pt<it.length;++pt){var Nt=it[pt],Kt=!0;if(Nt.ranges){Nt.copied||(Nt=it[pt]=Nt.deepCopy(),Nt.copied=!0);for(var qt=0;qt<Nt.ranges.length;qt++)ou(Nt.ranges[qt].anchor,st,ct,ht),ou(Nt.ranges[qt].head,st,ct,ht);continue}for(var Jt=0;Jt<Nt.changes.length;++Jt){var me=Nt.changes[Jt];if(ct<me.from.line)me.from=Ye(me.from.line+ht,me.from.ch),me.to=Ye(me.to.line+ht,me.to.ch);else if(st<=me.to.line){Kt=!1;break}}Kt||(it.splice(0,pt+1),pt=0)}}function vf(it,st){var ct=st.from.line,ht=st.to.line,pt=st.text.length-(ht-ct)-1;mf(it.done,ct,ht,pt),mf(it.undone,ct,ht,pt)}function Sh(it,st,ct,ht){var pt=st,Nt=st;return typeof st=="number"?Nt=Ln(it,ci(it,st)):pt=se(st),pt==null?null:(ht(Nt,pt)&&it.cm&&yo(it.cm,pt,ct),Nt)}function Wh(it){this.lines=it,this.parent=null;for(var st=0,ct=0;ct<it.length;++ct)it[ct].parent=this,st+=it[ct].height;this.height=st}Wh.prototype={chunkSize:function(){return this.lines.length},removeInner:function(it,st){for(var ct=it,ht=it+st;ct<ht;++ct){var pt=this.lines[ct];this.height-=pt.height,Zr(pt),wr(pt,"delete")}this.lines.splice(it,st)},collapse:function(it){it.push.apply(it,this.lines)},insertInner:function(it,st,ct){this.height+=ct,this.lines=this.lines.slice(0,it).concat(st).concat(this.lines.slice(it));for(var ht=0;ht<st.length;++ht)st[ht].parent=this},iterN:function(it,st,ct){for(var ht=it+st;it<ht;++it)if(ct(this.lines[it]))return!0}};function Vs(it){this.children=it;for(var st=0,ct=0,ht=0;ht<it.length;++ht){var pt=it[ht];st+=pt.chunkSize(),ct+=pt.height,pt.parent=this}this.size=st,this.height=ct,this.parent=null}Vs.prototype={chunkSize:function(){return this.size},removeInner:function(it,st){this.size-=st;for(var ct=0;ct<this.children.length;++ct){var ht=this.children[ct],pt=ht.chunkSize();if(it<pt){var Nt=Math.min(st,pt-it),Kt=ht.height;if(ht.removeInner(it,Nt),this.height-=Kt-ht.height,pt==Nt&&(this.children.splice(ct--,1),ht.parent=null),(st-=Nt)==0)break;it=0}else it-=pt}if(this.size-st<25&&(this.children.length>1||!(this.children[0]instanceof Wh))){var qt=[];this.collapse(qt),this.children=[new Wh(qt)],this.children[0].parent=this}},collapse:function(it){for(var st=0;st<this.children.length;++st)this.children[st].collapse(it)},insertInner:function(it,st,ct){this.size+=st.length,this.height+=ct;for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Nt=pt.chunkSize();if(it<=Nt){if(pt.insertInner(it,st,ct),pt.lines&&pt.lines.length>50){for(var Kt=pt.lines.length%25+25,qt=Kt;qt<pt.lines.length;){var Jt=new Wh(pt.lines.slice(qt,qt+=25));pt.height-=Jt.height,this.children.splice(++ht,0,Jt),Jt.parent=this}pt.lines=pt.lines.slice(0,Kt),this.maybeSpill()}break}it-=Nt}},maybeSpill:function(){if(!(this.children.length<=10)){var it=this;do{var st=it.children.splice(it.children.length-5,5),ct=new Vs(st);if(it.parent){it.size-=ct.size,it.height-=ct.height;var pt=pn(it.parent.children,it);it.parent.children.splice(pt+1,0,ct)}else{var ht=new Vs(it.children);ht.parent=it,it.children=[ht,ct],it=ht}ct.parent=it.parent}while(it.children.length>10);it.parent.maybeSpill()}},iterN:function(it,st,ct){for(var ht=0;ht<this.children.length;++ht){var pt=this.children[ht],Nt=pt.chunkSize();if(it<Nt){var Kt=Math.min(st,Nt-it);if(pt.iterN(it,Kt,ct))return!0;if((st-=Kt)==0)break;it=0}else it-=Nt}}};var mA=function(it,st,ct){if(ct)for(var ht in ct)ct.hasOwnProperty(ht)&&(this[ht]=ct[ht]);this.doc=it,this.node=st};mA.prototype.clear=function(){var it=this.doc.cm,st=this.line.widgets,ct=this.line,ht=se(ct);if(!(ht==null||!st)){for(var pt=0;pt<st.length;++pt)st[pt]==this&&st.splice(pt--,1);st.length||(ct.widgets=null);var Nt=gs(this);$n(ct,Math.max(0,ct.height-Nt)),it&&(ls(it,function(){jc(it,ct,-Nt),yo(it,ht,"widget")}),wr(it,"lineWidgetCleared",it,this,ht))}},mA.prototype.changed=function(){var it=this,st=this.height,ct=this.doc.cm,ht=this.line;this.height=null;var pt=gs(this)-st;pt&&(on(this.doc,ht)||$n(ht,ht.height+pt),ct&&ls(ct,function(){ct.curOp.forceUpdate=!0,jc(ct,ht,pt),wr(ct,"lineWidgetChanged",ct,it,se(ht))}))},yi(mA);function jc(it,st,ct){Qi(st)<(it.curOp&&it.curOp.scrollTop||it.doc.scrollTop)&&ch(it,ct)}function Td(it,st,ct,ht){var pt=new mA(it,ct,ht),Nt=it.cm;return Nt&&pt.noHScroll&&(Nt.display.alignWidgets=!0),Sh(it,st,"widget",function(Kt){var qt=Kt.widgets||(Kt.widgets=[]);if(pt.insertAt==null?qt.push(pt):qt.splice(Math.min(qt.length-1,Math.max(0,pt.insertAt)),0,pt),pt.line=Kt,Nt&&!on(it,Kt)){var Jt=Qi(Kt)<it.scrollTop;$n(Kt,Kt.height+gs(pt)),Jt&&ch(Nt,pt.height),Nt.curOp.forceUpdate=!0}return!0}),Nt&&wr(Nt,"lineWidgetAdded",Nt,pt,typeof st=="number"?st:se(st)),pt}var Nd=0,Re=function(it,st){this.lines=[],this.type=st,this.doc=it,this.id=++Nd};Re.prototype.clear=function(){if(!this.explicitlyCleared){var it=this.doc.cm,st=it&&!it.curOp;if(st&&jl(it),si(this,"clear")){var ct=this.find();ct&&wr(this,"clear",ct.from,ct.to)}for(var ht=null,pt=null,Nt=0;Nt<this.lines.length;++Nt){var Kt=this.lines[Nt],qt=ui(Kt.markedSpans,this);it&&!this.collapsed?yo(it,se(Kt),"text"):it&&(qt.to!=null&&(pt=se(Kt)),qt.from!=null&&(ht=se(Kt))),Kt.markedSpans=ti(Kt.markedSpans,qt),qt.from==null&&this.collapsed&&!on(this.doc,Kt)&&it&&$n(Kt,ra(it.display))}if(it&&this.collapsed&&!it.options.lineWrapping)for(var Jt=0;Jt<this.lines.length;++Jt){var me=gn(this.lines[Jt]),en=nr(me);en>it.display.maxLineLength&&(it.display.maxLine=me,it.display.maxLineLength=en,it.display.maxLineChanged=!0)}ht!=null&&it&&this.collapsed&&Ss(it,ht,pt+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,it&&Nu(it.doc)),it&&wr(it,"markerCleared",it,this,ht,pt),st&&mu(it),this.parent&&this.parent.clear()}},Re.prototype.find=function(it,st){it==null&&this.type=="bookmark"&&(it=1);for(var ct,ht,pt=0;pt<this.lines.length;++pt){var Nt=this.lines[pt],Kt=ui(Nt.markedSpans,this);if(Kt.from!=null&&(ct=Ye(st?Nt:se(Nt),Kt.from),it==-1))return ct;if(Kt.to!=null&&(ht=Ye(st?Nt:se(Nt),Kt.to),it==1))return ht}return ct&&{from:ct,to:ht}},Re.prototype.changed=function(){var it=this,st=this.find(-1,!0),ct=this,ht=this.doc.cm;!st||!ht||ls(ht,function(){var pt=st.line,Nt=se(st.line),Kt=Ca(ht,Nt);if(Kt&&(Ml(Kt),ht.curOp.selectionChanged=ht.curOp.forceUpdate=!0),ht.curOp.updateMaxLine=!0,!on(ct.doc,pt)&&ct.height!=null){var qt=ct.height;ct.height=null;var Jt=gs(ct)-qt;Jt&&$n(pt,pt.height+Jt)}wr(ht,"markerChanged",ht,it)})},Re.prototype.attachLine=function(it){if(!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(!st.maybeHiddenMarkers||pn(st.maybeHiddenMarkers,this)==-1)&&(st.maybeUnhiddenMarkers||(st.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(it)},Re.prototype.detachLine=function(it){if(this.lines.splice(pn(this.lines,it),1),!this.lines.length&&this.doc.cm){var st=this.doc.cm.curOp;(st.maybeHiddenMarkers||(st.maybeHiddenMarkers=[])).push(this)}},yi(Re);function GA(it,st,ct,ht,pt){if(ht&&ht.shared)return Ag(it,st,ct,ht,pt);if(it.cm&&!it.cm.curOp)return ya(it.cm,GA)(it,st,ct,ht,pt);var Nt=new Re(it,pt),Kt=Dn(st,ct);if(ht&&Xn(ht,Nt,!1),Kt>0||Kt==0&&Nt.clearWhenEmpty!==!1)return Nt;if(Nt.replacedWith&&(Nt.collapsed=!0,Nt.widgetNode=ye("span",[Nt.replacedWith],"CodeMirror-widget"),ht.handleMouseEvents||Nt.widgetNode.setAttribute("cm-ignore-events","true"),ht.insertLeft&&(Nt.widgetNode.insertLeft=!0)),Nt.collapsed){if(Rn(it,st.line,st,ct,Nt)||st.line!=ct.line&&Rn(it,ct.line,st,ct,Nt))throw new Error("Inserting collapsed marker partially overlapping an existing one");xe()}Nt.addToHistory&&_c(it,{from:st,to:ct,origin:"markText"},it.sel,NaN);var qt=st.line,Jt=it.cm,me;if(it.iter(qt,ct.line+1,function(Se){Jt&&Nt.collapsed&&!Jt.options.lineWrapping&&gn(Se)==Jt.display.maxLine&&(me=!0),Nt.collapsed&&qt!=st.line&&$n(Se,0),Bi(Se,new An(Nt,qt==st.line?st.ch:null,qt==ct.line?ct.ch:null)),++qt}),Nt.collapsed&&it.iter(st.line,ct.line+1,function(Se){on(it,Se)&&$n(Se,0)}),Nt.clearOnEnter&&be(Nt,"beforeCursorEnter",function(){return Nt.clear()}),Nt.readOnly&&(je(),(it.history.done.length||it.history.undone.length)&&it.clearHistory()),Nt.collapsed&&(Nt.id=++Nd,Nt.atomic=!0),Jt){if(me&&(Jt.curOp.updateMaxLine=!0),Nt.collapsed)Ss(Jt,st.line,ct.line+1);else if(Nt.className||Nt.startStyle||Nt.endStyle||Nt.css||Nt.attributes||Nt.title)for(var en=st.line;en<=ct.line;en++)yo(Jt,en,"text");Nt.atomic&&Nu(Jt.doc),wr(Jt,"markerAdded",Jt,Nt)}return Nt}var Iu=function(it,st){this.markers=it,this.primary=st;for(var ct=0;ct<it.length;++ct)it[ct].parent=this};Iu.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var it=0;it<this.markers.length;++it)this.markers[it].clear();wr(this,"clear")}},Iu.prototype.find=function(it,st){return this.primary.find(it,st)},yi(Iu);function Ag(it,st,ct,ht,pt){ht=Xn(ht),ht.shared=!1;var Nt=[GA(it,st,ct,ht,pt)],Kt=Nt[0],qt=ht.widgetNode;return bu(it,function(Jt){qt&&(ht.widgetNode=qt.cloneNode(!0)),Nt.push(GA(Jt,fi(Jt,st),fi(Jt,ct),ht,pt));for(var me=0;me<Jt.linked.length;++me)if(Jt.linked[me].isParent)return;Kt=tn(Nt)}),new Iu(Nt,Kt)}function Dd(it){return it.findMarks(Ye(it.first,0),it.clipPos(Ye(it.lastLine())),function(st){return st.parent})}function Id(it,st){for(var ct=0;ct<st.length;ct++){var ht=st[ct],pt=ht.find(),Nt=it.clipPos(pt.from),Kt=it.clipPos(pt.to);if(Dn(Nt,Kt)){var qt=GA(it,Nt,Kt,ht.primary,ht.primary.type);ht.markers.push(qt),qt.parent=ht}}}function Vc(it){for(var st=function(ht){var pt=it[ht],Nt=[pt.primary.doc];bu(pt.primary.doc,function(Jt){return Nt.push(Jt)});for(var Kt=0;Kt<pt.markers.length;Kt++){var qt=pt.markers[Kt];pn(Nt,qt.doc)==-1&&(qt.parent=null,pt.markers.splice(Kt--,1))}},ct=0;ct<it.length;ct++)st(ct)}var hg=0,Na=function(it,st,ct,ht,pt){if(!(this instanceof Na))return new Na(it,st,ct,ht,pt);ct==null&&(ct=0),Vs.call(this,[new Wh([new Fr("",null)])]),this.first=ct,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=ct;var Nt=Ye(ct,0);this.sel=gA(Nt),this.history=new _h(null),this.id=++hg,this.modeOption=st,this.lineSep=ht,this.direction=pt=="rtl"?"rtl":"ltr",this.extend=!1,typeof it=="string"&&(it=this.splitLines(it)),Ld(this,{from:Nt,to:Nt,text:it}),Va(this,gA(Nt),sn)};Na.prototype=Ft(Vs.prototype,{constructor:Na,iter:function(it,st,ct){ct?this.iterN(it-this.first,st-it,ct):this.iterN(this.first,this.first+this.size,it)},insert:function(it,st){for(var ct=0,ht=0;ht<st.length;++ht)ct+=st[ht].height;this.insertInner(it-this.first,st,ct)},remove:function(it,st){this.removeInner(it-this.first,st)},getValue:function(it){var st=sr(this,this.first,this.first+this.size);return it===!1?st:st.join(it||this.lineSeparator())},setValue:ba(function(it){var st=Ye(this.first,0),ct=this.first+this.size-1;zA(this,{from:st,to:Ye(ct,Ln(this,ct).text.length),text:this.splitLines(it),origin:"setValue",full:!0},!0),this.cm&&pu(this.cm,0,0),Va(this,gA(st),sn)}),replaceRange:function(it,st,ct,ht){st=fi(this,st),ct=ct?fi(this,ct):st,xh(this,it,st,ct,ht)},getRange:function(it,st,ct){var ht=Pe(this,fi(this,it),fi(this,st));return ct===!1?ht:ht.join(ct||this.lineSeparator())},getLine:function(it){var st=this.getLineHandle(it);return st&&st.text},getLineHandle:function(it){if(qn(this,it))return Ln(this,it)},getLineNumber:function(it){return se(it)},getLineHandleVisualStart:function(it){return typeof it=="number"&&(it=Ln(this,it)),gn(it)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(it){return fi(this,it)},getCursor:function(it){var st=this.sel.primary(),ct;return it==null||it=="head"?ct=st.head:it=="anchor"?ct=st.anchor:it=="end"||it=="to"||it===!1?ct=st.to():ct=st.from(),ct},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ba(function(it,st,ct){KA(this,fi(this,typeof it=="number"?Ye(it,st||0):it),null,ct)}),setSelection:ba(function(it,st,ct){KA(this,fi(this,it),fi(this,st||it),ct)}),extendSelection:ba(function(it,st,ct){jh(this,fi(this,it),st&&fi(this,st),ct)}),extendSelections:ba(function(it,st){Tu(this,un(this,it),st)}),extendSelectionsBy:ba(function(it,st){var ct=hi(this.sel.ranges,it);Tu(this,un(this,ct),st)}),setSelections:ba(function(it,st,ct){if(it.length){for(var ht=[],pt=0;pt<it.length;pt++)ht[pt]=new ys(fi(this,it[pt].anchor),fi(this,it[pt].head));st==null&&(st=Math.min(it.length-1,this.sel.primIndex)),Va(this,ml(this.cm,ht,st),ct)}}),addSelection:ba(function(it,st,ct){var ht=this.sel.ranges.slice(0);ht.push(new ys(fi(this,it),fi(this,st||it))),Va(this,ml(this.cm,ht,ht.length-1),ct)}),getSelection:function(it){for(var st=this.sel.ranges,ct,ht=0;ht<st.length;ht++){var pt=Pe(this,st[ht].from(),st[ht].to());ct=ct?ct.concat(pt):pt}return it===!1?ct:ct.join(it||this.lineSeparator())},getSelections:function(it){for(var st=[],ct=this.sel.ranges,ht=0;ht<ct.length;ht++){var pt=Pe(this,ct[ht].from(),ct[ht].to());it!==!1&&(pt=pt.join(it||this.lineSeparator())),st[ht]=pt}return st},replaceSelection:function(it,st,ct){for(var ht=[],pt=0;pt<this.sel.ranges.length;pt++)ht[pt]=it;this.replaceSelections(ht,st,ct||"+input")},replaceSelections:ba(function(it,st,ct){for(var ht=[],pt=this.sel,Nt=0;Nt<pt.ranges.length;Nt++){var Kt=pt.ranges[Nt];ht[Nt]={from:Kt.from(),to:Kt.to(),text:this.splitLines(it[Nt]),origin:ct}}for(var qt=st&&st!="end"&&Oc(this,ht,st),Jt=ht.length-1;Jt>=0;Jt--)zA(this,ht[Jt]);qt?ph(this,qt):this.cm&&gu(this.cm)}),undo:ba(function(){Gc(this,"undo")}),redo:ba(function(){Gc(this,"redo")}),undoSelection:ba(function(){Gc(this,"undo",!0)}),redoSelection:ba(function(){Gc(this,"redo",!0)}),setExtending:function(it){this.extend=it},getExtending:function(){return this.extend},historySize:function(){for(var it=this.history,st=0,ct=0,ht=0;ht<it.done.length;ht++)it.done[ht].ranges||++st;for(var pt=0;pt<it.undone.length;pt++)it.undone[pt].ranges||++ct;return{undo:st,redo:ct}},clearHistory:function(){var it=this;this.history=new _h(this.history.maxGeneration),bu(this,function(st){return st.history=it.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(it){return it&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(it){return this.history.generation==(it||this.cleanGeneration)},getHistory:function(){return{done:pA(this.history.done),undone:pA(this.history.undone)}},setHistory:function(it){var st=this.history=new _h(this.history.maxGeneration);st.done=pA(it.done.slice(0),null,!0),st.undone=pA(it.undone.slice(0),null,!0)},setGutterMarker:ba(function(it,st,ct){return Sh(this,it,"gutter",function(ht){var pt=ht.gutterMarkers||(ht.gutterMarkers={});return pt[st]=ct,!ct&&Ct(pt)&&(ht.gutterMarkers=null),!0})}),clearGutter:ba(function(it){var st=this;this.iter(function(ct){ct.gutterMarkers&&ct.gutterMarkers[it]&&Sh(st,ct,"gutter",function(){return ct.gutterMarkers[it]=null,Ct(ct.gutterMarkers)&&(ct.gutterMarkers=null),!0})})}),lineInfo:function(it){var st;if(typeof it=="number"){if(!qn(this,it)||(st=it,it=Ln(this,it),!it))return null}else if(st=se(it),st==null)return null;return{line:st,handle:it,text:it.text,gutterMarkers:it.gutterMarkers,textClass:it.textClass,bgClass:it.bgClass,wrapClass:it.wrapClass,widgets:it.widgets}},addLineClass:ba(function(it,st,ct){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass";if(!ht[pt])ht[pt]=ct;else{if(Ut(ct).test(ht[pt]))return!1;ht[pt]+=" "+ct}return!0})}),removeLineClass:ba(function(it,st,ct){return Sh(this,it,st=="gutter"?"gutter":"class",function(ht){var pt=st=="text"?"textClass":st=="background"?"bgClass":st=="gutter"?"gutterClass":"wrapClass",Nt=ht[pt];if(Nt)if(ct==null)ht[pt]=null;else{var Kt=Nt.match(Ut(ct));if(!Kt)return!1;var qt=Kt.index+Kt[0].length;ht[pt]=Nt.slice(0,Kt.index)+(!Kt.index||qt==Nt.length?"":" ")+Nt.slice(qt)||null}else return!1;return!0})}),addLineWidget:ba(function(it,st,ct){return Td(this,it,st,ct)}),removeLineWidget:function(it){it.clear()},markText:function(it,st,ct){return GA(this,fi(this,it),fi(this,st),ct,ct&&ct.type||"range")},setBookmark:function(it,st){var ct={replacedWith:st&&(st.nodeType==null?st.widget:st),insertLeft:st&&st.insertLeft,clearWhenEmpty:!1,shared:st&&st.shared,handleMouseEvents:st&&st.handleMouseEvents};return it=fi(this,it),GA(this,it,it,ct,"bookmark")},findMarksAt:function(it){it=fi(this,it);var st=[],ct=Ln(this,it.line).markedSpans;if(ct)for(var ht=0;ht<ct.length;++ht){var pt=ct[ht];(pt.from==null||pt.from<=it.ch)&&(pt.to==null||pt.to>=it.ch)&&st.push(pt.marker.parent||pt.marker)}return st},findMarks:function(it,st,ct){it=fi(this,it),st=fi(this,st);var ht=[],pt=it.line;return this.iter(it.line,st.line+1,function(Nt){var Kt=Nt.markedSpans;if(Kt)for(var qt=0;qt<Kt.length;qt++){var Jt=Kt[qt];!(Jt.to!=null&&pt==it.line&&it.ch>=Jt.to||Jt.from==null&&pt!=it.line||Jt.from!=null&&pt==st.line&&Jt.from>=st.ch)&&(!ct||ct(Jt.marker))&&ht.push(Jt.marker.parent||Jt.marker)}++pt}),ht},getAllMarks:function(){var it=[];return this.iter(function(st){var ct=st.markedSpans;if(ct)for(var ht=0;ht<ct.length;++ht)ct[ht].from!=null&&it.push(ct[ht].marker)}),it},posFromIndex:function(it){var st,ct=this.first,ht=this.lineSeparator().length;return this.iter(function(pt){var Nt=pt.text.length+ht;if(Nt>it)return st=it,!0;it-=Nt,++ct}),fi(this,Ye(ct,st))},indexFromPos:function(it){it=fi(this,it);var st=it.ch;if(it.line<this.first||it.ch<0)return 0;var ct=this.lineSeparator().length;return this.iter(this.first,it.line,function(ht){st+=ht.text.length+ct}),st},copy:function(it){var st=new Na(sr(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return st.scrollTop=this.scrollTop,st.scrollLeft=this.scrollLeft,st.sel=this.sel,st.extend=!1,it&&(st.history.undoDepth=this.history.undoDepth,st.setHistory(this.getHistory())),st},linkedDoc:function(it){it||(it={});var st=this.first,ct=this.first+this.size;it.from!=null&&it.from>st&&(st=it.from),it.to!=null&&it.to<ct&&(ct=it.to);var ht=new Na(sr(this,st,ct),it.mode||this.modeOption,st,this.lineSep,this.direction);return it.sharedHist&&(ht.history=this.history),(this.linked||(this.linked=[])).push({doc:ht,sharedHist:it.sharedHist}),ht.linked=[{doc:this,isParent:!0,sharedHist:it.sharedHist}],Id(ht,Dd(this)),ht},unlinkDoc:function(it){if(it instanceof Jo&&(it=it.doc),this.linked)for(var st=0;st<this.linked.length;++st){var ct=this.linked[st];if(ct.doc==it){this.linked.splice(st,1),it.unlinkDoc(this),Vc(Dd(this));break}}if(it.history==this.history){var ht=[it.id];bu(it,function(pt){return ht.push(pt.id)},!0),it.history=new _h(null),it.history.done=pA(this.history.done,ht),it.history.undone=pA(this.history.undone,ht)}},iterLinkedDocs:function(it){bu(this,it)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(it){return this.lineSep?it.split(this.lineSep):kr(it)},lineSeparator:function(){return this.lineSep||`
`},setDirection:ba(function(it){it!="rtl"&&(it="ltr"),it!=this.direction&&(this.direction=it,this.iter(function(st){return st.order=null}),this.cm&&ep(this.cm))})}),Na.prototype.eachLine=Na.prototype.iter;var Yh=0;function Ud(it){var st=this;if(dg(st),!(Vn(st,it)||os(st.display,it))){Ei(it),de&&(Yh=+new Date);var ct=Pa(st,it,!0),ht=it.dataTransfer.files;if(!(!ct||st.isReadOnly()))if(ht&&ht.length&&window.FileReader&&window.File)for(var pt=ht.length,Nt=Array(pt),Kt=0,qt=function(){++Kt==pt&&ya(st,function(){ct=fi(st.doc,ct);var Pn={from:ct,to:ct,text:st.doc.splitLines(Nt.filter(function(Ii){return Ii!=null}).join(st.doc.lineSeparator())),origin:"paste"};zA(st.doc,Pn),ph(st.doc,gA(fi(st.doc,ct),fi(st.doc,OA(Pn))))})()},Jt=function(Pn,Ii){if(st.options.allowDropFileTypes&&pn(st.options.allowDropFileTypes,Pn.type)==-1){qt();return}var Hi=new FileReader;Hi.onerror=function(){return qt()},Hi.onload=function(){var Ji=Hi.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Ji)){qt();return}Nt[Ii]=Ji,qt()},Hi.readAsText(Pn)},me=0;me<ht.length;me++)Jt(ht[me],me);else{if(st.state.draggingText&&st.doc.sel.contains(ct)>-1){st.state.draggingText(it),setTimeout(function(){return st.display.input.focus()},20);return}try{var en=it.dataTransfer.getData("Text");if(en){var Se;if(st.state.draggingText&&!st.state.draggingText.copy&&(Se=st.listSelections()),mh(st.doc,gA(ct,ct)),Se)for(var bn=0;bn<Se.length;++bn)xh(st.doc,"",Se[bn].anchor,Se[bn].head,"drag");st.replaceSelection(en,"around","paste"),st.display.input.focus()}}catch(Pn){}}}}function Qd(it,st){if(de&&(!it.state.draggingText||+new Date-Yh<100)){ar(st);return}if(!(Vn(it,st)||os(it.display,st))&&(st.dataTransfer.setData("Text",it.getSelection()),st.dataTransfer.effectAllowed="copyMove",st.dataTransfer.setDragImage&&!Ie)){var ct=te("img",null,null,"position: fixed; left: 0; top: 0;");ct.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",Gt&&(ct.width=ct.height=1,it.display.wrapper.appendChild(ct),ct._top=ct.offsetTop),st.dataTransfer.setDragImage(ct,0,0),Gt&&ct.parentNode.removeChild(ct)}}function cg(it,st){var ct=Pa(it,st);if(ct){var ht=document.createDocumentFragment();Ho(it,ct,ht),it.display.dragCursor||(it.display.dragCursor=te("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),it.display.lineSpace.insertBefore(it.display.dragCursor,it.display.cursorDiv)),Yt(it.display.dragCursor,ht)}}function dg(it){it.display.dragCursor&&(it.display.lineSpace.removeChild(it.display.dragCursor),it.display.dragCursor=null)}function fg(it){if(document.getElementsByClassName){for(var st=document.getElementsByClassName("CodeMirror"),ct=[],ht=0;ht<st.length;ht++){var pt=st[ht].CodeMirror;pt&&ct.push(pt)}ct.length&&ct[0].operation(function(){for(var Nt=0;Nt<ct.length;Nt++)it(ct[Nt])})}}var Zl=!1;function vl(){Zl||(Xh(),Zl=!0)}function Xh(){var it;be(window,"resize",function(){it==null&&(it=setTimeout(function(){it=null,fg(yf)},100))}),be(window,"blur",function(){return fg(dA)})}function yf(it){var st=it.display;st.cachedCharWidth=st.cachedTextHeight=st.cachedPaddingH=null,st.scrollbarsClipped=!1,it.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"},Zc=0;Zc<10;Zc++)$u[Zc+48]=$u[Zc+96]=String(Zc);for(var Od=65;Od<=90;Od++)$u[Od]=String.fromCharCode(Od);for(var Wc=1;Wc<=12;Wc++)$u[Wc+111]=$u[Wc+63235]="F"+Wc;var Dl={};Dl.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"},Dl.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"},Dl.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"},Dl.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"]},Dl.default=At?Dl.macDefault:Dl.pcDefault;function wf(it){var st=it.split(/-(?!$)/);it=st[st.length-1];for(var ct,ht,pt,Nt,Kt=0;Kt<st.length-1;Kt++){var qt=st[Kt];if(/^(cmd|meta|m)$/i.test(qt))Nt=!0;else if(/^a(lt)?$/i.test(qt))ct=!0;else if(/^(c|ctrl|control)$/i.test(qt))ht=!0;else if(/^s(hift)?$/i.test(qt))pt=!0;else throw new Error("Unrecognized modifier name: "+qt)}return ct&&(it="Alt-"+it),ht&&(it="Ctrl-"+it),Nt&&(it="Cmd-"+it),pt&&(it="Shift-"+it),it}function xf(it){var st={};for(var ct in it)if(it.hasOwnProperty(ct)){var ht=it[ct];if(/^(name|fallthrough|(de|at)tach)$/.test(ct))continue;if(ht=="..."){delete it[ct];continue}for(var pt=hi(ct.split(" "),wf),Nt=0;Nt<pt.length;Nt++){var Kt=void 0,qt=void 0;Nt==pt.length-1?(qt=pt.join(" "),Kt=ht):(qt=pt.slice(0,Nt+1).join(" "),Kt="...");var Jt=st[qt];if(!Jt)st[qt]=Kt;else if(Jt!=Kt)throw new Error("Inconsistent bindings for "+qt)}delete it[ct]}for(var me in st)it[me]=st[me];return it}function Wl(it,st,ct,ht){st=fa(st);var pt=st.call?st.call(it,ht):st[it];if(pt===!1)return"nothing";if(pt==="...")return"multi";if(pt!=null&&ct(pt))return"handled";if(st.fallthrough){if(Object.prototype.toString.call(st.fallthrough)!="[object Array]")return Wl(it,st.fallthrough,ct,ht);for(var Nt=0;Nt<st.fallthrough.length;Nt++){var Kt=Wl(it,st.fallthrough[Nt],ct,ht);if(Kt)return Kt}}}function Jh(it){var st=typeof it=="string"?it:$u[it.keyCode];return st=="Ctrl"||st=="Alt"||st=="Shift"||st=="Mod"}function Yc(it,st,ct){var ht=it;return st.altKey&&ht!="Alt"&&(it="Alt-"+it),(xt?st.metaKey:st.ctrlKey)&&ht!="Ctrl"&&(it="Ctrl-"+it),(xt?st.ctrlKey:st.metaKey)&&ht!="Mod"&&(it="Cmd-"+it),!ct&&st.shiftKey&&ht!="Shift"&&(it="Shift-"+it),it}function Sf(it,st){if(Gt&&it.keyCode==34&&it.char)return!1;var ct=$u[it.keyCode];return ct==null||it.altGraphKey?!1:(it.keyCode==3&&it.code&&(ct=it.code),Yc(ct,it,st))}function fa(it){return typeof it=="string"?Dl[it]:it}function Ra(it,st){for(var ct=it.doc.sel.ranges,ht=[],pt=0;pt<ct.length;pt++){for(var Nt=st(ct[pt]);ht.length&&Dn(Nt.from,tn(ht).to)<=0;){var Kt=ht.pop();if(Dn(Kt.from,Nt.from)<0){Nt.from=Kt.from;break}}ht.push(Nt)}ls(it,function(){for(var qt=ht.length-1;qt>=0;qt--)xh(it.doc,"",ht[qt].from,ht[qt].to,"+delete");gu(it)})}function Bf(it,st,ct){var ht=Ze(it.text,st+ct,ct);return ht<0||ht>it.text.length?null:ht}function ua(it,st,ct){var ht=Bf(it,st.ch,ct);return ht==null?null:new Ye(st.line,ht,ct<0?"after":"before")}function $h(it,st,ct,ht,pt){if(it){st.doc.direction=="rtl"&&(pt=-pt);var Nt=Kn(ct,st.doc.direction);if(Nt){var Kt=pt<0?tn(Nt):Nt[0],qt=pt<0==(Kt.level==1),Jt=qt?"after":"before",me;if(Kt.level>0||st.doc.direction=="rtl"){var en=zo(st,ct);me=pt<0?ct.text.length-1:0;var Se=ko(st,en,me).top;me=Bn(function(bn){return ko(st,en,bn).top==Se},pt<0==(Kt.level==1)?Kt.from:Kt.to-1,me),Jt=="before"&&(me=Bf(ct,me,1))}else me=pt<0?Kt.to:Kt.from;return new Ye(ht,me,Jt)}}return new Ye(ht,pt<0?ct.text.length:0,pt<0?"before":"after")}function qh(it,st,ct,ht){var pt=Kn(st,it.doc.direction);if(!pt)return ua(st,ct,ht);ct.ch>=st.text.length?(ct.ch=st.text.length,ct.sticky="before"):ct.ch<=0&&(ct.ch=0,ct.sticky="after");var Nt=Xe(pt,ct.ch,ct.sticky),Kt=pt[Nt];if(it.doc.direction=="ltr"&&Kt.level%2==0&&(ht>0?Kt.to>ct.ch:Kt.from<ct.ch))return ua(st,ct,ht);var qt=function(dr,Rr){return Bf(st,dr instanceof Ye?dr.ch:dr,Rr)},Jt,me=function(dr){return it.options.lineWrapping?(Jt=Jt||zo(it,st),ea(it,st,Jt,dr)):{begin:0,end:st.text.length}},en=me(ct.sticky=="before"?qt(ct,-1):ct.ch);if(it.doc.direction=="rtl"||Kt.level==1){var Se=Kt.level==1==ht<0,bn=qt(ct,Se?1:-1);if(bn!=null&&(Se?bn<=Kt.to&&bn<=en.end:bn>=Kt.from&&bn>=en.begin)){var Pn=Se?"before":"after";return new Ye(ct.line,bn,Pn)}}var Ii=function(dr,Rr,Er){for(var jr=function(_s,Fa){return Fa?new Ye(ct.line,qt(_s,1),"before"):new Ye(ct.line,_s,"after")};dr>=0&&dr<pt.length;dr+=Rr){var po=pt[dr],Pr=Rr>0==(po.level!=1),No=Pr?Er.begin:qt(Er.end,-1);if(po.from<=No&&No<po.to||(No=Pr?po.from:qt(po.to,-1),Er.begin<=No&&No<Er.end))return jr(No,Pr)}},Hi=Ii(Nt+ht,ht,en);if(Hi)return Hi;var Ji=ht>0?en.end:qt(en.begin,-1);return Ji!=null&&!(ht>0&&Ji==st.text.length)&&(Hi=Ii(ht>0?0:pt.length-1,ht,me(Ji)),Hi)?Hi:null}var jA={selectAll:la,singleSelection:function(it){return it.setSelection(it.getCursor("anchor"),it.getCursor("head"),sn)},killLine:function(it){return Ra(it,function(st){if(st.empty()){var ct=Ln(it.doc,st.head.line).text.length;return st.head.ch==ct&&st.head.line<it.lastLine()?{from:st.head,to:Ye(st.head.line+1,0)}:{from:st.head,to:Ye(st.head.line,ct)}}else return{from:st.from(),to:st.to()}})},deleteLine:function(it){return Ra(it,function(st){return{from:Ye(st.from().line,0),to:fi(it.doc,Ye(st.to().line+1,0))}})},delLineLeft:function(it){return Ra(it,function(st){return{from:Ye(st.from().line,0),to:st.from()}})},delWrappedLineLeft:function(it){return Ra(it,function(st){var ct=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:ct},"div");return{from:ht,to:st.from()}})},delWrappedLineRight:function(it){return Ra(it,function(st){var ct=it.charCoords(st.head,"div").top+5,ht=it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div");return{from:st.from(),to:ht}})},undo:function(it){return it.undo()},redo:function(it){return it.redo()},undoSelection:function(it){return it.undoSelection()},redoSelection:function(it){return it.redoSelection()},goDocStart:function(it){return it.extendSelection(Ye(it.firstLine(),0))},goDocEnd:function(it){return it.extendSelection(Ye(it.lastLine()))},goLineStart:function(it){return it.extendSelectionsBy(function(st){return tc(it,st.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(it){return it.extendSelectionsBy(function(st){return Cf(it,st.head)},{origin:"+move",bias:1})},goLineEnd:function(it){return it.extendSelectionsBy(function(st){return ec(it,st.head.line)},{origin:"+move",bias:-1})},goLineRight:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:it.display.lineDiv.offsetWidth+100,top:ct},"div")},jn)},goLineLeft:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5;return it.coordsChar({left:0,top:ct},"div")},jn)},goLineLeftSmart:function(it){return it.extendSelectionsBy(function(st){var ct=it.cursorCoords(st.head,"div").top+5,ht=it.coordsChar({left:0,top:ct},"div");return ht.ch<it.getLine(ht.line).search(/\S/)?Cf(it,st.head):ht},jn)},goLineUp:function(it){return it.moveV(-1,"line")},goLineDown:function(it){return it.moveV(1,"line")},goPageUp:function(it){return it.moveV(-1,"page")},goPageDown:function(it){return it.moveV(1,"page")},goCharLeft:function(it){return it.moveH(-1,"char")},goCharRight:function(it){return it.moveH(1,"char")},goColumnLeft:function(it){return it.moveH(-1,"column")},goColumnRight:function(it){return it.moveH(1,"column")},goWordLeft:function(it){return it.moveH(-1,"word")},goGroupRight:function(it){return it.moveH(1,"group")},goGroupLeft:function(it){return it.moveH(-1,"group")},goWordRight:function(it){return it.moveH(1,"word")},delCharBefore:function(it){return it.deleteH(-1,"codepoint")},delCharAfter:function(it){return it.deleteH(1,"char")},delWordBefore:function(it){return it.deleteH(-1,"word")},delWordAfter:function(it){return it.deleteH(1,"word")},delGroupBefore:function(it){return it.deleteH(-1,"group")},delGroupAfter:function(it){return it.deleteH(1,"group")},indentAuto:function(it){return it.indentSelection("smart")},indentMore:function(it){return it.indentSelection("add")},indentLess:function(it){return it.indentSelection("subtract")},insertTab:function(it){return it.replaceSelection(" ")},insertSoftTab:function(it){for(var st=[],ct=it.listSelections(),ht=it.options.tabSize,pt=0;pt<ct.length;pt++){var Nt=ct[pt].from(),Kt=pe(it.getLine(Nt.line),Nt.ch,ht);st.push(Le(ht-Kt%ht))}it.replaceSelections(st)},defaultTab:function(it){it.somethingSelected()?it.indentSelection("add"):it.execCommand("insertTab")},transposeChars:function(it){return ls(it,function(){for(var st=it.listSelections(),ct=[],ht=0;ht<st.length;ht++)if(st[ht].empty()){var pt=st[ht].head,Nt=Ln(it.doc,pt.line).text;if(Nt){if(pt.ch==Nt.length&&(pt=new Ye(pt.line,pt.ch-1)),pt.ch>0)pt=new Ye(pt.line,pt.ch+1),it.replaceRange(Nt.charAt(pt.ch-1)+Nt.charAt(pt.ch-2),Ye(pt.line,pt.ch-2),pt,"+transpose");else if(pt.line>it.doc.first){var Kt=Ln(it.doc,pt.line-1).text;Kt&&(pt=new Ye(pt.line,1),it.replaceRange(Nt.charAt(0)+it.doc.lineSeparator()+Kt.charAt(Kt.length-1),Ye(pt.line-1,Kt.length-1),pt,"+transpose"))}}ct.push(new ys(pt,pt))}it.setSelections(ct)})},newlineAndIndent:function(it){return ls(it,function(){for(var st=it.listSelections(),ct=st.length-1;ct>=0;ct--)it.replaceRange(it.doc.lineSeparator(),st[ct].anchor,st[ct].head,"+input");st=it.listSelections();for(var ht=0;ht<st.length;ht++)it.indentLine(st[ht].from().line,null,!0);gu(it)})},openLine:function(it){return it.replaceSelection(`
`,"start")},toggleOverwrite:function(it){return it.toggleOverwrite()}};function tc(it,st){var ct=Ln(it.doc,st),ht=gn(ct);return ht!=ct&&(st=se(ht)),$h(!0,it,ht,st,1)}function ec(it,st){var ct=Ln(it.doc,st),ht=Cn(ct);return ht!=ct&&(st=se(ht)),$h(!0,it,ct,st,-1)}function Cf(it,st){var ct=tc(it,st.line),ht=Ln(it.doc,ct.line),pt=Kn(ht,it.doc.direction);if(!pt||pt[0].level==0){var Nt=Math.max(ct.ch,ht.text.search(/\S/)),Kt=st.line==ct.line&&st.ch<=Nt&&st.ch;return Ye(ct.line,Kt?0:Nt,ct.sticky)}return ct}function nc(it,st,ct){if(typeof st=="string"&&(st=jA[st],!st))return!1;it.display.input.ensurePolled();var ht=it.display.shift,pt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),ct&&(it.display.shift=!1),pt=st(it)!=ai}finally{it.display.shift=ht,it.state.suppressEdits=!1}return pt}function Pf(it,st,ct){for(var ht=0;ht<it.state.keyMaps.length;ht++){var pt=Wl(st,it.state.keyMaps[ht],ct,it);if(pt)return pt}return it.options.extraKeys&&Wl(st,it.options.extraKeys,ct,it)||Wl(st,it.options.keyMap,ct,it)}var qu=new ne;function Bh(it,st,ct,ht){var pt=it.state.keySeq;if(pt){if(Jh(st))return"handled";if(/\'$/.test(st)?it.state.keySeq=null:qu.set(50,function(){it.state.keySeq==pt&&(it.state.keySeq=null,it.display.input.reset())}),Xc(it,pt+" "+st,ct,ht))return!0}return Xc(it,st,ct,ht)}function Xc(it,st,ct,ht){var pt=Pf(it,st,ht);return pt=="multi"&&(it.state.keySeq=st),pt=="handled"&&wr(it,"keyHandled",it,st,ct),(pt=="handled"||pt=="multi")&&(Ei(ct),as(it)),!!pt}function Jc(it,st){var ct=Sf(st,!0);return ct?st.shiftKey&&!it.state.keySeq?Bh(it,"Shift-"+ct,st,function(ht){return nc(it,ht,!0)})||Bh(it,ct,st,function(ht){if(typeof ht=="string"?/^go[A-Z]/.test(ht):ht.motion)return nc(it,ht)}):Bh(it,ct,st,function(ht){return nc(it,ht)}):!1}function $c(it,st,ct){return Bh(it,"'"+ct+"'",st,function(ht){return nc(it,ht,!0)})}var VA=null;function qc(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&(st.curOp.focus=_e(),!Vn(st,it))){de&&Ht<11&&it.keyCode==27&&(it.returnValue=!1);var ct=it.keyCode;st.display.shift=ct==16||it.shiftKey;var ht=Jc(st,it);Gt&&(VA=ht?ct:null,!ht&&ct==88&&!tr&&(At?it.metaKey:it.ctrlKey)&&st.replaceSelection("",null,"cut")),St&&!At&&!ht&&ct==46&&it.shiftKey&&!it.ctrlKey&&document.execCommand&&document.execCommand("cut"),ct==18&&!/\bCodeMirror-crosshair\b/.test(st.display.lineDiv.className)&&Ff(st)}}function Ff(it){var st=it.display.lineDiv;nn(st,"CodeMirror-crosshair");function ct(ht){(ht.keyCode==18||!ht.altKey)&&(Rt(st,"CodeMirror-crosshair"),kn(document,"keyup",ct),kn(document,"mouseover",ct))}be(document,"keyup",ct),be(document,"mouseover",ct)}function Ef(it){it.keyCode==16&&(this.doc.sel.shift=!1),Vn(this,it)}function Uu(it){var st=this;if(!(it.target&&it.target!=st.display.input.getField())&&!(os(st.display,it)||Vn(st,it)||it.ctrlKey&&!it.altKey||At&&it.metaKey)){var ct=it.keyCode,ht=it.charCode;if(Gt&&ct==VA){VA=null,Ei(it);return}if(!(Gt&&(!it.which||it.which<10)&&Jc(st,it))){var pt=String.fromCharCode(ht==null?ct:ht);pt!="\b"&&($c(st,it,pt)||st.display.input.onKeyPress(it))}}}var gg=400,ic=function(it,st,ct){this.time=it,this.pos=st,this.button=ct};ic.prototype.compare=function(it,st,ct){return this.time+gg>it&&Dn(st,this.pos)==0&&ct==this.button};var vA,Ch;function Rd(it,st){var ct=+new Date;return Ch&&Ch.compare(ct,it,st)?(vA=Ch=null,"triple"):vA&&vA.compare(ct,it,st)?(Ch=new ic(ct,it,st),vA=null,"double"):(vA=new ic(ct,it,st),Ch=null,"single")}function su(it){var st=this,ct=st.display;if(!(Vn(st,it)||ct.activeTouch&&ct.input.supportsTouch())){if(ct.input.ensurePolled(),ct.shift=it.shiftKey,os(ct,it)){ie||(ct.scroller.draggable=!1,setTimeout(function(){return ct.scroller.draggable=!0},100));return}if(!Kd(st,it)){var ht=Pa(st,it),pt=lr(it),Nt=ht?Rd(ht,pt):"single";window.focus(),pt==1&&st.state.selectingText&&st.state.selectingText(it),!(ht&&Hd(st,pt,ht,Nt,it))&&(pt==1?ht?Lf(st,ht,Nt,it):Xi(it)==ct.scroller&&Ei(it):pt==2?(ht&&jh(st.doc,ht),setTimeout(function(){return ct.input.focus()},20)):pt==3&&(bt?st.display.input.onContextMenu(it):Ts(st)))}}}function Hd(it,st,ct,ht,pt){var Nt="Click";return ht=="double"?Nt="Double"+Nt:ht=="triple"&&(Nt="Triple"+Nt),Nt=(st==1?"Left":st==2?"Middle":"Right")+Nt,Bh(it,Yc(Nt,pt),pt,function(Kt){if(typeof Kt=="string"&&(Kt=jA[Kt]),!Kt)return!1;var qt=!1;try{it.isReadOnly()&&(it.state.suppressEdits=!0),qt=Kt(it,ct)!=ai}finally{it.state.suppressEdits=!1}return qt})}function td(it,st,ct){var ht=it.getOption("configureMouse"),pt=ht?ht(it,st,ct):{};if(pt.unit==null){var Nt=at?ct.shiftKey&&ct.metaKey:ct.altKey;pt.unit=Nt?"rectangle":st=="single"?"char":st=="double"?"word":"line"}return(pt.extend==null||it.doc.extend)&&(pt.extend=it.doc.extend||ct.shiftKey),pt.addNew==null&&(pt.addNew=At?ct.metaKey:ct.ctrlKey),pt.moveOnDrag==null&&(pt.moveOnDrag=!(At?ct.altKey:ct.ctrlKey)),pt}function Lf(it,st,ct,ht){de?setTimeout(_n(ms,it),0):it.curOp.focus=_e();var pt=td(it,ct,ht),Nt=it.doc.sel,Kt;it.options.dragDrop&&zi&&!it.isReadOnly()&&ct=="single"&&(Kt=Nt.contains(st))>-1&&(Dn((Kt=Nt.ranges[Kt]).from(),st)<0||st.xRel>0)&&(Dn(Kt.to(),st)>0||st.xRel<0)?Mf(it,ht,st,pt):pg(it,ht,st,pt)}function Mf(it,st,ct,ht){var pt=it.display,Nt=!1,Kt=ya(it,function(me){ie&&(pt.scroller.draggable=!1),it.state.draggingText=!1,kn(pt.wrapper.ownerDocument,"mouseup",Kt),kn(pt.wrapper.ownerDocument,"mousemove",qt),kn(pt.scroller,"dragstart",Jt),kn(pt.scroller,"drop",Kt),Nt||(Ei(me),ht.addNew||jh(it.doc,ct,null,null,ht.extend),ie&&!Ie||de&&Ht==9?setTimeout(function(){pt.wrapper.ownerDocument.body.focus({preventScroll:!0}),pt.input.focus()},20):pt.input.focus())}),qt=function(me){Nt=Nt||Math.abs(st.clientX-me.clientX)+Math.abs(st.clientY-me.clientY)>=10},Jt=function(){return Nt=!0};ie&&(pt.scroller.draggable=!0),it.state.draggingText=Kt,Kt.copy=!ht.moveOnDrag,pt.scroller.dragDrop&&pt.scroller.dragDrop(),be(pt.wrapper.ownerDocument,"mouseup",Kt),be(pt.wrapper.ownerDocument,"mousemove",qt),be(pt.scroller,"dragstart",Jt),be(pt.scroller,"drop",Kt),Ts(it),setTimeout(function(){return pt.input.focus()},20)}function rc(it,st,ct){if(ct=="char")return new ys(st,st);if(ct=="word")return it.findWordAt(st);if(ct=="line")return new ys(Ye(st.line,0),fi(it.doc,Ye(st.line+1,0)));var ht=ct(it,st);return new ys(ht.from,ht.to)}function pg(it,st,ct,ht){var pt=it.display,Nt=it.doc;Ei(st);var Kt,qt,Jt=Nt.sel,me=Jt.ranges;if(ht.addNew&&!ht.extend?(qt=Nt.sel.contains(ct),qt>-1?Kt=me[qt]:Kt=new ys(ct,ct)):(Kt=Nt.sel.primary(),qt=Nt.sel.primIndex),ht.unit=="rectangle")ht.addNew||(Kt=new ys(ct,ct)),ct=Pa(it,st,!0,!0),qt=-1;else{var en=rc(it,ct,ht.unit);ht.extend?Kt=bd(Kt,en.anchor,en.head,ht.extend):Kt=en}ht.addNew?qt==-1?(qt=me.length,Va(Nt,ml(it,me.concat([Kt]),qt),{scroll:!1,origin:"*mouse"})):me.length>1&&me[qt].empty()&&ht.unit=="char"&&!ht.extend?(Va(Nt,ml(it,me.slice(0,qt).concat(me.slice(qt+1)),0),{scroll:!1,origin:"*mouse"}),Jt=Nt.sel):_A(Nt,qt,Kt,Qn):(qt=0,Va(Nt,new ru([Kt],0),Qn),Jt=Nt.sel);var Se=ct;function bn(Er){if(Dn(Se,Er)!=0)if(Se=Er,ht.unit=="rectangle"){for(var jr=[],po=it.options.tabSize,Pr=pe(Ln(Nt,ct.line).text,ct.ch,po),No=pe(Ln(Nt,Er.line).text,Er.ch,po),_s=Math.min(Pr,No),Fa=Math.max(Pr,No),Ys=Math.min(ct.line,Er.line),yl=Math.min(it.lastLine(),Math.max(ct.line,Er.line));Ys<=yl;Ys++){var Da=Ln(Nt,Ys).text,xa=Ti(Da,_s,po);_s==Fa?jr.push(new ys(Ye(Ys,xa),Ye(Ys,xa))):Da.length>xa&&jr.push(new ys(Ye(Ys,xa),Ye(Ys,Ti(Da,Fa,po))))}jr.length||jr.push(new ys(ct,ct)),Va(Nt,ml(it,Jt.ranges.slice(0,qt).concat(jr),qt),{origin:"*mouse",scroll:!1}),it.scrollIntoView(Er)}else{var al=Kt,Ha=rc(it,Er,ht.unit),Br=al.anchor,Xo;Dn(Ha.anchor,Br)>0?(Xo=Ha.head,Br=li(al.from(),Ha.anchor)):(Xo=Ha.anchor,Br=Ni(al.to(),Ha.head));var Ks=Jt.ranges.slice(0);Ks[qt]=bf(it,new ys(fi(Nt,Br),Xo)),Va(Nt,ml(it,Ks,qt),Qn)}}var Pn=pt.wrapper.getBoundingClientRect(),Ii=0;function Hi(Er){var jr=++Ii,po=Pa(it,Er,!0,ht.unit=="rectangle");if(po)if(Dn(po,Se)!=0){it.curOp.focus=_e(),bn(po);var Pr=Eo(pt,Nt);(po.line>=Pr.to||po.line<Pr.from)&&setTimeout(ya(it,function(){Ii==jr&&Hi(Er)}),150)}else{var No=Er.clientY<Pn.top?-20:Er.clientY>Pn.bottom?20:0;No&&setTimeout(ya(it,function(){Ii==jr&&(pt.scroller.scrollTop+=No,Hi(Er))}),50)}}function Ji(Er){it.state.selectingText=!1,Ii=1/0,Er&&(Ei(Er),pt.input.focus()),kn(pt.wrapper.ownerDocument,"mousemove",dr),kn(pt.wrapper.ownerDocument,"mouseup",Rr),Nt.history.lastSelOrigin=null}var dr=ya(it,function(Er){Er.buttons===0||!lr(Er)?Ji(Er):Hi(Er)}),Rr=ya(it,Ji);it.state.selectingText=Rr,be(pt.wrapper.ownerDocument,"mousemove",dr),be(pt.wrapper.ownerDocument,"mouseup",Rr)}function bf(it,st){var ct=st.anchor,ht=st.head,pt=Ln(it.doc,ct.line);if(Dn(ct,ht)==0&&ct.sticky==ht.sticky)return st;var Nt=Kn(pt);if(!Nt)return st;var Kt=Xe(Nt,ct.ch,ct.sticky),qt=Nt[Kt];if(qt.from!=ct.ch&&qt.to!=ct.ch)return st;var Jt=Kt+(qt.from==ct.ch==(qt.level!=1)?0:1);if(Jt==0||Jt==Nt.length)return st;var me;if(ht.line!=ct.line)me=(ht.line-ct.line)*(it.doc.direction=="ltr"?1:-1)>0;else{var en=Xe(Nt,ht.ch,ht.sticky),Se=en-Kt||(ht.ch-ct.ch)*(qt.level==1?-1:1);en==Jt-1||en==Jt?me=Se<0:me=Se>0}var bn=Nt[Jt+(me?-1:0)],Pn=me==(bn.level==1),Ii=Pn?bn.from:bn.to,Hi=Pn?"after":"before";return ct.ch==Ii&&ct.sticky==Hi?st:new ys(new Ye(ct.line,Ii,Hi),ht)}function _d(it,st,ct,ht){var pt,Nt;if(st.touches)pt=st.touches[0].clientX,Nt=st.touches[0].clientY;else try{pt=st.clientX,Nt=st.clientY}catch(bn){return!1}if(pt>=Math.floor(it.display.gutters.getBoundingClientRect().right))return!1;ht&&Ei(st);var Kt=it.display,qt=Kt.lineDiv.getBoundingClientRect();if(Nt>qt.bottom||!si(it,ct))return ii(st);Nt-=qt.top-Kt.viewOffset;for(var Jt=0;Jt<it.display.gutterSpecs.length;++Jt){var me=Kt.gutters.childNodes[Jt];if(me&&me.getBoundingClientRect().right>=pt){var en=De(it.doc,Nt),Se=it.display.gutterSpecs[Jt];return On(it,ct,it,en,Se.className,st),ii(st)}}}function Kd(it,st){return _d(it,st,"gutterClick",!0)}function ed(it,st){os(it.display,st)||Ph(it,st)||Vn(it,st,"contextmenu")||bt||it.display.input.onContextMenu(st)}function Ph(it,st){return si(it,"gutterContextMenu")?_d(it,st,"gutterContextMenu",!1):!1}function oc(it){it.display.wrapper.className=it.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+it.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ma(it)}var Qu={toString:function(){return"CodeMirror.Init"}},kf={},nd={};function mg(it){var st=it.optionHandlers;function ct(ht,pt,Nt,Kt){it.defaults[ht]=pt,Nt&&(st[ht]=Kt?function(qt,Jt,me){me!=Qu&&Nt(qt,Jt,me)}:Nt)}it.defineOption=ct,it.Init=Qu,ct("value","",function(ht,pt){return ht.setValue(pt)},!0),ct("mode",null,function(ht,pt){ht.doc.modeOption=pt,To(ht)},!0),ct("indentUnit",2,To,!0),ct("indentWithTabs",!1),ct("smartIndent",!0),ct("tabSize",4,function(ht){Rc(ht),ma(ht),Ss(ht)},!0),ct("lineSeparator",null,function(ht,pt){if(ht.doc.lineSep=pt,!!pt){var Nt=[],Kt=ht.doc.first;ht.doc.iter(function(Jt){for(var me=0;;){var en=Jt.text.indexOf(pt,me);if(en==-1)break;me=en+pt.length,Nt.push(Ye(Kt,en))}Kt++});for(var qt=Nt.length-1;qt>=0;qt--)xh(ht.doc,pt,Nt[qt],Ye(Nt[qt].line,Nt[qt].ch+pt.length))}}),ct("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(ht,pt,Nt){ht.state.specialChars=new RegExp(pt.source+(pt.test(" ")?"":"| "),"g"),Nt!=Qu&&ht.refresh()}),ct("specialCharPlaceholder",Nr,function(ht){return ht.refresh()},!0),ct("electricChars",!0),ct("inputStyle",et?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),ct("spellcheck",!1,function(ht,pt){return ht.getInputField().spellcheck=pt},!0),ct("autocorrect",!1,function(ht,pt){return ht.getInputField().autocorrect=pt},!0),ct("autocapitalize",!1,function(ht,pt){return ht.getInputField().autocapitalize=pt},!0),ct("rtlMoveVisually",!dt),ct("wholeLineUpdateBefore",!0),ct("theme","default",function(ht){oc(ht),Vl(ht)},!0),ct("keyMap","default",function(ht,pt,Nt){var Kt=fa(pt),qt=Nt!=Qu&&fa(Nt);qt&&qt.detach&&qt.detach(ht,Kt),Kt.attach&&Kt.attach(ht,qt||null)}),ct("extraKeys",null),ct("configureMouse",null),ct("lineWrapping",!1,Tf,!0),ct("gutters",[],function(ht,pt){ht.display.gutterSpecs=ka(pt,ht.options.lineNumbers),Vl(ht)},!0),ct("fixedGutter",!0,function(ht,pt){ht.display.gutters.style.left=pt?fu(ht.display)+"px":"0",ht.refresh()},!0),ct("coverGutterNextToScrollbar",!1,function(ht){return sa(ht)},!0),ct("scrollbarStyle","native",function(ht){Eu(ht),sa(ht),ht.display.scrollbars.setScrollTop(ht.doc.scrollTop),ht.display.scrollbars.setScrollLeft(ht.doc.scrollLeft)},!0),ct("lineNumbers",!1,function(ht,pt){ht.display.gutterSpecs=ka(ht.options.gutters,pt),Vl(ht)},!0),ct("firstLineNumber",1,Vl,!0),ct("lineNumberFormatter",function(ht){return ht},Vl,!0),ct("showCursorWhenSelecting",!1,Ws,!0),ct("resetSelectionOnContextMenu",!0),ct("lineWiseCopyCut",!0),ct("pasteLinesPerSelection",!0),ct("selectionsMayTouch",!1),ct("readOnly",!1,function(ht,pt){pt=="nocursor"&&(dA(ht),ht.display.input.blur()),ht.display.input.readOnlyChanged(pt)}),ct("screenReaderLabel",null,function(ht,pt){pt=pt===""?null:pt,ht.display.input.screenReaderLabelChanged(pt)}),ct("disableInput",!1,function(ht,pt){pt||ht.display.input.reset()},!0),ct("dragDrop",!0,zd),ct("allowDropFileTypes",null),ct("cursorBlinkRate",530),ct("cursorScrollMargin",0),ct("cursorHeight",1,Ws,!0),ct("singleCursorHeightPerLine",!0,Ws,!0),ct("workTime",100),ct("workDelay",100),ct("flattenSpans",!0,Rc,!0),ct("addModeClass",!1,Rc,!0),ct("pollInterval",100),ct("undoDepth",200,function(ht,pt){return ht.doc.history.undoDepth=pt}),ct("historyEventDelay",1250),ct("viewportMargin",10,function(ht){return ht.refresh()},!0),ct("maxHighlightLength",1e4,Rc,!0),ct("moveInputWithCursor",!0,function(ht,pt){pt||ht.display.input.resetPosition()}),ct("tabindex",null,function(ht,pt){return ht.display.input.getField().tabIndex=pt||""}),ct("autofocus",null),ct("direction","ltr",function(ht,pt){return ht.doc.setDirection(pt)},!0),ct("phrases",null)}function zd(it,st,ct){var ht=ct&&ct!=Qu;if(!st!=!ht){var pt=it.display.dragFunctions,Nt=st?be:kn;Nt(it.display.scroller,"dragstart",pt.start),Nt(it.display.scroller,"dragenter",pt.enter),Nt(it.display.scroller,"dragover",pt.over),Nt(it.display.scroller,"dragleave",pt.leave),Nt(it.display.scroller,"drop",pt.drop)}}function Tf(it){it.options.lineWrapping?(nn(it.display.wrapper,"CodeMirror-wrap"),it.display.sizer.style.minWidth="",it.display.sizerWidth=null):(Rt(it.display.wrapper,"CodeMirror-wrap"),Gi(it)),Xr(it),Ss(it),ma(it),setTimeout(function(){return sa(it)},100)}function Jo(it,st){var ct=this;if(!(this instanceof Jo))return new Jo(it,st);this.options=st=st?Xn(st):{},Xn(kf,st,!1);var ht=st.value;typeof ht=="string"?ht=new Na(ht,st.mode,null,st.lineSeparator,st.direction):st.mode&&(ht.modeOption=st.mode),this.doc=ht;var pt=new Jo.inputStyles[st.inputStyle](this),Nt=this.display=new QA(it,ht,pt,st);Nt.wrapper.CodeMirror=this,oc(this),st.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),Eu(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 ne,keySeq:null,specialChars:null},st.autofocus&&!et&&Nt.input.focus(),de&&Ht<11&&setTimeout(function(){return ct.display.input.reset(!0)},20),Fh(this),vl(),jl(this),this.curOp.forceUpdate=!0,wa(this,ht),st.autofocus&&!et||this.hasFocus()?setTimeout(function(){ct.hasFocus()&&!ct.state.focused&&Vo(ct)},20):dA(this);for(var Kt in nd)nd.hasOwnProperty(Kt)&&nd[Kt](this,st[Kt],Qu);da(this),st.finishInit&&st.finishInit(this);for(var qt=0;qt<ZA.length;++qt)ZA[qt](this);mu(this),ie&&st.lineWrapping&&getComputedStyle(Nt.lineDiv).textRendering=="optimizelegibility"&&(Nt.lineDiv.style.textRendering="auto")}Jo.defaults=kf,Jo.optionHandlers=nd;function Fh(it){var st=it.display;be(st.scroller,"mousedown",ya(it,su)),de&&Ht<11?be(st.scroller,"dblclick",ya(it,function(Jt){if(!Vn(it,Jt)){var me=Pa(it,Jt);if(!(!me||Kd(it,Jt)||os(it.display,Jt))){Ei(Jt);var en=it.findWordAt(me);jh(it.doc,en.anchor,en.head)}}})):be(st.scroller,"dblclick",function(Jt){return Vn(it,Jt)||Ei(Jt)}),be(st.scroller,"contextmenu",function(Jt){return ed(it,Jt)}),be(st.input.getField(),"contextmenu",function(Jt){st.scroller.contains(Jt.target)||ed(it,Jt)});var ct,ht={end:0};function pt(){st.activeTouch&&(ct=setTimeout(function(){return st.activeTouch=null},1e3),ht=st.activeTouch,ht.end=+new Date)}function Nt(Jt){if(Jt.touches.length!=1)return!1;var me=Jt.touches[0];return me.radiusX<=1&&me.radiusY<=1}function Kt(Jt,me){if(me.left==null)return!0;var en=me.left-Jt.left,Se=me.top-Jt.top;return en*en+Se*Se>20*20}be(st.scroller,"touchstart",function(Jt){if(!Vn(it,Jt)&&!Nt(Jt)&&!Kd(it,Jt)){st.input.ensurePolled(),clearTimeout(ct);var me=+new Date;st.activeTouch={start:me,moved:!1,prev:me-ht.end<=300?ht:null},Jt.touches.length==1&&(st.activeTouch.left=Jt.touches[0].pageX,st.activeTouch.top=Jt.touches[0].pageY)}}),be(st.scroller,"touchmove",function(){st.activeTouch&&(st.activeTouch.moved=!0)}),be(st.scroller,"touchend",function(Jt){var me=st.activeTouch;if(me&&!os(st,Jt)&&me.left!=null&&!me.moved&&new Date-me.start<300){var en=it.coordsChar(st.activeTouch,"page"),Se;!me.prev||Kt(me,me.prev)?Se=new ys(en,en):!me.prev.prev||Kt(me,me.prev.prev)?Se=it.findWordAt(en):Se=new ys(Ye(en.line,0),fi(it.doc,Ye(en.line+1,0))),it.setSelection(Se.anchor,Se.head),it.focus(),Ei(Jt)}pt()}),be(st.scroller,"touchcancel",pt),be(st.scroller,"scroll",function(){st.scroller.clientHeight&&(Pu(it,st.scroller.scrollTop),Fu(it,st.scroller.scrollLeft,!0),On(it,"scroll",it))}),be(st.scroller,"mousewheel",function(Jt){return Ta(it,Jt)}),be(st.scroller,"DOMMouseScroll",function(Jt){return Ta(it,Jt)}),be(st.wrapper,"scroll",function(){return st.wrapper.scrollTop=st.wrapper.scrollLeft=0}),st.dragFunctions={enter:function(Jt){Vn(it,Jt)||ar(Jt)},over:function(Jt){Vn(it,Jt)||(cg(it,Jt),ar(Jt))},start:function(Jt){return Qd(it,Jt)},drop:ya(it,Ud),leave:function(Jt){Vn(it,Jt)||dg(it)}};var qt=st.input.getField();be(qt,"keyup",function(Jt){return Ef.call(it,Jt)}),be(qt,"keydown",ya(it,qc)),be(qt,"keypress",ya(it,Uu)),be(qt,"focus",function(Jt){return Vo(it,Jt)}),be(qt,"blur",function(Jt){return dA(it,Jt)})}var ZA=[];Jo.defineInitHook=function(it){return ZA.push(it)};function ga(it,st,ct,ht){var pt=it.doc,Nt;ct==null&&(ct="add"),ct=="smart"&&(pt.mode.indent?Nt=vr(it,st).state:ct="prev");var Kt=it.options.tabSize,qt=Ln(pt,st),Jt=pe(qt.text,null,Kt);qt.stateAfter&&(qt.stateAfter=null);var me=qt.text.match(/^\s*/)[0],en;if(!ht&&!/\S/.test(qt.text))en=0,ct="not";else if(ct=="smart"&&(en=pt.mode.indent(Nt,qt.text.slice(me.length),qt.text),en==ai||en>150)){if(!ht)return;ct="prev"}ct=="prev"?st>pt.first?en=pe(Ln(pt,st-1).text,null,Kt):en=0:ct=="add"?en=Jt+it.options.indentUnit:ct=="subtract"?en=Jt-it.options.indentUnit:typeof ct=="number"&&(en=Jt+ct),en=Math.max(0,en);var Se="",bn=0;if(it.options.indentWithTabs)for(var Pn=Math.floor(en/Kt);Pn;--Pn)bn+=Kt,Se+=" ";if(bn<en&&(Se+=Le(en-bn)),Se!=me)return xh(pt,Se,Ye(st,0),Ye(st,me.length),"+input"),qt.stateAfter=null,!0;for(var Ii=0;Ii<pt.sel.ranges.length;Ii++){var Hi=pt.sel.ranges[Ii];if(Hi.head.line==st&&Hi.head.ch<me.length){var Ji=Ye(st,me.length);_A(pt,Ii,new ys(Ji,Ji));break}}}var sl=null;function WA(it){sl=it}function id(it,st,ct,ht,pt){var Nt=it.doc;it.display.shift=!1,ht||(ht=Nt.sel);var Kt=+new Date-200,qt=pt=="paste"||it.state.pasteIncoming>Kt,Jt=kr(st),me=null;if(qt&&ht.ranges.length>1)if(sl&&sl.text.join(`
`)==st){if(ht.ranges.length%sl.text.length==0){me=[];for(var en=0;en<sl.text.length;en++)me.push(Nt.splitLines(sl.text[en]))}}else Jt.length==ht.ranges.length&&it.options.pasteLinesPerSelection&&(me=hi(Jt,function(dr){return[dr]}));for(var Se=it.curOp.updateInput,bn=ht.ranges.length-1;bn>=0;bn--){var Pn=ht.ranges[bn],Ii=Pn.from(),Hi=Pn.to();Pn.empty()&&(ct&&ct>0?Ii=Ye(Ii.line,Ii.ch-ct):it.state.overwrite&&!qt?Hi=Ye(Hi.line,Math.min(Ln(Nt,Hi.line).text.length,Hi.ch+tn(Jt).length)):qt&&sl&&sl.lineWise&&sl.text.join(`
`)==Jt.join(`
`)&&(Ii=Hi=Ye(Ii.line,0)));var Ji={from:Ii,to:Hi,text:me?me[bn%me.length]:Jt,origin:pt||(qt?"paste":it.state.cutIncoming>Kt?"cut":"+input")};zA(it.doc,Ji),wr(it,"inputRead",it,Ji)}st&&!qt&&ac(it,st),gu(it),it.curOp.updateInput<2&&(it.curOp.updateInput=Se),it.curOp.typing=!0,it.state.pasteIncoming=it.state.cutIncoming=-1}function sc(it,st){var ct=it.clipboardData&&it.clipboardData.getData("Text");if(ct)return it.preventDefault(),!st.isReadOnly()&&!st.options.disableInput&&ls(st,function(){return id(st,ct,0,null,"paste")}),!0}function ac(it,st){if(!(!it.options.electricChars||!it.options.smartIndent))for(var ct=it.doc.sel,ht=ct.ranges.length-1;ht>=0;ht--){var pt=ct.ranges[ht];if(!(pt.head.ch>100||ht&&ct.ranges[ht-1].head.line==pt.head.line)){var Nt=it.getModeAt(pt.head),Kt=!1;if(Nt.electricChars){for(var qt=0;qt<Nt.electricChars.length;qt++)if(st.indexOf(Nt.electricChars.charAt(qt))>-1){Kt=ga(it,pt.head.line,"smart");break}}else Nt.electricInput&&Nt.electricInput.test(Ln(it.doc,pt.head.line).text.slice(0,pt.head.ch))&&(Kt=ga(it,pt.head.line,"smart"));Kt&&wr(it,"electricInput",it,pt.head.line)}}}function Gd(it){for(var st=[],ct=[],ht=0;ht<it.doc.sel.ranges.length;ht++){var pt=it.doc.sel.ranges[ht].head.line,Nt={anchor:Ye(pt,0),head:Ye(pt+1,0)};ct.push(Nt),st.push(it.getRange(Nt.anchor,Nt.head))}return{text:st,ranges:ct}}function jd(it,st,ct,ht){it.setAttribute("autocorrect",ct?"":"off"),it.setAttribute("autocapitalize",ht?"":"off"),it.setAttribute("spellcheck",!!st)}function Nf(){var it=te("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),st=te("div",[it],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return ie?it.style.width="1000px":it.setAttribute("wrap","off"),Qt&&(it.style.border="1px solid black"),jd(it),st}function yA(it){var st=it.optionHandlers,ct=it.helpers={};it.prototype={constructor:it,focus:function(){window.focus(),this.display.input.focus()},setOption:function(ht,pt){var Nt=this.options,Kt=Nt[ht];Nt[ht]==pt&&ht!="mode"||(Nt[ht]=pt,st.hasOwnProperty(ht)&&ya(this,st[ht])(this,pt,Kt),On(this,"optionChange",this,ht))},getOption:function(ht){return this.options[ht]},getDoc:function(){return this.doc},addKeyMap:function(ht,pt){this.state.keyMaps[pt?"push":"unshift"](fa(ht))},removeKeyMap:function(ht){for(var pt=this.state.keyMaps,Nt=0;Nt<pt.length;++Nt)if(pt[Nt]==ht||pt[Nt].name==ht)return pt.splice(Nt,1),!0},addOverlay:Ma(function(ht,pt){var Nt=ht.token?ht:it.getMode(this.options,ht);if(Nt.startState)throw new Error("Overlays may not be stateful.");ni(this.state.overlays,{mode:Nt,modeSpec:ht,opaque:pt&&pt.opaque,priority:pt&&pt.priority||0},function(Kt){return Kt.priority}),this.state.modeGen++,Ss(this)}),removeOverlay:Ma(function(ht){for(var pt=this.state.overlays,Nt=0;Nt<pt.length;++Nt){var Kt=pt[Nt].modeSpec;if(Kt==ht||typeof ht=="string"&&Kt.name==ht){pt.splice(Nt,1),this.state.modeGen++,Ss(this);return}}}),indentLine:Ma(function(ht,pt,Nt){typeof pt!="string"&&typeof pt!="number"&&(pt==null?pt=this.options.smartIndent?"smart":"prev":pt=pt?"add":"subtract"),qn(this.doc,ht)&&ga(this,ht,pt,Nt)}),indentSelection:Ma(function(ht){for(var pt=this.doc.sel.ranges,Nt=-1,Kt=0;Kt<pt.length;Kt++){var qt=pt[Kt];if(qt.empty())qt.head.line>Nt&&(ga(this,qt.head.line,ht,!0),Nt=qt.head.line,Kt==this.doc.sel.primIndex&&gu(this));else{var Jt=qt.from(),me=qt.to(),en=Math.max(Nt,Jt.line);Nt=Math.min(this.lastLine(),me.line-(me.ch?0:1))+1;for(var Se=en;Se<Nt;++Se)ga(this,Se,ht);var bn=this.doc.sel.ranges;Jt.ch==0&&pt.length==bn.length&&bn[Kt].from().ch>0&&_A(this.doc,Kt,new ys(Jt,bn[Kt].to()),sn)}}}),getTokenAt:function(ht,pt){return Mr(this,ht,pt)},getLineTokens:function(ht,pt){return Mr(this,Ye(ht),pt,!0)},getTokenTypeAt:function(ht){ht=fi(this.doc,ht);var pt=hr(this,Ln(this.doc,ht.line)),Nt=0,Kt=(pt.length-1)/2,qt=ht.ch,Jt;if(qt==0)Jt=pt[2];else for(;;){var me=Nt+Kt>>1;if((me?pt[me*2-1]:0)>=qt)Kt=me;else if(pt[me*2+1]<qt)Nt=me+1;else{Jt=pt[me*2+2];break}}var en=Jt?Jt.indexOf("overlay "):-1;return en<0?Jt:en==0?null:Jt.slice(0,en-1)},getModeAt:function(ht){var pt=this.doc.mode;return pt.innerMode?it.innerMode(pt,this.getTokenAt(ht).state).mode:pt},getHelper:function(ht,pt){return this.getHelpers(ht,pt)[0]},getHelpers:function(ht,pt){var Nt=[];if(!ct.hasOwnProperty(pt))return Nt;var Kt=ct[pt],qt=this.getModeAt(ht);if(typeof qt[pt]=="string")Kt[qt[pt]]&&Nt.push(Kt[qt[pt]]);else if(qt[pt])for(var Jt=0;Jt<qt[pt].length;Jt++){var me=Kt[qt[pt][Jt]];me&&Nt.push(me)}else qt.helperType&&Kt[qt.helperType]?Nt.push(Kt[qt.helperType]):Kt[qt.name]&&Nt.push(Kt[qt.name]);for(var en=0;en<Kt._global.length;en++){var Se=Kt._global[en];Se.pred(qt,this)&&pn(Nt,Se.val)==-1&&Nt.push(Se.val)}return Nt},getStateAfter:function(ht,pt){var Nt=this.doc;return ht=ci(Nt,ht==null?Nt.first+Nt.size-1:ht),vr(this,ht+1,pt).state},cursorCoords:function(ht,pt){var Nt,Kt=this.doc.sel.primary();return ht==null?Nt=Kt.head:typeof ht=="object"?Nt=fi(this.doc,ht):Nt=ht?Kt.from():Kt.to(),Uo(this,Nt,pt||"page")},charCoords:function(ht,pt){return ia(this,fi(this.doc,ht),pt||"page")},coordsChar:function(ht,pt){return ht=bl(this,ht,pt||"page"),ps(this,ht.left,ht.top)},lineAtHeight:function(ht,pt){return ht=bl(this,{top:ht,left:0},pt||"page").top,De(this.doc,ht+this.display.viewOffset)},heightAtLine:function(ht,pt,Nt){var Kt=!1,qt;if(typeof ht=="number"){var Jt=this.doc.first+this.doc.size-1;ht<this.doc.first?ht=this.doc.first:ht>Jt&&(ht=Jt,Kt=!0),qt=Ln(this.doc,ht)}else qt=ht;return js(this,qt,{top:0,left:0},pt||"page",Nt||Kt).top+(Kt?this.doc.height-Qi(qt):0)},defaultTextHeight:function(){return ra(this.display)},defaultCharWidth:function(){return gl(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(ht,pt,Nt,Kt,qt){var Jt=this.display;ht=Uo(this,fi(this.doc,ht));var me=ht.bottom,en=ht.left;if(pt.style.position="absolute",pt.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(pt),Jt.sizer.appendChild(pt),Kt=="over")me=ht.top;else if(Kt=="above"||Kt=="near"){var Se=Math.max(Jt.wrapper.clientHeight,this.doc.height),bn=Math.max(Jt.sizer.clientWidth,Jt.lineSpace.clientWidth);(Kt=="above"||ht.bottom+pt.offsetHeight>Se)&&ht.top>pt.offsetHeight?me=ht.top-pt.offsetHeight:ht.bottom+pt.offsetHeight<=Se&&(me=ht.bottom),en+pt.offsetWidth>bn&&(en=bn-pt.offsetWidth)}pt.style.top=me+"px",pt.style.left=pt.style.right="",qt=="right"?(en=Jt.sizer.clientWidth-pt.offsetWidth,pt.style.right="0px"):(qt=="left"?en=0:qt=="middle"&&(en=(Jt.sizer.clientWidth-pt.offsetWidth)/2),pt.style.left=en+"px"),Nt&&TA(this,{left:en,top:me,right:en+pt.offsetWidth,bottom:me+pt.offsetHeight})},triggerOnKeyDown:Ma(qc),triggerOnKeyPress:Ma(Uu),triggerOnKeyUp:Ef,triggerOnMouseDown:Ma(su),execCommand:function(ht){if(jA.hasOwnProperty(ht))return jA[ht].call(null,this)},triggerElectric:Ma(function(ht){ac(this,ht)}),findPosH:function(ht,pt,Nt,Kt){var qt=1;pt<0&&(qt=-1,pt=-pt);for(var Jt=fi(this.doc,ht),me=0;me<pt&&(Jt=lc(this.doc,Jt,qt,Nt,Kt),!Jt.hitSide);++me);return Jt},moveH:Ma(function(ht,pt){var Nt=this;this.extendSelectionsBy(function(Kt){return Nt.display.shift||Nt.doc.extend||Kt.empty()?lc(Nt.doc,Kt.head,ht,pt,Nt.options.rtlMoveVisually):ht<0?Kt.from():Kt.to()},jn)}),deleteH:Ma(function(ht,pt){var Nt=this.doc.sel,Kt=this.doc;Nt.somethingSelected()?Kt.replaceSelection("",null,"+delete"):Ra(this,function(qt){var Jt=lc(Kt,qt.head,ht,pt,!1);return ht<0?{from:Jt,to:qt.head}:{from:qt.head,to:Jt}})}),findPosV:function(ht,pt,Nt,Kt){var qt=1,Jt=Kt;pt<0&&(qt=-1,pt=-pt);for(var me=fi(this.doc,ht),en=0;en<pt;++en){var Se=Uo(this,me,"div");if(Jt==null?Jt=Se.left:Se.left=Jt,me=YA(this,Se,qt,Nt),me.hitSide)break}return me},moveV:Ma(function(ht,pt){var Nt=this,Kt=this.doc,qt=[],Jt=!this.display.shift&&!Kt.extend&&Kt.sel.somethingSelected();if(Kt.extendSelectionsBy(function(en){if(Jt)return ht<0?en.from():en.to();var Se=Uo(Nt,en.head,"div");en.goalColumn!=null&&(Se.left=en.goalColumn),qt.push(Se.left);var bn=YA(Nt,Se,ht,pt);return pt=="page"&&en==Kt.sel.primary()&&ch(Nt,ia(Nt,bn,"div").top-Se.top),bn},jn),qt.length)for(var me=0;me<Kt.sel.ranges.length;me++)Kt.sel.ranges[me].goalColumn=qt[me]}),findWordAt:function(ht){var pt=this.doc,Nt=Ln(pt,ht.line).text,Kt=ht.ch,qt=ht.ch;if(Nt){var Jt=this.getHelper(ht,"wordChars");(ht.sticky=="before"||qt==Nt.length)&&Kt?--Kt:++qt;for(var me=Nt.charAt(Kt),en=Et(me,Jt)?function(Se){return Et(Se,Jt)}:/\s/.test(me)?function(Se){return/\s/.test(Se)}:function(Se){return!/\s/.test(Se)&&!Et(Se)};Kt>0&&en(Nt.charAt(Kt-1));)--Kt;for(;qt<Nt.length&&en(Nt.charAt(qt));)++qt}return new ys(Ye(ht.line,Kt),Ye(ht.line,qt))},toggleOverwrite:function(ht){ht!=null&&ht==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?nn(this.display.cursorDiv,"CodeMirror-overwrite"):Rt(this.display.cursorDiv,"CodeMirror-overwrite"),On(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==_e()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:Ma(function(ht,pt){pu(this,ht,pt)}),getScrollInfo:function(){var ht=this.display.scroller;return{left:ht.scrollLeft,top:ht.scrollTop,height:ht.scrollHeight-eo(this)-this.display.barHeight,width:ht.scrollWidth-eo(this)-this.display.barWidth,clientHeight:Ko(this),clientWidth:xs(this)}},scrollIntoView:Ma(function(ht,pt){ht==null?(ht={from:this.doc.sel.primary().head,to:null},pt==null&&(pt=this.options.cursorScrollMargin)):typeof ht=="number"?ht={from:Ye(ht,0),to:null}:ht.from==null&&(ht={from:ht,to:null}),ht.to||(ht.to=ht.from),ht.margin=pt||0,ht.from.line!=null?Go(this,ht):dh(this,ht.from,ht.to,ht.margin)}),setSize:Ma(function(ht,pt){var Nt=this,Kt=function(Jt){return typeof Jt=="number"||/^\d+$/.test(String(Jt))?Jt+"px":Jt};ht!=null&&(this.display.wrapper.style.width=Kt(ht)),pt!=null&&(this.display.wrapper.style.height=Kt(pt)),this.options.lineWrapping&&Qs(this);var qt=this.display.viewFrom;this.doc.iter(qt,this.display.viewTo,function(Jt){if(Jt.widgets){for(var me=0;me<Jt.widgets.length;me++)if(Jt.widgets[me].noHScroll){yo(Nt,qt,"widget");break}}++qt}),this.curOp.forceUpdate=!0,On(this,"refresh",this)}),operation:function(ht){return ls(this,ht)},startOperation:function(){return jl(this)},endOperation:function(){return mu(this)},refresh:Ma(function(){var ht=this.display.cachedTextHeight;Ss(this),this.curOp.forceUpdate=!0,ma(this),pu(this,this.doc.scrollLeft,this.doc.scrollTop),IA(this.display),(ht==null||Math.abs(ht-ra(this.display))>.5||this.options.lineWrapping)&&Xr(this),On(this,"refresh",this)}),swapDoc:Ma(function(ht){var pt=this.doc;return pt.cm=null,this.state.selectingText&&this.state.selectingText(),wa(this,ht),ma(this),this.display.input.reset(),pu(this,ht.scrollLeft,ht.scrollTop),this.curOp.forceScroll=!0,wr(this,"swapDoc",this,pt),pt}),phrase:function(ht){var pt=this.options.phrases;return pt&&Object.prototype.hasOwnProperty.call(pt,ht)?pt[ht]:ht},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}},yi(it),it.registerHelper=function(ht,pt,Nt){ct.hasOwnProperty(ht)||(ct[ht]=it[ht]={_global:[]}),ct[ht][pt]=Nt},it.registerGlobalHelper=function(ht,pt,Nt,Kt){it.registerHelper(ht,pt,Kt),ct[ht]._global.push({pred:Nt,val:Kt})}}function lc(it,st,ct,ht,pt){var Nt=st,Kt=ct,qt=Ln(it,st.line),Jt=pt&&it.direction=="rtl"?-ct:ct;function me(){var Rr=st.line+Jt;return Rr<it.first||Rr>=it.first+it.size?!1:(st=new Ye(Rr,st.ch,st.sticky),qt=Ln(it,Rr))}function en(Rr){var Er;if(ht=="codepoint"){var jr=qt.text.charCodeAt(st.ch+(ht>0?0:-1));isNaN(jr)?Er=null:Er=new Ye(st.line,Math.max(0,Math.min(qt.text.length,st.ch+ct*(jr>=55296&&jr<56320?2:1))),-ct)}else pt?Er=qh(it.cm,qt,st,ct):Er=ua(qt,st,ct);if(Er==null)if(!Rr&&me())st=$h(pt,it.cm,qt,st.line,Jt);else return!1;else st=Er;return!0}if(ht=="char"||ht=="codepoint")en();else if(ht=="column")en(!0);else if(ht=="word"||ht=="group")for(var Se=null,bn=ht=="group",Pn=it.cm&&it.cm.getHelper(st,"wordChars"),Ii=!0;!(ct<0&&!en(!Ii));Ii=!1){var Hi=qt.text.charAt(st.ch)||`
`,Ji=Et(Hi,Pn)?"w":bn&&Hi==`
`?"n":!bn||/\s/.test(Hi)?null:"p";if(bn&&!Ii&&!Ji&&(Ji="s"),Se&&Se!=Ji){ct<0&&(ct=1,en(),st.sticky="after");break}if(Ji&&(Se=Ji),ct>0&&!en(!Ii))break}var dr=zc(it,st,Nt,Kt,!0);return bi(Nt,dr)&&(dr.hitSide=!0),dr}function YA(it,st,ct,ht){var pt=it.doc,Nt=st.left,Kt;if(ht=="page"){var qt=Math.min(it.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),Jt=Math.max(qt-.5*ra(it.display),3);Kt=(ct>0?st.bottom:st.top)+ct*Jt}else ht=="line"&&(Kt=ct>0?st.bottom+3:st.top-3);for(var me;me=ps(it,Nt,Kt),!!me.outside;){if(ct<0?Kt<=0:Kt>=pt.height){me.hitSide=!0;break}Kt+=ct*5}return me}var Es=function(it){this.cm=it,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ne,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Es.prototype.init=function(it){var st=this,ct=this,ht=ct.cm,pt=ct.div=it.lineDiv;jd(pt,ht.options.spellcheck,ht.options.autocorrect,ht.options.autocapitalize);function Nt(qt){for(var Jt=qt.target;Jt;Jt=Jt.parentNode){if(Jt==pt)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(Jt.className))break}return!1}be(pt,"paste",function(qt){!Nt(qt)||Vn(ht,qt)||sc(qt,ht)||Ht<=11&&setTimeout(ya(ht,function(){return st.updateFromDOM()}),20)}),be(pt,"compositionstart",function(qt){st.composing={data:qt.data,done:!1}}),be(pt,"compositionupdate",function(qt){st.composing||(st.composing={data:qt.data,done:!1})}),be(pt,"compositionend",function(qt){st.composing&&(qt.data!=st.composing.data&&st.readFromDOMSoon(),st.composing.done=!0)}),be(pt,"touchstart",function(){return ct.forceCompositionEnd()}),be(pt,"input",function(){st.composing||st.readFromDOMSoon()});function Kt(qt){if(!(!Nt(qt)||Vn(ht,qt))){if(ht.somethingSelected())WA({lineWise:!1,text:ht.getSelections()}),qt.type=="cut"&&ht.replaceSelection("",null,"cut");else if(ht.options.lineWiseCopyCut){var Jt=Gd(ht);WA({lineWise:!0,text:Jt.text}),qt.type=="cut"&&ht.operation(function(){ht.setSelections(Jt.ranges,0,sn),ht.replaceSelection("",null,"cut")})}else return;if(qt.clipboardData){qt.clipboardData.clearData();var me=sl.text.join(`
`);if(qt.clipboardData.setData("Text",me),qt.clipboardData.getData("Text")==me){qt.preventDefault();return}}var en=Nf(),Se=en.firstChild;ht.display.lineSpace.insertBefore(en,ht.display.lineSpace.firstChild),Se.value=sl.text.join(`
`);var bn=document.activeElement;xn(Se),setTimeout(function(){ht.display.lineSpace.removeChild(en),bn.focus(),bn==pt&&ct.showPrimarySelection()},50)}}be(pt,"copy",Kt),be(pt,"cut",Kt)},Es.prototype.screenReaderLabelChanged=function(it){it?this.div.setAttribute("aria-label",it):this.div.removeAttribute("aria-label")},Es.prototype.prepareSelection=function(){var it=Wu(this.cm,!1);return it.focus=document.activeElement==this.div,it},Es.prototype.showSelection=function(it,st){!it||!this.cm.display.view.length||((it.focus||st)&&this.showPrimarySelection(),this.showMultipleSelections(it))},Es.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Es.prototype.showPrimarySelection=function(){var it=this.getSelection(),st=this.cm,ct=st.doc.sel.primary(),ht=ct.from(),pt=ct.to();if(st.display.viewTo==st.display.viewFrom||ht.line>=st.display.viewTo||pt.line<st.display.viewFrom){it.removeAllRanges();return}var Nt=tA(st,it.anchorNode,it.anchorOffset),Kt=tA(st,it.focusNode,it.focusOffset);if(!(Nt&&!Nt.bad&&Kt&&!Kt.bad&&Dn(li(Nt,Kt),ht)==0&&Dn(Ni(Nt,Kt),pt)==0)){var qt=st.display.view,Jt=ht.line>=st.display.viewFrom&&wA(st,ht)||{node:qt[0].measure.map[2],offset:0},me=pt.line<st.display.viewTo&&wA(st,pt);if(!me){var en=qt[qt.length-1].measure,Se=en.maps?en.maps[en.maps.length-1]:en.map;me={node:Se[Se.length-1],offset:Se[Se.length-2]-Se[Se.length-3]}}if(!Jt||!me){it.removeAllRanges();return}var bn=it.rangeCount&&it.getRangeAt(0),Pn;try{Pn=fe(Jt.node,Jt.offset,me.offset,me.node)}catch(Ii){}Pn&&(!St&&st.state.focused?(it.collapse(Jt.node,Jt.offset),Pn.collapsed||(it.removeAllRanges(),it.addRange(Pn))):(it.removeAllRanges(),it.addRange(Pn)),bn&&it.anchorNode==null?it.addRange(bn):St&&this.startGracePeriod()),this.rememberSelection()}},Es.prototype.startGracePeriod=function(){var it=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){it.gracePeriod=!1,it.selectionChanged()&&it.cm.operation(function(){return it.cm.curOp.selectionChanged=!0})},20)},Es.prototype.showMultipleSelections=function(it){Yt(this.cm.display.cursorDiv,it.cursors),Yt(this.cm.display.selectionDiv,it.selection)},Es.prototype.rememberSelection=function(){var it=this.getSelection();this.lastAnchorNode=it.anchorNode,this.lastAnchorOffset=it.anchorOffset,this.lastFocusNode=it.focusNode,this.lastFocusOffset=it.focusOffset},Es.prototype.selectionInEditor=function(){var it=this.getSelection();if(!it.rangeCount)return!1;var st=it.getRangeAt(0).commonAncestorContainer;return Ke(this.div,st)},Es.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Es.prototype.blur=function(){this.div.blur()},Es.prototype.getField=function(){return this.div},Es.prototype.supportsTouch=function(){return!0},Es.prototype.receivedFocus=function(){var it=this;this.selectionInEditor()?this.pollSelection():ls(this.cm,function(){return it.cm.curOp.selectionChanged=!0});function st(){it.cm.state.focused&&(it.pollSelection(),it.polling.set(it.cm.options.pollInterval,st))}this.polling.set(this.cm.options.pollInterval,st)},Es.prototype.selectionChanged=function(){var it=this.getSelection();return it.anchorNode!=this.lastAnchorNode||it.anchorOffset!=this.lastAnchorOffset||it.focusNode!=this.lastFocusNode||it.focusOffset!=this.lastFocusOffset},Es.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var it=this.getSelection(),st=this.cm;if(nt&&he&&this.cm.display.gutterSpecs.length&&Vd(it.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var ct=tA(st,it.anchorNode,it.anchorOffset),ht=tA(st,it.focusNode,it.focusOffset);ct&&ht&&ls(st,function(){Va(st.doc,gA(ct,ht),sn),(ct.bad||ht.bad)&&(st.curOp.selectionChanged=!0)})}}},Es.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var it=this.cm,st=it.display,ct=it.doc.sel.primary(),ht=ct.from(),pt=ct.to();if(ht.ch==0&&ht.line>it.firstLine()&&(ht=Ye(ht.line-1,Ln(it.doc,ht.line-1).length)),pt.ch==Ln(it.doc,pt.line).text.length&&pt.line<it.lastLine()&&(pt=Ye(pt.line+1,0)),ht.line<st.viewFrom||pt.line>st.viewTo-1)return!1;var Nt,Kt,qt;ht.line==st.viewFrom||(Nt=il(it,ht.line))==0?(Kt=se(st.view[0].line),qt=st.view[0].node):(Kt=se(st.view[Nt].line),qt=st.view[Nt-1].node.nextSibling);var Jt=il(it,pt.line),me,en;if(Jt==st.view.length-1?(me=st.viewTo-1,en=st.lineDiv.lastChild):(me=se(st.view[Jt+1].line)-1,en=st.view[Jt+1].node.previousSibling),!qt)return!1;for(var Se=it.doc.splitLines(vu(it,qt,en,Kt,me)),bn=Pe(it.doc,Ye(Kt,0),Ye(me,Ln(it.doc,me).text.length));Se.length>1&&bn.length>1;)if(tn(Se)==tn(bn))Se.pop(),bn.pop(),me--;else if(Se[0]==bn[0])Se.shift(),bn.shift(),Kt++;else break;for(var Pn=0,Ii=0,Hi=Se[0],Ji=bn[0],dr=Math.min(Hi.length,Ji.length);Pn<dr&&Hi.charCodeAt(Pn)==Ji.charCodeAt(Pn);)++Pn;for(var Rr=tn(Se),Er=tn(bn),jr=Math.min(Rr.length-(Se.length==1?Pn:0),Er.length-(bn.length==1?Pn:0));Ii<jr&&Rr.charCodeAt(Rr.length-Ii-1)==Er.charCodeAt(Er.length-Ii-1);)++Ii;if(Se.length==1&&bn.length==1&&Kt==ht.line)for(;Pn&&Pn>ht.ch&&Rr.charCodeAt(Rr.length-Ii-1)==Er.charCodeAt(Er.length-Ii-1);)Pn--,Ii++;Se[Se.length-1]=Rr.slice(0,Rr.length-Ii).replace(/^\u200b+/,""),Se[0]=Se[0].slice(Pn).replace(/\u200b+$/,"");var po=Ye(Kt,Pn),Pr=Ye(me,bn.length?tn(bn).length-Ii:0);if(Se.length>1||Se[0]||Dn(po,Pr))return xh(it.doc,Se,po,Pr,"+input"),!0},Es.prototype.ensurePolled=function(){this.forceCompositionEnd()},Es.prototype.reset=function(){this.forceCompositionEnd()},Es.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Es.prototype.readFromDOMSoon=function(){var it=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(it.readDOMTimeout=null,it.composing)if(it.composing.done)it.composing=null;else return;it.updateFromDOM()},80))},Es.prototype.updateFromDOM=function(){var it=this;(this.cm.isReadOnly()||!this.pollContent())&&ls(this.cm,function(){return Ss(it.cm)})},Es.prototype.setUneditable=function(it){it.contentEditable="false"},Es.prototype.onKeyPress=function(it){it.charCode==0||this.composing||(it.preventDefault(),this.cm.isReadOnly()||ya(this.cm,id)(this.cm,String.fromCharCode(it.charCode==null?it.keyCode:it.charCode),0))},Es.prototype.readOnlyChanged=function(it){this.div.contentEditable=String(it!="nocursor")},Es.prototype.onContextMenu=function(){},Es.prototype.resetPosition=function(){},Es.prototype.needsContentAttribute=!0;function wA(it,st){var ct=Ca(it,st.line);if(!ct||ct.hidden)return null;var ht=Ln(it.doc,st.line),pt=Po(ct,ht,st.line),Nt=Kn(ht,it.doc.direction),Kt="left";if(Nt){var qt=Xe(Nt,st.ch);Kt=qt%2?"right":"left"}var Jt=Ll(pt.map,st.ch,Kt);return Jt.offset=Jt.collapse=="right"?Jt.end:Jt.start,Jt}function Vd(it){for(var st=it;st;st=st.parentNode)if(/CodeMirror-gutter-wrapper/.test(st.className))return!0;return!1}function $s(it,st){return st&&(it.bad=!0),it}function vu(it,st,ct,ht,pt){var Nt="",Kt=!1,qt=it.doc.lineSeparator(),Jt=!1;function me(Pn){return function(Ii){return Ii.id==Pn}}function en(){Kt&&(Nt+=qt,Jt&&(Nt+=qt),Kt=Jt=!1)}function Se(Pn){Pn&&(en(),Nt+=Pn)}function bn(Pn){if(Pn.nodeType==1){var Ii=Pn.getAttribute("cm-text");if(Ii){Se(Ii);return}var Hi=Pn.getAttribute("cm-marker"),Ji;if(Hi){var dr=it.findMarks(Ye(ht,0),Ye(pt+1,0),me(+Hi));dr.length&&(Ji=dr[0].find(0))&&Se(Pe(it.doc,Ji.from,Ji.to).join(qt));return}if(Pn.getAttribute("contenteditable")=="false")return;var Rr=/^(pre|div|p|li|table|br)$/i.test(Pn.nodeName);if(!/^br$/i.test(Pn.nodeName)&&Pn.textContent.length==0)return;Rr&&en();for(var Er=0;Er<Pn.childNodes.length;Er++)bn(Pn.childNodes[Er]);/^(pre|p)$/i.test(Pn.nodeName)&&(Jt=!0),Rr&&(Kt=!0)}else Pn.nodeType==3&&Se(Pn.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;bn(st),st!=ct;)st=st.nextSibling,Jt=!1;return Nt}function tA(it,st,ct){var ht;if(st==it.display.lineDiv){if(ht=it.display.lineDiv.childNodes[ct],!ht)return $s(it.clipPos(Ye(it.display.viewTo-1)),!0);st=null,ct=0}else for(ht=st;;ht=ht.parentNode){if(!ht||ht==it.display.lineDiv)return null;if(ht.parentNode&&ht.parentNode==it.display.lineDiv)break}for(var pt=0;pt<it.display.view.length;pt++){var Nt=it.display.view[pt];if(Nt.node==ht)return xA(Nt,st,ct)}}function xA(it,st,ct){var ht=it.text.firstChild,pt=!1;if(!st||!Ke(ht,st))return $s(Ye(se(it.line),0),!0);if(st==ht&&(pt=!0,st=ht.childNodes[ct],ct=0,!st)){var Nt=it.rest?tn(it.rest):it.line;return $s(Ye(se(Nt),Nt.text.length),pt)}var Kt=st.nodeType==3?st:null,qt=st;for(!Kt&&st.childNodes.length==1&&st.firstChild.nodeType==3&&(Kt=st.firstChild,ct&&(ct=Kt.nodeValue.length));qt.parentNode!=ht;)qt=qt.parentNode;var Jt=it.measure,me=Jt.maps;function en(Ji,dr,Rr){for(var Er=-1;Er<(me?me.length:0);Er++)for(var jr=Er<0?Jt.map:me[Er],po=0;po<jr.length;po+=3){var Pr=jr[po+2];if(Pr==Ji||Pr==dr){var No=se(Er<0?it.line:it.rest[Er]),_s=jr[po]+Rr;return(Rr<0||Pr!=Ji)&&(_s=jr[po+(Rr?1:0)]),Ye(No,_s)}}}var Se=en(Kt,qt,ct);if(Se)return $s(Se,pt);for(var bn=qt.nextSibling,Pn=Kt?Kt.nodeValue.length-ct:0;bn;bn=bn.nextSibling){if(Se=en(bn,bn.firstChild,0),Se)return $s(Ye(Se.line,Se.ch-Pn),pt);Pn+=bn.textContent.length}for(var Ii=qt.previousSibling,Hi=ct;Ii;Ii=Ii.previousSibling){if(Se=en(Ii,Ii.firstChild,-1),Se)return $s(Ye(Se.line,Se.ch+Hi),pt);Hi+=Ii.textContent.length}}var Hs=function(it){this.cm=it,this.prevInput="",this.pollingFast=!1,this.polling=new ne,this.hasSelection=!1,this.composing=null};Hs.prototype.init=function(it){var st=this,ct=this,ht=this.cm;this.createField(it);var pt=this.textarea;it.wrapper.insertBefore(this.wrapper,it.wrapper.firstChild),Qt&&(pt.style.width="0px"),be(pt,"input",function(){de&&Ht>=9&&st.hasSelection&&(st.hasSelection=null),ct.poll()}),be(pt,"paste",function(Kt){Vn(ht,Kt)||sc(Kt,ht)||(ht.state.pasteIncoming=+new Date,ct.fastPoll())});function Nt(Kt){if(!Vn(ht,Kt)){if(ht.somethingSelected())WA({lineWise:!1,text:ht.getSelections()});else if(ht.options.lineWiseCopyCut){var qt=Gd(ht);WA({lineWise:!0,text:qt.text}),Kt.type=="cut"?ht.setSelections(qt.ranges,null,sn):(ct.prevInput="",pt.value=qt.text.join(`
`),xn(pt))}else return;Kt.type=="cut"&&(ht.state.cutIncoming=+new Date)}}be(pt,"cut",Nt),be(pt,"copy",Nt),be(it.scroller,"paste",function(Kt){if(!(os(it,Kt)||Vn(ht,Kt))){if(!pt.dispatchEvent){ht.state.pasteIncoming=+new Date,ct.focus();return}var qt=new Event("paste");qt.clipboardData=Kt.clipboardData,pt.dispatchEvent(qt)}}),be(it.lineSpace,"selectstart",function(Kt){os(it,Kt)||Ei(Kt)}),be(pt,"compositionstart",function(){var Kt=ht.getCursor("from");ct.composing&&ct.composing.range.clear(),ct.composing={start:Kt,range:ht.markText(Kt,ht.getCursor("to"),{className:"CodeMirror-composing"})}}),be(pt,"compositionend",function(){ct.composing&&(ct.poll(),ct.composing.range.clear(),ct.composing=null)})},Hs.prototype.createField=function(it){this.wrapper=Nf(),this.textarea=this.wrapper.firstChild},Hs.prototype.screenReaderLabelChanged=function(it){it?this.textarea.setAttribute("aria-label",it):this.textarea.removeAttribute("aria-label")},Hs.prototype.prepareSelection=function(){var it=this.cm,st=it.display,ct=it.doc,ht=Wu(it);if(it.options.moveInputWithCursor){var pt=Uo(it,ct.sel.primary().head,"div"),Nt=st.wrapper.getBoundingClientRect(),Kt=st.lineDiv.getBoundingClientRect();ht.teTop=Math.max(0,Math.min(st.wrapper.clientHeight-10,pt.top+Kt.top-Nt.top)),ht.teLeft=Math.max(0,Math.min(st.wrapper.clientWidth-10,pt.left+Kt.left-Nt.left))}return ht},Hs.prototype.showSelection=function(it){var st=this.cm,ct=st.display;Yt(ct.cursorDiv,it.cursors),Yt(ct.selectionDiv,it.selection),it.teTop!=null&&(this.wrapper.style.top=it.teTop+"px",this.wrapper.style.left=it.teLeft+"px")},Hs.prototype.reset=function(it){if(!(this.contextMenuPending||this.composing)){var st=this.cm;if(st.somethingSelected()){this.prevInput="";var ct=st.getSelection();this.textarea.value=ct,st.state.focused&&xn(this.textarea),de&&Ht>=9&&(this.hasSelection=ct)}else it||(this.prevInput=this.textarea.value="",de&&Ht>=9&&(this.hasSelection=null))}},Hs.prototype.getField=function(){return this.textarea},Hs.prototype.supportsTouch=function(){return!1},Hs.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!et||_e()!=this.textarea))try{this.textarea.focus()}catch(it){}},Hs.prototype.blur=function(){this.textarea.blur()},Hs.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Hs.prototype.receivedFocus=function(){this.slowPoll()},Hs.prototype.slowPoll=function(){var it=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){it.poll(),it.cm.state.focused&&it.slowPoll()})},Hs.prototype.fastPoll=function(){var it=!1,st=this;st.pollingFast=!0;function ct(){var ht=st.poll();!ht&&!it?(it=!0,st.polling.set(60,ct)):(st.pollingFast=!1,st.slowPoll())}st.polling.set(20,ct)},Hs.prototype.poll=function(){var it=this,st=this.cm,ct=this.textarea,ht=this.prevInput;if(this.contextMenuPending||!st.state.focused||kt(ct)&&!ht&&!this.composing||st.isReadOnly()||st.options.disableInput||st.state.keySeq)return!1;var pt=ct.value;if(pt==ht&&!st.somethingSelected())return!1;if(de&&Ht>=9&&this.hasSelection===pt||At&&/[\uf700-\uf7ff]/.test(pt))return st.display.input.reset(),!1;if(st.doc.sel==st.display.selForContextMenu){var Nt=pt.charCodeAt(0);if(Nt==8203&&!ht&&(ht="\u200B"),Nt==8666)return this.reset(),this.cm.execCommand("undo")}for(var Kt=0,qt=Math.min(ht.length,pt.length);Kt<qt&&ht.charCodeAt(Kt)==pt.charCodeAt(Kt);)++Kt;return ls(st,function(){id(st,pt.slice(Kt),ht.length-Kt,null,it.composing?"*compose":null),pt.length>1e3||pt.indexOf(`
`)>-1?ct.value=it.prevInput="":it.prevInput=pt,it.composing&&(it.composing.range.clear(),it.composing.range=st.markText(it.composing.start,st.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},Hs.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Hs.prototype.onKeyPress=function(){de&&Ht>=9&&(this.hasSelection=null),this.fastPoll()},Hs.prototype.onContextMenu=function(it){var st=this,ct=st.cm,ht=ct.display,pt=st.textarea;st.contextMenuPending&&st.contextMenuPending();var Nt=Pa(ct,it),Kt=ht.scroller.scrollTop;if(!Nt||Gt)return;var qt=ct.options.resetSelectionOnContextMenu;qt&&ct.doc.sel.contains(Nt)==-1&&ya(ct,Va)(ct.doc,gA(Nt),sn);var Jt=pt.style.cssText,me=st.wrapper.style.cssText,en=st.wrapper.offsetParent.getBoundingClientRect();st.wrapper.style.cssText="position: static",pt.style.cssText=`position: absolute; width: 30px; height: 30px;
top: `+(it.clientY-en.top-5)+"px; left: "+(it.clientX-en.left-5)+`px;
z-index: 1000; background: `+(de?"rgba(255, 255, 255, .05)":"transparent")+`;
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var Se;ie&&(Se=window.scrollY),ht.input.focus(),ie&&window.scrollTo(null,Se),ht.input.reset(),ct.somethingSelected()||(pt.value=st.prevInput=" "),st.contextMenuPending=Pn,ht.selForContextMenu=ct.doc.sel,clearTimeout(ht.detectingSelectAll);function bn(){if(pt.selectionStart!=null){var Hi=ct.somethingSelected(),Ji="\u200B"+(Hi?pt.value:"");pt.value="\u21DA",pt.value=Ji,st.prevInput=Hi?"":"\u200B",pt.selectionStart=1,pt.selectionEnd=Ji.length,ht.selForContextMenu=ct.doc.sel}}function Pn(){if(st.contextMenuPending==Pn&&(st.contextMenuPending=!1,st.wrapper.style.cssText=me,pt.style.cssText=Jt,de&&Ht<9&&ht.scrollbars.setScrollTop(ht.scroller.scrollTop=Kt),pt.selectionStart!=null)){(!de||de&&Ht<9)&&bn();var Hi=0,Ji=function(){ht.selForContextMenu==ct.doc.sel&&pt.selectionStart==0&&pt.selectionEnd>0&&st.prevInput=="\u200B"?ya(ct,la)(ct):Hi++<10?ht.detectingSelectAll=setTimeout(Ji,500):(ht.selForContextMenu=null,ht.input.reset())};ht.detectingSelectAll=setTimeout(Ji,200)}}if(de&&Ht>=9&&bn(),bt){ar(it);var Ii=function(){kn(window,"mouseup",Ii),setTimeout(Pn,20)};be(window,"mouseup",Ii)}else setTimeout(Pn,50)},Hs.prototype.readOnlyChanged=function(it){it||this.reset(),this.textarea.disabled=it=="nocursor",this.textarea.readOnly=!!it},Hs.prototype.setUneditable=function(){},Hs.prototype.needsContentAttribute=!1;function uc(it,st){if(st=st?Xn(st):{},st.value=it.value,!st.tabindex&&it.tabIndex&&(st.tabindex=it.tabIndex),!st.placeholder&&it.placeholder&&(st.placeholder=it.placeholder),st.autofocus==null){var ct=_e();st.autofocus=ct==it||it.getAttribute("autofocus")!=null&&ct==document.body}function ht(){it.value=qt.getValue()}var pt;if(it.form&&(be(it.form,"submit",ht),!st.leaveSubmitMethodAlone)){var Nt=it.form;pt=Nt.submit;try{var Kt=Nt.submit=function(){ht(),Nt.submit=pt,Nt.submit(),Nt.submit=Kt}}catch(Jt){}}st.finishInit=function(Jt){Jt.save=ht,Jt.getTextArea=function(){return it},Jt.toTextArea=function(){Jt.toTextArea=isNaN,ht(),it.parentNode.removeChild(Jt.getWrapperElement()),it.style.display="",it.form&&(kn(it.form,"submit",ht),!st.leaveSubmitMethodAlone&&typeof it.form.submit=="function"&&(it.form.submit=pt))}},it.style.display="none";var qt=Jo(function(Jt){return it.parentNode.insertBefore(Jt,it.nextSibling)},st);return qt}function Yl(it){it.off=kn,it.on=be,it.wheelEventPixels=Nl,it.Doc=Na,it.splitLines=kr,it.countColumn=pe,it.findColumn=Ti,it.isWordChar=vt,it.Pass=ai,it.signal=On,it.Line=Fr,it.changeEnd=OA,it.scrollbarModel=Xu,it.Pos=Ye,it.cmpPos=Dn,it.modes=Li,it.mimeModes=Ui,it.resolveMode=an,it.getMode=rn,it.modeExtensions=Ge,it.extendMode=yn,it.copyState=ji,it.startState=or,it.innerMode=Mi,it.commands=jA,it.keyMap=Dl,it.keyName=Sf,it.isModifierKey=Jh,it.lookupKey=Wl,it.normalizeKeyMap=xf,it.StringStream=ln,it.SharedTextMarker=Iu,it.TextMarker=Re,it.LineWidget=mA,it.e_preventDefault=Ei,it.e_stopPropagation=qi,it.e_stop=ar,it.addClass=nn,it.contains=Ke,it.rmClass=Rt,it.keyNames=$u}mg(Jo),yA(Jo);var eA="iter insert remove copy getEditor constructor".split(" ");for(var Ac in Na.prototype)Na.prototype.hasOwnProperty(Ac)&&pn(eA,Ac)<0&&(Jo.prototype[Ac]=function(it){return function(){return it.apply(this.doc,arguments)}}(Na.prototype[Ac]));return yi(Na),Jo.inputStyles={textarea:Hs,contenteditable:Es},Jo.defineMode=function(it){!Jo.defaults.mode&&it!="null"&&(Jo.defaults.mode=it),Ri.apply(this,arguments)},Jo.defineMIME=Lr,Jo.defineMode("null",function(){return{token:function(it){return it.skipToEnd()}}}),Jo.defineMIME("text/plain","null"),Jo.defineExtension=function(it,st){Jo.prototype[it]=st},Jo.defineDocExtension=function(it,st){Na.prototype[it]=st},Jo.fromTextArea=uc,Yl(Jo),Jo.version="5.58.2",Jo})},25419:function(Sn,Ve,It){(function(St){St(It(89780),It(15525),It(98101))})(function(St){"use strict";St.defineMode("markdown",function(Wt,le){var ve=St.getMode(Wt,"text/html"),de=ve.name=="null";function Ht(pe){if(St.findModeByName){var ne=St.findModeByName(pe);ne&&(pe=ne.mime||ne.mimes[0])}var pn=St.getMode(Wt,pe);return pn.name=="null"?null:pn}le.highlightFormatting===void 0&&(le.highlightFormatting=!1),le.maxBlockquoteDepth===void 0&&(le.maxBlockquoteDepth=0),le.taskLists===void 0&&(le.taskLists=!1),le.strikethrough===void 0&&(le.strikethrough=!1),le.emoji===void 0&&(le.emoji=!1),le.fencedCodeBlockHighlighting===void 0&&(le.fencedCodeBlockHighlighting=!0),le.fencedCodeBlockDefaultMode===void 0&&(le.fencedCodeBlockDefaultMode="text/plain"),le.xml===void 0&&(le.xml=!0),le.tokenTypeOverrides===void 0&&(le.tokenTypeOverrides={});var ie={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 oe in ie)ie.hasOwnProperty(oe)&&le.tokenTypeOverrides[oe]&&(ie[oe]=le.tokenTypeOverrides[oe]);var he=/^([*\-_])(?:\s*\1){2,}\s*$/,Gt=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,Ie=/^\[(x| )\](?=\s)/i,Xt=le.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,Me=/^ {0,3}(?:\={1,}|-{2,})\s*$/,Qt=/^[^#!\[\]*_\\<>` "'(~:]+/,nt=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,et=/^\s*\[[^\]]+?\]:.*$/,At=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,at=" ";function dt(pe,ne,pn){return ne.f=ne.inline=pn,pn(pe,ne)}function gt(pe,ne,pn){return ne.f=ne.block=pn,pn(pe,ne)}function xt(pe){return!pe||!/\S/.test(pe.string)}function bt(pe){if(pe.linkTitle=!1,pe.linkHref=!1,pe.linkText=!1,pe.em=!1,pe.strong=!1,pe.strikethrough=!1,pe.quote=0,pe.indentedCode=!1,pe.f==Rt){var ne=de;if(!ne){var pn=St.innerMode(ve,pe.htmlState);ne=pn.mode.name=="xml"&&pn.state.tagStart===null&&!pn.state.context&&pn.state.tokenize.isInText}ne&&(pe.f=ye,pe.block=Ut,pe.htmlState=null)}return pe.trailingSpace=0,pe.trailingSpaceNewLine=!1,pe.prevLine=pe.thisLine,pe.thisLine={stream:null},null}function Ut(pe,ne){var pn=pe.column()===ne.indentation,Ai=xt(ne.prevLine.stream),ai=ne.indentedCode,sn=ne.prevLine.hr,Qn=ne.list!==!1,jn=(ne.listStack[ne.listStack.length-1]||0)+3;ne.indentedCode=!1;var Ti=ne.indentation;if(ne.indentationDiff===null&&(ne.indentationDiff=ne.indentation,Qn)){for(ne.list=null;Ti<ne.listStack[ne.listStack.length-1];)ne.listStack.pop(),ne.listStack.length?ne.indentation=ne.listStack[ne.listStack.length-1]:ne.list=!1;ne.list!==!1&&(ne.indentationDiff=Ti-ne.listStack[ne.listStack.length-1])}var $e=!Ai&&!sn&&!ne.prevLine.header&&(!Qn||!ai)&&!ne.prevLine.fencedCodeEnd,Le=(ne.list===!1||sn||Ai)&&ne.indentation<=jn&&pe.match(he),tn=null;if(ne.indentationDiff>=4&&(ai||ne.prevLine.fencedCodeEnd||ne.prevLine.header||Ai))return pe.skipToEnd(),ne.indentedCode=!0,ie.code;if(pe.eatSpace())return null;if(pn&&ne.indentation<=jn&&(tn=pe.match(Xt))&&tn[1].length<=6)return ne.quote=0,ne.header=tn[1].length,ne.thisLine.header=!0,le.highlightFormatting&&(ne.formatting="header"),ne.f=ne.inline,Yt(ne);if(ne.indentation<=jn&&pe.eat(">"))return ne.quote=pn?1:ne.quote+1,le.highlightFormatting&&(ne.formatting="quote"),pe.eatSpace(),Yt(ne);if(!Le&&!ne.setext&&pn&&ne.indentation<=jn&&(tn=pe.match(Gt))){var hi=tn[1]?"ol":"ul";return ne.indentation=Ti+pe.current().length,ne.list=!0,ne.quote=0,ne.listStack.push(ne.indentation),ne.em=!1,ne.strong=!1,ne.code=!1,ne.strikethrough=!1,le.taskLists&&pe.match(Ie,!1)&&(ne.taskList=!0),ne.f=ne.inline,le.highlightFormatting&&(ne.formatting=["list","list-"+hi]),Yt(ne)}else{if(pn&&ne.indentation<=jn&&(tn=pe.match(nt,!0)))return ne.quote=0,ne.fencedEndRE=new RegExp(tn[1]+"+ *$"),ne.localMode=le.fencedCodeBlockHighlighting&&Ht(tn[2]||le.fencedCodeBlockDefaultMode),ne.localMode&&(ne.localState=St.startState(ne.localMode)),ne.f=ne.block=Zt,le.highlightFormatting&&(ne.formatting="code-block"),ne.code=-1,Yt(ne);if(ne.setext||(!$e||!Qn)&&!ne.quote&&ne.list===!1&&!ne.code&&!Le&&!et.test(pe.string)&&(tn=pe.lookAhead(1))&&(tn=tn.match(Me)))return ne.setext?(ne.header=ne.setext,ne.setext=0,pe.skipToEnd(),le.highlightFormatting&&(ne.formatting="header")):(ne.header=tn[0].charAt(0)=="="?1:2,ne.setext=ne.header),ne.thisLine.header=!0,ne.f=ne.inline,Yt(ne);if(Le)return pe.skipToEnd(),ne.hr=!0,ne.thisLine.hr=!0,ie.hr;if(pe.peek()==="[")return dt(pe,ne,fn)}return dt(pe,ne,ne.inline)}function Rt(pe,ne){var pn=ve.token(pe,ne.htmlState);if(!de){var Ai=St.innerMode(ve,ne.htmlState);(Ai.mode.name=="xml"&&Ai.state.tagStart===null&&!Ai.state.context&&Ai.state.tokenize.isInText||ne.md_inside&&pe.current().indexOf(">")>-1)&&(ne.f=ye,ne.block=Ut,ne.htmlState=null)}return pn}function Zt(pe,ne){var pn=ne.listStack[ne.listStack.length-1]||0,Ai=ne.indentation<pn,ai=pn+3;if(ne.fencedEndRE&&ne.indentation<=ai&&(Ai||pe.match(ne.fencedEndRE))){le.highlightFormatting&&(ne.formatting="code-block");var sn;return Ai||(sn=Yt(ne)),ne.localMode=ne.localState=null,ne.block=Ut,ne.f=ye,ne.fencedEndRE=null,ne.code=0,ne.thisLine.fencedCodeEnd=!0,Ai?gt(pe,ne,ne.block):sn}else return ne.localMode?ne.localMode.token(pe,ne.localState):(pe.skipToEnd(),ie.code)}function Yt(pe){var ne=[];if(pe.formatting){ne.push(ie.formatting),typeof pe.formatting=="string"&&(pe.formatting=[pe.formatting]);for(var pn=0;pn<pe.formatting.length;pn++)ne.push(ie.formatting+"-"+pe.formatting[pn]),pe.formatting[pn]==="header"&&ne.push(ie.formatting+"-"+pe.formatting[pn]+"-"+pe.header),pe.formatting[pn]==="quote"&&(!le.maxBlockquoteDepth||le.maxBlockquoteDepth>=pe.quote?ne.push(ie.formatting+"-"+pe.formatting[pn]+"-"+pe.quote):ne.push("error"))}if(pe.taskOpen)return ne.push("meta"),ne.length?ne.join(" "):null;if(pe.taskClosed)return ne.push("property"),ne.length?ne.join(" "):null;if(pe.linkHref?ne.push(ie.linkHref,"url"):(pe.strong&&ne.push(ie.strong),pe.em&&ne.push(ie.em),pe.strikethrough&&ne.push(ie.strikethrough),pe.emoji&&ne.push(ie.emoji),pe.linkText&&ne.push(ie.linkText),pe.code&&ne.push(ie.code),pe.image&&ne.push(ie.image),pe.imageAltText&&ne.push(ie.imageAltText,"link"),pe.imageMarker&&ne.push(ie.imageMarker)),pe.header&&ne.push(ie.header,ie.header+"-"+pe.header),pe.quote&&(ne.push(ie.quote),!le.maxBlockquoteDepth||le.maxBlockquoteDepth>=pe.quote?ne.push(ie.quote+"-"+pe.quote):ne.push(ie.quote+"-"+le.maxBlockquoteDepth)),pe.list!==!1){var Ai=(pe.listStack.length-1)%3;Ai?Ai===1?ne.push(ie.list2):ne.push(ie.list3):ne.push(ie.list1)}return pe.trailingSpaceNewLine?ne.push("trailing-space-new-line"):pe.trailingSpace&&ne.push("trailing-space-"+(pe.trailingSpace%2?"a":"b")),ne.length?ne.join(" "):null}function te(pe,ne){if(pe.match(Qt,!0))return Yt(ne)}function ye(pe,ne){var pn=ne.text(pe,ne);if(typeof pn!="undefined")return pn;if(ne.list)return ne.list=null,Yt(ne);if(ne.taskList){var Ai=pe.match(Ie,!0)[1]===" ";return Ai?ne.taskOpen=!0:ne.taskClosed=!0,le.highlightFormatting&&(ne.formatting="task"),ne.taskList=!1,Yt(ne)}if(ne.taskOpen=!1,ne.taskClosed=!1,ne.header&&pe.match(/^#+$/,!0))return le.highlightFormatting&&(ne.formatting="header"),Yt(ne);var ai=pe.next();if(ne.linkTitle){ne.linkTitle=!1;var sn=ai;ai==="("&&(sn=")"),sn=(sn+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var Qn="^\\s*(?:[^"+sn+"\\\\]+|\\\\\\\\|\\\\.)"+sn;if(pe.match(new RegExp(Qn),!0))return ie.linkHref}if(ai==="`"){var jn=ne.formatting;le.highlightFormatting&&(ne.formatting="code"),pe.eatWhile("`");var Ti=pe.current().length;if(ne.code==0&&(!ne.quote||Ti==1))return ne.code=Ti,Yt(ne);if(Ti==ne.code){var $e=Yt(ne);return ne.code=0,$e}else return ne.formatting=jn,Yt(ne)}else if(ne.code)return Yt(ne);if(ai==="\\"&&(pe.next(),le.highlightFormatting)){var Le=Yt(ne),tn=ie.formatting+"-escape";return Le?Le+" "+tn:tn}if(ai==="!"&&pe.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ne.imageMarker=!0,ne.image=!0,le.highlightFormatting&&(ne.formatting="image"),Yt(ne);if(ai==="["&&ne.imageMarker&&pe.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ne.imageMarker=!1,ne.imageAltText=!0,le.highlightFormatting&&(ne.formatting="image"),Yt(ne);if(ai==="]"&&ne.imageAltText){le.highlightFormatting&&(ne.formatting="image");var Le=Yt(ne);return ne.imageAltText=!1,ne.image=!1,ne.inline=ne.f=Ke,Le}if(ai==="["&&!ne.image)return ne.linkText&&pe.match(/^.*?\]/)||(ne.linkText=!0,le.highlightFormatting&&(ne.formatting="link")),Yt(ne);if(ai==="]"&&ne.linkText){le.highlightFormatting&&(ne.formatting="link");var Le=Yt(ne);return ne.linkText=!1,ne.inline=ne.f=pe.match(/\(.*?\)| ?\[.*?\]/,!1)?Ke:ye,Le}if(ai==="<"&&pe.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=fe,le.highlightFormatting&&(ne.formatting="link");var Le=Yt(ne);return Le?Le+=" ":Le="",Le+ie.linkInline}if(ai==="<"&&pe.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ne.f=ne.inline=fe,le.highlightFormatting&&(ne.formatting="link");var Le=Yt(ne);return Le?Le+=" ":Le="",Le+ie.linkEmail}if(le.xml&&ai==="<"&&pe.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var hi=pe.string.indexOf(">",pe.pos);if(hi!=-1){var ni=pe.string.substring(pe.start,hi);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(ni)&&(ne.md_inside=!0)}return pe.backUp(1),ne.htmlState=St.startState(ve),gt(pe,ne,Rt)}if(le.xml&&ai==="<"&&pe.match(/^\/\w*?>/))return ne.md_inside=!1,"tag";if(ai==="*"||ai==="_"){for(var zt=1,Ft=pe.pos==1?" ":pe.string.charAt(pe.pos-2);zt<3&&pe.eat(ai);)zt++;var mt=pe.peek()||" ",vt=!/\s/.test(mt)&&(!At.test(mt)||/\s/.test(Ft)||At.test(Ft)),Et=!/\s/.test(Ft)&&(!At.test(Ft)||/\s/.test(mt)||At.test(mt)),Ct=null,_t=null;if(zt%2&&(!ne.em&&vt&&(ai==="*"||!Et||At.test(Ft))?Ct=!0:ne.em==ai&&Et&&(ai==="*"||!vt||At.test(mt))&&(Ct=!1)),zt>1&&(!ne.strong&&vt&&(ai==="*"||!Et||At.test(Ft))?_t=!0:ne.strong==ai&&Et&&(ai==="*"||!vt||At.test(mt))&&(_t=!1)),_t!=null||Ct!=null){le.highlightFormatting&&(ne.formatting=Ct==null?"strong":_t==null?"em":"strong em"),Ct===!0&&(ne.em=ai),_t===!0&&(ne.strong=ai);var $e=Yt(ne);return Ct===!1&&(ne.em=!1),_t===!1&&(ne.strong=!1),$e}}else if(ai===" "&&(pe.eat("*")||pe.eat("_"))){if(pe.peek()===" ")return Yt(ne);pe.backUp(1)}if(le.strikethrough){if(ai==="~"&&pe.eatWhile(ai)){if(ne.strikethrough){le.highlightFormatting&&(ne.formatting="strikethrough");var $e=Yt(ne);return ne.strikethrough=!1,$e}else if(pe.match(/^[^\s]/,!1))return ne.strikethrough=!0,le.highlightFormatting&&(ne.formatting="strikethrough"),Yt(ne)}else if(ai===" "&&pe.match(/^~~/,!0)){if(pe.peek()===" ")return Yt(ne);pe.backUp(2)}}if(le.emoji&&ai===":"&&pe.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ne.emoji=!0,le.highlightFormatting&&(ne.formatting="emoji");var Ce=Yt(ne);return ne.emoji=!1,Ce}return ai===" "&&(pe.match(/^ +$/,!1)?ne.trailingSpace++:ne.trailingSpace&&(ne.trailingSpaceNewLine=!0)),Yt(ne)}function fe(pe,ne){var pn=pe.next();if(pn===">"){ne.f=ne.inline=ye,le.highlightFormatting&&(ne.formatting="link");var Ai=Yt(ne);return Ai?Ai+=" ":Ai="",Ai+ie.linkInline}return pe.match(/^[^>]+/,!0),ie.linkInline}function Ke(pe,ne){if(pe.eatSpace())return null;var pn=pe.next();return pn==="("||pn==="["?(ne.f=ne.inline=nn(pn==="("?")":"]"),le.highlightFormatting&&(ne.formatting="link-string"),ne.linkHref=!0,Yt(ne)):"error"}var _e={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function nn(pe){return function(ne,pn){var Ai=ne.next();if(Ai===pe){pn.f=pn.inline=ye,le.highlightFormatting&&(pn.formatting="link-string");var ai=Yt(pn);return pn.linkHref=!1,ai}return ne.match(_e[pe]),pn.linkHref=!0,Yt(pn)}}function fn(pe,ne){return pe.match(/^([^\]\\]|\\.)*\]:/,!1)?(ne.f=xn,pe.next(),le.highlightFormatting&&(ne.formatting="link"),ne.linkText=!0,Yt(ne)):dt(pe,ne,ye)}function xn(pe,ne){if(pe.match(/^\]:/,!0)){ne.f=ne.inline=_n,le.highlightFormatting&&(ne.formatting="link");var pn=Yt(ne);return ne.linkText=!1,pn}return pe.match(/^([^\]\\]|\\.)+/,!0),ie.linkText}function _n(pe,ne){return pe.eatSpace()?null:(pe.match(/^[^\s]+/,!0),pe.peek()===void 0?ne.linkTitle=!0:pe.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ne.f=ne.inline=ye,ie.linkHref+" url")}var Xn={startState:function(){return{f:Ut,prevLine:{stream:null},thisLine:{stream:null},block:Ut,htmlState:null,indentation:0,inline:ye,text:te,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(pe){return{f:pe.f,prevLine:pe.prevLine,thisLine:pe.thisLine,block:pe.block,htmlState:pe.htmlState&&St.copyState(ve,pe.htmlState),indentation:pe.indentation,localMode:pe.localMode,localState:pe.localMode?St.copyState(pe.localMode,pe.localState):null,inline:pe.inline,text:pe.text,formatting:!1,linkText:pe.linkText,linkTitle:pe.linkTitle,linkHref:pe.linkHref,code:pe.code,em:pe.em,strong:pe.strong,strikethrough:pe.strikethrough,emoji:pe.emoji,header:pe.header,setext:pe.setext,hr:pe.hr,taskList:pe.taskList,list:pe.list,listStack:pe.listStack.slice(0),quote:pe.quote,indentedCode:pe.indentedCode,trailingSpace:pe.trailingSpace,trailingSpaceNewLine:pe.trailingSpaceNewLine,md_inside:pe.md_inside,fencedEndRE:pe.fencedEndRE}},token:function(pe,ne){if(ne.formatting=!1,pe!=ne.thisLine.stream){if(ne.header=0,ne.hr=!1,pe.match(/^\s*$/,!0))return bt(ne),null;if(ne.prevLine=ne.thisLine,ne.thisLine={stream:pe},ne.taskList=!1,ne.trailingSpace=0,ne.trailingSpaceNewLine=!1,!ne.localState&&(ne.f=ne.block,ne.f!=Rt)){var pn=pe.match(/^\s*/,!0)[0].replace(/\t/g,at).length;if(ne.indentation=pn,ne.indentationDiff=null,pn>0)return null}}return ne.f(pe,ne)},innerMode:function(pe){return pe.block==Rt?{state:pe.htmlState,mode:ve}:pe.localState?{state:pe.localState,mode:pe.localMode}:{state:pe,mode:Xn}},indent:function(pe,ne,pn){return pe.block==Rt&&ve.indent?ve.indent(pe.htmlState,ne,pn):pe.localState&&pe.localMode.indent?pe.localMode.indent(pe.localState,ne,pn):St.Pass},blankLine:bt,getType:Yt,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return Xn},"xml"),St.defineMIME("text/markdown","markdown"),St.defineMIME("text/x-markdown","markdown")})},98101:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){"use strict";St.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 Wt=0;Wt<St.modeInfo.length;Wt++){var le=St.modeInfo[Wt];le.mimes&&(le.mime=le.mimes[0])}St.findModeByMIME=function(ve){ve=ve.toLowerCase();for(var de=0;de<St.modeInfo.length;de++){var Ht=St.modeInfo[de];if(Ht.mime==ve)return Ht;if(Ht.mimes){for(var ie=0;ie<Ht.mimes.length;ie++)if(Ht.mimes[ie]==ve)return Ht}}if(/\+xml$/.test(ve))return St.findModeByMIME("application/xml");if(/\+json$/.test(ve))return St.findModeByMIME("application/json")},St.findModeByExtension=function(ve){ve=ve.toLowerCase();for(var de=0;de<St.modeInfo.length;de++){var Ht=St.modeInfo[de];if(Ht.ext){for(var ie=0;ie<Ht.ext.length;ie++)if(Ht.ext[ie]==ve)return Ht}}},St.findModeByFileName=function(ve){for(var de=0;de<St.modeInfo.length;de++){var Ht=St.modeInfo[de];if(Ht.file&&Ht.file.test(ve))return Ht}var ie=ve.lastIndexOf("."),oe=ie>-1&&ve.substring(ie+1,ve.length);if(oe)return St.findModeByExtension(oe)},St.findModeByName=function(ve){ve=ve.toLowerCase();for(var de=0;de<St.modeInfo.length;de++){var Ht=St.modeInfo[de];if(Ht.name.toLowerCase()==ve)return Ht;if(Ht.alias){for(var ie=0;ie<Ht.alias.length;ie++)if(Ht.alias[ie].toLowerCase()==ve)return Ht}}}})},67549:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){"use strict";St.defineMode("stex",function(Wt,le){"use strict";function ve(Qt,nt){Qt.cmdState.push(nt)}function de(Qt){return Qt.cmdState.length>0?Qt.cmdState[Qt.cmdState.length-1]:null}function Ht(Qt){var nt=Qt.cmdState.pop();nt&&nt.closeBracket()}function ie(Qt){for(var nt=Qt.cmdState,et=nt.length-1;et>=0;et--){var At=nt[et];if(At.name!="DEFAULT")return At}return{styleIdentifier:function(){return null}}}function oe(Qt,nt,et){return function(){this.name=Qt,this.bracketNo=0,this.style=nt,this.styles=et,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var he={};he.importmodule=oe("importmodule","tag",["string","builtin"]),he.documentclass=oe("documentclass","tag",["","atom"]),he.usepackage=oe("usepackage","tag",["atom"]),he.begin=oe("begin","tag",["atom"]),he.end=oe("end","tag",["atom"]),he.label=oe("label","tag",["atom"]),he.ref=oe("ref","tag",["atom"]),he.eqref=oe("eqref","tag",["atom"]),he.cite=oe("cite","tag",["atom"]),he.bibitem=oe("bibitem","tag",["atom"]),he.Bibitem=oe("Bibitem","tag",["atom"]),he.RBibitem=oe("RBibitem","tag",["atom"]),he.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function Gt(Qt,nt){Qt.f=nt}function Ie(Qt,nt){var et;if(Qt.match(/^\\[a-zA-Z@]+/)){var At=Qt.current().slice(1);return et=he.hasOwnProperty(At)?he[At]:he.DEFAULT,et=new et,ve(nt,et),Gt(nt,Me),et.style}if(Qt.match(/^\\[$&%#{}_]/)||Qt.match(/^\\[,;!\/\\]/))return"tag";if(Qt.match("\\["))return Gt(nt,function(dt,gt){return Xt(dt,gt,"\\]")}),"keyword";if(Qt.match("\\("))return Gt(nt,function(dt,gt){return Xt(dt,gt,"\\)")}),"keyword";if(Qt.match("$$"))return Gt(nt,function(dt,gt){return Xt(dt,gt,"$$")}),"keyword";if(Qt.match("$"))return Gt(nt,function(dt,gt){return Xt(dt,gt,"$")}),"keyword";var at=Qt.next();if(at=="%")return Qt.skipToEnd(),"comment";if(at=="}"||at=="]"){if(et=de(nt),et)et.closeBracket(at),Gt(nt,Me);else return"error";return"bracket"}else return at=="{"||at=="["?(et=he.DEFAULT,et=new et,ve(nt,et),"bracket"):/\d/.test(at)?(Qt.eatWhile(/[\w.%]/),"atom"):(Qt.eatWhile(/[\w\-_]/),et=ie(nt),et.name=="begin"&&(et.argument=Qt.current()),et.styleIdentifier())}function Xt(Qt,nt,et){if(Qt.eatSpace())return null;if(et&&Qt.match(et))return Gt(nt,Ie),"keyword";if(Qt.match(/^\\[a-zA-Z@]+/))return"tag";if(Qt.match(/^[a-zA-Z]+/))return"variable-2";if(Qt.match(/^\\[$&%#{}_]/)||Qt.match(/^\\[,;!\/]/)||Qt.match(/^[\^_&]/))return"tag";if(Qt.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(Qt.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var At=Qt.next();return At=="{"||At=="}"||At=="["||At=="]"||At=="("||At==")"?"bracket":At=="%"?(Qt.skipToEnd(),"comment"):"error"}function Me(Qt,nt){var et=Qt.peek(),At;return et=="{"||et=="["?(At=de(nt),At.openBracket(et),Qt.eat(et),Gt(nt,Ie),"bracket"):/[ \t\r]/.test(et)?(Qt.eat(et),null):(Gt(nt,Ie),Ht(nt),Ie(Qt,nt))}return{startState:function(){var Qt=le.inMathMode?function(nt,et){return Xt(nt,et)}:Ie;return{cmdState:[],f:Qt}},copyState:function(Qt){return{cmdState:Qt.cmdState.slice(),f:Qt.f}},token:function(Qt,nt){return nt.f(Qt,nt)},blankLine:function(Qt){Qt.f=Ie,Qt.cmdState.length=0},lineComment:"%"}}),St.defineMIME("text/x-stex","stex"),St.defineMIME("text/x-latex","stex")})},15525:function(Sn,Ve,It){(function(St){St(It(89780))})(function(St){"use strict";var Wt={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},le={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};St.defineMode("xml",function(ve,de){var Ht=ve.indentUnit,ie={},oe=de.htmlMode?Wt:le;for(var he in oe)ie[he]=oe[he];for(var he in de)ie[he]=de[he];var Gt,Ie;function Xt(fe,Ke){function _e(xn){return Ke.tokenize=xn,xn(fe,Ke)}var nn=fe.next();if(nn=="<")return fe.eat("!")?fe.eat("[")?fe.match("CDATA[")?_e(nt("atom","]]>")):null:fe.match("--")?_e(nt("comment","-->")):fe.match("DOCTYPE",!0,!0)?(fe.eatWhile(/[\w\._\-]/),_e(et(1))):null:fe.eat("?")?(fe.eatWhile(/[\w\._\-]/),Ke.tokenize=nt("meta","?>"),"meta"):(Gt=fe.eat("/")?"closeTag":"openTag",Ke.tokenize=Me,"tag bracket");if(nn=="&"){var fn;return fe.eat("#")?fe.eat("x")?fn=fe.eatWhile(/[a-fA-F\d]/)&&fe.eat(";"):fn=fe.eatWhile(/[\d]/)&&fe.eat(";"):fn=fe.eatWhile(/[\w\.\-:]/)&&fe.eat(";"),fn?"atom":"error"}else return fe.eatWhile(/[^&<]/),null}Xt.isInText=!0;function Me(fe,Ke){var _e=fe.next();if(_e==">"||_e=="/"&&fe.eat(">"))return Ke.tokenize=Xt,Gt=_e==">"?"endTag":"selfcloseTag","tag bracket";if(_e=="=")return Gt="equals",null;if(_e=="<"){Ke.tokenize=Xt,Ke.state=gt,Ke.tagName=Ke.tagStart=null;var nn=Ke.tokenize(fe,Ke);return nn?nn+" tag error":"tag error"}else return/[\'\"]/.test(_e)?(Ke.tokenize=Qt(_e),Ke.stringStartCol=fe.column(),Ke.tokenize(fe,Ke)):(fe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function Qt(fe){var Ke=function(_e,nn){for(;!_e.eol();)if(_e.next()==fe){nn.tokenize=Me;break}return"string"};return Ke.isInAttribute=!0,Ke}function nt(fe,Ke){return function(_e,nn){for(;!_e.eol();){if(_e.match(Ke)){nn.tokenize=Xt;break}_e.next()}return fe}}function et(fe){return function(Ke,_e){for(var nn;(nn=Ke.next())!=null;){if(nn=="<")return _e.tokenize=et(fe+1),_e.tokenize(Ke,_e);if(nn==">")if(fe==1){_e.tokenize=Xt;break}else return _e.tokenize=et(fe-1),_e.tokenize(Ke,_e)}return"meta"}}function At(fe,Ke,_e){this.prev=fe.context,this.tagName=Ke,this.indent=fe.indented,this.startOfLine=_e,(ie.doNotIndent.hasOwnProperty(Ke)||fe.context&&fe.context.noIndent)&&(this.noIndent=!0)}function at(fe){fe.context&&(fe.context=fe.context.prev)}function dt(fe,Ke){for(var _e;;){if(!fe.context||(_e=fe.context.tagName,!ie.contextGrabbers.hasOwnProperty(_e)||!ie.contextGrabbers[_e].hasOwnProperty(Ke)))return;at(fe)}}function gt(fe,Ke,_e){return fe=="openTag"?(_e.tagStart=Ke.column(),xt):fe=="closeTag"?bt:gt}function xt(fe,Ke,_e){return fe=="word"?(_e.tagName=Ke.current(),Ie="tag",Zt):ie.allowMissingTagName&&fe=="endTag"?(Ie="tag bracket",Zt(fe,Ke,_e)):(Ie="error",xt)}function bt(fe,Ke,_e){if(fe=="word"){var nn=Ke.current();return _e.context&&_e.context.tagName!=nn&&ie.implicitlyClosed.hasOwnProperty(_e.context.tagName)&&at(_e),_e.context&&_e.context.tagName==nn||ie.matchClosing===!1?(Ie="tag",Ut):(Ie="tag error",Rt)}else return ie.allowMissingTagName&&fe=="endTag"?(Ie="tag bracket",Ut(fe,Ke,_e)):(Ie="error",Rt)}function Ut(fe,Ke,_e){return fe!="endTag"?(Ie="error",Ut):(at(_e),gt)}function Rt(fe,Ke,_e){return Ie="error",Ut(fe,Ke,_e)}function Zt(fe,Ke,_e){if(fe=="word")return Ie="attribute",Yt;if(fe=="endTag"||fe=="selfcloseTag"){var nn=_e.tagName,fn=_e.tagStart;return _e.tagName=_e.tagStart=null,fe=="selfcloseTag"||ie.autoSelfClosers.hasOwnProperty(nn)?dt(_e,nn):(dt(_e,nn),_e.context=new At(_e,nn,fn==_e.indented)),gt}return Ie="error",Zt}function Yt(fe,Ke,_e){return fe=="equals"?te:(ie.allowMissing||(Ie="error"),Zt(fe,Ke,_e))}function te(fe,Ke,_e){return fe=="string"?ye:fe=="word"&&ie.allowUnquoted?(Ie="string",Zt):(Ie="error",Zt(fe,Ke,_e))}function ye(fe,Ke,_e){return fe=="string"?ye:Zt(fe,Ke,_e)}return{startState:function(fe){var Ke={tokenize:Xt,state:gt,indented:fe||0,tagName:null,tagStart:null,context:null};return fe!=null&&(Ke.baseIndent=fe),Ke},token:function(fe,Ke){if(!Ke.tagName&&fe.sol()&&(Ke.indented=fe.indentation()),fe.eatSpace())return null;Gt=null;var _e=Ke.tokenize(fe,Ke);return(_e||Gt)&&_e!="comment"&&(Ie=null,Ke.state=Ke.state(Gt||_e,fe,Ke),Ie&&(_e=Ie=="error"?_e+" error":Ie)),_e},indent:function(fe,Ke,_e){var nn=fe.context;if(fe.tokenize.isInAttribute)return fe.tagStart==fe.indented?fe.stringStartCol+1:fe.indented+Ht;if(nn&&nn.noIndent)return St.Pass;if(fe.tokenize!=Me&&fe.tokenize!=Xt)return _e?_e.match(/^(\s*)/)[0].length:0;if(fe.tagName)return ie.multilineTagIndentPastTag!==!1?fe.tagStart+fe.tagName.length+2:fe.tagStart+Ht*(ie.multilineTagIndentFactor||1);if(ie.alignCDATA&&/<!\[CDATA\[/.test(Ke))return 0;var fn=Ke&&/^<(\/)?([\w_:\.-]*)/.exec(Ke);if(fn&&fn[1])for(;nn;)if(nn.tagName==fn[2]){nn=nn.prev;break}else if(ie.implicitlyClosed.hasOwnProperty(nn.tagName))nn=nn.prev;else break;else if(fn)for(;nn;){var xn=ie.contextGrabbers[nn.tagName];if(xn&&xn.hasOwnProperty(fn[2]))nn=nn.prev;else break}for(;nn&&nn.prev&&!nn.startOfLine;)nn=nn.prev;return nn?nn.indent+Ht:fe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:ie.htmlMode?"html":"xml",helperType:ie.htmlMode?"html":"xml",skipAttribute:function(fe){fe.state==te&&(fe.state=Zt)},xmlCurrentTag:function(fe){return fe.tagName?{name:fe.tagName,close:fe.type=="closeTag"}:null},xmlCurrentContext:function(fe){for(var Ke=[],_e=fe.context;_e;_e=_e.prev)_e.tagName&&Ke.push(_e.tagName);return Ke.reverse()}}}),St.defineMIME("text/xml","xml"),St.defineMIME("application/xml","xml"),St.mimeModes.hasOwnProperty("text/html")||St.defineMIME("text/html",{name:"xml",htmlMode:!0})})},97774:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var St=Object.assign||function(et){for(var At=1;At<arguments.length;At++){var at=arguments[At];for(var dt in at)Object.prototype.hasOwnProperty.call(at,dt)&&(et[dt]=at[dt])}return et},Wt=function(){function et(At,at){for(var dt=0;dt<at.length;dt++){var gt=at[dt];gt.enumerable=gt.enumerable||!1,gt.configurable=!0,"value"in gt&&(gt.writable=!0),Object.defineProperty(At,gt.key,gt)}}return function(At,at,dt){return at&&et(At.prototype,at),dt&&et(At,dt),At}}(),le=It(59301),ve=Ie(le),de=It(12708),Ht=Ie(de),ie=It(53291),oe=Ie(ie),he=It(47242),Gt=It(65429);function Ie(et){return et&&et.__esModule?et:{default:et}}function Xt(et,At){if(!(et instanceof At))throw new TypeError("Cannot call a class as a function")}function Me(et,At){if(!et)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return At&&(typeof At=="object"||typeof At=="function")?At:et}function Qt(et,At){if(typeof At!="function"&&At!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof At);et.prototype=Object.create(At&&At.prototype,{constructor:{value:et,enumerable:!1,writable:!0,configurable:!0}}),At&&(Object.setPrototypeOf?Object.setPrototypeOf(et,At):et.__proto__=At)}var nt=function(et){Qt(At,et);function At(at){Xt(this,At);var dt=Me(this,(At.__proto__||Object.getPrototypeOf(At)).call(this,at));return dt.getEchartsInstance=function(){return dt.echartsLib.getInstanceByDom(dt.echartsElement)||dt.echartsLib.init(dt.echartsElement,dt.props.theme,dt.props.opts)},dt.dispose=function(){if(dt.echartsElement){try{(0,he.clear)(dt.echartsElement)}catch(gt){console.warn(gt)}dt.echartsLib.dispose(dt.echartsElement)}},dt.rerender=function(){var gt=dt.props,xt=gt.onEvents,bt=gt.onChartReady,Ut=dt.renderEchartDom();dt.bindEvents(Ut,xt||{}),typeof bt=="function"&&dt.props.onChartReady(Ut),dt.echartsElement&&(0,he.bind)(dt.echartsElement,function(){try{Ut.resize()}catch(Rt){console.warn(Rt)}})},dt.bindEvents=function(gt,xt){var bt=function(Zt,Yt){typeof Zt=="string"&&typeof Yt=="function"&&gt.on(Zt,function(te){Yt(te,gt)})};for(var Ut in xt)Object.prototype.hasOwnProperty.call(xt,Ut)&&bt(Ut,xt[Ut])},dt.renderEchartDom=function(){var gt=dt.getEchartsInstance();return gt.setOption(dt.props.option,dt.props.notMerge||!1,dt.props.lazyUpdate||!1),dt.props.showLoading?gt.showLoading(dt.props.loadingOption||null):gt.hideLoading(),gt},dt.echartsLib=at.echarts,dt.echartsElement=null,dt}return Wt(At,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(dt){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(dt,this.props))){if(!(0,oe.default)(dt.theme,this.props.theme)||!(0,oe.default)(dt.opts,this.props.opts)||!(0,oe.default)(dt.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var gt=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,oe.default)((0,Gt.pick)(this.props,gt),(0,Gt.pick)(dt,gt))){var xt=this.renderEchartDom();if(!(0,oe.default)(dt.style,this.props.style)||!(0,oe.default)(dt.className,this.props.className))try{xt.resize()}catch(bt){console.warn(bt)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var dt=this,gt=this.props,xt=gt.style,bt=gt.className,Ut=St({height:300},xt);return ve.default.createElement("div",{ref:function(Zt){dt.echartsElement=Zt},style:Ut,className:"echarts-for-react "+bt})}}]),At}(le.Component);Ve.default=nt,nt.propTypes={option:Ht.default.object.isRequired,echarts:Ht.default.object,notMerge:Ht.default.bool,lazyUpdate:Ht.default.bool,style:Ht.default.object,className:Ht.default.string,theme:Ht.default.oneOfType([Ht.default.string,Ht.default.object]),onChartReady:Ht.default.func,showLoading:Ht.default.bool,loadingOption:Ht.default.object,onEvents:Ht.default.object,opts:Ht.default.shape({devicePixelRatio:Ht.default.number,renderer:Ht.default.oneOf(["canvas","svg"]),width:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])]),height:Ht.default.oneOfType([Ht.default.number,Ht.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:Ht.default.func},nt.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(Sn,Ve,It){"use strict";var St;St={value:!0},Ve.Z=void 0;var Wt=It(76411),le=Ht(Wt),ve=It(97774),de=Ht(ve);function Ht(Ie){return Ie&&Ie.__esModule?Ie:{default:Ie}}function ie(Ie,Xt){if(!(Ie instanceof Xt))throw new TypeError("Cannot call a class as a function")}function oe(Ie,Xt){if(!Ie)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Xt&&(typeof Xt=="object"||typeof Xt=="function")?Xt:Ie}function he(Ie,Xt){if(typeof Xt!="function"&&Xt!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof Xt);Ie.prototype=Object.create(Xt&&Xt.prototype,{constructor:{value:Ie,enumerable:!1,writable:!0,configurable:!0}}),Xt&&(Object.setPrototypeOf?Object.setPrototypeOf(Ie,Xt):Ie.__proto__=Xt)}var Gt=function(Ie){he(Xt,Ie);function Xt(Me){ie(this,Xt);var Qt=oe(this,(Xt.__proto__||Object.getPrototypeOf(Xt)).call(this,Me));return Qt.echartsLib=le.default,Qt}return Xt}(de.default);Ve.Z=Gt},65429:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0});var It=Ve.pick=function(Wt,le){var ve={};return le.forEach(function(de){ve[de]=Wt[de]}),ve}},86204:function(Sn){"use strict";var Ve=typeof Reflect=="object"?Reflect:null,It=Ve&&typeof Ve.apply=="function"?Ve.apply:function(gt,xt,bt){return Function.prototype.apply.call(gt,xt,bt)},St;Ve&&typeof Ve.ownKeys=="function"?St=Ve.ownKeys:Object.getOwnPropertySymbols?St=function(gt){return Object.getOwnPropertyNames(gt).concat(Object.getOwnPropertySymbols(gt))}:St=function(gt){return Object.getOwnPropertyNames(gt)};function Wt(dt){console&&console.warn&&console.warn(dt)}var le=Number.isNaN||function(gt){return gt!==gt};function ve(){ve.init.call(this)}Sn.exports=ve,Sn.exports.once=et,ve.EventEmitter=ve,ve.prototype._events=void 0,ve.prototype._eventsCount=0,ve.prototype._maxListeners=void 0;var de=10;function Ht(dt){if(typeof dt!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof dt)}Object.defineProperty(ve,"defaultMaxListeners",{enumerable:!0,get:function(){return de},set:function(dt){if(typeof dt!="number"||dt<0||le(dt))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+dt+".");de=dt}}),ve.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ve.prototype.setMaxListeners=function(gt){if(typeof gt!="number"||gt<0||le(gt))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+gt+".");return this._maxListeners=gt,this};function ie(dt){return dt._maxListeners===void 0?ve.defaultMaxListeners:dt._maxListeners}ve.prototype.getMaxListeners=function(){return ie(this)},ve.prototype.emit=function(gt){for(var xt=[],bt=1;bt<arguments.length;bt++)xt.push(arguments[bt]);var Ut=gt==="error",Rt=this._events;if(Rt!==void 0)Ut=Ut&&Rt.error===void 0;else if(!Ut)return!1;if(Ut){var Zt;if(xt.length>0&&(Zt=xt[0]),Zt instanceof Error)throw Zt;var Yt=new Error("Unhandled error."+(Zt?" ("+Zt.message+")":""));throw Yt.context=Zt,Yt}var te=Rt[gt];if(te===void 0)return!1;if(typeof te=="function")It(te,this,xt);else for(var ye=te.length,fe=Me(te,ye),bt=0;bt<ye;++bt)It(fe[bt],this,xt);return!0};function oe(dt,gt,xt,bt){var Ut,Rt,Zt;if(Ht(xt),Rt=dt._events,Rt===void 0?(Rt=dt._events=Object.create(null),dt._eventsCount=0):(Rt.newListener!==void 0&&(dt.emit("newListener",gt,xt.listener?xt.listener:xt),Rt=dt._events),Zt=Rt[gt]),Zt===void 0)Zt=Rt[gt]=xt,++dt._eventsCount;else if(typeof Zt=="function"?Zt=Rt[gt]=bt?[xt,Zt]:[Zt,xt]:bt?Zt.unshift(xt):Zt.push(xt),Ut=ie(dt),Ut>0&&Zt.length>Ut&&!Zt.warned){Zt.warned=!0;var Yt=new Error("Possible EventEmitter memory leak detected. "+Zt.length+" "+String(gt)+" listeners added. Use emitter.setMaxListeners() to increase limit");Yt.name="MaxListenersExceededWarning",Yt.emitter=dt,Yt.type=gt,Yt.count=Zt.length,Wt(Yt)}return dt}ve.prototype.addListener=function(gt,xt){return oe(this,gt,xt,!1)},ve.prototype.on=ve.prototype.addListener,ve.prototype.prependListener=function(gt,xt){return oe(this,gt,xt,!0)};function he(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Gt(dt,gt,xt){var bt={fired:!1,wrapFn:void 0,target:dt,type:gt,listener:xt},Ut=he.bind(bt);return Ut.listener=xt,bt.wrapFn=Ut,Ut}ve.prototype.once=function(gt,xt){return Ht(xt),this.on(gt,Gt(this,gt,xt)),this},ve.prototype.prependOnceListener=function(gt,xt){return Ht(xt),this.prependListener(gt,Gt(this,gt,xt)),this},ve.prototype.removeListener=function(gt,xt){var bt,Ut,Rt,Zt,Yt;if(Ht(xt),Ut=this._events,Ut===void 0)return this;if(bt=Ut[gt],bt===void 0)return this;if(bt===xt||bt.listener===xt)--this._eventsCount===0?this._events=Object.create(null):(delete Ut[gt],Ut.removeListener&&this.emit("removeListener",gt,bt.listener||xt));else if(typeof bt!="function"){for(Rt=-1,Zt=bt.length-1;Zt>=0;Zt--)if(bt[Zt]===xt||bt[Zt].listener===xt){Yt=bt[Zt].listener,Rt=Zt;break}if(Rt<0)return this;Rt===0?bt.shift():Qt(bt,Rt),bt.length===1&&(Ut[gt]=bt[0]),Ut.removeListener!==void 0&&this.emit("removeListener",gt,Yt||xt)}return this},ve.prototype.off=ve.prototype.removeListener,ve.prototype.removeAllListeners=function(gt){var xt,bt,Ut;if(bt=this._events,bt===void 0)return this;if(bt.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):bt[gt]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete bt[gt]),this;if(arguments.length===0){var Rt=Object.keys(bt),Zt;for(Ut=0;Ut<Rt.length;++Ut)Zt=Rt[Ut],Zt!=="removeListener"&&this.removeAllListeners(Zt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(xt=bt[gt],typeof xt=="function")this.removeListener(gt,xt);else if(xt!==void 0)for(Ut=xt.length-1;Ut>=0;Ut--)this.removeListener(gt,xt[Ut]);return this};function Ie(dt,gt,xt){var bt=dt._events;if(bt===void 0)return[];var Ut=bt[gt];return Ut===void 0?[]:typeof Ut=="function"?xt?[Ut.listener||Ut]:[Ut]:xt?nt(Ut):Me(Ut,Ut.length)}ve.prototype.listeners=function(gt){return Ie(this,gt,!0)},ve.prototype.rawListeners=function(gt){return Ie(this,gt,!1)},ve.listenerCount=function(dt,gt){return typeof dt.listenerCount=="function"?dt.listenerCount(gt):Xt.call(dt,gt)},ve.prototype.listenerCount=Xt;function Xt(dt){var gt=this._events;if(gt!==void 0){var xt=gt[dt];if(typeof xt=="function")return 1;if(xt!==void 0)return xt.length}return 0}ve.prototype.eventNames=function(){return this._eventsCount>0?St(this._events):[]};function Me(dt,gt){for(var xt=new Array(gt),bt=0;bt<gt;++bt)xt[bt]=dt[bt];return xt}function Qt(dt,gt){for(;gt+1<dt.length;gt++)dt[gt]=dt[gt+1];dt.pop()}function nt(dt){for(var gt=new Array(dt.length),xt=0;xt<gt.length;++xt)gt[xt]=dt[xt].listener||dt[xt];return gt}function et(dt,gt){return new Promise(function(xt,bt){function Ut(Zt){dt.removeListener(gt,Rt),bt(Zt)}function Rt(){typeof dt.removeListener=="function"&&dt.removeListener("error",Ut),xt([].slice.call(arguments))}at(dt,gt,Rt,{once:!0}),gt!=="error"&&At(dt,Ut,{once:!0})})}function At(dt,gt,xt){typeof dt.on=="function"&&at(dt,"error",gt,xt)}function at(dt,gt,xt,bt){if(typeof dt.on=="function")bt.once?dt.once(gt,xt):dt.on(gt,xt);else if(typeof dt.addEventListener=="function")dt.addEventListener(gt,function Ut(Rt){bt.once&&dt.removeEventListener(gt,Ut),xt(Rt)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof dt)}},53291:function(Sn){"use strict";var Ve=Array.isArray,It=Object.keys,St=Object.prototype.hasOwnProperty;Sn.exports=function Wt(le,ve){if(le===ve)return!0;if(le&&ve&&typeof le=="object"&&typeof ve=="object"){var de=Ve(le),Ht=Ve(ve),ie,oe,he;if(de&&Ht){if(oe=le.length,oe!=ve.length)return!1;for(ie=oe;ie--!==0;)if(!Wt(le[ie],ve[ie]))return!1;return!0}if(de!=Ht)return!1;var Gt=le instanceof Date,Ie=ve instanceof Date;if(Gt!=Ie)return!1;if(Gt&&Ie)return le.getTime()==ve.getTime();var Xt=le instanceof RegExp,Me=ve instanceof RegExp;if(Xt!=Me)return!1;if(Xt&&Me)return le.toString()==ve.toString();var Qt=It(le);if(oe=Qt.length,oe!==It(ve).length)return!1;for(ie=oe;ie--!==0;)if(!St.call(ve,Qt[ie]))return!1;for(ie=oe;ie--!==0;)if(he=Qt[ie],!Wt(le[he],ve[he]))return!1;return!0}return le!==le&&ve!==ve}},6330:function(Sn,Ve,It){"use strict";It.d(Ve,{HT:function(){return Mi},iZ:function(){return rn}});var St={},Wt=function(ue,re,ee,je,xe){var An=new Worker(St[re]||(St[re]=URL.createObjectURL(new Blob([ue+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return An.onmessage=function(ui){var ti=ui.data,Bi=ti.$e$;if(Bi){var mi=new Error(Bi[0]);mi.code=Bi[1],mi.stack=Bi[2],xe(mi,null)}else xe(null,ti)},An.postMessage(ee,je),An},le=Uint8Array,ve=Uint16Array,de=Int32Array,Ht=new le([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),ie=new le([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),oe=new le([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),he=function(ue,re){for(var ee=new ve(31),je=0;je<31;++je)ee[je]=re+=1<<ue[je-1];for(var xe=new de(ee[30]),je=1;je<30;++je)for(var An=ee[je];An<ee[je+1];++An)xe[An]=An-ee[je]<<5|je;return{b:ee,r:xe}},Gt=he(Ht,2),Ie=Gt.b,Xt=Gt.r;Ie[28]=258,Xt[258]=28;for(var Me=he(ie,0),Qt=Me.b,nt=Me.r,et=new ve(32768),At=0;At<32768;++At){var at=(At&43690)>>1|(At&21845)<<1;at=(at&52428)>>2|(at&13107)<<2,at=(at&61680)>>4|(at&3855)<<4,et[At]=((at&65280)>>8|(at&255)<<8)>>1}for(var dt=function(ue,re,ee){for(var je=ue.length,xe=0,An=new ve(re);xe<je;++xe)ue[xe]&&++An[ue[xe]-1];var ui=new ve(re);for(xe=1;xe<re;++xe)ui[xe]=ui[xe-1]+An[xe-1]<<1;var ti;if(ee){ti=new ve(1<<re);var Bi=15-re;for(xe=0;xe<je;++xe)if(ue[xe])for(var mi=xe<<4|ue[xe],oi=re-ue[xe],Di=ui[ue[xe]-1]++<<oi,Ne=Di|(1<<oi)-1;Di<=Ne;++Di)ti[et[Di]>>Bi]=mi}else for(ti=new ve(je),xe=0;xe<je;++xe)ue[xe]&&(ti[xe]=et[ui[ue[xe]-1]++]>>15-ue[xe]);return ti},gt=new le(288),At=0;At<144;++At)gt[At]=8;for(var At=144;At<256;++At)gt[At]=9;for(var At=256;At<280;++At)gt[At]=7;for(var At=280;At<288;++At)gt[At]=8;for(var xt=new le(32),At=0;At<32;++At)xt[At]=5;var bt=dt(gt,9,0),Ut=dt(gt,9,1),Rt=dt(xt,5,0),Zt=dt(xt,5,1),Yt=function(ue){for(var re=ue[0],ee=1;ee<ue.length;++ee)ue[ee]>re&&(re=ue[ee]);return re},te=function(ue,re,ee){var je=re/8|0;return(ue[je]|ue[je+1]<<8)>>(re&7)&ee},ye=function(ue,re){var ee=re/8|0;return(ue[ee]|ue[ee+1]<<8|ue[ee+2]<<16)>>(re&7)},fe=function(ue){return(ue+7)/8|0},Ke=function(ue,re,ee){return(re==null||re<0)&&(re=0),(ee==null||ee>ue.length)&&(ee=ue.length),new le(ue.subarray(re,ee))},_e={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14},nn=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],fn=function(ue,re,ee){var je=new Error(re||nn[ue]);if(je.code=ue,Error.captureStackTrace&&Error.captureStackTrace(je,fn),!ee)throw je;return je},xn=function(ue,re,ee,je){var xe=ue.length,An=je?je.length:0;if(!xe||re.f&&!re.l)return ee||new le(0);var ui=!ee,ti=ui||re.i!=2,Bi=re.i;ui&&(ee=new le(xe*3));var mi=function(io){var Dr=ee.length;if(io>Dr){var fo=new le(Math.max(Dr*2,io));fo.set(ee),ee=fo}},oi=re.f||0,Di=re.p||0,Ne=re.b||0,hn=re.l,ke=re.d,Ot=re.m,vn=re.n,Jn=xe*8;do{if(!hn){oi=te(ue,Di,1);var vi=te(ue,Di+1,3);if(Di+=3,vi)if(vi==1)hn=Ut,ke=Zt,Ot=9,vn=5;else if(vi==2){var Un=te(ue,Di,31)+257,Rn=te(ue,Di+10,15)+4,gn=Un+te(ue,Di+5,31)+1;Di+=14;for(var Cn=new le(gn),Tn=new le(19),qe=0;qe<Rn;++qe)Tn[oe[qe]]=te(ue,Di+qe*3,7);Di+=Rn*3;for(var In=Yt(Tn),on=(1<<In)-1,_i=dt(Tn,In,1),qe=0;qe<gn;){var Qi=_i[te(ue,Di,on)];Di+=Qi&15;var Ee=Qi>>4;if(Ee<16)Cn[qe++]=Ee;else{var nr=0,Gi=0;for(Ee==16?(Gi=3+te(ue,Di,3),Di+=2,nr=Cn[qe-1]):Ee==17?(Gi=3+te(ue,Di,7),Di+=3):Ee==18&&(Gi=11+te(ue,Di,127),Di+=7);Gi--;)Cn[qe++]=nr}}var Fr=Cn.subarray(0,Un),yr=Cn.subarray(Un);Ot=Yt(Fr),vn=Yt(yr),hn=dt(Fr,Ot,1),ke=dt(yr,vn,1)}else fn(1);else{var Ee=fe(Di)+4,Wn=ue[Ee-4]|ue[Ee-3]<<8,cn=Ee+Wn;if(cn>xe){Bi&&fn(0);break}ti&&mi(Ne+Wn),ee.set(ue.subarray(Ee,cn),Ne),re.b=Ne+=Wn,re.p=Di=cn*8,re.f=oi;continue}if(Di>Jn){Bi&&fn(0);break}}ti&&mi(Ne+131072);for(var Zr=(1<<Ot)-1,_r=(1<<vn)-1,Wr=Di;;Wr=Di){var nr=hn[ye(ue,Di)&Zr],no=nr>>4;if(Di+=nr&15,Di>Jn){Bi&&fn(0);break}if(nr||fn(2),no<256)ee[Ne++]=no;else if(no==256){Wr=Di,hn=null;break}else{var Oe=no-254;if(no>264){var qe=no-257,Nr=Ht[qe];Oe=te(ue,Di,(1<<Nr)-1)+Ie[qe],Di+=Nr}var Ur=ke[ye(ue,Di)&_r],Sr=Ur>>4;Ur||fn(3),Di+=Ur&15;var yr=Qt[Sr];if(Sr>3){var Nr=ie[Sr];yr+=ye(ue,Di)&(1<<Nr)-1,Di+=Nr}if(Di>Jn){Bi&&fn(0);break}ti&&mi(Ne+131072);var Ar=Ne+Oe;if(Ne<yr){var Jr=An-yr,Ao=Math.min(yr,Ar);for(Jr+Ne<0&&fn(3);Ne<Ao;++Ne)ee[Ne]=je[Jr+Ne]}for(;Ne<Ar;++Ne)ee[Ne]=ee[Ne-yr]}}re.l=hn,re.p=Wr,re.b=Ne,re.f=oi,hn&&(oi=1,re.m=Ot,re.d=ke,re.n=vn)}while(!oi);return Ne!=ee.length&&ui?Ke(ee,0,Ne):ee.subarray(0,Ne)},_n=function(ue,re,ee){ee<<=re&7;var je=re/8|0;ue[je]|=ee,ue[je+1]|=ee>>8},Xn=function(ue,re,ee){ee<<=re&7;var je=re/8|0;ue[je]|=ee,ue[je+1]|=ee>>8,ue[je+2]|=ee>>16},pe=function(ue,re){for(var ee=[],je=0;je<ue.length;++je)ue[je]&&ee.push({s:je,f:ue[je]});var xe=ee.length,An=ee.slice();if(!xe)return{t:jn,l:0};if(xe==1){var ui=new le(ee[0].s+1);return ui[ee[0].s]=1,{t:ui,l:1}}ee.sort(function(cn,Un){return cn.f-Un.f}),ee.push({s:-1,f:25001});var ti=ee[0],Bi=ee[1],mi=0,oi=1,Di=2;for(ee[0]={s:-1,f:ti.f+Bi.f,l:ti,r:Bi};oi!=xe-1;)ti=ee[ee[mi].f<ee[Di].f?mi++:Di++],Bi=ee[mi!=oi&&ee[mi].f<ee[Di].f?mi++:Di++],ee[oi++]={s:-1,f:ti.f+Bi.f,l:ti,r:Bi};for(var Ne=An[0].s,je=1;je<xe;++je)An[je].s>Ne&&(Ne=An[je].s);var hn=new ve(Ne+1),ke=ne(ee[oi-1],hn,0);if(ke>re){var je=0,Ot=0,vn=ke-re,Jn=1<<vn;for(An.sort(function(Un,Rn){return hn[Rn.s]-hn[Un.s]||Un.f-Rn.f});je<xe;++je){var vi=An[je].s;if(hn[vi]>re)Ot+=Jn-(1<<ke-hn[vi]),hn[vi]=re;else break}for(Ot>>=vn;Ot>0;){var Ee=An[je].s;hn[Ee]<re?Ot-=1<<re-hn[Ee]++-1:++je}for(;je>=0&&Ot;--je){var Wn=An[je].s;hn[Wn]==re&&(--hn[Wn],++Ot)}ke=re}return{t:new le(hn),l:ke}},ne=function(ue,re,ee){return ue.s==-1?Math.max(ne(ue.l,re,ee+1),ne(ue.r,re,ee+1)):re[ue.s]=ee},pn=function(ue){for(var re=ue.length;re&&!ue[--re];);for(var ee=new ve(++re),je=0,xe=ue[0],An=1,ui=function(Bi){ee[je++]=Bi},ti=1;ti<=re;++ti)if(ue[ti]==xe&&ti!=re)++An;else{if(!xe&&An>2){for(;An>138;An-=138)ui(32754);An>2&&(ui(An>10?An-11<<5|28690:An-3<<5|12305),An=0)}else if(An>3){for(ui(xe),--An;An>6;An-=6)ui(8304);An>2&&(ui(An-3<<5|8208),An=0)}for(;An--;)ui(xe);An=1,xe=ue[ti]}return{c:ee.subarray(0,je),n:re}},Ai=function(ue,re){for(var ee=0,je=0;je<re.length;++je)ee+=ue[je]*re[je];return ee},ai=function(ue,re,ee){var je=ee.length,xe=fe(re+2);ue[xe]=je&255,ue[xe+1]=je>>8,ue[xe+2]=ue[xe]^255,ue[xe+3]=ue[xe+1]^255;for(var An=0;An<je;++An)ue[xe+An+4]=ee[An];return(xe+4+je)*8},sn=function(ue,re,ee,je,xe,An,ui,ti,Bi,mi,oi){_n(re,oi++,ee),++xe[256];for(var Di=pe(xe,15),Ne=Di.t,hn=Di.l,ke=pe(An,15),Ot=ke.t,vn=ke.l,Jn=pn(Ne),vi=Jn.c,Ee=Jn.n,Wn=pn(Ot),cn=Wn.c,Un=Wn.n,Rn=new ve(19),gn=0;gn<vi.length;++gn)++Rn[vi[gn]&31];for(var gn=0;gn<cn.length;++gn)++Rn[cn[gn]&31];for(var Cn=pe(Rn,7),Tn=Cn.t,qe=Cn.l,In=19;In>4&&!Tn[oe[In-1]];--In);var on=mi+5<<3,_i=Ai(xe,gt)+Ai(An,xt)+ui,Qi=Ai(xe,Ne)+Ai(An,Ot)+ui+14+3*In+Ai(Rn,Tn)+2*Rn[16]+3*Rn[17]+7*Rn[18];if(Bi>=0&&on<=_i&&on<=Qi)return ai(re,oi,ue.subarray(Bi,Bi+mi));var nr,Gi,Fr,yr;if(_n(re,oi,1+(Qi<_i)),oi+=2,Qi<_i){nr=dt(Ne,hn,0),Gi=Ne,Fr=dt(Ot,vn,0),yr=Ot;var Zr=dt(Tn,qe,0);_n(re,oi,Ee-257),_n(re,oi+5,Un-1),_n(re,oi+10,In-4),oi+=14;for(var gn=0;gn<In;++gn)_n(re,oi+3*gn,Tn[oe[gn]]);oi+=3*In;for(var _r=[vi,cn],Wr=0;Wr<2;++Wr)for(var no=_r[Wr],gn=0;gn<no.length;++gn){var Oe=no[gn]&31;_n(re,oi,Zr[Oe]),oi+=Tn[Oe],Oe>15&&(_n(re,oi,no[gn]>>5&127),oi+=no[gn]>>12)}}else nr=bt,Gi=gt,Fr=Rt,yr=xt;for(var gn=0;gn<ti;++gn){var Nr=je[gn];if(Nr>255){var Oe=Nr>>18&31;Xn(re,oi,nr[Oe+257]),oi+=Gi[Oe+257],Oe>7&&(_n(re,oi,Nr>>23&31),oi+=Ht[Oe]);var Ur=Nr&31;Xn(re,oi,Fr[Ur]),oi+=yr[Ur],Ur>3&&(Xn(re,oi,Nr>>5&8191),oi+=ie[Ur])}else Xn(re,oi,nr[Nr]),oi+=Gi[Nr]}return Xn(re,oi,nr[256]),oi+Gi[256]},Qn=new de([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),jn=new le(0),Ti=function(ue,re,ee,je,xe,An){var ui=An.z||ue.length,ti=new le(je+ui+5*(1+Math.ceil(ui/7e3))+xe),Bi=ti.subarray(je,ti.length-xe),mi=An.l,oi=(An.r||0)&7;if(re){oi&&(Bi[0]=An.r>>3);for(var Di=Qn[re-1],Ne=Di>>13,hn=Di&8191,ke=(1<<ee)-1,Ot=An.p||new ve(32768),vn=An.h||new ve(ke+1),Jn=Math.ceil(ee/3),vi=2*Jn,Ee=function(es){return(ue[es]^ue[es+1]<<Jn^ue[es+2]<<vi)&ke},Wn=new de(25e3),cn=new ve(288),Un=new ve(32),Rn=0,gn=0,Cn=An.i||0,Tn=0,qe=An.w||0,In=0;Cn+2<ui;++Cn){var on=Ee(Cn),_i=Cn&32767,Qi=vn[on];if(Ot[_i]=Qi,vn[on]=_i,qe<=Cn){var nr=ui-Cn;if((Rn>7e3||Tn>24576)&&(nr>423||!mi)){oi=sn(ue,Bi,0,Wn,cn,Un,gn,Tn,In,Cn-In,oi),Tn=Rn=gn=0,In=Cn;for(var Gi=0;Gi<286;++Gi)cn[Gi]=0;for(var Gi=0;Gi<30;++Gi)Un[Gi]=0}var Fr=2,yr=0,Zr=hn,_r=_i-Qi&32767;if(nr>2&&on==Ee(Cn-_r))for(var Wr=Math.min(Ne,nr)-1,no=Math.min(32767,Cn),Oe=Math.min(258,nr);_r<=no&&--Zr&&_i!=Qi;){if(ue[Cn+Fr]==ue[Cn+Fr-_r]){for(var Nr=0;Nr<Oe&&ue[Cn+Nr]==ue[Cn+Nr-_r];++Nr);if(Nr>Fr){if(Fr=Nr,yr=_r,Nr>Wr)break;for(var Ur=Math.min(_r,Nr-2),Sr=0,Gi=0;Gi<Ur;++Gi){var Ar=Cn-_r+Gi&32767,Jr=Ot[Ar],Ao=Ar-Jr&32767;Ao>Sr&&(Sr=Ao,Qi=Ar)}}}_i=Qi,Qi=Ot[_i],_r+=_i-Qi&32767}if(yr){Wn[Tn++]=268435456|Xt[Fr]<<18|nt[yr];var io=Xt[Fr]&31,Dr=nt[yr]&31;gn+=Ht[io]+ie[Dr],++cn[257+io],++Un[Dr],qe=Cn+Fr,++Rn}else Wn[Tn++]=ue[Cn],++cn[ue[Cn]]}}for(Cn=Math.max(Cn,qe);Cn<ui;++Cn)Wn[Tn++]=ue[Cn],++cn[ue[Cn]];oi=sn(ue,Bi,mi,Wn,cn,Un,gn,Tn,In,Cn-In,oi),mi||(An.r=oi&7|Bi[oi/8|0]<<3,oi-=7,An.h=vn,An.p=Ot,An.i=Cn,An.w=qe)}else{for(var Cn=An.w||0;Cn<ui+mi;Cn+=65535){var fo=Cn+65535;fo>=ui&&(Bi[oi/8|0]=mi,fo=ui),oi=ai(Bi,oi+1,ue.subarray(Cn,fo))}An.i=ui}return Ke(ti,0,je+fe(oi)+xe)},$e=null,Le=function(){var ue=-1;return{p:function(re){for(var ee=ue,je=0;je<re.length;++je)ee=$e[ee&255^re[je]]^ee>>>8;ue=ee},d:function(){return~ue}}},tn=function(){var ue=1,re=0;return{p:function(ee){for(var je=ue,xe=re,An=ee.length|0,ui=0;ui!=An;){for(var ti=Math.min(ui+2655,An);ui<ti;++ui)xe+=je+=ee[ui];je=(je&65535)+15*(je>>16),xe=(xe&65535)+15*(xe>>16)}ue=je,re=xe},d:function(){return ue%=65521,re%=65521,(ue&255)<<24|(ue&65280)<<8|(re&255)<<8|re>>8}}},hi=function(ue,re,ee,je,xe){if(!xe&&(xe={l:1},re.dictionary)){var An=re.dictionary.subarray(-32768),ui=new le(An.length+ue.length);ui.set(An),ui.set(ue,An.length),ue=ui,xe.w=An.length}return Ti(ue,re.level==null?6:re.level,re.mem==null?xe.l?Math.ceil(Math.max(8,Math.min(13,Math.log(ue.length)))*1.5):20:12+re.mem,ee,je,xe)},ni=function(ue,re){var ee={};for(var je in ue)ee[je]=ue[je];for(var je in re)ee[je]=re[je];return ee},zt=function(ue,re,ee){for(var je=ue(),xe=ue.toString(),An=xe.slice(xe.indexOf("[")+1,xe.lastIndexOf("]")).replace(/\s+/g,"").split(","),ui=0;ui<je.length;++ui){var ti=je[ui],Bi=An[ui];if(typeof ti=="function"){re+=";"+Bi+"=";var mi=ti.toString();if(ti.prototype)if(mi.indexOf("[native code]")!=-1){var oi=mi.indexOf(" ",8)+1;re+=mi.slice(oi,mi.indexOf("(",oi))}else{re+=mi;for(var Di in ti.prototype)re+=";"+Bi+".prototype."+Di+"="+ti.prototype[Di].toString()}else re+=mi}else ee[Bi]=ti}return re},Ft=null,mt=function(ue){var re=[];for(var ee in ue)ue[ee].buffer&&re.push((ue[ee]=new ue[ee].constructor(ue[ee])).buffer);return re},vt=function(ue,re,ee,je){if(!Ft[ee]){for(var xe="",An={},ui=ue.length-1,ti=0;ti<ui;++ti)xe=zt(ue[ti],xe,An);Ft[ee]={c:zt(ue[ui],xe,An),e:An}}var Bi=ni({},Ft[ee].e);return Wt(Ft[ee].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+re.toString()+"}",ee,Bi,mt(Bi),je)},Et=function(){return[le,ve,de,Ht,ie,oe,Ie,Qt,Ut,Zt,et,nn,dt,Yt,te,ye,fe,Ke,fn,xn,Or,ze,Ue]},Ct=function(){return[le,ve,de,Ht,ie,oe,Xt,nt,bt,gt,Rt,xt,et,Qn,jn,dt,_n,Xn,pe,ne,pn,Ai,ai,sn,fe,Ke,Ti,hi,lr,ze]},_t=function(){return[On,si,kn,Le,$e]},Ce=function(){return[Vn,Ki]},Ze=function(){return[yi,kn,tn]},Bn=function(){return[Ei]},ze=function(ue){return postMessage(ue,[ue.buffer])},Ue=function(ue){return ue&&{out:ue.size&&new le(ue.size),dictionary:ue.dictionary}},Xe=function(ue,re,ee,je,xe,An){var ui=vt(ee,je,xe,function(ti,Bi){ui.terminate(),An(ti,Bi)});return ui.postMessage([ue,re],re.consume?[ue.buffer]:[]),function(){ui.terminate()}},dn=function(ue){return ue.ondata=function(re,ee){return postMessage([re,ee],[re.buffer])},function(re){re.data.length?(ue.push(re.data[0],re.data[1]),postMessage([re.data[0].length])):ue.flush()}},Kn=function(ue,re,ee,je,xe,An,ui){var ti,Bi=vt(ue,je,xe,function(mi,oi){mi?(Bi.terminate(),re.ondata.call(re,mi)):Array.isArray(oi)?oi.length==1?(re.queuedSize-=oi[0],re.ondrain&&re.ondrain(oi[0])):(oi[1]&&Bi.terminate(),re.ondata.call(re,mi,oi[0],oi[1])):ui(oi)});Bi.postMessage(ee),re.queuedSize=0,re.push=function(mi,oi){re.ondata||fn(5),ti&&re.ondata(fn(4,0,1),null,!!oi),re.queuedSize+=mi.length,Bi.postMessage([mi,ti=oi],[mi.buffer])},re.terminate=function(){Bi.terminate()},An&&(re.flush=function(){Bi.postMessage([])})},mn=function(ue,re){return ue[re]|ue[re+1]<<8},be=function(ue,re){return(ue[re]|ue[re+1]<<8|ue[re+2]<<16|ue[re+3]<<24)>>>0},ei=function(ue,re){return be(ue,re)+be(ue,re+4)*4294967296},kn=function(ue,re,ee){for(;ee;++re)ue[re]=ee,ee>>>=8},On=function(ue,re){var ee=re.filename;if(ue[0]=31,ue[1]=139,ue[2]=8,ue[8]=re.level<2?4:re.level==9?2:0,ue[9]=3,re.mtime!=0&&kn(ue,4,Math.floor(new Date(re.mtime||Date.now())/1e3)),ee){ue[3]=8;for(var je=0;je<=ee.length;++je)ue[je+10]=ee.charCodeAt(je)}},Vn=function(ue){(ue[0]!=31||ue[1]!=139||ue[2]!=8)&&fn(6,"invalid gzip data");var re=ue[3],ee=10;re&4&&(ee+=(ue[10]|ue[11]<<8)+2);for(var je=(re>>3&1)+(re>>4&1);je>0;je-=!ue[ee++]);return ee+(re&2)},Ki=function(ue){var re=ue.length;return(ue[re-4]|ue[re-3]<<8|ue[re-2]<<16|ue[re-1]<<24)>>>0},si=function(ue){return 10+(ue.filename?ue.filename.length+1:0)},yi=function(ue,re){var ee=re.level,je=ee==0?0:ee<6?1:ee==9?3:2;if(ue[0]=120,ue[1]=je<<6|(re.dictionary&&32),ue[1]|=31-(ue[0]<<8|ue[1])%31,re.dictionary){var xe=tn();xe.p(re.dictionary),kn(ue,2,xe.d())}},Ei=function(ue,re){return((ue[0]&15)!=8||ue[0]>>4>7||(ue[0]<<8|ue[1])%31)&&fn(6,"invalid zlib data"),(ue[1]>>5&1)==+!re&&fn(6,"invalid zlib data: "+(ue[1]&32?"need":"unexpected")+" dictionary"),(ue[1]>>3&4)+2};function qi(ue,re){return typeof ue=="function"&&(re=ue,ue={}),this.ondata=re,ue}var ii=null,ar=null;function Xi(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Ct],function(je){return ze(lr(je.data[0],je.data[1]))},0,ee)}function lr(ue,re){return hi(ue,re||{},0,0)}var zi=null,Kr=null;function Ir(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Et],function(je){return ze(Or(je.data[0],Ue(je.data[1])))},1,ee)}function Or(ue,re){return xn(ue,{i:2},re&&re.out,re&&re.dictionary)}var Yi=null,kr=null;function kt(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Ct,_t,function(){return[tr]}],function(je){return ze(tr(je.data[0],je.data[1]))},2,ee)}function tr(ue,re){re||(re={});var ee=Le(),je=ue.length;ee.p(ue);var xe=hi(ue,re,si(re),8),An=xe.length;return On(xe,re),kn(xe,An-8,ee.d()),kn(xe,An-4,je),xe}var Fi=null,ri=null;function Li(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Et,Ce,function(){return[Ui]}],function(je){return ze(Ui(je.data[0],je.data[1]))},3,ee)}function Ui(ue,re){var ee=Vn(ue);return ee+8>ue.length&&fn(6,"invalid gzip data"),xn(ue.subarray(ee,-8),{i:2},re&&re.out||new le(Ki(ue)),re&&re.dictionary)}var Ri=null,Lr=null;function an(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Ct,Ze,function(){return[rn]}],function(je){return ze(rn(je.data[0],je.data[1]))},4,ee)}function rn(ue,re){re||(re={});var ee=tn();ee.p(ue);var je=hi(ue,re,re.dictionary?6:2,4);return yi(je,re),kn(je,je.length-4,ee.d()),je}var Ge=null,yn=null;function ji(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),Xe(ue,re,[Et,Bn,function(){return[Mi]}],function(je){return ze(Mi(je.data[0],Ue(je.data[1])))},5,ee)}function Mi(ue,re){return xn(ue.subarray(Ei(ue,re&&re.dictionary),-4),{i:2},re&&re.out,re&&re.dictionary)}var or=null,ln=null;function Ln(ue,re,ee){return ee||(ee=re,re={}),typeof ee!="function"&&fn(7),ue[0]==31&&ue[1]==139&&ue[2]==8?Li(ue,re,ee):(ue[0]&15)!=8||ue[0]>>4>7||(ue[0]<<8|ue[1])%31?Ir(ue,re,ee):ji(ue,re,ee)}function Pe(ue,re){return ue[0]==31&&ue[1]==139&&ue[2]==8?Ui(ue,re):(ue[0]&15)!=8||ue[0]>>4>7||(ue[0]<<8|ue[1])%31?Or(ue,re):Mi(ue,re)}var sr=function(ue,re,ee,je){for(var xe in ue){var An=ue[xe],ui=re+xe,ti=je;Array.isArray(An)&&(ti=ni(je,An[1]),An=An[0]),An instanceof le?ee[ui]=[An,ti]:(ee[ui+="/"]=[new le(0),ti],sr(An,ui,ee,je))}},$n=typeof TextEncoder!="undefined"&&new TextEncoder,se=typeof TextDecoder!="undefined"&&new TextDecoder,De=0;try{se.decode(jn,{stream:!0}),De=1}catch(ue){}var qn=function(ue){for(var re="",ee=0;;){var je=ue[ee++],xe=(je>127)+(je>223)+(je>239);if(ee+xe>ue.length)return{s:re,r:Ke(ue,ee-1)};xe?xe==3?(je=((je&15)<<18|(ue[ee++]&63)<<12|(ue[ee++]&63)<<6|ue[ee++]&63)-65536,re+=String.fromCharCode(55296|je>>10,56320|je&1023)):xe&1?re+=String.fromCharCode((je&31)<<6|ue[ee++]&63):re+=String.fromCharCode((je&15)<<12|(ue[ee++]&63)<<6|ue[ee++]&63):re+=String.fromCharCode(je)}},Zn=null,Ye=null;function Dn(ue,re){if(re){for(var ee=new le(ue.length),je=0;je<ue.length;++je)ee[je]=ue.charCodeAt(je);return ee}if($n)return $n.encode(ue);for(var xe=ue.length,An=new le(ue.length+(ue.length>>1)),ui=0,ti=function(oi){An[ui++]=oi},je=0;je<xe;++je){if(ui+5>An.length){var Bi=new le(ui+8+(xe-je<<1));Bi.set(An),An=Bi}var mi=ue.charCodeAt(je);mi<128||re?ti(mi):mi<2048?(ti(192|mi>>6),ti(128|mi&63)):mi>55295&&mi<57344?(mi=65536+(mi&1047552)|ue.charCodeAt(++je)&1023,ti(240|mi>>18),ti(128|mi>>12&63),ti(128|mi>>6&63),ti(128|mi&63)):(ti(224|mi>>12),ti(128|mi>>6&63),ti(128|mi&63))}return Ke(An,0,ui)}function bi(ue,re){if(re){for(var ee="",je=0;je<ue.length;je+=16384)ee+=String.fromCharCode.apply(null,ue.subarray(je,je+16384));return ee}else{if(se)return se.decode(ue);var xe=qn(ue),An=xe.s,ee=xe.r;return ee.length&&fn(8),An}}var ki=function(ue){return ue==1?3:ue<6?2:ue==9?1:0},Ni=function(ue,re){return re+30+mn(ue,re+26)+mn(ue,re+28)},li=function(ue,re,ee){var je=mn(ue,re+28),xe=bi(ue.subarray(re+46,re+46+je),!(mn(ue,re+8)&2048)),An=re+46+je,ui=be(ue,re+20),ti=ee&&ui==4294967295?ci(ue,An):[ui,be(ue,re+24),be(ue,re+42)],Bi=ti[0],mi=ti[1],oi=ti[2];return[mn(ue,re+10),Bi,mi,xe,An+mn(ue,re+30)+mn(ue,re+32),oi]},ci=function(ue,re){for(;mn(ue,re)!=1;re+=4+mn(ue,re+2));return[ei(ue,re+12),ei(ue,re+4),ei(ue,re+20)]},fi=function(ue){var re=0;if(ue)for(var ee in ue){var je=ue[ee].length;je>65535&&fn(9),re+=je+4}return re},Fn=function(ue,re,ee,je,xe,An,ui,ti){var Bi=je.length,mi=ee.extra,oi=ti&&ti.length,Di=fi(mi);kn(ue,re,ui!=null?33639248:67324752),re+=4,ui!=null&&(ue[re++]=20,ue[re++]=ee.os),ue[re]=20,re+=2,ue[re++]=ee.flag<<1|(An<0&&8),ue[re++]=xe&&8,ue[re++]=ee.compression&255,ue[re++]=ee.compression>>8;var Ne=new Date(ee.mtime==null?Date.now():ee.mtime),hn=Ne.getFullYear()-1980;if((hn<0||hn>119)&&fn(10),kn(ue,re,hn<<25|Ne.getMonth()+1<<21|Ne.getDate()<<16|Ne.getHours()<<11|Ne.getMinutes()<<5|Ne.getSeconds()>>1),re+=4,An!=-1&&(kn(ue,re,ee.crc),kn(ue,re+4,An<0?-An-2:An),kn(ue,re+8,ee.size)),kn(ue,re+12,Bi),kn(ue,re+14,Di),re+=16,ui!=null&&(kn(ue,re,oi),kn(ue,re+6,ee.attrs),kn(ue,re+10,ui),re+=14),ue.set(je,re),re+=Bi,Di)for(var ke in mi){var Ot=mi[ke],vn=Ot.length;kn(ue,re,+ke),kn(ue,re+2,vn),ue.set(Ot,re+4),re+=4+vn}return oi&&(ue.set(ti,re),re+=oi),re},un=function(ue,re,ee,je,xe){kn(ue,re,101010256),kn(ue,re+8,ee),kn(ue,re+10,ee),kn(ue,re+12,je),kn(ue,re+16,xe)},We=null,Mn=null,$i=null,hr=null;function vr(ue,re,ee){ee||(ee=re,re={}),typeof ee!="function"&&fn(7);var je={};sr(ue,"",je,re);var xe=Object.keys(je),An=xe.length,ui=0,ti=0,Bi=An,mi=new Array(An),oi=[],Di=function(){for(var vn=0;vn<oi.length;++vn)oi[vn]()},Ne=function(vn,Jn){ur(function(){ee(vn,Jn)})};ur(function(){Ne=ee});var hn=function(){var vn=new le(ti+22),Jn=ui,vi=ti-ui;ti=0;for(var Ee=0;Ee<Bi;++Ee){var Wn=mi[Ee];try{var cn=Wn.c.length;Fn(vn,ti,Wn,Wn.f,Wn.u,cn);var Un=30+Wn.f.length+fi(Wn.extra),Rn=ti+Un;vn.set(Wn.c,Rn),Fn(vn,ui,Wn,Wn.f,Wn.u,cn,ti,Wn.m),ui+=16+Un+(Wn.m?Wn.m.length:0),ti=Rn+cn}catch(gn){return Ne(gn,null)}}un(vn,ui,mi.length,vi,Jn),Ne(null,vn)};An||hn();for(var ke=function(vn){var Jn=xe[vn],vi=je[Jn],Ee=vi[0],Wn=vi[1],cn=Le(),Un=Ee.length;cn.p(Ee);var Rn=Dn(Jn),gn=Rn.length,Cn=Wn.comment,Tn=Cn&&Dn(Cn),qe=Tn&&Tn.length,In=fi(Wn.extra),on=Wn.level==0?0:8,_i=function(Qi,nr){if(Qi)Di(),Ne(Qi,null);else{var Gi=nr.length;mi[vn]=ni(Wn,{size:Un,crc:cn.d(),c:nr,f:Rn,m:Tn,u:gn!=Jn.length||Tn&&Cn.length!=qe,compression:on}),ui+=30+gn+In+Gi,ti+=76+2*(gn+In)+(qe||0)+Gi,--An||hn()}};if(gn>65535&&_i(fn(11,0,1),null),!on)_i(null,Ee);else if(Un<16e4)try{_i(null,lr(Ee,Wn))}catch(Qi){_i(Qi,null)}else oi.push(Xi(Ee,Wn,_i))},Ot=0;Ot<Bi;++Ot)ke(Ot);return Di}function Te(ue,re){re||(re={});var ee={},je=[];sr(ue,"",ee,re);var xe=0,An=0;for(var ui in ee){var ti=ee[ui],Bi=ti[0],mi=ti[1],oi=mi.level==0?0:8,Di=Dn(ui),Ne=Di.length,hn=mi.comment,ke=hn&&Dn(hn),Ot=ke&&ke.length,vn=fi(mi.extra);Ne>65535&&fn(11);var Jn=oi?lr(Bi,mi):Bi,vi=Jn.length,Ee=Le();Ee.p(Bi),je.push(ni(mi,{size:Bi.length,crc:Ee.d(),c:Jn,f:Di,m:ke,u:Ne!=ui.length||ke&&hn.length!=Ot,o:xe,compression:oi})),xe+=30+Ne+vn+vi,An+=76+2*(Ne+vn)+(Ot||0)+vi}for(var Wn=new le(An+22),cn=xe,Un=An-xe,Rn=0;Rn<je.length;++Rn){var Di=je[Rn];Fn(Wn,Di.o,Di,Di.f,Di.u,Di.c.length);var gn=30+Di.f.length+fi(Di.extra);Wn.set(Di.c,Di.o+gn),Fn(Wn,xe,Di,Di.f,Di.u,Di.c.length,Di.o,Di.m),xe+=16+gn+(Di.m?Di.m.length:0)}return un(Wn,xe,je.length,Un,cn),Wn}var xi=null,er=null,Si=null,Mr=null,ur=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(ue){ue()};function Tr(ue,re,ee){ee||(ee=re,re={}),typeof ee!="function"&&fn(7);var je=[],xe=function(){for(var vn=0;vn<je.length;++vn)je[vn]()},An={},ui=function(vn,Jn){ur(function(){ee(vn,Jn)})};ur(function(){ui=ee});for(var ti=ue.length-22;be(ue,ti)!=101010256;--ti)if(!ti||ue.length-ti>65558)return ui(fn(13,0,1),null),xe;var Bi=mn(ue,ti+8);if(Bi){var mi=Bi,oi=be(ue,ti+16),Di=oi==4294967295||mi==65535;if(Di){var Ne=be(ue,ti-12);Di=be(ue,Ne)==101075792,Di&&(mi=Bi=be(ue,Ne+32),oi=be(ue,Ne+48))}for(var hn=re&&re.filter,ke=function(vn){var Jn=li(ue,oi,Di),vi=Jn[0],Ee=Jn[1],Wn=Jn[2],cn=Jn[3],Un=Jn[4],Rn=Jn[5],gn=Ni(ue,Rn);oi=Un;var Cn=function(qe,In){qe?(xe(),ui(qe,null)):(In&&(An[cn]=In),--Bi||ui(null,An))};if(!hn||hn({name:cn,size:Ee,originalSize:Wn,compression:vi}))if(!vi)Cn(null,Ke(ue,gn,gn+Ee));else if(vi==8){var Tn=ue.subarray(gn,gn+Ee);if(Wn<524288||Ee>.8*Wn)try{Cn(null,Or(Tn,{out:new le(Wn)}))}catch(qe){Cn(qe,null)}else je.push(Ir(Tn,{size:Wn},Cn))}else Cn(fn(14,"unknown compression type "+vi,1),null);else Cn(null,null)},Ot=0;Ot<mi;++Ot)ke(Ot)}else ui(null,{});return xe}function gr(ue,re){for(var ee={},je=ue.length-22;be(ue,je)!=101010256;--je)(!je||ue.length-je>65558)&&fn(13);var xe=mn(ue,je+8);if(!xe)return{};var An=be(ue,je+16),ui=An==4294967295||xe==65535;if(ui){var ti=be(ue,je-12);ui=be(ue,ti)==101075792,ui&&(xe=be(ue,ti+32),An=be(ue,ti+48))}for(var Bi=re&&re.filter,mi=0;mi<xe;++mi){var oi=li(ue,An,ui),Di=oi[0],Ne=oi[1],hn=oi[2],ke=oi[3],Ot=oi[4],vn=oi[5],Jn=Ni(ue,vn);An=Ot,(!Bi||Bi({name:ke,size:Ne,originalSize:hn,compression:Di}))&&(Di?Di==8?ee[ke]=Or(ue.subarray(Jn,Jn+Ne),{out:new le(hn)}):fn(14,"unknown compression type "+Di):ee[ke]=Ke(ue,Jn,Jn+Ne))}return ee}},12378:function(Sn,Ve,It){"use strict";It.d(Ve,{$u:function(){return he},BD:function(){return zt},E9:function(){return oe},FF:function(){return Kr},FJ:function(){return gt},Hn:function(){return dt},KX:function(){return bt},NB:function(){return ze},S0:function(){return tn},UL:function(){return Gt},Vk:function(){return at},Vm:function(){return Xe},YI:function(){return hi},ZA:function(){return le},Zt:function(){return Ie},al:function(){return Ct},bn:function(){return Et},bx:function(){return Ft},g2:function(){return ni},h1:function(){return te},hD:function(){return yi},l4:function(){return Ht},rU:function(){return Ue},s_:function(){return mt},uz:function(){return Bn},z6:function(){return Xt}}),Sn=It.hmd(Sn),function(){var kt;function tr(a){var y=0;return function(){return y<a.length?{done:!1,value:a[y++]}:{done:!0}}}function Fi(a){var y=typeof Symbol!="undefined"&&Symbol.iterator&&a[Symbol.iterator];return y?y.call(a):{next:tr(a)}}function ri(a){for(var y,x=[];!(y=a.next()).done;)x.push(y.value);return x}var Li=typeof Object.create=="function"?Object.create:function(a){function y(){}return y.prototype=a,new y},Ui;if(typeof Object.setPrototypeOf=="function")Ui=Object.setPrototypeOf;else{var Ri;t:{var Lr={a:!0},an={};try{an.__proto__=Lr,Ri=an.a;break t}catch(a){}Ri=!1}Ui=Ri?function(a,y){if(a.__proto__=y,a.__proto__!==y)throw new TypeError(a+" is not extensible");return a}:null}var rn=Ui;function Ge(a,y){if(a.prototype=Li(y.prototype),a.prototype.constructor=a,rn)rn(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 yn=typeof It.g!="undefined"&&It.g!=null?It.g:self,ji=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},Mi=typeof Object.defineProperties=="function"?Object.defineProperty:function(a,y,x){a!=Array.prototype&&a!=Object.prototype&&(a[y]=x.value)};function or(a,y){if(y){var x=yn;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&&Mi(x,a,{writable:!0,value:y})}}or("Object.assign",function(a){return a||ji}),or("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 ln=typeof globalThis=="object"&&globalThis||typeof It.g=="object"&&It.g.global===It.g&&It.g||typeof self=="object"&&self.self===self&&self||{};ln.requestAnimationFrame===void 0&&(ln.setImmediate===void 0?ln.requestAnimationFrame=function(a){ln.setTimeout(a,0)}:ln.requestAnimationFrame=ln.setImmediate);function Ln(){}function Pe(a,y){var x=-1;return function(){var E=this,b=arguments;x!==-1&&ln.clearTimeout(x),x=sr(function(){x=-1,a.apply(E,b)},y)}}function sr(a,y){return ln.setTimeout(a,y)}function $n(a){return ln.document.createElement(a)}function se(a){throw Error(a)}function De(a,y){a="The object is frozen, so its properties cannot be set: "+a.toString(),y!==void 0&&(a+=" to value: "+y),se(a)}function qn(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),se(x+" is not in the range "+y+": "+a)}function Zn(a){ln.console&&ln.console.log(a)}function Ye(a){return typeof a=="object"&&a!==null}function Dn(a){return Array.isArray(a)||ln.NodeList&&a instanceof ln.NodeList||ln.HTMLCollection&&a instanceof ln.HTMLCollection}function bi(a){return Array.prototype.slice.call(a)}function ki(a,y,x){Array.isArray(a)?y>=a.length?a.push(x):a.splice(y,0,x):se("Cannot insert an object into an HTMLCollection or NodeList: "+x+" at "+y)}function Ni(a,y){Array.isArray(a)?y>=a.length?a.pop():a.splice(y,1):se("Cannot remove an object from an HTMLCollection or NodeList at "+y)}function li(){var a=vr.pop();return a===void 0?[]:a}function ci(a){a.length=0,vr.push(a)}function fi(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(Ye(a)&&a.constructor)return fi(a.constructor);return typeof a}function Fn(a){var y=a;return Ye(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 un(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 We(a,y,x){Object.defineProperty(Eo.prototype,a,{get:y,set:x})}function Mn(a){for(var y=[],x=0;256>x;x++)y["0123456789abcdef".charAt(x>>4)+"0123456789abcdef".charAt(x&15)]=String.fromCharCode(x);a.length%2&&(a="0"+a),x=[];for(var E=0,b=0;b<a.length;b+=2)x[E++]=y[a.substr(b,2)];for(a=x.join(""),a=a===""?"0":a,y=[],x=0;256>x;x++)y[x]=x;for(x=E=0;256>x;x++)E=(E+y[x]+119)%256,b=y[x],y[x]=y[E],y[E]=b;E=x=0;for(var z="",tt=0;tt<a.length;tt++)x=(x+1)%256,E=(E+y[x])%256,b=y[x],y[x]=y[E],y[E]=b,z+=String.fromCharCode(a.charCodeAt(tt)^y[(y[x]+y[E])%256]);return z.indexOf("GoJS 2.1 evaluation")>-1||z.indexOf("\xA9 1998-2021 Northwoods Software")>-1||z.indexOf("Not for distribution or production use")>-1||z.indexOf("gojs.net")>-1?"":z}var $i=ln.navigator!==void 0&&0<ln.navigator.userAgent.indexOf("Trident/7"),hr=ln.navigator!==void 0&&ln.navigator.platform!==void 0&&ln.navigator.platform.match(/(iPhone|iPod|iPad|Mac)/i)!==null,vr=[];Object.freeze([]),Ln.className="Util",Ln.Dx="32ab5ff3b26f42dc0ed90f21472913b5",Ln.adym="gojs.net",Ln.vfo="28e645fdb266",Ln.className="Util";function Te(a,y,x){An(this),this.j=a,this.xa=y,this.o=x}Te.prototype.toString=function(){return"EnumValue."+this.xa};function xi(a,y){return y==null||y===""?null:a[y]}yn.Object.defineProperties(Te.prototype,{classType:{get:function(){return this.j}},name:{get:function(){return this.xa}},value:{get:function(){return this.o}}}),Te.className="EnumValue";function er(){this.ew=[]}er.prototype.toString=function(){return this.ew.join("")},er.prototype.add=function(a){a!==""&&this.ew.push(a)},er.className="StringBuilder";function Si(){}Si.className="PropertyCollection";var Mr={EA:!1,JA:!1,GA:!1,IA:!1,NA:!1,LA:!1,nx:!1,FA:null,trace:function(a){ln.console&&ln.console.log(a)},HA:function(a,y,x,E){a.strokeStyle="red",a.fillStyle="red",a.font="8px sans-serif",a.beginPath(),a.moveTo(-10,0),a.lineTo(10,0),a.moveTo(0,-10),a.lineTo(0,10),a.stroke(),a.setTransform(1,0,0,1,0,0),a.scale(x,x),a.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),a.lineWidth=2,a.beginPath(),a.moveTo(E.left,E.top+20),a.lineTo(E.left,E.top),a.lineTo(E.left+20,E.top),a.moveTo(E.right,E.bottom-20),a.lineTo(E.right,E.bottom),a.lineTo(E.right-20,E.bottom),a.stroke(),a.fillText("DB: "+Math.round(E.x)+", "+Math.round(E.y)+", "+Math.round(E.width)+", "+Math.round(E.height),E.left,E.top-5)},DA:function(a){var y={},x;for(x in a){if(y.x=x,y.x!=="licenseKey"){var E=a[y.x];if(E.prototype!==void 0){y.Zl=Object.getOwnPropertyNames(E.prototype);for(var b={Tj:0};b.Tj<y.Zl.length;b={Tj:b.Tj},b.Tj++){var z=Object.getOwnPropertyDescriptor(E.prototype,y.Zl[b.Tj]);z.get!==void 0&&z.set===void 0&&Object.defineProperty(E.prototype,y.Zl[b.Tj],{set:function(tt,rt){return function(){throw Error("Property "+tt.Zl[rt.Tj]+" of "+tt.x+" is read-only.")}}(y,b)})}}}y={Zl:y.Zl,x:y.x}}}};function ur(){}ur.prototype.reset=function(){},ur.prototype.next=function(){return!1},ur.prototype.Ad=function(){return!1},ur.prototype.first=function(){return null},ur.prototype.any=function(){return!1},ur.prototype.all=function(){return!0},ur.prototype.each=function(){return this},ur.prototype.map=function(){return this},ur.prototype.filter=function(){return this},ur.prototype.de=function(){},ur.prototype.toString=function(){return"EmptyIterator"},yn.Object.defineProperties(ur.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 0}}}),ur.prototype.first=ur.prototype.first,ur.prototype.hasNext=ur.prototype.Ad,ur.prototype.next=ur.prototype.next,ur.prototype.reset=ur.prototype.reset;var Tr=null;ur.className="EmptyIterator",Tr=new ur;function gr(a){this.key=-1,this.value=a}gr.prototype.reset=function(){this.key=-1},gr.prototype.next=function(){return this.key===-1?(this.key=0,!0):!1},gr.prototype.Ad=function(){return this.next()},gr.prototype.first=function(){return this.key=0,this.value},gr.prototype.any=function(a){return this.key=-1,a(this.value)},gr.prototype.all=function(a){return this.key=-1,a(this.value)},gr.prototype.each=function(a){return this.key=-1,a(this.value),this},gr.prototype.map=function(a){return new gr(a(this.value))},gr.prototype.filter=function(a){return a(this.value)?new gr(this.value):Tr},gr.prototype.de=function(){this.value=null},gr.prototype.toString=function(){return"SingletonIterator("+this.value+")"},yn.Object.defineProperties(gr.prototype,{iterator:{get:function(){return this}},count:{get:function(){return 1}}}),gr.prototype.first=gr.prototype.first,gr.prototype.hasNext=gr.prototype.Ad,gr.prototype.next=gr.prototype.next,gr.prototype.reset=gr.prototype.reset,gr.className="SingletonIterator";function ue(a){this.Bb=a,this.qf=null,a.Sa=null,this.qa=a.Ja,this.Za=-1}ue.prototype.reset=function(){var a=this.Bb;a.Sa=null,this.qa=a.Ja,this.Za=-1},ue.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},ue.prototype.Ad=function(){return this.next()},ue.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},ue.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},ue.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},ue.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},ue.prototype.map=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&x.push(a(tt))}return a=new ee,a.s=x,a.xb(),a.iterator},ue.prototype.filter=function(a){var y=this.Bb;y.Sa=null,this.Za=-1;var x=[];y=y.s;for(var E=y.length,b=this.qf,z=0;z<E;z++){var tt=y[z];(b===null||b(tt))&&a(tt)&&x.push(tt)}return a=new ee,a.s=x,a.xb(),a.iterator},ue.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.qf=null,this.Bb.Sa=this},ue.prototype.toString=function(){return"ListIterator@"+this.Za+"/"+this.Bb.count},yn.Object.defineProperties(ue.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}}}),ue.prototype.first=ue.prototype.first,ue.prototype.hasNext=ue.prototype.Ad,ue.prototype.next=ue.prototype.next,ue.prototype.reset=ue.prototype.reset,ue.className="ListIterator";function re(a){this.Bb=a,a.Hg=null,this.qa=a.Ja,this.Za=a.s.length}re.prototype.reset=function(){var a=this.Bb;a.Hg=null,this.qa=a.Ja,this.Za=a.s.length},re.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)},re.prototype.Ad=function(){return this.next()},re.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},re.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},re.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},re.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},re.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 ee,a.s=x,a.xb(),a.iterator},re.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 ee,a.s=x,a.xb(),a.iterator},re.prototype.de=function(){this.key=-1,this.value=null,this.qa=-1,this.Bb.Hg=this},re.prototype.toString=function(){return"ListIteratorBackwards("+this.Za+"/"+this.Bb.count+")"},yn.Object.defineProperties(re.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.Bb.s.length}}}),re.prototype.first=re.prototype.first,re.prototype.hasNext=re.prototype.Ad,re.prototype.next=re.prototype.next,re.prototype.reset=re.prototype.reset,re.className="ListIteratorBackwards";function ee(a){An(this),this._isFrozen=!1,this.s=[],this.Ja=0,this.Hg=this.Sa=null,typeof a=="string"&&se("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}kt=ee.prototype,kt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return this._isFrozen=!1,this},kt.toString=function(){return"List()#"+ti(this)},kt.add=function(a){return a===null?this:(this._isFrozen&&De(this,a),this.s.push(a),this.xb(),this)},kt.push=function(a){this.add(a)},kt.addAll=function(a){if(a===null)return this;this._isFrozen&&De(this);var y=this.s;if(Dn(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},kt.clear=function(){this._isFrozen&&De(this),this.s.length=0,this.xb()},kt.contains=function(a){return a===null?!1:this.s.indexOf(a)!==-1},kt.has=function(a){return this.contains(a)},kt.indexOf=function(a){return a===null?-1:this.s.indexOf(a)},kt.M=function(a){var y=this.s;return(0>a||a>=y.length)&&qn(a,"0 <= i < length",ee,"elt:i"),y[a]},kt.get=function(a){return this.M(a)},kt.cd=function(a,y){var x=this.s;(0>a||a>=x.length)&&qn(a,"0 <= i < length",ee,"setElt:i"),this._isFrozen&&De(this,a),x[a]=y},kt.set=function(a,y){this.cd(a,y)},kt.first=function(){var a=this.s;return a.length===0?null:a[0]},kt.jc=function(){var a=this.s,y=a.length;return 0<y?a[y-1]:null},kt.pop=function(){this._isFrozen&&De(this);var a=this.s;return 0<a.length?a.pop():null},ee.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},ee.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},ee.prototype.each=function(a){for(var y=this.s,x=y.length,E=0;E<x;E++)a(y[E]);return this},ee.prototype.map=function(a){for(var y=new ee,x=[],E=this.s,b=E.length,z=0;z<b;z++)x.push(a(E[z]));return y.s=x,y.xb(),y},ee.prototype.filter=function(a){for(var y=new ee,x=[],E=this.s,b=E.length,z=0;z<b;z++){var tt=E[z];a(tt)&&x.push(tt)}return y.s=x,y.xb(),y},kt=ee.prototype,kt.Gb=function(a,y){0>a&&qn(a,">= 0",ee,"insertAt:i"),this._isFrozen&&De(this,a);var x=this.s;a>=x.length?x.push(y):x.splice(a,0,y),this.xb()},kt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(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)},kt.delete=function(a){return this.remove(a)},kt.mb=function(a){var y=this.s;(0>a||a>=y.length)&&qn(a,"0 <= i < length",ee,"removeAt:i"),this._isFrozen&&De(this,a),a===y.length-1?y.pop():y.splice(a,1),this.xb()},kt.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&&De(this);for(var b=a,z=y+1;z<E;)x[b++]=x[z++];return x.length=E-(y-a+1),this.xb(),this},ee.prototype.copy=function(){var a=new ee,y=this.s;return 0<y.length&&(a.s=Array.prototype.slice.call(y)),a},kt=ee.prototype,kt.Fa=function(){for(var a=this.s,y=this.count,x=Array(y),E=0;E<y;E++)x[E]=a[E];return x},kt.Iv=function(){for(var a=new xe,y=this.s,x=this.count,E=0;E<x;E++)a.add(y[E]);return a},kt.sort=function(a){return this._isFrozen&&De(this),this.s.sort(a),this.xb(),this},kt.zi=function(a,y,x){var E=this.s,b=E.length;y===void 0&&(y=0),x===void 0&&(x=b),this._isFrozen&&De(this);var z=x-y;if(1>=z)return this;if((0>y||y>=b-1)&&qn(y,"0 <= from < length",ee,"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},kt.reverse=function(){return this._isFrozen&&De(this),this.s.reverse(),this.xb(),this},yn.Object.defineProperties(ee.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 Tr;var a=this.Sa;return a!==null?(a.reset(),a):new ue(this)}},iteratorBackwards:{get:function(){if(0>=this.s.length)return Tr;var a=this.Hg;return a!==null?(a.reset(),a):new re(this)}}}),ee.prototype.reverse=ee.prototype.reverse,ee.prototype.sortRange=ee.prototype.zi,ee.prototype.sort=ee.prototype.sort,ee.prototype.toSet=ee.prototype.Iv,ee.prototype.toArray=ee.prototype.Fa,ee.prototype.removeRange=ee.prototype.removeRange,ee.prototype.removeAt=ee.prototype.mb,ee.prototype.delete=ee.prototype.delete,ee.prototype.remove=ee.prototype.remove,ee.prototype.insertAt=ee.prototype.Gb,ee.prototype.pop=ee.prototype.pop,ee.prototype.last=ee.prototype.jc,ee.prototype.first=ee.prototype.first,ee.prototype.set=ee.prototype.set,ee.prototype.setElt=ee.prototype.cd,ee.prototype.get=ee.prototype.get,ee.prototype.elt=ee.prototype.M,ee.prototype.indexOf=ee.prototype.indexOf,ee.prototype.has=ee.prototype.has,ee.prototype.contains=ee.prototype.contains,ee.prototype.clear=ee.prototype.clear,ee.prototype.addAll=ee.prototype.addAll,ee.prototype.push=ee.prototype.push,ee.prototype.add=ee.prototype.add,ee.prototype.thaw=ee.prototype.ka,ee.prototype.freeze=ee.prototype.freeze,ee.className="List";function je(a){this.eg=a,a.Sa=null,this.qa=a.Ja,this.sa=null}je.prototype.reset=function(){var a=this.eg;a.Sa=null,this.qa=a.Ja,this.sa=null},je.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)},je.prototype.Ad=function(){return this.next()},je.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},je.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},je.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},je.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},je.prototype.map=function(a){var y=this.eg;y.Sa=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},je.prototype.filter=function(a){var y=this.eg;y.Sa=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},je.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.eg.Sa=this},je.prototype.toString=function(){return this.sa!==null?"SetIterator@"+this.sa.value:"SetIterator"},yn.Object.defineProperties(je.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.eg.Sb}}}),je.prototype.first=je.prototype.first,je.prototype.hasNext=je.prototype.Ad,je.prototype.next=je.prototype.next,je.prototype.reset=je.prototype.reset,je.className="SetIterator";function xe(a){An(this),this._isFrozen=!1,this.Tb={},this.Sb=0,this.Sa=null,this.Ja=0,this.kf=this.ea=null,typeof a=="string"&&se("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}kt=xe.prototype,kt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return this._isFrozen=!1,this},kt.toString=function(){return"Set()#"+ti(this)},kt.add=function(a){if(a===null)return this;this._isFrozen&&De(this,a);var y=a;return Ye(a)&&(y=ui(a)),this.Tb[y]===void 0&&(this.Sb++,a=new Ne(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},kt.addAll=function(a){if(a===null)return this;if(this._isFrozen&&De(this),Dn(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},kt.contains=function(a){if(a===null)return!1;var y=a;return Ye(a)&&(y=ti(a),y===void 0)?!1:this.Tb[y]!==void 0},kt.has=function(a){return this.contains(a)},kt.Sy=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(!this.contains(a.value))return!1;return!0},kt.Ty=function(a){if(a===null)return!0;for(a=a.iterator;a.next();)if(this.contains(a.value))return!0;return!1},kt.first=function(){var a=this.ea;return a===null?null:a.value},xe.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y.value))return!0;y=y.va}return!1},xe.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y.value))return!1;y=y.va}return!0},xe.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y.value),y=y.va;return this},xe.prototype.map=function(a){for(var y=new xe,x=this.ea;x!==null;)y.add(a(x.value)),x=x.va;return y},xe.prototype.filter=function(a){for(var y=new xe,x=this.ea;x!==null;){var E=x.value;a(E)&&y.add(E),x=x.va}return y},kt=xe.prototype,kt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(this,a);var y=a;if(Ye(a)&&(y=ti(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},kt.delete=function(a){return this.remove(a)},kt.hp=function(a){if(a===null)return this;if(this._isFrozen&&De(this),Dn(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},kt.pA=function(a){if(a===null||this.count===0)return this;this._isFrozen&&De(this);var y=new xe;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},kt.clear=function(){this._isFrozen&&De(this),this.Tb={},this.Sb=0,this.Sa!==null&&this.Sa.reset(),this.kf=this.ea=null,this.xb()},xe.prototype.copy=function(){var a=new xe,y=this.Tb,x;for(x in y)a.add(y[x].value);return a},xe.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},xe.prototype.Hv=function(){var a=new ee,y=this.Tb,x;for(x in y)a.add(y[x].value);return a};function An(a){a.__gohashid=Bi++}function ui(a){var y=a.__gohashid;return y===void 0&&(y=Bi++,a.__gohashid=y),y}function ti(a){return a.__gohashid}yn.Object.defineProperties(xe.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.Sb)return Tr;var a=this.Sa;return a!==null?(a.reset(),a):new je(this)}}}),xe.prototype.toList=xe.prototype.Hv,xe.prototype.toArray=xe.prototype.Fa,xe.prototype.clear=xe.prototype.clear,xe.prototype.retainAll=xe.prototype.pA,xe.prototype.removeAll=xe.prototype.hp,xe.prototype.delete=xe.prototype.delete,xe.prototype.remove=xe.prototype.remove,xe.prototype.first=xe.prototype.first,xe.prototype.containsAny=xe.prototype.Ty,xe.prototype.containsAll=xe.prototype.Sy,xe.prototype.has=xe.prototype.has,xe.prototype.contains=xe.prototype.contains,xe.prototype.addAll=xe.prototype.addAll,xe.prototype.add=xe.prototype.add,xe.prototype.thaw=xe.prototype.ka,xe.prototype.freeze=xe.prototype.freeze;var Bi=1;xe.className="Set",xe.uniqueHash=An,xe.hashIdUnique=ui,xe.hashId=ti;function mi(a){this.ma=a,this.qa=a.Ja,this.sa=null}mi.prototype.reset=function(){this.qa=this.ma.Ja,this.sa=null},mi.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)},mi.prototype.Ad=function(){return this.next()},mi.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},mi.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},mi.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},mi.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},mi.prototype.map=function(a){var y=this.ma;this.sa=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.key)),y=y.va;return x.iterator},mi.prototype.filter=function(a){var y=this.ma;this.sa=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.key;a(E)&&x.add(E),y=y.va}return x.iterator},mi.prototype.de=function(){this.value=this.key=null,this.qa=-1},mi.prototype.toString=function(){return this.sa!==null?"MapKeySetIterator@"+this.sa.value:"MapKeySetIterator"},yn.Object.defineProperties(mi.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),mi.prototype.first=mi.prototype.first,mi.prototype.hasNext=mi.prototype.Ad,mi.prototype.next=mi.prototype.next,mi.prototype.reset=mi.prototype.reset,mi.className="MapKeySetIterator";function oi(a){xe.call(this),An(this),this._isFrozen=!0,this.ma=a}Ge(oi,xe),kt=oi.prototype,kt.freeze=function(){return this},kt.ka=function(){return this},kt.toString=function(){return"MapKeySet("+this.ma.toString()+")"},kt.add=function(){se("This Set is read-only: "+this.toString())},kt.contains=function(a){return this.ma.contains(a)},kt.has=function(a){return this.contains(a)},kt.remove=function(){se("This Set is read-only: "+this.toString())},kt.delete=function(a){return this.remove(a)},kt.clear=function(){se("This Set is read-only: "+this.toString())},kt.first=function(){var a=this.ma.ea;return a!==null?a.key:null},oi.prototype.any=function(a){for(var y=this.ma.ea;y!==null;){if(a(y.key))return!0;y=y.va}return!1},oi.prototype.all=function(a){for(var y=this.ma.ea;y!==null;){if(!a(y.key))return!1;y=y.va}return!0},oi.prototype.each=function(a){for(var y=this.ma.ea;y!==null;)a(y.key),y=y.va;return this},oi.prototype.map=function(a){for(var y=new xe,x=this.ma.ea;x!==null;)y.add(a(x.key)),x=x.va;return y},oi.prototype.filter=function(a){for(var y=new xe,x=this.ma.ea;x!==null;){var E=x.key;a(E)&&y.add(E),x=x.va}return y},oi.prototype.copy=function(){return new oi(this.ma)},oi.prototype.Iv=function(){var a=new xe,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},oi.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},oi.prototype.Hv=function(){var a=new ee,y=this.ma.Tb,x;for(x in y)a.add(y[x].key);return a},yn.Object.defineProperties(oi.prototype,{count:{get:function(){return this.ma.Sb}},size:{get:function(){return this.ma.Sb}},iterator:{get:function(){return 0>=this.ma.Sb?Tr:new mi(this.ma)}}}),oi.prototype.toList=oi.prototype.Hv,oi.prototype.toArray=oi.prototype.Fa,oi.prototype.toSet=oi.prototype.Iv,oi.prototype.first=oi.prototype.first,oi.prototype.clear=oi.prototype.clear,oi.prototype.delete=oi.prototype.delete,oi.prototype.remove=oi.prototype.remove,oi.prototype.has=oi.prototype.has,oi.prototype.contains=oi.prototype.contains,oi.prototype.add=oi.prototype.add,oi.prototype.thaw=oi.prototype.ka,oi.prototype.freeze=oi.prototype.freeze,oi.className="MapKeySet";function Di(a){this.ma=a,a.jf=null,this.qa=a.Ja,this.sa=null}Di.prototype.reset=function(){var a=this.ma;a.jf=null,this.qa=a.Ja,this.sa=null},Di.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)},Di.prototype.Ad=function(){return this.next()},Di.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},Di.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},Di.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},Di.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},Di.prototype.map=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y.value)),y=y.va;return x.iterator},Di.prototype.filter=function(a){var y=this.ma;this.sa=y.jf=null;var x=new ee;for(y=y.ea;y!==null;){var E=y.value;a(E)&&x.add(E),y=y.va}return x.iterator},Di.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.jf=this},Di.prototype.toString=function(){return this.sa!==null?"MapValueSetIterator@"+this.sa.value:"MapValueSetIterator"},yn.Object.defineProperties(Di.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),Di.prototype.first=Di.prototype.first,Di.prototype.hasNext=Di.prototype.Ad,Di.prototype.next=Di.prototype.next,Di.prototype.reset=Di.prototype.reset,Di.className="MapValueSetIterator";function Ne(a,y){this.key=a,this.value=y,this.ll=this.va=null}Ne.prototype.toString=function(){return"{"+this.key+":"+this.value+"}"},Ne.className="KeyValuePair";function hn(a){this.ma=a,a.Sa=null,this.qa=a.Ja,this.sa=null}hn.prototype.reset=function(){var a=this.ma;a.Sa=null,this.qa=a.Ja,this.sa=null},hn.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)},hn.prototype.Ad=function(){return this.next()},hn.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},hn.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},hn.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},hn.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},hn.prototype.map=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ee;for(y=y.ea;y!==null;)x.add(a(y)),y=y.va;return x.iterator},hn.prototype.filter=function(a){var y=this.ma;this.sa=y.Sa=null;var x=new ee;for(y=y.ea;y!==null;)a(y)&&x.add(y),y=y.va;return x.iterator},hn.prototype.de=function(){this.value=this.key=null,this.qa=-1,this.ma.Sa=this},hn.prototype.toString=function(){return this.sa!==null?"MapIterator@"+this.sa:"MapIterator"},yn.Object.defineProperties(hn.prototype,{iterator:{get:function(){return this}},count:{get:function(){return this.ma.Sb}}}),hn.prototype.first=hn.prototype.first,hn.prototype.hasNext=hn.prototype.Ad,hn.prototype.next=hn.prototype.next,hn.prototype.reset=hn.prototype.reset,hn.className="MapIterator";function ke(a){An(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"&&se("Error: Since 2.0 List/Map/Set constructors no longer take an argument that enforces type."),a!==void 0&&this.addAll(a)}kt=ke.prototype,kt.xb=function(){var a=this.Ja;a++,999999999<a&&(a=0),this.Ja=a},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return this._isFrozen=!1,this},kt.toString=function(){return"Map()#"+ti(this)},kt.add=function(a,y){this._isFrozen&&De(this,a);var x=a;Ye(a)&&(x=ui(a));var E=this.Tb[x];return E===void 0?(this.Sb++,a=new Ne(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},kt.set=function(a,y){return this.add(a,y)},kt.addAll=function(a){if(a===null)return this;if(Dn(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 ke)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},kt.first=function(){return this.ea},ke.prototype.any=function(a){for(var y=this.ea;y!==null;){if(a(y))return!0;y=y.va}return!1},ke.prototype.all=function(a){for(var y=this.ea;y!==null;){if(!a(y))return!1;y=y.va}return!0},ke.prototype.each=function(a){for(var y=this.ea;y!==null;)a(y),y=y.va;return this},ke.prototype.map=function(a){for(var y=new ke,x=this.ea;x!==null;)y.add(x.key,a(x)),x=x.va;return y},ke.prototype.filter=function(a){for(var y=new ke,x=this.ea;x!==null;)a(x)&&y.add(x.key,x.value),x=x.va;return y},kt=ke.prototype,kt.contains=function(a){var y=a;return Ye(a)&&(y=ti(a),y===void 0)?!1:this.Tb[y]!==void 0},kt.has=function(a){return this.contains(a)},kt.I=function(a){var y=a;return Ye(a)&&(y=ti(a),y===void 0)?null:(a=this.Tb[y],a===void 0?null:a.value)},kt.get=function(a){return this.I(a)},kt.remove=function(a){if(a===null)return!1;this._isFrozen&&De(this,a);var y=a;if(Ye(a)&&(y=ti(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},kt.delete=function(a){return this.remove(a)},kt.clear=function(){this._isFrozen&&De(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()},ke.prototype.copy=function(){var a=new ke,y=this.Tb,x;for(x in y){var E=y[x];a.add(E.key,E.value)}return a},ke.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 Ne(b.key,b.value),x++}return y},ke.prototype.Lf=function(){return new oi(this)},yn.Object.defineProperties(ke.prototype,{count:{get:function(){return this.Sb}},size:{get:function(){return this.Sb}},iterator:{get:function(){if(0>=this.count)return Tr;var a=this.Sa;return a!==null?(a.reset(),a):new hn(this)}},iteratorKeys:{get:function(){return 0>=this.count?Tr:new mi(this)}},iteratorValues:{get:function(){if(0>=this.count)return Tr;var a=this.jf;return a!==null?(a.reset(),a):new Di(this)}}}),ke.prototype.toKeySet=ke.prototype.Lf,ke.prototype.toArray=ke.prototype.Fa,ke.prototype.clear=ke.prototype.clear,ke.prototype.delete=ke.prototype.delete,ke.prototype.remove=ke.prototype.remove,ke.prototype.get=ke.prototype.get,ke.prototype.getValue=ke.prototype.I,ke.prototype.has=ke.prototype.has,ke.prototype.contains=ke.prototype.contains,ke.prototype.first=ke.prototype.first,ke.prototype.addAll=ke.prototype.addAll,ke.prototype.set=ke.prototype.set,ke.prototype.add=ke.prototype.add,ke.prototype.thaw=ke.prototype.ka,ke.prototype.freeze=ke.prototype.freeze,ke.className="Map";function Ot(a,y){a===void 0?this.y=this.x=0:typeof a=="number"&&typeof y=="number"?(this.x=a,this.y=y):se("Invalid arguments to Point constructor: "+a+", "+y),this._isFrozen=!1}var vn,Jn,vi,Ee,Wn;Ot.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this},Ot.prototype.h=function(a,y){return this.x=a,this.y=y,this},Ot.prototype.sg=function(a,y){return this.x=a,this.y=y,this},Ot.prototype.set=function(a){return this.x=a.x,this.y=a.y,this},Ot.prototype.copy=function(){var a=new Ot;return a.x=this.x,a.y=this.y,a},kt=Ot.prototype,kt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},kt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this};function cn(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 Ot(x,b)}return new Ot}function Un(a){return a.x.toString()+" "+a.y.toString()}kt.toString=function(){return"Point("+this.x+","+this.y+")"},kt.D=function(a){return a instanceof Ot?this.x===a.x&&this.y===a.y:!1},kt.hi=function(a,y){return this.x===a&&this.y===y},kt.Xa=function(a){return Be.B(this.x,a.x)&&Be.B(this.y,a.y)},kt.add=function(a){return this.x+=a.x,this.y+=a.y,this},kt.re=function(a){return this.x-=a.x,this.y-=a.y,this},kt.offset=function(a,y){return this.x+=a,this.y+=y,this},Ot.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},kt=Ot.prototype,kt.scale=function(a,y){return this.x*=a,this.y*=y,this},kt.Bf=function(a){var y=a.x-this.x;return a=a.y-this.y,y*y+a*a},kt.zd=function(a,y){return a-=this.x,y-=this.y,a*a+y*y},kt.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},kt.ab=function(a){return Rn(a.x-this.x,a.y-this.y)},kt.direction=function(a,y){return Rn(a-this.x,y-this.y)};function Rn(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}kt.Ry=function(a,y){return Be.Fl(a.x,a.y,y.x,y.y,this.x,this.y)},kt.fA=function(a,y,x,E){return Be.qh(a,y,x,E,this.x,this.y,this),this},kt.gA=function(a,y){return Be.qh(a.x,a.y,y.x,y.y,this.x,this.y,this),this},kt.uA=function(a,y,x,E){return Be.No(this.x,this.y,a,y,x,E,this),this},kt.vA=function(a,y){return Be.No(this.x,this.y,a.x,a.y,y.width,y.height,this),this},kt.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},kt.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},kt.transform=function(a){return a.Ga(this),this};function gn(a,y){return y.Cd(a),a}function Cn(a,y,x,E,b,z){var tt=b-x,rt=z-E,ot=tt*tt+rt*rt;x-=a,E-=y;var lt=-x*tt-E*rt;return 0>=lt||lt>=ot?(tt=b-a,rt=z-y,Math.min(x*x+E*E,tt*tt+rt*rt)):(a=tt*E-rt*x,a*a/ot)}function Tn(a,y,x,E){return a=x-a,y=E-y,a*a+y*y}function qe(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)}kt.w=function(){return isFinite(this.x)&&isFinite(this.y)},Ot.alloc=function(){var a=In.pop();return a===void 0?new Ot:a},Ot.allocAt=function(a,y){var x=In.pop();return x===void 0?new Ot(a,y):(x.x=a,x.y=y,x)},Ot.free=function(a){In.push(a)},Ot.prototype.isReal=Ot.prototype.w,Ot.prototype.setSpot=Ot.prototype.yi,Ot.prototype.setRectSpot=Ot.prototype.xi,Ot.prototype.snapToGridPoint=Ot.prototype.vA,Ot.prototype.snapToGrid=Ot.prototype.uA,Ot.prototype.projectOntoLineSegmentPoint=Ot.prototype.gA,Ot.prototype.projectOntoLineSegment=Ot.prototype.fA,Ot.intersectingLineSegments=function(a,y,x,E,b,z,tt,rt){return Be.Rl(a,y,x,E,b,z,tt,rt)},Ot.prototype.compareWithLineSegmentPoint=Ot.prototype.Ry,Ot.compareWithLineSegment=function(a,y,x,E,b,z){return Be.Fl(a,y,x,E,b,z)},Ot.prototype.direction=Ot.prototype.direction,Ot.prototype.directionPoint=Ot.prototype.ab,Ot.prototype.normalize=Ot.prototype.normalize,Ot.prototype.distanceSquared=Ot.prototype.zd,Ot.prototype.distanceSquaredPoint=Ot.prototype.Bf,Ot.prototype.scale=Ot.prototype.scale,Ot.prototype.rotate=Ot.prototype.rotate,Ot.prototype.offset=Ot.prototype.offset,Ot.prototype.subtract=Ot.prototype.re,Ot.prototype.add=Ot.prototype.add,Ot.prototype.equalsApprox=Ot.prototype.Xa,Ot.prototype.equalTo=Ot.prototype.hi,Ot.prototype.equals=Ot.prototype.D,Ot.prototype.set=Ot.prototype.set,Ot.prototype.setTo=Ot.prototype.sg;var In=[];Ot.className="Point",Ot.parse=cn,Ot.stringify=Un,Ot.distanceLineSegmentSquared=Cn,Ot.distanceSquared=Tn,Ot.direction=qe,Ot.Origin=vn=new Ot(0,0).ja(),Ot.InfiniteTopLeft=Jn=new Ot(-1/0,-1/0).ja(),Ot.InfiniteBottomRight=vi=new Ot(1/0,1/0).ja(),Ot.SixPoint=Ee=new Ot(6,6).ja(),Ot.NoPoint=Wn=new Ot(NaN,NaN).ja(),Ot.parse=cn,Ot.stringify=Un,Ot.distanceLineSegmentSquared=Cn,Ot.distanceSquared=Tn,Ot.direction=qe;function on(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):se("Invalid arguments to Size constructor: "+a+", "+y),this._isFrozen=!1}var _i,Qi,nr,Gi,Fr,yr,Zr;on.prototype.assign=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.h=function(a,y){return this.width=a,this.height=y,this},on.prototype.sg=function(a,y){return this.width=a,this.height=y,this},on.prototype.set=function(a){return this.width=a.width,this.height=a.height,this},on.prototype.copy=function(){var a=new on;return a.width=this.width,a.height=this.height,a},kt=on.prototype,kt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},kt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this};function _r(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 on(x,b)}return new on}function Wr(a){return a.width.toString()+" "+a.height.toString()}kt.toString=function(){return"Size("+this.width+","+this.height+")"},kt.D=function(a){return a instanceof on?this.width===a.width&&this.height===a.height:!1},kt.hi=function(a,y){return this.width===a&&this.height===y},kt.Xa=function(a){return Be.B(this.width,a.width)&&Be.B(this.height,a.height)},kt.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},kt.w=function(){return isFinite(this.width)&&isFinite(this.height)},on.alloc=function(){var a=no.pop();return a===void 0?new on:a},on.free=function(a){no.push(a)},on.prototype.isReal=on.prototype.w,on.prototype.inflate=on.prototype.Bc,on.prototype.equalsApprox=on.prototype.Xa,on.prototype.equalTo=on.prototype.hi,on.prototype.equals=on.prototype.D,on.prototype.set=on.prototype.set,on.prototype.setTo=on.prototype.sg;var no=[];on.className="Size",on.parse=_r,on.stringify=Wr,on.ZeroSize=_i=new on(0,0).ja(),on.OneSize=Qi=new on(1,1).ja(),on.SixSize=nr=new on(6,6).ja(),on.EightSize=Gi=new on(8,8).ja(),on.TenSize=Fr=new on(10,10).ja(),on.InfiniteSize=yr=new on(1/0,1/0).ja(),on.NoSize=Zr=new on(NaN,NaN).ja(),on.parse=_r,on.stringify=Wr;function Oe(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 Ot?(x=a.x,a=a.y,y instanceof Ot?(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 on?(this.x=x,this.y=a,this.width=y.width,this.height=y.height):se("Incorrect second argument supplied to Rect constructor "+y)):se("Invalid arguments to Rect constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}kt=Oe.prototype,kt.assign=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},kt.h=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this};function Nr(a,y,x){a.width=y,a.height=x}kt.sg=function(a,y,x,E){return this.x=a,this.y=y,this.width=x,this.height=E,this},kt.set=function(a){return this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this},kt.dd=function(a){return this.x=a.x,this.y=a.y,this},kt.tA=function(a){return this.width=a.width,this.height=a.height,this},Oe.prototype.copy=function(){var a=new Oe;return a.x=this.x,a.y=this.y,a.width=this.width,a.height=this.height,a},kt=Oe.prototype,kt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},kt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this};function Ur(a){if(typeof a=="string"){a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;(E=a[y++])&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;(E=a[y++])&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),new Oe(x,b,z,tt)}return new Oe}function Sr(a){return a.x.toString()+" "+a.y.toString()+" "+a.width.toString()+" "+a.height.toString()}kt.toString=function(){return"Rect("+this.x+","+this.y+","+this.width+","+this.height+")"},kt.D=function(a){return a instanceof Oe?this.x===a.x&&this.y===a.y&&this.width===a.width&&this.height===a.height:!1},kt.hi=function(a,y,x,E){return this.x===a&&this.y===y&&this.width===x&&this.height===E},kt.Xa=function(a){return Be.B(this.x,a.x)&&Be.B(this.y,a.y)&&Be.B(this.width,a.width)&&Be.B(this.height,a.height)};function Ar(a,y){return Be.$(a.x,y.x)&&Be.$(a.y,y.y)&&Be.$(a.width,y.width)&&Be.$(a.height,y.height)}kt.ca=function(a){return this.x<=a.x&&this.x+this.width>=a.x&&this.y<=a.y&&this.y+this.height>=a.y},kt.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},kt.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},kt.offset=function(a,y){return this.x+=a,this.y+=y,this},kt.Bc=function(a,y){return Jr(this,y,a,y,a)},kt.Co=function(a){return Jr(this,a.top,a.right,a.bottom,a.left)},kt.Fv=function(a){return Jr(this,-a.top,-a.right,-a.bottom,-a.left)},kt.Hz=function(a,y,x,E){return Jr(this,a,y,x,E)};function Jr(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}kt.Ex=function(a){return Ao(this,a.x,a.y,a.width,a.height)},kt.Uu=function(a,y,x,E){return Ao(this,a,y,x,E)};function Ao(a,y,x,E,b){var z=Math.max(a.x,y),tt=Math.max(a.y,x);return y=Math.min(a.x+a.width,y+E),x=Math.min(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=Math.max(0,y-z),a.height=Math.max(0,x-tt),a}kt.Yc=function(a){return this.Vu(a.x,a.y,a.width,a.height)},kt.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 io(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))}kt.Ye=function(a){return Dr(this,a.x,a.y,0,0)},kt.ed=function(a){return Dr(this,a.x,a.y,a.width,a.height)},kt.Kv=function(a,y,x,E){return x===void 0&&(x=0),E===void 0&&(E=0),Dr(this,a,y,x,E)};function Dr(a,y,x,E,b){var z=Math.min(a.x,y),tt=Math.min(a.y,x);return y=Math.max(a.x+a.width,y+E),x=Math.max(a.y+a.height,x+b),a.x=z,a.y=tt,a.width=y-z,a.height=x-tt,a}kt.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 fo(a,y,x,E,b,z,tt,rt){return tt===void 0&&(tt=0),rt===void 0&&(rt=0),a<=b&&b+tt<=a+x&&y<=z&&z+rt<=y+E}function es(a,y,x,E,b,z,tt,rt){return a>tt+b||b>x+a?!1:!(y>rt+z||z>E+y)}kt.w=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},kt.Mz=function(){return this.width===0&&this.height===0},Oe.alloc=function(){var a=us.pop();return a===void 0?new Oe:a},Oe.allocAt=function(a,y,x,E){var b=us.pop();return b===void 0?new Oe(a,y,x,E):b.h(a,y,x,E)},Oe.free=function(a){us.push(a)},yn.Object.defineProperties(Oe.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 Ot(this.x,this.y)},set:function(a){this.x=a.x,this.y=a.y}},size:{get:function(){return new on(this.width,this.height)},set:function(a){this.width=a.width,this.height=a.height}},center:{get:function(){return new Ot(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}}}),Oe.prototype.isEmpty=Oe.prototype.Mz,Oe.prototype.isReal=Oe.prototype.w,Oe.intersectsLineSegment=function(a,y,x,E,b,z,tt,rt){return Be.Fx(a,y,x,E,b,z,tt,rt)},Oe.prototype.setSpot=Oe.prototype.yi,Oe.prototype.union=Oe.prototype.Kv,Oe.prototype.unionRect=Oe.prototype.ed,Oe.prototype.unionPoint=Oe.prototype.Ye,Oe.prototype.intersects=Oe.prototype.Vu,Oe.prototype.intersectsRect=Oe.prototype.Yc,Oe.prototype.intersect=Oe.prototype.Uu,Oe.prototype.intersectRect=Oe.prototype.Ex,Oe.prototype.grow=Oe.prototype.Hz,Oe.prototype.subtractMargin=Oe.prototype.Fv,Oe.prototype.addMargin=Oe.prototype.Co,Oe.prototype.inflate=Oe.prototype.Bc,Oe.prototype.offset=Oe.prototype.offset,Oe.prototype.contains=Oe.prototype.contains,Oe.prototype.containsRect=Oe.prototype.Re,Oe.prototype.containsPoint=Oe.prototype.ca,Oe.prototype.equalsApprox=Oe.prototype.Xa,Oe.prototype.equalTo=Oe.prototype.hi,Oe.prototype.equals=Oe.prototype.D,Oe.prototype.setSize=Oe.prototype.tA,Oe.prototype.setPoint=Oe.prototype.dd,Oe.prototype.set=Oe.prototype.set,Oe.prototype.setTo=Oe.prototype.sg;var Zs=null,Ua=null,us=[];Oe.className="Rect",Oe.parse=Ur,Oe.stringify=Sr,Oe.contains=fo,Oe.intersects=es,Oe.ZeroRect=Zs=new Oe(0,0,0,0).ja(),Oe.NoRect=Ua=new Oe(NaN,NaN,NaN,NaN).ja(),Oe.parse=Ur,Oe.stringify=Sr,Oe.contains=fo,Oe.intersects=es;function wr(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):se("Invalid arguments to Margin constructor: "+a+", "+y+", "+x+", "+E),this._isFrozen=!1}wr.prototype.assign=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},wr.prototype.sg=function(a,y,x,E){return this.top=a,this.right=y,this.bottom=x,this.left=E,this},wr.prototype.set=function(a){return this.top=a.top,this.right=a.right,this.bottom=a.bottom,this.left=a.left,this},wr.prototype.copy=function(){var a=new wr;return a.top=this.top,a.right=this.right,a.bottom=this.bottom,a.left=this.left,a},kt=wr.prototype,kt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},kt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this};function ns(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 wr;for(var b=NaN;a[y]==="";)y++;if((E=a[y++])&&(b=parseFloat(E)),isNaN(b))return new wr(x);for(var z=NaN;a[y]==="";)y++;if((E=a[y++])&&(z=parseFloat(E)),isNaN(z))return new wr(x,b);for(var tt=NaN;a[y]==="";)y++;return(E=a[y++])&&(tt=parseFloat(E)),isNaN(tt)?new wr(x,b):new wr(x,b,z,tt)}return new wr}function rs(a){return a.top.toString()+" "+a.right.toString()+" "+a.bottom.toString()+" "+a.left.toString()}kt.toString=function(){return"Margin("+this.top+","+this.right+","+this.bottom+","+this.left+")"},kt.D=function(a){return a instanceof wr?this.top===a.top&&this.right===a.right&&this.bottom===a.bottom&&this.left===a.left:!1},kt.hi=function(a,y,x,E){return this.top===a&&this.right===y&&this.bottom===x&&this.left===E},kt.Xa=function(a){return Be.B(this.top,a.top)&&Be.B(this.right,a.right)&&Be.B(this.bottom,a.bottom)&&Be.B(this.left,a.left)},kt.w=function(){return isFinite(this.top)&&isFinite(this.right)&&isFinite(this.bottom)&&isFinite(this.left)},wr.alloc=function(){var a=Cs.pop();return a===void 0?new wr:a},wr.free=function(a){Cs.push(a)},wr.prototype.isReal=wr.prototype.w,wr.prototype.equalsApprox=wr.prototype.Xa,wr.prototype.equalTo=wr.prototype.hi,wr.prototype.equals=wr.prototype.D,wr.prototype.set=wr.prototype.set,wr.prototype.setTo=wr.prototype.sg;var fs=null,As=null,Cs=[];wr.className="Margin",wr.parse=ns,wr.stringify=rs,wr.ZeroMargin=fs=new wr(0,0,0,0).ja(),wr.TwoMargin=As=new wr(2,2,2,2).ja(),wr.parse=ns,wr.stringify=rs;function Ci(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 pr,Qr,$r,so,xo,cr,Co,gs,os,lo,Wi,zr,eo,xs,Ko,Ds,Po,dl,Qa,Ca,zo,ko,fl,Ll,pa,Io,nu,Ml,Qs,ma,Yo,Fo,hs,js,bl,ia;Ci.prototype.assign=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ci.prototype.sg=function(a,y,x,E){return this.x=a,this.y=y,this.offsetX=x,this.offsetY=E,this},Ci.prototype.set=function(a){return this.x=a.x,this.y=a.y,this.offsetX=a.offsetX,this.offsetY=a.offsetY,this},Ci.prototype.copy=function(){var a=new Ci;return a.x=this.x,a.y=this.y,a.offsetX=this.offsetX,a.offsetY=this.offsetY,a},kt=Ci.prototype,kt.ja=function(){return this._isFrozen=!0,Object.freeze(this),this},kt.J=function(){return this._isFrozen||Object.isFrozen(this)?this:this.copy().freeze()},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this};function Uo(a,y){return a.x=NaN,a.y=NaN,a.offsetX=y,a}function Ro(a){if(typeof a=="string"){if(a=a.trim(),a==="None")return pr;if(a==="TopLeft")return Qr;if(a==="Top"||a==="TopCenter"||a==="MiddleTop")return $r;if(a==="TopRight")return so;if(a==="Left"||a==="LeftCenter"||a==="MiddleLeft")return xo;if(a==="Center")return cr;if(a==="Right"||a==="RightCenter"||a==="MiddleRight")return Co;if(a==="BottomLeft")return gs;if(a==="Bottom"||a==="BottomCenter"||a==="MiddleBottom")return os;if(a==="BottomRight")return lo;if(a==="TopSide")return Wi;if(a==="LeftSide")return zr;if(a==="RightSide")return eo;if(a==="BottomSide")return xs;if(a==="TopBottomSides")return Ko;if(a==="LeftRightSides")return Ds;if(a==="TopLeftSides")return Po;if(a==="TopRightSides")return dl;if(a==="BottomLeftSides")return Qa;if(a==="BottomRightSides")return Ca;if(a==="NotTopSide")return zo;if(a==="NotLeftSide")return ko;if(a==="NotRightSide")return fl;if(a==="NotBottomSide")return Ll;if(a==="AllSides")return pa;if(a==="Default")return Io;a=a.split(" ");for(var y=0,x=0;a[y]==="";)y++;var E=a[y++];E!==void 0&&0<E.length&&(x=parseFloat(E));for(var b=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(b=parseFloat(E));for(var z=0;a[y]==="";)y++;E=a[y++],E!==void 0&&0<E.length&&(z=parseFloat(E));for(var tt=0;a[y]==="";)y++;return E=a[y++],E!==void 0&&0<E.length&&(tt=parseFloat(E)),new Ci(x,b,z,tt)}return new Ci}function wo(a){return a.sb()?a.x.toString()+" "+a.y.toString()+" "+a.offsetX.toString()+" "+a.offsetY.toString():a.toString()}kt.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(pr)?"None":this.D(Qr)?"TopLeft":this.D($r)?"Top":this.D(so)?"TopRight":this.D(xo)?"Left":this.D(cr)?"Center":this.D(Co)?"Right":this.D(gs)?"BottomLeft":this.D(os)?"Bottom":this.D(lo)?"BottomRight":this.D(Wi)?"TopSide":this.D(zr)?"LeftSide":this.D(eo)?"RightSide":this.D(xs)?"BottomSide":this.D(Ko)?"TopBottomSides":this.D(Ds)?"LeftRightSides":this.D(Po)?"TopLeftSides":this.D(dl)?"TopRightSides":this.D(Qa)?"BottomLeftSides":this.D(Ca)?"BottomRightSides":this.D(zo)?"NotTopSide":this.D(ko)?"NotLeftSide":this.D(fl)?"NotRightSide":this.D(Ll)?"NotBottomSide":this.D(pa)?"AllSides":this.D(Io)?"Default":"None"},kt.D=function(a){return a instanceof Ci?(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},kt.gv=function(){return new Ci(.5-(this.x-.5),.5-(this.y-.5),-this.offsetX,-this.offsetY)},kt.Hf=function(a){if(!this.$c())return!1;if(!a.$c())if(a.D(nu))a=zr;else if(a.D(Ml))a=eo;else if(a.D(Qs))a=Wi;else if(a.D(ma))a=xs;else return!1;return a=a.offsetY,(this.offsetY&a)===a},kt.sb=function(){return!isNaN(this.x)&&!isNaN(this.y)},kt.Mc=function(){return isNaN(this.x)||isNaN(this.y)},kt.$c=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===1&&this.offsetY!==0},kt.ys=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===0&&this.offsetY===0},kt.Xb=function(){return isNaN(this.x)&&isNaN(this.y)&&this.offsetX===-1&&this.offsetY===0},Ci.alloc=function(){var a=ps.pop();return a===void 0?new Ci:a},Ci.free=function(a){ps.push(a)},Ci.prototype.isDefault=Ci.prototype.Xb,Ci.prototype.isNone=Ci.prototype.ys,Ci.prototype.isSide=Ci.prototype.$c,Ci.prototype.isNoSpot=Ci.prototype.Mc,Ci.prototype.isSpot=Ci.prototype.sb,Ci.prototype.includesSide=Ci.prototype.Hf,Ci.prototype.opposite=Ci.prototype.gv,Ci.prototype.equals=Ci.prototype.D,Ci.prototype.set=Ci.prototype.set,Ci.prototype.setTo=Ci.prototype.sg;var ps=[];Ci.className="Spot",Ci.parse=Ro,Ci.stringify=wo,Ci.None=pr=Uo(new Ci(0,0,0,0),0).ja(),Ci.Default=Io=Uo(new Ci(0,0,-1,0),-1).ja(),Ci.TopLeft=Qr=new Ci(0,0,0,0).ja(),Ci.TopCenter=$r=new Ci(.5,0,0,0).ja(),Ci.TopRight=so=new Ci(1,0,0,0).ja(),Ci.LeftCenter=xo=new Ci(0,.5,0,0).ja(),Ci.Center=cr=new Ci(.5,.5,0,0).ja(),Ci.RightCenter=Co=new Ci(1,.5,0,0).ja(),Ci.BottomLeft=gs=new Ci(0,1,0,0).ja(),Ci.BottomCenter=os=new Ci(.5,1,0,0).ja(),Ci.BottomRight=lo=new Ci(1,1,0,0).ja(),Ci.MiddleTop=Yo=$r,Ci.MiddleLeft=Fo=xo,Ci.MiddleRight=hs=Co,Ci.MiddleBottom=js=os,Ci.Top=Qs=$r,Ci.Left=nu=xo,Ci.Right=Ml=Co,Ci.Bottom=ma=os,Ci.TopSide=Wi=Uo(new Ci(0,0,1,1),1).ja(),Ci.LeftSide=zr=Uo(new Ci(0,0,1,2),1).ja(),Ci.RightSide=eo=Uo(new Ci(0,0,1,4),1).ja(),Ci.BottomSide=xs=Uo(new Ci(0,0,1,8),1).ja(),Ci.TopBottomSides=Ko=Uo(new Ci(0,0,1,9),1).ja(),Ci.LeftRightSides=Ds=Uo(new Ci(0,0,1,6),1).ja(),Ci.TopLeftSides=Po=Uo(new Ci(0,0,1,3),1).ja(),Ci.TopRightSides=dl=Uo(new Ci(0,0,1,5),1).ja(),Ci.BottomLeftSides=Qa=Uo(new Ci(0,0,1,10),1).ja(),Ci.BottomRightSides=Ca=Uo(new Ci(0,0,1,12),1).ja(),Ci.NotTopSide=zo=Uo(new Ci(0,0,1,14),1).ja(),Ci.NotLeftSide=ko=Uo(new Ci(0,0,1,13),1).ja(),Ci.NotRightSide=fl=Uo(new Ci(0,0,1,11),1).ja(),Ci.NotBottomSide=Ll=Uo(new Ci(0,0,1,7),1).ja(),Ci.AllSides=pa=Uo(new Ci(0,0,1,15),1).ja(),bl=new Ci(.156,.156).ja(),ia=new Ci(.844,.844).ja(),Ci.parse=Ro,Ci.stringify=wo;function ir(){this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0}ir.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},ir.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},ir.prototype.copy=function(){var a=new ir;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},ir.prototype.toString=function(){return"Transform("+this.m11+","+this.m12+","+this.m21+","+this.m22+","+this.dx+","+this.dy+")"},ir.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},ir.prototype.ws=function(){return this.dx===0&&this.dy===0&&this.m11===1&&this.m12===0&&this.m21===0&&this.m22===1},ir.prototype.reset=function(){return this.m11=1,this.m21=this.m12=0,this.m22=1,this.dy=this.dx=0,this},ir.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},ir.prototype.bv=function(a){var y=1/(a.m11*a.m22-a.m12*a.m21),x=a.m22*y,E=-a.m12*y,b=-a.m21*y,z=a.m11*y,tt=y*(a.m21*a.dy-a.m22*a.dx);return a=y*(a.m12*a.dx-a.m11*a.dy),y=this.m11*x+this.m21*E,x=this.m12*x+this.m22*E,E=this.m11*b+this.m21*z,b=this.m12*b+this.m22*z,this.dx=this.m11*tt+this.m21*a+this.dx,this.dy=this.m12*tt+this.m22*a+this.dy,this.m11=y,this.m12=x,this.m21=E,this.m22=b,this},ir.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},ir.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a===0)return this;if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.m12*a+this.m22*E,z=this.m11*-E+this.m21*a,tt=this.m12*-E+this.m22*a;return this.m11=this.m11*a+this.m21*E,this.m12=b,this.m21=z,this.m22=tt,this.translate(-y,-x),this},kt=ir.prototype,kt.translate=function(a,y){return this.dx+=this.m11*a+this.m21*y,this.dy+=this.m12*a+this.m22*y,this},kt.scale=function(a,y){return y===void 0&&(y=a),this.m11*=a,this.m12*=a,this.m21*=y,this.m22*=y,this},kt.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)},kt.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))},kt.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))},kt.pp=function(a){var y=a.x,x=a.y,E=y+a.width,b=x+a.height,z=this.m11,tt=this.m12,rt=this.m21,ot=this.m22,lt=this.dx,ut=this.dy,ft=y*z+x*rt+lt,yt=y*tt+x*ot+ut,Mt=E*z+x*rt+lt,Tt=E*tt+x*ot+ut;return x=y*z+b*rt+lt,y=y*tt+b*ot+ut,z=E*z+b*rt+lt,E=E*tt+b*ot+ut,b=Math.min(ft,Mt),ft=Math.max(ft,Mt),Mt=Math.min(yt,Tt),yt=Math.max(yt,Tt),b=Math.min(b,x),ft=Math.max(ft,x),Mt=Math.min(Mt,y),yt=Math.max(yt,y),b=Math.min(b,z),ft=Math.max(ft,z),Mt=Math.min(Mt,E),yt=Math.max(yt,E),a.h(b,Mt,ft-b,yt-Mt),a},ir.alloc=function(){var a=ea.pop();return a===void 0?new ir:a},ir.free=function(a){ea.push(a)},ir.prototype.transformRect=ir.prototype.pp,ir.prototype.transformPoint=ir.prototype.Ga,ir.prototype.scale=ir.prototype.scale,ir.prototype.translate=ir.prototype.translate,ir.prototype.rotate=ir.prototype.rotate,ir.prototype.invert=ir.prototype.Vj,ir.prototype.multiplyInverted=ir.prototype.bv,ir.prototype.multiply=ir.prototype.multiply,ir.prototype.reset=ir.prototype.reset,ir.prototype.isIdentity=ir.prototype.ws,ir.prototype.equals=ir.prototype.D,ir.prototype.setTransform=ir.prototype.setTransform,ir.prototype.set=ir.prototype.set;var ea=[];ir.className="Transform",ir.xF="54a702f3e53909c447824c6706603faf4c";var Be={AA:"7da71ca0ad381e90",wg:(Math.sqrt(2)-1)/3*4,Uv:null,sqrt:function(a){if(0>=a)return 0;var y=Be.Uv;if(y===null){y=[];for(var x=0;2e3>=x;x++)y[x]=Math.sqrt(x);Be.Uv=y}return 1>a?(x=1/a,2e3>=x?1/y[x|0]:Math.sqrt(a)):2e3>=a?y[a|0]:Math.sqrt(a)},B:function(a,y){return a-=y,.5>a&&-.5<a},$:function(a,y){return a-=y,5e-8>a&&-5e-8<a},Yb:function(a,y,x,E,b,z,tt){if(0>=b&&(b=1e-6),a<x)var rt=a,ot=x;else rt=x,ot=a;if(y<E)var lt=y,ut=E;else lt=E,ut=y;if(a===x)return lt<=tt&&tt<=ut&&a-b<=z&&z<=a+b;if(y===E)return rt<=z&&z<=ot&&y-b<=tt&&tt<=y+b;if(ot+=b,rt-=b,rt<=z&&z<=ot&&(ut+=b,lt-=b,lt<=tt&&tt<=ut))if(ot-rt>ut-lt)if(a-x>b||x-a>b){if(z=(E-y)/(x-a)*(z-a)+y,z-b<=tt&&tt<=z+b)return!0}else return!0;else if(y-E>b||E-y>b){if(tt=(x-a)/(E-y)*(tt-y)+a,tt-b<=z&&z<=tt+b)return!0}else return!0;return!1},cs:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft){if(Be.Yb(a,y,tt,rt,ft,x,E)&&Be.Yb(a,y,tt,rt,ft,b,z))return Be.Yb(a,y,tt,rt,ft,lt,ut);var yt=(a+x)/2,Mt=(y+E)/2,Tt=(x+b)/2,Dt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(yt+Tt)/2,x=(Mt+Dt)/2,Tt=(Tt+b)/2,Dt=(Dt+z)/2;var $t=(E+Tt)/2,Vt=(x+Dt)/2;return Be.cs(a,y,yt,Mt,E,x,$t,Vt,ot,lt,ut,ft)||Be.cs($t,Vt,Tt,Dt,b,z,tt,rt,ot,lt,ut,ft)},ax:function(a,y,x,E,b,z,tt,rt,ot){var lt=(x+b)/2,ut=(E+z)/2;return ot.h((((a+x)/2+lt)/2+(lt+(b+tt)/2)/2)/2,(((y+E)/2+ut)/2+(ut+(z+rt)/2)/2)/2),ot},My:function(a,y,x,E,b,z,tt,rt){var ot=(x+b)/2,lt=(E+z)/2;return qe(((a+x)/2+ot)/2,((y+E)/2+lt)/2,(ot+(b+tt)/2)/2,(lt+(z+rt)/2)/2)},Dl:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Be.Yb(a,y,tt,rt,ot,x,E)&&Be.Yb(a,y,tt,rt,ot,b,z))Dr(lt,a,y,0,0),Dr(lt,tt,rt,0,0);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Mt)/2,yt=(yt+b)/2,Mt=(Mt+z)/2;var Tt=(E+yt)/2,Dt=(x+Mt)/2;Be.Dl(a,y,ut,ft,E,x,Tt,Dt,ot,lt),Be.Dl(Tt,Dt,yt,Mt,b,z,tt,rt,ot,lt)}return lt},Qe:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Be.Yb(a,y,tt,rt,ot,x,E)&&Be.Yb(a,y,tt,rt,ot,b,z))lt.length===0&&(lt.push(a),lt.push(y)),lt.push(tt),lt.push(rt);else{var ut=(a+x)/2,ft=(y+E)/2,yt=(x+b)/2,Mt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(ut+yt)/2,x=(ft+Mt)/2,yt=(yt+b)/2,Mt=(Mt+z)/2;var Tt=(E+yt)/2,Dt=(x+Mt)/2;Be.Qe(a,y,ut,ft,E,x,Tt,Dt,ot,lt),Be.Qe(Tt,Dt,yt,Mt,b,z,tt,rt,ot,lt)}return lt},jv:function(a,y,x,E,b,z,tt,rt,ot,lt){if(Be.Yb(a,y,b,z,lt,x,E))return Be.Yb(a,y,b,z,lt,rt,ot);var ut=(a+x)/2,ft=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var yt=(ut+x)/2,Mt=(ft+E)/2;return Be.jv(a,y,ut,ft,yt,Mt,tt,rt,ot,lt)||Be.jv(yt,Mt,x,E,b,z,tt,rt,ot,lt)},OA:function(a,y,x,E,b,z,tt){return tt.h(((a+x)/2+(x+b)/2)/2,((y+E)/2+(E+z)/2)/2),tt},iv:function(a,y,x,E,b,z,tt,rt){if(Be.Yb(a,y,b,z,tt,x,E))Dr(rt,a,y,0,0),Dr(rt,b,z,0,0);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(lt+E)/2;Be.iv(a,y,ot,lt,ut,ft,tt,rt),Be.iv(ut,ft,x,E,b,z,tt,rt)}return rt},ep:function(a,y,x,E,b,z,tt,rt){if(Be.Yb(a,y,b,z,tt,x,E))rt.length===0&&(rt.push(a),rt.push(y)),rt.push(b),rt.push(z);else{var ot=(a+x)/2,lt=(y+E)/2;x=(x+b)/2,E=(E+z)/2;var ut=(ot+x)/2,ft=(lt+E)/2;Be.ep(a,y,ot,lt,ut,ft,tt,rt),Be.ep(ut,ft,x,E,b,z,tt,rt)}return rt},Eo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt,Mt){if(Be.Yb(a,y,tt,rt,yt,x,E)&&Be.Yb(a,y,tt,rt,yt,b,z))return!Be.Rl(a,y,tt,rt,ot,lt,ut,ft)||(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)?!1:(Mt.h(((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt),!0);var Tt=(a+x)/2,Dt=(y+E)/2,$t=(x+b)/2,Vt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+$t)/2,x=(Dt+Vt)/2,$t=($t+b)/2,Vt=(Vt+z)/2;var ae=(E+$t)/2,ce=(x+Vt)/2,ge=1/0,we=!1,He=0,di=0;return Be.Eo(a,y,Tt,Dt,E,x,ae,ce,ot,lt,ut,ft,yt,Mt)&&(a=(Mt.x-ot)*(Mt.x-ot)+(Mt.y-lt)*(Mt.y-lt),a<ge&&(ge=a,we=!0,He=Mt.x,di=Mt.y)),Be.Eo(ae,ce,$t,Vt,b,z,tt,rt,ot,lt,ut,ft,yt,Mt)&&(Mt.x-ot)*(Mt.x-ot)+(Mt.y-lt)*(Mt.y-lt)<ge&&(we=!0,He=Mt.x,di=Mt.y),we&&(Mt.x=He,Mt.y=di),we},Fo:function(a,y,x,E,b,z,tt,rt,ot,lt,ut,ft,yt){var Mt=0;if(Be.Yb(a,y,tt,rt,yt,x,E)&&Be.Yb(a,y,tt,rt,yt,b,z)){if(yt=(a-tt)*(lt-ft)-(y-rt)*(ot-ut),yt===0)return Mt;var Tt=((a*rt-y*tt)*(ot-ut)-(a-tt)*(ot*ft-lt*ut))/yt,Dt=((a*rt-y*tt)*(lt-ft)-(y-rt)*(ot*ft-lt*ut))/yt;if(Tt>=ut)return Mt;if((ot>ut?ot-ut:ut-ot)<(lt>ft?lt-ft:ft-lt)){if(y<rt?(ot=y,a=rt):(ot=rt,a=y),Dt<ot||Dt>a)return Mt}else if(a<tt?(ot=a,a=tt):ot=tt,Tt<ot||Tt>a)return Mt;0<yt?Mt++:0>yt&&Mt--}else{Tt=(a+x)/2,Dt=(y+E)/2;var $t=(x+b)/2,Vt=(E+z)/2;b=(b+tt)/2,z=(z+rt)/2,E=(Tt+$t)/2,x=(Dt+Vt)/2,$t=($t+b)/2,Vt=(Vt+z)/2;var ae=(E+$t)/2,ce=(x+Vt)/2;Mt+=Be.Fo(a,y,Tt,Dt,E,x,ae,ce,ot,lt,ut,ft,yt),Mt+=Be.Fo(ae,ce,$t,Vt,b,z,tt,rt,ot,lt,ut,ft,yt)}return Mt},qh:function(a,y,x,E,b,z,tt){return Be.$(a,x)?(y<E?(x=y,y=E):x=E,z<x?(tt.h(a,x),!1):z>y?(tt.h(a,y),!1):(tt.h(a,z),!0)):Be.$(y,E)?(a<x?(E=a,a=x):E=x,b<E?(tt.h(E,y),!1):b>a?(tt.h(a,y),!1):(tt.h(b,y),!0)):(b=((a-b)*(a-x)+(y-z)*(y-E))/((x-a)*(x-a)+(E-y)*(E-y)),-5e-6>b?(tt.h(a,y),!1):1.000005<b?(tt.h(x,E),!1):(tt.h(a+b*(x-a),y+b*(E-y)),!0))},Ve:function(a,y,x,E,b,z,tt,rt,ot){return Be.B(a,x)&&Be.B(y,E)?(ot.h(a,y),!1):Be.$(b,tt)?Be.$(a,x)?(Be.qh(a,y,x,E,b,z,ot),!1):Be.qh(a,y,x,E,b,(E-y)/(x-a)*(b-a)+y,ot):(rt=(rt-z)/(tt-b),Be.$(a,x)?(x=rt*(a-b)+z,y<E?(b=y,y=E):b=E,x<b?(ot.h(a,b),!1):x>y?(ot.h(a,y),!1):(ot.h(a,x),!0)):(tt=(E-y)/(x-a),Be.$(rt,tt)?(Be.qh(a,y,x,E,b,z,ot),!1):(b=(tt*a-rt*b+z-y)/(tt-rt),Be.$(tt,0)?(a<x?(E=a,a=x):E=x,b<E?(ot.h(E,y),!1):b>a?(ot.h(a,y),!1):(ot.h(b,y),!0)):Be.qh(a,y,x,E,b,tt*(b-a)+y,ot))))},MA:function(a,y,x,E,b){return Be.Ve(x.x,x.y,E.x,E.y,a.x,a.y,y.x,y.y,b)},KA:function(a,y,x,E,b,z,tt,rt,ot,lt){function ut($t,Vt){var ae=($t-a)*($t-a)+(Vt-y)*(Vt-y);ae<ft&&(ft=ae,ot.h($t,Vt))}var ft=1/0;ut(ot.x,ot.y);var yt=0,Mt=0,Tt=0,Dt=0;if(b<tt?(yt=b,Mt=tt):(yt=tt,Mt=b),z<rt?(Tt=b,Dt=tt):(Tt=tt,Dt=b),yt=(Mt-yt)/2+lt,lt=(Dt-Tt)/2+lt,b=(b+tt)/2,z=(z+rt)/2,yt===0||lt===0)return ot;if(.5>(x>a?x-a:a-x)){if(yt=1-(x-b)*(x-b)/(yt*yt),0>yt)return ot;yt=Math.sqrt(yt),E=-lt*yt+z,ut(x,lt*yt+z),ut(x,E)}else{if(x=(E-y)/(x-a),E=1/(yt*yt)+x*x/(lt*lt),rt=2*x*(y-x*a)/(lt*lt)-2*x*z/(lt*lt)-2*b/(yt*yt),yt=rt*rt-4*E*(2*x*a*z/(lt*lt)-2*y*z/(lt*lt)+z*z/(lt*lt)+b*b/(yt*yt)-1+(y-x*a)*(y-x*a)/(lt*lt)),0>yt)return ot;yt=Math.sqrt(yt),lt=(-rt+yt)/(2*E),ut(lt,x*lt-x*a+y),yt=(-rt-yt)/(2*E),ut(yt,x*yt-x*a+y)}return ot},Ff:function(a,y,x,E,b,z,tt,rt,ot){var lt=1e21,ut=a,ft=y;if(Be.Ve(a,y,a,E,b,z,tt,rt,ot)){var yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z);yt<lt&&(lt=yt,ut=ot.x,ft=ot.y)}return Be.Ve(x,y,x,E,b,z,tt,rt,ot)&&(yt=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),yt<lt&&(lt=yt,ut=ot.x,ft=ot.y)),Be.Ve(a,y,x,y,b,z,tt,rt,ot)&&(y=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),y<lt&&(lt=y,ut=ot.x,ft=ot.y)),Be.Ve(a,E,x,E,b,z,tt,rt,ot)&&(a=(ot.x-b)*(ot.x-b)+(ot.y-z)*(ot.y-z),a<lt&&(lt=a,ut=ot.x,ft=ot.y)),ot.h(ut,ft),1e21>lt},us:function(a,y,x){return Be.Fx(a.x,a.y,a.width,a.height,y.x,y.y,x.x,x.y)},Fx:function(a,y,x,E,b,z,tt,rt){var ot=a+x,lt=y+E;return b===tt?(z<rt?(tt=z,z=rt):tt=rt,a<=b&&b<=ot&&tt<=lt&&z>=y):z===rt?(b<tt?(rt=b,b=tt):rt=tt,y<=z&&z<=lt&&rt<=ot&&b>=a):!!(fo(a,y,x,E,b,z)||fo(a,y,x,E,tt,rt)||Be.Rl(a,y,ot,y,b,z,tt,rt)||Be.Rl(ot,y,ot,lt,b,z,tt,rt)||Be.Rl(ot,lt,a,lt,b,z,tt,rt)||Be.Rl(a,lt,a,y,b,z,tt,rt))},Rl:function(a,y,x,E,b,z,tt,rt){return a===x&&y===E&&b===tt&&z===rt?a===b&&y===z:0>=Be.Fl(a,y,x,E,b,z)*Be.Fl(a,y,x,E,tt,rt)&&0>=Be.Fl(b,z,tt,rt,a,y)*Be.Fl(b,z,tt,rt,x,E)},Fl:function(a,y,x,E,b,z){return x-=a,E-=y,a=b-a,y=z-y,z=a*E-y*x,z===0&&(z=a*x+y*E,0<z&&(z=(a-x)*x+(y-E)*E,0>z&&(z=0))),z},bp:function(a){return 0>a&&(a+=360),360<=a&&(a-=360),a},jx:function(a,y,x,E,b,z){var tt=Math.PI;z||(E*=tt/180,b*=tt/180);var rt=E>b?-1:1;z=[];var ot=tt/2,lt=E;if(E=Math.min(2*tt,Math.abs(b-E)),1e-5>E)return ot=lt+rt*Math.min(E,ot),rt=a+x*Math.cos(lt),lt=y+x*Math.sin(lt),a+=x*Math.cos(ot),y+=x*Math.sin(ot),x=(rt+a)/2,ot=(lt+y)/2,z.push([rt,lt,x,ot,x,ot,a,y]),z;for(;1e-5<E;)b=lt+rt*Math.min(E,ot),z.push(Be.Vy(x,lt,b,a,y)),E-=Math.abs(b-lt),lt=b;return z},Vy:function(a,y,x,E,b){var z=(x-y)/2,tt=a*Math.cos(z),rt=a*Math.sin(z),ot=-rt,lt=tt*tt+ot*ot,ut=lt+tt*tt+ot*rt;return lt=4/3*(Math.sqrt(2*lt*ut)-ut)/(tt*rt-ot*tt),rt=tt-lt*ot,tt=ot+lt*tt,ot=-tt,lt=z+y,z=Math.cos(lt),lt=Math.sin(lt),[E+a*Math.cos(y),b+a*Math.sin(y),E+rt*z-tt*lt,b+rt*lt+tt*z,E+rt*z-ot*lt,b+rt*lt+ot*z,E+a*Math.cos(x),b+a*Math.sin(x)]},No:function(a,y,x,E,b,z,tt){x=Math.floor((a-x)/b)*b+x,E=Math.floor((y-E)/z)*z+E;var rt=x;return x+b-a<b/2&&(rt=x+b),a=E,E+z-y<z/2&&(a=E+z),tt.h(rt,a),tt},vx:function(a,y){var x=Math.max(a,y);a=Math.min(a,y);var E;do y=x%a,x=E=a,a=y;while(0<y);return E},$y:function(a,y,x,E){var b=0>x,z=0>E;if(a<y)var tt=1,rt=0;else tt=0,rt=1;var ot=tt===0?a:y,lt=tt===0?x:E;return(tt===0?b:z)&&(lt=-lt),tt=rt,x=tt===0?x:E,(tt===0?b:z)&&(x=-x),Be.az(ot,tt===0?a:y,lt,x,0,0)},az:function(a,y,x,E,b,z){if(0<E)if(0<x){b=a*a,z=y*y,a*=x;var tt=y*E,rt=-z+tt,ot=-z+Math.sqrt(a*a+tt*tt);y=rt;for(var lt=0;9999999999>lt&&(y=.5*(rt+ot),!(y===rt||y===ot));++lt){var ut=a/(y+b),ft=tt/(y+z);if(ut=ut*ut+ft*ft-1,0<ut)rt=y;else if(0>ut)ot=y;else break}x=b*x/(y+b)-x,E=z*E/(y+z)-E,x=Math.sqrt(x*x+E*E)}else x=Math.abs(E-y);else E=a*a-y*y,z=a*x,z<E?(E=z/E,z=y*Math.sqrt(Math.abs(1-E*E)),x=a*E-x,x=Math.sqrt(x*x+z*z)):x=Math.abs(x-a);return x},Ze:new Si,um:new Si,Mf:new Si,Nf:0,vm:100};Be.za=Be.AA;function Hn(a){An(this),this.l=2,a===void 0&&(a=Hn.o),this.na=a,this.Ec=this.Dc=this.pd=this.od=0,a===Hn.o?this.ee=new ee:(Hn.V===null&&(Hn.V=new ee().freeze()),this.ee=Hn.V),this.aq=this.ee.Ja,this.Ip=new Oe().freeze(),this.ym=this.tk=null,this.zm=NaN,this.fg=Qr,this.gg=lo,this.Rk=this.Sk=NaN,this.Uf=bn}Hn.prototype.copy=function(){var a=new Hn;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===Hn.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},Hn.prototype.ja=function(){return this.freeze(),Object.freeze(this),this},Hn.prototype.freeze=function(){if(this._isFrozen=!0,this.type!==Hn.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},Hn.prototype.ka=function(){if(Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this.type!==Hn.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},Hn.prototype.Xa=function(a){if(!(a instanceof Hn))return!1;if(this.type!==a.type)return this.type===Hn.j&&a.type===Hn.o?kl(this,a):a.type===Hn.j&&this.type===Hn.o?kl(a,this):!1;if(this.type===Hn.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 Be.B(this.startX,a.startX)&&Be.B(this.startY,a.startY)&&Be.B(this.endX,a.endX)&&Be.B(this.endY,a.endY)};function kl(a,y){return a.type!==Hn.j||y.type!==Hn.o?!1:!!(y.figures.count===1&&(y=y.figures.M(0),y.segments.count===1&&Be.B(a.startX,y.startX)&&Be.B(a.startY,y.startY)&&(y=y.segments.M(0),y.type===yo&&Be.B(a.endX,y.endX)&&Be.B(a.endY,y.endY))))}Hn.ia=function(a){return a.toString()},Hn.prototype.qb=function(a){a.classType===Hn&&(this.type=a)},Hn.prototype.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Hn.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 Hn.u:var y=new Oe(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 Hn.F:if(y=new Oe(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 Hn.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()}},Hn.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},Hn.parse=function(a,y){function x(){return Dt>=ge-1?!0:lt[Dt+1].match(we)!==null}function E(){return Dt++,lt[Dt]}function b(fr){var rr=parseFloat(E()),oo=parseFloat(E());$t===$t.toLowerCase()&&(rr=ce.x+rr,oo=ce.y+oo),fr.h(rr,oo)}function z(){return b(ce),ce}function tt(){return b(ae),ae}function rt(){var fr=Vt.toLowerCase();return fr!=="c"&&fr!=="s"&&fr!=="q"&&fr!=="t"?ce:new Ot(2*ce.x-ae.x,2*ce.y-ae.y)}y===void 0&&(y=!1);var ot=/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm;a=a.replace(/,/gm," "),a=a.replace(ot,"$1 $2"),a=a.replace(ot,"$1 $2"),a=a.replace(/([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])([^s])/gm,"$1 $2"),a=a.replace(/([^s])([UuBbMmZzLlHhVvCcSsQqTtAaFfXx])/gm,"$1 $2"),a=a.replace(/([0-9])([+\-])/gm,"$1 $2"),a=a.replace(/[\s\r\t\n]+/gm," "),a=a.replace(/^\s+|\s+$/g,"");var lt=a.split(" ");for(a=0;a<lt.length;a++){var ut=lt[a];if(ut.match(/(\.[0-9]*)(\.)/gm)!==null){ot=li();for(var ft="",yt=!1,Mt=0;Mt<ut.length;Mt++){var Tt=ut[Mt];Tt!=="."||yt?Tt==="."?(ot.push(ft),ft="."):ft+=Tt:(yt=!0,ft+=Tt)}for(ot.push(ft),lt.splice(a,1),ut=0;ut<ot.length;ut++)lt.splice(a+ut,0,ot[ut]);a+=ot.length-1,ci(ot)}}var Dt=-1,$t="",Vt="";ot=new Ot(0,0);var ae=new Ot(0,0),ce=new Ot(0,0),ge=lt.length;a=Dy(null),yt=ft=ut=!1,Mt=!0,Tt=null;for(var we=/[UuBbMmZzLlHhVvCcSsQqTtAaFfXx]/;!(Dt>=ge-1);)if(Vt=$t,$t=E(),$t!=="")switch($t.toUpperCase()){case"X":Mt=!0,ft=ut=!1;break;case"M":for(Tt=z(),a.mc===null||Mt===!0?(Pg(a,Tt.x,Tt.y,ut,!ft,yt),Mt=!1):a.moveTo(Tt.x,Tt.y),ot.assign(ce);!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"L":for(;!x();)Tt=z(),a.lineTo(Tt.x,Tt.y);break;case"H":for(;!x();)ce=new Ot(($t===$t.toLowerCase()?ce.x:0)+parseFloat(E()),ce.y),a.lineTo(ce.x,ce.y);break;case"V":for(;!x();)ce=new Ot(ce.x,($t===$t.toLowerCase()?ce.y:0)+parseFloat(E())),a.lineTo(ce.x,ce.y);break;case"C":for(;!x();){Tt=new Ot,b(Tt);var He=tt(),di=z();yc(a,Tt.x,Tt.y,He.x,He.y,di.x,di.y)}break;case"S":for(;!x();)Tt=rt(),He=tt(),di=z(),yc(a,Tt.x,Tt.y,He.x,He.y,di.x,di.y);break;case"Q":for(;!x();)Tt=tt(),He=z(),m0(a,Tt.x,Tt.y,He.x,He.y);break;case"T":for(;!x();)ae=Tt=rt(),He=z(),m0(a,Tt.x,Tt.y,He.x,He.y);break;case"B":for(;!x();){Tt=parseFloat(E()),He=parseFloat(E()),di=parseFloat(E());var Pi=parseFloat(E()),wi=parseFloat(E()),Gn=wi,wn=!1;x()||(Gn=parseFloat(E()),x()||(wn=parseFloat(E())!==0)),$t===$t.toLowerCase()&&(di+=ce.x,Pi+=ce.y),a.arcTo(Tt,He,di,Pi,wi,Gn,wn)}break;case"A":for(;!x();)Tt=Math.abs(parseFloat(E())),He=Math.abs(parseFloat(E())),di=parseFloat(E()),wi=Pi=!1,wn=Gn=0,Gn=E(),Gn.length===1?(Pi=!!parseFloat(Gn),wi=!!parseFloat(E()),Gn=parseFloat(E())):Gn.length===2?(Pi=!!parseFloat(Gn[0]),wi=!!parseFloat(Gn[1]),Gn=parseFloat(E())):(Pi=!!parseFloat(Gn[0]),wi=!!parseFloat(Gn[1]),Gn=parseFloat(Gn.slice(2))),wn=parseFloat(E()),$t===$t.toLowerCase()&&(Gn=ce.x+Gn,wn=ce.y+wn),ce.h(Gn,wn),Mw(a,Tt,He,di,Pi,wi,Gn,wn);break;case"Z":Lw(a),ce.assign(ot);break;case"F":for(Tt="",He=1;lt[Dt+He];)if(lt[Dt+He]==="0")yt=!0,He++;else if(lt[Dt+He].match(/[Uu]/)!==null)He++;else if(lt[Dt+He].match(we)===null)He++;else{Tt=lt[Dt+He];break}Tt.match(/[Mm]/)?ut=!0:0<a.mc.segments.length&&(a.mc.isFilled=!0);break;case"U":for(Tt="",He=1;lt[Dt+He];)if(lt[Dt+He].match(/[Ff]/)!==null)He++;else if(lt[Dt+He].match(we)===null)He++;else{Tt=lt[Dt+He];break}Tt.match(/[Mm]/)?ft=!0:a.mc.isShadowed=!1}if(ot=a.os,v0=a,y)for(y=ot.figures.iterator;y.next();)y.value.isFilled=!0;return ot},Hn.Ha=function(a,y){for(var x=a.length,E=Ot.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}Ot.free(E)},Hn.prototype.Zu=function(){if(this._isInvalidBounds)return!0;if(this.type===Hn.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},Hn.prototype.computeBounds=function(){if(this._isInvalidBounds=!1,this.ym=this.tk=null,this.zm=NaN,this.type===Hn.o){this.aq=this.figures.Ja;for(var a=this.figures.s,y=a.length,x=0;x<y;x++){var E=a[x];E._isInvalidBounds=!1;var b=E.segments;E.sr=b.Ja,E=b.s,b=E.length;for(var z=0;z<b;z++){var tt=E[z];tt._isInvalidBounds=!1,tt.ae=null}}}a=this.Ip,a.ka(),isNaN(this.Sk)||isNaN(this.Rk)?a.h(0,0,0,0):a.h(0,0,this.Sk,this.Rk),du(this,a,!1),Dr(a,0,0,0,0),a.freeze()},Hn.prototype.ix=function(){var a=new Oe;return du(this,a,!0),a};function du(a,y,x){switch(a.type){case Hn.j:case Hn.u:case Hn.F:x?y.h(a.od,a.pd,0,0):Dr(y,a.od,a.pd,0,0),Dr(y,a.Dc,a.Ec,0,0);break;case Hn.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):Dr(y,z.startX,z.startY,0,0);for(var tt=z.segments.s,rt=tt.length,ot=z.startX,lt=z.startY,ut=0;ut<rt;ut++){var ft=tt[ut];switch(ft.type){case yo:case Ss:ot=ft.endX,lt=ft.endY,Dr(y,ot,lt,0,0);break;case Fs:Be.Dl(ot,lt,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case Oa:Be.iv(ot,lt,ft.point1X,ft.point1Y,ft.endX,ft.endY,.5,y),ot=ft.endX,lt=ft.endY;break;case ss:case rl:var yt=ft.type===ss?Pa(ft,z):il(ft,z,ot,lt),Mt=yt.length;if(Mt===0){ot=ft.type===ss?ft.centerX:ft.endX,lt=ft.type===ss?ft.centerY:ft.endY,Dr(y,ot,lt,0,0);break}ft=null;for(var Tt=0;Tt<Mt;Tt++)ft=yt[Tt],Be.Dl(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.5,y);ft!==null&&(ot=ft[6],lt=ft[7]);break;default:se("Unknown Segment type: "+ft.type)}}}break;default:se("Unknown Geometry type: "+a.type)}}Hn.prototype.normalize=function(){this._isFrozen&&De(this);var a=this.ix();return this.offset(-a.x,-a.y),new Ot(-a.x,-a.y)},Hn.prototype.offset=function(a,y){return this._isFrozen&&De(this),this.transform(1,0,0,1,a,y),this},Hn.prototype.scale=function(a,y){return this._isFrozen&&De(this),this.transform(a,0,0,y,0,0),this},Hn.prototype.rotate=function(a,y,x){this._isFrozen&&De(this),y===void 0&&(y=0),x===void 0&&(x=0);var E=ir.alloc();return E.reset(),E.rotate(a,y,x),this.transform(E.m11,E.m12,E.m21,E.m22,E.dx,E.dy),ir.free(E),this},kt=Hn.prototype,kt.transform=function(a,y,x,E,b,z){switch(this.type){case Hn.j:case Hn.u:case Hn.F:var tt=this.od,rt=this.pd;this.od=tt*a+rt*x+b,this.pd=tt*y+rt*E+z,tt=this.Dc,rt=this.Ec,this.Dc=tt*a+rt*x+b,this.Ec=tt*y+rt*E+z;break;case Hn.o:for(var ot=this.figures.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];tt=ft.startX,rt=ft.startY,ft.startX=tt*a+rt*x+b,ft.startY=tt*y+rt*E+z,ft=ft.segments.s;for(var yt=ft.length,Mt=0;Mt<yt;Mt++){var Tt=ft[Mt];switch(Tt.type){case yo:case Ss:tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case Fs:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.point2X,rt=Tt.point2Y,Tt.point2X=tt*a+rt*x+b,Tt.point2Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case Oa:tt=Tt.point1X,rt=Tt.point1Y,Tt.point1X=tt*a+rt*x+b,Tt.point1Y=tt*y+rt*E+z,tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z;break;case ss:tt=Tt.centerX,rt=Tt.centerY,Tt.centerX=tt*a+rt*x+b,Tt.centerY=tt*y+rt*E+z,y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.startAngle+=tt),0>a&&(Tt.startAngle=180-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),0>E&&(Tt.startAngle=-Tt.startAngle,Tt.sweepAngle=-Tt.sweepAngle),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY!==void 0&&(Tt.radiusY*=Math.sqrt(y*y+E*E));break;case rl:if(tt=Tt.endX,rt=Tt.endY,Tt.endX=tt*a+rt*x+b,Tt.endY=tt*y+rt*E+z,Tt.radiusX===0||Tt.radiusY===0)break;y!==0&&(tt=180*Math.atan2(y,a)/Math.PI,0>tt&&(tt+=360),Tt.xAxisRotation+=tt),0>a&&(Tt.xAxisRotation=180-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),0>E&&(Tt.xAxisRotation=-Tt.xAxisRotation,Tt.isClockwiseArc=!Tt.isClockwiseArc),Tt.radiusX*=Math.sqrt(a*a+x*x),Tt.radiusY*=Math.sqrt(y*y+E*E);break;default:se("Unknown Segment type: "+Tt.type)}}}}return this._isInvalidBounds=!0,this},kt.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 Hn.j:return Be.Yb(x,E,b,z,y,a.x,a.y);case Hn.u:var tt=Oe.allocAt(Math.min(x,b)-y,Math.min(E,z)-y,Math.abs(b-x)+2*y,Math.abs(z-E)+2*y);return a=tt.ca(a),Oe.free(tt),a;case Hn.F:tt=Math.min(x,b)-y;var rt=Math.min(E,z)-y;return x=(Math.abs(b-x)+2*y)/2,y=(Math.abs(z-E)+2*y)/2,0>=x||0>=y?!1:(tt=a.x-(tt+x),rt=a.y-(rt+y),1>=tt*tt/(x*x)+rt*rt/(y*y));case Hn.o:return is(this,a,y,!0,!1);default:return!1}};function is(a,y,x,E,b){var z=y.x;y=y.y;for(var tt=a.bounds.x-20,rt=0,ot,lt,ut,ft,yt=a.figures.s,Mt=yt.length,Tt=0;Tt<Mt;Tt++){var Dt=yt[Tt],$t=!Dt.isEvenOdd;if(Dt.isFilled){if(E&&Dt.ca(z,y,x))return!0;var Vt=Dt.segments;ot=Dt.startX,lt=Dt.startY;for(var ae=ot,ce=lt,ge=Vt.s,we=0;we<=Vt.length;we++){var He=void 0;if(we!==Vt.length){He=ge[we];var di=He.type;a=He.endX,ft=He.endY}else di=yo,a=ae,ft=ce;switch(di){case Ss:if(ae=ra(z,y,tt,y,ot,lt,ae,ce),isNaN(ae))return!0;rt+=ae,ae=a,ce=ft;break;case yo:if(ot=ra(z,y,tt,y,ot,lt,a,ft),isNaN(ot))return!0;rt+=ot;break;case Fs:ut=Be.Fo(ot,lt,He.point1X,He.point1Y,He.point2X,He.point2Y,a,ft,tt,y,z,y,.5),rt+=ut;break;case Oa:ut=Be.Fo(ot,lt,(ot+2*He.point1X)/3,(lt+2*He.point1Y)/3,(2*He.point1X+a)/3,(2*He.point1Y+ft)/3,a,ft,tt,y,z,y,.5),rt+=ut;break;case ss:case rl:di=He.type===ss?Pa(He,Dt):il(He,Dt,ot,lt);var Pi=di.length;if(Pi===0){if(ot=ra(z,y,tt,y,ot,lt,He.type===ss?He.centerX:He.endX,He.type===ss?He.centerY:He.endY),isNaN(ot))return!0;rt+=ot;break}He=null;for(var wi=0;wi<Pi;wi++){if(He=di[wi],wi===0){if(ut=ra(z,y,tt,y,ot,lt,He[0],He[1]),isNaN(ut))return!0;rt+=ut}ut=Be.Fo(He[0],He[1],He[2],He[3],He[4],He[5],He[6],He[7],tt,y,z,y,.5),rt+=ut}He!==null&&(a=He[6],ft=He[7]);break;default:se("Unknown Segment type: "+He.type)}ot=a,lt=ft}if($t){if(rt!==0)return!0}else if(rt%2!==0)return!0;rt=0}else if(Dt.ca(z,y,b?x:x+2))return!0}return!1}function ra(a,y,x,E,b,z,tt,rt){if(Be.Yb(b,z,tt,rt,.05,a,y))return NaN;var ot=(a-x)*(z-rt);if(ot===0)return 0;var lt=((a*E-y*x)*(b-tt)-(a-x)*(b*rt-z*tt))/ot;if(y=(a*E-y*x)*(z-rt)/ot,lt>=a)return 0;if((b>tt?b-tt:tt-b)<(z>rt?z-rt:rt-z)){if(z<rt){if(y<z||y>rt)return 0}else if(y<rt||y>z)return 0}else if(b<tt){if(lt<b||lt>tt)return 0}else if(lt<tt||lt>b)return 0;return 0<ot?1:-1}function gl(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}kt.Pu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=new Ot),this.type===Hn.j)return y.h(this.startX+a*(this.endX-this.startX),this.startY+a*(this.endY-this.startY)),y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,x=x[rt],rt=x[2*a],b=x[2*a+1],y.h(rt+(x[2*a+2]-rt)*E,b+(x[2*a+3]-b)*E),y;tt+=ut}}return y},kt.wx=function(a){if(0>a?a=0:1<a&&(a=1),this.type===Hn.j)return 180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI;for(var y=this.flattenedSegments,x=this.flattenedLengths,E=y.length,b=this.flattenedTotalLength*a,z=0,tt=0;tt<E;tt++){var rt=x[tt],ot=rt.length;for(a=0;a<ot;a++){var lt=rt[a];if(z+lt>=b)return b=y[tt],y=b[2*a],x=b[2*a+1],E=b[2*a+2],a=b[2*a+3],1>Math.abs(E-y)&&1>Math.abs(a-x)?0:1>Math.abs(E-y)?0<=a-x?90:270:1>Math.abs(a-x)?0<=E-y?0:180:180*Math.atan2(a-x,E-y)/Math.PI;z+=lt}}return NaN},kt.Qu=function(a,y){if(0>a?a=0:1<a&&(a=1),y===void 0&&(y=[]),y.length=3,this.type===Hn.j)return y[0]=this.startX+a*(this.endX-this.startX),y[1]=this.startY+a*(this.endY-this.startY),y[2]=180*Math.atan2(this.endY-this.startY,this.endX-this.startX)/Math.PI,y;for(var x=this.flattenedSegments,E=this.flattenedLengths,b=x.length,z=this.flattenedTotalLength*a,tt=0,rt=0;rt<b;rt++){var ot=E[rt],lt=ot.length;for(a=0;a<lt;a++){var ut=ot[a];if(tt+ut>=z)return E=z-tt,E=ut===0?0:E/ut,ut=x[rt],x=ut[2*a],rt=ut[2*a+1],b=ut[2*a+2],a=ut[2*a+3],y[0]=x+(b-x)*E,y[1]=rt+(a-rt)*E,y[2]=1>Math.abs(b-x)&&1>Math.abs(a-rt)?0:1>Math.abs(b-x)?0<=a-rt?90:270:1>Math.abs(a-rt)?0<=b-x?0:180:180*Math.atan2(a-rt,b-x)/Math.PI,y;tt+=ut}}return y},kt.xx=function(a){if(this.type===Hn.j){var y=this.startX,x=this.startY,E=this.endX,b=this.endY;if(y!==E||x!==b){var z=a.x;if(a=a.y,y===E){if(x<b){var tt=x;E=b}else tt=b,E=x;return a<=tt?tt===x?0:1:a>=E?E===x?0:1:Math.abs(a-x)/(E-tt)}if(x===b)return y<E?tt=y:(tt=E,E=y),z<=tt?tt===y?0:1:z>=E?E===y?0:1:Math.abs(z-y)/(E-tt);tt=(E-y)*(E-y)+(b-x)*(b-x);var rt=Ot.alloc();return Be.qh(y,x,E,b,z,a,rt),a=rt.x,z=rt.y,Ot.free(rt),Math.sqrt(((a-y)*(a-y)+(z-x)*(z-x))/tt)}}else if(this.type===Hn.u){tt=this.startX,rt=this.startY;var ot=this.endX;if(b=this.endY,tt!==ot||rt!==b){y=ot-tt,x=b-rt,z=2*y+2*x,E=a.x,a=a.y,E=Math.min(Math.max(E,tt),ot),a=Math.min(Math.max(a,rt),b),tt=Math.abs(E-tt),ot=Math.abs(E-ot),rt=Math.abs(a-rt),b=Math.abs(a-b);var lt=Math.min(tt,ot,rt,b);if(lt===rt)return E/z;if(lt===ot)return(y+a)/z;if(lt===b)return(2*y+x-E)/z;if(lt===tt)return(2*y+2*x-a)/z}}else{y=this.flattenedSegments,x=this.flattenedLengths,z=this.flattenedTotalLength,E=Ot.alloc(),b=1/0,rt=tt=0,ot=y.length;for(var ut=lt=0,ft=0;ft<ot;ft++)for(var yt=y[ft],Mt=x[ft],Tt=yt.length,Dt=0;Dt<Tt;Dt+=2){var $t=yt[Dt],Vt=yt[Dt+1];if(Dt!==0){Be.qh(lt,ut,$t,Vt,a.x,a.y,E);var ae=(E.x-a.x)*(E.x-a.x)+(E.y-a.y)*(E.y-a.y);ae<b&&(b=ae,tt=rt,tt+=Math.sqrt((E.x-lt)*(E.x-lt)+(E.y-ut)*(E.y-ut))),rt+=Mt[(Dt-2)/2]}lt=$t,ut=Vt}return Ot.free(E),a=tt/z,0>a?0:1<a?1:a}return 0};function zl(a){if(a.tk===null){var y=a.tk=[],x=a.ym=[],E=[],b=[];if(a.type===Hn.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===Hn.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===Hn.F){var z=new Ps;z.startX=a.endX,z.startY=(a.startY+a.endY)/2;var tt=new Xr(ss);if(tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(a.startX+a.endX)/2,tt.centerY=(a.startY+a.endY)/2,tt.radiusX=Math.abs(a.startX-a.endX)/2,tt.radiusY=Math.abs(a.startY-a.endY)/2,z.add(tt),a=Pa(tt,z),b=a.length,b===0)E.push(tt.centerX),E.push(tt.centerY);else{tt=z.startX,z=z.startY;for(var rt=0;rt<b;rt++){var ot=a[rt];Be.Qe(tt,z,ot[2],ot[3],ot[4],ot[5],ot[6],ot[7],.5,E),tt=ot[6],z=ot[7]}}y.push(E),x.push(fu(E))}else for(a=a.figures.iterator;a.next();){b=a.value,E=[],E.push(b.startX),E.push(b.startY),tt=b.startX,z=b.startY,rt=tt,ot=z;for(var lt=b.segments.s,ut=lt.length,ft=0;ft<ut;ft++){var yt=lt[ft];switch(yt.type){case Ss:4<=E.length&&(y.push(E),x.push(fu(E))),E=[],E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY,rt=tt,ot=z;break;case yo:E.push(yt.endX),E.push(yt.endY),tt=yt.endX,z=yt.endY;break;case Fs:Be.Qe(tt,z,yt.point1X,yt.point1Y,yt.point2X,yt.point2Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case Oa:Be.ep(tt,z,yt.point1X,yt.point1Y,yt.endX,yt.endY,.5,E),tt=yt.endX,z=yt.endY;break;case ss:var Mt=Pa(yt,b),Tt=Mt.length;if(Tt===0){E.push(yt.centerX),E.push(yt.centerY),tt=yt.centerX,z=yt.centerY;break}for(var Dt=0;Dt<Tt;Dt++){var $t=Mt[Dt];Be.Qe(tt,z,$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],.5,E),tt=$t[6],z=$t[7]}break;case rl:if(Mt=il(yt,b,tt,z),Tt=Mt.length,Dt=yt.endX,$t=yt.endY,Tt===0){E.push(Dt),E.push($t),tt=Dt,z=$t;break}for(Dt=0;Dt<Tt;Dt++)$t=Mt[Dt],Be.Qe(tt,z,$t[2],$t[3],$t[4],$t[5],$t[6],$t[7],.5,E),tt=$t[6],z=$t[7];break;default:se("Segment not of valid type: "+yt.type)}yt.isClosed&&(E.push(rt),E.push(ot))}4<=E.length&&(y.push(E),x.push(fu(E)))}}}function fu(a){for(var y=[],x=0,E=0,b=a.length,z=0;z<b;z+=2){var tt=a[z],rt=a[z+1];z!==0&&y.push(Math.sqrt(Tn(x,E,tt,rt))),x=tt,E=rt}return y}kt.add=function(a){return this.ee.add(a),this},kt.pm=function(a,y,x,E,b,z,tt,rt){return this._isFrozen&&De(this),this.fg=new Ci(a,y,b,z).freeze(),this.gg=new Ci(x,E,tt,rt).freeze(),this},yn.Object.defineProperties(Hn.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 zl(this),this.tk}},flattenedLengths:{get:function(){return zl(this),this.ym}},flattenedTotalLength:{get:function(){var a=this.zm;if(isNaN(a)){if(this.type===Hn.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===Hn.u)a=2*Math.abs(this.endX-this.startX)+2*Math.abs(this.endY-this.startY);else{y=this.flattenedLengths;for(var x=y.length,E=a=0;E<x;E++)for(var b=y[E],z=b.length,tt=0;tt<z;tt++)a+=b[tt]}this.zm=a}return a}},type:{get:function(){return this.na},set:function(a){this.na!==a&&(this._isFrozen&&De(this,a),this.na=a,a===Hn.o?this.ee=new ee:(Hn.V===null&&(Hn.V=new ee().freeze()),this.ee=Hn.V),this._isInvalidBounds=!0)}},startX:{get:function(){return this.od},set:function(a){this.od!==a&&(this._isFrozen&&De(this,a),this.od=a,this._isInvalidBounds=!0)}},startY:{get:function(){return this.pd},set:function(a){this.pd!==a&&(this._isFrozen&&De(this,a),this.pd=a,this._isInvalidBounds=!0)}},endX:{get:function(){return this.Dc},set:function(a){this.Dc!==a&&(this._isFrozen&&De(this,a),this.Dc=a,this._isInvalidBounds=!0)}},endY:{get:function(){return this.Ec},set:function(a){this.Ec!==a&&(this._isFrozen&&De(this,a),this.Ec=a,this._isInvalidBounds=!0)}},figures:{get:function(){return this.ee},set:function(a){this.ee!==a&&(this._isFrozen&&De(this,a),this.ee=a,this._isInvalidBounds=!0)}},spot1:{get:function(){return this.fg},set:function(a){this._isFrozen&&De(this,a),this.fg=a.J()}},spot2:{get:function(){return this.gg},set:function(a){this._isFrozen&&De(this,a),this.gg=a.J()}},defaultStretch:{get:function(){return this.Uf},set:function(a){this._isFrozen&&De(this,a),this.Uf=a}},bounds:{get:function(){return this.Zu()&&this.computeBounds(),this.Ip}}}),Hn.prototype.setSpots=Hn.prototype.pm,Hn.prototype.add=Hn.prototype.add,Hn.prototype.getFractionForPoint=Hn.prototype.xx,Hn.prototype.getPointAndAngleAlongPath=Hn.prototype.Qu,Hn.prototype.getAngleAlongPath=Hn.prototype.wx,Hn.prototype.getPointAlongPath=Hn.prototype.Pu,Hn.prototype.containsPoint=Hn.prototype.ca,Hn.prototype.transform=Hn.prototype.transform,Hn.prototype.rotate=Hn.prototype.rotate,Hn.prototype.scale=Hn.prototype.scale,Hn.prototype.offset=Hn.prototype.offset,Hn.prototype.normalize=Hn.prototype.normalize,Hn.prototype.computeBoundsWithoutOrigin=Hn.prototype.ix,Hn.prototype.equalsApprox=Hn.prototype.Xa,Hn.className="Geometry",Hn.j=new Te(Hn,"Line",0),Hn.u=new Te(Hn,"Rectangle",1),Hn.F=new Te(Hn,"Ellipse",2),Hn.o=new Te(Hn,"Path",3),Hn.V=null,Hn.hb="UuBbMmZzLlHhVvCcSsQqTtAaFfXx",Hn.className="Geometry",Hn.stringify=Hn.ia,Hn.fillPath=Hn.nb,Hn.parse=Hn.parse,Hn.Line=Hn.j,Hn.Rectangle=Hn.u,Hn.Ellipse=Hn.F,Hn.Path=Hn.o;function Ps(a,y,x,E,b){An(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 ee,this.sr=this.pl.Ja,this.fw=null}Ps.prototype.copy=function(){var a=new Ps;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},kt=Ps.prototype,kt.Xa=function(a){if(!(a instanceof Ps&&Be.B(this.startX,a.startX)&&Be.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},kt.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},kt.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},kt.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},kt.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},kt.add=function(a){return this.pl.add(a),this},kt.ca=function(a,y,x){for(var E=this.startX,b=this.startY,z=E,tt=b,rt=this.segments.s,ot=rt.length,lt=0;lt<ot;lt++){var ut=rt[lt];switch(ut.type){case Ss:z=ut.endX,tt=ut.endY,E=ut.endX,b=ut.endY;break;case yo:if(Be.Yb(E,b,ut.endX,ut.endY,x,a,y))return!0;E=ut.endX,b=ut.endY;break;case Fs:if(Be.cs(E,b,ut.point1X,ut.point1Y,ut.point2X,ut.point2Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case Oa:if(Be.jv(E,b,ut.point1X,ut.point1Y,ut.endX,ut.endY,.5,a,y,x))return!0;E=ut.endX,b=ut.endY;break;case ss:case rl:var ft=ut.type===ss?Pa(ut,this):il(ut,this,E,b),yt=ft.length,Mt=ut.type===ss?ut.centerX:ut.endX,Tt=ut.type===ss?ut.centerY:ut.endY;if(yt===0){if(Be.Yb(E,b,Mt,Tt,x,a,y))return!0;E=Mt,b=Tt;break}for(Mt=null,Tt=0;Tt<yt;Tt++)if(Mt=ft[Tt],Tt===0&&Be.Yb(E,b,Mt[0],Mt[1],x,a,y)||Be.cs(Mt[0],Mt[1],Mt[2],Mt[3],Mt[4],Mt[5],Mt[6],Mt[7],.5,a,y,x))return!0;Mt!==null&&(E=Mt[6],b=Mt[7]);break;default:se("Unknown Segment type: "+ut.type)}if(ut.isClosed&&(E!==z||b!==tt)&&Be.Yb(E,b,z,tt,x,a,y))return!0}return!1},yn.Object.defineProperties(Ps.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&&De(this,a),this.l=a?this.l|4:this.l&-5}},isShadowed:{get:function(){return(this.l&8)!==0},set:function(a){this._isFrozen&&De(this,a),this.l=a?this.l|8:this.l&-9}},isEvenOdd:{get:function(){return(this.l&16)!==0},set:function(a){this._isFrozen&&De(this,a),this.l=a?this.l|16:this.l&-17}},startX:{get:function(){return this.od},set:function(a){this._isFrozen&&De(this,a),this.od=a,this._isInvalidBounds=!0}},startY:{get:function(){return this.pd},set:function(a){this._isFrozen&&De(this,a),this.pd=a,this._isInvalidBounds=!0}},segments:{get:function(){return this.pl},set:function(a){this._isFrozen&&De(this,a),this.pl=a,this._isInvalidBounds=!0}}}),Ps.prototype.add=Ps.prototype.add,Ps.prototype.equalsApprox=Ps.prototype.Xa,Ps.className="PathFigure";function Xr(a,y,x,E,b,z,tt,rt){An(this),a===void 0&&(a=yo),this.na=a,this.l=2,y!==void 0?this.Dc=y:this.Dc=0,x!==void 0?this.Ec=x:this.Ec=0,E===void 0&&(E=0),b===void 0&&(b=0),z===void 0&&(z=0),tt===void 0&&(tt=0),a===rl?(a=z%360,0>a&&(a+=360),this.Ne=a,this.Vh=0,this.Wh=Math.max(E,0),this.Pg=Math.max(b,0),typeof tt=="boolean"?tt&&(this.isLargeArc=!0):typeof tt=="number"&&tt&&(this.isLargeArc=!0),rt&&(this.isClockwiseArc=!0)):(this.Ne=E,this.Vh=b,a===ss&&(z=Math.max(z,0)),this.Wh=z,typeof tt=="number"?(a===ss&&(tt=Math.max(tt,0)),this.Pg=tt):this.Pg=0),this.ae=null}Xr.prototype.copy=function(){var a=new Xr;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},kt=Xr.prototype,kt.Xa=function(a){if(!(a instanceof Xr)||this.type!==a.type||this.isClosed!==a.isClosed)return!1;switch(this.type){case Ss:case yo:return Be.B(this.endX,a.endX)&&Be.B(this.endY,a.endY);case Fs:return Be.B(this.endX,a.endX)&&Be.B(this.endY,a.endY)&&Be.B(this.point1X,a.point1X)&&Be.B(this.point1Y,a.point1Y)&&Be.B(this.point2X,a.point2X)&&Be.B(this.point2Y,a.point2Y);case Oa:return Be.B(this.endX,a.endX)&&Be.B(this.endY,a.endY)&&Be.B(this.point1X,a.point1X)&&Be.B(this.point1Y,a.point1Y);case ss:return Be.B(this.startAngle,a.startAngle)&&Be.B(this.sweepAngle,a.sweepAngle)&&Be.B(this.centerX,a.centerX)&&Be.B(this.centerY,a.centerY)&&Be.B(this.radiusX,a.radiusX)&&Be.B(this.radiusY,a.radiusY);case rl:return this.isClockwiseArc===a.isClockwiseArc&&this.isLargeArc===a.isLargeArc&&Be.B(this.xAxisRotation,a.xAxisRotation)&&Be.B(this.endX,a.endX)&&Be.B(this.endY,a.endY)&&Be.B(this.radiusX,a.radiusX)&&Be.B(this.radiusY,a.radiusY);default:return!1}},kt.qb=function(a){a.classType===Xr&&(this.type=a)},kt.toString=function(a){switch(a===void 0&&(a=-1),this.type){case Ss:a=0>a?"M"+this.endX.toString()+" "+this.endY.toString():"M"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case yo:a=0>a?"L"+this.endX.toString()+" "+this.endY.toString():"L"+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Fs:a=0>a?"C"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.point2X.toString()+" "+this.point2Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"C"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.point2X.toFixed(a)+" "+this.point2Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case Oa:a=0>a?"Q"+this.point1X.toString()+" "+this.point1Y.toString()+" "+this.endX.toString()+" "+this.endY.toString():"Q"+this.point1X.toFixed(a)+" "+this.point1Y.toFixed(a)+" "+this.endX.toFixed(a)+" "+this.endY.toFixed(a);break;case ss: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 rl: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":"")},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return this._isFrozen=!1,this},kt.close=function(){return this.isClosed=!0,this};function Pa(a,y){if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;var x=a.radiusX,E=a.radiusY;if(E===void 0&&(E=x),x===0||E===0)return a.ae=[],a.ae;y=a.Ne;var b=a.Vh,z=Be.jx(0,0,x<E?x:E,a.startAngle,a.startAngle+a.sweepAngle,!1);if(x!==E){var tt=ir.alloc();tt.reset(),x<E?tt.scale(1,E/x):tt.scale(x/E,1),Hn.Ha(z,tt),ir.free(tt)}for(x=z.length,E=0;E<x;E++)tt=z[E],tt[0]+=y,tt[1]+=b,tt[2]+=y,tt[3]+=b,tt[4]+=y,tt[5]+=b,tt[6]+=y,tt[7]+=b;return a.ae=z,a.ae}function il(a,y,x,E){function b(Dt,$t,Vt,ae){return(Dt*ae<$t*Vt?-1:1)*Math.acos((Dt*Vt+$t*ae)/(Math.sqrt(Dt*Dt+$t*$t)*Math.sqrt(Vt*Vt+ae*ae)))}if(a.ae!==null&&y._isInvalidBounds===!1)return a.ae;if(a.radiusX===0||a.radiusY===0)return a.ae=[],a.ae;y=a.Wh;var z=a.Pg;y===0&&(y=1e-4),z===0&&(z=1e-4);var tt=Math.PI/180*a.Ne,rt=a.isLargeArc,ot=a.isClockwiseArc,lt=a.Dc,ut=a.Ec,ft=Math.cos(tt),yt=Math.sin(tt),Mt=ft*(x-lt)/2+yt*(E-ut)/2;tt=-yt*(x-lt)/2+ft*(E-ut)/2;var Tt=Mt*Mt/(y*y)+tt*tt/(z*z);return 1<Tt&&(y*=Math.sqrt(Tt),z*=Math.sqrt(Tt)),Tt=(rt===ot?-1:1)*Math.sqrt((y*y*z*z-y*y*tt*tt-z*z*Mt*Mt)/(y*y*tt*tt+z*z*Mt*Mt)),isNaN(Tt)&&(Tt=0),rt=Tt*y*tt/z,Tt=Tt*-z*Mt/y,isNaN(rt)&&(rt=0),isNaN(Tt)&&(Tt=0),x=(x+lt)/2+ft*rt-yt*Tt,E=(E+ut)/2+yt*rt+ft*Tt,ut=b(1,0,(Mt-rt)/y,(tt-Tt)/z),ft=(Mt-rt)/y,lt=(tt-Tt)/z,Mt=(-Mt-rt)/y,rt=(-tt-Tt)/z,tt=b(ft,lt,Mt,rt),Mt=(ft*Mt+lt*rt)/(Math.sqrt(ft*ft+lt*lt)*Math.sqrt(Mt*Mt+rt*rt)),-1>=Mt?tt=Math.PI:1<=Mt&&(tt=0),!ot&&0<tt&&(tt-=2*Math.PI),ot&&0>tt&&(tt+=2*Math.PI),ot=y>z?1:y/z,Mt=y>z?z/y:1,y=Be.jx(0,0,y>z?y:z,ut,ut+tt,!0),z=ir.alloc(),z.reset(),z.translate(x,E),z.rotate(a.Ne,0,0),z.scale(ot,Mt),Hn.Ha(y,z),ir.free(z),a.ae=y,a.ae}yn.Object.defineProperties(Xr.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&&De(this,a),this.na=a,this._isInvalidBounds=!0}},endX:{get:function(){return this.Dc},set:function(a){this._isFrozen&&De(this,a),this.Dc=a,this._isInvalidBounds=!0}},endY:{get:function(){return this.Ec},set:function(a){this._isFrozen&&De(this,a),this.Ec=a,this._isInvalidBounds=!0}},point1X:{get:function(){return this.Ne},set:function(a){this._isFrozen&&De(this,a),this.Ne=a,this._isInvalidBounds=!0}},point1Y:{get:function(){return this.Vh},set:function(a){this._isFrozen&&De(this,a),this.Vh=a,this._isInvalidBounds=!0}},point2X:{get:function(){return this.Wh},set:function(a){this._isFrozen&&De(this,a),this.Wh=a,this._isInvalidBounds=!0}},point2Y:{get:function(){return this.Pg},set:function(a){this._isFrozen&&De(this,a),this.Pg=a,this._isInvalidBounds=!0}},centerX:{get:function(){return this.Ne},set:function(a){this._isFrozen&&De(this,a),this.Ne=a,this._isInvalidBounds=!0}},centerY:{get:function(){return this.Vh},set:function(a){this._isFrozen&&De(this,a),this.Vh=a,this._isInvalidBounds=!0}},radiusX:{get:function(){return this.Wh},set:function(a){0>a&&qn(a,">= zero",Xr,"radiusX"),this._isFrozen&&De(this,a),this.Wh=a,this._isInvalidBounds=!0}},radiusY:{get:function(){return this.Pg},set:function(a){0>a&&qn(a,">= zero",Xr,"radiusY"),this._isFrozen&&De(this,a),this.Pg=a,this._isInvalidBounds=!0}},startAngle:{get:function(){return this.Dc},set:function(a){this._isFrozen&&De(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&&De(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&&De(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&&De(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&&De(this,a),a%=360,0>a&&(a+=360),this.Ne=a,this._isInvalidBounds=!0}}}),Xr.prototype.equalsApprox=Xr.prototype.Xa;var Ss=new Te(Xr,"Move",0),yo=new Te(Xr,"Line",1),Fs=new Te(Xr,"Bezier",2),Oa=new Te(Xr,"QuadraticBezier",3),ss=new Te(Xr,"Arc",4),rl=new Te(Xr,"SvgArc",4);Xr.className="PathSegment",Xr.Move=Ss,Xr.Line=yo,Xr.Bezier=Fs,Xr.QuadraticBezier=Oa,Xr.Arc=ss,Xr.SvgArc=rl;function Ws(){this.H=null,this.xu=new Ot(0,0).freeze(),this.mt=new Ot(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}Ws.prototype.copy=function(){var a=new Ws;return this.clone(a)},Ws.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},Ws.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},Ws.prototype.So=function(a,y){var x=this.diagram;return x===null||Yc(x,a,y),y},Ws.prototype.Bz=function(a,y){var x=this.diagram;return x===null||(Yc(x,a,y),y.assign(x.Ps(y))),y},yn.Object.defineProperties(Ws.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}}}),Ws.prototype.getMultiTouchDocumentPoint=Ws.prototype.Bz,Ws.prototype.getMultiTouchViewPoint=Ws.prototype.So,Ws.className="InputEvent";function Wu(){this.H=null,this.xa="",this.ar=this.Lr=null}Wu.prototype.copy=function(){var a=new Wu;return a.H=this.H,a.xa=this.xa,a.Lr=this.Lr,a.ar=this.ar,a},Wu.prototype.toString=function(){var a="*"+this.name;return this.subject!==null&&(a+=":"+this.subject.toString()),this.parameter!==null&&(a+="("+this.parameter.toString()+")"),a},yn.Object.defineProperties(Wu.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}}}),Wu.className="DiagramEvent";function Ho(){this.Fm=Qo,this.rf=this.Qq="",this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null}Ho.prototype.clear=function(){this.Ln=this.Mn=this.Rn=this.Sn=this.Qn=this.H=this.cc=null},Ho.prototype.copy=function(){var a=new Ho;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=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Rn,a.Rn=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Mn,a.Mn=Ye(y)&&typeof y.J=="function"?y.J():y,y=this.Ln,a.Ln=Ye(y)&&typeof y.J=="function"?y.J():y,a},Ho.prototype.qb=function(a){a.classType===Ho&&(this.change=a)},Ho.prototype.toString=function(){var a="";return a=this.change===oa?a+"* ":this.change===Qo?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===oa?this.oldValue!==null&&(a+=" "+this.oldValue):(this.object!==null&&(a+=Fn(this.object)),this.oldValue!==null&&(a+=" old: "+Fn(this.oldValue)),this.oldParam!==null&&(a+=" "+this.oldParam),this.newValue!==null&&(a+=" new: "+Fn(this.newValue)),this.newParam!==null&&(a+=" "+this.newParam)),a},Ho.prototype.I=function(a){return a?this.oldValue:this.newValue},Ho.prototype.Dz=function(a){return a?this.oldParam:this.newParam},Ho.prototype.canUndo=function(){return this.model!==null||this.diagram!==null},Ho.prototype.undo=function(){this.canUndo()&&(this.model!==null?this.model.changeState(this,!0):this.diagram!==null&&this.diagram.changeState(this,!0))},Ho.prototype.canRedo=function(){return this.model!==null||this.diagram!==null},Ho.prototype.redo=function(){this.canRedo()&&(this.model!==null?this.model.changeState(this,!1):this.diagram!==null&&this.diagram.changeState(this,!1))},yn.Object.defineProperties(Ho.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===oa&&(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}}}),Ho.prototype.redo=Ho.prototype.redo,Ho.prototype.canRedo=Ho.prototype.canRedo,Ho.prototype.undo=Ho.prototype.undo,Ho.prototype.canUndo=Ho.prototype.canUndo,Ho.prototype.getParam=Ho.prototype.Dz,Ho.prototype.getValue=Ho.prototype.I,Ho.prototype.clear=Ho.prototype.clear;var oa=new Te(Ho,"Transaction",-1),Qo=new Te(Ho,"Property",0),as=new Te(Ho,"Insert",1),ms=new Te(Ho,"Remove",2);Ho.className="ChangedEvent",Ho.Transaction=oa,Ho.Property=Qo,Ho.Insert=as,Ho.Remove=ms;function Ts(){this.o=new ee().freeze(),this.xa="",this.j=!1}Ts.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},Ts.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()},Ts.prototype.canUndo=function(){return this.isComplete},Ts.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()}},Ts.prototype.canRedo=function(){return this.isComplete},Ts.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()}},Ts.prototype.ak=function(){if(this.isComplete){var a=this.changes;a.ka();for(var y=new ke,x=0;x<a.count;x++){var E=a.M(x);if(E!==null&&E.change===Qo&&E.object){var b=y.get(E.object);b||(b=new ke,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()}},yn.Object.defineProperties(Ts.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}}}),Ts.prototype.optimize=Ts.prototype.ak,Ts.prototype.redo=Ts.prototype.redo,Ts.prototype.canRedo=Ts.prototype.canRedo,Ts.prototype.undo=Ts.prototype.undo,Ts.prototype.canUndo=Ts.prototype.canUndo,Ts.prototype.clear=Ts.prototype.clear,Ts.className="Transaction";function Vo(){this.Pt=new xe,this.Jd=!1,this.u=new ee().freeze(),this.Ce=-1,this.o=999,this.Fe=!1,this.Np=null,this.bi=0,this.j=!1,this.Ie=new ee().freeze(),this.hl=new ee,this.tt=!0,this.Dt=this.rq=this.Gt=this.Ft=!1}Vo.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},Vo.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},Vo.prototype.copyProperties=function(a){this.isEnabled=a.isEnabled,this.maxHistoryLength=a.maxHistoryLength,this.checksTransactionLevel=a.checksTransactionLevel},kt=Vo.prototype,kt.Xw=function(a){this.Pt.add(a)},kt.Rx=function(a){this.Pt.remove(a)},kt.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},kt.eb=function(a){return a===void 0&&(a=""),dA(this,!0,a)},kt.Kf=function(){return dA(this,!1,"")};function dA(a,y,x){if(a.isUndoingRedoing)return!1;a.checksTransactionLevel&&1>a.transactionLevel&&Zn("Ending transaction without having started a transaction: "+x);var E=a.transactionLevel===1,b=a.currentTransaction;E&&y&&(a.isInternalTransaction||a.Ob("CommittingTransaction",x,b));var z=0;if(0<a.transactionLevel&&(a.bi--,a.isEnabled)){var tt=a.Ie.count;0<tt&&(x===""&&(x=a.Ie.M(0)),a.Ie.ka(),a.Ie.mb(tt-1),a.Ie.freeze()),tt=a.hl.count,0<tt&&(z=a.hl.M(tt-1),a.hl.mb(tt-1))}if(E){if(y)a.rq=!1,b===null&&x!==""&&(b=a.currentTransaction),a.isEnabled&&b!==null&&(b.isComplete||(b.isComplete=!0,b.name=x),a.lx(),y=a.history,y.ka(),E=a.maxHistoryLength,0<=E&&(E===0?y.clear():y.count>=E&&(z=y.M(0),z!==null&&z.clear(),y.mb(0),a.Ce--)),E===0||y.count!==0&&y.get(y.count-1)===b||(y.add(b),a.Ce++),y.freeze()),a.isInternalTransaction||a.Ob("CommittedTransaction",x,b);else{a.Fe=!0;try{a.isEnabled&&b!==null&&(b.isComplete=!0,b.undo())}finally{a.isInternalTransaction||a.Ob("RolledBackTransaction",x,b),a.Fe=!1}b!==null&&b.clear()}return a.Np=null,a.isPendingClear&&a.clear(),a.isPendingClear=!1,a.isPendingUnmodified=!1,!0}if(a.isEnabled&&!y&&b!==null){for(a=z,x=b.changes,b=x.count-1;b>=a;b--)y=x.M(b),y!==null&&y.undo(),x.ka(),x.mb(b);x.freeze()}return!1}kt.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()}},Vo.prototype.canUndo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToUndo;return!!(a!==null&&a.canUndo())},Vo.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){Zn("undo error: "+y.toString())}finally{this.Ob("FinishedUndo","Undo",a),this.Fe=!1}}},Vo.prototype.canRedo=function(){if(!this.isEnabled||0<this.transactionLevel)return!1;var a=this.transactionToRedo;return!!(a!==null&&a.canRedo())},Vo.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){Zn("redo error: "+y.toString())}finally{this.Ob("FinishedRedo","Redo",a),this.Fe=!1}}},Vo.prototype.Ob=function(a,y,x){x===void 0&&(x=null);var E=new Ho;for(E.change=oa,E.propertyName=a,E.object=x,E.oldValue=y,a=this.models;a.next();)y=a.value,E.model=y,y.ds(E)},Vo.prototype.Tu=function(a){if(this.isEnabled&&!this.isUndoingRedoing&&!this.skipsEvent(a)){var y=this.currentTransaction;y===null&&(this.Np=y=new Ts);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||Zn("Change not within a transaction: "+x.toString()))}},Vo.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},yn.Object.defineProperties(Vo.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}}}),Vo.prototype.handleChanged=Vo.prototype.Tu,Vo.prototype.redo=Vo.prototype.redo,Vo.prototype.undo=Vo.prototype.undo,Vo.prototype.canUndo=Vo.prototype.canUndo,Vo.prototype.discardHistoryAfterIndex=Vo.prototype.lx,Vo.prototype.rollbackTransaction=Vo.prototype.Kf,Vo.prototype.commitTransaction=Vo.prototype.eb,Vo.prototype.startTransaction=Vo.prototype.Ea,Vo.prototype.removeModel=Vo.prototype.Rx,Vo.prototype.addModel=Vo.prototype.Xw,Vo.prototype.clear=Vo.prototype.clear,Vo.className="UndoManager";function Yr(){An(this),this.H=Iu,this.xa="",this.Jd=!0,this.nb=!1,this.wm=null,this.yy=new Ws,this.Zr=-1}Yr.prototype.toString=function(){return this.name!==""?this.name+" Tool":fi(this.constructor)},Yr.prototype.updateAdornments=function(){},Yr.prototype.canStart=function(){return this.isEnabled},Yr.prototype.doStart=function(){},Yr.prototype.doActivate=function(){this.isActive=!0},Yr.prototype.doDeactivate=function(){this.isActive=!1},Yr.prototype.doStop=function(){},Yr.prototype.doCancel=function(){this.transactionResult=null,this.stopTool()},Yr.prototype.stopTool=function(){var a=this.diagram;a.currentTool===this&&(a.currentTool=null,a.currentCursor="")},Yr.prototype.doMouseDown=function(){!this.isActive&&this.canStart()&&this.doActivate()},Yr.prototype.doMouseMove=function(){},Yr.prototype.doMouseUp=function(){this.stopTool()},Yr.prototype.doMouseWheel=function(){},Yr.prototype.canStartMultiTouch=function(){return!0},Yr.prototype.standardPinchZoomStart=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ot.allocAt(NaN,NaN)),E=y.So(1,Ot.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}Ot.free(x),Ot.free(E)},Yr.prototype.standardPinchZoomMove=function(){var a=this.diagram,y=a.lastInput,x=y.So(0,Ot.allocAt(NaN,NaN)),E=y.So(1,Ot.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 Ot((Math.min(E.x,x.x)+Math.max(E.x,x.x))/2,(Math.min(E.y,x.y)+Math.max(E.y,x.y))/2),z*=a.Bw;var tt=a.commandHandler;if(z!==a.scale&&tt.canResetZoom(z)){var rt=a.zoomPoint;a.zoomPoint=b,tt.resetZoom(z),a.zoomPoint=rt}y.bubbles=!1}Ot.free(x),Ot.free(E)},Yr.prototype.doKeyDown=function(){this.diagram.lastInput.key==="Esc"&&this.doCancel()},Yr.prototype.doKeyUp=function(){},Yr.prototype.Ea=function(a){return a===void 0&&(a=this.name),this.transactionResult=null,this.diagram.Ea(a)},Yr.prototype.stopTransaction=function(){var a=this.diagram;return this.transactionResult===null?a.Kf():a.eb(this.transactionResult)},Yr.prototype.standardMouseSelect=function(){var a=this.diagram;if(a.allowSelect){var y=a.lastInput,x=a.Ol(y.documentPoint,!1);if(x!==null){if(hr?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||(hr?y.meta:y.control)||y.shift||a.clearSelection()}},Yr.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,Yu(a,E,x),E.handled};function Yu(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)}}}Yr.prototype.standardMouseOver=function(){var a=this.diagram,y=a.lastInput;if(a.animationManager.zb!==!0){var x=a.skipsUndoManager;a.skipsUndoManager=!0;var E=a.viewportBounds.ca(y.documentPoint)?a.ic(y.documentPoint,null,null):null;!y.event||y.event.type!=="pointercancel"&&y.event.type!=="pointerout"||(E=null),y.targetObject=E;var b=!1;if(E!==a.Ck){var z=a.Ck,tt=z;for(a.Ck=E,this.doCurrentObjectChanged(z,E),y.handled=!1;z!==null;){var rt=z.mouseLeave;if(rt!==null&&(E===z||E!==null&&E.rg(z)||(rt(y,z,E),b=!0,y.handled)))break;z=z.panel}for(z=tt,y.handled=!1;E!==null&&(tt=E.mouseEnter,!(tt!==null&&(z===E||z!==null&&z.rg(E)||(tt(y,E,z),b=!0,y.handled))));)E=E.panel;E=a.Ck}if(E!==null){for(z=E,tt="";z!==null&&(tt=z.cursor,tt==="");)z=z.panel;for(a.currentCursor=tt,y.handled=!1,z=E;z!==null&&(E=z.mouseOver,!(E!==null&&(E(y,z),b=!0,y.handled)));)z=z.panel}else this.doUpdateCursor(null),E=a.mouseOver,E!==null&&(E(y),b=!0);b&&a.$b(),a.skipsUndoManager=x}},Yr.prototype.doUpdateCursor=function(){var a=this.diagram;a&&(a.currentCursor="")},Yr.prototype.doCurrentObjectChanged=function(){},Yr.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===TA&&!y.shift||b===iu&&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===TA&&y.shift||b===iu&&!y.control){E=a.position.copy();var z=y.event;b=z.deltaMode;var tt=z.deltaX;z=z.deltaY;var rt="pixel";if(tt===0&&z===0||y.shift)!y.shift&&a.allowVerticalScroll?(x=3*x*a.scrollVerticalLineChange,a.scroll(rt,0<x?"up":"down",Math.abs(x))):y.shift&&a.allowHorizontalScroll&&(x=3*x*a.scrollHorizontalLineChange,a.scroll(rt,0<x?"left":"right",Math.abs(x)));else{switch(b){case 0:rt="pixel";break;case 1:rt="line";break;case 2:rt="page"}tt!==0&&a.allowHorizontalScroll&&(tt*=a.scrollHorizontalLineChange/16,a.scroll(rt,0<tt?"right":"left",Math.abs(tt))),z!==0&&a.allowVerticalScroll&&(z*=a.scrollVerticalLineChange/16,a.scroll(rt,0<z?"down":"up",Math.abs(z)))}this.doWheelChange(a,E,y)}}},Yr.prototype.doWheelChange=function(a,y,x){a.position.D(y)&&x.event.wheelDeltaX===0||(x.bubbles=!1)},Yr.prototype.standardWaitAfter=function(a,y){y===void 0&&(y=this.diagram.lastInput),this.cancelWaitAfter();var x=this,E=y.clone(this.yy);this.Zr=sr(function(){x.doWaitAfter(E)},a)},Yr.prototype.cancelWaitAfter=function(){this.Zr!==-1&&ln.clearTimeout(this.Zr),this.Zr=-1},Yr.prototype.doWaitAfter=function(){},Yr.prototype.findToolHandleAt=function(a,y){return a=this.diagram.ic(a,function(x){for(;x!==null&&!(x.panel instanceof ro);)x=x.panel;return x}),a===null?null:a.part.category===y?a:null},Yr.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},yn.Object.defineProperties(Yr.prototype,{diagram:{get:function(){return this.H},set:function(a){a instanceof Re&&(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}}}),Yr.prototype.startTransaction=Yr.prototype.Ea,Yr.className="Tool";function Eo(){Yr.call(this),this.name="ToolManager",this.hb=new ee,this.ob=new ee,this.Hb=new ee,this.F=this.V=850,this.o=new on(2,2).ja(),this.Ha=5e3,this.ia=iu,this.u=ch,this.Mp=this.j=null,this.zj=-1}Ge(Eo,Yr),Eo.prototype.initializeStandardTools=function(){},Eo.prototype.updateAdornments=function(a){var y=this.currentToolTip;if(y instanceof ro&&this.Mp===a){var x=y.adornedObject;(a!==null?x.part===a:x===null)?this.showToolTip(y,x):this.hideToolTip()}},Eo.prototype.doMouseDown=function(){var a=this.diagram,y=a.lastInput;if(y.isTouchEvent&&this.gestureBehavior===gu&&(y.bubbles=!1),y.isMultiTouch){if(this.cancelWaitAfter(),this.gestureBehavior===pu){y.bubbles=!0;return}if(this.gestureBehavior===gu)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===iu?this.mouseWheelBehavior=TA:this.mouseWheelBehavior===TA&&(this.mouseWheelBehavior=iu)),this.doActivate(),this.standardWaitAfter(this.holdDelay,y)},Eo.prototype.doMouseMove=function(){var a=this.diagram,y=a.lastInput;if(y.isMultiTouch){if(this.gestureBehavior===pu){y.bubbles=!0;return}if(this.gestureBehavior===gu)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}}Oh(this,a),a=y.event,a===null||a.type!=="pointermove"&&a.cancelable||(y.bubbles=!0)};function Oh(a,y){a.standardMouseOver(),a.isBeyondDragSize()&&a.standardWaitAfter(a.isActive?a.holdDelay:a.hoverDelay,y.lastInput)}Eo.prototype.doCurrentObjectChanged=function(a,y){a=this.currentToolTip,a===null||y!==null&&a instanceof ro&&(y===a||y.rg(a))||this.hideToolTip()},Eo.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()))},Eo.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)},Eo.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 ro)||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()},Eo.prototype.showToolTip=function(a,y){var x=this.diagram;if(a!==this.currentToolTip&&this.hideToolTip(),a instanceof ro){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 Mu&&a!==this.currentToolTip&&a.show(y,x,this);if(this.currentToolTip=a,this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1),a=this.toolTipDuration,0<a&&a!==1/0){var b=this;this.zj=sr(function(){b.hideToolTip()},a)}},Eo.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}},Eo.prototype.hideToolTip=function(){this.zj!==-1&&(ln.clearTimeout(this.zj),this.zj=-1);var a=this.diagram,y=this.currentToolTip;y!==null&&(y instanceof ro?(a.remove(y),this.Mp!==null&&this.Mp.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Mu&&y.hide!==null&&y.hide(a,this),this.currentToolTip=null)},Eo.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()},Eo.prototype.doMouseWheel=function(){this.standardMouseWheel()},Eo.prototype.doKeyDown=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyDown()},Eo.prototype.doKeyUp=function(){var a=this.diagram;a.commandHandler!==null&&a.commandHandler.doKeyUp()},Eo.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},Eo.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},Eo.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)},yn.Object.defineProperties(Eo.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 ro?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}}}),Eo.prototype.replaceStandardTool=Eo.prototype.gb;var iu=new Te(Eo,"WheelScroll",0),TA=new Te(Eo,"WheelZoom",1),Rh=new Te(Eo,"WheelNone",2),ch=new Te(Eo,"GestureZoom",3),gu=new Te(Eo,"GestureCancel",4),pu=new Te(Eo,"GestureNone",5);Eo.className="ToolManager",Eo.WheelScroll=iu,Eo.WheelZoom=TA,Eo.WheelNone=Rh,Eo.GestureZoom=ch,Eo.GestureCancel=gu,Eo.GestureNone=pu;function Go(){Yr.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 Ot(NaN,NaN),this.Fr=new Ot,this.hb=!0,this.Ik=100,this.Cg=[],this.te=new xe().freeze(),this.ia=new st,this.Bn=null,this.F="copy",this.Oc="",this.Pc="no-drop"}var Gl;Ge(Go,Yr),Go.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},Go.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},Go.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,(hr?y.meta:y.control)||y.shift||a.clearSelection(!0),this.currentPart.isSelected=!0,a.R("ChangedSelection",a.selection))}}},Go.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),Rs=null,this.isActive=!0,this.tl.set(a.position),dh(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&&Na(a),$c(a,this.draggedParts),this.Ea("Drag"),this.startPoint=a.firstInput.documentPoint,a.isMouseCaptured=!0,a.allowDragOut&&(this.isDragOutStarted=!0,this.Ym=!1,Rs=this,NA=this.diagram,this.doSimulatedDragOut()))};function dh(a,y){if(a.dragsLink){var x=a.diagram;x.allowRelink&&(x.model.Wj()&&y.count===1&&y.first()instanceof Yn?(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 pl,a.Oe.diagram=x),a.Oe.originalLink=a.draggedLink):(a.draggedLink=null,a.Oe=null))}}Go.prototype.computeEffectiveCollection=function(a,y){return this.diagram.commandHandler.computeEffectiveCollection(a,y)},Go.prototype.Pd=function(a){return a===void 0?new eA(vn):this.isGridSnapEnabled?new eA(new Ot(Math.round(1e3*a.x)/1e3,Math.round(1e3*a.y)/1e3)):new eA(a.copy())},Go.prototype.doDeactivate=function(){this.isActive=!1;var a=this.diagram;if(this.diagram.layout.isRealtime=this.Sw,a.Fu(!1),a.ug(),Pu(this),VA(a,this.draggedParts),this.draggedParts=this.currentPart=this.Bn=null,this.Ym=this.isDragOutStarted=!1,0<Gl.count){for(var y=Gl,x=y.length,E=0;E<x;E++){var b=y.M(E);_o(b),So(b),Pu(b),b.diagram.ug()}y.clear()}_o(this),this.tl.h(NaN,NaN),NA!==null&&(NA.currentCursor=""),Rs=NA=null,So(this),a.isMouseCaptured=!1,a.currentCursor="",a.Ns=!1,this.stopTransaction(),Yh(a,!0)},Go.prototype.stopTransaction=function(){var a=this.diagram,y=Yr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y};function Pu(a){var y=a.diagram,x=y.skipsUndoManager;y.skipsUndoManager=!0,Xu(a,y.lastInput,null),y.skipsUndoManager=x,a.Cg.length=0}function fA(){var a=Rs;So(a),sa(a);var y=a.diagram;a.tl.w()&&(y.position=a.tl),y.ug()}Go.prototype.doCancel=function(){So(this),sa(this);var a=this.diagram;this.tl.w()&&(a.position=this.tl),this.stopTool()},Go.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput;this.isActive&&(y.key==="Esc"?this.doCancel():y.key!==a.previousInput.key&&this.doMouseMove())},Go.prototype.doKeyUp=function(){this.isActive&&this.doMouseMove()};function Fu(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")):sa(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 ke,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 Yn&&E.canCopy()&&x.add(E,a.Pd());a.copiedParts=x,dh(a,x.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}function So(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 Yn&&(x.value.point=new Ot(0,0));a.doUpdateCursor(null)}y.skipsUndoManager=!1,y.partManager.addsToTemporaryLayer=!1,a.startPoint=y.firstInput.documentPoint}function _o(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 Os(a,y,x){var E=a.diagram,b=a.startPoint,z=Ot.alloc();z.assign(E.lastInput.documentPoint),a.moveParts(y,z.re(b),x),Ot.free(z),E.Gf("temporaryPixelRatio")===!0&&E.Yh===null&&30<E.$w&&(Na(E),E.hk())}Go.prototype.moveParts=function(a,y,x){x===void 0&&(x=!1);var E=this.diagram;E!==null&&Bh(E,a,y,this.dragOptions,x)};function sa(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 Yn&&E.suspendsRouting){var b=x.value.point;a.draggedParts.add(E,a.Pd()),Sc(E,-b.x,-b.y)}y.bd()}}function va(a,y){var x=a.diagram;a.dragsLink&&(a.draggedLink!==null&&(a.draggedLink.fromNode=null,a.draggedLink.toNode=null),jl(a,!1));var E=a.findDragOverObject(y),b=x.lastInput;b.targetObject=E,a.doUpdateCursor(E);var z=x.skipsUndoManager,tt=!1;try{if(x.skipsUndoManager=!0,tt=Xu(a,b,E),!a.isActive&&Rs===null)return;var rt=E!==null?E.part:null;if(rt===null||x.handlesDragDropForTopLevelParts&&rt.isTopLevel&&!(rt instanceof mr)){var ot=x.mouseDragOver;ot!==null&&(ot(b),tt=!0)}if(!a.isActive&&Rs===null||(a.doDragOver(y,E),!a.isActive&&Rs===null))return}finally{x.skipsUndoManager=z,tt&&x.bd()}a.Bn=E,x.isReadOnly||!x.allowMove&&!x.allowCopy||!x.allowHorizontalScroll&&!x.allowVerticalScroll||x.gs(b.viewPoint)}Go.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 ro||x.layer.isTemporary||y.draggedParts&&y.draggedParts.contains(x)||y.copiedParts&&y.copiedParts.contains(x))),!x})},Go.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 Xu(a,y,x){var E=!1,b=a.Cg.length,z=0<b?a.Cg[0]:null;if(x===z)return!1;y.handled=!1;for(var tt=0;tt<b;tt++){var rt=a.Cg[tt],ot=rt.mouseDragLeave;if(ot!==null&&(ot(y,rt,x),E=!0,y.handled))break}if(a.Cg.length=0,!a.isActive&&Rs===null||x===null)return E;for(y.handled=!1,b=x;b!==null;)a.Cg.push(b),b=Eu(b);for(b=a.Cg.length,x=0;x<b&&(tt=a.Cg[x],rt=tt.mouseDragEnter,rt===null||(rt(y,tt,z),E=!0,!y.handled));x++);return E}function Eu(a){var y=a.panel;return y!==null?y:a instanceof Zi&&!(a instanceof mr)&&(a=a.containingGroup,a!==null&&a.handlesDragDropForMembers)?a:null}function Ju(a,y,x){var E=a.Oe;if(E===null)return null;var b=a.diagram.og(y,E.portGravity,function(lt){return E.findValidLinkablePort(lt,x)});a=Ot.alloc();var z=1/0,tt=null;for(b=b.iterator;b.next();){var rt=b.value;if(rt.part!==null){var ot=rt.ga(cr,a);ot=y.Bf(ot),ot<z&&(tt=rt,z=ot)}}return Ot.free(a),tt}function jl(a,y){var x=a.draggedLink;if(x!==null&&!(2>x.pointsCount)){var E=a.diagram;if(!E.isReadOnly){var b=a.Oe;if(b!==null){var z=null,tt=null;x.fromNode===null&&(z=Ju(a,x.i(0),!1),z!==null&&(tt=z.part));var rt=null,ot=null;x.toNode===null&&(rt=Ju(a,x.i(x.pointsCount-1),!0),rt!==null&&(ot=rt.part)),b.isValidLink(tt,z,ot,rt)?y?(x.defaultFromPoint=x.i(0),x.defaultToPoint=x.i(x.pointsCount-1),x.suspendsRouting=!1,x.fromNode=tt,z!==null&&(x.fromPortId=z.portId),x.toNode=ot,rt!==null&&(x.toPortId=rt.portId),x.fromPort!==E.Mx&&E.R("LinkRelinked",x,E.Mx),x.toPort!==E.Nx&&E.R("LinkRelinked",x,E.Nx)):Fd(b,tt,z,ot,rt):Fd(b,null,null,null,null)}}}}Go.prototype.doDragOver=function(){};function mu(a,y){var x=a.diagram;a.dragsLink&&jl(a,!0),Pu(a);var E=a.findDragOverObject(y),b=x.lastInput;if(b.targetObject=E,E!==null){b.handled=!1;for(var z=E;z!==null;){var tt=z.mouseDrop;if(tt!==null&&(tt(b,z),b.handled))break;$g(a,b,z),z=Eu(z)}}else z=x.mouseDrop,z!==null&&z(b);if(a.isActive||Rs!==null){for(b=(a.copiedParts||a.draggedParts).iterator;b.next();)z=b.key,z instanceof gi&&z.linksConnected.each(function(rt){rt.suspendsRouting=!1});if(a.doDropOnto(y,E),a.isActive||Rs!==null){for(a=Oe.alloc(),y=x.selection.iterator;y.next();)E=y.value,E instanceof gi&&qg(x,E,a);Oe.free(a)}}}function $g(a,y,x){a=a.diagram,x=x.part,!a.handlesDragDropForTopLevelParts||!x.isTopLevel||x instanceof mr||(x=a.mouseDrop,x!==null&&x(y))}function qg(a,y,x){var E=!1;if(x=y.getAvoidableRect(x),a.viewportBounds.Re(x)&&(E=!0),a=a.Nu(x,function(b){return b.part},function(b){return b instanceof Yn},!0,function(b){return b instanceof Yn},E),a.count!==0)for(a=a.iterator;a.next();)x=a.value,!x.Td(y)&&x.isAvoiding&&x.bb()}Go.prototype.doDropOnto=function(){},Go.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()?(Fu(this,!1),$c(a,this.copiedParts),Os(this,this.copiedParts,!1),VA(a,this.copiedParts)):this.mayMove()?(So(this),Os(this,this.draggedParts,!0)):this.mayDragOut()?(Fu(this,!1),Os(this,this.copiedParts,!1)):So(this),va(this,a.lastInput.documentPoint))}},Go.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?(So(this),Fu(this,!0),$c(a,this.copiedParts),Os(this,this.copiedParts,!1),VA(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,So(this),this.mayMove()&&(Os(this,this.draggedParts,!0),va(this,a.lastInput.documentPoint))),this.Ym=!0,mu(this,a.lastInput.documentPoint),this.isActive){var E=x?this.copiedParts.Lf():this.draggedParts.Lf();this.copiedParts=null,y&&tp(this),a.Ya(),VA(a,this.draggedParts),this.transactionResult=x?"Copy":"Move",a.R(x?"SelectionCopied":"SelectionMoved",E)}this.stopTool(),x&&a.R("ChangedSelection",a.selection)}}},Go.prototype.simulatedMouseMove=function(a,y,x){if(Rs===null)return!1;var E=Rs.diagram;x instanceof Re||(x=null);var b=NA;return x!==b&&(b!==null&&b!==E&&(b.ug(),Rs.isDragOutStarted=!1,b=b.toolManager.findTool("Dragging"),b!==null&&b.doSimulatedDragLeave()),NA=x,x!==null&&x!==E&&(fA(),b=x.toolManager.findTool("Dragging"),b!==null&&(Gl.contains(b)||Gl.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)},Go.prototype.simulatedMouseUp=function(a,y,x){if(Rs===null)return!1;var E=NA,b=Rs.diagram;if(x===null)return Rs.doCancel(),!0;if(x!==E){var z=E.toolManager.findTool("Dragging");if(E!==null&&E!==b&&z!==null)return E.ug(),Rs.isDragOutStarted=!1,z.doSimulatedDragLeave(),!1;NA=x,E=x.toolManager.findTool("Dragging"),E!==null&&(fA(),Gl.contains(E)||Gl.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 Ot),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=Rs,a!==null&&(x=a.mayCopy(),a.transactionResult=x?"Copy":"Move",a.stopTool()),!0):!1};function tp(a){if(a.draggedParts!==null)for(var y=a.draggedParts.iterator;y.next();){var x=y.key;x instanceof gi&&(x=x.containingGroup,x===null||x.placeholder===null||a.draggedParts.contains(x)||x.placeholder.v())}}Go.prototype.mayCopy=function(){if(!this.isCopyEnabled)return!1;var a=this.diagram;if(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowCopy||(hr?!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())},Go.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())},Go.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())},Go.prototype.computeBorder=function(a,y,x){return this.Ym||this.draggedParts===null||this.draggedParts.contains(a)?null:x.assign(y)},Go.prototype.Az=function(){return Rs},Go.prototype.mayDragIn=function(){var a=this.diagram;if(!a.allowDrop||a.isReadOnly||a.isModelReadOnly||!a.allowInsert)return!1;var y=Rs;return!(y===null||y.diagram.model.dataFormat!==a.model.dataFormat)},Go.prototype.doSimulatedDragEnter=function(){if(this.mayDragIn()){var a=this.diagram;a.animationManager.Cc(),Ra(a),a.animationManager.Cc(),a=Rs,a!==null&&(a.diagram.Ns=!1),this.doUpdateCursor(null)}},Go.prototype.doSimulatedDragLeave=function(){var a=Rs;a!==null&&a.doSimulatedDragOut(),this.doCancel()},Go.prototype.doSimulatedDragOver=function(){var a=this.diagram;a.animationManager.Dm=!0;var y=Rs;if(y!==null&&y.draggedParts!==null){if(!this.mayDragIn())return;sg(this,y.draggedParts.Lf(),!1,a.firstInput),Os(this,this.copiedParts,!1),va(this,a.lastInput.documentPoint)}a.animationManager.Dm=!1},Go.prototype.doSimulatedDrop=function(){var a=this.diagram,y=Rs;if(y!==null){var x=y.diagram;if(y.Ym=!0,So(this),!this.mayDragIn())return;a.animationManager.Dm=!0,a.R("ChangingSelection",a.selection),this.Ea("Drop"),sg(this,y.draggedParts.Lf(),!0,a.lastInput),Os(this,this.copiedParts,!1);var E=new xe;this.copiedParts!==null&&(a.clearSelection(!0),this.copiedParts.iteratorKeys.each(function(b){b.isSelected=!0,E.add(b)})),mu(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 sg(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=Oe.alloc();b=E=1/0;for(var tt=-1/0,rt=-1/0,ot=y.iterator;ot.next();){var lt=ot.value;if(lt.isVisible()){var ut=lt.location;lt=ut.x,ut=ut.y,isNaN(lt)||isNaN(ut)||(lt<E&&(E=lt),ut<b&&(b=ut),lt>tt&&(tt=lt),ut>rt&&(rt=ut))}}for(E===1/0?z.h(0,0,0,0):z.h(E,b,tt-E,rt-b),E=z.x+z.width/2,b=z.y+z.height/2,Oe.free(z),z=a.Fr,tt=new ke,rt=Ot.alloc(),ot=y.iterator;ot.next();)lt=ot.value,lt instanceof Yn&&lt.canCopy()&&(ut=x.I(lt),ut!==null&&(ut.points=lt.points,Sc(ut,z.x-E,z.y-b),ut.suspendsRouting=!0,tt.add(ut,a.Pd())));for(y=y.iterator;y.next();)lt=y.value,lt.Zc()&&lt.canCopy()&&(ot=x.I(lt),ot!==null&&(lt=lt.location,rt.h(z.x-(E-lt.x),z.y-(b-lt.y)),ot.location=rt,ot.Va(),tt.add(ot,a.Pd(rt))));Ot.free(rt),a.copiedParts=tt,dh(a,tt.Lf()),a.draggedLink!==null&&(x=a.draggedLink,y=x.routeBounds,Sc(x,a.startPoint.x-(y.x+y.width/2),a.startPoint.y-(y.y+y.height/2))),a.doUpdateCursor(null)}}}Go.prototype.doSimulatedDragOut=function(){var a=this.diagram;a.Ns=!1,this.mayCopy()||this.mayMove()?a.currentCursor="":a.currentCursor=this.nodropCursor,this.Bn=null},Go.prototype.computeMove=function(a,y,x,E){return x=this.diagram,x!==null?x.computeMove(a,y,this.dragOptions,E):new Ot},yn.Object.defineProperties(Go.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}}}),Go.prototype.getDraggingSource=Go.prototype.Az;var Rs=null,NA=null;Go.className="DraggingTool",Gl=new ee,We("draggingTool",function(){return this.findTool("Dragging")},function(a){this.gb("Dragging",a,this.mouseMoveTools)}),Eo.prototype.doCancel=function(){Rs!==null&&Rs.doCancel(),Yr.prototype.doCancel.call(this)};function ls(){Yr.call(this),this.te=100,this.Ha=!1,this.u="pointer";var a=new Yn,y=new Cr;y.isPanelMain=!0,y.stroke="blue",a.add(y),y=new Cr,y.toArrow="Standard",y.fill="blue",y.stroke="blue",a.add(y),a.layerName="Tool",this.Ci=a,a=new gi,y=new Cr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Qi,a.add(y),a.selectable=!1,a.layerName="Tool",this.Bi=a,this.j=y,a=new gi,y=new Cr,y.portId="",y.figure="Rectangle",y.fill=null,y.stroke="magenta",y.strokeWidth=2,y.desiredSize=Qi,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 ke,this.Of=this.gj=this.Pf=null}Ge(ls,Yr),ls.prototype.doStop=function(){this.diagram.ug(),this.originalToPort=this.originalToNode=this.originalFromPort=this.originalFromNode=this.originalLink=null,this.validPortsCache.clear(),this.targetPort=null},ls.prototype.copyPortProperties=function(a,y,x,E,b){if(a!==null&&y!==null&&x!==null&&E!==null){var z=y.Df(),tt=on.alloc();tt.width=y.naturalBounds.width*z,tt.height=y.naturalBounds.height*z,E.desiredSize=tt,on.free(tt),b?(E.toSpot=y.toSpot,E.toEndSegmentLength=y.toEndSegmentLength):(E.fromSpot=y.fromSpot,E.fromEndSegmentLength=y.fromEndSegmentLength),x.locationSpot=cr,z=Ot.alloc(),x.location=y.ga(cr,z),Ot.free(z),E.angle=y.li(),this.portTargeted!==null&&this.portTargeted(a,y,x,E,b)}},ls.prototype.setNoTargetPortProperties=function(a,y,x){y!==null&&(y.desiredSize=Qi,y.fromSpot=pr,y.toSpot=pr),a!==null&&(a.location=this.diagram.lastInput.documentPoint),this.portTargeted!==null&&this.portTargeted(null,null,a,y,x)},ls.prototype.doMouseDown=function(){this.isActive&&this.doMouseMove()},ls.prototype.doMouseMove=function(){if(this.isActive){var a=this.diagram;if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null&&this.targetPort.part instanceof gi){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)}},ls.prototype.findValidLinkablePort=function(a,y){if(a===null)return null;var x=a.part;if(!(x instanceof gi))return null;for(;a!==null;){var E=y?a.toLinkable:a.fromLinkable;if(E===!0&&(a.portId!==null||a instanceof gi)&&(y?this.isValidTo(x,a):this.isValidFrom(x,a)))return a;if(E===!1)break;a=a.panel}return null},ls.prototype.findTargetPort=function(a){var y=this.diagram,x=y.lastInput.documentPoint,E=this.portGravity;0>=E&&(E=.1);var b=this,z=y.og(x,E,function(ft){return b.findValidLinkablePort(ft,a)},null,!0);for(E=1/0,y=null,z=z.iterator;z.next();){var tt=z.value,rt=tt.part;if(rt instanceof gi){var ot=tt.ga(cr,Ot.alloc()),lt=x.x-ot.x,ut=x.y-ot.y;Ot.free(ot),ot=lt*lt+ut*ut,ot<E&&(lt=this.validPortsCache.I(tt),lt!==null?lt&&(y=tt,E=ot):a&&this.isValidLink(this.originalFromNode,this.originalFromPort,rt,tt)||!a&&this.isValidLink(rt,tt,this.originalToNode,this.originalToPort)?(this.validPortsCache.add(tt,!0),y=tt,E=ot):this.validPortsCache.add(tt,!1))}}return y!==null&&(x=y.part,x instanceof gi&&(x.layer===null||x.layer.allowLink))?y:null},ls.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},ls.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},ls.prototype.isInSameNode=function(a,y){return a===null||y===null?!1:a===y?!0:(a=a.part,y=y.part,a!==null&&a===y)},ls.prototype.isLinked=function(a,y){if(a===null||y===null)return!1;var x=a.part;if(!(x instanceof gi))return!1;a=a.portId,a===null&&(a="");var E=y.part;if(!(E instanceof gi))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},ls.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)},ls.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 xe;return E.add(a),ya(this,x,y,E)};function ya(a,y,x,E){if(y===x)return!0;var b=y.fromNode;return b!==null&&b.isLinkLabel&&(E.add(b),ya(a,b.labeledLink,x,E))?!0:(y=y.toNode,!!(y!==null&&y.isLinkLabel&&(E.add(y),ya(a,y.labeledLink,x,E))))}ls.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!==id){if(E===jd){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!Ma(this,a,y,x,!0)}if(E===Nf){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!Ma(this,a,y,x,!0)}if(E===sc)return a===y?a=!0:(E=new xe,E.add(y),a=ba(this,E,a,y,x)),!a;if(E===ac)return!Ma(this,a,y,x,!1);if(E===Gd)return a===y?a=!0:(E=new xe,E.add(y),a=DA(this,E,a,y,x)),!a}return!0};function Ma(a,y,x,E,b){if(y===x)return!0;if(y===null||x===null)return!1;for(var z=y.linksConnected;z.next();){var tt=z.value;if(tt!==E&&(!b||tt.isTreeLink)&&tt.toNode===y&&(tt=tt.fromNode,tt!==y&&Ma(a,tt,x,E,b)))return!0}return!1}function ba(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b&&tt.toNode===x&&(tt=tt.fromNode,tt!==x&&ba(a,y,tt,E,b)))return!0}return!1}function DA(a,y,x,E,b){if(x===E)return!0;if(x===null||E===null||y.contains(x))return!1;y.add(x);for(var z=x.linksConnected;z.next();){var tt=z.value;if(tt!==b){var rt=tt.fromNode;if(tt=tt.toNode,rt=rt===x?tt:rt,rt!==x&&DA(a,y,rt,E,b))return!0}}return!1}yn.Object.defineProperties(ls.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}}}),ls.className="LinkingBaseTool";function ca(){ls.call(this),this.name="Linking",this.V={},this.F=null,this.K=fh,this.Xd=null}Ge(ca,ls),ca.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},ca.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 gi)))return null;var x=this.direction;if(x===fh||x===ag){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===fh||x===lg)&&(y=this.findValidLinkablePort(y,!0),y!==null||this.startObject===a&&(y=a.port,this.findValidLinkablePort(y,!0)))?(this.isForwards=!1,y):null},ca.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 gi&&(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 gi&&(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)},ca.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()},ca.prototype.doStop=function(){ls.prototype.doStop.call(this),this.startObject=null},ca.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram,y=this.transactionResult=null,x=null,E=null,b=null,z=null;try{var tt=this.targetPort=this.findTargetPort(this.isForwards);if(tt!==null){var rt=tt.part;rt instanceof gi&&(this.isForwards?(this.originalFromNode!==null&&(y=this.originalFromNode,x=this.originalFromPort),E=rt,b=tt):(y=rt,x=tt,this.originalToNode!==null&&(E=this.originalToNode,b=this.originalToPort)))}else this.isForwards?this.originalFromNode!==null&&this.isUnconnectedLinkValid&&(y=this.originalFromNode,x=this.originalFromPort):this.originalToNode!==null&&this.isUnconnectedLinkValid&&(E=this.originalToNode,b=this.originalToPort);y!==null||E!==null?(z=this.insertLink(y,x,E,b),z!==null?(tt===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint),a.allowSelect&&(a.R("ChangingSelection",a.selection),a.clearSelection(!0),z.isSelected=!0),this.transactionResult=this.name,a.R("LinkDrawn",z)):this.doNoLink(y,x,E,b)):this.isForwards?this.doNoLink(this.originalFromNode,this.originalFromPort,null,null):this.doNoLink(null,null,this.originalToNode,this.originalToPort)}finally{this.stopTool(),z&&a.allowSelect&&a.R("ChangedSelection",a.selection)}}},ca.prototype.isNewTreeLink=function(){var a=this.archetypeLinkData;if(a===null)return!0;if(a instanceof Yn)return a.isTreeLink;var y=this.diagram;return y===null?!0:(a=y.partManager.getLinkCategoryForData(a),y=y.partManager.findLinkTemplateForCategory(a),y!==null?y.isTreeLink:!0)},ca.prototype.insertLink=function(a,y,x,E){return this.diagram.partManager.insertLink(a,y,x,E)},ca.prototype.doNoLink=function(){},yn.Object.defineProperties(ca.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 fh=new Te(ca,"Either",0),ag=new Te(ca,"ForwardsOnly",0),lg=new Te(ca,"BackwardsOnly",0);ca.className="LinkingTool",ca.Either=fh,ca.ForwardsOnly=ag,ca.BackwardsOnly=lg;function pl(){ls.call(this),this.name="Relinking";var a=new Cr;a.figure="Diamond",a.desiredSize=Gi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=0,this.V=a,a=new Cr,a.figure="Diamond",a.desiredSize=Gi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor=this.linkingCursor,a.segmentIndex=-1,this.Xd=a,this.F=null,this.Ew=new Oe}Ge(pl,ls),pl.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Yn){var y="RelinkFrom",x=null;if(a.isSelected&&!this.diagram.isReadOnly){var E=a.selectionObject;E!==null&&a.canRelinkFrom()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null&&(x=this.makeAdornment(E,!1),a.bh(y,x)))}x===null&&a.Jf(y),y="RelinkTo",x=null,a.isSelected&&!this.diagram.isReadOnly&&(E=a.selectionObject,E!==null&&a.canRelinkTo()&&a.actualBounds.w()&&a.isVisible()&&E.actualBounds.w()&&E.Ed()&&(x=a.Pj(y),x===null?(x=this.makeAdornment(E,!0),a.bh(y,x)):x.v())),x===null&&a.Jf(y)}},pl.prototype.makeAdornment=function(a,y){var x=new ro;return x.type=En.Link,y=y?this.toHandleArchetype:this.fromHandleArchetype,y!==null&&x.add(y.copy()),x.adornedObject=a,x},pl.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},pl.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 ro&&x.adornedPart instanceof Yn))return;this.handle=y,this.isForwards=x===null||x.category==="RelinkTo",this.originalLink=x.adornedPart}this.Ea(this.name),a.isMouseCaptured=!0,a.currentCursor=this.linkingCursor,this.originalFromPort=this.originalLink.fromPort,this.originalFromNode=this.originalLink.fromNode,this.originalToPort=this.originalLink.toPort,this.originalToNode=this.originalLink.toNode,this.Ew.set(this.originalLink.actualBounds),this.originalLink!==null&&0<this.originalLink.pointsCount&&(this.originalLink.fromNode===null&&(this.temporaryFromPort!==null&&(this.temporaryFromPort.desiredSize=_i),this.temporaryFromNode!==null&&(this.temporaryFromNode.location=this.originalLink.i(0))),this.originalLink.toNode===null&&(this.temporaryToPort!==null&&(this.temporaryToPort.desiredSize=_i),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},pl.prototype.copyLinkProperties=function(a,y){if(a!==null&&y!==null){y.adjusting=a.adjusting,y.corner=a.corner;var x=a.curve;(x===Lg||x===Bc)&&(x=Xa),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}},pl.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()},pl.prototype.doStop=function(){ls.prototype.doStop.call(this),this.handle=null},pl.prototype.doMouseUp=function(){if(this.isActive){var a=this.diagram;this.transactionResult=null;var y=this.originalFromNode,x=this.originalFromPort,E=this.originalToNode,b=this.originalToPort,z=this.originalLink;try{if(this.targetPort=this.findTargetPort(this.isForwards),this.targetPort!==null){var tt=this.targetPort.part;tt instanceof gi&&(this.isForwards?(E=tt,b=this.targetPort):(y=tt,x=this.targetPort))}else this.isUnconnectedLinkValid?this.isForwards?b=E=null:x=y=null:z=null;z!==null?(this.reconnectLink(z,this.isForwards?E:y,this.isForwards?b:x,this.isForwards),this.targetPort===null&&(this.isForwards?z.defaultToPoint=a.lastInput.documentPoint:z.defaultFromPoint=a.lastInput.documentPoint,z.bb()),this.transactionResult=this.name,a.R("LinkRelinked",z,this.isForwards?this.originalToPort:this.originalFromPort)):this.doNoRelink(this.originalLink,this.isForwards),this.originalLink.Xo(this.Ew)}finally{this.stopTool()}}},pl.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},pl.prototype.doNoRelink=function(){};function Fd(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)}yn.Object.defineProperties(pl.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 ro))throw Error("new handle is not in an Adornment: "+a);this.F=a}}}),pl.className="RelinkingTool",We("linkingTool",function(){return this.findTool("Linking")},function(a){this.gb("Linking",a,this.mouseMoveTools)}),We("relinkingTool",function(){return this.findTool("Relinking")},function(a){this.gb("Relinking",a,this.mouseDownTools)});function vs(){Yr.call(this),this.name="LinkReshaping";var a=new Cr;a.figure="Rectangle",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",this.o=a,a=new Cr,a.figure="Diamond",a.desiredSize=Gi,a.fill="lightblue",a.stroke="dodgerblue",a.cursor="move",this.u=a,this.F=3,this.Ts=this.j=null,this.Fw=new Ot,this.Yq=new ee}Ge(vs,Yr),vs.prototype.Ru=function(a){return a&&a.reshapingBehavior.value!==0?a.reshapingBehavior:cf},vs.prototype.om=function(a,y){a.reshapingBehavior=y},vs.prototype.updateAdornments=function(a){if(a!==null&&a instanceof Yn){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)}},vs.prototype.makeAdornment=function(a){var y=a.part,x=y.pointsCount,E=y.isOrthogonal,b=null;if(y.points!==null&&1<x){b=new ro,b.type=En.Link,x=y.firstPickIndex;var z=y.lastPickIndex,tt=E?1:0;if(y.resegmentable&&y.computeCurve()!==ql)for(var rt=x+tt;rt<z-tt;rt++){var ot=this.makeResegmentHandle(a,rt);ot!==null&&(ot.segmentIndex=rt,ot.segmentFraction=.5,ot.fromMaxLinks=999,b.add(ot))}for(tt=x+1;tt<z;tt++)if(rt=this.makeHandle(a,tt),rt!==null){if(rt.segmentIndex=tt,tt!==x)if(tt===x+1&&E){ot=y.i(x);var lt=y.i(x+1);Be.B(ot.x,lt.x)&&Be.B(ot.y,lt.y)&&(lt=y.i(x-1)),Be.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):Be.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")}else tt===z-1&&E?(ot=y.i(z-1),lt=y.i(z),Be.B(ot.x,lt.x)&&Be.B(ot.y,lt.y)&&(ot=y.i(z+1)),Be.B(ot.x,lt.x)?(this.om(rt,UA),rt.cursor="n-resize"):Be.B(ot.y,lt.y)&&(this.om(rt,IA),rt.cursor="w-resize")):tt!==z&&(this.om(rt,Ed),rt.cursor="move");b.add(rt)}b.adornedObject=a}return b},vs.prototype.makeHandle=function(){var a=this.handleArchetype;return a===null?null:a.copy()},vs.prototype.makeResegmentHandle=function(){var a=this.midHandleArchetype;return a===null?null:a.copy()},vs.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},vs.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 Yn){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}}},vs.prototype.doDeactivate=function(){this.stopTransaction(),this.Ts=this.handle=null,this.isActive=this.diagram.isMouseCaptured=!1},vs.prototype.stopTransaction=function(){var a=this.diagram,y=Yr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},vs.prototype.doCancel=function(){var a=this.adornedLink;a!==null&&(a.points=this.Yq),this.stopTool()},vs.prototype.getResegmentingPoint=function(){return this.handle.ga(cr)},vs.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeReshape(a.lastInput.documentPoint),this.reshape(a))},vs.prototype.doMouseUp=function(){var a=this.diagram;if(this.isActive){var y=this.computeReshape(a.lastInput.documentPoint);if(this.reshape(y),y=this.adornedLink,y!==null&&y.resegmentable){var x=this.handle.segmentIndex,E=y.i(x-1),b=y.i(x),z=y.i(x+1);if(y.isOrthogonal){if(x>y.firstPickIndex+1&&x<y.lastPickIndex-1){var tt=y.i(x-2);if(Math.abs(E.x-b.x)<this.resegmentingDistance&&Math.abs(E.y-b.y)<this.resegmentingDistance&&(Lu(this,tt,E,b,z,!0)||Lu(this,tt,E,b,z,!1))){var rt=y.points.copy();Lu(this,tt,E,b,z,!0)?(rt.cd(x-2,new Ot(tt.x,(z.y+tt.y)/2)),rt.cd(x+1,new Ot(z.x,(z.y+tt.y)/2))):(rt.cd(x-2,new Ot((z.x+tt.x)/2,tt.y)),rt.cd(x+1,new Ot((z.x+tt.x)/2,z.y))),rt.mb(x),rt.mb(x-1),y.points=rt,y.Wb()}else tt=y.i(x+2),Math.abs(b.x-z.x)<this.resegmentingDistance&&Math.abs(b.y-z.y)<this.resegmentingDistance&&(Lu(this,E,b,z,tt,!0)||Lu(this,E,b,z,tt,!1))&&(rt=y.points.copy(),Lu(this,E,b,z,tt,!0)?(rt.cd(x-1,new Ot(E.x,(E.y+tt.y)/2)),rt.cd(x+2,new Ot(tt.x,(E.y+tt.y)/2))):(rt.cd(x-1,new Ot((E.x+tt.x)/2,E.y)),rt.cd(x+2,new Ot((E.x+tt.x)/2,tt.y))),rt.mb(x+1),rt.mb(x),y.points=rt,y.Wb())}}else tt=Ot.alloc(),Be.qh(E.x,E.y,z.x,z.y,b.x,b.y,tt)&&tt.Bf(b)<this.resegmentingDistance*this.resegmentingDistance&&(E=y.points.copy(),E.mb(x),y.points=E,y.Wb()),Ot.free(tt)}a.Ya(),this.transactionResult=this.name,a.R("LinkReshaped",this.adornedLink,this.Yq)}this.stopTool()};function Lu(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}vs.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===UA?(y.L(x,y.i(x-1).x,a.y),y.L(x+1,y.i(x+2).x,a.y)):E===IA&&(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===UA?(y.L(x-1,y.i(x-2).x,a.y),y.L(x,y.i(x+1).x,a.y)):E===IA&&(y.L(x-1,a.x,y.i(x-2).y),y.L(x,a.x,y.i(x+1).y));else{E=x;var b=y.i(E),z=y.i(E-1),tt=y.i(E+1);Be.B(z.x,b.x)&&Be.B(b.y,tt.y)?(Be.B(z.x,y.i(E-2).x)&&!Be.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),Be.B(tt.y,y.i(E+2).y)&&!Be.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)):Be.B(z.y,b.y)&&Be.B(b.x,tt.x)?(Be.B(z.y,y.i(E-2).y)&&!Be.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),Be.B(tt.x,y.i(E+2).x)&&!Be.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Be.B(z.x,b.x)&&Be.B(b.x,tt.x)?(Be.B(z.x,y.i(E-2).x)&&!Be.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),Be.B(tt.x,y.i(E+2).x)&&!Be.B(tt.y,y.i(E+2).y)?y.m(E+1,a.x,tt.y):y.L(E+1,a.x,tt.y)):Be.B(z.y,b.y)&&Be.B(b.y,tt.y)&&(Be.B(z.y,y.i(E-2).y)&&!Be.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),Be.B(tt.y,y.i(E+2).y)&&!Be.B(tt.x,y.i(E+2).x)?y.m(E+1,tt.x,a.y):y.L(E+1,tt.x,a.y)),y.L(x,a.x,a.y)}else y.L(x,a.x,a.y),E=y.fromNode,b=y.fromPort,E!==null&&(z=E.findVisibleNode(),z!==null&&z!==E&&(E=z,b=E.port)),x===1&&y.computeSpot(!0,b).Mc()&&(z=b.ga(cr,Ot.alloc()),E=y.getLinkPointFromPoint(E,b,z,a,!0,Ot.alloc()),y.L(0,E.x,E.y),Ot.free(z),Ot.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(cr,Ot.alloc()),a=y.getLinkPointFromPoint(E,b,x,a,!1,Ot.alloc()),y.L(y.pointsCount-1,a.x,a.y),Ot.free(x),Ot.free(a));y.zf()},vs.prototype.computeReshape=function(a){var y=this.adornedLink,x=this.handle.segmentIndex;switch(this.Ru(this.handle)){case Ed:return a;case UA:return new Ot(y.i(x).x,a.y);case IA:return new Ot(a.x,y.i(x).y);default:case cf:return y.i(x)}},yn.Object.defineProperties(vs.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 ro))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}}}),vs.prototype.setReshapingBehavior=vs.prototype.om,vs.prototype.getReshapingBehavior=vs.prototype.Ru;var cf=new Te(vs,"None",0),IA=new Te(vs,"Horizontal",1),UA=new Te(vs,"Vertical",2),Ed=new Te(vs,"All",3);vs.className="LinkReshapingTool",vs.None=cf,vs.Horizontal=IA,vs.Vertical=UA,vs.All=Ed,We("linkReshapingTool",function(){return this.findTool("LinkReshaping")},function(a){this.gb("LinkReshaping",a,this.mouseDownTools)});function da(){Yr.call(this),this.name="Resizing",this.o=new on(1,1).freeze(),this.j=new on(9999,9999).freeze(),this.yg=new on(NaN,NaN).freeze(),this.V=!1,this.ia=!0,this.ue=null;var a=new Cr;a.alignmentFocus=cr,a.figure="Rectangle",a.desiredSize=nr,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.F=a,this.u=null,this.Xq=new Ot,this.Dw=new on,this.Tn=new Ot,this.rt=new on(0,0),this.qt=new on(1/0,1/0),this.pt=new on(1,1)}Ge(da,Yr),da.prototype.updateAdornments=function(a){if(!(a===null||a instanceof Yn)){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(),od(a)&&this.updateResizeHandles(x,y),a.bh(this.name,x);return}}a.Jf(this.name)}},da.prototype.makeAdornment=function(a){var y=a.part.resizeAdornmentTemplate;if(y===null){y=new ro,y.type=En.Spot,y.locationSpot=cr;var x=new Ya;x.isPanelMain=!0,y.add(x),y.add(this.makeHandle(a,Qr)),y.add(this.makeHandle(a,so)),y.add(this.makeHandle(a,lo)),y.add(this.makeHandle(a,gs)),y.add(this.makeHandle(a,Yo)),y.add(this.makeHandle(a,hs)),y.add(this.makeHandle(a,js)),y.add(this.makeHandle(a,Fo))}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},da.prototype.makeHandle=function(a,y){return a=this.handleArchetype,a===null?null:(a=a.copy(),a.alignment=y,a)},da.prototype.updateResizeHandles=function(a,y){if(a!==null){if(!a.alignment.Xb()&&(a.cursor==="pointer"||0<a.cursor.indexOf("resize")))t:{var x=a.alignment;if(x.Mc()&&(x=cr),0>=x.x)y=0>=x.y?y+225:1<=x.y?y+135:y+180;else if(1<=x.x)0>=x.y?y+=315:1<=x.y&&(y+=45);else if(0>=x.y)y+=270;else if(1<=x.y)y+=90;else break t;0>y?y+=360:360<=y&&(y-=360),a.cursor=22.5>y?"e-resize":67.5>y?"se-resize":112.5>y?"s-resize":157.5>y?"sw-resize":202.5>y?"w-resize":247.5>y?"nw-resize":292.5>y?"n-resize":337.5>y?"ne-resize":"e-resize"}else if(a instanceof En)for(a=a.elements;a.next();)this.updateResizeHandles(a.value,y)}},da.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},da.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))},da.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.isActive=a.isMouseCaptured=!1},da.prototype.stopTransaction=function(){var a=this.diagram,y=Yr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},da.prototype.doCancel=function(){this.adornedObject!==null&&(this.adornedObject.desiredSize=this.originalDesiredSize,this.adornedObject.part.location=this.originalLocation),this.stopTool()},da.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,Ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),a.bd(),Ot.free(b)}},da.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,Ot.alloc()),z=this.computeReshape();y=this.computeResize(b,this.handle.alignment,y,x,E,z),this.resize(y),Ot.free(b),a.Ya(),this.transactionResult=this.name,a.R("PartResized",this.adornedObject,this.originalDesiredSize)}this.stopTool()},da.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 mr){var E=new ee;if(E.add(a),!this.dragsMembers&&a.placeholder===null){var b=new st;b.dragsMembers=!1}y.moveParts(E,this.oppositePoint.copy().re(x),!0,b)}else a.location=a.location.copy().re(x).add(this.oppositePoint);y.bd()}},da.prototype.computeResize=function(a,y,x,E,b,z){y.Mc()&&(y=cr);var tt=this.adornedObject.naturalBounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width,ut=tt.y+tt.height,ft=1;if(!z){ft=tt.width;var yt=tt.height;0>=ft&&(ft=1),0>=yt&&(yt=1),ft=yt/ft}return yt=Ot.alloc(),Be.No(a.x,a.y,rt,ot,b.width,b.height,yt),a=tt.copy(),0>=y.x?0>=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width,a.y=ut-a.height)):1<=y.y?(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=Math.max(lt-a.x,x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.x=lt-a.width)):(a.x=Math.max(yt.x,lt-E.width),a.x=Math.min(a.x,lt-x.width),a.width=lt-a.x,z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):1<=y.x?0>=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=Math.max(ut-a.y,x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width),a.y=ut-a.height)):1<=y.y?(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(1<=a.height/a.width?(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft):(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width))):(a.width=Math.max(Math.min(yt.x-rt,E.width),x.width),z||(a.height=Math.max(Math.min(ft*a.width,E.height),x.height),a.width=a.height/ft,a.y=ot+.5*(ut-ot-a.height))):0>=y.y?(a.y=Math.max(yt.y,ut-E.height),a.y=Math.min(a.y,ut-x.height),a.height=ut-a.y,z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))):1<=y.y&&(a.height=Math.max(Math.min(yt.y-ot,E.height),x.height),z||(a.width=Math.max(Math.min(a.height/ft,E.width),x.width),a.height=ft*a.width,a.x=rt+.5*(lt-rt-a.width))),Ot.free(yt),a},da.prototype.computeReshape=function(){var a=Pn;return this.adornedObject instanceof Cr&&(a=_m(this.adornedObject)),!(a===Ii||this.diagram.lastInput.shift)},da.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},da.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},da.prototype.computeCellSize=function(){var a=new on(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},yn.Object.defineProperties(da.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 ro))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 ro)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}}}),da.className="ResizingTool",We("resizingTool",function(){return this.findTool("Resizing")},function(a){this.gb("Resizing",a,this.mouseDownTools)});function ka(){Yr.call(this),this.name="Rotating",this.ia=45,this.V=2,this.Tn=new Ot,this.ue=null;var a=new Cr;a.figure="Ellipse",a.desiredSize=Gi,a.fill="lightblue",a.stroke="dodgerblue",a.strokeWidth=1,a.cursor="pointer",this.o=a,this.j=null,this.Cw=0,this.kr=new Ot(NaN,NaN),this.u=0,this.F=50}Ge(ka,Yr),ka.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)}},ka.prototype.makeAdornment=function(a){var y=a.part.rotateAdornmentTemplate;if(y===null){y=new ro,y.type=En.Position,y.locationSpot=cr;var x=this.handleArchetype;x!==null&&y.add(x.copy())}else if(yu(y),y=y.copy(),y===null)return null;return y.adornedObject=a,y},ka.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},ka.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)},ka.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(cr)},ka.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)},ka.prototype.doDeactivate=function(){var a=this.diagram;this.stopTransaction(),this.ue=this.handle=null,this.kr=new Ot(NaN,NaN),this.isActive=a.isMouseCaptured=!1},ka.prototype.stopTransaction=function(){var a=this.diagram,y=Yr.prototype.stopTransaction.call(this);return y&&a.undoManager.transactionToUndo!==null&&a.undoManager.transactionToUndo.ak(),y},ka.prototype.doCancel=function(){this.diagram.delaysLayout=!1,this.rotate(this.originalAngle),this.stopTool()},ka.prototype.doMouseMove=function(){var a=this.diagram;this.isActive&&(a=this.computeRotate(a.lastInput.documentPoint),this.rotate(a))},ka.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()},ka.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()}},ka.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},yn.Object.defineProperties(ka.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 ro))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 ro)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}}}),ka.className="RotatingTool",We("rotatingTool",function(){return this.findTool("Rotating")},function(a){this.gb("Rotating",a,this.mouseDownTools)});function gh(){Yr.call(this),this.name="ClickSelecting"}Ge(gh,Yr),gh.prototype.canStart=function(){return!(!this.isEnabled||this.isBeyondDragSize())},gh.prototype.doMouseUp=function(){this.isActive&&(this.standardMouseSelect(),!this.standardMouseClick()&&this.diagram.lastInput.isTouchEvent&&this.diagram.toolManager.doToolTip()),this.stopTool()},gh.className="ClickSelectingTool";function Vl(){Yr.call(this),this.name="Action",this.pk=null}Ge(Vl,Yr),Vl.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},Vl.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()},Vl.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))}},Vl.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()},Vl.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())},Vl.prototype.doStop=function(){this.pk=null},Vl.className="ActionTool";function QA(){Yr.call(this),this.name="ClickCreating",this.Ri=null,this.o=!0,this.j=!1,this.mw=new Ot(0,0)}Ge(QA,Yr),QA.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)},QA.prototype.doMouseUp=function(){var a=this.diagram;this.isActive&&this.insertPart(a.lastInput.documentPoint),this.stopTool()},QA.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 Zi)x.Zc()&&(yu(x),E=x.copy(),E!==null&&y.add(E));else if(x!==null){var b=y.model.copyNodeData(x);Ye(b)&&(y.model.xf(b),E=y.Lc(b))}if(E!==null){var z=Ot.allocAt(a.x,a.y);this.isGridSnapEnabled&&Jc(this.diagram,E,a,z),E.location=z,y.allowSelect&&(y.clearSelection(!0),E.isSelected=!0),Ot.free(z)}y.Ya(),this.transactionResult=this.name,y.R("PartCreated",E)}finally{this.stopTransaction(),y.R("ChangedSelection",y.selection)}return E},yn.Object.defineProperties(QA.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}}}),QA.className="ClickCreatingTool";function Tl(){Yr.call(this),this.name="DragSelecting",this.Ik=175,this.o=!1;var a=new Zi;a.layerName="Tool",a.selectable=!1;var y=new Cr;y.name="SHAPE",y.figure="Rectangle",y.fill=null,y.stroke="magenta",a.add(y),this.j=a}Ge(Tl,Yr),Tl.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))},Tl.prototype.doActivate=function(){var a=this.diagram;this.isActive=!0,a.isMouseCaptured=!0,a.skipsUndoManager=!0,a.add(this.box),this.doMouseMove()},Tl.prototype.doDeactivate=function(){var a=this.diagram;a.ug(),a.remove(this.box),a.skipsUndoManager=!1,this.isActive=a.isMouseCaptured=!1},Tl.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=on.alloc().h(y.width,y.height);x.desiredSize=E,this.box.mm(y.x,y.y,!1),on.free(E),(a.allowHorizontalScroll||a.allowVerticalScroll)&&a.gs(a.lastInput.viewPoint)}},Tl.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()},Tl.prototype.computeBoxBounds=function(){var a=this.diagram;return new Oe(a.firstInput.documentPoint,a.lastInput.documentPoint)},Tl.prototype.selectInRect=function(a){var y=this.diagram,x=y.lastInput;if(a=y.ux(a,this.isPartialInclusion),hr?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 ee,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)}},yn.Object.defineProperties(Tl.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}}}),Tl.className="DragSelectingTool";function aa(){Yr.call(this),this.name="Panning",this.Xt=new Ot,this.xy=new Ot,this.xg=!1;var a=this;this.Kw=function(){var y=a.diagram;y!==null&&y.removeEventListener(ln.document,"scroll",a.Kw,!1),a.stopTool()}}Ge(aa,Yr),aa.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())},aa.prototype.doActivate=function(){var a=this.diagram;this.xg?(a.lastInput.bubbles=!0,a.addEventListener(ln.document,"scroll",this.Kw,!1)):(a.currentCursor="move",a.isMouseCaptured=!0,this.Xt.assign(a.position)),this.isActive=!0},aa.prototype.doDeactivate=function(){var a=this.diagram;a.currentCursor="",this.isActive=a.isMouseCaptured=!1},aa.prototype.doCancel=function(){var a=this.diagram;a.position=this.Xt,a.isMouseCaptured=!1,this.stopTool()},aa.prototype.doMouseMove=function(){this.move()},aa.prototype.doMouseUp=function(){this.move(),this.stopTool()},aa.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)}},yn.Object.defineProperties(aa.prototype,{bubbles:{get:function(){return this.xg},set:function(a){this.xg=a}},originalPosition:{get:function(){return this.Xt}}}),aa.className="PanningTool",We("clickCreatingTool",function(){return this.findTool("ClickCreating")},function(a){this.gb("ClickCreating",a,this.mouseUpTools)}),We("clickSelectingTool",function(){return this.findTool("ClickSelecting")},function(a){this.gb("ClickSelecting",a,this.mouseUpTools)}),We("panningTool",function(){return this.findTool("Panning")},function(a){this.gb("Panning",a,this.mouseMoveTools)}),We("dragSelectingTool",function(){return this.findTool("DragSelecting")},function(a){this.gb("DragSelecting",a,this.mouseMoveTools)}),We("actionTool",function(){return this.findTool("Action")},function(a){this.gb("Action",a,this.mouseDownTools)});function Mu(){this.F=this.u=this.j=this.o=null}yn.Object.defineProperties(Mu.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}}}),Mu.className="HTMLInfo";function Nl(a,y,x){this.text=a,this.hx=y,this.visible=x}Nl.className="ContextMenuButtonInfo";function Ta(){Yr.call(this),this.name="ContextMenu",this.o=this.ht=this.j=null,this.yw=new Ot,this.jt=null,this.Et=!1;var a=this;this.tu=function(){a.stopTool()}}Ge(Ta,Yr);function ru(a){var y=new Mu;y.show=function(b,z,tt){tt.showDefaultContextMenu()},y.hide=function(b,z){z.hideDefaultContextMenu()},RA=y,a.tu=function(){a.stopTool()},y=$n("div");var x=$n("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=$n("style");ln.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",ys,!1),E.addEventListener(y,"selectstart",ys,!1),E.addEventListener(x,"contextmenu",ys,!1)),y.className="goCXforeground",x.className="goCXbackground",ln.document.body&&(ln.document.body.appendChild(y),ln.document.body.appendChild(x)),Oc=y,Hh=x,Qc=!0}function ys(a){return a.preventDefault(),!1}Ta.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)},Ta.prototype.doStart=function(){this.yw.set(this.diagram.firstInput.documentPoint)},Ta.prototype.doStop=function(){this.hideContextMenu(),this.currentObject=null},Ta.prototype.findObjectWithContextMenu=function(a){a===void 0&&(a=null);var y=this.diagram,x=y.lastInput,E=null;if(a instanceof Re||(a instanceof Se?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},Ta.prototype.doActivate=function(){},Ta.prototype.doMouseDown=function(){if(Yr.prototype.doMouseDown.call(this),this.isActive&&this.currentContextMenu instanceof ro){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doMouseDown(),a.doDeactivate())}this.diagram.toolManager.mouseDownTools.contains(this)&&ml(this)},Ta.prototype.doMouseUp=function(){if(this.isActive&&this.currentContextMenu instanceof ro){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.canStart()&&(a.doActivate(),a.doCancel(),a.doDeactivate())}ml(this)};function ml(a){var y=a.diagram;if(a.isActive){var x=a.currentContextMenu;if(x!==null){var E=null;x instanceof Mu||(E=y.ic(y.lastInput.documentPoint,null,null),E!==null&&E.rg(x)&&a.standardMouseClick(null,null)),a.maybeStopTool(E)}}else a.canStart()&&(gA(a,!0),a.isActive||a.stopTool())}Ta.prototype.maybeStopTool=function(){this.stopTool(),this.canStart()&&(this.diagram.currentTool=this,this.doMouseUp())};function gA(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=RA,x===null&&(x=a.findObjectWithContextMenu()),x!==null){var E=x.contextMenu;E!==null?(a.currentObject=x instanceof Se?x:null,a.showContextMenu(E,a.currentObject)):y!==null&&a.showContextMenu(y,a.currentObject)}else y!==null&&a.showContextMenu(y,null);a.currentContextMenu instanceof ro&&!a.currentContextMenu.visible&&a.stopTool()}}Ta.prototype.doMouseMove=function(){var a=this.diagram.toolManager.findTool("Action");a!==null&&a.doMouseMove(),this.isActive&&this.diagram.toolManager.doMouseMove()},Ta.prototype.showContextMenu=function(a,y){var x=this.diagram;if(a!==this.currentContextMenu&&this.hideContextMenu(),a instanceof ro){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 Mu&&a.show(y,x,this);this.currentContextMenu=a},Ta.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}},Ta.prototype.hideContextMenu=function(){var a=this.diagram,y=this.currentContextMenu;y!==null&&(y instanceof ro?(a.remove(y),this.ht!==null&&this.ht.Jf(y.category),y.data=null,y.adornedObject=null):y instanceof Mu&&(y.hide!==null?y.hide(a,this):y.mainElement!==null&&(y.mainElement.style.display="none")),this.currentContextMenu=null,this.standardMouseOver())};function OA(a){var y=new ee;return y.add(new Nl("Copy",function(x){x.commandHandler.copySelection()},function(x){return x.commandHandler.canCopySelection()})),y.add(new Nl("Cut",function(x){x.commandHandler.cutSelection()},function(x){return x.commandHandler.canCutSelection()})),y.add(new Nl("Delete",function(x){x.commandHandler.deleteSelection()},function(x){return x.commandHandler.canDeleteSelection()})),y.add(new Nl("Paste",function(x){x.commandHandler.pasteSelection(a.mouseDownPoint)},function(x){return x.commandHandler.canPasteSelection(a.mouseDownPoint)})),y.add(new Nl("Select All",function(x){x.commandHandler.selectAll()},function(x){return x.commandHandler.canSelectAll()})),y.add(new Nl("Undo",function(x){x.commandHandler.undo()},function(x){return x.commandHandler.canUndo()})),y.add(new Nl("Redo",function(x){x.commandHandler.redo()},function(x){return x.commandHandler.canRedo()})),y.add(new Nl("Scroll To Part",function(x){x.commandHandler.scrollToPart()},function(x){return x.commandHandler.canScrollToPart()})),y.add(new Nl("Zoom To Fit",function(x){x.commandHandler.zoomToFit()},function(x){return x.commandHandler.canZoomToFit()})),y.add(new Nl("Reset Zoom",function(x){x.commandHandler.resetZoom()},function(x){return x.commandHandler.canResetZoom()})),y.add(new Nl("Group Selection",function(x){x.commandHandler.groupSelection()},function(x){return x.commandHandler.canGroupSelection()})),y.add(new Nl("Ungroup Selection",function(x){x.commandHandler.ungroupSelection()},function(x){return x.commandHandler.canUngroupSelection()})),y.add(new Nl("Edit Text",function(x){x.commandHandler.editTextBlock()},function(x){return x.commandHandler.canEditTextBlock()})),y}Ta.prototype.showDefaultContextMenu=function(){var a=this.diagram;this.jt===null&&(this.jt=OA(this)),Oc.innerHTML="",Hh.addEventListener("pointerdown",this.tu,!1);var y=this,x=$n("ul");x.className="goCXul",Oc.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=$n("li"),z.className="goCXli";var tt=$n("a");tt.className="goCXa",tt.href="#",tt.ky=b.hx,tt.addEventListener("pointerdown",function(rt){return this.ky(a),y.stopTool(),rt.preventDefault(),!1},!1),tt.textContent=b.text,z.appendChild(tt),x.appendChild(z)}}Oc.style.display="block",Hh.style.display="block"},Ta.prototype.hideDefaultContextMenu=function(){if(this.currentContextMenu!==null&&this.currentContextMenu===RA){Oc.style.display="none",Hh.style.display="none";var a=this.diagram;a!==null&&a.removeEventListener(Hh,"pointerdown",this.tu,!1),this.currentContextMenu=null}},yn.Object.defineProperties(Ta.prototype,{currentContextMenu:{get:function(){return this.j},set:function(a){this.j=a,this.ht=a instanceof ro?a.adornedPart:null}},defaultTouchContextMenu:{get:function(){return Qc===!1&&RA===null&&Jo&&ru(this),RA},set:function(a){a===null&&(Qc=!0),RA=a}},currentObject:{get:function(){return this.o},set:function(a){this.o=a}},mouseDownPoint:{get:function(){return this.yw}}});var RA=null,Qc=!1,Hh=null,Oc=null;Ta.className="ContextMenuTool",We("contextMenuTool",function(){return this.findTool("ContextMenu")},function(a){this.gb("ContextMenu",a,this.mouseUpTools)});function To(){Yr.call(this),this.name="TextEditing",this.Zh=new Mo,this.ia=null,this.V=_h,this.vj=null,this.qa=Kh,this.u=1,this.F=!0,this.o=null,this.j=new Mu,this.kt=null,Rc(this,this.j)}Ge(To,Yr);function Rc(a,y){if(Jo){var x=$n("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(Hc)):b==="Tab"?(a.acceptText(wa),E.preventDefault()):b==="Escape"&&(a.doCancel(),a.diagram!==null&&a.diagram.doFocus())}},!1),x.addEventListener("focus",function(){if(a.currentTextEditor!==null&&a.state!==Kh){var E=a.kt;a.qa===zh&&(a.qa=_c),typeof E.select=="function"&&a.selectsTextOnActivate&&(E.select(),E.setSelectionRange(0,9999))}},!1),x.addEventListener("blur",function(){if(a.currentTextEditor!==null&&a.state!==Kh){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 Mo&&z instanceof To)if(z.state===Kc)x.style.border="3px solid red",x.focus();else{var tt=E.ga(cr),rt=b.position,ot=b.scale,lt=E.Df()*ot;lt<z.minimumEditorScale&&(lt=z.minimumEditorScale);var ut=E.naturalBounds.width*lt+6,ft=E.naturalBounds.height*lt+2,yt=(tt.x-rt.x)*ot;tt=(tt.y-rt.y)*ot,rt=E.verticalAlignment,ot=(E.lineHeight+E.spacingAbove+E.spacingBelow)*E.lineCount*lt,ft=rt.y*ft-rt.y*ot+rt.offsetY-(.5*ft-.5*ot)-ot/2,x.value=E.text,b.div.style.font=E.font,x.style.position="absolute",x.style.zIndex="100",x.style.font="inherit",x.style.fontSize=100*lt+"%",x.style.lineHeight="normal",x.style.width=ut+"px",x.style.left=(yt-ut/2|0)-1+"px",x.style.top=(tt+ft|0)-1+"px",x.style.textAlign=E.textAlign,x.style.margin="0",x.style.padding="1px",x.style.border="0",x.style.outline="none",x.style.whiteSpace="pre-wrap",x.style.overflow="hidden",x.rows=E.lineCount,x.wA=lt,x.className="goTXarea",b.div.appendChild(x),x.focus(),z.selectsTextOnActivate&&(x.select(),x.setSelectionRange(0,9999))}},y.hide=function(E){E.div.removeChild(x)}}}To.prototype.canStart=function(){if(!this.isEnabled)return!1;var a=this.diagram;if(a===null||a.isReadOnly||HA&&HA!==this&&(HA.acceptText(bu),HA&&HA!==this)||!a.lastInput.left||this.isBeyondDragSize())return!1;var y=a.ic(a.lastInput.documentPoint);return y!==null&&y instanceof Mo&&y.editable&&y.part.canEdit()?(y=y.part,!(y===null||this.starting===_h&&!y.isSelected||this.starting===Md&&2>a.lastInput.clickCount)):!1},To.prototype.doStart=function(){HA=this,this.textBlock!==null&&this.doActivate()},To.prototype.doActivate=function(){if(!this.isActive){var a=this.diagram;if(a!==null){var y=this.textBlock;if(y===null&&(y=a.ic(a.lastInput.documentPoint)),y!==null&&y instanceof Mo&&(this.textBlock=y,y.part!==null)){a.animationManager.Cc(),this.isActive=!0,this.qa=zh;var x=this.defaultTextEditor;y.textEditor!==null&&(x=y.textEditor),this.Zh=this.textBlock.copy();var E=new Oe(this.textBlock.ga(Qr),this.textBlock.ga(lo));a.tv(E),x.show(y,a,this),this.currentTextEditor=x}}}},To.prototype.doCancel=function(){this.stopTool()},To.prototype.doMouseUp=function(){this.canStart()&&this.doActivate()},To.prototype.doMouseDown=function(){this.isActive&&this.acceptText(bu)},To.prototype.acceptText=function(a){switch(a){case bu:this.qa===Gh?this.currentTextEditor instanceof HTMLElement&&this.currentTextEditor.focus():(this.qa===zh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this));break;case Ld:case Hc:case wa:(Hc!==a||this.textBlock.isMultiline!==!0)&&(this.qa===zh||this.qa===Kc||this.qa===_c)&&(this.qa=ff,df(this))}};function df(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=Gh,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=Kc,a.doError(b,z))}}To.prototype.doError=function(a,y){var x=this.textBlock;x.errorFunction!==null&&x.errorFunction(this,a,y),(a=this.currentTextEditor)&&a.show(x,this.diagram,this)},To.prototype.doSuccess=function(a,y){var x=this.textBlock;x.textEdited!==null&&x.textEdited(x,a,y)},To.prototype.doDeactivate=function(){var a=this.diagram;a!==null&&(this.qa=Kh,this.currentTextEditor!==null&&this.currentTextEditor.hide(a,this),this.textBlock=null,this.isActive=!1)},To.prototype.doStop=function(){HA=null},To.prototype.isValidText=function(a,y,x){var E=this.textValidation;return E!==null&&!E(a,y,x)?!1:(E=a.textValidation,!!(E===null||E(a,y,x)))},To.prototype.Lx=function(a){var y=this.Zh;return y.text=a,y.measure(this.textBlock.Ih,1/0),y},yn.Object.defineProperties(To.prototype,{textBlock:{get:function(){return this.ia},set:function(a){this.ia=a}},currentTextEditor:{get:function(){return this.o},set:function(a){this.o=a}},defaultTextEditor:{get:function(){return this.j},set:function(a){this.j=a}},starting:{get:function(){return this.V},set:function(a){this.V=a}},textValidation:{get:function(){return this.vj},set:function(a){this.vj=a}},minimumEditorScale:{get:function(){return this.u},set:function(a){this.u=a}},selectsTextOnActivate:{get:function(){return this.F},set:function(a){this.F=a}},state:{get:function(){return this.qa},set:function(a){this.qa!==a&&(this.qa=a)}}}),To.prototype.measureTemporaryTextBlock=To.prototype.Lx;var Ld=new Te(To,"LostFocus",0),bu=new Te(To,"MouseDown",1),wa=new Te(To,"Tab",2),Hc=new Te(To,"Enter",3),ep=new Te(To,"SingleClick",0),_h=new Te(To,"SingleClickSelected",1),Md=new Te(To,"DoubleClick",2),Kh=new Te(To,"StateNone",0),zh=new Te(To,"StateActive",1),_c=new Te(To,"StateEditing",2),ff=new Te(To,"StateValidating",3),Kc=new Te(To,"StateInvalid",4),Gh=new Te(To,"StateValidated",5),HA=null;To.className="TextEditingTool",To.LostFocus=Ld,To.MouseDown=bu,To.Tab=wa,To.Enter=Hc,To.SingleClick=ep,To.SingleClickSelected=_h,To.DoubleClick=Md,To.StateNone=Kh,To.StateActive=zh,To.StateEditing=_c,To.StateValidating=ff,To.StateInvalid=Kc,To.StateValidated=Gh,We("textEditingTool",function(){return this.findTool("TextEditing")},function(a){this.gb("TextEditing",a,this.mouseUpTools)});function ol(a){vh||(gf(),vh=!0),this.H=Iu,this.Ok=this.zb=this.vq=this.bc=!1,this.Qw=!0,this.Pk=Du,this.Dm=!1,this.Gh=this.Jd=!0,this.Dg=600,this.cw=this.Ow=!1,this.Zd=new xe,this.ce=new la,this.ce.Yd=this,this.Ei=new xe,this.pu=new xe,this.Sr=new xe,this.pr=new xe,a&&Object.assign(this,a)}ol.prototype.Xe=function(a){this.H=a},ol.prototype.canStart=function(){return!0};function ku(a,y){a.Jd&&a.canStart(y)&&(a.Zd.add(y),a.defaultAnimation.isAnimating&&a.Cc(),ua(a.H),a.zb=!0)}function qr(a){if(a.Jd&&a.zb){var y=a.ce,x=a.H,E=a.Zd.contains("Model");E&&(a.Ok=!0,a.Pk===Du?(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===kd&&y.vc.clear(),a.Qw=!!(a.Pk===zc&&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(),yh(y,x),a.Ok=!1,x.N()):(a.Zd.clear(),x.kg=!1,E=y.vc.get(x),x.autoScale!==ga&&E!==null&&(delete E.start.scale,delete E.end.scale),ln.requestAnimationFrame(function(){a.zb===!1||y.bc||(x.Gf("temporaryPixelRatio")&&Na(x),Ud(x),a.zb=!1,y.start(),y.bc&&(_A(a),x.Ya(),pf(y,0),Ra(x,!0),KA(a),x.R("AnimationStarting",a)))}))}}function pA(a){return a.Zd.contains("Trigger")&&a.Zd.count===1}function bd(a,y,x,E){a.isTicking||pA(a)||y instanceof Yn&&(y.fromNode!==null||y.toNode!==null)||a.ce.add(y,"position",x,E,!1)}kt=ol.prototype,kt.fv=function(a){return this.ce.fv(a)},kt.Xu=function(a){return this.ce.Xu(a)};function jh(a,y){function x(){if(0<b.Sr.count&&(E.addAll(b.Sr),b.Sr.clear(),b.bc=!0),b.bc!==!1&&E.count!==0){b.pu.addAll(E);for(var z=b.pu.iterator;z.next();){var tt=z.value;if(tt.bc!==!1){t:if(0<tt.yl.count)var rt=!0;else{for(rt=tt.vc.iterator;rt.next();){var ot=rt.key;if(ot instanceof Se&&ot.diagram!==null||ot instanceof Re){rt=!0;break t}}rt=!1}rt?Gc(tt,!1):tt.Xk=!0}}b.pu.clear(),b.bc!==!1&&(_A(b),Ra(b.H),KA(b)),ln.requestAnimationFrame(x)}}var E=a.Ei,b=a;a.bc?a.Sr.add(y):(a.bc=!0,E.add(y),ln.requestAnimationFrame(function(){x()}))}function Tu(a){for(a=a.Ei.iterator;a.next();)a.value.Xk=!1}function _A(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 KA(a){var y=a.H;y.skipsUndoManager=a.Ow,y.skipsModelSourceBindings=a.cw,a.vq=!1}kt.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(),yh(y,null),a===!0)for(a=this.Ei.Fa(),y=0;y<a.length;y++)a[y].Ml(!0)}else y.vc.clear(),yh(y,this.H)},kt.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))},kt.Cj=function(a,y){this.zb&&(this.Zd.contains("Expand Tree")||this.Zd.contains("Expand SubGraph"))&&(this.ce.Cj(a,y),Va(this,a))},kt.Aj=function(a,y){this.zb&&(this.Zd.contains("Collapse Tree")||this.Zd.contains("Collapse SubGraph"))&&(this.ce.Aj(a,y),zA(this.ce,y,"position",y.position,y.position),Va(this,a))};function Vh(a,y,x){!a.zb||y.D(x)||pA(a)||(a.H.pi||(y=x.copy()),zA(a.ce,a.H,"position",y,x))}function ph(a,y,x){y.fd&&(y.Tg=x,a.pr.add(y))}function Va(a,y){for(y=y.findLinksConnected();y.next();){var x=y.value;x.fd&&(x.Tg=x.points.copy(),a.pr.add(x))}}function mh(a,y,x,E,b){a===null&&(a=[0,0,0,0]),y===null&&(y=[0,0,0,0]);var z=a[0],tt=a[1],rt=a[2];a=a[3];var ot=y[0],lt=y[1],ut=y[2];return y=y[3],rt===0||rt===100?(z=ot,tt=lt):(ut===0||ut===100)&&(ot=z,lt=tt),180<Math.abs(ot-z)&&(ot>z?z+=360:ot+=360),z=b(x,z,ot-z,E)%360,tt=b(x,tt,lt-tt,E),rt=b(x,rt,ut-rt,E),x=b(x,a,y-a,E),"hsla("+z+", "+tt+"%, "+rt+"%, "+x+")"}function gf(){function a(x,E,b,z,tt,rt){x.position=new Ot(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}var y=new ke;y.add("position:diagram",a),y.add("position",a),y.add("position:part",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Ot(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("location",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!0):x.location=new Ot(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:placeholder",function(x,E,b,z,tt,rt){tt<rt?x.mm(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt),!1):x.position=new Ot(z(tt,E.x,b.x-E.x,rt),z(tt,E.y,b.y-E.y,rt))}),y.add("position:nodeCollapse",function(x,E,b,z,tt,rt){var ot=x.actualBounds,lt=b.actualBounds;b=lt.x+lt.width/2-ot.width/2,ot=lt.y+lt.height/2-ot.height/2,tt<rt?x.mm(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt),!1):x.position=new Ot(z(tt,E.x,b-E.x,rt),z(tt,E.y,ot-E.y,rt))}),y.add("desiredSize",function(x,E,b,z,tt,rt){x.desiredSize=new Oe(z(tt,E.width,b.width-E.width,rt),z(tt,E.height,b.height-E.height,rt))}),y.add("width",function(x,E,b,z,tt,rt){x.width=z(tt,E,b-E,rt)}),y.add("height",function(x,E,b,z,tt,rt){x.height=z(tt,E,b-E,rt)}),y.add("fill",function(x,E,b,z,tt,rt){x.fill=mh(E,b,tt,rt,z)}),y.add("stroke",function(x,E,b,z,tt,rt){x.stroke=mh(E,b,tt,rt,z)}),y.add("strokeWidth",function(x,E,b,z,tt,rt){x.strokeWidth=z(tt,E,b-E,rt)}),y.add("strokeDashOffset",function(x,E,b,z,tt,rt){x.strokeDashOffset=z(tt,E,b-E,rt)}),y.add("background",function(x,E,b,z,tt,rt){x.background=mh(E,b,tt,rt,z)}),y.add("areaBackground",function(x,E,b,z,tt,rt){x.areaBackground=mh(E,b,tt,rt,z)}),y.add("opacity",function(x,E,b,z,tt,rt){x.opacity=z(tt,E,b-E,rt)}),y.add("scale",function(x,E,b,z,tt,rt){x.scale=z(tt,E,b-E,rt)}),y.add("angle",function(x,E,b,z,tt,rt){x.angle=z(tt,E,b-E,rt)}),Nu=y}yn.Object.defineProperties(ol.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&&qn(a,">= 1",ol,"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}}}),ol.prototype.stopAnimation=ol.prototype.Cc;var Nu=null,vh=!1,Du=new Te(ol,"Default",1),zc=new Te(ol,"AnimateLocations",2),kd=new Te(ol,"None",3);ol.className="AnimationManager",ol.defineAnimationEffect=function(a,y){vh||(gf(),vh=!0),Nu.add(a,y)},ol.Default=Du,ol.AnimateLocations=zc,ol.None=kd;function la(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=Zh,this.Wk=this.ho=!1,this.cu=1,this.au=0,this.Gd=this.Dg=NaN,this.gw=0,this.dn=null,this.o=vn,this.vc=new ke,this.Tt=new ke,this.yl=new xe,this.Ut=new xe,this.dw=yA,a&&Object.assign(this,a)}la.prototype.suspend=function(){this.Xk=!0},la.prototype.advanceTo=function(a,y){y&&(this.Xk=!1),this.ho&&a>=this.Gd&&(this.Wk=!0,a-=this.Gd),this.gw=a,Gc(this,!0),_A(this.Yd),Ra(this.H),KA(this.Yd),this.H.redraw()};function yh(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}kt=la.prototype,kt.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 Re?a=x:x instanceof Se&&(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===Du&&this===y.defaultAnimation&&(this.Lp=ug,this.Gd=isNaN(this.Dg)?y.duration===600?900:y.duration:this.Dg),this.dw=a.scrollMode,this.isViewportUnconstrained&&(a.sj=lc),_A(y),this.yl.each(function(E){E.data=null,a.add(E)}),KA(y),this.bc=!0,this.Qd=+new Date,this.cn=this.Qd+this.Gd,jh(y,this),this)},kt.Iy=function(a,y){return a.Zc()?(this.yl.add(a),this.H=y,this):this},kt.add=function(a,y,x,E,b){if(y==="position"&&x.Xa(E))return this;if(this.H===null&&(a instanceof Re?this.H=a:a instanceof Se&&a.diagram!==null&&(this.H=a.diagram)),a instanceof Zi){if(!a.isAnimated)return this;y==="position"&&(y="position:part")}return zA(this,a,y,x,E,b),this};function zA(a,y,x,E,b,z){var tt=a.vc;if(y instanceof Re&&x==="position"&&(x="position:diagram"),(x==="fill"||x==="stroke"||x==="background"||x==="areaBackground")&&(BA(E),ip(),E=[Nn.j,Nn.u,Nn.o,Nn.F],BA(b),ip(),b=[Nn.j,Nn.u,Nn.o,Nn.F]),tt.contains(y)){var rt=tt.I(y),ot=rt.start,lt=rt.end;ot[x]===void 0&&(ot[x]=wh(E)),lt[x]=wh(b)}else ot={},lt={},ot[x]=wh(E),lt[x]=wh(b),rt=ot.position,y instanceof Se&&rt instanceof Ot&&!rt.w()&&y.diagram.animationManager.Zd.contains("Expand SubGraph")&&rt.assign(lt.position),rt=new xh(ot,lt,z),tt.add(y,rt);tt=ot[x],tt instanceof Ot&&!tt.w()&&tt.assign(a.o),z&&x.indexOf("position:")===0&&y instanceof Zi?rt.Ku.location=wh(y.location):z&&(rt.Ku[x]=wh(E))}function wh(a){return a instanceof Ot||a instanceof on?a.copy():a}kt.fv=function(a){return this.bc?(a=this.vc.I(a),a!==null&&a.nv):!1},kt.Xu=function(a){return this.bc?(a=this.vc.I(a),a!==null&&(a.start.position||a.start.location)):!1};function Gc(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),_A(x),pf(a,b),Ra(a.H,!0),KA(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 pf(a,y){for(var x=a.Gd,E=a.vc.iterator,b=a.Wk;E.next();){var z=E.key;if(!(z instanceof Se&&z.diagram===null)){var tt=E.value,rt=b?tt.end:tt.start;tt=b?tt.start:tt.end;var ot=Nu,lt;for(lt in tt)lt==="position"&&(tt["position:placeholder"]||tt["position:nodeCollapse"])||ot.get(lt)===null||ot.get(lt)(z,rt[lt],tt[lt],a.Lp,y,x,a)}}}kt.stop=function(){return this.bc?(this.Ml(!0),this):this},kt.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,_A(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=Nu;E.next();){var tt=E.key,rt=E.value,ot=b?rt.end:rt.start,lt=b?rt.start:rt.end,ut=rt.Ku,ft;for(ft in lt)if(z.get(ft)!==null){var yt=ft;!rt.Hu||yt!=="position:nodeCollapse"&&yt!=="position:placeholder"||(yt="position"),z.get(yt)(tt,ot[ft],ut[ft]!==void 0?ut[ft]:rt.Hu?ot[ft]:lt[ft],this.Lp,this.Gd,this.Gd,this)}rt.Hu&&ut.location!==void 0&&tt instanceof Zi&&(tt.location=ut.location),rt.nv&&tt instanceof Zi&&tt.Zb(!1)}if(y.As.clear(),Yh(y,!1),y.Ya(),y.N(),Ra(y,!0),x.defaultAnimation===this){for(ft=x.pr.iterator;ft.next();)b=ft.value,b.Tg!==null&&(b.points=b.Tg,b.Tg=null);x.pr.clear()}Ra(y,!0),this.isViewportUnconstrained&&(y.scrollMode=this.dw),KA(x),this.au++,!a&&this.cu>this.au?(this.Wk=!1,this.start()):(this.dn&&this.dn(this),yh(this,null),x.Ml(this),y.$b())}},kt.Cj=function(a,y){var x=y.actualBounds,E=null;if(y instanceof mr&&(E=y.placeholder),E!==null?(x=E.ga(Qr),E=E.padding,x.x+=E.left,x.y+=E.top,this.add(a,"position",x,a.position,!1)):this.add(a,"position",new Ot(x.x+x.width/2,x.y+x.height/2),a.position,!1),this.add(a,"scale",.01,a.scale,!1),a instanceof mr)for(a=a.memberParts;a.next();)E=a.value,E instanceof gi&&this.Cj(E,y)},kt.Aj=function(a,y){if(a.isVisible()){var x=null;if(y instanceof mr&&(x=y.placeholder),x!==null){var E=x.ga(Qr);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 mr)for(a=a.memberParts;a.next();)E=a.value,E instanceof gi&&this.Aj(E,y)}},kt.Ez=function(a){var y=this.Tt.get(a);return y===null&&(y={},this.Tt.add(a,y)),y},yn.Object.defineProperties(la.prototype,{duration:{get:function(){return this.Dg},set:function(a){1>a&&qn(a,">= 1",la,"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:se("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}}}),la.prototype.getTemporaryState=la.prototype.Ez,la.prototype.stop=la.prototype.stop,la.prototype.add=la.prototype.add,la.prototype.addTemporaryPart=la.prototype.Iy;function Zh(a,y,x,E){return a/=E/2,1>a?x/2*a*a+y:-x/2*(--a*(a-2)-1)+y}function ug(a,y,x,E){return a===E?y+x:x*(-Math.pow(2,-10*a/E)+1)+y}la.className="Animation",la.EaseLinear=function(a,y,x,E){return x*a/E+y},la.EaseInOutQuad=Zh,la.EaseInQuad=function(a,y,x,E){return x*(a/=E)*a+y},la.EaseOutQuad=function(a,y,x,E){return-x*(a/=E)*(a-2)+y},la.EaseInExpo=function(a,y,x,E){return a===0?y:x*Math.pow(2,10*(a/E-1))+y},la.EaseOutExpo=ug;function xh(a,y,x){this.start=a,this.end=y,this.Ku={},this.Hu=x,this.nv=!1}xh.className="AnimationState";function ou(a,y,x){this.xd=null,this.rf=a,this.so=x||vf,this.uk=null,y!==void 0&&(this.uk=y,x===void 0&&(this.so=Sh))}ou.prototype.copy=function(){var a=new ou(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 mf(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))}yn.Object.defineProperties(ou.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 vf=new Te(ou,"Default",1),Sh=new Te(ou,"Immediate",2),Wh=new Te(ou,"Bundled",3);ou.className="AnimationTrigger",ou.Default=vf,ou.Immediate=Sh,ou.Bundled=Wh;function Vs(a){An(this),this.H=null,this.Pa=new ee,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)}kt=Vs.prototype,kt.clear=function(){for(var a=this.Pa,y=0;y<a.length;y++){var x=a.s[y];x.Ig=null,Br(x)}a.clear(),this.Zq.length=0},kt.Xe=function(a){this.H=a},kt.toString=function(a){a===void 0&&(a=0);var y='Layer "'+this.name+'"';if(0>=a)return y;for(var x=0,E=0,b=0,z=0,tt=0,rt=this.Pa.iterator;rt.next();){var ot=rt.value;ot instanceof mr?b++:ot instanceof gi?E++:ot instanceof Yn?z++:ot instanceof ro?tt++:x++}if(rt="",0<x&&(rt+=x+" Parts "),0<E&&(rt+=E+" Nodes "),0<b&&(rt+=b+" Groups "),0<z&&(rt+=z+" Links "),0<tt&&(rt+=tt+" Adornments "),1<a)for(a=this.Pa.iterator;a.next();)x=a.value,rt+=`
`+x.toString(),E=x.data,E!==null&&ti(E)&&(rt+=" #"+ti(E)),x instanceof gi?rt+=" "+Fn(E):x instanceof Yn&&(rt+=" "+Fn(x.fromNode)+" "+Fn(x.toNode));return y+" "+this.Pa.count+": "+rt},kt.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=Ot.alloc(),z=this.Pa.s,tt=z.length;tt--;){var rt=z[tt];if((E!==!0||od(rt)!==!1)&&rt.isVisible()&&(b.assign(a),gn(b,rt.oe),rt=rt.ic(b,y,x),rt!==null&&(y!==null&&(rt=y(rt)),rt!==null&&(x===null||x(rt)))))return Ot.free(b),rt}return Ot.free(b),null},kt.ji=function(a,y,x,E){if(y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof xe||(E=new xe),this.Uh===!1)return E;var b=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(b=!0);for(var z=Ot.alloc(),tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((b!==!0||od(ot)!==!1)&&ot.isVisible()){z.assign(a),gn(z,ot.oe);var lt=ot;ot.ji(z,y,x,E)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||E.add(lt))}}return Ot.free(z),E},kt.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 ee||b instanceof xe||(b=new xe),this.Uh===!1)return b;var z=!1;this.diagram!==null&&this.diagram.viewportBounds.Re(a)&&(z=!0);for(var tt=this.Pa.s,rt=tt.length;rt--;){var ot=tt[rt];if((z!==!0||od(ot)!==!1)&&ot.isVisible()){var lt=ot;ot.Cf(a,y,x,E,b)&&(y!==null&&(lt=y(lt)),lt===null||x!==null&&!x(lt)||b.add(lt))}}return b},kt.Nu=function(a,y,x,E,b,z,tt){if(this.Uh===!1)return b;for(var rt=this.Pa.s,ot=rt.length;ot--;){var lt=rt[ot];if((tt!==!0||od(lt)!==!1)&&z(lt)&&lt.isVisible()){var ut=lt;lt.Cf(a,y,x,E,b)&&(y!==null&&(ut=y(ut)),ut===null||x!==null&&!x(ut)||b.add(ut))}}return b},kt.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 ee||b instanceof xe)&&(z=b),b=!0),z instanceof ee||z instanceof xe||(z=new xe),this.Uh===!1)return z;var tt=!1;this.diagram!==null&&this.diagram.viewportBounds.ca(a)&&(tt=!0);for(var rt=Ot.alloc(),ot=Ot.alloc(),lt=this.Pa.s,ut=lt.length;ut--;){var ft=lt[ut];if((tt!==!0||od(ft)!==!1)&&ft.isVisible()){rt.assign(a),gn(rt,ft.oe),ot.h(a.x+y,a.y),gn(ot,ft.oe);var yt=ft;ft.og(rt,ot,x,E,b,z)&&(x!==null&&(yt=x(yt)),yt===null||E!==null&&!E(yt)||z.add(yt))}}return Ot.free(rt),Ot.free(ot),z},kt.Fd=function(a,y){if(this.visible){var x=this.Pa.s,E=x.length;if(E!==0){a=li();for(var b=li(),z=0;z<E;z++){var tt=x[z];if(tt.vw=z,tt instanceof Yn){if(tt.fd===!1)continue}else if(tt instanceof ro&&tt.adornedPart!==null)continue;var rt=tt.actualBounds;tt.isVisible()&&io(rt,y)?(tt.Fd(!0),a.push(tt)):(tt.Fd(!1),tt.adornments!==null&&0<tt.adornments.count&&b.push(tt))}for(y=0;y<a.length;y++)for(x=a[y],$m(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++)$m(b[y]);ci(a),ci(b)}}};function mA(a,y){var x=1;return a.pb!==1&&(x=y.globalAlpha,y.globalAlpha=x*a.pb),x}kt.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=mA(this,a);var z=this.Zq;z.length=0;for(var tt=y.scale,rt=Oe.alloc(),ot=0;ot<E;ot++)this.Oj(a,x[ot],y,z,tt,rt,!0);if(Oe.free(rt),a.isTemporary)for(y=0;y<E;y++)x[y].Gj();a.globalAlpha=b}}};function jc(a,y,x,E,b){if(a.visible&&a.pb!==0&&(b||!a.isTemporary)){b=a.Pa.s;var z=b.length;if(z!==0){var tt=mA(a,y),rt=a.Zq;rt.length=0;for(var ot=x.scale,lt=Oe.alloc(),ut=0;ut<z;ut++){var ft=b[ut];E.contains(ft)&&a.Oj(y,ft,x,rt,ot,lt,!1)}Oe.free(lt),y.globalAlpha=tt}}}kt.Oj=function(a,y,x,E,b,z,tt){if(tt&&!od(y))a.Hs(y);else{if(E!==null&&y instanceof Yn&&(y.isOrthogonal&&E.push(y),y.fd===!1)){a.Hs(y);return}for(tt=!1,E=y.containingGroup;E!==null;)tt?E.tb!==null&&z.Ex(E.tb):E.tb!==null&&(tt=!0,z.assign(E.tb)),E=E.containingGroup;var rt=y.actualBounds;if(E=!1,tt&&y.isVisible()){if(!z.Yc(rt)){a.Hs(y);return}E=!z.Re(rt)}E&&(a.save(),a instanceof Wa?a.bk=z.copy():(a.beginPath(),a.rect(z.x,z.y,z.width,z.height),a.clip())),rt.width*b>x.Oq||rt.height*b>x.Oq?y.gc(a,x):(b=y.actualBounds,z=y.naturalBounds,b.width===0||b.height===0||isNaN(b.x)||isNaN(b.y)||!y.isVisible()||(x=y.transform,y.areaBackground!==null&&(Xo(y,a,y.areaBackground,!0,!0,z,b),a.fillRect(b.x,b.y,b.width,b.height)),y.areaBackground===null&&y.background===null&&(Xo(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),Xo(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))}},kt.g=function(a,y,x,E,b){var z=this.diagram;z!==null&&z.cb(Qo,a,this,y,x,E,b)},kt.oi=function(a,y,x){var E=this.Pa;if(y.Ig=this,this===null&&Br(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)),Td(this,a,y),a},kt.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,Br(y),a};function Td(a,y,x){if(y=Nd(a,y,x),x instanceof mr&&x!==null&&isNaN(x.zOrder)){if(x.memberParts.count!==0){for(var E=-1,b=a.Pa.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];if(rt===x&&(y=tt,0<=E)||0>E&&rt.containingGroup===x&&(E=tt,0<=y))break}!(0>E)&&E<y&&(b=a.Pa,b.mb(y),b.Gb(E,x))}y=x.containingGroup,y!==null&&Td(a,-1,y)}x.svg!==null&&x.svg.remove()}function Nd(a,y,x){var E=x.zOrder;if(isNaN(E))return y;a=a.Pa;var b=a.count;if(1>=b)return y;if(0>y&&(y=a.indexOf(x)),0>y)return-1;for(var z=y-1,tt=NaN;0<=z&&(tt=a.M(z).zOrder,!!isNaN(tt));)z--;for(var rt=y+1,ot=NaN;rt<b&&(ot=a.M(rt).zOrder,!!isNaN(ot));)rt++;if(!isNaN(tt)&&tt>E)for(;;){if(z===-1||tt<=E){if(z++,z===y)break;return a.mb(y),a.Gb(z,x),z}for(tt=NaN;0<=--z&&(tt=a.M(z).zOrder,isNaN(tt)););}else if(!isNaN(ot)&&ot<E)for(;;){if(rt===b||ot>=E){if(rt--,rt===y)break;return a.mb(y),a.Gb(rt,x),rt}for(ot=NaN;++rt<b&&(ot=a.M(rt).zOrder,isNaN(ot)););}return y}yn.Object.defineProperties(Vs.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===""&&se("Cannot rename default Layer to: "+a),x=x.layers;x.next();)x.value.name===a&&se("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)&&qn(a,"0 <= value <= 1",Vs,"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))}}}),Vs.prototype.findObjectsNear=Vs.prototype.og,Vs.prototype.findObjectsIn=Vs.prototype.Cf,Vs.prototype.findObjectsAt=Vs.prototype.ji,Vs.prototype.findObjectAt=Vs.prototype.ic,Vs.className="Layer";function Re(a,y){if(xA||(Hs(),xA=!0),An(this),Iu=this,this.vb=!0,this.Ka=null,this.ya=this.Aa=0,this.ta=null,Jo){var x=this,E=function(){x.removeEventListener(ln.document,"DOMContentLoaded",E,!1),x.setRTL()};ln.document.body!==null?this.setRTL():x.addEventListener(ln.document,"DOMContentLoaded",E,!1)}this.ol=null,zd.add("Model",mo);var b=this;return this.Hb=function(z){var tt=b.partManager;if(z.model===tt.diagram.model&&tt.diagram.aa){tt.diagram.aa=!1;try{var rt=z.change;z.modelChange===""&&rt===Qo&&tt.updateDataBindings(z.object,z.propertyName)}finally{tt.diagram.aa=!0}}},this.Oc=function(z){b.partManager.doModelChanged(z)},this.hu=this.ku=null,Ag(this),this.model=Ev(),this.Wg=!0,Qd(this),this.layout=new Wo,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 uc,a!==void 0&&(typeof a=="string"||ln.Element&&a instanceof Element?Vc(this,a):y=a),this.vb=!1,y&&this.nm(y),this}var GA,Iu;function Ag(a){a.Yd=new ol,a.Yd.Xe(a),a.Db=17,a.Gw=!1,a.tn=!1,a.bu="default",a.Wa=new ee,a.pj=new ke,a.nl="default",a.Tx(),a.Sx(),a.pb=1,a.pa=new Ot(NaN,NaN).freeze(),a.du=new Ot(NaN,NaN),a.Ca=1,a.Pp=1,a.zt=new Ot(NaN,NaN).freeze(),a.At=NaN,a.Ot=1e-4,a.Mt=100,a.Ab=new ir,a.zu=new Ot(NaN,NaN).freeze(),a.ut=new Oe(NaN,NaN,NaN,NaN).freeze(),a.rj=new wr(0,0,0,0).freeze(),a.sj=yA,a.nu=!1,a.Zt=null,a.fu=null,a.yh=ga,a.zk=Io,a.Fg=ga,a.pq=Io,a.yt=Qr,a.Bt=Qr,a.Fc=!0,a.pn=!1,a.De=new xe,a.Eh=new ke,a.Xm=!0,a.vp=250,a.vk=-1,a.xp=new wr(16,16,16,16).freeze(),a.kg=!1,a.Jk=!1,a.fn=!0,a.bq=new Ws,a.bq.diagram=a,a.Qg=new Ws,a.Qg.diagram=a,a.cj=new Ws,a.cj.diagram=a,a.zg=null,a.pf=null,a.qu=!1,pg(a),a.ai=new xe,a.Ht=!0,a.uu=YA,a.pw=!1,a.wu=id,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 ke,a.Xn=new ee,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 wr(5).freeze(),a.Hw=new xe().freeze(),a.Nt=999999999,a.nw=new xe().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 xe,a.ow=new xe,a.Xh=null,a.aw=new on(8,8),a.bw=999,a.Bw=1,a.Jw=0,a.fc={scale:1,position:new Ot,bounds:new Oe,Py:new on,bA:new on,Oz:!1},a.fc.canvasSize=a.fc.Py,a.fc.newCanvasSize=a.fc.bA,a.fc.isScroll=!1,a.Rw=new Oe(NaN,NaN,NaN,NaN).freeze(),a.wo=new on(NaN,NaN).freeze(),a.Sp=new Oe(NaN,NaN,NaN,NaN).freeze(),a.It=!1,a.Lg=new ke;var y=new gi,x=new Mo;x.bind(new Ms("text","",Fn)),y.add(x),a.ny=y,a.Lg.add("",y),y=new gi,x=new Mo,x.stroke="brown",x.bind(new Ms("text","",Fn)),y.add(x),a.Lg.add("Comment",y),y=new gi,y.selectable=!1,y.avoidable=!1,x=new Cr,x.figure="Ellipse",x.fill="black",x.stroke=null,x.desiredSize=new on(3,3).ja(),y.add(x),a.Lg.add("LinkLabel",y),a.Yi=new ke,y=new mr,y.selectionObjectName="GROUPPANEL",y.type=En.Vertical,x=new Mo,x.font="bold 12pt sans-serif",x.bind(new Ms("text","",Fn)),y.add(x),x=new En(En.Auto),x.name="GROUPPANEL";var E=new Cr;E.figure="Rectangle",E.fill="rgba(128,128,128,0.2)",E.stroke="black",x.add(E),E=new Ya,E.padding=new wr(5,5,5,5).ja(),x.add(E),y.add(x),a.ly=y,a.Yi.add("",y),a.Kh=new ke,y=new Yn,x=new Cr,x.isPanelMain=!0,y.add(x),x=new Cr,x.toArrow="Standard",x.fill="black",x.stroke=null,x.strokeWidth=0,y.add(x),a.my=y,a.Kh.add("",y),y=new Yn,x=new Cr,x.isPanelMain=!0,x.stroke="brown",y.add(x),a.Kh.add("Comment",y),y=new ro,y.type=En.Auto,x=new Cr,x.fill=null,x.stroke="dodgerblue",x.strokeWidth=3,y.add(x),x=new Ya,x.margin=new wr(1.5,1.5,1.5,1.5).ja(),y.add(x),a.St=y,a.wt=y,y=new ro,y.type=En.Link,x=new Cr,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 mo,a.toolManager=new Eo,a.toolManager.initializeStandardTools(),a.defaultTool=a.toolManager,a.currentTool=a.defaultTool,a.nt=null,a.Wm=new st,a.Vt=null,a.Wt=null,a.Mr=!1,a.commandHandler=Id(),a.eq=null,a.fq=Wn,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 Ot,a.zy=500,a.wp=new Ot,a.wq=!1}Re.prototype.clear=function(){this.animationManager.Cc(),this.model.clear(),Fh=null,ZA="",Dd(this,!1),this.Xn.clear(),Bg(),this.Og.clear(),this.Xh=null,this.Ya(),this.Va(),this.N()};function Dd(a,y){a.animationManager.Cc(!0),a.Hw=new xe().freeze(),a.nw=new xe().freeze();var x=a.skipsUndoManager,E=a.cc!==null&&a.cc!==void 0;E&&(a.skipsUndoManager=!0);var b=null;a.fe!==null&&(b=a.fe.part,b!==null&&a.remove(b));var z=[],tt=a.Wa.length;if(y){for(y=0;y<tt;y++)for(var rt=a.Wa.s[y].parts;rt.next();){var ot=rt.value;ot!==b&&ot.data===null&&z.push(ot)}for(y=0;y<z.length;y++)a.remove(z[y])}for(y=0;y<tt;y++)a.Wa.s[y].clear();return a.partManager.clear(),a.De.clear(),a.Eh.clear(),a.ai.clear(),a.Ck=null,a.Xn.clear(),Bg(),a.Og.clear(),vr=[],b!==null&&(a.add(b),a.partManager.parts.remove(b)),E&&(a.skipsUndoManager=x),z}function Id(){return null}Re.prototype.reset=function(){this.clear(),this.vb=!0,Ag(this),su(this),this.Wg=!0,Qd(this),this.layout=new Wo,this.Wg=!1,this.model=Ev(),this.model.undoManager=new Vo,this.vb=this.rn=!1,this.N()},Re.prototype.setRTL=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=$n("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},Re.prototype.setScrollWidth=function(a){a=a===void 0?this.div:a,a===null&&(a=ln.document.body);var y=0;if(Jo){var x=Tf;y=GA,x===null&&(x=Tf=$n("p"),x.style.width="100%",x.style.height="200px",x.style.boxSizing="content-box",y=GA=$n("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||hr||(y=11)}this.Db=y,this.Gw=!0},Re.prototype.qb=function(a){a.classType===Re&&(this.autoScale=a)},Re.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 Vc(a,y){if(Jo){if(y!=null||se("Diagram setup requires an argument DIV."),a.Ka!==null&&se("Diagram has already completed setup."),typeof y=="string"?a.Ka=ln.document.getElementById(y):y instanceof HTMLDivElement?a.Ka=y:se("No DIV or DIV id supplied: "+y),a.Ka===null&&se("Invalid DIV id; could not get element with id: "+y),a.Ka.H!==void 0&&se("Invalid div id; div already has a Diagram associated with it."),!a.ol&&ln.ResizeObserver){var x=Pe(function(){a.$b()},250);a.ol=new ln.ResizeObserver(function(){x()}),a.ol.observe(a.Ka)}ln.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=ln.go;var b=new Jl(a);if(b.style!==void 0&&(b.style.position="absolute",b.style.top="0px",b.style.left="0px",ln.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),Cf(a,a.Aa,a.ya),a.Ka.insertBefore(b.Oa,a.Ka.firstChild),b=new Jl(null),b.width=1,b.height=1,a.jw=b,a.oy=b.context,Jo){b=$n("div");var z=$n("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=dg,b.addEventListener("pointerdown",fg),b.H=a,b.uy=!0,b.vy=!0,a.ku=b,a.hu=z}a.hk=Pe(function(){a.Yh=null,a.N()},300),a.Ov=Pe(function(){Ud(a)},250),a.preventDefault=function(tt){return tt.preventDefault(),!1},a.$j=function(tt){if(a.isEnabled){var rt=Dl(a,tt,!0);rt.bubbles=!0;var ot=0,lt=0;rt.delta=0,tt.deltaX!==void 0?(tt.deltaX!==0&&(ot=0<tt.deltaX?1:-1),tt.deltaY!==0&&(lt=0<tt.deltaY?1:-1),rt.delta=Math.abs(tt.deltaX)>Math.abs(tt.deltaY)?-ot:-lt):tt.wheelDeltaX!==void 0?(tt.wheelDeltaX!==0&&(ot=0<tt.wheelDeltaX?-1:1),tt.wheelDeltaY!==0&&(lt=0<tt.wheelDeltaY?-1:1),rt.delta=Math.abs(tt.wheelDeltaX)>Math.abs(tt.wheelDeltaY)?-ot:-lt):tt.wheelDelta!==void 0&&tt.wheelDelta!==0&&(rt.delta=0<tt.wheelDelta?1:-1),a.doMouseWheel(),Wl(rt,tt)}},a.aA=function(tt){a.isEnabled&&(a.Vk=!1,Dl(a,tt,!0),tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())},a.ui=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.Yt;rt[tt.pointerId]===void 0&&(rt[tt.pointerId]=tt),rt=a.oj;var ot=!1;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType)if(rt[1]!==null&&rt[1].pointerId===tt.pointerId)rt[1]=tt,ot=!0;else if(rt[0]===null)rt[0]=tt;else if(rt[1]===null)rt[1]=tt,ot=!0;else{tt.preventDefault();return}else rt[0]=tt;(rt=tt.pointerType==="touch"||tt.pointerType==="pen")&&(a.qu=!1,a.wq=!0);var lt=ot;ot=xf(a,tt,!0,!1,!0,lt),Jh(a,tt,ot),ot.targetDiagram=wf(tt,tt.target),ot.targetObject=null,lt||ot.clone(a.bq),lt=a.uw,rt=rt?25:10,tt.timeStamp-a.tw<a.zy&&!(Math.abs(lt.x-tt.screenX)>rt||Math.abs(lt.y-tt.screenY)>rt)?a.yq++:a.yq=1,ot.clickCount=a.yq,a.tw=tt.timeStamp,a.uw.sg(tt.screenX,tt.screenY),a.doMouseDown(),tt.button===1?tt.preventDefault():Wl(ot,tt)}},a.dk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=a.oj;if(rt[0]===null||rt[0].pointerId!==tt.pointerId&&rt[0].pointerType===tt.pointerType){if(rt[1]!==null&&rt[1].pointerId===tt.pointerId){rt[1]=tt;return}if(rt[0]===null)rt[0]=tt;else return}else rt[0]=tt;if(rt[0].pointerId===tt.pointerId){rt=xf(a,tt,!1,!1,!1,rt[1]!==null);var ot=ln.document.elementFromPoint(tt.clientX,tt.clientY)||null;ot!==null&&ot.shadowRoot!==void 0&&ot.shadowRoot!==null&&(ot=ot.shadowRoot.elementFromPoint(tt.clientX,tt.clientY));var lt=a,ut=tt;ot&&ot.H&&(ut=tt,lt=ot.H),rt.targetDiagram=lt,Jh(a,ut,rt),rt.targetObject=null,a.doMouseMove(),Wl(rt,tt)}}},a.fk=function(tt){if(a.isEnabled){a.Vk=!0;var rt=tt.pointerType==="touch"||tt.pointerType==="pen",ot=a.Yt;if(rt&&a.qu)delete ot[tt.pointerId],tt.preventDefault();else if(ot=a.oj,ot[0]===null||ot[0].pointerId!==tt.pointerId&&ot[0].pointerType===tt.pointerType)ot[1]!==null&&ot[1].pointerId===tt.pointerId&&(ot[1]=null);else{ot[0]=null,ot=xf(a,tt,!1,!0,!0,!1);var lt=ln.document.elementFromPoint(tt.clientX,tt.clientY)||null;lt!==null&&lt.shadowRoot!==void 0&&lt.shadowRoot!==null&&(lt=lt.shadowRoot.elementFromPoint(tt.clientX,tt.clientY)),lt!==null&&lt.H instanceof Re&&lt.H!==a&&Jh(lt.H,tt,ot),lt===null&&(lt=tt.target),Jh(a,tt,ot),ot.clickCount=a.yq,ot.targetDiagram=wf(tt,lt),ot.targetObject=null,a.doMouseUp(),Wl(ot,tt),rt&&(a.wq=!1)}}},a.ek=function(tt){if(a.isEnabled){a.Vk=!1;var rt=a.Yt;rt[tt.pointerId]&&delete rt[tt.pointerId],rt=a.oj,rt[0]!==null&&rt[0].pointerId===tt.pointerId&&(rt[0]=null),rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null),tt.pointerType!=="touch"&&tt.pointerType!=="pen"&&(tt=a.currentTool,tt.cancelWaitAfter(),tt.standardMouseOver())}},a.ck=function(tt){var rt=a.oj;rt[0]!==null&&rt[0].pointerId===tt.pointerId?(rt[0]=null,a.wq=!1):rt[1]!==null&&rt[1].pointerId===tt.pointerId&&(rt[1]=null)},a.Vp=E.Z["d"+Ac[1]+Ac[2]+"wI"+vu.slice(1,5)]["b"+Rw.slice(1,y)](E.Z,tA,y,y),E.Vc(!0),hg(a),a.nl==="svg"&&(y=a.pj.get("svg"),a.Ka.appendChild(y.Oa),a.ib=y.context)}}Re.prototype.addEventListener=function(a,y,x,E){a.addEventListener(y,x,{capture:E,passive:!1})},Re.prototype.removeEventListener=function(a,y,x,E){a.removeEventListener(y,x,{capture:E})};function hg(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(ln,"resize",a.Ov,!1)}function Na(a){30<a.Sq&&(a.Yh=1)}function Yh(a,y){a.Yh!==null&&(a.Yh=null,y&&a.hk(),Mr&&Mr.nx||(a.Sq=0,a.zw=[0,0,0,0,0],a.Tq=0))}Re.prototype.computePixelRatio=function(){return this.Yh!==null?this.Yh:ln.devicePixelRatio||1},Re.prototype.doMouseMove=function(){this.currentTool.doMouseMove()},Re.prototype.doMouseDown=function(){this.currentTool.doMouseDown()},Re.prototype.doMouseUp=function(){this.currentTool.doMouseUp()},Re.prototype.doMouseWheel=function(){this.currentTool.doMouseWheel()},Re.prototype.doKeyDown=function(){this.currentTool.doKeyDown()},Re.prototype.doKeyUp=function(){this.currentTool.doKeyUp()},Re.prototype.doFocus=function(){this.focus()},Re.prototype.focus=function(){if(this.ta)if(this.scrollsPageOnFocus)this.ta.focus();else{var a=ln.scrollX||ln.pageXOffset,y=ln.scrollY||ln.pageYOffset;this.ta.focus(),ln.scrollTo(a,y)}},Re.prototype.Oy=function(){this.H.R("GainedFocus")},Re.prototype.Ny=function(){this.H.R("LostFocus")};function Ud(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===ga&&(a.Jk=!0,y.C()),a.ld||a.$b())}}}function Qd(a){var y=new Vs;y.name="Background",a.Al(y),y=new Vs,y.name="",a.Al(y),y=new Vs,y.name="Foreground",a.Al(y),y=new Vs,y.name="Adornment",y.isTemporary=!0,y.isInDocumentBounds=!1,a.Al(y),y=new Vs,y.name="Tool",y.isTemporary=!0,y.isInDocumentBounds=!0,a.Al(y),y=new Vs,y.name="Grid",y.allowSelect=!1,y.pickable=!1,y.isTemporary=!0,y.isInDocumentBounds=!1,a.Ww(y,a.Qj("Background"))}function cg(a){var y=new En(En.Grid);y.name="GRID";var x=new Cr;return x.figure="LineH",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Cr,x.figure="LineH",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Cr,x.figure="LineH",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Cr,x.figure="LineV",x.stroke="lightgray",x.strokeWidth=.5,x.interval=1,y.add(x),x=new Cr,x.figure="LineV",x.stroke="gray",x.strokeWidth=.5,x.interval=5,y.add(x),x=new Cr,x.figure="LineV",x.stroke="gray",x.strokeWidth=1,x.interval=10,y.add(x),x=new Zi,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 dg(){this.H.gu?this.H.gu=!1:this.H.isEnabled?this.H.kx(this):nc(this.H)}function fg(a){this.H.isEnabled?(this.H.lu=a.target.scrollTop,this.H.ju=a.target.scrollLeft):nc(this.H)}Re.prototype.kx=function(a){if(this.ta!==null){var y=this.ku,x=this.hu;this.qr=!0;var E=this.documentBounds,b=this.viewportBounds,z=this.rj,tt=E.x-z.left,rt=E.y-z.top,ot=E.width+z.left+z.right,lt=E.height+z.top+z.bottom,ut=E.right+z.right;z=E.bottom+z.bottom;var ft=b.x;E=b.y;var yt=b.width,Mt=b.height,Tt=b.right,Dt=b.bottom;b=this.scale;var $t=a.scrollLeft;if(this.tn)switch(this.bu){case"negative":$t=$t+a.scrollWidth-a.clientWidth;break;case"reverse":$t=a.scrollWidth-$t-a.clientWidth}var Vt=$t;yt<ot||Mt<lt?($t=Ot.allocAt(this.position.x,this.position.y),this.allowHorizontalScroll&&this.ju!==Vt&&($t.x=Vt/b+tt,this.ju=Vt),this.allowVerticalScroll&&this.lu!==a.scrollTop&&($t.y=a.scrollTop/b+rt,this.lu=a.scrollTop),this.position=$t,Ot.free($t),this.Ee=this.qr=!1):($t=Ot.alloc(),a.uy&&this.allowHorizontalScroll&&(tt<ft&&(this.position=$t.h(Vt+tt,this.position.y)),ut>Tt&&(this.position=$t.h(-(y.scrollWidth-this.Aa)+Vt-this.Aa/b+ut,this.position.y))),a.vy&&this.allowVerticalScroll&&(rt<E&&(this.position=$t.h(this.position.x,a.scrollTop+rt)),z>Dt&&(this.position=$t.h(this.position.x,-(y.scrollHeight-this.ya)+a.scrollTop-this.ya/b+z))),Ot.free($t),this.vd=!0,this.Ee=this.qr=!1,E=this.documentBounds,b=this.viewportBounds,ut=E.right,Tt=b.right,z=E.bottom,Dt=b.bottom,tt=E.x,ft=b.x,rt=E.y,E=b.y,yt>=ot&&tt>=ft&&ut<=Tt&&(x.style.width="1px"),Mt>=lt&&rt>=E&&z<=Dt&&(x.style.height="1px"))}},Re.prototype.computeBounds=function(a){return a===void 0&&(a=new Oe),ua(this),Zl(this,a)};function Zl(a,y){if(a.fixedBounds.w())return y.assign(a.fixedBounds),y.Co(a.yb),y;for(var x=!0,E=a.Wa.s,b=E.length,z=0;z<b;z++){var tt=E[z];if(tt.visible&&tt.isInDocumentBounds){tt=tt.Pa.s;for(var rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];lt.isInDocumentBounds&&lt.isVisible()&&(lt=lt.actualBounds,lt.w()&&(x?(x=!1,y.assign(lt)):y.ed(lt)))}}}return x&&y.h(0,0,0,0),y.Co(a.yb),y}Re.prototype.computePartsBounds=function(a,y){y===void 0&&(y=!1);var x=null;if(Dn(a))for(var E=0;E<a.length;E++){var b=a[E];!y&&b instanceof Yn||(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 Yn||(E.Va(),x===null?x=E.actualBounds.copy():x.ed(E.actualBounds));return x===null?new Oe(NaN,NaN,0,0):x};function vl(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=Ot.alloc(),x.xi(a.documentBounds,a.initialDocumentSpot);var E=a.viewportBounds;E=Oe.allocAt(0,0,E.width,E.height);var b=Ot.alloc();b.xi(E,a.initialViewportSpot),b.h(x.x-b.x,x.y-b.y),a.position=b,Oe.free(E),Ot.free(b),Ot.free(x)}x=a.yh,y&&a.Fg!==ga&&(x=a.Fg);var z=x!==ga?Xh(a,x):a.scale;x=a.pa.x,E=a.pa.y,b=a.Aa/z;var tt=a.ya/z,rt=a.zk,ot=a.pq;y&&!rt.sb()&&(ot.sb()||ot.Xb())&&(rt=ot.Xb()?cr:ot),yf(a,a.documentBounds,b,tt,rt,y),y=a.scale,a.scale=z,a.vb=!1,z=a.viewportBounds,Be.B(z.x,x)&&Be.B(z.y,E)&&Be.B(z.width,b)&&Be.B(z.height,tt)||a.onViewportBoundsChanged(new Oe(x,E,b,tt),z,y,!1)}}function Xh(a,y){var x=a.Pp;if(a.ta===null)return x;a.Va();var E=a.documentBounds;if(!E.w())return x;var b=E.width;E=E.height;var z=a.Aa+(a.gf?a.Db:0),tt=a.ya+(a.Be?a.Db:0),rt=z/b,ot=tt/E;return y===sl?(y=Math.min(ot,rt),y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):y===WA?(y=ot>rt?(tt-a.Db)/E:(z-a.Db)/b,y>x&&(y=x),y<a.minScale&&(y=a.minScale),y>a.maxScale&&(y=a.maxScale),y):a.scale}Re.prototype.zoomToFit=function(){var a=this.sj;this.sj=yA,this.scale=Xh(this,sl),a!==yA&&(vl(this,!1),yf(this,this.documentBounds,this.Aa/this.Ca,this.ya/this.Ca,this.zk,!1)),this.sj=a},kt=Re.prototype,kt.BA=function(a,y){y===void 0&&(y=sl);var x=a.width,E=a.height;if(!(x===0||E===0||isNaN(x)&&isNaN(E))){var b=1;if(y===sl||y===WA)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===WA?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 Ot(a.x,a.y)}},kt.Jy=function(a,y){this.Va();var x=this.documentBounds,E=this.viewportBounds;this.position=new Ot(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))},kt.zz=function(a){if(a instanceof Se){this.eq=a;var y=Ot.alloc();this.fq=this.op(a.ga(Qr,y)),Ot.free(y)}else this.eq=null,this.fq=Wn};function yf(a,y,x,E,b,z){var tt=Ot.allocAt(a.pa.x,a.pa.y),rt=tt.x,ot=tt.y;if(a.eq!==null){var lt=Ot.alloc();lt=a.eq.ga(Qr,lt),rt=lt.x-a.fq.x/a.scale,ot=lt.y-a.fq.y/a.scale,b=pr,Ot.free(lt)}(z||a.scrollMode===yA)&&(b.sb()&&(x>y.width&&(rt=y.x+(b.x*y.width+b.offsetX)-(b.x*x-b.offsetX)),E>y.height&&(ot=y.y+(b.y*y.height+b.offsetY)-(b.y*E-b.offsetY))),b=a.rj,z=x-y.width,x<y.width+b.left+b.right?(rt=Math.min(rt+x/2,y.right+Math.max(z,b.right)-x/2),rt=Math.max(rt,y.left-Math.max(z,b.left)+x/2),rt-=x/2):rt>y.left?rt=y.left:rt<y.right-x&&(rt=y.right-x),x=E-y.height,E<y.height+b.top+b.bottom?(ot=Math.min(ot+E/2,y.bottom+Math.max(x,b.bottom)-E/2),ot=Math.max(ot,y.top-Math.max(x,b.top)+E/2),ot-=E/2):ot>y.top?ot=y.top:ot<y.bottom-E&&(ot=y.bottom-E)),tt.x=isFinite(rt)?rt:-a.yb.left,tt.y=isFinite(ot)?ot:-a.yb.top,a.positionComputation!==null&&(y=a.positionComputation(a,tt),tt.x=y.x,tt.y=y.y),Vh(a.Yd,a.pa,tt),a.pa.h(tt.x,tt.y),su(a),Ot.free(tt)}kt.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 Zi)return a}else if(a=$u(this,a,function(x){return x.part}),a instanceof Zi)return a;return null},kt.ic=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null),ua(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),ua(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}kt.lz=function(a,y,x){return y===void 0&&(y=!0),Zc(this,a,function(E){return E.part},y?function(E){return E instanceof Zi&&E.canSelect()}:null,x)};function Zc(a,y,x,E,b){for(x===void 0&&(x=null),E===void 0&&(E=null),b instanceof ee||b instanceof xe||(b=new xe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var z=a.value;z.visible&&!z.isTemporary&&z.ji(y,x,E,b)}return b}kt.ji=function(a,y,x,E){y===void 0&&(y=null),x===void 0&&(x=null),E instanceof ee||E instanceof xe||(E=new xe),ua(this);for(var b=this.Wa.iteratorBackwards;b.next();){var z=b.value;z.visible&&z.ji(a,y,x,E)}return E},kt.ux=function(a,y,x,E){return y===void 0&&(y=!1),x===void 0&&(x=!0),Od(this,a,function(b){return b instanceof Zi&&(!x||b.canSelect())},y,E)},kt.Cf=function(a,y,x,E,b){y===void 0&&(y=null),x===void 0&&(x=null),E===void 0&&(E=!1),b instanceof ee||b instanceof xe||(b=new xe),ua(this);for(var z=this.Wa.iteratorBackwards;z.next();){var tt=z.value;tt.visible&&tt.Cf(a,y,x,E,b)}return b},kt.Nu=function(a,y,x,E,b,z){var tt=new xe;ua(this);for(var rt=this.Wa.iteratorBackwards;rt.next();){var ot=rt.value;ot.visible&&ot.Nu(a,y,x,E,tt,b,z)}return tt};function Od(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 ee||b instanceof xe||(b=new xe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var tt=a.value;tt.visible&&!tt.isTemporary&&tt.Cf(y,z,x,E,b)}return b}kt.mz=function(a,y,x,E,b){return x===void 0&&(x=!0),E===void 0&&(E=!0),Wc(this,a,y,function(z){return z instanceof Zi&&(!E||z.canSelect())},x,b)},kt.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 ee||b instanceof xe)&&(z=b),b=!0),z instanceof ee||z instanceof xe||(z=new xe),ua(this);for(var tt=this.Wa.iteratorBackwards;tt.next();){var rt=tt.value;rt.visible&&rt.og(a,y,x,E,b,z)}return z};function Wc(a,y,x,E,b,z){var tt=null;for(tt===void 0&&(tt=null),E===void 0&&(E=null),b===void 0&&(b=!0),b!==!1&&b!==!0&&((b instanceof ee||b instanceof xe)&&(z=b),b=!0),z instanceof ee||z instanceof xe||(z=new xe),ua(a),a=a.Wa.iteratorBackwards;a.next();){var rt=a.value;rt.visible&&!rt.isTemporary&&rt.og(y,x,tt,E,b,z)}return z}Re.prototype.acceptEvent=function(a){return Dl(this,a,a instanceof MouseEvent)};function Dl(a,y,x){var E=a.Qg;return a.Qg=a.cj,a.cj=E,E.diagram=a,E.event=y,x?Jh(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),hr&&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=wf(y,y.target),E.targetObject=null,E}function wf(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 xf(a,y,x,E,b,z){var tt=a.Qg;return a.Qg=a.cj,a.cj=tt,tt.diagram=a,tt.clickCount=1,a=tt.delta=0,y.ctrlKey&&(a+=1),y.altKey&&(a+=2),y.shiftKey&&(a+=4),y.metaKey&&(a+=8),tt.modifiers=a,tt.event=y,tt.timestamp=y.timeStamp,tt.button=y.button,tt.buttons=y.buttons,hr&&y.button===0&&y.ctrlKey&&(tt.button=2),tt.down=x,tt.up=E,tt.handled=!1,tt.bubbles=b,tt.isMultiTouch=z,tt}function Wl(a,y){return a.bubbles?!0:(y.stopPropagation!==void 0&&y.stopPropagation(),y.cancelable!==!1&&y.preventDefault(),y.cancelBubble=!0,!1)}Re.prototype.Qz=function(a){var y=this.H;if(!this.H.isEnabled)return!1;var x=Dl(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(),Wl(x,a)},Re.prototype.Rz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(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(),Wl(x,a)},Re.prototype.bz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(y,a,!0);return y.mouseEnter!==null&&y.mouseEnter(x),y.currentTool.standardMouseOver(),Wl(x,a)},Re.prototype.cz=function(a){var y=this.H;if(!y.isEnabled)return!1;var x=Dl(y,a,!0);return y.mouseLeave!==null&&y.mouseLeave(x),Wl(x,a)},Re.prototype.getMouse=function(a){var y=this.ta;if(y===null)return new Ot(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?gn(new Ot(y,a),this.Ab):new Ot(y,a)};function Jh(a,y,x){var E=a.ta,b=a.Aa,z=a.ya,tt=0,rt=0;E!==null&&(E=E.getBoundingClientRect(),tt=y.clientX-b/E.width*E.left,rt=y.clientY-z/E.height*E.top),x.viewPoint.h(tt,rt),a.Ab!==null?(y=Ot.allocAt(tt,rt),a.Ab.Cd(y),x.documentPoint.assign(y),Ot.free(y)):x.documentPoint.h(tt,rt)}function Yc(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))}}Re.prototype.Ya=function(){this.Zi||(this.Zi=!0,this.$b(!1))};function Sf(a){a.ld||ua(a),a.Va()}Re.prototype.redraw=function(){this.vb||this.ld||(this.N(),this.bd())},kt=Re.prototype,kt.Pz=function(){return this.kg},kt.Xy=function(a){a===void 0&&(a=null);var y=this.animationManager,x=y.isEnabled;y.Cc(),y.isEnabled=!1,Ra(this),this.hf=!1,this.du=new Ot(NaN,NaN),y.isEnabled=x,this.ld=!0;var E=this;a!==null&&sr(function(){E.ld=!1,ku(y,"Model"),a(E)},1)},kt.$b=function(a){if(a===void 0&&(a=!1),this.kg!==!0&&!(this.vb||a===!1&&this.ld)){this.kg=!0;var y=this;ln.requestAnimationFrame(function(){y.kg&&y.bd()})}},kt.bd=function(){(!this.fn||this.kg)&&(this.fn&&(this.fn=!1),Ra(this))};function fa(a,y,x){!a.Ee||a.vb||a.animationManager.defaultAnimation.isAnimating||nc(a)||(y&&ua(a),x&&vl(a,!1))}function Ra(a,y){if(!a.ld&&(a.kg=!1,a.Ka!==null||a.wo.w())){a.ld=!0;var x=a.animationManager,E=a.Xn;if(!x.isAnimating&&E.length!==0){for(var b=E.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];Ls(rt,!1),rt.v()}E.clear()}E=a.ow,0<E.count&&(E.each(function(ot){ot.Nv()}),E.clear()),b=E=!1,x.defaultAnimation.isAnimating&&(b=!0,E=a.skipsUndoManager,a.skipsUndoManager=!0),x.zb||Ud(a),fa(a,!1,!0),a.fe!==null&&(a.fe.visible&&!a.mq&&(Uu(a),a.mq=!0),!a.fe.visible&&a.mq&&(a.mq=!1)),ua(a),z=!1,(!a.hf||a.xh)&&(a.hf?Mf(a,!a.Jk):(a.Ea("Initial Layout"),x.isEnabled===!1&&x.Cc(),Mf(a,!1)),z=!0),a.Jk=!1,ua(a),a.ou||Sf(a),fa(a,!0,!1),tt=!1,z?(x=Oe.alloc(),x.assign(a.viewportBounds),a.hf||(tt=a.hf=!0,a.skipsUndoManager||(a.undoManager.isPendingClear=!0),a.undoManager.isPendingUnmodified=!0,Bf(a)),a.R("LayoutCompleted"),fa(a,!0,!1),Oe.free(x)):x.Ok&&x.Qw&&(a.Fg!==ga?a.scale=Xh(a,a.Fg):a.yh!==ga?a.scale=Xh(a,a.yh):(x=a.initialScale,isFinite(x)&&0<x&&(a.scale=x)),vl(a,!0)),z&&tt&&a.eb("Initial Layout"),ua(a),y||a.gc(a.ib),b&&(a.skipsUndoManager=E),a.ld=!1}}function Bf(a){if(a.Fg!==ga)a.scale=Xh(a,a.Fg);else if(a.yh!==ga)a.scale=Xh(a,a.yh);else{var y=a.initialScale;isFinite(y)&&0<y&&(a.scale=y)}vl(a,!0),y=a.Wa.s,a.Fd(y,y.length,a,a.viewportBounds),a.R("InitialLayoutCompleted"),a.du.assign(a.pa),Uu(a)}function ua(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 xe,a.Nv(x,a.De)}a.nodes.each(function(E){E instanceof mr&&E.U&65536&&(E.U=E.U^65536)})}}kt.Nv=function(a,y){for(a.reset();a.next();){var x=a.value;!x.Zc()||x instanceof mr||(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))}for(a.reset();a.next();)x=a.value,x instanceof mr&&x.isVisible()&&$h(this,x);for(a.reset();a.next();)x=a.value,x instanceof Yn&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x));for(a.reset();a.next();)x=a.value,x instanceof ro&&x.isVisible()&&(x.si()?(x.measure(1/0,1/0),x.arrange()):y.add(x))};function $h(a,y){for(var x=li(),E=li(),b=y.memberParts;b.next();){var z=b.value;z.isVisible()&&(z instanceof mr?(xl(z)||Ea(z)||rd(z))&&$h(a,z):z instanceof Yn?z.fromNode===y||z.toNode===y?E.push(z):x.push(z):(z.measure(1/0,1/0),z.arrange()))}for(a=x.length,b=0;b<a;b++)z=x[b],z.measure(1/0,1/0),z.arrange();for(ci(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();ci(E)}kt.Fd=function(a,y,x,E){if(this.vd||this.animationManager.isAnimating)for(var b=0;b<y;b++)a[b].Fd(x,E)},kt.gc=function(a){if(this.Ka!==null){if(this.ta===null&&se("No canvas specified"),this.nl==="svg"){if(this.Ka!==null){var y=this.animationManager;if(!y.zb&&(!y.isAnimating||y.isTicking)){ec(this);var x=this.Aa,E=this.ya;if(a.Gv.resize(x,E,x,E),x=this.Wa.s,E=x.length,this.Fd(x,E,this,this.viewportBounds),this.Fc||y.isAnimating){y=this.pa;var b=this.Ca,z=Math.round(y.x*b)/b,tt=Math.round(y.y*b)/b,rt=this.Ab;for(rt.reset(),b!==1&&rt.scale(b),y.x===0&&y.y===0||rt.translate(-z,-tt),a.ti=null,Uf(a,rt.m11,rt.m12,rt.m21,rt.m22,rt.dx,rt.dy),this.pb!==1&&(a.globalAlpha=this.pb),jA(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?Yl(this.Yf,this)&&(a=this.Vp()):a=!0,a&&(ir.prototype.Cd=ir.prototype.Eu),this.Fc=this.vd=!1}}}}else t:if(z=this.animationManager,!z.zb&&(!z.isAnimating||z.isTicking)&&(x=new Date,ec(this),this.Ka.style.opacity!=="0")){if(E=a!==this.ib,y=this.Wa.s,b=y.length,this.Fd(y,b,this,this.viewportBounds),E)a.Vc(!0),this.vd=!0;else if(!this.Fc&&!z.isAnimating)break t;z=this.Ab,z.reset(),tt=this.Mb,rt=this.pa;var ot=this.Ca,lt=Math.round(rt.x*ot)/ot,ut=Math.round(rt.y*ot)/ot;for(ot!==1&&z.scale(ot),rt.x===0&&rt.y===0||z.translate(-lt,-ut),a.setTransform(tt,0,0,tt,0,0),a.clearRect(0,0,this.Aa,this.ya),this.pb!==1&&(a.globalAlpha=this.pb),jA(this,a),rt=0;rt<b;rt++)a.setTransform(tt,0,0,tt,0,0),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),a.yc(),y[rt].gc(a,this);if(y=!1,this.Yf?Yl(this.Yf,this)&&(y=this.Vp()):y=!0,y&&(ir.prototype.Cd=ir.prototype.Eu),E?(this.ib.Vc(!0),this.vd=!0):this.Fc=this.vd=!1,y=+new Date-+x,E=Mr&&Mr.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,tt,rt,ot,lt){if(a.Ka!==null){a.ta===null&&se("No canvas specified"),tt===void 0&&(tt=null),rt===void 0&&(rt=null),ot===void 0&&(ot=!1),lt===void 0&&(lt=!1),ec(a),a.ib.Vc(!0),a.vd=!0,a.$i=!0;var ut=a.Ca;a.Ca=b;var ft=a.Wa.s,yt=ft.length;try{var Mt=new Oe(z.x,z.y,E.width/b,E.height/b),Tt=Mt.copy();Tt.Co(x),Uu(a,Tt),ua(a),a.Fd(ft,yt,a,Mt),y.setTransform(1,0,0,1,0,0),y.clearRect(0,0,E.width,E.height),rt!==null&&rt!==""&&(y.fillStyle=rt,y.ox(0,0,E.width,E.height));var Dt=a.Mb;y.scale(Dt,Dt);var $t=ir.alloc();$t.reset(),$t.translate(x.left,x.top),$t.scale(b),z.x===0&&z.y===0||$t.translate(-z.x,-z.y),y.setTransform($t.m11,$t.m12,$t.m21,$t.m22,$t.dx,$t.dy),y.yc(),y instanceof Wa&&Uf(y,$t.m11,$t.m12,$t.m21,$t.m22,$t.dx,$t.dy),ir.free($t),jA(a,y),y.globalAlpha=a.pb;var Vt=a.Qj("Grid");if(tt){var ae=new xe,ce=tt.iterator;for(ce.reset();ce.next();){var ge=ce.value;ge instanceof Zi&&(lt||ge.layer!==Vt)&&(ge.Gj(),ae.add(ge))}for(lt=0;lt<yt;lt++)jc(ft[lt],y,a,ae,ot);ae.each(function(He){return He.Gj()})}else for(ae=0;ae<yt;ae++){var we=ft[ae];we===Vt?lt&&we.gc(y,a,!0):we.gc(y,a,ot)}a.$i=!1,a.Yf&&Yl(a.Yf,a)&&a.Vp()}finally{a.Ca=ut,a.ib.Vc(!0),a.vd=!0,a.Fd(ft,yt,a,a.viewportBounds),Uu(a),a.ib instanceof Wa&&(a.ib.Nj.PA(),a.redraw())}}}kt.Gf=function(a){return this.Rg[a]},kt.Xx=function(a,y){a==="minDrawingLength"&&(this.Oq=y),this.Rg[a]=y,this.redraw()},kt.Tx=function(){this.Rg=new Si,this.Rg.drawShadows=!0,this.Rg.textGreeking=!0,this.Rg.viewportOptimizations=!(hr||$i),this.Rg.temporaryPixelRatio=!0,this.Rg.pictureRatioOptimization=!0,this.Oq=this.Rg.minDrawingLength=1};function jA(a,y){a=a.Rg,a!==null&&(a.imageSmoothingEnabled!==void 0&&y.Wx(!!a.imageSmoothingEnabled),a=a.defaultFont,a!=null&&(y.font=a))}kt.Ql=function(a){return this.on[a]},kt.sA=function(a,y){this.on[a]=y},kt.Sx=function(){this.on=new Si,this.on.extraTouchArea=10,this.on.extraTouchThreshold=10,this.on.hasGestureZoom=!0},kt.set=function(a){return Object.assign(this,a),this},kt.Du=function(a){return this.nm(a)},kt.nm=function(a){return tc(this,a),this};function tc(a,y){var x=a instanceof En,E=a instanceof Re,b;for(b in y){b===""&&se("Setting properties requires non-empty property names");var z=a,tt=b;if(x||E){var rt=b.indexOf(".");if(0<rt){var ot=b.substring(0,rt);x?z=a.fb(ot):(z=a[ot],z==null&&(z=a.toolManager[ot])),Ye(z)?tt=b.substr(rt+1):se("Unable to find object named: "+ot+" in "+a.toString()+" when trying to set property: "+b)}}if(tt[0]!=="_"&&!un(z,tt))if(E&&tt==="ModelChanged"){a.Yw(y[tt]);continue}else if(E&&tt==="Changed"){a.Pe(y[tt]);continue}else if(E&&un(a.toolManager,tt))z=a.toolManager;else if(E&&bf(a,tt)){a.Bj(tt,y[tt]);continue}else if(a instanceof Oi&&tt==="Changed"){a.Pe(y[tt]);continue}else se('Trying to set undefined property "'+tt+'" on object: '+z.toString());z[tt]=y[b],tt[0]==="_"&&z instanceof Se&&z.Vw(tt)}}kt.bx=function(){if(this.Eh.count!==0&&!(1<this.undoManager.transactionLevel)){for(;0<this.Eh.count;){var a=this.Eh;for(this.Eh=new ke,a=a.iterator;a.next();){var y=a.key;y.Xo(a.value),y.qc()}}this.N()}},kt.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")},Re.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!==lc&&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=Oe.alloc(),Hd(this,this.computeBounds(E)),Oe.free(E)),E=this.ta,E===null||E instanceof Sa)))){var tt=this.Mb;b=this.Aa*tt;var rt=this.ya*tt,ot=this.scale*tt;z=Math.round(Math.round(y.x*ot)-Math.round(a.x*ot)),y=Math.round(Math.round(y.y*ot)-Math.round(a.y*ot)),ot=this.jw,a=this.oy,ot.width!==b&&(ot.width=b),ot.height!==rt&&(ot.height=rt),a.clearRect(0,0,b,rt),ot=190*tt;var lt=70*tt,ut=Math.max(z,0),ft=Math.max(y,0),yt=Math.floor(b-ut),Mt=Math.floor(rt-ft);a.drawImage(E.Oa,ut,ft,yt,Mt,0,0,yt,Mt),Yl(this.Yf,this)&&a.clearRect(0,0,ot,lt),E=li(),a=li(),Mt=Math.abs(z),yt=Math.abs(y);var Tt=ut===0?0:b-Mt;ut=Ot.allocAt(Tt,0),Mt=Ot.allocAt(Mt+Tt,rt),a.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y)));var Dt=this.Ab;if(Dt.reset(),Dt.scale(tt,tt),this.Ca!==1&&Dt.scale(this.Ca),tt=this.pa,(tt.x!==0||tt.y!==0)&&isFinite(tt.x)&&isFinite(tt.y)&&Dt.translate(-tt.x,-tt.y),gn(ut,Dt),gn(Mt,Dt),E.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),Tt=ft===0?0:rt-yt,ut.h(0,Tt),Mt.h(b,yt+Tt),a.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),gn(ut,Dt),gn(Mt,Dt),E.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),Yl(this.Yf,this)&&(b=0<z?0:-z,rt=0<y?0:-y,ut.h(b,rt),Mt.h(ot+b,lt+rt),a.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y))),gn(ut,Dt),gn(Mt,Dt),E.push(new Oe(Math.min(ut.x,Mt.x),Math.min(ut.y,Mt.y),Math.abs(ut.x-Mt.x),Math.abs(ut.y-Mt.y)))),Ot.free(ut),Ot.free(Mt),fa(this,!1,!0),this.Ka===null&&se("No div specified"),this.ta===null&&se("No canvas specified"),!this.animationManager.zb&&(b=this.ib,this.Fc)){for(ec(this),rt=this.Mb,b.setTransform(1,0,0,1,0,0),b.clearRect(0,0,this.Aa*rt,this.ya*rt),b.drawImage(this.jw.Oa,0<z?0:Math.round(-z),0<y?0:Math.round(-y)),z=this.pa,tt=this.Ca,ot=Math.round(z.x*tt)/tt,lt=Math.round(z.y*tt)/tt,y=this.Ab,y.reset(),tt!==1&&y.scale(tt),z.x===0&&z.y===0||y.translate(-ot,-lt),b.save(),b.beginPath(),z=a.length,tt=0;tt<z;tt++)ot=a[tt],ot.width!==0&&ot.height!==0&&b.rect(Math.floor(ot.x),Math.floor(ot.y),Math.ceil(ot.width),Math.ceil(ot.height));for(b.clip(),b.setTransform(rt,0,0,rt,0,0),b.transform(y.m11,y.m12,y.m21,y.m22,y.dx,y.dy),b.yc(),y=this.Wa.s,z=y.length,this.Fd(y,z,this,this.viewportBounds),jA(this,b),b.globalAlpha=this.pb,rt=0;rt<z;rt++)if(tt=y[rt],ot=E,tt.visible&&tt.pb!==0){lt=mA(tt,b),ft=tt.Zq,ft.length=0,ut=this.scale,yt=Oe.alloc(),Mt=tt.Pa.s,Dt=Mt.length,Tt=ot.length;for(var $t=0;$t<Dt;$t++){var Vt=Mt[$t],ae=qd(Vt,Vt.actualBounds);t:{for(var ce=2/ut,ge=4/ut,we=0;we<Tt;we++){var He=ot[we];if(He.width!==0&&He.height!==0&&ae.Vu(He.x-ce,He.y-ce,He.width+ge,He.height+ge)){ae=!0;break t}}ae=!1}ae&&tt.Oj(b,Vt,this,ft,ut,yt,!0)}Oe.free(yt),b.globalAlpha=lt}b.restore(),b.Vc(!0),this.Yf&&Yl(this.Yf,this)&&this.Vp(),this.Fc=this.vd=!1,this.hk()}ci(E),ci(a),this.ld=!1}}else this.bd();x&&(Na(this),this.bd(),Yh(this,!0))}else x?(Na(this),this.bd(),Yh(this,!0)):this.bd()}};function ec(a){a.pn!==!1&&(a.pn=!1,Cf(a,a.Aa,a.ya))}function Cf(a,y,x){su(a);var E=a.Mb;a.ta.resize(y*E,x*E,y,x)&&(a.Fc=!0,a.ib.Vc(!0))}function nc(a){var y=a.ta;if(y===null||a.wo.w())return!0;var x=a.Aa,E=a.ya,b=a.Ka,z=!1,tt=a.gf?a.Db:0,rt=a.Be?a.Db:0,ot=b.clientWidth||x+tt,lt=b.clientHeight||E+rt,ut=a.viewportBounds;b=ut.x;var ft=ut.y,yt=ut.width,Mt=ut.height;if((ot!==x+tt||lt!==E+rt)&&(a.gf=!1,a.Be=!1,rt=tt=0,a.Aa=ot,a.ya=lt,z=a.pn=!0,su(a)),!a.hf||!a.viewportBounds.w())return!0;var Tt=a.ku,Dt=a.hu;if(a.Ee=!1,!(z||a.gf||a.Be||a.mn||a.nn))return!0;var $t=a.documentBounds,Vt=0,ae=0,ce=0,ge=0,we=ut.width,He=ut.height,di=a.rj;a.contentAlignment.sb()?($t.width>we&&(Vt=di.left,ae=di.right),$t.height>He&&(ce=di.top,ge=di.bottom)):(Vt=di.left,ae=di.right,ce=di.top,ge=di.bottom);var Pi=$t.width+Vt+ae,wi=$t.height+ce+ge;di=a.scale;var Gn=Pi>ot/di,wn=wi>lt/di;if(!(z||a.gf||a.Be||Gn||wn))return!0;Vt=$t.x-Vt,ot=ut.x,ae=$t.right+ae,lt=ut.right+tt,ce=$t.y-ce;var fr=ut.y;$t=$t.bottom+ge,ut=ut.bottom+rt;var rr="1px";if(ge="1px",a.scrollMode===yA&&(Gn||wn)&&(Gn&&a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(Gn=1,Vt+1<ot&&(Gn=Math.max((ot-Vt)*di+a.Aa,Gn)),ae>lt+1&&(Gn=Math.max((ae-lt)*di+a.Aa,Gn)),we+tt+1<Pi&&(Gn=Math.max((Pi-we)*di+a.Aa,Gn)),rr=Gn.toString()+"px"),wn&&a.hasVerticalScrollbar&&a.allowVerticalScroll&&(Gn=1,ce+1<fr&&(Gn=Math.max((fr-ce)*di+a.ya,Gn)),$t>ut+1&&(Gn=Math.max(($t-ut)*di+a.ya,Gn)),He+rt+1<wi&&(Gn=Math.max((wi-He)*di+a.ya,Gn)),ge=Gn.toString()+"px")),Gn=rr!=="1px",wn=ge!=="1px",Gn&&wn||!Gn&&!wn||(wn&&(lt-=a.Db),Gn&&(ut-=a.Db),Pi<we+tt||!a.hasHorizontalScrollbar||!a.allowHorizontalScroll||(tt=1,Vt+1<ot&&(tt=Math.max((ot-Vt)*di+a.Aa,tt)),ae>lt+1&&(tt=Math.max((ae-lt)*di+a.Aa,tt)),we+1<Pi&&(tt=Math.max((Pi-we)*di+a.Aa,tt)),rr=tt.toString()+"px"),Gn=rr!=="1px",tt=a.ya,Gn!==a.Be&&(tt=Gn?a.ya-a.Db:a.ya+a.Db),wi<He+rt||!a.hasVerticalScrollbar||!a.allowVerticalScroll||(rt=1,ce+1<fr&&(rt=Math.max((fr-ce)*di+tt,rt)),$t>ut+1&&(rt=Math.max(($t-ut)*di+tt,rt)),He+1<wi&&(rt=Math.max((wi-He)*di+tt,rt)),ge=rt.toString()+"px"),wn=ge!=="1px"),a.qr&&Gn===a.Be&&wn===a.gf)return x===a.Aa&&E===a.ya||a.bd(),!1;if(Gn!==a.Be&&(rr==="1px"?a.ya=a.ya+a.Db:a.ya=Math.max(a.ya-a.Db,1),z=!0),a.Be=Gn,Dt.style.width=rr,wn!==a.gf&&(ge==="1px"?a.Aa=a.Aa+a.Db:a.Aa=Math.max(a.Aa-a.Db,1),z=!0,a.tn&&(rt=Ot.alloc(),wn?(y.style.left=a.Db+"px",a.position=rt.h(a.pa.x+a.Db/a.scale,a.pa.y)):(y.style.left="0px",a.position=rt.h(a.pa.x-a.Db/a.scale,a.pa.y)),Ot.free(rt))),z&&su(a),a.gf=wn,Dt.style.height=ge,a.gu=!0,z&&(a.pn=!0),y=Tt.scrollLeft,a.hasHorizontalScrollbar&&a.allowHorizontalScroll&&(we+1<Pi?y=(a.position.x-Vt)*di:Vt+1<ot?y=Tt.scrollWidth-Tt.clientWidth:ae>lt+1&&(y=a.position.x*di)),a.tn)switch(a.bu){case"negative":y=-(Tt.scrollWidth-y-Tt.clientWidth);break;case"reverse":y=Tt.scrollWidth-y-Tt.clientWidth}return Tt.scrollLeft=y,a.hasVerticalScrollbar&&a.allowVerticalScroll&&(He+1<wi?Tt.scrollTop=(a.position.y-ce)*di:ce+1<fr?Tt.scrollTop=Tt.scrollHeight-Tt.clientHeight:$t>ut+1&&(Tt.scrollTop=a.position.y*di)),ot=a.Aa,lt=a.ya,Tt.style.width=ot+(a.gf?a.Db:0)+"px",Tt.style.height=lt+(a.Be?a.Db:0)+"px",x!==ot||E!==lt||a.animationManager.zb?(x=Oe.allocAt(b,ft,yt,Mt),a.onViewportBoundsChanged(x,a.viewportBounds,di,z),Oe.free(x),!1):!0}kt=Re.prototype,kt.add=function(a){var y=a.diagram;if(y!==this&&(y!==null&&se("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&&se('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(as,"parts",y,null,a,null,x),y.isTemporary||this.Ya(),a.C(1),x=a.layerChanged,x!==null&&x(a,null,y)}},kt.oi=function(a){this.partManager.oi(a);var y=this;Ru(a,function(x){vA(y,x)}),(a instanceof ro||a instanceof mr&&a.placeholder!==null)&&a.v(),a.data!==null&&Ru(a,function(x){Cv(y.partManager,x)}),Ea(a)!==!0&&rd(a)!==!0||this.De.add(a),_y(a,!0,this),zy(a)?(a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.$b()},kt.pc=function(a){a.Ej(),this.partManager.pc(a);var y=this;a.data!==null&&Ru(a,function(x){Pv(y.partManager,x,y)}),this.De.remove(a),zy(a)?(a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.Ya()):a.isVisible()&&a.actualBounds.w()&&this.N(qd(a,a.actualBounds)),this.$b()},kt.remove=function(a){Pf(this,a,!0)};function Pf(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(ms,"parts",E,y,null,x,null),a=y.layerChanged,a!==null&&a(y,E,null))}kt.Is=function(a,y){if(y===void 0&&(y=!1),Dn(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 xe,x.addAll(a),a=x.iterator;a.next();)x=a.value,y&&!x.canDelete()||this.remove(x)},kt.Kj=function(a,y,x){return x===void 0&&(x=!1),this.partManager.Kj(a,y,x)},Re.prototype.moveParts=function(a,y,x,E){if(x===void 0&&(x=!1),E===void 0&&(E=Xc(this)),this.toolManager!==null){var b=new ke;if(a!==null)if(Dn(a))for(var z=0;z<a.length;z++)qu(this,b,a[z],x,E);else for(a=a.iterator;a.next();)qu(this,b,a.value,x,E);else{for(a=this.parts;a.next();)qu(this,b,a.value,x,E);for(a=this.nodes;a.next();)qu(this,b,a.value,x,E);for(a=this.links;a.next();)qu(this,b,a.value,x,E)}Bh(this,b,y,E,x)}};function qu(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=Xc(a)),x instanceof gi){if(y.add(x,a.Pd(b,x,x.location)),x instanceof mr&&(x.placeholder!==null||b.dragsMembers))for(z=x.memberParts;z.next();)qu(a,y,z.value,E,b,b.groupsAlwaysMove);for(z=x.linksConnected;z.next();){var tt=z.value;if(!y.contains(tt)){var rt=tt.fromNode,ot=tt.toNode;rt!==null&&y.contains(rt)&&ot!==null&&y.contains(ot)&&qu(a,y,tt,E,b)}}if(b.dragsTree)for(x=x.Ou();x.next();)qu(a,y,x.value,E,b)}else if(x instanceof Yn)for(y.add(x,a.Pd(b,x)),x=x.labelNodes;x.next();)qu(a,y,x.value,E,b);else x instanceof ro||y.add(x,a.Pd(b,x,x.location))}function Bh(a,y,x,E,b){if(y!==null&&y.count!==0){var z=Ot.alloc(),tt=Ot.alloc();tt.assign(x),isNaN(tt.x)&&(tt.x=0),isNaN(tt.y)&&(tt.y=0),(x=a.Mr)||$c(a,y);for(var rt=li(),ot=li(),lt=y.iterator,ut=Ot.alloc();lt.next();){var ft=lt.key,yt=lt.value;if(ft.Zc()){var Mt=qc(a,ft,y);Mt!==null?rt.push(new it(ft,yt,Mt)):(!b||ft.canMove())&&(Mt=yt.point,z.assign(Mt),a.computeMove(ft,z.add(tt),E,ut),ft.location=ut,yt.shifted===void 0&&(yt.shifted=new Ot),yt.shifted.assign(ut.re(Mt)))}else lt.key instanceof Yn&&ot.push(lt.sa)}for(Ot.free(ut),b=rt.length,lt=0;lt<b;lt++)ft=rt[lt],z.assign(ft.info.point),ft.Su.shifted===void 0&&(ft.Su.shifted=new Ot),ft.node.location=z.add(ft.Su.shifted);for(b=Ot.alloc(),lt=Ot.alloc(),ft=ot.length,yt=0;yt<ft;yt++){var Tt=ot[yt];if(Mt=Tt.key,Mt instanceof Yn)if(Mt.suspendsRouting){Mt.Tg=null,ut=Mt.fromNode;var Dt=Mt.toNode;if(a.draggedLink!==null&&E.dragsLink)if(Dt=Tt.value.point,Mt.dragComputation===null)y.add(Mt,a.Pd(E,Mt,tt)),Sc(Mt,tt.x-Dt.x,tt.y-Dt.y);else{Tt=Ot.allocAt(0,0),(ut=Mt.i(0))&&ut.w()&&Tt.assign(ut);var $t=ut=Ot.alloc().assign(Tt).add(tt);E.isGridSnapEnabled&&(E.isGridSnapRealtime||a.lastInput.up)&&($t=Ot.alloc(),Jc(a,Mt,ut,$t,E)),ut.assign(Mt.dragComputation(Mt,ut,$t)).re(Tt),y.add(Mt,a.Pd(E,Mt,ut)),Sc(Mt,ut.x-Dt.x,ut.y-Dt.y),Ot.free(Tt),Ot.free(ut),$t!==ut&&Ot.free($t)}else ut!==null&&(b.assign(ut.location),$t=y.I(ut),$t!==null&&b.re($t.point)),Dt!==null&&(lt.assign(Dt.location),$t=y.I(Dt),$t!==null&&lt.re($t.point)),ut!==null&&Dt!==null?b.Xa(lt)?(ut=Tt.value.point,Dt=z,Dt.assign(b),Dt.re(ut),y.add(Mt,a.Pd(E,Mt,b)),Sc(Mt,Dt.x,Dt.y)):(Mt.suspendsRouting=!1,Mt.bb()):(Tt=Tt.value.point,ut=ut!==null?b:Dt!==null?lt:tt,y.add(Mt,a.Pd(E,Mt,ut)),Sc(Mt,ut.x-Tt.x,ut.y-Tt.y))}else(Mt.fromNode===null||Mt.toNode===null)&&(ut=Tt.value.point,y.add(Mt,a.Pd(E,Mt,tt)),Sc(Mt,tt.x-ut.x,tt.y-ut.y))}Ot.free(z),Ot.free(tt),Ot.free(b),Ot.free(lt),ci(rt),ci(ot),x||(ua(a),VA(a,y))}}Re.prototype.computeMove=function(a,y,x,E){if(E===void 0&&(E=new Ot),E.assign(y),a===null)return E;var b=y,z=x.isGridSnapEnabled;z&&(x.isGridSnapRealtime||this.lastInput.up)&&(b=Ot.alloc(),Jc(this,a,y,b,x)),x=a.dragComputation!==null?a.dragComputation(a,y,b):b;var tt=a.minLocation,rt=tt.x;isNaN(rt)&&(rt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),tt=tt.y,isNaN(tt)&&(tt=z?Math.round(1e3*a.location.y)/1e3:a.location.y);var ot=a.maxLocation,lt=ot.x;return isNaN(lt)&&(lt=z?Math.round(1e3*a.location.x)/1e3:a.location.x),ot=ot.y,isNaN(ot)&&(ot=z?Math.round(1e3*a.location.y)/1e3:a.location.y),E.h(Math.max(rt,Math.min(x.x,lt)),Math.max(tt,Math.min(x.y,ot))),b!==y&&Ot.free(b),E};function Xc(a){var y=a.toolManager.findTool("Dragging");return y!==null?y.dragOptions:a.Wm}function Jc(a,y,x,E,b){if(b===void 0&&(b=Xc(a)),E.assign(x),y!==null){var z=a.grid;y=b.gridSnapCellSize,a=y.width,y=y.height;var tt=b.gridSnapOrigin,rt=tt.x;if(tt=tt.y,b=b.gridSnapCellSpot,z!==null){var ot=z.gridCellSize;isNaN(a)&&(a=ot.width),isNaN(y)&&(y=ot.height),z=z.gridOrigin,isNaN(rt)&&(rt=z.x),isNaN(tt)&&(tt=z.y)}z=Ot.allocAt(0,0),z.yi(0,0,a,y,b),Be.No(x.x,x.y,rt+z.x,tt+z.y,a,y,E),Ot.free(z)}}function $c(a,y){if(y!==null)for(a.Mr=!0,a=y.iterator;a.next();)y=a.key,y instanceof Yn&&(y.suspendsRouting=!0)}function VA(a,y){if(y!==null){for(y=y.iterator;y.next();){var x=y.key;x instanceof Yn&&(x.suspendsRouting=!1,Av(x)&&x.bb())}a.Mr=!1}}function qc(a,y,x){return y=y.containingGroup,y!==null&&(a=qc(a,y,x),a!==null||(a=x.I(y),a!==null))?a:null}kt=Re.prototype,kt.Pd=function(a,y,x){if(x===void 0)return new eA(vn);var E=a.isGridSnapEnabled;return a.groupsSnapMembers||y.containingGroup===null||(E=!1),E?new eA(new Ot(Math.round(1e3*x.x)/1e3,Math.round(1e3*x.y)/1e3)):new eA(x.copy())};function Ff(a,y,x){if(y.diagram!==null&&y.diagram!==a&&se("Cannot share a Layer with another Diagram: "+y+" of "+y.diagram),x===null?y.diagram!==null&&se("Cannot add an existing Layer to this Diagram again: "+y):(x.diagram!==a&&se("Existing Layer must be in this Diagram: "+x+" not in "+x.diagram),y===x&&se("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&&se("Cannot add Layer with the name '"+y+"'; a Layer with the same name is already present in this Diagram.")}}kt.Al=function(a){Ff(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(as,"layers",this,null,a,null,x+1),this.N(),this.Ya(),this},kt.Ww=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ms,"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(as,"layers",this,null,a,null,z),this.N(),0>E&&this.Ya(),this},kt.Cy=function(a,y){Ff(this,a,y),a.Xe(this);var x=this.Wa,E=x.indexOf(a);0<=E&&(x.remove(a),this.cc!==null&&this.cb(ms,"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(as,"layers",this,null,a,null,z+1),this.N(),0>E&&this.Ya(),this},kt.kA=function(a){if(a.diagram!==this&&se("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(ms,"layers",this,a,null,x,null),this.N(),this.Ya()}}},kt.Qj=function(a){for(var y=this.layers;y.next();){var x=y.value;if(x.name===a)return x}return null},kt.Yw=function(a){return this.pf===null&&(this.pf=new ee),this.pf.add(a),this.model.Pe(a),this},kt.mA=function(a){this.pf!==null&&(this.pf.remove(a),this.pf.count===0&&(this.pf=null)),this.model.ik(a)},kt.Pe=function(a){return this.zg===null&&(this.zg=new ee),this.zg.add(a),this},kt.ik=function(a){this.zg!==null&&(this.zg.remove(a),this.zg.count===0&&(this.zg=null))},kt.ds=function(a){if(this.skipsUndoManager||this.model.skipsUndoManager||this.model.undoManager.Tu(a),a.change!==oa&&(this.isModified=!0),this.zg!==null)for(var y=this.zg,x=y.length,E=0;E<x;E++)y.M(E)(a)},kt.cb=function(a,y,x,E,b,z,tt){z===void 0&&(z=null),tt===void 0&&(tt=null);var rt=new Ho;rt.diagram=this,rt.change=a,rt.propertyName=y,rt.object=x,rt.oldValue=E,rt.oldParam=z,rt.newValue=b,rt.newParam=tt,this.ds(rt)},kt.g=function(a,y,x,E,b){this.cb(Qo,a,this,y,x,E,b)},Re.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===Qo){var b=a.object;if(jo(b,a.propertyName,a.I(y)),b instanceof Se){var z=b.part;z!==null&&z.Wb()}this.isModified=!0}else if(E===as){var tt=a.object,rt=a.newParam,ot=a.newValue;if(tt instanceof En)if(typeof rt=="number"&&ot instanceof Se){y?tt.pc(rt):tt.Gb(rt,ot);var lt=tt.part;lt!==null&&lt.Wb()}else typeof rt=="number"&&ot instanceof Is&&(ot.isRow?fy(tt,rt,y?void 0:ot):gy(tt,rt,y?void 0:ot));else if(tt instanceof Vs){var ut=a.oldParam===!0;typeof rt=="number"&&ot instanceof Zi&&(y?(ot.isSelected=!1,ot.isHighlighted=!1,ot.Wb(),tt.pc(ut?rt:-1,ot,ut)):tt.oi(rt,ot,ut))}else tt instanceof Re?typeof rt=="number"&&ot instanceof Vs&&(y?this.Wa.mb(rt):(ot.Xe(this),this.Wa.Gb(rt,ot))):se("unknown ChangedEvent.Insert object: "+a.toString());this.isModified=!0}else if(E===ms){var ft=a.object,yt=a.oldParam,Mt=a.oldValue;if(ft instanceof En)typeof yt=="number"&&Mt instanceof Se?y?ft.Gb(yt,Mt):ft.pc(yt):typeof yt=="number"&&Mt instanceof Is&&(Mt.isRow?fy(ft,yt,y?Mt:void 0):gy(ft,yt,y?Mt:void 0));else if(ft instanceof Vs){var Tt=a.newParam===!0;typeof yt=="number"&&Mt instanceof Zi&&(y?0>ft.Pa.indexOf(Mt)&&ft.oi(yt,Mt,Tt):(Mt.isSelected=!1,Mt.isHighlighted=!1,Mt.Wb(),ft.pc(Tt?yt:-1,Mt,Tt)))}else ft instanceof Re?typeof yt=="number"&&Mt instanceof Vs&&(y?(Mt.Xe(this),this.Wa.Gb(yt,Mt)):this.Wa.mb(yt)):se("unknown ChangedEvent.Remove object: "+a.toString());this.isModified=!0}else E!==oa&&se("unknown ChangedEvent: "+a.toString())}finally{this.skipsModelSourceBindings=x}}},Re.prototype.Ea=function(a){return this.undoManager.Ea(a)},Re.prototype.eb=function(a){return this.undoManager.eb(a)},Re.prototype.Kf=function(){return this.undoManager.Kf()},Re.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}},Re.prototype.updateAllTargetBindings=function(a){this.partManager.updateAllTargetBindings(a)},Re.prototype.rp=function(){this.partManager.rp()};function Ef(a,y,x){var E=a.animationManager;if(a.vb||a.ld)a.Ca=x,su(a),a.N(),a.Ee=!0,E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca));else if(a.ta===null)a.Ca=x,su(a);else{a.vb=!0;var b=a.viewportBounds.copy(),z=a.Aa,tt=a.ya,rt=a.zoomPoint.x,ot=a.zoomPoint.y,lt=a.contentAlignment;isNaN(rt)&&(lt.$c()?lt.Hf(zr)?rt=0:lt.Hf(eo)&&(rt=z-1):rt=lt.sb()?lt.x*(z-1):z/2),isNaN(ot)&&(lt.$c()?lt.Hf(Wi)?ot=0:lt.Hf(xs)&&(ot=tt-1):ot=lt.sb()?lt.y*(tt-1):tt/2),a.scaleComputation===null||a.animationManager.defaultAnimation.isAnimating||(x=a.scaleComputation(a,x)),x<a.minScale&&(x=a.minScale),x>a.maxScale&&(x=a.maxScale),z=Ot.allocAt(a.pa.x+rt/y-rt/x,a.pa.y+ot/y-ot/x),a.position=z,Ot.free(z),a.Ca=x,su(a),a.vb=!1,a.onViewportBoundsChanged(b,a.viewportBounds,y,!1),vl(a,!1),E.zb&&(pA(E)||E.ce.add(E.H,"scale",y,a.Ca))}}Re.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!==ga||a.width===y.width&&a.height===y.height||b.C(),b=this.currentTool,this.Vk===!0&&b instanceof Eo&&(this.lastInput.documentPoint=this.Ps(this.lastInput.viewPoint),Oh(b,this)),this.vb||this.invalidateViewport(a,y),Uu(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 Uu(a,y){var x=a.fe;if(x!==null&&x.visible){for(var E=on.alloc(),b=1,z=1,tt=x.O.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot],ut=Math.abs(lt.interval);2>ut||(Mh(lt.figure)?z=z*ut/Be.vx(z,ut):b=b*ut/Be.vx(b,ut))}if(tt=x.gridCellSize,E.h(z*tt.width,b*tt.height),y!==void 0)b=y.width,z=y.height,a=y.x,tt=y.y;else{if(y=Oe.alloc(),a=a.viewportBounds,y.h(a.x,a.y,a.width,a.height),!y.w()){Oe.free(y);return}b=y.width,z=y.height,a=y.x,tt=y.y,Oe.free(y)}x.width=b+2*E.width,x.height=z+2*E.height,y=Ot.alloc(),Be.No(a,tt,0,0,E.width,E.height,y),y.offset(-E.width,-E.height),on.free(E),x.part.location=y,Ot.free(y)}}Re.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)}},Re.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))},Re.prototype.rA=function(a){if(this.R("ChangingSelection",this.selection),this.clearSelection(!0),Dn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];E instanceof Zi||se("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 Zi||se("Diagram.selectCollection given something that is not a Part: "+y),y.isSelected=!0;this.R("ChangedSelection",this.selection)},Re.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()}},kt=Re.prototype,kt.Iz=function(a){a!==null&&a.diagram===this&&(!a.isHighlighted||1<this.highlighteds.count)&&(this.clearHighlighteds(),a.isHighlighted=!0)},kt.Jz=function(a){a=new xe().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 Zi||se("Diagram.highlightCollection given something that is not a Part: "+y),y.isHighlighted=!0},kt.scroll=function(a,y,x){x===void 0&&(x=1);var E=y==="up"||y==="down",b=0,z=Ot.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)),Ot.free(z);return}se("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):se("scrolling direction must be 'up', 'down', 'left', or 'right', not: "+y),Ot.free(z)},kt.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)},kt.es=function(a){var y=this.viewportBounds;a=a.center,a.x-=y.width/2,a.y-=y.height/2,this.position=a},kt.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)},kt.zA=function(a){var y=this.Ab,x=a.x,E=a.y,b=x+a.width,z=E+a.height,tt=y.m11,rt=y.m12,ot=y.m21,lt=y.m22,ut=y.dx,ft=y.dy,yt=x*tt+E*ot+ut;y=x*rt+E*lt+ft;var Mt=b*tt+E*ot+ut;return a=b*rt+E*lt+ft,E=x*tt+z*ot+ut,x=x*rt+z*lt+ft,tt=b*tt+z*ot+ut,b=b*rt+z*lt+ft,z=Math.min(yt,Mt),yt=Math.max(yt,Mt),Mt=Math.min(y,a),y=Math.max(y,a),z=Math.min(z,E),yt=Math.max(yt,E),Mt=Math.min(Mt,x),y=Math.max(y,x),z=Math.min(z,tt),yt=Math.max(yt,tt),Mt=Math.min(Mt,b),y=Math.max(y,b),new Oe(z,Mt,yt-z,y-Mt)},kt.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),gn(a.copy(),this.Ab)};function gg(a){var y=a.isModified;a.Tw!==y&&(a.Tw=y,a.R("Modified"))}function ic(a){return a=zd.get(a),a!==null?new a:new mo}Re.prototype.doModelChanged=function(a){var y=this;if(a.model===this.model){var x=a.change,E=a.propertyName;if(x===oa&&E[0]==="S")if(E==="StartingFirstTransaction"){var b=this;a=this.toolManager,a.mouseDownTools.each(function(ot){return ot.diagram=b}),a.mouseMoveTools.each(function(ot){return ot.diagram=b}),a.mouseUpTools.each(function(ot){return ot.diagram=b}),this.ld||this.hf||(this.Jk=!0,this.fn&&(this.kg=!0))}else E==="StartingUndo"||E==="StartingRedo"?(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc(),this.R("ChangingSelection",this.selection)):E==="StartedTransaction"&&(a=this.animationManager,a.defaultAnimation.isAnimating&&!this.skipsUndoManager&&a.Cc());else if(this.aa){this.aa=!1;try{if(a.modelChange===""&&x===oa){(E==="FinishedUndo"||E==="FinishedRedo")&&(this.R("ChangedSelection",this.selection),ua(this));var z=this.animationManager;E==="RolledBackTransaction"&&z.Cc(),this.bx(),this.Jk=!0,this.bd(),this.undoManager.transactionLevel!==0&&this.undoManager.transactionLevel!==1||qr(z),E==="CommittedTransaction"&&this.undoManager.isJustDiscarded&&(this.Ce=Math.min(this.Ce,this.undoManager.historyIndex-1)),E!=="CommittedTransaction"&&E!=="RolledBackTransaction"||!this.undoManager.isPendingUnmodified||setTimeout(function(){y.isModified=!1},1);var tt=a.isTransactionFinished;if(tt&&(gg(this),this.As.clear(),Tu(this.animationManager)),!this.Rt&&tt&&this.lastInput.targetDiagram){this.Rt=!0;var rt=this;sr(function(){rt.currentTool.standardMouseOver(),rt.Rt=!1},10)}}}finally{this.aa=!0}}}};function vA(a,y){y=y.O.s;for(var x=y.length,E=0;E<x;E++)Ch(a,y[E])}function Ch(a,y){if(y instanceof Al){var x=y.element;if(x!==null&&x instanceof HTMLImageElement){x.Bg instanceof xe&&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 Rd(a,y){if(y instanceof Al){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 xe&&x.Bg.remove(a),Bg(E));break}}}}}Re.prototype.Wd=function(){this.partManager.Wd()},Re.prototype.Aj=function(a,y){this.Yd.Aj(a,y)},Re.prototype.Cj=function(a,y){this.Yd.Cj(a,y)},Re.prototype.findPartForKey=function(a){return this.partManager.findPartForKey(a)},Re.prototype.Vb=function(a){return this.partManager.Vb(a)},Re.prototype.findLinkForKey=function(a){return this.partManager.findLinkForKey(a)},kt=Re.prototype,kt.Lc=function(a){return this.partManager.Lc(a)},kt.ii=function(a){return this.partManager.ii(a)},kt.Kc=function(a){return this.partManager.Kc(a)},kt.ms=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ms.apply(this.partManager,y instanceof Array?y:ri(Fi(y)))},kt.ls=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];return this.partManager.ls.apply(this.partManager,y instanceof Array?y:ri(Fi(y)))};function su(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 Hd(a,y){a.Zi=!1;var x=a.Sp;x.D(y)||(x=x.copy(),a.Sp.assign(y),vl(a,!1),a.R("DocumentBoundsChanged",void 0,x),a.Ee=!0,a.N())}kt.Va=function(){if(this.Zi){var a=Oe.alloc();Hd(this,this.computeBounds(a)),Oe.free(a)}},kt.rz=function(){for(var a=new xe,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},kt.qz=function(){return this.ai.iterator},kt.Uz=function(a){ua(this),a&&td(this,!0),this.ld?Mf(this,!1):(this.Jk=!0,Ra(this))};function td(a,y){for(var x=a.ai.iterator;x.next();)Lf(a,x.value,y);a.layout&&(y?a.layout.isValidLayout=!1:a.layout.C())}function Lf(a,y,x){if(y!==null){for(var E=y.gl.iterator;E.next();)Lf(a,E.value,x);y.layout!==null&&(x?y.layout.isValidLayout=!1:y.layout.C())}}function Mf(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||ku(z,"Layout")),a.xh=!1;for(var tt=a.ai.iterator;tt.next();)rc(a,tt.value,y,E);b.isValidLayout||(!y||b.isRealtime||b.isRealtime===null||E===0?(b.doLayout(a),ua(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||qr(z),a.aa=x}}}function rc(a,y,x,E){if(y!==null){for(var b=y.gl.iterator;b.next();)rc(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),$h(a,y),b.isValidLayout=!0):a.xh=!0)}}kt.yz=function(){for(var a=new ee,y=this.nodes;y.next();){var x=y.value;x.isTopLevel&&x.kh()===null&&a.add(x)}return a.iterator};function pg(a){function y(b){var z=b.toLowerCase(),tt=new ee;x.add(b,tt),x.add(z,tt),E.add(b,b),E.add(z,b)}var x=new ke,E=new ke;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 bf(a,y){var x=a.hw.I(y);return x!==null?x:a.hw.I(y.toLowerCase())}function _d(a,y){var x=a.iw.I(y);if(x!==null||(x=a.iw.I(y.toLowerCase()),x!==null))return x;se("Unknown DiagramEvent name: "+y)}kt.Bj=function(a,y){return a=_d(this,a),a!==null&&a.add(y),this},kt.am=function(a,y){a=_d(this,a),a!==null&&a.remove(y)},kt.R=function(a,y,x){var E=_d(this,a),b=new Wu;if(b.diagram=this,a=bf(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 Kd(a){if(a.animationManager.isTicking)return!1;var y=a.currentTool;return y===a.toolManager.findTool("Dragging")?!a.Mr||y.isComplexRoutingRealtime:!0}kt.Yj=function(a,y){return ed(this,!1,null,y||null).Yj(a.x,a.y,a.width,a.height)},Re.prototype.computeOccupiedArea=function(a){return this.isVirtualized?this.viewportBounds.copy():this.Zi?Zl(this,a):a.assign(this.documentBounds)};function ed(a,y,x,E){var b=a.Xh;if(b===null&&(a.Xh=b=new Sp(a.avoidanceCellSize)),b.vs||b.group!==x||b.Yx!==E){if(b.Hx=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.width)),b.Ix=Math.max(b.Os+1,Math.floor(a.avoidanceLimit/a.avoidanceCellSize.height)),x!==null&&(x=Ph(a,x)),x===null){y=Oe.alloc(),a.computeOccupiedArea(y),y.Bc(100,100),b.initialize(y);for(var z=a.nodes;z.next();){var tt=z.value,rt=tt.layer;rt!==null&&rt.visible&&!rt.isTemporary&&oc(a,tt,E,y)}Oe.free(y)}else{for(0<x.memberParts.count&&(y=a.computePartsBounds(x.memberParts,!1),y.Bc(20,20),b.initialize(y)),y=Oe.alloc(),z=x.memberParts;z.next();)tt=z.value,tt instanceof gi&&oc(a,tt,E,y);Oe.free(y)}b.group=x,b.Yx=E,b.vs=!1}else y&&l1(b);return b}function Ph(a,y){return y.avoidable&&!y.isLinkLabel?y:y.containingGroup!==null?Ph(a,y.containingGroup):null}function oc(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(Mg(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(Cc,x,y+1);else for(var tt=x;tt<=y;tt++)z[tt]=Cc}else if(y instanceof mr)for(y=y.memberParts;y.next();)b=y.value,b instanceof gi&&oc(a,b,x,E)}}function Qu(a,y){a.Xh===null||a.Xh.vs||y!==void 0&&(!y.avoidable||y.isLinkLabel)||(a.Xh.vs=!0)}Re.prototype.gs=function(a){this.wp.assign(a),this.computeAutoScrollPosition(this.wp).Xa(this.position)?this.ug():kf(this)};function kf(a){a.vk===-1&&(a.vk=sr(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=Oe.alloc(),a.computeBounds(y),y.ed(a.documentBounds),Hd(a,y),Oe.free(y),a.Fc=!0,a.bd(),kf(a))}},a.vp))}Re.prototype.ug=function(){this.vk!==-1&&(ln.clearTimeout(this.vk),this.vk=-1)},Re.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=Oe.allocAt(0,0,E.width*b,E.height*b);var z=Ot.allocAt(0,0);if(a.x>=E.x&&a.x<E.x+x.left&&this.allowHorizontalScroll){var tt=Math.max(this.scrollHorizontalLineChange,1);tt|=0,z.x-=tt,a.x<E.x+x.left/2&&(z.x-=tt),a.x<E.x+x.left/4&&(z.x-=4*tt)}else a.x<=E.x+E.width&&a.x>E.x+E.width-x.right&&this.allowHorizontalScroll&&(tt=Math.max(this.scrollHorizontalLineChange,1),tt|=0,z.x+=tt,a.x>E.x+E.width-x.right/2&&(z.x+=tt),a.x>E.x+E.width-x.right/4&&(z.x+=4*tt));return a.y>=E.y&&a.y<E.y+x.top&&this.allowVerticalScroll?(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y-=tt,a.y<E.y+x.top/2&&(z.y-=tt),a.y<E.y+x.top/4&&(z.y-=4*tt)):a.y<=E.y+E.height&&a.y>E.y+E.height-x.bottom&&this.allowVerticalScroll&&(tt=Math.max(this.scrollVerticalLineChange,1),tt|=0,z.y+=tt,a.y>E.y+E.height-x.bottom/2&&(z.y+=tt),a.y>E.y+E.height-x.bottom/4&&(z.y+=4*tt)),z.Xa(vn)||(y=new Ot(y.x+z.x/b,y.y+z.y/b)),Oe.free(E),Ot.free(z),y},kt=Re.prototype,kt.Cs=function(){return null},kt.av=function(){return null},kt.bs=function(a,y){this.pj.add(a,y)},kt.Fu=function(a){(this.Pw=a)||this.nodes.each(function(y){y instanceof mr&&(y.$p=null)})};function nd(a,y,x){function E(){var ut=+new Date;for(z=!0,tt.reset();tt.next();)if(!tt.value[0].al){z=!1;break}z||ut-lt>ot?y(x,b,rt):ln.requestAnimationFrame(E)}for(var b=x.callback,z=!0,tt=a.Og.iterator;tt.next();)if(!tt.value[0].al){z=!1;break}if(typeof b!="function"||z)return y(x,b,a);var rt=a,ot=x.callbackTimeout||300,lt=+new Date;return ln.requestAnimationFrame(function(){E()}),null}kt.Wz=function(a){return Jo?(a===void 0&&(a={}),a.returnType="Image",this.Jx(a)):null},kt.Jx=function(a){return a===void 0&&(a={}),nd(this,this.Xz,a)},kt.Xz=function(a,y,x){var E=mg(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 vu+"data":b=E.getImageData(0,0,x.width,x.height);break;case vu:E=(a.document||document).createElement("img"),E.src=x.toDataURL(a.type,a.details),b=E;break;case"blob":return typeof y!="function"&&se('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 mg(a,y,x,E){if(a.animationManager.Cc(),a.bd(),a.ta===null)return null;typeof y!="object"&&se("properties argument must be an Object.");var b=y.size||null,z=y.scale||null;y.scale!==void 0&&isNaN(y.scale)&&(z="NaN");var tt=y.maxSize;y.maxSize===void 0&&(tt=x==="SVG"?new on(1/0,1/0):new on(2e3,2e3));var rt=y.position||null,ot=y.parts||null,lt=y.padding===void 0?1:y.padding,ut=y.background||null,ft=y.omitTemporary;ft===void 0&&(ft=!0);var yt=y.document||document,Mt=y.elementFinished||null,Tt=y.showTemporary;Tt===void 0&&(Tt=!ft),y=y.showGrid,y===void 0&&(y=Tt),b!==null&&isNaN(b.width)&&isNaN(b.height)&&(b=null),typeof lt=="number"?lt=new wr(lt):lt instanceof wr||se("MakeImage padding must be a Margin or a number."),lt.left=Math.max(lt.left,0),lt.right=Math.max(lt.right,0),lt.top=Math.max(lt.top,0),lt.bottom=Math.max(lt.bottom,0),a.ib.Vc(!0),ft=new Jl(null,yt,void 0,!0);var Dt=ft.context;if(!(b||z||ot||rt))return ft.width=a.Aa+Math.ceil(lt.left+lt.right),ft.height=a.ya+Math.ceil(lt.top+lt.bottom),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Mt,qh(a,E.context,lt,new on(ft.width,ft.height),a.Ca,a.pa,ot,ut,Tt,y),E.context):(a.Xm=!1,qh(a,Dt,lt,new on(ft.width,ft.height),a.Ca,a.pa,ot,ut,Tt,y),a.Xm=!0,ft.context);var $t=a.Pp,Vt=a.documentBounds.copy();if(Vt.Fv(a.yb),Tt)for(var ae=a.Wa.s,ce=ae.length,ge=0;ge<ce;ge++){var we=ae[ge];if(we.visible&&we.isTemporary){we=we.Pa.s;for(var He=we.length,di=0;di<He;di++){var Pi=we[di];Pi.isInDocumentBounds&&Pi.isVisible()&&(Pi=Pi.actualBounds,Pi.w()&&Vt.ed(Pi))}}}if(ae=new Ot(Vt.x,Vt.y),ot!==null){for(ce=new Oe(0,0,0,0),ge=!0,we=ot.iterator,we.reset();we.next();)He=we.value,He instanceof Zi&&(di=He.layer,di!==null&&!di.visible||di!==null&&!Tt&&di.isTemporary||!He.isVisible()||(He=He.actualBounds,He.w()&&(ge?(ge=!1,ce.assign(He)):ce.ed(He))));Vt.width=ce.width,Vt.height=ce.height,ae.x=ce.x,ae.y=ce.y}return rt!==null&&rt.w()&&(ae=rt,z||(z=$t)),ce=rt=0,lt!==null&&(rt=lt.left+lt.right,ce=lt.top+lt.bottom),ge=we=0,b!==null&&(we=b.width,ge=b.height,isFinite(we)&&(we=Math.max(0,we-rt)),isFinite(ge)&&(ge=Math.max(0,ge-ce))),b!==null&&z!==null?(z==="NaN"&&(z=$t),b.w()?(b=we,Vt=ge):isNaN(ge)?(b=we,Vt=Vt.height*z):(b=Vt.width*z,Vt=ge)):b!==null?b.w()?(z=Math.min(we/Vt.width,ge/Vt.height),b=we,Vt=ge):isNaN(ge)?(z=we/Vt.width,b=we,Vt=Vt.height*z):(z=ge/Vt.height,b=Vt.width*z,Vt=ge):z!==null?z==="NaN"&&tt.w()?(z=Math.min((tt.width-rt)/Vt.width,(tt.height-ce)/Vt.height),z>$t?(z=$t,b=Vt.width,Vt=Vt.height):(b=tt.width,Vt=tt.height)):(b=Vt.width*z,Vt=Vt.height*z):(z=$t,b=Vt.width,Vt=Vt.height),lt!==null?(b+=rt,Vt+=ce):lt=new wr(0),tt!==null&&($t=tt.width,tt=tt.height,isNaN($t)&&($t=2e3),isNaN(tt)&&(tt=2e3),isFinite($t)&&(b=Math.min(b,$t)),isFinite(tt)&&(Vt=Math.min(Vt,tt))),ft.width=Math.ceil(b),ft.height=Math.ceil(Vt),x==="SVG"?E===null?null:(E.resize(ft.width,ft.height,ft.width,ft.height),E.ownerDocument=yt,E.hs=Mt,qh(a,E.context,lt,new on(Math.ceil(b),Math.ceil(Vt)),z,ae,ot,ut,Tt,y),E.context):(a.Xm=!1,qh(a,Dt,lt,new on(Math.ceil(b),Math.ceil(Vt)),z,ae,ot,ut,Tt,y),a.Xm=!0,ft.context)}yn.Object.defineProperties(Re.prototype,{renderer:{get:function(){return this.nl},set:function(a){this instanceof pt||(a===""&&(a="default"),a=a.toLowerCase(),a!==this.nl&&(this.nl=a,a==="default"||a==="canvas"?(a=this.pj.get("svg"),a!==null&&a.Oa.remove(),this.ta&&(this.ib=this.ta.context)):a==="svg"?(this.pj.contains("svg")?a=this.pj.get("svg"):(a=new Sa(this,ln.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 Sa(this,ln.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(ln,"resize",this.Ov,!1),this.removeEventListener(ln,"wheel",this.$j,!0),Iu===this&&(Iu=null)):this.ui===null&&(this.hf=!1),this.Ka=null,a!==null&&((y=a.H)&&(y.div=null),Vc(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)&&qn(a,"0 <= value <= 1",Re,"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),vl(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),vl(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),vl(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),vl(this,!1))}},scrollHorizontalLineChange:{get:function(){return this.iu},set:function(a){var y=this.iu;y!==a&&(0>a&&qn(a,">= 0",Re,"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&&qn(a,">= 0",Re,"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 qn(a,">= 0",Re,"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||gg(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&&se("Do not replace a Diagram.model while a transaction is in progress."),this.animationManager.Cc(!0);var x=Dd(this,!0);this.hf=!1,this.fn=!0,this.Ce=-2,this.kg=!1;var E=this.vb;this.vb=!0,ku(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=ic(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(ln,"pointermove",this.dk,!0),this.addEventListener(ln,"pointerdown",this.ui,!0),this.addEventListener(ln,"pointerup",this.fk,!0),this.addEventListener(ln,"pointerout",this.ek,!0),this.addEventListener(ln,"pointercancel",this.ck,!0),this.removeEventListener(y,"wheel",this.$j,!1),this.addEventListener(ln,"wheel",this.$j,!0),this.addEventListener(ln,"selectstart",this.preventDefault,!1)):(this.removeEventListener(ln,"pointermove",this.dk,!0),this.removeEventListener(ln,"pointerdown",this.ui,!0),this.removeEventListener(ln,"pointerup",this.fk,!0),this.removeEventListener(ln,"pointerout",this.ek,!0),this.removeEventListener(ln,"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(ln,"wheel",this.$j,!0),this.removeEventListener(ln,"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=Ot.alloc().assign(this.pa);if(!y.D(a)){var x=this.viewportBounds.copy();this.pa.assign(a),Vh(this.animationManager,y,this.pa),this.vb||this.ta===null&&!this.wo.w()?su(this):(this.vb=!0,a=this.scale,yf(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)}Ot.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=cg(this)),this.fe},set:function(a){var y=this.fe;if(y!==a){y===null&&(y=this.fe=cg(this)),a.type!==En.Grid&&se("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),Uu(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),su(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||se("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 wr(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===yA&&vl(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,vl(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,Ef(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&&Ef(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!==ga&&vl(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()||se("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()||se("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)):qn(a,"> 0",Re,"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)):qn(a,"> 0",Re,"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),vl(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 wr(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&&se("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();)cp(a.value)}},treeCollapsePolicy:{get:function(){return this.uu},set:function(a){var y=this.uu;y!==a&&(a!==YA&&a!==Es&&a!==wA&&se("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 on(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 wr(a));var y=this.xp;y.D(a)||(this.xp=a=a.J(),this.Ya(),this.g("autoScrollRegion",y,a))}}}),yn.Object.defineProperties(Re,{licenseKey:{get:function(){return Vd.jc()},set:function(a){Vd.add(a.replace(/\s/g,""))}},version:{get:function(){return $s}}}),Re.prototype.makeImageData=Re.prototype.Jx,Re.prototype.makeImage=Re.prototype.Wz,Re.prototype.cacheGroupExternalLinks=Re.prototype.Fu,Re.prototype.addRenderer=Re.prototype.bs,Re.prototype.makeSVG=Re.prototype.av,Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.stopAutoScroll=Re.prototype.ug,Re.prototype.doAutoScroll=Re.prototype.gs,Re.prototype.isUnoccupied=Re.prototype.Yj,Re.prototype.raiseDiagramEvent=Re.prototype.R,Re.prototype.removeDiagramListener=Re.prototype.am,Re.prototype.addDiagramListener=Re.prototype.Bj,Re.prototype.findTreeRoots=Re.prototype.yz,Re.prototype.layoutDiagram=Re.prototype.Uz,Re.prototype.findTopLevelGroups=Re.prototype.qz,Re.prototype.findTopLevelNodesAndLinks=Re.prototype.rz,Re.prototype.ensureBounds=Re.prototype.Va,Re.prototype.findLinksByExample=Re.prototype.ls,Re.prototype.findNodesByExample=Re.prototype.ms,Re.prototype.findLinkForData=Re.prototype.Kc,Re.prototype.findNodeForData=Re.prototype.ii,Re.prototype.findPartForData=Re.prototype.Lc,Re.prototype.findLinkForKey=Re.prototype.findLinkForKey,Re.prototype.findNodeForKey=Re.prototype.Vb,Re.prototype.findPartForKey=Re.prototype.findPartForKey,Re.prototype.rebuildParts=Re.prototype.Wd,Re.prototype.transformViewToDoc=Re.prototype.Ps,Re.prototype.transformRectDocToView=Re.prototype.zA,Re.prototype.transformDocToView=Re.prototype.op,Re.prototype.centerRect=Re.prototype.es,Re.prototype.scrollToRect=Re.prototype.tv,Re.prototype.scroll=Re.prototype.scroll,Re.prototype.highlightCollection=Re.prototype.Jz,Re.prototype.highlight=Re.prototype.Iz,Re.prototype.selectCollection=Re.prototype.rA,Re.prototype.select=Re.prototype.select,Re.prototype.updateAllRelationshipsFromData=Re.prototype.rp,Re.prototype.updateAllTargetBindings=Re.prototype.updateAllTargetBindings,Re.prototype.commit=Re.prototype.commit,Re.prototype.rollbackTransaction=Re.prototype.Kf,Re.prototype.commitTransaction=Re.prototype.eb,Re.prototype.startTransaction=Re.prototype.Ea,Re.prototype.raiseChanged=Re.prototype.g,Re.prototype.raiseChangedEvent=Re.prototype.cb,Re.prototype.removeChangedListener=Re.prototype.ik,Re.prototype.addChangedListener=Re.prototype.Pe,Re.prototype.removeModelChangedListener=Re.prototype.mA,Re.prototype.addModelChangedListener=Re.prototype.Yw,Re.prototype.findLayer=Re.prototype.Qj,Re.prototype.removeLayer=Re.prototype.kA,Re.prototype.addLayerAfter=Re.prototype.Cy,Re.prototype.addLayerBefore=Re.prototype.Ww,Re.prototype.addLayer=Re.prototype.Al,Re.prototype.moveParts=Re.prototype.moveParts,Re.prototype.copyParts=Re.prototype.Kj,Re.prototype.removeParts=Re.prototype.Is,Re.prototype.remove=Re.prototype.remove,Re.prototype.add=Re.prototype.add,Re.prototype.clearDelayedGeometries=Re.prototype.bx,Re.prototype.setProperties=Re.prototype.nm,Re.prototype.attach=Re.prototype.Du,Re.prototype.set=Re.prototype.set,Re.prototype.resetInputOptions=Re.prototype.Sx,Re.prototype.setInputOption=Re.prototype.sA,Re.prototype.getInputOption=Re.prototype.Ql,Re.prototype.resetRenderingHints=Re.prototype.Tx,Re.prototype.setRenderingHint=Re.prototype.Xx,Re.prototype.getRenderingHint=Re.prototype.Gf,Re.prototype.maybeUpdate=Re.prototype.bd,Re.prototype.requestUpdate=Re.prototype.$b,Re.prototype.delayInitialization=Re.prototype.Xy,Re.prototype.isUpdateRequested=Re.prototype.Pz,Re.prototype.invalidateDocumentBounds=Re.prototype.Ya,Re.prototype.findObjectsNear=Re.prototype.og,Re.prototype.findPartsNear=Re.prototype.mz,Re.prototype.findObjectsIn=Re.prototype.Cf,Re.prototype.findPartsIn=Re.prototype.ux,Re.prototype.findObjectsAt=Re.prototype.ji,Re.prototype.findPartsAt=Re.prototype.lz,Re.prototype.findObjectAt=Re.prototype.ic,Re.prototype.findPartAt=Re.prototype.Ol,Re.prototype.focusObject=Re.prototype.zz,Re.prototype.alignDocument=Re.prototype.Jy,Re.prototype.zoomToRect=Re.prototype.BA,Re.prototype.zoomToFit=Re.prototype.zoomToFit,Re.prototype.diagramScroll=Re.prototype.kx,Re.prototype.focus=Re.prototype.focus;var zd=new ke,Tf=null,Jo=ln.document!==void 0,Fh=null,ZA="",ga=new Te(Re,"None",0),sl=new Te(Re,"Uniform",1),WA=new Te(Re,"UniformToFill",2),id=new Te(Re,"CycleAll",10),sc=new Te(Re,"CycleNotDirected",11),ac=new Te(Re,"CycleNotDirectedFast",12),Gd=new Te(Re,"CycleNotUndirected",13),jd=new Te(Re,"CycleDestinationTree",14),Nf=new Te(Re,"CycleSourceTree",15),yA=new Te(Re,"DocumentScroll",1),lc=new Te(Re,"InfiniteScroll",2),YA=new Te(Re,"TreeParentCollapsed",21),Es=new Te(Re,"AllParentsCollapsed",22),wA=new Te(Re,"AnyParentsCollapsed",23),Vd=new ee,$s="2.3.10",vu="image",tA=null,xA=!1;function Hs(){if(Jo){var a=ln.document.createElement("canvas"),y=a.getContext("2d"),x=Mn("7ca11abfd022028846");y[x]=Mn("398c3597c01238");for(var E=["5da73c80a36455d7038e4972187c3cae51fd22",Ln.Dx+"4ae6247590da4bb21c324ba3a84e385776",ir.xF+"fb236cdfda5de14c134ba1a95a2d4c7cc6f93c1387",Be.za],b=1;5>b;b++)y[Mn("7ca11abfd7330390")](Mn(E[b-1]),10,15*b);for(y[x]=Mn("39f046ebb36e4b"),x=1;5>x;x++)y[Mn("7ca11abfd7330390")](Mn(E[x-1]),10,15*x);(E.length!==4||E[0][0]!=="5"||E[3][0]!=="7")&&(ir.prototype.Cd=ir.prototype.Eu),tA=a}}Re.className="Diagram",Re.fromDiv=function(a){var y=a;return typeof a=="string"&&(y=ln.document.getElementById(a)),y instanceof HTMLDivElement&&y.H instanceof Re?y.H:null},Re.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},Re.useDOM=function(a){Jo=a?ln.document!==void 0:!1},Re.isUsingDOM=function(){return Jo},Re.None=ga,Re.Uniform=sl,Re.UniformToFill=WA,Re.CycleAll=id,Re.CycleNotDirected=sc,Re.CycleNotDirectedFast=ac,Re.CycleNotUndirected=Gd,Re.CycleDestinationTree=jd,Re.CycleSourceTree=Nf,Re.DocumentScroll=yA,Re.InfiniteScroll=lc,Re.TreeParentCollapsed=YA,Re.AllParentsCollapsed=Es,Re.AnyParentsCollapsed=wA;function uc(){this.wy=null,this.j="zz@orderNum",this._tk==="63ad05bbe23a1786468a4c741b6d2"?this.Rc=this.j=!0:this.Rc=null}function Yl(a,y){if(y.ib.setTransform(y.Mb,0,0,y.Mb,0,0),y.ib.yc(),a.Rc===null)t:{y="f";var x=ln[Mn("76a715b2f73f148a")][Mn("72ba13b5")]||"";if(a.Rc=!0,Jo){var E=Re[Mn("76a115b6ed251eaf4692")];if(E)for(var b=Vd.iterator;b.next()&&(E=b.value,E=Mn(E).split(Mn("39e9")),!(6>E.length));){var z=Mn(E[1]).split(".");if(E[4]!=="7da71ca0")break;var tt=Mn(Ln[Mn("6cae19")]).split(".");if(z[0]>tt[0]||z[0]===tt[0]&&z[1]>=tt[1]){var rt=ln[Mn("74a900bae4370f8b51")][Mn("6fbb13a1c2311e8a57")].toLowerCase();if(tt=rt[Mn("73a612b6fb191d")](Mn("3aad1ab6e022098b4dc4")),z=Mn(E[2]),-1<tt&&(rt=rt[Mn("73a612b6fb191d")](z.toLowerCase()+"/"),a.Rc=!(-1<rt&&rt<tt),!a.Rc))break;for(tt=x[Mn("76ad18b4f73e")],rt=x[Mn("73a612b6fb191d")](Mn("35e7"))+2;rt<tt;rt++)y+=x[rt];if(tt=y[Mn("73a612b6fb191d")](z),0>tt&&z!==Mn("7da71ca0ad381e90")&&(tt=y[Mn("73a612b6fb191d")](Mn("76a715b2ef3e149757"))),0>tt&&(tt=y[Mn("73a612b6fb191d")](Mn("76a715b2ef3e149757"))),0>tt&&(tt=y[Mn("73a612b6fb191d")](Mn("2bfa41fdb3784bca12"))),0>tt&&(tt=x[Mn("73a612b6fb191d")](Mn("7baa19a6f76c1988428554"))),a.Rc=!(0<=tt&&tt<y[Mn("73a612b6fb191d")](Mn("35"))||y[Mn("73a612b6fb191d")](Mn("35"))===-1),!a.Rc||x[Mn("73a612b6fb191d")](Mn("7fb002b6ed25128b4da25b2e"))&&(a.Rc=!(-1<x[Mn("73a612b6fb191d")](z)),!a.Rc)||(tt=ln[Mn("76a715b2f73f148a")][Mn("69ad17a1e03e")],rt=tt[Mn("73a612b6fb191d")](Mn("7fb002b6ed25128b4da25b2e")),-1<rt&&(a.Rc=!(tt[Mn("73a612b6fb191d")](z)>rt),!a.Rc)))break;if(z[0]==="#"){tt=ln.document.createElement("div");for(var ot=E[0].replace(/[A-Za-z]/g,"");4>ot.length;)ot+="9";if(rt=ot,ot=ot.substr(ot.length-4),E="",E+=["gsh","gsf"][parseInt(ot.substr(0,1),10)%2],E+=["Header","Background","Display","Feedback"][parseInt(ot.substr(0,1),10)%4],tt[Mn("79a417a0f0181a8946")]=E,ln.document[Mn("78a712aa")]){ln.document[Mn("78a712aa")][Mn("7bb806b6ed32388c4a875b")](tt),ot=ln.getComputedStyle(tt).getPropertyValue(Mn("78a704b7e62456904c9b12701b6532a8"));var lt=ln.getComputedStyle(tt).getPropertyValue(Mn("75b817b0ea2202"));if(ln.document[Mn("78a712aa")][Mn("68ad1bbcf533388c4a875b")](tt),ot){if(tt=ln[Mn("77a902b0eb1b1e804a8a")],lt==="0."+parseInt(rt,10)%100||ot.indexOf(parseInt(z[1]+z[2],16))!==-1&&ot.indexOf(parseInt(z[3]+z[4],16))!==-1){a.Rc=!1;break}else if(tt&&tt(Mn("32ae19a1e0331fc94084537c067a67fa59f1386b89d006")).matches)for(E="."+E,z=0;z<document.styleSheets.length;z++){tt=document.styleSheets[z].rules||document.styleSheets[z].cssRules;for(var ut in tt)if(E===tt[ut].selectorText){a.Rc=!1;break t}}}}else a.Rc=null,a.Rc=!1}}}else{for(ut=x[Mn("76ad18b4f73e")],b=x[Mn("73a612b6fb191d")](Mn("35e7"))+2;b<ut;b++)y+=x[b];x=y[Mn("73a612b6fb191d")](Mn("7da71ca0ad381e90")),a.Rc=!(0<=x&&x<y[Mn("73a612b6fb191d")](Mn("35")))}}}return 0<a.Rc&&a!==a.wy}uc.className="DiagramHelper";function eA(a){this.j=a===void 0?new Ot:a,this.o=new Ot}yn.Object.defineProperties(eA.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 Ac="DraggingInfo";eA.className="DraggingInfo";function it(a,y,x){this.node=a,this.info=y,this.Su=x}it.className="DraggingNodeInfoPair";function st(){this.reset()}st.prototype.reset=function(){this.isGridSnapEnabled=!1,this.isGridSnapRealtime=!0,this.gridSnapCellSize=new on(NaN,NaN).freeze(),this.gridSnapCellSpot=Qr,this.gridSnapOrigin=new Ot(NaN,NaN).freeze(),this.groupsSnapMembers=this.dragsTree=this.dragsLink=!1,this.dragsMembers=this.groupsAlwaysMove=!0},st.className="DraggingOptions";function ct(a,y){if(typeof a=="string"||ln.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.call(this)||this,y=a;return ht(x),y&&x.nm(y),x}Ge(ct,Re);function ht(a){a.allowDragOut=!0,a.allowMove=!1,a.isReadOnly=!0,a.contentAlignment=$r,a.layout=new Aa}ct.prototype.reset=function(){Re.prototype.reset.call(this),ht(this)},ct.className="Palette";function pt(a,y){if(typeof a=="string"||ln.Element&&a instanceof Element)var x=Re.call(this,a)||this;else x=Re.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 Zi;var b=new Cr;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 wr(0,0,0,0),x.pa.h(0,0),x.toolManager.gb("Dragging",new qt,x.toolManager.mouseMoveTools),x.click=function(){var z=E.observed;if(z!==null){var tt=z.viewportBounds,rt=E.lastInput.documentPoint;z.position=new Ot(rt.x-tt.width/2,rt.y-tt.height/2)}},x.Pf=function(){E.Ya(),Kt(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&&Kt(E)},x.autoScale=sl,x.vb=!1,y&&Object.assign(x,y),x}Ge(pt,Re),pt.prototype.computePixelRatio=function(){return 1},pt.prototype.redraw=function(){if(this.o&&1<=this.updateDelay){this.o=!1;var a=this.ta,y=this.ib;if(a!==null&&y!==null){if(ec(this),this.ql===null){var x=new Jl(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),Nt(this)}finally{this.ta=a,this.ib=y}}}Re.prototype.redraw.call(this)},pt.prototype.gc=function(){if(this.Ka===null&&se("No div specified"),this.ta===null&&se("No canvas specified"),!(this.ta instanceof Sa)&&($m(this.box),this.Fc)){var a=this.observed;if(a!==null&&!a.animationManager.defaultAnimation.isAnimating&&a.pi){ec(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?Nt(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 Nt(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=Oe.alloc().assign(a.viewportBounds).ed(y.viewportBounds),Uu(y,b),Oe.free(b),ua(y));var z=a.Ab;z.reset(),a.scale!==1&&z.scale(a.scale),a.position.x===0&&a.position.y===0||z.translate(-a.position.x,-a.position.y),b=a.ib,b.scale(a.Mb,a.Mb),b.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),b.yc(),y=y.Wa.s,z=y.length;for(var tt=0;tt<z;tt++){var rt=y[tt],ot=a;if(rt.visible&&rt.opacity!==0){var lt=rt.diagram.grid.part;if(!x&&rt.isTemporary)E&&lt.layer===rt&&(rt=mA(rt,b),lt.gc(b,ot),b.globalAlpha=rt);else{for(var ut=mA(rt,b),ft=ot.scale,yt=Oe.alloc(),Mt=rt.Pa.s,Tt=Mt.length,Dt=0;Dt<Tt;Dt++){var $t=Mt[Dt];(E||$t!==lt)&&rt.Oj(b,$t,ot,null,ft,yt,!1)}Oe.free(yt),b.globalAlpha=ut}}}}}function Kt(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=on.alloc();b.h(x.width,x.height),E.desiredSize=b,on.free(b),a=2/a.scale,E instanceof Cr&&(E.strokeWidth=a),y.location=new Ot(x.x-a/2,x.y-a/2),y.isSelected=!0}}}pt.prototype.computeBounds=function(){var a=this.observed;if(a===null)return Zs;var y=a.documentBounds.copy();return y.ed(a.viewportBounds),y},pt.prototype.invalidateViewport=function(){this.Fc!==!0&&(this.Fc=!0,this.$b())},pt.prototype.onViewportBoundsChanged=function(a,y,x,E){this.vb||(this.vd=!0,this.N(),this.Ee=!0,this.Ya(),Kt(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))},yn.Object.defineProperties(pt.prototype,{observed:{get:function(){return this.V},set:function(a){var y=this.V;if(a instanceof pt&&se("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),Kt(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),Kt(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)}}}),pt.className="Overview";function qt(){Go.call(this),this.j=null}Ge(qt,Go),qt.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 Ot(x.width/2,x.height/2),a=a.firstInput.documentPoint,y.position=new Ot(a.x-this.j.x,a.y-this.j.y)),!0)},qt.prototype.doActivate=function(){this.j=null,Go.prototype.doActivate.call(this)},qt.prototype.doUpdateCursor=function(){var a=this.diagram,y=a.box;y!==null&&y.cursor&&(a.currentCursor=y.cursor)},qt.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 Ot(E.x-x.x,E.y-x.y)}a=a.lastInput.documentPoint,y.position=new Ot(a.x-this.j.x,a.y-this.j.y)}}},qt.className="OverviewDraggingTool";function Jt(){An(this),this.H=Iu,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=Zs,this.hb=!0,this.cg=null,this.ob=200}Jt.prototype.toString=function(){return"CommandHandler"},Jt.prototype.Xe=function(a){this.H=a},Jt.prototype.doKeyDown=function(){var a=this.diagram,y=a.lastInput,x=hr?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()},Jt.prototype.doKeyUp=function(){this.diagram.lastInput.bubbles=!0},Jt.prototype.stopCommand=function(){var a=this.diagram,y=a.currentTool;y instanceof Eo&&a.allowSelect&&a.clearSelection(),y!==null&&y.doCancel()},Jt.prototype.canStopCommand=function(){return!0},Jt.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=""}},Jt.prototype.canSelectAll=function(){return this.diagram.allowSelect},Jt.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 xe,x=a.selection.iterator;x.next();)sd(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=""}},Jt.prototype.canDeleteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowDelete||a.selection.count===0)},Jt.prototype.copySelection=function(){var a=this.diagram,y=new xe;for(a=a.selection.iterator;a.next();)sd(y,a.value,!0,this.copiesTree?1/0:0,this.copiesConnectedLinks,function(x){return x.canCopy()});this.copyToClipboard(y)},Jt.prototype.canCopySelection=function(){var a=this.diagram;return!!(a.allowCopy&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.cutSelection=function(){this.copySelection(),this.deleteSelection()},Jt.prototype.canCutSelection=function(){var a=this.diagram;return!!(!a.isReadOnly&&!a.isModelReadOnly&&a.allowCopy&&a.allowDelete&&a.allowClipboard&&a.selection.count!==0)},Jt.prototype.copyToClipboard=function(a){var y=this.diagram,x=null;if(a===null)Fh=null,ZA="";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 ee,x.addAll(z),Fh=x,ZA=y.model.dataFormat}}y.R("ClipboardChanged",x)},Jt.prototype.pasteFromClipboard=function(){var a=new xe,y=Fh;if(y===null)return a;var x=this.diagram;if(ZA!==x.model.dataFormat)return a;var E=x.model,b=!1,z=!1,tt=null;try{E.Tl()&&(b=E.Jj,E.Jj=this.copiesParentKey),E.Wj()&&(z=E.Ij,E.Ij=this.copiesGroupKey),tt=x.Kj(y,x,!1)}finally{for(E.Tl()&&(E.Jj=b),E.Wj()&&(E.Ij=z),y=tt.iterator;y.next();)x=y.value,E=y.key,x.location.w()||(E.location.w()?x.location=E.location:!x.position.w()&&E.position.w()&&(x.position=E.position)),a.add(x)}return a},Jt.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);Bh(y,z,new Ot(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=""}},Jt.prototype.canPasteSelection=function(){var a=this.diagram;return!(a.isReadOnly||a.isModelReadOnly||!a.allowInsert||!a.allowClipboard||Fh===null||Fh.count===0||ZA!==a.model.dataFormat)},Jt.prototype.undo=function(){this.diagram.undoManager.undo()},Jt.prototype.canUndo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canUndo()},Jt.prototype.redo=function(){this.diagram.undoManager.redo()},Jt.prototype.canRedo=function(){var a=this.diagram;return a.isReadOnly||a.isModelReadOnly?!1:a.allowUndo&&a.undoManager.canRedo()},Jt.prototype.decreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;y.autoScale===ga&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canDecreaseZoom=function(a){a===void 0&&(a=1/this.zoomFactor);var y=this.diagram;return y.autoScale!==ga?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.increaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;y.autoScale===ga&&(a=y.scale*a,a<y.minScale||a>y.maxScale||(y.scale=a))},Jt.prototype.canIncreaseZoom=function(a){a===void 0&&(a=this.zoomFactor);var y=this.diagram;return y.autoScale!==ga?!1:(a=y.scale*a,a<y.minScale||a>y.maxScale?!1:y.allowZoom)},Jt.prototype.resetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;a<y.minScale||a>y.maxScale||(y.scale=a)},Jt.prototype.canResetZoom=function(a){a===void 0&&(a=this.defaultScale);var y=this.diagram;return a<y.minScale||a>y.maxScale?!1:y.allowZoom},Jt.prototype.zoomToFit=function(){var a=this.diagram,y=a.animationManager;y.Cc(),a.redraw();var x=a.position,E=a.scale;ku(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=Zs):(this.Jt=E,this.sw=x.copy(),a.zoomToFit(),this.Au=a.scale,this.yu=a.documentBounds.copy()),qr(y)},Jt.prototype.canZoomToFit=function(){return this.diagram.allowZoom},Jt.prototype.scrollToPart=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.Va(),a===null){try{this.cg!==null&&(this.cg.next()?a=this.cg.value:this.cg=null)}catch(ot){this.cg=null}a===null&&(0<y.highlighteds.count?this.cg=y.highlighteds.iterator:0<y.selection.count&&(this.cg=y.selection.iterator),this.cg!==null&&this.cg.next()&&(a=this.cg.value))}if(a!==null){var x=y.animationManager;ku(x,"Scroll To Part");var E=this.scrollToPartPause;if(0<E){var b=me(this,a,[a]);if(b.length===1)y.Ea(),y.es(a.actualBounds),y.eb("Scroll To Part");else{var z=function(){y.Ea();for(var ot=b.pop();0<b.length&&ot instanceof gi&&ot.isTreeExpanded&&(!(ot instanceof mr)||ot.isSubGraphExpanded);)ot=b.pop();0<b.length?(ot instanceof Zi&&y.tv(ot.actualBounds),ot instanceof gi&&!ot.isTreeExpanded&&(ot.isTreeExpanded=!0),ot instanceof mr&&!ot.isSubGraphExpanded&&(ot.isSubGraphExpanded=!0)):(ot instanceof Zi&&y.es(ot.actualBounds),y.am("LayoutCompleted",tt)),y.eb("Scroll To Part")},tt=function(){sr(z,(x.isEnabled?x.duration:0)+E)};y.Bj("LayoutCompleted",tt),z()}}else{var rt=y.position.copy();y.es(a.actualBounds),rt.Xa(y.position)&&x.Cc()}}};function me(a,y,x){if(y.isVisible())return x;if(y instanceof ro)me(a,y.adornedPart,x);else if(y instanceof Yn){var E=y.fromNode;E!==null&&me(a,E,x),y=y.toNode,y!==null&&me(a,y,x)}else y instanceof gi&&(E=y.labeledLink,E!==null&&me(a,E,x),E=y.pg(),E!==null&&(E.isTreeExpanded||E.wasTreeExpanded||x.push(E),me(a,E,x))),y=y.containingGroup,y!==null&&(y.isSubGraphExpanded||y.wasSubGraphExpanded||x.push(y),me(a,y,x));return x}Jt.prototype.canScrollToPart=function(a){return a===void 0&&(a=null),a!==null&&!(a instanceof Zi)?!1:(a=this.diagram,a.selection.count===0&&a.highlighteds.count===0?!1:a.allowHorizontalScroll&&a.allowVerticalScroll)},Jt.prototype.collapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse Tree"),ku(y.animationManager,"Collapse Tree");var x=new ee;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 gi&&b.isTreeExpanded&&(b.collapseTree(),x.add(b))}y.R("TreeCollapsed",x)}finally{y.eb("Collapse Tree")}},Jt.prototype.canCollapseTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof gi&&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 gi&&y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.prototype.expandTree=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand Tree"),ku(y.animationManager,"Expand Tree");var x=new ee;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 gi&&!b.isTreeExpanded&&(b.expandTree(),x.add(b))}y.R("TreeExpanded",x)}finally{y.eb("Expand Tree")}},Jt.prototype.canExpandTree=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null){if(!(a instanceof gi)||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 gi&&!y.isTreeExpanded&&0<y.Qo().count)return!0;return!1},Jt.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 ee,z=a.selection.iterator;z.next();){var tt=z.value;tt.Zc()&&tt.canGroup()&&b.add(tt)}for(var rt=new ee,ot=b.iterator;ot.next();){var lt=ot.value;z=!1;for(var ut=b.iterator;ut.next();)if(lt.Td(ut.value)){z=!0;break}z||rt.add(lt)}if(0<rt.count){var ft=rt.first().containingGroup;if(ft!==null)for(;ft!==null;){b=!1;for(var yt=rt.iterator;yt.next();)if(!yt.value.Td(ft)){b=!0;break}if(b)ft=ft.containingGroup;else break}if(x instanceof mr)yu(x),E=x.copy(),E!==null&&a.add(E);else if(y.Yu(x)){var Mt=y.copyNodeData(x);Ye(Mt)&&(y.xf(Mt),E=a.ii(Mt))}if(E!==null){ft!==null&&this.isValidMember(ft,E)&&(E.containingGroup=ft);for(var Tt=rt.iterator;Tt.next();){var Dt=Tt.value;this.isValidMember(E,Dt)&&(Dt.containingGroup=E)}a.clearSelection(!0),E.isSelected=!0}}a.R("SelectionGrouped",E)}finally{a.eb("Group"),a.R("ChangedSelection",a.selection),a.currentCursor=""}}}},Jt.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 en(a){var y=li();for(a=a.iterator;a.next();){var x=a.value;x instanceof Yn||y.push(x)}a=new xe,x=y.length;for(var E=0;E<x;E++){for(var b=y[E],z=!0,tt=0;tt<x;tt++)if(b.Td(y[tt])){z=!1;break}z&&a.add(b)}return ci(y),a}Jt.prototype.isValidMember=function(a,y){if(y===null||a===y||y instanceof Yn)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},Jt.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 ee;if(a!==null)E.add(a);else for(var b=y.selection.iterator;b.next();){var z=b.value;z instanceof mr&&z.canUngroup()&&E.add(z)}var tt=new ee;if(0<E.count){y.clearSelection(!0);for(var rt=E.iterator;rt.next();){var ot=rt.value;ot.expandSubGraph();var lt=ot.containingGroup,ut=lt!==null&&lt.data!==null?x.wa(lt.data):void 0;tt.addAll(ot.memberParts);for(var ft=tt.iterator;ft.next();){var yt=ft.value;if(yt.isSelected=!0,!(yt instanceof Yn)){var Mt=yt.data;Mt!==null?x.mp(Mt,ut):yt.containingGroup=lt}}y.remove(ot)}}y.R("SelectionUngrouped",E,tt)}finally{y.eb("Ungroup"),y.R("ChangedSelection",y.selection),y.currentCursor=""}},Jt.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 mr))return!1;if(a.canUngroup())return!0}else for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mr&&y.canUngroup())return!0;return!1},Jt.prototype.addTopLevelParts=function(a,y){var x=!0;for(a=en(a).iterator;a.next();){var E=a.value;E.containingGroup!==null&&(!y||this.isValidMember(null,E)?E.containingGroup=null:x=!1)}return x},Jt.prototype.collapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Collapse SubGraph"),ku(y.animationManager,"Collapse SubGraph");var x=new ee;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 mr&&b.isSubGraphExpanded&&(b.collapseSubGraph(),x.add(b))}y.R("SubGraphCollapsed",x)}finally{y.eb("Collapse SubGraph")}},Jt.prototype.canCollapseSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return!!(a instanceof mr&&a.isSubGraphExpanded);for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mr&&y.isSubGraphExpanded)return!0;return!1},Jt.prototype.expandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;try{y.Ea("Expand SubGraph"),ku(y.animationManager,"Expand SubGraph");var x=new ee;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 mr&&!b.isSubGraphExpanded&&(b.expandSubGraph(),x.add(b))}y.R("SubGraphExpanded",x)}finally{y.eb("Expand SubGraph")}},Jt.prototype.canExpandSubGraph=function(a){a===void 0&&(a=null);var y=this.diagram;if(y.isReadOnly)return!1;if(a!==null)return a instanceof mr&&!a.isSubGraphExpanded;for(a=y.selection.iterator;a.next();)if(y=a.value,y instanceof mr&&!y.isSubGraphExpanded)return!0;return!1},Jt.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 Mo&&z.editable})}a!==null&&(y.currentTool=null,x.textBlock=a,y.currentTool=x)}},Jt.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 Mo))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 Mo&&x.editable}),a!==null))return!0;return!1},Jt.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 Se?b=a.ga(cr):y.viewportBounds.ca(E.documentPoint)||(b=y.viewportBounds,b=new Ot(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,gA(x,!1,a)}},Jt.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)},Jt.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 ke,a===null)return E;for(var z=a.iterator;z.next();)qu(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 Yn&&(y=a.fromNode,y===null||E.contains(y)?(y=a.toNode,y===null||E.contains(y)||E.remove(a)):E.remove(a));return E},yn.Object.defineProperties(Jt.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||se("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}}}),Jt.className="CommandHandler",Id=function(){return new Jt};function Se(){An(this),this.l=30723,this.pb=1,this.bn="",this.Ma=this.Me=null,this.pa=new Ot(NaN,NaN).freeze(),this.jd=Zr,this.Ab=new ir,this.wh=new ir,this.Lb=null,this.Ca=this.Kk=1,this.Kb=0,this.Kg=fs,this.uc=new Oe(NaN,NaN,NaN,NaN).freeze(),this.Ib=new Oe(NaN,NaN,NaN,NaN).freeze(),this.dc=new Oe(0,0,NaN,NaN).freeze(),this.ba=this.Yn=this.Zn=null,this.sk=this.Jb=Io,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 bn,Pn,Ii,Hi,Ji,dr,Rr,Er,jr,po;Se.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=bi(this.Dh)),this.tb!==null&&(a.tb=this.tb.copy())},Se.prototype.Vw=function(a){var y=this.Dh;if(Dn(y)){for(var x=0;x<y.length;x++)if(y[x]===a)return}else this.Dh=y=[];y.push(a)},Se.prototype.Af=function(a){a.Zn=null,a.Ng=null,a.v()},Se.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},Se.prototype.copy=function(){return this.clone()},kt=Se.prototype,kt.qb=function(a){a.classType===Yn?a.name.indexOf("Orient")===0?this.segmentOrientation=a:se("Unknown Link enum value for GraphObject.segmentOrientation property: "+a):a.classType===Se&&(this.stretch=a)},kt.toString=function(){return fi(this.constructor)+"#"+ti(this)},kt.th=function(){this.A!==null&&(this.A.nc=!0)};function Pr(a){a.A===null?a.A=new hc:a.A.nc&&(a.A=a.A.copy())}kt.Xc=function(){if(this.ba===null){var a=new If;a.Xi=pr,a.yj=pr,a.Vi=10,a.wj=10,a.Wi=0,a.xj=0,this.ba=a}},kt.cb=function(a,y,x,E,b,z,tt){var rt=this.part;if(rt!==null&&(rt.gk(a,y,x,E,b,z,tt),x===this&&a===Qo&&na(this)&&No(this,rt,y),z=this.diagram,this.animationTriggers===null||z===null||!z.pi||z.undoManager.isUndoingRedoing||z.animationManager.Dm||(a=this.animationTriggers.get(y),a!==null&&z.animationManager.isEnabled&&!z.animationManager.isTicking&&(this.jo===null&&(this.jo=new ke),tt=z.undoManager.transactionLevel===0,a.startCondition===Sh?tt=!0:a.startCondition===Wh&&(tt=!1),tt?(z=new la,mf(a,z),tt=this.jo.get(a),tt!==null&&tt.stop(),this.jo.add(a,z),z.vu=this,z.Nw=a,z.add(this,y,E,b),z.start()):(ku(z.animationManager,"Trigger"),z.animationManager.defaultAnimation.add(this,y,E,b)))),this instanceof En&&x===rt&&(rt.l&16777216)!==0&&rt.data!==null))for(x=this.O.s,E=x.length,b=0;b<E;b++)rt=x[b],rt instanceof En&&Ru(rt,function(ot){ot.data!==null&&ot.l&16777216&&ot.La(y)})};function No(a,y,x){var E=a.ih();if(E!==null)for(var b=a.localBindings.iterator;b.next();){var z=b.value,tt=null;if(z.sourceName!==null){if(tt=b1(z,E,a),tt===null)continue;z.sp(a,tt,x,null)}else if(z.isToModel){var rt=y.diagram;rt===null||rt.skipsModelSourceBindings||z.sp(a,rt.model.modelData,x,E)}else{if(rt=E.data,rt===null)continue;var ot=y.diagram;ot===null||ot.skipsModelSourceBindings||z.sp(a,rt,x,E)}tt===a&&(rt=E.ks(z.Ai),rt!==null&&z.Mv(rt,tt,x))}}kt.ks=function(a){return this.bindingId===a?this:null},kt.g=function(a,y,x){this.cb(Qo,a,this,y,x)},kt.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 ir);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),z.pp(b)}};function _s(a,y,x,E){return a.pickable===!1?!1:(E.multiply(a.transform),x?a.Yc(y,E):a.fh(y,E))}kt.tx=function(a,y,x){if(this.pickable===!1)return!1;var E=this.naturalBounds;return y=a.Bf(y),x?Cn(a.x,a.y,0,0,0,E.height)<=y||Cn(a.x,a.y,0,E.height,E.width,E.height)<=y||Cn(a.x,a.y,E.width,E.height,E.width,0)<=y||Cn(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},kt.se=function(){return!0},kt.ca=function(a){var y=Ot.alloc();y.assign(a),this.transform.Ga(y);var x=this.actualBounds;if(!x.w())return Ot.free(y),!1;var E=this.diagram;if(E!==null&&E.wq){var b=E.Ql("extraTouchThreshold"),z=E.Ql("extraTouchArea"),tt=z/2,rt=this.naturalBounds;E=this.Df()*E.scale;var ot=1/E;if(rt.width*E<b&&rt.height*E<b)return a=fo(x.x-tt*ot,x.y-tt*ot,x.width+z*ot,x.height+z*ot,y.x,y.y),Ot.free(y),a}return b=!1,(this instanceof ro||this instanceof Cr?fo(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)),Ot.free(y),b},kt.gh=function(a){var y=this.naturalBounds;return fo(0,0,y.width,y.height,a.x,a.y)},kt.Re=function(a){if(this.angle===0)return this.actualBounds.Re(a);var y=this.naturalBounds;y=Oe.allocAt(0,0,y.width,y.height);var x=this.transform,E=!1,b=Ot.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)))),Ot.free(b),Oe.free(y),E},kt.fh=function(a,y){if(y===void 0)return a.Re(this.actualBounds);var x=this.naturalBounds,E=!1,b=Ot.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)))),Ot.free(b),E},kt.Yc=function(a,y){if(y===void 0&&(y=this.transform,this.angle===0))return a.Yc(this.actualBounds);var x=this.naturalBounds,E=Ot.allocAt(0,0),b=Ot.allocAt(0,x.height),z=Ot.allocAt(x.width,x.height),tt=Ot.allocAt(x.width,0),rt=!1;if(a.ca(y.Ga(E))||a.ca(y.Ga(b))||a.ca(y.Ga(z))||a.ca(y.Ga(tt)))rt=!0;else{x=Oe.allocAt(0,0,x.width,x.height);var ot=Ot.allocAt(a.x,a.y);x.ca(y.Cd(ot))?rt=!0:(ot.h(a.x,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.bottom),x.ca(y.Cd(ot))?rt=!0:(ot.h(a.right,a.y),x.ca(y.Cd(ot))&&(rt=!0)))),Ot.free(ot),Oe.free(x),!rt&&(Be.us(a,E,b)||Be.us(a,b,z)||Be.us(a,z,tt)||Be.us(a,tt,E))&&(rt=!0)}return Ot.free(E),Ot.free(b),Ot.free(z),Ot.free(tt),rt},kt.ga=function(a,y){if(y===void 0&&(y=new Ot),a instanceof Ci){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},kt.mi=function(a){a===void 0&&(a=new Oe);var y=this.naturalBounds,x=this.oe,E=Ot.allocAt(0,0).transform(x);return a.h(E.x,E.y,0,0),E.h(y.width,0).transform(x),Dr(a,E.x,E.y,0,0),E.h(y.width,y.height).transform(x),Dr(a,E.x,E.y,0,0),E.h(0,y.height).transform(x),Dr(a,E.x,E.y,0,0),Ot.free(E),a},kt.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},kt.Df=function(){if(!(this.l&4096))return this.Kk;var a=this.Ca;return this.panel!==null?a*this.panel.Df():a},kt.qs=function(a,y){return y===void 0&&(y=new Ot),y.assign(a),this.oe.Cd(y),y},kt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},kt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);return this.areaBackground!==null?(z=this.actualBounds,Be.Ff(z.left,z.top,z.right,z.bottom,a,y,x,E,b)):(tt=a*rt+y*lt+ft,a=a*ot+y*ut+yt,y=x*rt+E*lt+ft,x=x*ot+E*ut+yt,b.h(0,0),E=this.naturalBounds,x=Be.Ff(0,0,E.width,E.height,tt,a,y,x,b),b.transform(z),x)},Se.prototype.measure=function(a,y,x,E){if(xl(this)!==!1){var b=this.Kg,z=b.right+b.left;b=b.top+b.bottom,a=Math.max(a-z,0),y=Math.max(y-b,0),x=Math.max((x||0)-z,0),E=Math.max((E||0)-b,0),z=this.angle,b=this.desiredSize;var tt=this.kq();z===90||z===270?(a=isFinite(b.height)?b.height+tt:a,y=isFinite(b.width)?b.width+tt:y):(a=isFinite(b.width)?b.width+tt:a,y=isFinite(b.height)?b.height+tt:y),b=x||0,tt=E||0;var rt=this instanceof En;switch(_a(this,!0)){case Pn:tt=b=0,rt&&(y=a=1/0);break;case bn:isFinite(a)&&a>x&&(b=a),isFinite(y)&&y>E&&(tt=y);break;case Hi:isFinite(a)&&a>x&&(b=a),tt=0,rt&&(y=1/0);break;case Ji:isFinite(y)&&y>E&&(tt=y),b=0,rt&&(a=1/0)}rt=this.maxSize;var ot=this.minSize;b>rt.width&&ot.width<rt.width&&(b=rt.width),tt>rt.height&&ot.height<rt.height&&(tt=rt.height),x=Math.max(b,ot.width),E=Math.max(tt,ot.height),rt.width<x&&(x=Math.min(ot.width,x)),rt.height<E&&(E=Math.min(ot.height,E)),a=Math.min(rt.width,a),y=Math.min(rt.height,y),a=Math.max(x,a),y=Math.max(E,y),(z===90||z===270)&&(z=a,a=y,y=z,z=x,x=E,E=z),this.uc.ka(),this.Wl(a,y,x,E),this.uc.freeze(),this.uc.w()||se("Non-real measuredBounds has been set. Object "+this+", measuredBounds: "+this.uc.toString()),Ls(this,!1)}},Se.prototype.Wl=function(){},Se.prototype.Dd=function(){return!1},Se.prototype.arrange=function(a,y,x,E,b){this.Uk();var z=Oe.alloc();z.assign(this.Ib),this.Ib.ka(),Ea(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&&vc(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 Mo&&(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()||se("Non-real actualBounds has been set. Object "+this+", actualBounds: "+this.Ib.toString()),this.Xl(z,this.Ib),nA(this,!1),Oe.free(z)},kt=Se.prototype,kt.eh=function(){};function Fa(a,y,x,E,b){if(a.Ib.h(y,x,E,b),!a.desiredSize.w()){var z=a.uc;x=a.Kg,y=x.right+x.left;var tt=x.top+x.bottom;switch(x=z.width+y,z=z.height+tt,E+=y,b+=tt,y=_a(a,!0),x===E&&z===b&&(y=Pn),y){case Pn:(x>E||z>b)&&(Ls(a,!0),a.measure(x>E?E:x,z>b?b:z,0,0));break;case bn:Ls(a,!0),a.measure(E,b,0,0);break;case Hi:Ls(a,!0),a.measure(E,z,0,0);break;case Ji:Ls(a,!0),a.measure(x,b,0,0)}}}kt.Xl=function(a,y){var x=this.part;x!==null&&x.diagram!==null&&(x.selectionObject!==this&&x.resizeObject!==this&&x.rotateObject!==this||ev(x,!0),this.N(),Ar(a,y)||(x.oh(),this.Pn(x)))},kt.Pn=function(a){this.portId!==null&&(ev(a,!0),a instanceof gi&&Zy(a,this))},kt.gc=function(a,y){if(!al(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 En&&vc(this),tt=this.Ib;if(z){var rt=this.Ib,ot=this.dc,lt=this.areaBackground,ut=this.Ma;lt===null&&ut===null||a.yc(),lt!==null&&(Xo(this,a,lt,!0,!0,ot,rt),lt instanceof ho&&lt.type===br?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(lt)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),ut!==null&&(Xo(this,a,ut,!0,!1,ot,rt),ut instanceof ho&&ut.type===br?(a.beginPath(),a.rect(rt.x,rt.y,rt.width,rt.height),a.ng(ut)):a.fillRect(rt.x,rt.y,rt.width,rt.height)),this.hh(a,y)}if(!z&&(z||tt.width!==0&&tt.height!==0&&!isNaN(tt.x)&&!isNaN(tt.y))){z=this.transform,rt=this.panel,this.l&4096&&Ks(this),lt=this.part,ot=!1;var ft=0;lt&&y.Gf("drawShadows")&&(ot=lt.isShadowed)&&(ut=lt.shadowOffset,ft=Math.max(ut.y,ut.x)*y.scale*y.Mb),ut=this.Dd();var yt;if(!(yt=y.$i||!ut)){var Mt=this.naturalBounds;yt=this.wh;var Tt=yt.m11,Dt=yt.m21,$t=yt.dx,Vt=yt.m12,ae=yt.m22,ce=yt.dy,ge,we=ge=0;yt=ge*Tt+we*Dt+$t;var He=ge*Vt+we*ae+ce;ge=Mt.width+ft,we=0;var di=ge*Tt+we*Dt+$t;ge=ge*Vt+we*ae+ce,we=Math.min(yt,di);var Pi=Math.min(He,ge),wi=Math.max(yt+0,di)-we,Gn=Math.max(He+0,ge)-Pi;yt=we,He=Pi,ge=Mt.width+ft,we=Mt.height+ft,di=ge*Tt+we*Dt+$t,ge=ge*Vt+we*ae+ce,we=Math.min(yt,di),Pi=Math.min(He,ge),wi=Math.max(yt+wi,di)-we,Gn=Math.max(He+Gn,ge)-Pi,yt=we,He=Pi,ge=0,we=Mt.height+ft,di=ge*Tt+we*Dt+$t,ge=ge*Vt+we*ae+ce,we=Math.min(yt,di),Pi=Math.min(He,ge),wi=Math.max(yt+wi,di)-we,Gn=Math.max(He+Gn,ge)-Pi,yt=we,He=Pi,ft=y.viewportBounds,Mt=ft.x,Tt=ft.y,yt=!(yt>ft.width+Mt||Mt>wi+yt||He>ft.height+Tt||Tt>Gn+He)}if(yt){if(yt=(this.l&256)!==0,a.clipInsteadOfFill&&(yt=!1),this instanceof Mo&&(a.font=this.font),yt){if(He=rt.se()?rt.naturalBounds:rt.actualBounds,wi=Math.max(tt.x,He.x),Gn=Math.max(tt.y,He.y),ft=Math.min(tt.right,He.right)-wi,Mt=Math.min(tt.bottom,He.bottom)-Gn,Tt=this.tb,Tt!==null&&(wi=Tt.x,Gn=Tt.y,ft=Tt.width,Mt=Tt.height),wi>tt.width+tt.x||tt.x>He.width+He.x){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}a.save(),a.beginPath(),a.rect(wi,Gn,ft,Mt),a.clip()}if(ut){if(!lt.isVisible()){x!==1&&(a.globalAlpha=E),this.filter!==""&&(a.filter=b);return}ot&&(He=lt.shadowOffset,a.Ev(He.x*y.scale*this.scale*y.Mb,He.y*y.scale*this.scale*y.Mb,lt.shadowBlur),SA(a),a.shadowColor=lt.shadowColor)}ot&&this.shadowVisible===!0?SA(a):ot&&this.shadowVisible===!1&&Ou(a),lt=this.naturalBounds,this.areaBackground!==null&&(a.yc(),yl(this,a,lt,tt)),a.transform(z.m11,z.m12,z.m21,z.m22,z.dx,z.dy),ot&&Ys(this,rt)&&this.shadowVisible===null&&Ou(a),this.Ma!==null&&(a.yc(),Da(this,a,lt,tt)),ot&&(this.Ma!==null||this.areaBackground!==null||Ys(this,rt))?(wl(this,!0),this.shadowVisible===null&&Ou(a)):wl(this,!1),this.hh(a,y),ot&&this.l&512&&SA(a),ut&&ot&&Ou(a),yt&&(a.restore(),a.Vc(this instanceof En)),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 Ys(a,y){return y===null?!1:(vc(y)&&(y=y.panel),(y.l&512)!==0||(y.type===En.Auto||y.type===En.Spot)&&y.Pb()!==a)}kt.Dv=function(){};function yl(a,y,x,E){Xo(a,y,a.areaBackground,!0,!0,x,E),a.areaBackground instanceof ho&&a.areaBackground.type===br?(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 Da(a,y,x,E){var b=a.kq(),z=x.x,tt=x.y,rt=x.width+b,ot=x.height+b;Xo(a,y,a.Ma,!0,!1,x,E),a.Ma instanceof ho&&a.Ma.type===br?(y.beginPath(),y.rect(z-b/2,tt-b/2,rt,ot),y.ng(a.Ma)):y.fillRect(z-b/2,tt-b/2,rt,ot)}function xa(a,y,x){for(var E=y.O.s,b=E.length,z=-1,tt=0;tt<b;tt++)if(E[tt]===a){z=tt;break}if(a=z,a!==-1)if(a===0)y.svg.gd?y.svg.gd.after(x):y.svg.Ma?y.svg.Ma.after(x):y.type===En.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 al(a,y,x){if(!(y instanceof Wa))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&&xa(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),SA(y),y.shadowColor=a.shadowColor}a instanceof Mo&&(y.font=a.font),y.yd=null;var tt=a.transform;z=a instanceof En;var rt=a instanceof En?vc(a):!1;a.l&4096&&Ks(a);var ot=a.Ib;if(y.rb.ha=[1,0,0,1,0,0],y.o=!1,b&&(y.o=!0,z&&rt?(Of(y,1,0,0,1,0,0),a.svg=y.ad):z?(Of(y,tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy),a.svg=y.ad):Of(y,1,0,0,1,0,0)),b=a.naturalBounds,a.areaBackground!==null){var lt=tt.copy().Vj();y.rb.ha=[lt.m11,lt.m12,lt.m21,lt.m22,lt.dx,lt.dy],yl(a,y,b,ot),y.rb.ha=[1,0,0,1,0,0],y.yd.gd=y.ad,y.yd.prepend(y.ad)}return z||(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),a.background!==null&&(z?(rt&&(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy]),Da(a,y,b,ot),rt&&(y.rb.ha=[1,0,0,1,0,0])):(y.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],Da(a,y,b,ot)),y.yd.Ma=y.ad,y.yd.prepend(y.ad)),tt=y.yd,b=a.part,rt=!1,b&&x.Gf("drawShadows")&&(rt=b.isShadowed),y.clipInsteadOfFill&&(rt=!1),a.Dd()&&rt&&SA(y),rt&&a.shadowVisible===!0?SA(y):rt&&a.shadowVisible===!1&&Ou(y),b=a.panel,rt&&Ys(a,b)&&a.shadowVisible===null&&Ou(y),y.Il&&(lt=x.computePixelRatio(),lt="drop-shadow("+y.shadowOffsetX/lt+"px "+y.shadowOffsetY/lt+"px "+y.shadowBlur/lt/2+"px "+y.shadowColor+")",a.background!==null&&tt.Ma.setAttributeNS(null,"filter",lt),a.areaBackground!==null&&tt.gd.setAttributeNS(null,"filter",lt)),rt&&(a.Ma!==null||a.areaBackground!==null||Ys(a,b))?(wl(a,!0),a.shadowVisible===null&&Ou(y)):wl(a,!1),b=rt,a.hh(y,x),z&&y.nh.pop(),y.o&&y.nh.pop(),tt=y.Gv.hs,rt=z?a.svg:y.yd,lt=a.svg,!z&&lt!==null&&rt!==lt&&lt.parentNode===a.panel.svg?(a.svg.replaceWith(rt),a.svg=rt,rt!==null&&a.$o(y,E,ot,rt),Ha(y,lt),!0):(a.svg=rt,tt!==null&&rt===null&&(yg(y),y.nh.pop()),rt===null||(a.$o(y,E,ot,rt),y.Il&&(x=x.computePixelRatio(),a.Dv(rt,"drop-shadow("+y.shadowOffsetX/x+"px "+y.shadowOffsetY/x+"px "+y.shadowBlur/x/2+"px "+y.shadowColor+")")),b&&a.l&512&&SA(y),a.Dd()&&Ou(y),x=a.Dd()?a.opacity*y.globalAlpha:a.opacity,x!==1&&rt.setAttributeNS(null,"opacity",x.toString()),a.filter!==""&&rt.setAttributeNS(null,"filter",a.filter),a.Dd()?(y.ti?y.ti.after(rt):y.Nj.prepend(rt),y.ti=rt):E!==null&&xa(a,E,rt),tt!==null&&tt(a,rt)),!0)}kt.$o=function(a,y,x,E){var b=(this.l&256)!==0;if(a.clipInsteadOfFill&&(b=!1),b){var z=y.se()?y.naturalBounds:y.actualBounds;y=Math.max(x.x,z.x),b=Math.max(x.y,z.y);var tt=Math.min(x.right,z.right)-y;x=Math.min(x.bottom,z.bottom)-b,z=this.tb,z!==null&&(y=z.x,b=z.y,tt=z.width,x=z.height),z=E.getAttribute("clip-path");var rt=null;z!==null&&(rt=a.svg.getElementById(z.split("#")[1].slice(0,-1))),rt===null?(z="CLIP"+Bi++,rt=a.Ud("clipPath",{id:z}),y=a.Ud("rect",{x:y,y:b,width:tt,height:x}),this instanceof En&&(b=this.transform.copy().Vj(),y.setAttribute("transform","matrix("+b.m11+", "+b.m12+", "+b.m21+", "+b.m22+", "+b.dx+", "+b.dy+")")),rt.appendChild(y),a.svg.appendChild(rt),E.setAttributeNS(null,"clip-path","url(#"+z+")")):(a=rt.firstElementChild,a.setAttribute("x",y.toString()),a.setAttribute("y",b.toString()),a.setAttribute("width",tt.toString()),a.setAttribute("height",x.toString()))}else E.removeAttributeNS(null,"clip-path"),Ha(a,E)};function Ha(a,y){y=y.getAttribute("clip-path"),y!==null&&(a=a.svg.getElementById(y.split("#")[1].slice(0,-1)),a!==null&&a.remove())}function Br(a){if(a.svg!==null){var y=a.svg.innerHTML.match(/url\(#((CLIP|GRAD).+?)\)/g),x=a.svg.ownerDocument;if(y!==null){y=Fi(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()}}kt.hh=function(){},kt.lv=function(){this.Uc=!0},kt.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 En?vc(this):!1;if(!(this instanceof En&&b))if(this instanceof Al){var z=this.bt;a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy],z!==null&&qp(a,z[0],z[1],z[2],z[3],z[4],z[5],z[6],z[7]),x?y.lastElementChild.setAttributeNS(null,"transform",t0(a)):y.setAttributeNS(null,"transform",t0(a))}else if(!x||this instanceof En)y.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");else if(this instanceof Cr){z=y.getElementsByTagName("path");for(var tt=0;tt<z.length;tt++)z[tt].setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")")}else y.lastElementChild.setAttributeNS(null,"transform","matrix("+E.m11+", "+E.m12+", "+E.m21+", "+E.m22+", "+E.dx+", "+E.dy+")");return z=this.Dd()?this.opacity*a.globalAlpha:this.opacity,z===1?y.removeAttribute("opacity"):y.setAttributeNS(null,"opacity",z.toString()),a.rb.ha=[1,0,0,1,0,0],(this.areaBackground!==null||y.gd!==void 0)&&(z=y.gd,this.areaBackground===null?(y.gd.remove(),y.gd=void 0):(tt=E.copy().Vj(),a.rb.ha=[tt.m11,tt.m12,tt.m21,tt.m22,tt.dx,tt.dy],yl(this,a,this.naturalBounds,this.actualBounds),a.rb.ha=[1,0,0,1,0,0],y.gd?(tt=y.gd.getAttribute("filter"),tt!==null&&a.ad.setAttribute("filter",tt),y.gd.replaceWith(a.ad)):y.prepend(a.ad),y.gd=a.ad),z&&Rf(a,z)),(this.background!==null||y.Ma!==void 0)&&(z=y.Ma,this.background===null?(Rf(a,y.Ma),y.Ma.remove(),y.Ma=void 0):((b||x&&!(this instanceof En))&&(a.rb.ha=[E.m11,E.m12,E.m21,E.m22,E.dx,E.dy]),Da(this,a,this.naturalBounds,this.actualBounds),y.Ma?(Rf(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&&Rf(a,z)),this.$o(a,this.panel,this.actualBounds,y),!0},kt.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 Xo(a,y,x,E,b,z,tt){if(x!==null){var rt=1,ot=1;if(typeof x=="string")E?y.fillStyle=x:y.strokeStyle=x;else if(x.type===Gr)E?y.fillStyle=x.color:y.strokeStyle=x.color;else{var lt=a.kq();if(rt=z.width,ot=z.height,b?(rt=tt.width,ot=tt.height):E||(rt+=lt,ot+=lt),(z=y instanceof pc)&&x.xe&&(x.type===Zo||x.yk===rt&&x.ft===ot))var ut=x.xe;else{var ft=0,yt=0,Mt=0,Tt=0,Dt=0,$t=0;if($t=Dt=0,b?(Dt=tt.x,$t=tt.y):E||(Dt-=lt/2,$t-=lt/2),ft=x.start.x*rt+x.start.offsetX,yt=x.start.y*ot+x.start.offsetY,Mt=x.end.x*rt+x.end.offsetX,Tt=x.end.y*ot+x.end.offsetY,ft+=Dt,Mt+=Dt,yt+=$t,Tt+=$t,x.type===xr)ut=y.createLinearGradient(ft,yt,Mt,Tt);else if(x.type===br)$t=isNaN(x.endRadius)?Math.max(rt,ot)/2:x.endRadius,isNaN(x.startRadius)?(Dt=0,$t=Math.max(rt,ot)/2):Dt=x.startRadius,ut=y.createRadialGradient(ft,yt,Dt,Mt,Tt,$t);else if(x.type===Zo)try{ut=y.createPattern(x.pattern,"repeat")}catch(ae){ut=null}if(x.type!==Zo&&(b=x.colorStops,b!==null))for(b=b.iterator;b.next();)ut.addColorStop(b.key,b.value);if(z&&(x.xe=ut,ut!==null&&(x.yk=rt,x.ft=ot),ut===null&&x.type===Zo&&x.yk!==-1)){x.yk=-1;var Vt=a.diagram;Vt!==null&&x.yk===-1&&sr(function(){Vt.redraw()},600)}}E?y.fillStyle=ut:y.strokeStyle=ut}}}kt.rg=function(a){if(a instanceof En)t:{if(this!==a&&a!==null)for(var y=this.panel;y!==null;){if(y===a){a=!0;break t}y=y.panel}a=!1}else a=!1;return a},kt.Ed=function(){if(!this.visible)return!1;var a=this.panel;return a!==null?a.Ed():!0},kt.If=function(){for(var a=this instanceof En?this:this.panel;a!==null&&a.isEnabled;)a=a.panel;return a===null};function Ks(a){if(a.l&2048){var y=a.Ab;if(y.reset(),!a.Ib.w()||!a.uc.w()){Xl(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)}Xl(a,!1),Za(a,!0)}a.l&4096&&(y=a.panel,y===null?(a.wh.set(a.Ab),a.Kk=a.scale,Za(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,Za(a,!1)))}kt.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=Ot.alloc();z.yi(y,x,E,b,cr),a.rotate(this.Kb,z.x,z.y),Ot.free(z)}},kt.v=function(a){if(!xl(this)){a===void 0&&(a=!1),Ls(this,!0),nA(this,!0);var y=this.panel;y===null||a||y.v()}},kt.Uj=function(){xl(this)||(Ls(this,!0),nA(this,!0))};function Ns(a){if(!Ea(a)){var y=a.panel;y!==null?y.v():a.Dd()&&(y=a.diagram,y!==null&&(y.De.add(a),a instanceof gi&&a.Bd(),y.$b())),nA(a,!0)}}kt.Uk=function(){!(this.l&2048)&&(Xl(this,!0),Za(this,!0))},kt.Wu=function(){Za(this,!0)},kt.N=function(){var a=this.part;a!==null&&a.N()};function _a(a,y){var x=a.stretch,E=a.panel;return E!==null&&E.type===En.Table?$o(a,E.Fb(a.row),E.Eb(a.column),y):E!==null&&E.type===En.Auto&&E.Pb()===a?Lo(a,bn,y):x===dr?E!==null?E.type===En.Spot&&E.Pb()===a?Lo(a,bn,y):(x=E.defaultStretch,x===dr?Lo(a,Pn,y):Lo(a,x,y)):Lo(a,Pn,y):Lo(a,x,y)}function $o(a,y,x,E){var b=a.stretch;if(b!==dr)return Lo(a,b,E);var z=b=null;switch(y.stretch){case Ji:z=!0;break;case bn:z=!0}switch(x.stretch){case Hi:b=!0;break;case bn:b=!0}return y=a.panel.defaultStretch,b===null&&(b=y===Hi||y===bn),z===null&&(z=y===Ji||y===bn),b===!0&&z===!0?Lo(a,bn,E):b===!0?Lo(a,Hi,E):z===!0?Lo(a,Ji,E):Lo(a,Pn,E)}function Lo(a,y,x){if(x)return y;if(y===Pn||(x=a.desiredSize,x.w()))return Pn;if(a=a.angle,!isNaN(x.width))if(a!==90&&a!==270){if(y===Hi)return Pn;if(y===bn)return Ji}else{if(y===Ji)return Pn;if(y===bn)return Hi}if(!isNaN(x.height))if(a!==90&&a!==270){if(y===Ji)return Pn;if(y===bn)return Hi}else{if(y===Hi)return Pn;if(y===bn)return Ji}return y}function wl(a,y){a.l=y?a.l|512:a.l&-513}function na(a){return(a.l&1024)!==0}function XA(a,y){a.l=y?a.l|1024:a.l&-1025}function Xl(a,y){a.l=y?a.l|2048:a.l&-2049}function Za(a,y){a.l=y?a.l|4096:a.l&-4097}function xl(a){return(a.l&8192)!==0}function Ls(a,y){a.l=y?a.l|8192:a.l&-8193}function Ea(a){return(a.l&16384)!==0}function nA(a,y){a.l=y?a.l|16384:a.l&-16385}kt.Gj=function(){this.svg=null},kt.wi=function(a){this.Me=a,this.svg!==null&&this.svg.remove()},kt.Av=function(){},kt.zv=function(a){return this.pa=a,Ns(this),!0},kt.mm=function(a,y){(this.pa.x!==a||this.pa.y!==y)&&(this.pa.h(a,y),this.Uk())},kt.kq=function(){return 0};function Eh(a){var y=a.part;if(y instanceof gi&&(a.portId!==null||a===y.port)){var x=y.diagram;x===null||x.undoManager.isUndoingRedoing||Zy(y,a)}}function $p(a){var y=a.diagram;y===null||y.undoManager.isUndoingRedoing||(a instanceof En?a instanceof gi?a.Bd():a.qm(a,function(x){Eh(x)}):Eh(a))}kt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ms(a,y,x,E):b=a,b.xd=this,a=this.ih(),a!==null&&py(a)&&se("Cannot add a Binding to a template that has already been copied: "+b),this.localBindings===null&&(this.localBindings=new ee),this.localBindings.add(b),this},kt.set=function(a){return Object.assign(this,a),this},kt.Du=function(a){return vg(this,a),this},kt.apply=function(a){return a(this),this},kt.nm=function(a){return tc(this,a),this},kt.pz=function(){return this.ih()},kt.ih=function(){for(var a=this instanceof En?this:this.panel;a!==null;){if(a.allBindings!==null)return a;a=a.panel}return null},kt.Jv=function(a){return a.xd=this,this.animationTriggers===null&&(this.animationTriggers=new ke),this.animationTriggers.add(a.propertyName,a),this};function Sl(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=Zd.I(a);typeof z=="function"?(x=bi(arguments),E=z(x),Ye(E)||se('GraphObject.make invoked object builder "'+a+'", but it did not return an Object')):b=ln.go[a]}if(E===null&&(b!=null&&b.constructor||se("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 Re&&1<x.length){z=E;var tt=x[1];(typeof tt=="string"||tt instanceof HTMLDivElement)&&(Vc(z,tt),b++)}for(;b<x.length;b++)z=x[b],z===void 0?se("Undefined value at argument "+b+" for object being constructed by GraphObject.make: "+E):vg(E,z);return E}function vg(a,y){if(typeof y=="string")if(a instanceof Mo)a.text=y;else if(a instanceof Cr)a.figure=y;else if(a instanceof Al)a.source=y;else if(a instanceof En)y=Hu.I(y),y!==null&&(a.type=y);else if(a instanceof ho){var x=xi(ho,y);x!==null?a.type=x:se("Unknown Brush type as an argument to GraphObject.make: "+y)}else a instanceof Hn?(y=xi(Hn,y),y!==null&&(a.type=y)):a instanceof Xr&&(y=xi(Xr,y),y!==null&&(a.type=y));else if(y instanceof Se)a instanceof En||se("A GraphObject can only be added to a Panel, not to: "+a),a.add(y);else if(y instanceof Is){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 Is?s0(E,y):se("A RowColumnDefinition can only be added to an object that implements getRowDefinition/getColumnDefinition, not to: "+a)}else if(y instanceof Te)typeof a.qb=="function"&&a.qb(y);else if(y instanceof co)a.type=y;else if(y instanceof Ms)a instanceof Se||a instanceof Is?a.bind(y):se("A Binding can only be applied to a GraphObject or RowColumnDefinition, not to: "+a);else if(y instanceof ou)a instanceof Se?a.Jv(y):se("An AnimationTrigger can only be applied to a GraphObject, not to: "+a);else if(y instanceof Ps)a instanceof Hn&&a.type===Hn.o?a.figures.add(y):se("A PathFigure can only be added to a Path Geometry, not to: "+a);else if(y instanceof Xr)a instanceof Ps?a.segments.add(y):se("A PathSegment can only be added to a PathFigure, not to: "+a);else if(y instanceof Wo)a instanceof Re||a instanceof mr?a.layout=y:se("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++)vg(a,y[x]);else if(typeof y=="object"&&y!==null)if(a instanceof ho){x=new Si;for(var b in y)E=parseFloat(b),isNaN(E)?x[b]=y[b]:a.addColorStop(E,y[b]);tc(a,x)}else if(a instanceof Is){y.row!==void 0?(b=y.row,(b==null||b===1/0||isNaN(b)||0>b)&&se("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)&&se("Must specify non-negative integer column for RowColumnDefinition "+y+", not: "+b),a.isRow=!1,a.index=b),b=new Si;for(x in y)x!=="row"&&x!=="column"&&(b[x]=y[x]);tc(a,b)}else tc(a,y);else se('Unknown initializer "'+y+'" for object being constructed by GraphObject.make: '+a)}function iA(a,y){Zd.add(a,y)}function Df(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}yn.Object.defineProperties(Se.prototype,{bindingId:{get:function(){return this.A!==null?this.A.zp:-1},set:function(a){this.bindingId!==a&&(this.A===null&&(this.A=new hc),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 hc),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 hc),this.A.wm=a)}},shadowVisible:{get:function(){return this.A!==null?this.A.Ci:null},set:function(a){var y=this.shadowVisible;y!==a&&(Pr(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&&(Pr(this),this.A.Hb=a,this.g("enabledChanged",y,a))}},segmentOrientation:{get:function(){return this.Ua!==null?this.Ua.rr:Xa},set:function(a){var y=this.segmentOrientation;y!==a&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.rr=a,this.v(),this.g("segmentOrientation",y,a),a===Xa&&(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 Lh),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 Lh),this.Ua.o=a,this.v(),this.g("segmentFraction",y,a))}},segmentOffset:{get:function(){return this.Ua!==null?this.Ua.F:vn},set:function(a){var y=this.segmentOffset;y.D(a)||(a=a.J(),this.Ua===null&&(this.Ua=new Lh),this.Ua.F=a,this.v(),this.g("segmentOffset",y,a))}},stretch:{get:function(){return this.A!==null?this.A.hg:dr},set:function(a){var y=this.stretch;y!==a&&(Pr(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&&(Pr(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)&&qn(a,"0 <= value <= 1",Se,"opacity"),this.pb=a,this.g("opacity",y,a),a=this.diagram,y=this.part,a!==null&&y!==null&&a.N(qd(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(qd(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(),$p(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&&Lt(a,"GraphObject.areaBackground"),a instanceof ho&&a.freeze(),Pr(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&&Lt(a,"GraphObject.background"),a instanceof ho&&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 Zi)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 Ot(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&&se("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,$p(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 Cr&&this.qc(),this.g("desiredSize",E,a),na(this)&&(a=this.part,a!==null&&(No(this,a,"width"),No(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 on(a,this.jd.height).freeze(),this.v(),this instanceof Cr&&this.qc(),this.g("desiredSize",y,a),na(this)&&(a=this.part,a!==null&&No(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 on(this.jd.width,a).freeze(),this.v(),this instanceof Cr&&this.qc(),this.g("desiredSize",y,a),na(this)&&(a=this.part,a!==null&&No(this,a,"height")))}},minSize:{get:function(){return this.A!==null?this.A.u:_i},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(),Pr(this),this.A.u=a,this.v(),this.g("minSize",y,a))}},maxSize:{get:function(){return this.A!==null?this.A.o:yr},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(),Pr(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 wr(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&&Ks(this),this.Ab}},oe:{get:function(){return this.l&4096&&Ks(this),this.wh}},animationTriggers:{get:function(){return this.A!==null?this.A.hb:null},set:function(a){this.animationTriggers!==a&&(Pr(this),this.A.hb=a)}},reshapingBehavior:{get:function(){return this.A!==null?this.A.Pf:Pn},set:function(a){this.reshapingBehavior!==a&&(Pr(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()&&se("GraphObject.alignment for "+this+" must be a real Spot or Spot.Default, not: "+a),this.Jb=a=a.J(),Ns(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&&qn(a,">= 0",Se,"column"),this.Ag=a,this.v(),this.g("column",y,a),this.svg!==null&&this.svg.remove())}},columnSpan:{get:function(){return this.A!==null?this.A.ob:1},set:function(a){a=Math.round(a);var y=this.columnSpan;y!==a&&(1>a&&qn(a,">= 1",Se,"columnSpan"),Pr(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&&qn(a,">= 0",Se,"row"),this.io=a,this.v(),this.g("row",y,a),this.svg!==null&&this.svg.remove())}},rowSpan:{get:function(){return this.A!==null?this.A.Bi:1},set:function(a){a=Math.round(a);var y=this.rowSpan;y!==a&&(1>a&&qn(a,">= 1",Se,"rowSpan"),Pr(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&&(Pr(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 gi||se("Cannot set portID on a Link: "+a),y!==null&&x!==null&&ov(x,this),this.Yn=a,a!==null&&x!==null&&(x.Te=!0,Xy(x,this)),this.g("portId",y,a)}}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:pr},set:function(a){var y=this.toSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.yj=a,this.g("toSpot",y,a),Eh(this))}},toEndSegmentLength:{get:function(){return this.ba!==null?this.ba.wj:10},set:function(a){var y=this.toEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Se,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),Eh(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),Eh(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&&qn(a,">= 0",Se,"toMaxLinks"),this.Xc(),this.ba.Ur=a,this.g("toMaxLinks",y,a))}},fromSpot:{get:function(){return this.ba!==null?this.ba.Xi:pr},set:function(a){var y=this.fromSpot;y.D(a)||(a=a.J(),this.Xc(),this.ba.Xi=a,this.g("fromSpot",y,a),Eh(this))}},fromEndSegmentLength:{get:function(){return this.ba!==null?this.ba.Vi:10},set:function(a){var y=this.fromEndSegmentLength;y!==a&&(0>a&&qn(a,">= 0",Se,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),Eh(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),Eh(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&&qn(a,">= 0",Se,"fromMaxLinks"),this.Xc(),this.ba.iq=a,this.g("fromMaxLinks",y,a))}},cursor:{get:function(){return this.A!==null?this.A.j:""},set:function(a){var y=this.cursor;y!==a&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(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&&(Pr(this),this.A.Ch=a,this.g("contextMenu",y,a))}}}),Se.prototype.trigger=Se.prototype.Jv,Se.prototype.findBindingPanel=Se.prototype.ih,Se.prototype.findTemplateBinder=Se.prototype.pz,Se.prototype.setProperties=Se.prototype.nm,Se.prototype.apply=Se.prototype.apply,Se.prototype.attach=Se.prototype.Du,Se.prototype.set=Se.prototype.set,Se.prototype.isEnabledObject=Se.prototype.If,Se.prototype.isVisibleObject=Se.prototype.Ed,Se.prototype.isContainedBy=Se.prototype.rg,Se.prototype.getNearestIntersectionPoint=Se.prototype.rs,Se.prototype.getLocalPoint=Se.prototype.qs,Se.prototype.getDocumentScale=Se.prototype.Df,Se.prototype.getDocumentAngle=Se.prototype.li,Se.prototype.getDocumentBounds=Se.prototype.mi,Se.prototype.getDocumentPoint=Se.prototype.ga,Se.prototype.intersectsRect=Se.prototype.Yc,Se.prototype.containedInRect=Se.prototype.fh,Se.prototype.containsRect=Se.prototype.Re,Se.prototype.containsPoint=Se.prototype.ca,Se.prototype.raiseChanged=Se.prototype.g,Se.prototype.raiseChangedEvent=Se.prototype.cb,Se.prototype.addCopyProperty=Se.prototype.Vw;var Zd=null;Se.className="GraphObject",Zd=new ke,iA("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=Sl(En,En.Auto,{isActionable:!0,enabledChanged:function(x,E){if(x instanceof En){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"},Sl(Cr,{name:"ButtonBorder",figure:"RoundedRectangle",spot1:new Ci(0,0,2.76142374915397,2.761423749153969),spot2:new Ci(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 En&&(x=E.fb("ButtonBorder"),x instanceof Cr)){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 En&&(x=E.fb("ButtonBorder"),x instanceof Cr&&(x.fill=E._buttonFillNormal,x.stroke=E._buttonStrokeNormal))},y.actionDown=function(x,E){if(E.If()&&E instanceof En&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Cr){x=x.diagram;var z=x.skipsUndoManager;x.skipsUndoManager=!0;var tt=E._buttonFillPressed;E._buttonFillOver=b.fill,b.fill=tt,tt=E._buttonStrokePressed,E._buttonStrokeOver=b.stroke,b.stroke=tt,x.skipsUndoManager=z}}},y.actionUp=function(x,E){if(E.If()&&E instanceof En&&E._buttonFillPressed!==null&&x.button===0){var b=E.fb("ButtonBorder");if(b instanceof Cr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionCancel=function(x,E){if(E.If()&&E instanceof En&&E._buttonFillPressed!==null){var b=E.fb("ButtonBorder");if(b instanceof Cr){var z=x.diagram,tt=z.skipsUndoManager;z.skipsUndoManager=!0,a(x,E)?(b.fill=E._buttonFillOver,b.stroke=E._buttonStrokeOver):(b.fill=E._buttonFillNormal,b.stroke=E._buttonStrokeNormal),z.skipsUndoManager=tt}}},y.actionMove=function(x,E){if(E.If()&&E instanceof En&&E._buttonFillPressed!==null){var b=x.diagram;if(b.firstInput.button===0&&(b.currentTool.standardMouseOver(),a(x,E)&&(x=E.fb("ButtonBorder"),x instanceof Cr))){var z=b.skipsUndoManager;b.skipsUndoManager=!0;var tt=E._buttonFillPressed;x.fill!==tt&&(x.fill=tt),tt=E._buttonStrokePressed,x.stroke!==tt&&(x.stroke=tt),b.skipsUndoManager=z}}},y}),iA("TreeExpanderButton",function(){var a=Sl("Button",{_treeExpandedFigure:"MinusLine",_treeCollapsedFigure:"PlusLine"},Sl(Cr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Gi},new Ms("figure","isTreeExpanded",function(y,x){return x=x.panel,y?x._treeExpandedFigure:x._treeCollapsedFigure}).cp()),{visible:!1},new Ms("visible","isTreeLeaf",function(y){return!y}).cp());return a.click=function(y,x){if(x=x.part,x instanceof ro&&(x=x.adornedPart),x instanceof gi){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}),iA("SubGraphExpanderButton",function(){var a=Sl("Button",{_subGraphExpandedFigure:"MinusLine",_subGraphCollapsedFigure:"PlusLine"},Sl(Cr,{name:"ButtonIcon",figure:"MinusLine",stroke:"#424242",strokeWidth:2,desiredSize:Gi},new Ms("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 ro&&(x=x.adornedPart),x instanceof mr){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}),iA("ToolTip",function(){return Sl(ro,En.Auto,{isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ot(0,3),shadowBlur:5},Sl(Cr,{name:"Border",figure:"RoundedRectangle",parameter1:1,parameter2:1,fill:"#F5F5F5",stroke:"#F0F0F0",spot1:new Ci(0,0,4,6),spot2:new Ci(1,1,-4,-4)}))}),iA("ContextMenu",function(){return Sl(ro,En.Vertical,{background:"#F5F5F5",isShadowed:!0,shadowColor:"rgba(0, 0, 0, .4)",shadowOffset:new Ot(0,3),shadowBlur:5},new Ms("background","",function(a){return a.adornedPart!==null&&a.placeholder!==null?null:"#F5F5F5"}))}),iA("ContextMenuButton",function(){var a=Sl("Button");a.stretch=Hi;var y=a.fb("ButtonBorder");return y instanceof Cr&&(y.figure="Rectangle",y.strokeWidth=0,y.spot1=new Ci(0,0,2,3),y.spot2=new Ci(1,1,-2,-2)),a}),iA("PanelExpanderButton",function(a){var y=Df(a,"COLLAPSIBLE"),x=Sl("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},Sl(Cr,{name:"ButtonIcon",strokeWidth:2},new Ms("geometryString","visible",function(E){return E?x._buttonExpandedFigure:x._buttonCollapsedFigure}).cp(y)));return a=x.fb("ButtonBorder"),a instanceof Cr&&(a.stroke=null,a.fill="rgba(0, 0, 0, 0)"),x.click=function(E,b){var z=b.diagram;if(z!==null&&!z.isReadOnly){var tt=b.ih();tt===null&&(tt=b.part),tt!==null&&(b=tt.fb(y),b!==null&&(E.handled=!0,z.Ea("Collapse/Expand Panel"),b.visible=!b.visible,z.eb("Collapse/Expand Panel")))}},x}),iA("CheckBoxButton",function(a){var y=Df(a);return a=Sl("Button",{desiredSize:new on(14,14)},Sl(Cr,{name:"ButtonIcon",geometryString:"M0 0 M0 8.85 L4.9 13.75 16.2 2.45 M16.2 16.2",strokeWidth:2,stretch:bn,geometryStretch:Ii,visible:!1},y!==""?new Ms("visible",y).Kx():[])),a.click=function(x,E){if(E instanceof En){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}),iA("CheckBox",function(a){a=Df(a),a=Sl("CheckBoxButton",a,{name:"Button",isActionable:!1,margin:new wr(0,1,0,0)});var y=Sl(En,"Horizontal",a,{isActionable:!0,cursor:a.cursor,margin:new wr(1),_buttonFillNormal:a._buttonFillNormal,_buttonStrokeNormal:a._buttonStrokeNormal,_buttonFillOver:a._buttonFillOver,_buttonStrokeOver:a._buttonStrokeOver,_buttonFillPressed:a._buttonFillPressed,_buttonStrokePressed:a._buttonStrokePressed,_buttonFillDisabled:a._buttonFillDisabled,mouseEnter:a.mouseEnter,mouseLeave:a.mouseLeave,actionDown:a.actionDown,actionUp:a.actionUp,actionCancel:a.actionCancel,actionMove:a.actionMove,click:a.click,_buttonClick:a.click});return a.mouseEnter=null,a.mouseLeave=null,a.actionDown=null,a.actionUp=null,a.actionCancel=null,a.actionMove=null,a.click=null,y}),Se.None=Pn=new Te(Se,"None",0),Se.Default=dr=new Te(Se,"Default",0),Se.Vertical=Ji=new Te(Se,"Vertical",4),Se.Horizontal=Hi=new Te(Se,"Horizontal",5),Se.Fill=bn=new Te(Se,"Fill",3),Se.Uniform=Ii=new Te(Se,"Uniform",1),Se.UniformToFill=Rr=new Te(Se,"UniformToFill",2),Se.FlipVertical=Er=new Te(Se,"FlipVertical",1),Se.FlipHorizontal=jr=new Te(Se,"FlipHorizontal",2),Se.FlipBoth=po=new Te(Se,"FlipBoth",3),Se.make=Sl,Se.getBuilders=function(){var a=new ke,y;for(y in Zd)if(y!==y.toLowerCase()){var x=Zd.I(y);typeof x=="function"&&a.add(y,x)}return a.freeze(),a},Se.defineBuilder=iA,Se.build=function(a,y,x){for(var E=[],b=2;b<arguments.length;++b)E[b-2]=arguments[b];if(b=Zd.I(a),typeof b=="function"&&(E=b([a].concat(E)),E instanceof Se))return y&&E.set(y),E;se('GraphObject.build invoked object builder "'+a+'", but it did not return an Object')},Se.takeBuilderArgument=Df;function hc(){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=_i,this.o=yr,this.hg=dr,this.ob=this.Bi=1,this.Pf=Pn,this.Pc=this.Ci=this.gd=null,this.Oc="category"}hc.prototype.copy=function(){var a=new hc;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 Lh(){this.u=-1/0,this.o=0,this.F=vn,this.rr=Xa,this.j=this.V="None"}Lh.prototype.copy=function(){var a=new Lh;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},Lh.className="LinkElementSettings";function If(){this.yj=this.Xi=Io,this.xj=this.Wi=this.wj=this.Vi=NaN,this.Tr=this.hq=null,this.Ur=this.iq=1/0}If.prototype.copy=function(){var a=new If;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},If.className="LinkSettings";function cc(){this.ha=[1,0,0,1,0,0]}cc.prototype.copy=function(){var a=new cc;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},cc.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},cc.prototype.scale=function(a,y){this.ha[0]*=a,this.ha[1]*=a,this.ha[2]*=y,this.ha[3]*=y},cc.prototype.rotate=function(a,y,x){if(360<=a?a-=360:0>a&&(a+=360),a!==0){if(this.translate(y,x),a===90){a=0;var E=1}else a===180?(a=-1,E=0):a===270?(a=0,E=-1):(E=a*Math.PI/180,a=Math.cos(E),E=Math.sin(E));var b=this.ha[1]*a+this.ha[3]*E,z=this.ha[0]*-E+this.ha[2]*a,tt=this.ha[1]*-E+this.ha[3]*a;this.ha[0]=this.ha[0]*a+this.ha[2]*E,this.ha[1]=b,this.ha[2]=z,this.ha[3]=tt,this.translate(-y,-x)}},cc.className="STransform";function JA(a){this.type=a,this.r2=this.y2=this.x2=this.r1=this.y1=this.x1=0,this.gx=[],this.pattern=null}JA.prototype.addColorStop=function(a,y){this.gx.push({offset:a,color:y})},JA.className="SGradient";function Sa(a,y,x){this.ownerDocument=a=y===void 0?ln.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 Wa(this,x)}Sa.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},Sa.prototype.Ud=function(a,y,x){if(a=this.ownerDocument.createElementNS(this.cA,a),Ye(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},Sa.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Sa.prototype.focus=function(){this.Oa.focus()},Sa.prototype.mx=function(){this.ownerDocument=null},yn.Object.defineProperties(Sa.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}}}),Sa.className="SVGSurface";function Wa(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 cc,this.j=yg(this),this.Nj=yg(this,"gojs-diagram"),this.Hl=this.ti=null;var x=Bi++,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 Uf(a,y,x,E,b,z,tt){a.Nj===void 0?Of(a,y,x,E,b,z,tt):a.Nj.setAttribute("transform","matrix("+y+", "+x+", "+E+", "+b+", "+z+", "+tt+")")}kt=Wa.prototype,kt.arc=function(a,y,x,E,b,z,tt,rt){var ot=2*Math.PI,lt=ot-1e-6,ut=x*Math.cos(E),ft=x*Math.sin(E),yt=a+ut,Mt=y+ft,Tt=z?0:1;E=z?E-b:b-E,(1e-6<Math.abs(tt-yt)||1e-6<Math.abs(rt-Mt))&&this.path.push(["L",yt,+Mt]),0>E&&(E=E%ot+ot),E>lt?(this.path.push(["A",x,x,0,1,Tt,a-ut,y-ft]),this.path.push(["A",x,x,0,1,Tt,yt,Mt])):1e-6<E&&this.path.push(["A",x,x,0,+(E>=Math.PI),Tt,a+x*Math.cos(b),y+x*Math.sin(b)])},kt.beginPath=function(){this.path=[],this.Yl={stroke:"none",fill:"none"}},kt.Se=function(a){this.addPath(this.path,this.rb,a||0)},kt.bezierCurveTo=function(a,y,x,E,b,z){this.path.push(["C",a,y,x,E,b,z])},kt.clearRect=function(){},kt.clip=function(){this.Yl.clipPath=!0},kt.closePath=function(){this.path.push(["z"])},kt.createLinearGradient=function(a,y,x,E){var b=new JA("linear");return b.x1=a,b.y1=y,b.x2=x,b.y2=E,b},kt.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"+Bi++,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(vu,b)),this.svg.appendChild(a),x[y]=E,"url(#"+E+")"},kt.createRadialGradient=function(a,y,x,E,b,z){var tt=new JA("radial");return tt.x1=a,tt.y1=y,tt.r1=x,tt.x2=E,tt.y2=b,tt.r2=z,tt};function qp(a,y,x,E,b,z,tt,rt,ot){E=rt/E,b=ot/b,z===0&&tt===0||a.rb.translate(z,tt),E===1&&b===1||a.rb.scale(E,b),y===0&&x===0||a.rb.translate(-y,-x)}kt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){var lt="";a instanceof HTMLCanvasElement&&(lt=a.toDataURL()),a instanceof HTMLImageElement&&(lt=a.getAttribute("src"));var ut=a instanceof HTMLImageElement?a.naturalWidth:a.width;a=a instanceof HTMLImageElement?a.naturalHeight:a.height,E===void 0&&(z=y,tt=x,rt=E=ut,ot=b=a),E=E||0,b=b||0,rt=rt||0,ot=ot||0,qp(this,y,x,E,b,z||0,tt||0,rt,ot),z={x:0,y:0,width:ut||E,height:a||b,href:lt},Be.$(E,rt)&&Be.$(b,ot)?lt.toLowerCase().indexOf(".svg")===-1&&lt.toLowerCase().indexOf("data:image/svg")===-1&&(z.preserveAspectRatio="xMidYMid slice"):z.preserveAspectRatio="none",(y!==0||x!==0||E!==ut||b!==a)&&(E+=y,b+=x,z["clip-path"]="path('M "+y+","+x+" L "+E+" "+x+" L "+E+" "+b+" L "+y+" "+b+" z')"),dc(this,vu,z,this.rb),this.addElement(vu,z)},kt.fill=function(a){a&&(this.Yl["fill-rule"]="evenodd"),fc(this,this.Yl)},kt.ng=function(a,y){this.clipInsteadOfFill?this.clip():this.fill(y)},kt.fillRect=function(a,y,x,E){a=[a,y,x,E],a={x:a[0],y:a[1],width:a[2],height:a[3]},dc(this,"fill",a,this.rb),this.addElement("rect",a)},kt.ox=function(a,y,x,E){a={x:a,y,width:x,height:E},dc(this,"fill",a,this.rb),fc(this,a),this.svg.prepend(this.Ud("rect",a))},kt.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},dc(this,"fill",y,this.rb),this.addElement("text",y,a[0])},kt.lineTo=function(a,y){this.path.push(["L",a,y])},kt.moveTo=function(a,y){this.path.push(["M",a,y])},kt.quadraticCurveTo=function(a,y,x,E){this.path.push(["Q",a,y,x,E])},kt.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"])},kt.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},kt.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())},kt.setTransform=function(a,y,x,E,b,z){a===1&&y===0&&x===0&&E===1&&b===0&&z===0||Of(this,a,y,x,E,b,z)};function t0(a){return a=a.rb.ha,"matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")"}kt.scale=function(a,y){this.rb.scale(a,y)},kt.translate=function(a,y){this.rb.translate(a,y)},kt.transform=function(){},kt.yc=function(){},kt.stroke=function(){e0(this,this.Yl)},kt.jk=function(){this.clipInsteadOfFill||this.stroke()},kt.Ud=function(a,y,x){return this.Gv.Ud(a,y,x)},kt.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 dc(a,y,x,E){y==="fill"?fc(a,x):y==="stroke"&&e0(a,x),E!==null&&(a=E.ha,x.transform="matrix("+a[0]+", "+a[1]+", "+a[2]+", "+a[3]+", "+a[4]+", "+a[5]+")")}function fc(a,y){a.fillStyle instanceof JA?y.fill=gc(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 Qf(a,y,x){x=x?"fill":"stroke",a.fillStyle instanceof JA?y.setAttributeNS(null,"fill",gc(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 e0(a,y){if(a.strokeStyle instanceof JA)y.stroke=gc(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 gc(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"+Bi++,y.type==="linear")x=a.Ud("linearGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,id:E,gradientUnits:"userSpaceOnUse"});else if(y.type==="radial")x=a.Ud("radialGradient",{x1:y.x1,x2:y.x2,y1:y.y1,y2:y.y2,r1:y.r1,r2:y.r2,id:E});else throw Error("invalid gradient");var b=y.gx;y=b.length;for(var z=[],tt=0;tt<y;tt++){var rt=b[tt],ot=rt.color;rt={offset:rt.offset,"stop-color":ot},/^rgba\(/.test(ot)&&(ot=/^\s*rgba\s*\(([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\s*,\s*([^,\s]+)\)\s*$/i.exec(ot),rt["stop-color"]="rgb("+ot[1]+","+ot[2]+","+ot[3]+")",rt["stop-opacity"]=ot[4]),z.push(rt)}for(z.sort(function(lt,ut){return lt.offset>ut.offset?1:-1}),b=0;b<y;b++)x.appendChild(a.Ud("stop",z[b]));return a.svg.appendChild(x),"url(#"+E+")"}kt.addPath=function(a,y,x){for(var E=[],b=0;b<a.length;b++){var z=bi(a[b]),tt=[z.shift()];if(tt[0]==="A")tt.push(z.shift()+","+z.shift(),z.shift(),z.shift()+","+z.shift(),z.shift()+","+z.shift());else for(;z.length;)tt.push(z.shift()+","+z.shift());E.push(tt.join(" "))}if(E=E.join(" "),a=this.Yl,a.clipPath)0<this.nh.length&&this.nh[this.nh.length-1].setAttributeNS(null,"clip-path",'path("'+E+'")');else if(a.d=E,dc(this,"",a,y),this.Hl!==null)if(y=this.Hl,y.nodeName!=="g")for(var rt in a)rt!=="transform"&&y.setAttributeNS(null,rt,a[rt]);else{rt=y.getElementsByTagName("path");for(var ot in a)ot!=="transform"&&rt[x].setAttributeNS(null,ot,a[ot])}else this.addElement("path",a)};function Of(a,y,x,E,b,z,tt){var rt=new cc;rt.ha=[y,x,E,b,z,tt],y={},dc(a,"g",y,rt),rt=a.addElement("g",y),a.nh.push(rt)}function yg(a,y){var x={};return y&&(x.class=y),y=a.addElement("g",x),a.nh.push(y),y}kt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x};function Ou(a){a.Il=!1,a.shadowOffsetX=0,a.shadowOffsetY=0,a.shadowBlur=0}function SA(a){a.Il=!0,a.shadowOffsetX=a.Ar,a.shadowOffsetY=a.Br,a.shadowBlur=a.Vg}kt.js=function(a,y){this.Ct=!0,this.Yg=a,this.uj=y},kt.fs=function(){this.Ct=!1},kt.Vc=function(){},kt.Wx=function(){},Wa.prototype.rotate=function(a){this.rb.rotate(57.2958*a,0,0)},Wa.prototype.getImageData=function(){return null},Wa.prototype.measureText=function(){return null};function Rf(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()))}Wa.prototype.Hs=function(a){a.svg!==null&&a.svg.parentNode===this.Nj&&a.svg.remove()},Wa.className="SVGContext",Re.prototype.Cs=function(a){this.pj.contains("SVG")||this.bs("SVG",new Sa(this,ln.document));var y=new Sa(this,ln.document,!0);a===void 0&&(a=new Si);var x=this;return nd(this,function(E,b){return E=mg(x,E,"SVG",y),E=E!==null?E.svg:null,typeof b=="function"?(b(E),null):E},a)},Re.prototype.makeSvg=Re.prototype.Cs,Re.prototype.av=function(a){return this.Cs(a)},Re.prototype.makeSVG=Re.prototype.av;function Jl(a,y,x,E){this.ownerDocument=y=y===void 0?ln.document:y,this.hs=null,y=y.createElement("canvas"),y.tabIndex=0,this.Oa=y,this.context=new pc(y,x,E),y.H=a}Jl.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},Jl.prototype.toDataURL=function(a,y){return this.Oa.toDataURL(a,y)},Jl.prototype.getBoundingClientRect=function(){return this.Oa.getBoundingClientRect()},Jl.prototype.focus=function(){this.Oa.focus()},Jl.prototype.mx=function(){this.ownerDocument=this.Oa.H=null},yn.Object.defineProperties(Jl.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}}}),Jl.className="CanvasSurface";function pc(a,y,x){this.Z=a.getContext?a.getContext("2d",y):null,this.Z===null&&se("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 ir,this.isTemporary=!!x}kt=pc.prototype,kt.Wx=function(a){this.Z.imageSmoothingEnabled=a},kt.arc=function(a,y,x,E,b,z){this.Z.arc(a,y,x,E,b,z)},kt.beginPath=function(){this.Z.beginPath()},kt.Se=function(){},kt.bezierCurveTo=function(a,y,x,E,b,z){this.Z.bezierCurveTo(a,y,x,E,b,z)},kt.clearRect=function(a,y,x,E){this.yc(),this.Z.clearRect(a,y,x,E)},kt.clip=function(){this.Z.clip()},kt.closePath=function(){this.Z.closePath()},kt.createLinearGradient=function(a,y,x,E){return this.Z.createLinearGradient(a,y,x,E)},kt.createPattern=function(a,y){return this.Z.createPattern(a,y)},kt.createRadialGradient=function(a,y,x,E,b,z){return this.Z.createRadialGradient(a,y,x,E,b,z)},kt.drawImage=function(a,y,x,E,b,z,tt,rt,ot){E===void 0?this.Z.drawImage(a,y,x):this.Z.drawImage(a,y,x,E,b,z,tt,rt,ot)},kt.fill=function(a){this.Z.fill(a?"evenodd":"nonzero")},kt.fillRect=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},kt.ox=function(a,y,x,E){this.Z.fillRect(a,y,x,E)},kt.fillText=function(a,y,x){this.Z.fillText(a,y,x)},kt.getImageData=function(a,y,x,E){return this.Z.getImageData(a,y,x,E)},kt.lineTo=function(a,y){this.Z.lineTo(a,y)},kt.measureText=function(a){return this.Z.measureText(a)},kt.moveTo=function(a,y){this.Z.moveTo(a,y)},kt.quadraticCurveTo=function(a,y,x,E){this.Z.quadraticCurveTo(a,y,x,E)},kt.rect=function(a,y,x,E){this.Z.rect(a,y,x,E)},kt.restore=function(){this.Z.restore()},kt.save=function(){this.yc(),this.Z.save()},pc.prototype.rotate=function(a){this.El.rotate(57.2958*a,0,0)},kt=pc.prototype,kt.setTransform=function(a,y,x,E,b,z){this.El.setTransform(a,y,x,E,b,z)},kt.scale=function(a,y){this.El.scale(a,y)},kt.translate=function(a,y){this.El.translate(a,y)},kt.stroke=function(){this.Z.stroke()},kt.transform=function(a,y,x,E,b,z){if(a!==1||y!==0||x!==0||E!==1||b!==0||z!==0){var tt=this.El,rt=tt.m11*a+tt.m21*y;a=tt.m12*a+tt.m22*y,y=tt.m11*x+tt.m21*E,x=tt.m12*x+tt.m22*E,tt.dx=tt.m11*b+tt.m21*z+tt.dx,tt.dy=tt.m12*b+tt.m22*z+tt.dy,tt.m11=rt,tt.m12=a,tt.m21=y,tt.m22=x}},kt.yc=function(){var a=this.El;this.Z.setTransform(a.m11,a.m12,a.m21,a.m22,a.dx,a.dy)},kt.ng=function(a,y){if(a instanceof ho&&a.type===br){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)},kt.jk=function(){this.Hm||this.stroke()},kt.Ev=function(a,y,x){this.Ar=a,this.Br=y,this.Vg=x},kt.js=function(a,y){var x=this.Z;x.setLineDash!==void 0&&(x.setLineDash(a),x.lineDashOffset=y)},kt.fs=function(){var a=this.Z;a.setLineDash!==void 0&&(a.setLineDash(Tm),a.lineDashOffset=0)},kt.Vc=function(a){a&&(this.dt=""),this.ct=this.et=""},kt.Hs=function(){},yn.Object.defineProperties(pc.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 Tm=Object.freeze([]);pc.className="CanvasSurfaceContext";function Hf(){this.F=this.o=this.u=this.j=0}Hf.className="ColorNumbers";function ho(a,y){Vi||(Pt(),Vi=!0),An(this),this._isFrozen=!1,a===void 0?(this.na=Gr,this.xk="black"):typeof a=="string"?(this.na=Gr,this.xk=a):(this.na=a,this.xk="black"),a=this.na,a===xr?(this.Qd=$r,this.Lk=os):this.Lk=a===br?this.Qd=cr:this.Qd=pr,this.Gr=0,this.Xp=NaN,this.xe=this.cr=this.we=null,this.ft=this.yk=0,y&&Object.assign(this,y)}ho.prototype.copy=function(){var a=new ho;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},kt=ho.prototype,kt.freeze=function(){return this._isFrozen=!0,this.we!==null&&this.we.freeze(),this},kt.ka=function(){return Object.isFrozen(this)&&se("cannot thaw constant: "+this),this._isFrozen=!1,this.we!==null&&this.we.ka(),this},kt.qb=function(a){a.classType===ho&&(this.type=a)},kt.toString=function(){var a="Brush(";if(this.type===Gr)a+=this.color;else if(a=this.type===xr?a+"Linear ":this.type===br?a+"Radial ":this.type===Zo?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+")"},kt.addColorStop=function(a,y){return this._isFrozen&&De(this),(typeof a!="number"||!isFinite(a)||1<a||0>a)&&qn(a,"0 <= loc <= 1",ho,"addColorStop:loc"),this.we===null&&(this.we=new ke),this.we.add(a,y),this.na===Gr&&(this.type=xr),this.xe=null,this},kt.Vz=function(a,y){if(this._isFrozen&&De(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ao:y,this.type===Gr)BA(this.color),this.color=Yd(a,y);else if((this.type===xr||this.type===br)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(a,y));return this};function n0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ao:x,BA(a),Yd(y,x)}kt.Wy=function(a,y){if(this._isFrozen&&De(this),a=a===void 0||typeof a!="number"?.2:a,y=y===void 0?ao:y,this.type===Gr)BA(this.color),this.color=Yd(-a,y);else if((this.type===xr||this.type===br)&&this.colorStops!==null)for(var x=this.colorStops.iterator;x.next();)BA(x.value),this.addColorStop(x.key,Yd(-a,y));return this};function i0(a,y,x){return y=y===void 0||typeof y!="number"?.2:y,x=x===void 0?ao:x,BA(a),Yd(-y,x)}function np(a,y,x){BA(a),a=Qe.j;var E=Qe.u,b=Qe.o,z=Qe.F;return BA(y),x===void 0&&(x=.5),"rgba("+Math.round((Qe.j-a)*x+a)+", "+Math.round((Qe.u-E)*x+E)+", "+Math.round((Qe.o-b)*x+b)+", "+Math.round((Qe.F-z)*x+z)+")"}kt.Gx=function(){if(this.type===Gr)return Wd(this.color);if((this.type===xr||this.type===br)&&this.colorStops!==null){var a=this.colorStops;if(this.type===br)return Wd(a.first().value);if(a.get(.5)!==null)return Wd(a.get(.5));if(a.count===2)return a=a.Fa(),Wd(np(a[0].value,a[1].value));for(var y=a.iterator,x=-1,E=-1,b=1,z=1;y.next();){var tt=y.key,rt=Math.abs(.5-y.key);b>z&&rt<b?(x=tt,b=rt):z>=b&&rt<z&&(E=tt,z=rt)}return x>E&&(z=x,x=E,E=z,z=b),b=E-x,Wd(np(a.get(x),a.get(E),1-z/b))}return!1};function Wd(a){return a?a instanceof ho?a.Gx():(BA(a),128>(299*Qe.j+587*Qe.u+114*Qe.o)/1e3):!1}function Yd(a,y){switch(y){case ao:y=100*rp(Qe.j);var x=100*rp(Qe.u),E=100*rp(Qe.o);return zn.j=.4124564*y+.3575761*x+.1804375*E,zn.u=.2126729*y+.7151522*x+.072175*E,zn.o=.0193339*y+.119192*x+.9503041*E,zn.F=Qe.F,y=Bt(zn.j/Fe[0]),x=Bt(zn.u/Fe[1]),E=Bt(zn.o/Fe[2]),pi.j=116*x-16,pi.u=500*(y-x),pi.o=200*(x-E),pi.F=zn.F,pi.j=Math.min(100,Math.max(0,pi.j+100*a)),a=(pi.j+16)/116,y=a-pi.o/200,zn.j=Fe[0]*wt(pi.u/500+a),zn.u=Fe[1]*(pi.j>Ae*jt?Math.pow(a,3):pi.j/Ae),zn.o=Fe[2]*wt(y),zn.F=pi.F,a=-.969266*zn.j+1.8760108*zn.u+.041556*zn.o,y=.0556434*zn.j+-.2040259*zn.u+1.0572252*zn.o,Qe.j=255*op((3.2404542*zn.j+-1.5371385*zn.u+-.4985314*zn.o)/100),Qe.u=255*op(a/100),Qe.o=255*op(y/100),Qe.F=zn.F,Qe.j=Math.round(Qe.j),255<Qe.j?Qe.j=255:0>Qe.j&&(Qe.j=0),Qe.u=Math.round(Qe.u),255<Qe.u?Qe.u=255:0>Qe.u&&(Qe.u=0),Qe.o=Math.round(Qe.o),255<Qe.o?Qe.o=255:0>Qe.o&&(Qe.o=0),"rgba("+Qe.j+", "+Qe.u+", "+Qe.o+", "+Qe.F+")";case uo:return ip(),Nn.o=Math.min(100,Math.max(0,Nn.o+100*a)),"hsla("+Nn.j+", "+Nn.u+"%, "+Nn.o+"%, "+Nn.F+")";default:se("Unknown color space: "+y)}}function BA(a){Vi||(Pt(),Vi=!0);var y=Je;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,Qe.j=a[0],Qe.u=a[1],Qe.o=a[2],Qe.F=a[3]/255):(y.fillStyle="#FFFFFF",y.fillStyle=a,Qe.j=0,Qe.u=0,Qe.o=0,Qe.F=1)}}function ip(){var a=Qe.j/255,y=Qe.u/255,x=Qe.o/255,E=Math.max(a,y,x),b=Math.min(a,y,x),z=E-b;if(b=(E+b)/2,z===0)var tt=a=0;else{switch(E){case a:tt=(y-x)/z%6;break;case y:tt=(x-a)/z+2;break;case x:tt=(a-y)/z+4}tt*=60,0>tt&&(tt+=360),a=z/(1-Math.abs(2*b-1))}Nn.j=Math.round(tt),Nn.u=Math.round(100*a),Nn.o=Math.round(100*b),Nn.F=Qe.F}function rp(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 Bt(a){return a>jt?Math.pow(a,1/3):(Ae*a+16)/116}function wt(a){var y=a*a*a;return y>jt?y:(116*a-16)/Ae}function Lt(a,y){typeof a!="string"&&(a instanceof ho||se("Value for "+y+" must be a color string or a Brush, not "+a))}function Pt(){Je=Jo?new Jl(null,void 0,{willReadFrequently:!0}).context:null}yn.Object.defineProperties(ho.prototype,{type:{get:function(){return this.na},set:function(a){this._isFrozen&&De(this,a),this.na=a,this.start.Mc()&&(a===xr?this.start=$r:a===br&&(this.start=cr)),this.end.Mc()&&(a===xr?this.end=os:a===br&&(this.end=cr)),this.xe=null}},color:{get:function(){return this.xk},set:function(a){this._isFrozen&&De(this,a),this.xk=a,this.xe=null}},start:{get:function(){return this.Qd},set:function(a){this._isFrozen&&De(this,a),this.Qd=a.J(),this.xe=null}},end:{get:function(){return this.Lk},set:function(a){this._isFrozen&&De(this,a),this.Lk=a.J(),this.xe=null}},startRadius:{get:function(){return this.Gr},set:function(a){this._isFrozen&&De(this,a),0>a&&qn(a,">= zero",ho,"startRadius"),this.Gr=a,this.xe=null}},endRadius:{get:function(){return this.Xp},set:function(a){this._isFrozen&&De(this,a),0>a&&qn(a,">= zero",ho,"endRadius"),this.Xp=a,this.xe=null}},colorStops:{get:function(){return this.we},set:function(a){this._isFrozen&&De(this,a),this.we=a,this.xe=null}},pattern:{get:function(){return this.cr},set:function(a){this._isFrozen&&De(this,a),this.cr=a,this.xe=null}}}),ho.prototype.isDark=ho.prototype.Gx,ho.prototype.darkenBy=ho.prototype.Wy,ho.prototype.lightenBy=ho.prototype.Vz,ho.prototype.addColorStop=ho.prototype.addColorStop;var jt=216/24389,Ae=24389/27,Fe=[95.047,100,108.883],Je=null,Qe=new Hf,Nn=new Hf,zn=new Hf,pi=new Hf,Vi=!1;ho.className="Brush";var Gr;ho.Solid=Gr=new Te(ho,"Solid",0);var xr;ho.Linear=xr=new Te(ho,"Linear",1);var br;ho.Radial=br=new Te(ho,"Radial",2);var Zo;ho.Pattern=Zo=new Te(ho,"Pattern",4);var ao;ho.Lab=ao=new Te(ho,"Lab",5);var uo;ho.HSL=uo=new Te(ho,"HSL",6),ho.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},ho.isValidColor=function(a){if(a==="black")return!0;if(a==="")return!1;Vi||(Pt(),Vi=!0);var y=Je;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)},ho.lighten=function(a){return n0(a)},ho.lightenBy=n0,ho.darken=function(a){return i0(a)},ho.darkenBy=i0,ho.mix=np,ho.isDark=Wd;function co(){this.xa="Base"}co.prototype.measure=function(){},co.prototype.Yz=function(a,y,x,E,b){a.measure(y,x,E,b)},co.prototype.arrange=function(){},co.prototype.Ly=function(a,y,x,E,b,z){a.arrange(y,x,E,b,z)},co.prototype.iA=function(a){a.Uj()},co.prototype.gc=function(){},yn.Object.defineProperties(co.prototype,{name:{get:function(){return this.xa},set:function(a){this.xa=a}},classType:{get:function(){return En}}}),co.prototype.remeasureObject=co.prototype.iA,co.prototype.arrangeElement=co.prototype.Ly,co.prototype.measureElement=co.prototype.Yz,co.className="PanelLayout";function qo(){this.xa="Base"}Ge(qo,co),qo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;a=ll(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===a){var ut=lt.margin,ft=ut.right+ut.left;ut=ut.top+ut.bottom,lt.measure(y,x,z,tt);var yt=lt.measuredBounds;ft=Math.max(yt.width+ft,0),ut=Math.max(yt.height+ut,0),yt=lt.position.x;var Mt=lt.position.y;isFinite(yt)||(yt=0),isFinite(Mt)||(Mt=0),lt instanceof Cr&&lt.isGeometryPositioned&&(lt=lt.strokeWidth/2,yt-=lt,Mt-=lt),Dr(b,yt,Mt,ft,ut)}}},qo.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding;for(a=x.x-b.left,x=x.y-b.top,b=0;b<E;b++){var z=y[b],tt=z.measuredBounds,rt=z.margin,ot=z.position.x,lt=z.position.y;if(ot=isNaN(ot)?-a:ot-a,lt=isNaN(lt)?-x:lt-x,z instanceof Cr&&z.isGeometryPositioned){var ut=z.strokeWidth/2;ot-=ut,lt-=ut}z.visible&&z.arrange(ot+rt.left,lt+rt.top,tt.width,tt.height)}};function Do(){this.xa="Base"}Ge(Do,co),Do.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length;y=li(),z=ll(a);for(var ot=0;ot<rt;ot++){var lt=E[ot];if(lt.visible||lt===z){var ut=_a(lt,!1);if(ut!==Pn&&ut!==Hi)y.push(lt);else{lt.measure(1/0,x,0,tt),ut=lt.margin,lt=lt.measuredBounds;var ft=Math.max(lt.height+ut.top+ut.bottom,0);b.width+=Math.max(lt.width+ut.right+ut.left,0),b.height=Math.max(b.height,ft)}}}for(E=y.length,a.desiredSize.height?x=Math.min(a.desiredSize.height,a.maxSize.height):b.height!==0&&(x=Math.min(b.height,a.maxSize.height)),a=0;a<E;a++)ot=y[a],(ot.visible||ot===z)&&(ut=ot.margin,rt=ut.right+ut.left,ut=ut.top+ut.bottom,ot.measure(1/0,x,0,tt),ot=ot.measuredBounds,ut=Math.max(ot.height+ut,0),b.width+=Math.max(ot.width+rt,0),b.height=Math.max(b.height,ut));ci(y)},Do.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.top,tt=a.isOpposite,rt=tt?x.width:b.left,ot=0;ot<E;ot++){var lt=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Mt=yt.top+yt.bottom,Tt=z+b.bottom,Dt=ft.height,$t=_a(ut,!1);(isNaN(ut.desiredSize.height)&&$t===bn||$t===Ji)&&(Dt=Math.max(x.height-Mt-Tt,0)),Mt=Dt+Mt+Tt,Tt=ut.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=cr),tt&&(rt-=ft.width+yt.left+yt.right),ut.arrange(rt+Tt.offsetX+yt.left,lt+Tt.offsetY+yt.top+(x.height*Tt.y-Mt*Tt.y),ft.width,Dt),tt||(rt+=ft.width+yt.left+yt.right)}}};function to(){this.xa="Base"}Ge(to,co),to.prototype.measure=function(a,y,x,E,b,z){var tt=E.length;x=li();for(var rt=ll(a),ot=0;ot<tt;ot++){var lt=E[ot];if(lt.visible||lt===rt){var ut=_a(lt,!1);if(ut!==Pn&&ut!==Ji)x.push(lt);else{var ft=lt.margin;ut=ft.right+ft.left,ft=ft.top+ft.bottom,lt.measure(y,1/0,z,0),lt=lt.measuredBounds,Nr(b,Math.max(b.width,Math.max(lt.width+ut,0)),b.height+Math.max(lt.height+ft,0))}}}if(E=x.length,E!==0){for(a.desiredSize.width?y=Math.min(a.desiredSize.width,a.maxSize.width):b.width!==0&&(y=Math.min(b.width,a.maxSize.width)),a=0;a<E;a++)ot=x[a],(ot.visible||ot===rt)&&(lt=ot.margin,tt=lt.right+lt.left,lt=lt.top+lt.bottom,ot.measure(y,1/0,z,0),ot=ot.measuredBounds,lt=Math.max(ot.height+lt,0),b.width=Math.max(b.width,Math.max(ot.width+tt,0)),b.height+=lt);ci(x)}},to.prototype.arrange=function(a,y,x){for(var E=y.length,b=a.padding,z=b.left,tt=a.isOpposite,rt=tt?x.height:b.top,ot=0;ot<E;ot++){var lt=z,ut=y[ot];if(ut.visible){var ft=ut.measuredBounds,yt=ut.margin,Mt=yt.left+yt.right,Tt=z+b.right,Dt=ft.width,$t=_a(ut,!1);(isNaN(ut.desiredSize.width)&&$t===bn||$t===Hi)&&(Dt=Math.max(x.width-Mt-Tt,0)),Mt=Dt+Mt+Tt,Tt=ut.alignment,Tt.Xb()&&(Tt=a.defaultAlignment),Tt.sb()||(Tt=cr),tt&&(rt-=ft.height+yt.bottom+yt.top),ut.arrange(lt+Tt.offsetX+yt.left+(x.width*Tt.x-Mt*Tt.x),rt+Tt.offsetY+yt.top,Dt,ft.height),tt||(rt+=ft.height+yt.bottom+yt.top)}}};function cs(){this.xa="Base"}Ge(cs,co),cs.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=lt.right+lt.left,ft=lt.top+lt.bottom;ot.measure(y,x,z,tt);var yt=ot.measuredBounds;z=yt.width,tt=yt.height;var Mt=Math.max(z+ut,0),Tt=Math.max(tt+ft,0),Dt=a.isClipping,$t=Oe.allocAt(-lt.left,-lt.top,Mt,Tt),Vt=Oe.allocAt(0,0,z,tt);ws(ot,Vt,!0),z=Vt.width,tt=Vt.height;for(var ae=!0,ce=ll(a),ge=0;ge<rt;ge++){var we=E[ge];yt=y;var He=x;if(we!==ot&&(we.visible||we===ce)){lt=we.margin;var di=lt.left,Pi=lt.top;switch(Mt=lt.right+lt.left,Tt=lt.top+lt.bottom,lt=_a(we,!1),lt){case bn:yt=z,He=tt,Pi=di=Tt=Mt=0;break;case Hi:yt=z,di=Mt=0;break;case Ji:He=tt,Pi=Tt=0}we.measure(yt,He,0,0),yt=we.measuredBounds,Mt=Math.max(yt.width+Mt,0),Tt=Math.max(yt.height+Tt,0),lt=we.alignment,lt.Xb()&&(lt=a.defaultAlignment),lt.sb()||(lt=cr);var wi=we.alignmentFocus;if(wi.Xb()&&(wi=cr),He=null,we instanceof En&&we.$e!==""&&(He=we.fb(we.$e),He===we&&(He=null)),di=Vt.x-di,Pi=Vt.y-Pi,He!==null){for(we.arrange(0,0,yt.width,yt.height),yt=He.actualBounds,yt=Ot.allocAt(yt.x+(wi.x*yt.width-wi.offsetX),yt.y+(wi.y*yt.height-wi.offsetY)),He=He.panel;He!==we;)He.transform.Ga(yt),He=He.panel;di+=lt.x*z+lt.offsetX-yt.x,Pi+=lt.y*tt+lt.offsetY-yt.y,Ot.free(yt)}else di+=lt.x*z+lt.offsetX-(wi.x*yt.width+wi.offsetX),Pi+=lt.y*tt+lt.offsetY-(wi.y*yt.height+wi.offsetY);ae?(ae=!1,b.h(di,Pi,Mt,Tt)):Dr(b,di,Pi,Mt,Tt)}}switch(ae?b.assign($t):Dt?b.Uu(Vt.x,Vt.y,Vt.width,Vt.height):Dr(b,$t.x,$t.y,$t.width,$t.height),Oe.free($t),Oe.free(Vt),lt=ot.stretch,lt===dr&&(lt=_a(ot,!1)),lt){case Pn:return;case bn:if(!isFinite(y)&&!isFinite(x))return;break;case Hi:if(!isFinite(y))return;break;case Ji:if(!isFinite(x))return}for(yt=ot.measuredBounds,z=yt.width,tt=yt.height,Mt=Math.max(z+ut,0),Tt=Math.max(tt+ft,0),lt=ot.margin,Vt=Oe.allocAt(-lt.left,-lt.top,Mt,Tt),ws(ot,Vt,!0),z=Vt.width,tt=Vt.height,y=0;y<rt;y++)x=E[y],x===ot||!x.visible&&x!==ce||(lt=x.margin,Mt=lt.right+lt.left,Tt=lt.top+lt.bottom,yt=x.measuredBounds,Mt=Math.max(yt.width+Mt,0),Tt=Math.max(yt.height+Tt,0),ut=x.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=cr),x=x.alignmentFocus,x.Xb()&&(x=cr),ae?(ae=!1,b.h(ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Mt,Tt)):Dr(b,ut.x*z+ut.offsetX-(x.x*yt.width+x.offsetX)-lt.left,ut.y*tt+ut.offsetY-(x.y*yt.height+x.offsetY)-lt.top,Mt,Tt));ae?b.assign($t):Dt?b.Uu(Vt.x,Vt.y,Vt.width,Vt.height):Dr(b,$t.x,$t.y,$t.width,$t.height),Oe.free(Vt)},cs.prototype.arrange=function(a,y,x){var E=y.length,b=a.Pb(),z=b.measuredBounds,tt=z.width,rt=z.height,ot=a.padding;z=ot.left,ot=ot.top;var lt=z-x.x,ut=ot-x.y;for(b.arrange(lt,ut,tt,rt),tt=Oe.allocAt(0,0,tt,rt),ws(b,tt,!1),rt=0;rt<E;rt++){var ft=y[rt];if(ft!==b){lt=ft.measuredBounds;var yt=lt.width,Mt=lt.height;ut=ft.alignment,ut.Xb()&&(ut=a.defaultAlignment),ut.sb()||(ut=cr);var Tt=ft.alignmentFocus;if(Tt.Xb()&&(Tt=cr),lt=null,ft instanceof En&&ft.$e!==""&&(lt=ft.fb(ft.$e),lt===ft&&(lt=null)),lt!==null){var Dt=lt.actualBounds;for(Tt=Ot.allocAt(Dt.x+(Tt.x*Dt.width-Tt.offsetX),Dt.y+(Tt.y*Dt.height-Tt.offsetY)),lt=lt.panel;lt!==ft;)lt.transform.Ga(Tt),lt=lt.panel;lt=ut.x*tt.width+ut.offsetX-Tt.x,ut=ut.y*tt.height+ut.offsetY-Tt.y,Ot.free(Tt)}else lt=ut.x*tt.width+ut.offsetX-(Tt.x*yt+Tt.offsetX),ut=ut.y*tt.height+ut.offsetY-(Tt.y*Mt+Tt.offsetY);lt+=tt.x-x.x,ut+=tt.y-x.y,ft.visible&&ft.arrange(z+lt,ot+ut,yt,Mt)}}Oe.free(tt)};function ws(a,y,x){var E=null;if(a instanceof En&&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 Oo(){this.xa="Base"}Ge(Oo,co),Oo.prototype.measure=function(a,y,x,E,b,z,tt){var rt=E.length,ot=a.Pb(),lt=ot.margin,ut=y,ft=x,yt=lt.right+lt.left,Mt=lt.top+lt.bottom;ot.measure(y,x,z,tt),lt=ot.measuredBounds;var Tt=0,Dt=null;ot instanceof Cr&&(Dt=ot,Tt=Dt.strokeWidth*Dt.scale);var $t=Math.max(lt.width+yt,0);lt=Math.max(lt.height+Mt,0);var Vt=Dm(ot),ae=Vt.x*$t+Vt.offsetX;Vt=Vt.y*lt+Vt.offsetY;var ce=Im(ot),ge=ce.x*$t+ce.offsetX;for(ce=ce.y*lt+ce.offsetY,isFinite(y)&&(ut=Math.max(Math.abs(ae-ge)-Tt,0)),isFinite(x)&&(ft=Math.max(Math.abs(Vt-ce)-Tt,0)),Tt=on.alloc(),Tt.h(0,0),a=ll(a),ce=0;ce<rt;ce++)Vt=E[ce],Vt===ot||!Vt.visible&&Vt!==a||(lt=Vt.margin,$t=lt.right+lt.left,ae=lt.top+lt.bottom,Vt.measure(ut,ft,0,0),lt=Vt.measuredBounds,$t=Math.max(lt.width+$t,0),lt=Math.max(lt.height+ae,0),Tt.h(Math.max($t,Tt.width),Math.max(lt,Tt.height)));if(rt===1)b.width=$t,b.height=lt,on.free(Tt);else{switch(Vt=Dm(ot),ce=Im(ot),rt=E=0,ce.x!==Vt.x&&ce.y!==Vt.y&&(E=Tt.width/Math.abs(ce.x-Vt.x),rt=Tt.height/Math.abs(ce.y-Vt.y)),on.free(Tt),Tt=0,Dt!==null&&(Tt=Dt.strokeWidth*Dt.scale,_m(Dt)===Ii&&(E=rt=Math.max(E,rt))),E+=Math.abs(Vt.offsetX)+Math.abs(ce.offsetX)+Tt,rt+=Math.abs(Vt.offsetY)+Math.abs(ce.offsetY)+Tt,Dt=ot.stretch,Dt===dr&&(Dt=_a(ot,!1)),Dt){case Pn:tt=z=0;break;case bn:isFinite(y)&&(E=y),isFinite(x)&&(rt=x);break;case Hi:isFinite(y)&&(E=y),tt=0;break;case Ji:z=0,isFinite(x)&&(rt=x)}ot.Uj(),ot.measure(E,rt,z,tt),b.width=ot.measuredBounds.width+yt,b.height=ot.measuredBounds.height+Mt}},Oo.prototype.arrange=function(a,y){var x=y.length,E=a.Pb(),b=E.measuredBounds,z=Oe.alloc();z.h(0,0,1,1);var tt=E.margin,rt=tt.left;tt=tt.top;var ot=a.padding,lt=ot.left;ot=ot.top,E.arrange(lt+rt,ot+tt,b.width,b.height);var ut=Dm(E),ft=Im(E),yt=ut.y*b.height+ut.offsetY,Mt=ft.x*b.width+ft.offsetX;for(ft=ft.y*b.height+ft.offsetY,z.x=ut.x*b.width+ut.offsetX,z.y=yt,Dr(z,Mt,ft,0,0),z.x+=rt+lt,z.y+=tt+ot,b=0;b<x;b++)rt=y[b],rt!==E&&(lt=rt.measuredBounds,tt=rt.margin,ot=Math.max(lt.width+tt.right+tt.left,0),ut=Math.max(lt.height+tt.top+tt.bottom,0),yt=rt.alignment,yt.Xb()&&(yt=a.defaultAlignment),yt.sb()||(yt=cr),ot=z.width*yt.x+yt.offsetX-ot*yt.x+tt.left+z.x,tt=z.height*yt.y+yt.offsetY-ut*yt.y+tt.top+z.y,rt.visible&&(fo(z.x,z.y,z.width,z.height,ot,tt,lt.width,lt.height)?rt.arrange(ot,tt,lt.width,lt.height):rt.arrange(ot,tt,lt.width,lt.height,new Oe(z.x,z.y,z.width,z.height))));Oe.free(z)};function La(){this.xa="Base",this.name="Table"}Ge(La,co),La.prototype.measure=function(a,y,x,E,b){for(var z=E.length,tt=li(),rt=li(),ot=0;ot<z;ot++){var lt=E[ot],ut=lt instanceof En?lt:null;if(ut!==null&&vc(ut)&&lt.visible){rt.push(ut);for(var ft=ut.O.s,yt=ft.length,Mt=0;Mt<yt;Mt++){var Tt=ft[Mt];ut.type===En.TableRow?Tt.row=lt.row:ut.type===En.TableColumn&&(Tt.column=lt.column),tt.push(Tt)}}else tt.push(lt)}z=tt.length,z===0&&(a.Fb(0),a.Eb(0));for(var Dt=[],$t=0;$t<z;$t++){var Vt=tt[$t];Vt.visible&&(Ls(Vt,!0),nA(Vt,!0),Dt[Vt.row]||(Dt[Vt.row]=[]),Dt[Vt.row][Vt.column]||(Dt[Vt.row][Vt.column]=[]),Dt[Vt.row][Vt.column].push(Vt))}ci(tt);var ae=li(),ce=li(),ge=li(),we={count:0},He={count:0},di=y,Pi=x,wi=a.rowDefs,Gn=a.colDefs,wn=null;z=wi.length;for(var fr=0;fr<z;fr++)wn=wi[fr],wn!==void 0&&(wn.actual=0);z=Gn.length;for(var rr=0;rr<z;rr++)wn=Gn[rr],wn!==void 0&&(wn.actual=0);for(var oo=Dt.length,Bo=0,Xs=0;Xs<oo;Xs++)Dt[Xs]&&(Bo=Math.max(Bo,Dt[Xs].length));var ta=Math.min(a.topIndex,oo-1),za=Math.min(a.leftIndex,Bo-1),Js=0;oo=Dt.length;for(var Lc=ll(a),bs=0;bs<oo;bs++)if(Dt[bs]){Bo=Dt[bs].length;var lA=a.Fb(bs);lA.actual=0;for(var Ga=lA.oc=0;Ga<Bo;Ga++)if(Dt[bs][Ga]){var Mc=a.Eb(Ga);ae[Ga]===void 0&&(Mc.actual=0,Mc.oc=0,ae[Ga]=!0);for(var eu=Dt[bs][Ga],Su=eu.length,Rl=0;Rl<Su;Rl++){var Cl=eu[Rl];if(Cl.visible||Cl===Lc){var md=1<Cl.rowSpan||1<Cl.columnSpan;md&&(bs<ta||Ga<za||ce.push(Cl));var uA=Cl.margin,Kg=uA.right+uA.left,Hl=uA.top+uA.bottom,ja=$o(Cl,lA,Mc,!1),Gp=Cl.desiredSize,$f=!isNaN(Gp.height),LA=!isNaN(Gp.width)&&$f;if(md||ja===Pn||LA||bs<ta||Ga<za||(we[Ga]!==void 0||ja!==bn&&ja!==Hi||(we[Ga]=-1,we.count++),He[bs]!==void 0||ja!==bn&&ja!==Ji||(He[bs]=-1,He.count++),ge.push(Cl)),Cl.measure(1/0,1/0,0,0),!(bs<ta||Ga<za)){var Pl=Cl.measuredBounds,of=Math.max(Pl.width+Kg,0),_l=Math.max(Pl.height+Hl,0);if(Cl.rowSpan===1&&(ja===Pn||ja===Hi)){wn=a.Fb(bs);var vd=wn.Wc();Js=Math.max(_l-wn.actual,0),Js+vd>Pi&&(Js=Math.max(Pi-vd,0));var wm=wn.oa===0;wn.oc=wn.oc+Js,wn.actual=wn.oa+Js,Pi=Math.max(Pi-(Js+(wm?vd:0)),0)}if(Cl.columnSpan===1&&(ja===Pn||ja===Ji)){wn=a.Eb(Ga);var jp=wn.Wc();Js=Math.max(of-wn.actual,0),Js+jp>di&&(Js=Math.max(di-jp,0));var iy=wn.oa===0;wn.oc=wn.oc+Js,wn.actual=wn.oa+Js,di=Math.max(di-(Js+(iy?jp:0)),0)}md&&Cl.Uj()}}}}}ci(ae);var uh=0,Th=0;z=a.columnCount;for(var qf=0;qf<z;qf++){var yd=Gn[qf];yd!==void 0&&(uh+=isNaN(yd.Hc)?yd.oc:yd.Hc,yd.oc!==0&&(uh+=yd.Wc()))}z=a.rowCount;for(var zg=0;zg<z;zg++){var wd=wi[zg];wd!==void 0&&(Th+=isNaN(wd.Hc)?wd.oc:wd.Hc,wd.oc!==0&&(Th+=wd.Wc()))}di=Math.max(y-uh,0);var Ah=Pi=Math.max(x-Th,0),bc=di;z=ge.length;for(var Fl=0;Fl<z;Fl++){var MA=ge[Fl],xm=a.Fb(MA.row),Nh=a.Eb(MA.column),Gg=MA.measuredBounds,AA=MA.margin,sf=AA.right+AA.left,bA=AA.top+AA.bottom;we[MA.column]=Nh.oc===0&&we[MA.column]!==void 0?Math.max(Gg.width+sf,we[MA.column]):null,He[MA.row]=xm.oc===0&&He[MA.row]!==void 0?Math.max(Gg.height+bA,He[MA.row]):null}var tg=0,jg=0,Vu;for(Vu in He)Vu!=="count"&&(tg+=He[Vu]);for(Vu in we)Vu!=="count"&&(jg+=we[Vu]);for(var ha=on.alloc(),Vp=0;Vp<z;Vp++){var el=ge[Vp];if(el.visible||el===Lc){var ks=a.Fb(el.row),nl=a.Eb(el.column),Dh=0;isFinite(nl.width)?Dh=nl.width:(isFinite(di)&&we[el.column]!==null?jg===0?Dh=nl.actual+di:Dh=we[el.column]/jg*bc:we[el.column]!==null?Dh=di:Dh=nl.actual||di,Dh=Math.max(0,Dh-nl.Wc()));var kc=0;switch(isFinite(ks.height)?kc=ks.height:(isFinite(Pi)&&He[el.row]!==null?tg===0?kc=ks.actual+Pi:kc=He[el.row]/tg*Ah:He[el.row]!==null?kc=Pi:kc=ks.actual||Pi,kc=Math.max(0,kc-ks.Wc())),ha.h(Math.max(nl.minimum,Math.min(Dh,nl.maximum)),Math.max(ks.minimum,Math.min(kc,ks.maximum))),ja=$o(el,ks,nl,!1),ja){case Hi:ha.height=Math.max(ha.height,ks.actual+Pi);break;case Ji:ha.width=Math.max(ha.width,nl.actual+di)}var af=el.margin,ry=af.right+af.left,Sm=af.top+af.bottom;el.Uj(),el.measure(ha.width,ha.height,nl.minimum,ks.minimum);var Vg=el.measuredBounds,lf=Math.max(Vg.width+ry,0),eg=Math.max(Vg.height+Sm,0);isFinite(di)&&(lf=Math.min(lf,ha.width)),isFinite(Pi)&&(eg=Math.min(eg,ha.height));var El=0;El=ks.actual,ks.actual=Math.max(ks.actual,eg),ks.oc=Math.max(ks.oc,eg),Js=ks.actual-El,Pi=Math.max(Pi-Js,0),He[el.row]===null&&(Ah=Math.max(Ah-Js,0)),El=nl.actual,nl.actual=Math.max(nl.actual,lf),nl.oc=Math.max(nl.oc,lf),Js=nl.actual-El,di=Math.max(di-Js,0),we[el.column]===null&&(bc=Math.max(bc-Js,0))}}ci(ge);var Ih=on.alloc(),hA=li(),cu=li();if(z=ce.length,z!==0){for(var xd=0;xd<oo;xd++)if(Dt[xd]){Bo=Dt[xd].length;var Zg=a.Fb(xd);hA[xd]=Zg.actual;for(var Sd=0;Sd<Bo;Sd++)if(Dt[xd][Sd]){var Bm=a.Eb(Sd);cu[Sd]=Bm.actual}}}for(var Wg=0;Wg<z;Wg++){var ds=ce[Wg];if(ds.visible||ds===Lc){var Zu=a.Fb(ds.row),Bu=a.Eb(ds.column);switch(ha.h(Math.max(Bu.minimum,Math.min(y,Bu.maximum)),Math.max(Zu.minimum,Math.min(x,Zu.maximum))),ja=$o(ds,Zu,Bu,!1),ja){case bn:cu[Bu.index]!==0&&(ha.width=Math.min(ha.width,cu[Bu.index])),hA[Zu.index]!==0&&(ha.height=Math.min(ha.height,hA[Zu.index]));break;case Hi:cu[Bu.index]!==0&&(ha.width=Math.min(ha.width,cu[Bu.index]));break;case Ji:hA[Zu.index]!==0&&(ha.height=Math.min(ha.height,hA[Zu.index]))}isFinite(Bu.width)&&(ha.width=Bu.width),isFinite(Zu.height)&&(ha.height=Zu.height),Ih.h(0,0);for(var Cm=Bu.minimum,Kl=Zu.minimum,Tc=1;Tc<ds.rowSpan&&!(ds.row+Tc>=a.rowCount);Tc++)wn=a.Fb(ds.row+Tc),Js=0,Js=ja===bn||ja===Ji?Math.max(wn.minimum,hA[ds.row+Tc]===0?wn.maximum:Math.min(hA[ds.row+Tc],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),Ih.height+=Js,Kl+=wn.minimum;for(var Cu=1;Cu<ds.columnSpan&&!(ds.column+Cu>=a.columnCount);Cu++)wn=a.Eb(ds.column+Cu),Js=0,Js=ja===bn||ja===Hi?Math.max(wn.minimum,cu[ds.column+Cu]===0?wn.maximum:Math.min(cu[ds.column+Cu],wn.maximum)):Math.max(wn.minimum,isNaN(wn.Hc)?wn.maximum:Math.min(wn.Hc,wn.maximum)),Ih.width+=Js,Cm+=wn.minimum;ha.width+=Ih.width,ha.height+=Ih.height;var Yg=ds.margin,Bd=Yg.right+Yg.left,Zp=Yg.top+Yg.bottom;ds.measure(ha.width,ha.height,Cm,Kl);for(var Xg=ds.measuredBounds,kA=Math.max(Xg.width+Bd,0),uf=Math.max(Xg.height+Zp,0),Cd=0,Jg=0;Jg<ds.rowSpan&&!(ds.row+Jg>=a.rowCount);Jg++)wn=a.Fb(ds.row+Jg),Cd+=wn.total||0;if(Cd<uf){var Nc=uf-Cd,hh=uf-Cd;if(ds.spanAllocation!==null)for(var Dc=ds.spanAllocation,Uh=0;Uh<ds.rowSpan&&!(0>=Nc)&&!(ds.row+Uh>=a.rowCount);Uh++){wn=a.Fb(ds.row+Uh);var Ic=wn.oa||0,Af=Dc(ds,wn,hh);wn.actual=Math.min(wn.maximum,Ic+Af),wn.oa!==Ic&&(Nc-=wn.oa-Ic)}for(;0<Nc;){var cA=wn.oa||0;if(isNaN(wn.height)&&wn.maximum>cA&&(wn.actual=Math.min(wn.maximum,cA+Nc),wn.oa!==cA&&(Nc-=wn.oa-cA)),wn.index===0)break;wn=a.Fb(wn.index-1)}}for(var ng=0,Uc=0;Uc<ds.columnSpan&&!(ds.column+Uc>=a.columnCount);Uc++)wn=a.Eb(ds.column+Uc),ng+=wn.total||0;if(ng<kA){var ig=kA-ng,oy=kA-ng;if(ds.spanAllocation!==null)for(var Qh=ds.spanAllocation,hf=0;hf<ds.columnSpan&&!(0>=ig)&&!(ds.column+hf>=a.columnCount);hf++){wn=a.Eb(ds.column+hf);var Wp=wn.oa||0,sy=Qh(ds,wn,oy);wn.actual=Math.min(wn.maximum,Wp+sy),wn.oa!==Wp&&(ig-=wn.oa-Wp)}for(;0<ig;){var Pm=wn.oa||0;if(isNaN(wn.width)&&wn.maximum>Pm&&(wn.actual=Math.min(wn.maximum,Pm+ig),wn.oa!==Pm&&(ig-=wn.oa-Pm)),wn.index===0)break;wn=a.Eb(wn.index-1)}}}}ci(ce),on.free(Ih),on.free(ha),hA!==void 0&&ci(hA),cu!==void 0&&ci(cu);var rg=0,og=0,Fm=a.desiredSize,vw=a.maxSize;ja=_a(a,!0);var Yp=Th=uh=0,Xp=0;z=a.columnCount;for(var Em=0;Em<z;Em++)Gn[Em]!==void 0&&(wn=a.Eb(Em),isFinite(wn.width)?(Yp+=wn.width,Yp+=wn.Wc()):a0(wn)===ap?(Yp+=wn.oa,Yp+=wn.Wc()):wn.oa!==0&&(uh+=wn.oa,uh+=wn.Wc()));isFinite(Fm.width)?rg=Math.min(Fm.width,vw.width):rg=ja!==Pn&&isFinite(y)?y:uh,rg=Math.max(rg,a.minSize.width),rg=Math.max(rg-Yp,0);for(var rx=uh===0?1:Math.max(rg/uh,1),Lm=0;Lm<z;Lm++)Gn[Lm]!==void 0&&(wn=a.Eb(Lm),isFinite(wn.width)||a0(wn)===ap||(wn.actual=wn.oa*rx),wn.position=b.width,wn.oa!==0&&(b.width+=wn.oa,b.width+=wn.Wc()));z=a.rowCount;for(var Mm=0;Mm<z;Mm++)wi[Mm]!==void 0&&(wn=a.Fb(Mm),isFinite(wn.height)?(Xp+=wn.height,Xp+=wn.Wc()):a0(wn)===ap?(Xp+=wn.oa,Xp+=wn.Wc()):wn.oa!==0&&(Th+=wn.oa,Th+=wn.Wc()));isFinite(Fm.height)?og=Math.min(Fm.height,vw.height):og=ja!==Pn&&isFinite(x)?x:Th,og=Math.max(og,a.minSize.height),og=Math.max(og-Xp,0);for(var ox=Th===0?1:Math.max(og/Th,1),bm=0;bm<z;bm++)wi[bm]!==void 0&&(wn=a.Fb(bm),isFinite(wn.height)||a0(wn)===ap||(wn.actual=wn.oa*ox),wn.position=b.height,wn.oa!==0&&(b.height+=wn.oa,b.height+=wn.Wc()));z=rt.length;for(var ay=0;ay<z;ay++){var Jp=rt[ay],ly=0,uy=0;Jp.type===En.TableRow?(ly=b.width,wn=a.Fb(Jp.row),uy=wn.actual):(wn=a.Eb(Jp.column),ly=wn.actual,uy=b.height),Jp.measuredBounds.h(0,0,ly,uy),Ls(Jp,!1)}ci(rt),a.inRowsCols=Dt},La.prototype.arrange=function(a,y,x){var E=y.length,b=a.padding,z=b.left;b=b.top;var tt=a.inRowsCols;if(tt!==null){for(var rt,ot,lt=tt.length,ut=0,ft=0;ft<lt;ft++)tt[ft]&&(ut=Math.max(ut,tt[ft].length));ot=a.rowDefs,rt=a.colDefs;var yt=ft=0,Mt=Math.min(a.topIndex,lt-1);if(0<ot.length){for(;Mt!==lt&&(ot[Mt]===void 0||ot[Mt].oa===0);)Mt++;Mt=Math.max(Math.min(Mt,lt-1),0),ft=-ot[Mt].position}var Tt=Math.min(a.leftIndex,ut-1);if(0<rt.length){for(;Tt!==ut&&(rt[Tt]===void 0||rt[Tt].oa===0);)Tt++;Tt=Math.max(Math.min(Tt,ut-1),0),yt=-rt[Tt].position}for(var Dt=0,$t=0;Dt!==lt&&ot[Dt]===void 0;)Dt++;for(;$t!==lt&&rt[$t]===void 0;)$t++;ut=a.part,a.Fb(Dt),a.Eb($t);for(var Vt=0;Vt<y.length;Vt++){var ae=y[Vt];if(ae instanceof En&&ae.visible&&vc(ae)){if(ae.type===En.TableRow){rt=a.Fb(ae.row);var ce=a.Eb($t)}else rt=a.Fb(Dt),ce=a.Eb(ae.column);ot=rt.position+ft+b,rt.oa!==0&&(ot+=rt.Io(Math.max(Dt,Mt))),rt=ce.position+yt+z,ce.oa!==0&&(rt+=ce.Io(Math.max($t,Tt))),ce=ae.measuredBounds,ae.Uk(),ae.actualBounds.ka();var ge=ae.actualBounds,we=Oe.allocAt(ge.x,ge.y,ge.width,ge.height);ge.x=ae.type===En.TableRow?z:rt,ge.y=ae.type===En.TableColumn?b:ot,ge.width=ce.width,ge.height=ce.height,ae.actualBounds.freeze(),nA(ae,!1),Ar(we,ge)||ut===null||(ut.oh(),ae.Pn(ut)),Oe.free(we)}}for(Vt=on.alloc(),ae=0;ae<lt;ae++)if(tt[ae]){for(ut=tt[ae].length,ce=a.Fb(ae),ot=ce.position+ft+b,ce.oa!==0&&(ot+=ce.Io(Math.max(Dt,Mt))),ge=0;ge<ut;ge++)if(tt[ae][ge]){we=a.Eb(ge),rt=we.position+yt+z,we.oa!==0&&(rt+=we.Io(Math.max($t,Tt)));for(var He=tt[ae][ge],di=He.length,Pi=0;Pi<di;Pi++){var wi=He[Pi],Gn=wi.measuredBounds;Vt.h(0,0);for(var wn=1;wn<wi.rowSpan&&!(ae+wn>=a.rowCount);wn++){var fr=a.Fb(ae+wn);fr.oa!==0&&(Vt.height+=fr.total)}for(wn=1;wn<wi.columnSpan&&!(ge+wn>=a.columnCount);wn++)fr=a.Eb(ge+wn),fr.oa!==0&&(Vt.width+=fr.total);var rr=we.oa+Vt.width,oo=ce.oa+Vt.height;wn=rt,fr=ot;var Bo=rr,Xs=oo,ta=rt,za=ot,Js=rr,Lc=oo;rt+rr>x.width&&(Js=Math.max(x.width-rt,0)),ot+oo>x.height&&(Lc=Math.max(x.height-ot,0));var bs=wi.alignment;if(bs.Xb()){bs=a.defaultAlignment,bs.sb()||(bs=cr);var lA=bs.x,Ga=bs.y,Mc=bs.offsetX;bs=bs.offsetY;var eu=we.alignment,Su=ce.alignment;eu.sb()&&(lA=eu.x,Mc=eu.offsetX),Su.sb()&&(Ga=Su.y,bs=Su.offsetY)}else lA=bs.x,Ga=bs.y,Mc=bs.offsetX,bs=bs.offsetY;(isNaN(lA)||isNaN(Ga))&&(Ga=lA=.5,bs=Mc=0),eu=Gn.width,Su=Gn.height;var Rl=wi.margin,Cl=Rl.left+Rl.right,md=Rl.top+Rl.bottom,uA=$o(wi,ce,we,!1);!isNaN(wi.desiredSize.width)||uA!==bn&&uA!==Hi||(eu=Math.max(rr-Cl,0)),!isNaN(wi.desiredSize.height)||uA!==bn&&uA!==Ji||(Su=Math.max(oo-md,0)),rr=wi.maxSize,oo=wi.minSize,eu=Math.min(rr.width,eu),Su=Math.min(rr.height,Su),eu=Math.max(oo.width,eu),Su=Math.max(oo.height,Su),rr=Su+md,wn+=Bo*lA-(eu+Cl)*lA+Mc+Rl.left,fr+=Xs*Ga-rr*Ga+bs+Rl.top,wi.visible&&(fo(ta,za,Js,Lc,wn,fr,Gn.width,Gn.height)?wi.arrange(wn,fr,eu,Su):wi.arrange(wn,fr,eu,Su,new Oe(ta,za,Js,Lc)))}}}for(on.free(Vt),a=0;a<E;a++)x=y[a],z=x instanceof En?x:null,z!==null&&vc(z)&&(z=x.actualBounds,x.naturalBounds.ka(),x.naturalBounds.h(0,0,z.width,z.height),x.naturalBounds.freeze())}};function Il(){this.xa="Base"}Ge(Il,co),Il.prototype.measure=function(){},Il.prototype.arrange=function(){};function $l(){this.xa="Base"}Ge($l,co),$l.prototype.measure=function(){},$l.prototype.arrange=function(){};function zs(){this.xa="Base"}Ge(zs,co),zs.prototype.measure=function(a,y,x,E,b,z,tt){1<E.length&&se("Viewbox Panel cannot contain more than one GraphObject."),E=E[0],E.Ca=1,E.Uj(),E.measure(1/0,1/0,z,tt);var rt=E.measuredBounds,ot=E.margin,lt=ot.right+ot.left;if(ot=ot.top+ot.bottom,isFinite(y)||isFinite(x)){var ut=E.scale,ft=rt.width;rt=rt.height;var yt=Math.max(y-lt,0),Mt=Math.max(x-ot,0),Tt=1;a.viewboxStretch===Ii?ft!==0&&rt!==0&&(Tt=Math.min(yt/ft,Mt/rt)):ft!==0&&rt!==0&&(Tt=Math.max(yt/ft,Mt/rt)),Tt===0&&(Tt=1e-4),E.Ca*=Tt,ut!==E.scale&&(Ls(E,!0),E.measure(1/0,1/0,z,tt))}rt=E.measuredBounds,b.width=isFinite(y)?y:Math.max(rt.width+lt,0),b.height=isFinite(x)?x:Math.max(rt.height+ot,0)},zs.prototype.arrange=function(a,y,x){y=y[0];var E=y.measuredBounds,b=y.margin,z=Math.max(E.width+(b.right+b.left),0);b=Math.max(E.height+(b.top+b.bottom),0);var tt=y.alignment;tt.Xb()&&(tt=a.defaultAlignment),tt.sb()||(tt=cr),y.arrange(x.width*tt.x-z*tt.x+tt.offsetX,x.height*tt.y-b*tt.y+tt.offsetY,E.width,E.height)};function Ka(){this.xa="Base"}Ge(Ka,co),Ka.prototype.measure=function(){},Ka.prototype.arrange=function(){},Ka.prototype.gc=function(a,y,x){x=a.Df()*x.scale,0>=x&&(x=1);var E=a.gridCellSize,b=E.width;E=E.height;var z=a.naturalBounds,tt=a.actualBounds,rt=z.width,ot=z.height,lt=Math.ceil(rt/b),ut=Math.ceil(ot/E),ft=a.gridOrigin,yt=ft.x;ft=ft.y,y.save(),y.beginPath(),y.rect(0,0,rt,ot),y.clip(),y.Se();for(var Mt=[],Tt=a.O.s,Dt=Tt.length,$t=0;$t<Dt;$t++){var Vt=Tt[$t],ae=[];if(Mt.push(ae),Vt.visible){var ce=Vt.interval;if(!(0>ce)){Vt=Mh(Vt.figure);for(var ge=0;ge<Dt;ge++)if(ge!==$t){var we=Tt[ge];we.visible&&Mh(we.figure)===Vt&&(we=we.interval,we>ce&&ae.push(we))}}}}for(Tt=a.O.s,Dt=Tt.length,$t=0;$t<Dt;$t++){var He=Tt[$t];if(He.visible&&(ae=He.interval||1,Vt=Math.abs(ae),!(2>b*Vt*x))){if(ce=He.segmentIndex,(!isFinite(ce)||isNaN(ce))&&(ce=0),0>ce&&(ce=Vt-Math.min(-ce,Vt)),ce=Math.round(ce%Vt),Vt=He.opacity,ge=1,Vt!==1){if(Vt===0)continue;ge=y.globalAlpha,y.globalAlpha=ge*Vt}we=Mt[$t];var di=!1,Pi=He.strokeDashArray;if(Pi!==null&&(di=!0,y.js(Pi,He.strokeDashOffset)),He.figure==="LineV"&&He.stroke!==null&&0<He.strokeWidth){for(y.lineWidth=He.strokeWidth,Xo(a,y,He.stroke,!1,!1,z,tt),y.beginPath(),Pi=He=Math.floor((yt-b)/b);Pi<=He+lt;Pi++){var wi=Pi*b+yt;0<=wi&&wi<=rt&&CA(Pi,ae,ce,we)&&(y.moveTo(wi,0),y.lineTo(wi,ot))}y.stroke(),y.Se()}else if(He.figure==="LineH"&&He.stroke!==null&&0<He.strokeWidth){for(y.lineWidth=He.strokeWidth,Xo(a,y,He.stroke,!1,!1,z,tt),y.beginPath(),Pi=He=Math.floor((ft-E)/E);Pi<=He+ut;Pi++)wi=Pi*E+ft,0<=wi&&wi<=ot&&CA(Pi,ae,ce,we)&&(y.moveTo(0,wi),y.lineTo(rt,wi));y.stroke(),y.Se()}else if(He.figure==="BarV"&&He.fill!==null)for(Xo(a,y,He.fill,!0,!1,z,tt),He=He.width,isNaN(He)&&(He=b),wi=Pi=Math.floor((yt-b)/b);wi<=Pi+lt;wi++){var Gn=wi*b+yt;0<=Gn+He&&Gn<=rt&&CA(wi,ae,ce,we)&&y.fillRect(Gn,0,He,ot)}else if(He.figure==="BarH"&&He.fill!==null)for(Xo(a,y,He.fill,!0,!1,z,tt),He=He.height,isNaN(He)&&(He=E),wi=Pi=Math.floor((ft-E)/E);wi<=Pi+ut;wi++)Gn=wi*E+ft,0<=Gn+He&&Gn<=ot&&CA(wi,ae,ce,we)&&y.fillRect(0,Gn,rt,He);di&&y.fs(),Vt!==1&&(y.globalAlpha=ge)}}y.restore(),y.Vc(!1)};function CA(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 Ul(){this.xa="Base"}Ge(Ul,co),Ul.prototype.measure=function(a,y,x,E,b){var z=E.length;if(a instanceof ro||a instanceof Yn){var tt=null,rt=null;if(a instanceof Yn&&(tt=a),a instanceof ro&&(rt=a,tt=rt.adornedPart,a.j===null&&(a.j=[])),tt instanceof Yn){var ot=tt;if(z===0)Nr(a.naturalBounds,0,0),a.measuredBounds.h(0,0,0,0);else{var lt=a instanceof ro?null:tt.path;y=tt.routeBounds,x=a.jg,x.h(0,0,y.width,y.height);var ut=ot.points,ft=tt.pointsCount;rt!==null?rt.Ul(!1):tt!==null&&tt.Ul(!1),rt=y.width;var yt=y.height,Mt=a.j;if(Mt.length=0,lt!==null){au(a,rt,yt,lt);var Tt=lt.measuredBounds;x.ed(Tt),Mt.push(Tt)}Tt=ir.alloc();for(var Dt=Ot.alloc(),$t=Ot.alloc(),Vt=0;Vt<z;Vt++){var ae=E[Vt];if(ae!==lt)if(ae.isPanelMain&&ae instanceof Cr){au(a,rt,yt,ae);var ce=ae.measuredBounds;x.ed(ce),Mt.push(ce)}else if(2>ft)ae.measure(1/0,1/0,0,0),ce=ae.measuredBounds,x.ed(ce),Mt.push(ce);else{var ge=ae.segmentIndex,we=ae.segmentFraction,He=ae.alignmentFocus;He.Mc()&&(He=cr);var di=ae.segmentOrientation,Pi=ae.segmentOffset;if(isNaN(ge)){var wi=ot.ua;ce=li(),wi.Qu(we,ce);var Gn=Ot.allocAt(ce[0],ce[1]);if(Gn.add(ot.i(0)),wi.type===Hn.j?Gn.offset(-wi.startX,-wi.startY):(wi=wi.figures.first(),wi!==null&&Gn.offset(-wi.startX,-wi.startY)),wi=ce[2],di!==Xa){var wn=ot.computeAngle(ae,di,wi);ae.Kb=wn}wn=Gn.x-y.x;var fr=Gn.y-y.y;Ot.free(Gn),ci(ce)}else if(ge<-ft||ge>=ft)ce=Ot.alloc(),ot.vg(),ot.computeMidPoint(ce),wi=ot.midAngle,di!==Xa&&(wn=ot.computeAngle(ae,di,wi),ae.Kb=wn),wn=ce.x-y.x,fr=ce.y-y.y,Ot.free(ce);else{if(wn=0,0<=ge?(fr=ut.M(ge),ce=ge<ft-1?ut.M(ge+1):fr):(wn=ft+ge,fr=ut.M(wn),ce=0<wn?ut.M(wn-1):fr),fr.Xa(ce)){0<=ge?(wi=0<ge?ut.M(ge-1):fr,wn=ge<ft-2?ut.M(ge+2):ce):(wi=wn<ft-1?ut.M(wn+1):fr,wn=1<wn?ut.M(wn-2):ce),Gn=wi.Bf(fr);var rr=ce.Bf(wn);wi=Gn>rr+10?0<=ge?wi.ab(fr):fr.ab(wi):rr>Gn+10?0<=ge?ce.ab(wn):wn.ab(ce):0<=ge?wi.ab(wn):wn.ab(wi)}else wi=0<=ge?fr.ab(ce):ce.ab(fr);di!==Xa&&(wn=ot.computeAngle(ae,di,wi),ae.Kb=wn),wn=fr.x+(ce.x-fr.x)*we-y.x,fr=fr.y+(ce.y-fr.y)*we-y.y}ae.measure(1/0,1/0,0,0),ce=ae.measuredBounds,Gn=ae.naturalBounds;var oo=0;ae instanceof Cr&&(oo=ae.strokeWidth),rr=Gn.width+oo;var Bo=Gn.height+oo;Tt.reset(),Tt.translate(-ce.x,-ce.y),Tt.scale(ae.scale,ae.scale),Tt.rotate(di===Xa?ae.angle:wi,rr/2,Bo/2),di!==mp&&di!==yp||Tt.rotate(90,rr/2,Bo/2),di!==vp&&di!==wp||Tt.rotate(-90,rr/2,Bo/2),di===T0&&(45<wi&&135>wi||225<wi&&315>wi)&&Tt.rotate(-wi,rr/2,Bo/2),Gn=new Oe(0,0,rr,Bo),Dt.xi(Gn,He),Tt.Ga(Dt),He=-Dt.x+oo/2*ae.scale,ae=-Dt.y+oo/2*ae.scale,$t.assign(Pi),oo=isNaN(Pi.x);var Xs=isNaN(Pi.y);if(oo||Xs){rr=rr/2+3,Bo=Bo/2+3;var ta=45<=wi&&135>=wi,za=225<=wi&&315>=wi;di===Xa&&(ta||za)?($t.x=Xs?rr:Pi.y,$t.y=oo?Bo:Pi.x,ta?0<=ge||isNaN(ge)&&.5>we||!oo||($t.y=-Bo):za&&((0<=ge||isNaN(ge)&&.5>we)&&oo&&($t.y=-Bo),Xs&&($t.x=-rr))):(oo&&($t.x=0<=ge||isNaN(ge)&&.5>we?rr:-rr),Xs&&($t.y=-Bo),$t.rotate(wi))}else $t.rotate(wi);wn+=$t.x,fr+=$t.y,Gn.set(ce),Gn.h(wn+He,fr+ae,ce.width,ce.height),Mt.push(Gn),x.ed(Gn)}}if(tt!==null)for(E=tt.labelNodes;E.next();)E.value.measure(1/0,1/0);a.jg=x,a.position.h(y.x+x.x,y.y+x.y),Nr(b,x.width||0,x.height||0),ir.free(Tt),Ot.free(Dt),Ot.free($t)}}}},Ul.prototype.arrange=function(a,y){var x=y.length;if(a instanceof ro||a instanceof Yn){var E=a,b=null;a instanceof ro&&(b=a,E=b.adornedPart);var z=a instanceof ro?null:E.path,tt=a.j;if(tt.length!==0){var rt=0;if(z!==null&&rt<tt.length){var ot=tt[rt];rt++,z.arrange(ot.x-a.jg.x,ot.y-a.jg.y,ot.width,ot.height)}for(ot=0;ot<x;ot++){var lt=y[ot];if(lt!==z&&rt<tt.length){var ut=tt[rt];rt++,lt.arrange(ut.x-a.jg.x,ut.y-a.jg.y,ut.width,ut.height)}}}if(y=E.points,x=y.count,2<=x&&a instanceof Yn)for(z=a.labelNodes;z.next();){var ft=a;tt=z.value,rt=tt.segmentIndex,ot=tt.segmentFraction;var yt=tt.alignmentFocus;if(lt=tt.segmentOrientation,ut=tt.segmentOffset,isNaN(rt)){var Mt=ft.ua,Tt=li();Mt.Qu(ot,Tt);var Dt=Ot.allocAt(Tt[0],Tt[1]);Dt.add(ft.i(0)),Mt.type===Hn.j||(Mt=Mt.figures.first()),Dt.offset(-Mt.startX,-Mt.startY),Mt=Tt[2],lt!==Xa&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=Dt.x;var $t=Dt.y;Ot.free(Dt),ci(Tt)}else if(rt<-x||rt>=x)Tt=Ot.alloc(),Mt=ft,$t=Tt,Mt.vg(),Mt.computeMidPoint($t),Mt=ft.midAngle,lt!==Xa&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=Tt.x,$t=Tt.y,Ot.free(Tt);else{if(Dt=0,0<=rt?(Tt=y.s[rt],$t=rt<x-1?y.s[rt+1]:Tt):(Dt=x+rt,Tt=y.s[Dt],$t=0<Dt?y.s[Dt-1]:Tt),Tt.Xa($t)){0<=rt?(Mt=0<rt?y.s[rt-1]:Tt,Dt=rt<x-2?y.s[rt+2]:$t):(Mt=Dt<x-1?y.s[Dt+1]:Tt,Dt=1<Dt?y.s[Dt-2]:$t);var Vt=Mt.Bf(Tt),ae=$t.Bf(Dt);Mt=Vt>ae+10?0<=rt?Mt.ab(Tt):Tt.ab(Mt):ae>Vt+10?0<=rt?$t.ab(Dt):Dt.ab($t):0<=rt?Mt.ab(Dt):Dt.ab(Mt)}else Mt=0<=rt?Tt.ab($t):$t.ab(Tt);lt!==Xa&&(ft=ft.computeAngle(tt,lt,Mt),tt.angle=ft),ft=Tt.x+($t.x-Tt.x)*ot,$t=Tt.y+($t.y-Tt.y)*ot}if(yt.ys())tt.location=new Ot(ft,$t);else{yt.Mc()&&(yt=cr),Tt=ir.alloc(),Tt.reset(),Tt.scale(tt.scale,tt.scale),Tt.rotate(tt.angle,0,0);var ce=tt.naturalBounds;Dt=Oe.allocAt(0,0,ce.width,ce.height),Vt=Ot.alloc(),Vt.xi(Dt,yt),Tt.Ga(Vt),yt=-Vt.x,ae=-Vt.y;var ge=ce.width,we=ce.height;ce=Ot.alloc(),ce.assign(ut);var He=isNaN(ut.x),di=isNaN(ut.y);if(He||di){ge=ge/2+3,we=we/2+3;var Pi=45<=Mt&&135>=Mt,wi=225<=Mt&&315>=Mt;lt===Xa&&(Pi||wi)?(ce.x=di?ge:ut.y,ce.y=He?we:ut.x,Pi?0<=rt||isNaN(rt)&&.5>ot||!He||(ce.y=-we):wi&&((0<=rt||isNaN(rt)&&.5>ot)&&He&&(ce.y=-we),di&&(ce.x=-ge))):(He&&(ce.x=0<=rt||isNaN(rt)&&.5>ot?ge:-ge),di&&(ce.y=-we),ce.rotate(Mt))}else ce.rotate(Mt);ft+=ce.x,$t+=ce.y,Tt.pp(Dt),yt+=Dt.x,ae+=Dt.y,rt=Ot.allocAt(ft+yt,$t+ae),tt.move(rt),Ot.free(rt),Ot.free(ce),Ot.free(Vt),Oe.free(Dt),ir.free(Tt)}}b!==null?b.Ul(!1):E.Ul(!1),E=Uy(a),a.location.h(a.position.x+E.x,a.position.y+E.y),Ot.free(E)}};function au(a,y,x,E){if(xl(E)!==!1){var b=E.strokeWidth;b===0&&a instanceof ro&&a.type===En.Link&&a.adornedObject instanceof Cr&&(b=a.adornedObject.strokeWidth),b*=E.Ca,a instanceof Yn&&a.ua!==null?(a=a.geometry.bounds,E.Ge(a.x-b/2,a.y-b/2,a.width+b,a.height+b)):a instanceof ro&&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),Ls(E,!1)}}function PA(){this.xa="Base"}Ge(PA,co),PA.prototype.measure=function(a,y,x,E,b,z,tt){var rt=a.Pb();a.graduatedBounds=[];var ot=rt.margin,lt=ot.right+ot.left,ut=ot.top+ot.bottom;rt.measure(y,x,z,tt);var ft=rt.measuredBounds,yt=new Oe(-ot.left,-ot.top,Math.max(ft.width+lt,0),Math.max(ft.height+ut,0));a.graduatedBounds.push(yt),b.assign(yt);for(var Mt=rt.geometry,Tt=rt.strokeWidth,Dt=Mt.flattenedSegments,$t=Mt.flattenedLengths,Vt=Mt.flattenedTotalLength,ae=Dt.length,ce=0,ge=0,we=li(),He=0;He<ae;He++){var di=Dt[He],Pi=[];ge=ce=0;for(var wi=di.length,Gn=0;Gn<wi;Gn+=2){var wn=di[Gn],fr=di[Gn+1];if(Gn!==0){var rr=180*Math.atan2(fr-ge,wn-ce)/Math.PI;0>rr&&(rr+=360),Pi.push(rr)}ce=wn,ge=fr}we.push(Pi)}if(a.graduatedIntervals===null){for(var oo=[],Bo=a.O.s,Xs=Bo.length,ta=0;ta<Xs;ta++){var za=Bo[ta],Js=[];if(oo.push(Js),za.visible){var Lc=za.interval;if(!(0>Lc)){for(var bs=0;bs<Xs;bs++)if(bs!==ta){var lA=Bo[bs];if(lA.visible&&za.constructor===lA.constructor){var Ga=lA.interval;Ga>Lc&&Js.push(Ga)}}}}}a.graduatedIntervals=oo}var Mc=a.graduatedIntervals,eu=a.O.s,Su=eu.length,Rl=0,Cl=0,md=Vt;a.graduatedMarks=[];for(var uA,Kg=0;Kg<Su;Kg++){var Hl=eu[Kg];if(uA=[],Hl.visible&&Hl!==rt){var ja=Math.abs(Hl.interval),Gp=a.graduatedTickUnit;if(!(2>Gp*ja*Vt/a.graduatedRange&&Hl.graduatedSkip===null)){var $f=$t[0][0],LA=0,Pl=0;Cl=Vt*Hl.graduatedStart-1e-4,md=Vt*Hl.graduatedEnd+1e-4;var of=Gp*ja,_l=a.graduatedTickBase;if(_l<a.graduatedMin){var vd=(a.graduatedMin-_l)/of;vd=vd%1===0?vd:Math.floor(vd+1),_l+=vd*of}else _l>a.graduatedMin+of&&(_l-=Math.floor((_l-a.graduatedMin)/of)*of);for(var wm=Mc[Kg],jp=_l,iy=1e-6*a.graduatedMax,uh=1;_l<=a.graduatedMax+iy;uh++){t:{for(var Th=wm.length,qf=0;qf<Th;qf++){var yd=(_l-a.graduatedTickBase)%(wm[qf]*a.graduatedTickUnit),zg=1e-6*a.graduatedTickUnit;if(yd<zg&&yd>-zg){var wd=!1;break t}}wd=!0}if(wd&&(_l>a.graduatedMax&&(_l=a.graduatedMax),Hl.graduatedSkip===null||Hl instanceof Mo&&!Hl.graduatedSkip(_l,Hl)||Hl instanceof Cr&&!Hl.graduatedSkip(_l,Hl))&&(Rl=(_l-a.graduatedMin)*Vt/a.graduatedRange,Rl>Vt&&(Rl=Vt),Cl<=Rl&&Rl<=md)){for(var Ah=we[LA][Pl],bc=$t[LA][Pl];LA<$t.length;){for(;Rl>$f&&Pl<$t[LA].length-1;)Pl++,Ah=we[LA][Pl],bc=$t[LA][Pl],$f+=bc;if(Rl<=$f)break;LA++,Pl=0,Ah=we[LA][Pl],bc=$t[LA][Pl],$f+=bc}var Fl=Dt[LA],MA=Fl[2*Pl],xm=Fl[2*Pl+1],Nh=(Rl-($f-bc))/bc,Gg=new Ot(MA+(Fl[2*Pl+2]-MA)*Nh+Tt/2-Mt.bounds.x,xm+(Fl[2*Pl+3]-xm)*Nh+Tt/2-Mt.bounds.y);Gg.scale(rt.scale,rt.scale);t:{var AA=Ah,sf=we[LA];if(!(.5005>Nh&&.4995<Nh)){var bA=AA;if(.5>Nh?0<Pl?bA=sf[Pl-1]:Be.$(Fl[0],Fl[Fl.length-2])&&Be.$(Fl[1],Fl[Fl.length-1])&&(bA=sf[sf.length-1]):.5<Nh&&(Pl+1<sf.length?bA=sf[Pl+1]:Be.$(Fl[0],Fl[Fl.length-2])&&Be.$(Fl[1],Fl[Fl.length-1])&&(bA=sf[0])),AA!==bA){var tg=Math.abs(AA-bA);if(180<tg&&(AA<bA?AA+=360:bA+=360,tg=Math.abs(AA-bA)),5e-4>Nh||.9995<Nh){Ah=(AA+bA)/2%360;break t}if(10>tg){var jg=1-Math.abs(.5-Nh);Ah=(AA*jg+bA*(1-jg))%360;break t}}}Ah=AA}if(Hl instanceof Mo){var Vu="";Hl.graduatedFunction!==null?(Vu=Hl.graduatedFunction(_l,Hl),Vu=Vu!=null?Vu.toString():""):Vu=(+_l.toFixed(2)).toString(),Vu!==""&&uA.push({$l:Gg,angle:Ah,text:Vu})}else uA.push({$l:Gg,angle:Ah})}_l=jp+uh*of}}}a.graduatedMarks.push(uA)}ci(we);var ha=a.graduatedMarks;if(ha!==null)for(var Vp=E.length,el=0;el<Vp;el++){var ks=E[el],nl=ha[el];if(ks.visible&&ks!==rt&&nl.length!==0){if(ks instanceof Cr){var Dh=a,kc=b,af=ks.alignmentFocus;af.Mc()&&(af=$r);var ry=ks.angle;ks.Kb=0,ks.measure(1/0,1/0,0,0),ks.Kb=ry;var Sm=ks.measuredBounds,Vg=Sm.width,lf=Sm.height,eg=Oe.allocAt(0,0,Vg,lf),El=Ot.alloc();El.xi(eg,af),Oe.free(eg);for(var Ih=-El.x,hA=-El.y,cu=new Oe,xd=nl.length,Zg=0;Zg<xd;Zg++)for(var Sd=nl[Zg],Bm=Sd.$l.x,Wg=Sd.$l.y,ds=Sd.angle,Zu=0;4>Zu;Zu++){switch(Zu){case 0:El.h(Ih,hA);break;case 1:El.h(Ih+Vg,hA);break;case 2:El.h(Ih,hA+lf);break;case 3:El.h(Ih+Vg,hA+lf)}El.rotate(ds+ks.angle),El.offset(Bm,Wg),Zg===0&&Zu===0?cu.h(El.x,El.y,0,0):cu.Ye(El),El.offset(-Bm,-Wg),El.rotate(-ds-ks.angle)}Ot.free(El),Dh.graduatedBounds!==null&&Dh.graduatedBounds.push(cu),Dr(kc,cu.x,cu.y,cu.width,cu.height)}else if(ks instanceof Mo){var Bu=a,Cm=b;Bu.temporaryTextBlock===null&&(Bu.temporaryTextBlock=new Mo);var Kl=Bu.temporaryTextBlock;Sy(Kl,ks);var Tc=ks.alignmentFocus;Tc.Mc()&&(Tc=$r);for(var Cu=ks.segmentOrientation,Yg=ks.segmentOffset,Bd=new Oe,Zp=0,Xg=0,kA=0,uf=0,Cd=0,Jg=nl.length,Nc=0;Nc<Jg;Nc++){var hh=nl[Nc];Zp=hh.$l.x,Xg=hh.$l.y,kA=hh.angle,Cd=uf=ks.angle,Cu!==Xa&&(Cd=Cu===pp||Cu===k0?kA+ks.angle:kA,uf=Yn.computeAngle(Cu,Cd)),Kl.Kb=uf,Kl.text=hh.text||"",Kl.measure(1/0,1/0,0,0);var Dc=Kl.measuredBounds,Uh=Kl.naturalBounds,Ic=Uh.width,Af=Uh.height,cA=ir.alloc();cA.reset(),cA.translate(-Dc.x,-Dc.y),cA.scale(Kl.scale,Kl.scale),cA.rotate(Cd,Ic/2,Af/2),Cu!==mp&&Cu!==yp||cA.rotate(90,Ic/2,Af/2),Cu!==vp&&Cu!==wp||cA.rotate(-90,Ic/2,Af/2),Cu===T0&&(45<kA&&135>kA||225<kA&&315>kA)&&cA.rotate(-kA,Ic/2,Af/2);var ng=Oe.allocAt(0,0,Ic,Af),Uc=Ot.alloc();Uc.xi(ng,Tc),cA.Ga(Uc);var ig=-Uc.x,oy=-Uc.y,Qh=Ot.alloc();Qh.assign(Yg),isNaN(Qh.x)&&(Qh.x=Ic/2+3),isNaN(Qh.y)&&(Qh.y=-(Af/2+3)),Qh.rotate(kA),Zp+=Qh.x+ig,Xg+=Qh.y+oy;var hf=new Oe(Zp,Xg,Dc.width,Dc.height),Wp=new Oe(Dc.x,Dc.y,Dc.width,Dc.height),sy=new Oe(Uh.x,Uh.y,Uh.width,Uh.height);hh.Sz=uf,hh.lineCount=Kl.lineCount,hh.lines=[Kl.Cb,Kl.Ih,Kl.df,Kl.Le,Kl.Qc,Kl.Qb,Kl.ze],hh.actualBounds=hf,hh.measuredBounds=Wp,hh.naturalBounds=sy,Nc===0?Bd.assign(hf):Bd.ed(hf),Ot.free(Qh),Ot.free(Uc),Oe.free(ng),ir.free(cA)}Bu.graduatedBounds!==null&&Bu.graduatedBounds.push(Bd),Dr(Cm,Bd.x,Bd.y,Bd.width,Bd.height)}Ls(ks,!1)}}},PA.prototype.arrange=function(a,y,x){if(a.graduatedBounds!==null){var E=a.Pb(),b=a.graduatedMarks;if(b!==null){var z=a.graduatedBounds,tt=0,rt=z[tt];tt++,E!==null&&E.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height);for(var ot=y.length,lt=0;lt<ot;lt++){var ut=y[lt];rt=b[lt],ut.visible&&ut!==E&&rt.length!==0&&(rt=z[tt],tt++,ut.arrange(rt.x-x.x,rt.y-x.y,rt.width,rt.height))}a.graduatedBounds=null}}},PA.prototype.gc=function(a,y,x){var E=x.$i;x.$i=!0;var b=a.naturalBounds,z=b.width,tt=b.height;b=y instanceof Wa,y.save(),y.beginPath(),y.rect(-1,-1,z+1,tt+1),y.clip(),y.Se(),z=a.Pb(),z.gc(y,x),tt=a.Df()*x.scale,0>=tt&&(tt=1);for(var rt=z.actualBounds,ot=a.O.s,lt=a.graduatedMarks,ut=ot.length,ft=0;ft<ut;ft++){var yt=ot[ft],Mt=lt[ft],Tt=Mt.length;if(yt.visible&&yt!==z&&Mt.length!==0){if(yt instanceof Cr){if(!(2>a.graduatedTickUnit*yt.interval*z.geometry.flattenedTotalLength/a.graduatedRange*tt&&yt.graduatedSkip===null)){var Dt=yt.measuredBounds,$t=yt.strokeWidth*yt.scale,Vt=yt.alignmentFocus;Vt.Mc()&&(Vt=$r);for(var ae=0;ae<Tt;ae++){var ce=Mt[ae].$l,ge=Mt[ae].angle,we=Vt,He=yt.Ab;He.reset(),He.translate(ce.x+rt.x,ce.y+rt.y),He.rotate(ge+yt.angle,0,0),He.translate(-Dt.width*we.x+we.offsetX+$t/2,-Dt.height*we.y+we.offsetY+$t/2),He.scale(yt.scale,yt.scale),Xl(yt,!1),yt.wh.set(yt.Ab),yt.Kk=yt.scale,Za(yt,!1),yt.gc(y,x),b&&(a.svg.appendChild(yt.svg),yt.svg=null),yt.Ab.reset()}}}else if(yt instanceof Mo)for(a.temporaryTextBlock===null&&(a.temporaryTextBlock=new Mo),Dt=a.temporaryTextBlock,Sy(Dt,yt),$t=0;$t<Tt;$t++)Vt=Mt[$t],Vt.actualBounds&&Vt.measuredBounds&&Vt.naturalBounds&&(Dt.ec=Vt.text||"",Dt.Kb=Vt.Sz||0,Dt.Gc=Vt.lineCount||0,ae=Vt.lines,ae!==void 0&&(Dt.Cb=ae[0],Dt.Ih=ae[1],Dt.df=ae[2],Dt.Le=ae[3],Dt.Qc=ae[4],Dt.Qb=ae[5],Dt.ze=ae[6]),Vt.naturalBounds&&(Dt.dc=Vt.naturalBounds),Vt.actualBounds&&(ae=Vt.actualBounds,Dt.arrange(ae.x,ae.y,ae.width,ae.height)),ae=Vt.actualBounds,Dt.arrange(ae.x,ae.y,ae.width,ae.height),ce=Vt.measuredBounds,Vt=Vt.naturalBounds,ge=Dt.Ab,ge.reset(),ge.translate(ae.x+rt.x,ae.y+rt.y),ge.translate(-ce.x,-ce.y),Dt.no(ge,Vt.x,Vt.y,Vt.width,Vt.height),Xl(Dt,!1),Dt.wh.set(Dt.Ab),Dt.Kk=Dt.scale,Za(Dt,!1),Dt.Ng=yt.part,Dt.Me=yt.panel,Dt.gc(y,x),Dt.Me=null,Dt.Ng=null,b&&(a.svg.appendChild(Dt.svg),Dt.svg=null))}}x.$i=E,y.restore(),y.Vc(!0)};function En(a,y){if(Se.call(this),this.na=null,a===void 0)this.na=En.Position;else if(typeof a=="string"){var x=Hu.I(a);x!==null&&(this.na=x)}else a instanceof co?this.na=a:a&&(this.na=En.Position,y=a);this.na===null&&se("Panel type not specified or PanelLayout not loaded: "+a),this.l=this.l|4194304|(this.na===En.Grid?1048576:0),this.O=new ee,this.yb=fs,this.Tm=Io,this.Uf=dr,this.$g=null,this.$e="",this.jg=new Oe(NaN,NaN,NaN,NaN),this.T=this.F=null,this.xo=Ii,this.jn=Fr,this.kn=vn,this.ub=this.ra=null,this.zn=NaN,this.ge=this.Hh=null,y&&Object.assign(this,y)}Ge(En,Se),En.prototype.cloneProtected=function(a){Se.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},En.prototype.Af=function(a){Se.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},En.prototype.copy=function(){var a=Se.prototype.copy.call(this);if(a!==null){for(var y=this.O.s,x=y.length,E=0;E<x;E++){var b=y[E].copy();b.wi(a),b.Ng=null;var z=a.O,tt=z.count;if(z.Gb(tt,b),z=a.part,z!==null){z.Rh=null,b.portId!==null&&z instanceof gi&&(z.Te=!0);var rt=a.diagram;rt!==null&&rt.undoManager.isUndoingRedoing||z.cb(as,"elements",a,null,b,null,tt)}}return a}return null},kt=En.prototype,kt.toString=function(){return"Panel("+this.type.name+")#"+ti(this)},kt.Pn=function(a){Se.prototype.Pn.call(this,a);for(var y=this.O.s,x=y.length,E=0;E<x;E++)y[E].Pn(a)},kt.hh=function(a,y){if(this.na===En.Grid)a.yc(),this.na.gc(this,a,y);else if(this.na===En.Graduated)a.yc(),this.na.gc(this,a,y);else{if(this.na===En.Table)if(a.yc(),a instanceof Wa){var x=a.yd;a.yd=yg(a,"gojs-ts"),$A(this,a),a.nh.pop(),a.yd=x}else $A(this,a);(x=this.isClipping&&this.na===En.Spot)&&a.save();for(var E=this.Pb(),b=this.O.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x&&rt===E&&(a.clipInsteadOfFill=!0),rt.gc(a,y),x&&rt===E&&(a.clipInsteadOfFill=!1)}x&&(a.restore(),a.Vc(!0))}};function $A(a,y){y.lineCap="butt";var x=0<a.rowCount?a.rowDefs:null,E=0<a.columnCount?a.colDefs:null;x!==null&&qA(a,y,!0,x,!0),E!==null&&qA(a,y,!1,E,!0),x!==null&&mc(a,y,!0,x),E!==null&&mc(a,y,!1,E),x!==null&&qA(a,y,!0,x,!1),E!==null&&qA(a,y,!1,E,!1)}function mc(a,y,x,E){for(var b=E.length,z=a.actualBounds,tt=a.naturalBounds,rt=!0,ot=0;ot<b;ot++){var lt=E[ot];if(lt!==void 0&&lt.actual!==0)if(rt)rt=!1;else{if(x){if(lt.position>tt.height)continue}else if(lt.position>tt.width)continue;var ut=lt.separatorStrokeWidth;isNaN(ut)&&(ut=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var ft=lt.separatorStroke;if(ft===null&&(ft=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),ut!==0&&ft!==null){Xo(a,y,ft,!1,!1,tt,z),ft=!1;var yt=lt.separatorDashArray;yt===null&&(yt=x?a.defaultRowSeparatorDashArray:a.defaultColumnSeparatorDashArray),yt!==null&&(ft=!0,y.js(yt,0)),y.beginPath(),yt=lt.position+ut,x?yt>tt.height&&(ut-=yt-tt.height):yt>tt.width&&(ut-=yt-tt.width),lt=lt.position+ut/2,y.lineWidth=ut,ut=a.yb,x?(lt+=ut.top,yt=tt.width-ut.right,y.moveTo(ut.left,lt),y.lineTo(yt,lt)):(lt+=ut.left,yt=tt.height-ut.bottom,y.moveTo(lt,ut.top),y.lineTo(lt,yt)),y.stroke(),y.Se(),ft&&y.fs()}}}}function qA(a,y,x,E,b){for(var z=E.length,tt=a.actualBounds,rt=a.naturalBounds,ot=th(a,!0),lt=th(a,!1),ut=0;ut<z;ut++){var ft=E[ut];if(ft!==void 0&&ft.background!==null&&ft.coversSeparators!==b&&ft.actual!==0){var yt=x?tt.height:tt.width;if(!(ft.position>yt)){var Mt=ft.Wc(),Tt=ft.separatorStrokeWidth;isNaN(Tt)&&(Tt=x?a.defaultRowSeparatorStrokeWidth:a.defaultColumnSeparatorStrokeWidth);var Dt=ft.separatorStroke;Dt===null&&(Dt=x?a.defaultRowSeparatorStroke:a.defaultColumnSeparatorStroke),(Dt===null||ft.index===(x?ot:lt))&&(Tt=0),Mt-=Tt,Tt=ft.position+Tt,Mt+=ft.actual,Tt+Mt>yt&&(Mt=yt-Tt),0>=Mt||(yt=a.yb,Xo(a,y,ft.background,!0,!1,rt,tt),x?y.fillRect(yt.left,Tt+yt.top,tt.width-(yt.left+yt.right),Mt):y.fillRect(Tt+yt.left,yt.top,Mt,tt.height-(yt.top+yt.bottom)))}}}}function th(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 Mh(a){return a==="LineV"||a==="BarV"}kt.lv=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].lv();this.Uc=!0},kt.kk=function(a,y,x){if(!Se.prototype.kk.call(this,a,y,x))return!1;if(this.type===En.Table)x=this.svg.getElementsByClassName("gojs-ts"),x=x.length!==0?x[0]:null,x!==null&&(x.innerHTML=""),a.yd=x,$A(this,a),a.yd=null;else if(this.na===En.Grid||this.na===En.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},kt.nk=function(){return!0},kt.$o=function(a,y,x,E){if(!this.isClipping)if(this.Dd()&&a.bk!==null){a=a.bk,y=this.O.s;for(var b=0,z=0,tt=0;tt<y.length;tt++)if(y[tt].Ed()){var rt=y[tt].actualBounds;b=tt===0?rt.x:Math.min(rt.x,b),z=tt===0?rt.y:Math.min(rt.y,z)}E.setAttributeNS(null,"clip-path","path('M "+(a.x-x.x-b)+","+(a.y-x.y-z)+" l "+a.width+" 0 l 0 "+a.height+" l -"+a.width+" 0 z')")}else Se.prototype.$o.call(this,a,y,x,E)},kt.Sj=function(a,y,x,E,b){var z=this.se(),tt=this.transform,rt=1/(tt.m11*tt.m22-tt.m12*tt.m21),ot=tt.m22*rt,lt=-tt.m12*rt,ut=-tt.m21*rt,ft=tt.m11*rt,yt=rt*(tt.m21*tt.dy-tt.m22*tt.dx),Mt=rt*(tt.m12*tt.dx-tt.m11*tt.dy);if(this.areaBackground!==null)return tt=this.actualBounds,Be.Ff(tt.left,tt.top,tt.right,tt.bottom,a,y,x,E,b);if(this.background!==null)return z=a*ot+y*ut+yt,rt=a*lt+y*ft+Mt,a=x*ot+E*ut+yt,ot=x*lt+E*ft+Mt,b.h(0,0),x=this.naturalBounds,z=Be.Ff(0,0,x.width,x.height,z,rt,a,ot,b),b.transform(tt),z;z||(ot=1,ut=lt=0,ft=1,Mt=yt=0),rt=a*ot+y*ut+yt,a=a*lt+y*ft+Mt,ot=x*ot+E*ut+yt,x=x*lt+E*ft+Mt,b.h(ot,x),E=(ot-rt)*(ot-rt)+(x-a)*(x-a),lt=!1,ft=this.O.s,Mt=ft.length,ut=Ot.alloc(),yt=null,y=1/0;var Tt=null,Dt=this.isClipping&&this.na===En.Spot;Dt&&(Tt=Ot.alloc(),yt=this.Pb(),(lt=yt.Sj(rt,a,ot,x,Tt))&&(y=(rt-Tt.x)*(rt-Tt.x)+(a-Tt.y)*(a-Tt.y)));for(var $t=0;$t<Mt;$t++){var Vt=ft[$t];Vt.visible&&Vt!==yt&&Vt.Sj(rt,a,ot,x,ut)&&(lt=!0,Vt=(rt-ut.x)*(rt-ut.x)+(a-ut.y)*(a-ut.y),Vt<E&&(E=Vt,b.set(ut)))}return Dt&&(y>E&&b.set(Tt),Ot.free(Tt)),Ot.free(ut),z&&b.transform(tt),lt},kt.Gj=function(){for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Gj();Se.prototype.Gj.call(this)},kt.v=function(a){if(!xl(this)){Se.prototype.v.call(this,a),a=null,(this.na===En.Auto||this.na===En.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=_a(b,!1);(b instanceof Ya||b instanceof En||b instanceof Mo||z!==Pn)&&b.v(!0)}}}},kt.Uj=function(){if(!xl(this)){Ls(this,!0),nA(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Uj()}},kt.Uk=function(){if(!(this.l&2048)){Xl(this,!0),Za(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()}},kt.Wu=function(){Za(this,!0);for(var a=this.O.s,y=a.length,x=0;x<y;x++)a[x].Wu()},kt.Wl=function(a,y,x,E){var b=this.jg;b.h(0,0,0,0);var z=this.desiredSize,tt=this.minSize;x===void 0&&(x=tt.width,E=tt.height),x=Math.max(x,tt.width),E=Math.max(E,tt.height);var rt=this.maxSize;isNaN(z.width)||(a=Math.min(z.width,rt.width)),isNaN(z.height)||(y=Math.min(z.height,rt.height)),a=Math.max(x,a),y=Math.max(E,y);var ot=this.yb;a=Math.max(a-ot.left-ot.right,0),y=Math.max(y-ot.top-ot.bottom,0);var lt=this.O.s;lt.length!==0&&this.na.measure(this,a,y,lt,b,x,E),a=b.width+ot.left+ot.right,ot=b.height+ot.top+ot.bottom,isFinite(z.width)&&(a=z.width),isFinite(z.height)&&(ot=z.height),a=Math.min(rt.width,a),ot=Math.min(rt.height,ot),a=Math.max(tt.width,a),ot=Math.max(tt.height,ot),a=Math.max(x,a),ot=Math.max(E,ot),Nr(b,a,ot),Nr(this.naturalBounds,a,ot),this.Ge(0,0,a,ot)},kt.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 ll(a){return a.part!==null?a.part.locationObject:null}kt.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=_a(this,!0);var z=this.measuredBounds;y=z.width,z=z.height;var tt=this.Kg,rt=tt.left+tt.right;switch(tt=tt.top+tt.bottom,y===x&&z===E&&(a=Pn),a){case Pn:(y>x||z>E)&&(this.v(),this.measure(y>x?x:y,z>E?E:z,0,0));break;case bn:this.v(!0),this.measure(x+rt,E+tt,0,0);break;case Hi:this.v(!0),this.measure(x+rt,z+tt,0,0);break;case Ji:this.v(!0),this.measure(y+rt,E+tt,0,0)}}this.na.arrange(this,b,this.jg)}},kt.gh=function(a){var y=this.naturalBounds,x=ll(this);if(fo(0,0,y.width,y.height,a.x,a.y)){y=this.O.s;for(var E=y.length,b=Ot.allocAt(0,0);E--;){var z=y[E];if((z.visible||z===x)&&(gn(b.set(a),z.transform),z.ca(b)))return Ot.free(b),!0}return Ot.free(b),!(this.Ma===null&&this.areaBackground===null)}return!1},kt.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},kt.qm=function(a,y){if(y(this,a),a instanceof En){a=a.O.s;for(var x=a.length,E=0;E<x;E++)this.qm(a[E],y)}};function Ru(a,y){Xd(a,a,y)}function Xd(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 En&&Xd(a,z,x)}}function Cw(a,y){hy(a,a,y)}function hy(a,y,x){if(x(y),y instanceof En){y=y.O.s;for(var E=y.length,b=0;b<E;b++)hy(a,y[b],x)}}kt.Nl=function(a){return cy(this,this,a)};function cy(a,y,x){if(x(y))return y;if(y instanceof En){y=y.O.s;for(var E=y.length,b=0;b<E;b++){var z=cy(a,y[b],x);if(z!==null)return z}}return null}kt.fb=function(a){if(this.name===a)return this;var y=this.O.s,x=y.length;this.Hh===null&&this.itemTemplateMap===null||(x=sp(this));for(var E=0;E<x;E++){var b=y[E];if(b instanceof En){var z=b.fb(a);if(z!==null)return z}if(b.name===a)return b}return null};function dy(a){a=a.O.s;for(var y=a.length,x=0,E=0;E<y;E++){var b=a[E];b instanceof En?x=Math.max(x,dy(b)):b instanceof Cr&&(x=Math.max(x,b.ig/2*b.strokeMiterLimit*b.Df()))}return x}kt.se=function(){return!(this.type===En.TableRow||this.type===En.TableColumn)};function vc(a){return a.type===En.TableRow||a.type===En.TableColumn}kt.ic=function(a,y,x){if(this.pickable===!1||(y===void 0&&(y=null),x===void 0&&(x=null),Ea(this)))return null;var E=this.naturalBounds,b=1/this.Df(),z=this.se(),tt=z?a:gn(Ot.allocAt(a.x,a.y),this.transform),rt=this.diagram,ot=10,lt=5;if(rt!==null&&(ot=rt.Ql("extraTouchArea"),lt=ot/2),fo(-(lt*b),-(lt*b),E.width+ot*b,E.height+ot*b,tt.x,tt.y)){if(!this.isAtomic){b=this.O.s;var ut=b.length;if(rt=Ot.alloc(),lt=(ot=this.isClipping&&this.na===En.Spot)?this.Pb():null,ot&&(lt.se()?gn(rt.set(a),lt.transform):rt.set(a),!lt.ca(rt)))return Ot.free(rt),z||Ot.free(tt),null;for(var ft=ll(this);ut--;){var yt=b[ut];if((yt.visible||yt===ft)&&(yt.se()?gn(rt.set(a),yt.transform):rt.set(a),!ot||yt!==lt)){var Mt=null;if(yt instanceof En?Mt=yt.ic(rt,y,x):yt.pickable===!0&&yt.ca(rt)&&(Mt=yt),Mt!==null&&(y!==null&&(Mt=y(Mt)),Mt!==null&&(x===null||x(Mt))))return Ot.free(rt),z||Ot.free(tt),Mt}}Ot.free(rt)}return this.background===null&&this.areaBackground===null?(z||Ot.free(tt),null):(a=fo(0,0,E.width,E.height,tt.x,tt.y)?this:null,z||Ot.free(tt),a)}return z||Ot.free(tt),null},kt.ji=function(a,y,x,E){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var b=this.naturalBounds,z=this.se(),tt=z?a:gn(Ot.allocAt(a.x,a.y),this.transform);if(b=fo(0,0,b.width,b.height,tt.x,tt.y),vc(this)||b){if(!this.isAtomic){for(var rt=this.O.s,ot=rt.length,lt=Ot.alloc(),ut=ll(this);ot--;){var ft=rt[ot];if(ft.visible||ft===ut){ft.se()?gn(lt.set(a),ft.transform):lt.set(a);var yt=ft;ft=ft instanceof En?ft:null,(ft!==null?ft.ji(lt,y,x,E):yt.ca(lt))&&yt.pickable!==!1&&(y!==null&&(yt=y(yt)),yt===null||x!==null&&!x(yt)||E.add(yt))}}Ot.free(lt)}return z||Ot.free(tt),b&&(this.background!==null||this.areaBackground!==null)}return z||Ot.free(tt),!1},kt.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=ir.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&ir.free(tt),!0;if(this.Yc(a,tt)){if(!this.isAtomic)for(var rt=ll(this),ot=this.O.s,lt=ot.length;lt--;){var ut=ot[lt];if(ut.visible||ut===rt){var ft=ut.actualBounds,yt=this.naturalBounds;ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height||(ft=ut,ut=ut instanceof En?ut:null,yt=ir.alloc(),yt.set(tt),(ut!==null?ut.Cf(a,y,x,E,b,yt):_s(ft,a,E,yt))&&(y!==null&&(ft=y(ft)),ft===null||x!==null&&!x(ft)||b.add(ft)),ir.free(yt))}}return z===void 0&&ir.free(tt),E}return z===void 0&&ir.free(tt),!1};function Nm(a,y,x,E){for(var b=a.O.s,z=b.length;z--;){var tt=b[z];if(tt.visible){var rt=tt.actualBounds,ot=a.naturalBounds;rt.x>ot.width||rt.y>ot.height||0>rt.x+rt.width||0>rt.y+rt.height||(tt instanceof En&&Nm(tt,y,x,E),y!==null&&(tt=y(tt)),tt===null||x!==null&&!x(tt)||E.add(tt))}}}kt.og=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;x===void 0&&(x=null),E===void 0&&(E=null);var tt=this.naturalBounds,rt=this.se(),ot=rt?a:gn(Ot.allocAt(a.x,a.y),this.transform),lt=rt?y:gn(Ot.allocAt(y.x,y.y),this.transform),ut=ot.Bf(lt),ft=0<ot.x&&ot.x<tt.width&&0<ot.y&&ot.y<tt.height||Cn(ot.x,ot.y,0,0,0,tt.height)<=ut||Cn(ot.x,ot.y,0,tt.height,tt.width,tt.height)<=ut||Cn(ot.x,ot.y,tt.width,tt.height,tt.width,0)<=ut||Cn(ot.x,ot.y,tt.width,0,0,0)<=ut;if(tt=ot.zd(0,0)<=ut&&ot.zd(0,tt.height)<=ut&&ot.zd(tt.width,0)<=ut&&ot.zd(tt.width,tt.height)<=ut,rt||(Ot.free(ot),Ot.free(lt)),ft){if(!this.isAtomic){ot=Ot.alloc(),lt=Ot.alloc(),ut=ll(this);for(var yt=this.O.s,Mt=yt.length;Mt--;){var Tt=yt[Mt];if(Tt.visible||Tt===ut){var Dt=Tt.actualBounds,$t=this.naturalBounds;(!rt||!(Dt.x>$t.width||Dt.y>$t.height||0>Dt.x+Dt.width||0>Dt.y+Dt.height))&&(Tt.se()?(Dt=Tt.transform,gn(ot.set(a),Dt),gn(lt.set(y),Dt)):(ot.set(a),lt.set(y)),Dt=Tt,Tt=Tt instanceof En?Tt:null,(Tt!==null?Tt.og(ot,lt,x,E,b,z):Dt.tx(ot,lt,b))&&(x!==null&&(Dt=x(Dt)),Dt===null||E!==null&&!E(Dt)||z.add(Dt)))}}Ot.free(ot),Ot.free(lt)}return b?ft:tt}return!1};function Dm(a){var y=null;return a instanceof Cr&&(y=a.spot1,y===Io&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot1)),y===null&&(y=Qr),y}function Im(a){var y=null;return a instanceof Cr&&(y=a.spot2,y===Io&&(y=null),a=a.geometry,a!==null&&y===null&&(y=a.spot2)),y===null&&(y=lo),y}kt.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},kt.M=function(a){return this.O.M(a)},kt.Gb=function(a,y){y instanceof Zi&&se("Cannot add a Part to a Panel: "+y+"; use a Panel instead"),(this===y||this.rg(y))&&(this===y&&se("Cannot make a Panel contain itself: "+this.toString()),se("Cannot make a Panel indirectly contain itself: "+this.toString()+" already contains "+y.toString()));var x=y.panel;if(x!==null&&x!==this&&se("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!==En.Grid||y instanceof Cr||se("Can only add Shapes to a Grid Panel, not: "+y),this.na!==En.Graduated||y instanceof Cr||y instanceof Mo||se("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 ke),this.ge.add(E,y))}var b=this.O;if(E=-1,x===this){for(var z=-1,tt=this.O.s,rt=tt.length,ot=0;ot<rt;ot++)if(tt[ot]===y){z=ot;break}if(z!==-1){if(z===a||z+1>=b.count&&a>=b.count)return;b.mb(z),E=z}else se("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),xl(this)||this.v(),y.v(!1),y.portId!==null?this.Te=!0:y instanceof En&&y.Te===!0&&(this.Te=!0),this.graduatedIntervals=null,this.If()||o0(this,y,!1),x=this.part,x!==null&&(x.Rh=null,x.ag=NaN,this.Te&&x instanceof gi&&(x.Te=!0),x.Te&&x instanceof gi&&(x.wc=null),b=this.diagram,b!==null&&b.undoManager.isUndoingRedoing||(E!==-1&&x.cb(ms,"elements",this,y,null,E,null),x.cb(as,"elements",this,null,y,null,a)))};function Um(a,y){a.l=y?a.l|16777216:a.l&-16777217}kt.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)},kt.mb=function(a){0<=a&&this.pc(a,!0)},kt.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),Ls(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 gi&&(E instanceof En?E.qm(E,function(tt,rt){ov(z,rt,y)}):ov(z,E,y)),x=this.diagram,x!==null&&x.undoManager.isUndoingRedoing||z.cb(ms,"elements",this,E,null,a,null))},kt.Fb=function(a){0>a&&qn(a,">= 0",En,"getRowDefinition:idx"),a=Math.round(a);var y=this.rowDefs;if(y[a]===void 0){var x=new Is;x.wi(this),x.isRow=!0,x.index=a,y[a]=x,this.cb(as,"rowdefs",this,null,x,null,a)}return y[a]},kt.oA=function(a){if(0>a&&qn(a,">= 0",En,"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(ms,"rowdefs",this,x,null,a,null),this.v()}}};function fy(a,y,x){var E=a.rowDefs;if(!(0>y)){if(E[y]=x instanceof Is?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}kt.Eb=function(a){0>a&&qn(a,">= 0",En,"getColumnDefinition:idx"),a=Math.round(a);var y=this.colDefs;if(y[a]===void 0){var x=new Is;x.wi(this),x.isRow=!1,x.index=a,y[a]=x,this.cb(as,"coldefs",this,null,x,null,a)}return y[a]},kt.jA=function(a){if(0>a&&qn(a,">= 0",En,"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(ms,"coldefs",this,x,null,a,null),this.v()}}};function gy(a,y,x){var E=a.colDefs;if(!(0>y)){if(E[y]=x instanceof Is?x:void 0,!x)for(y=E.length-1;0<=y&&E[y--]===void 0;)E.length--;a.v()}}kt.Gy=function(a){var y=null;return a.isRow?y=this.Fb(a.index):a.isRow||(y=this.Eb(a.index)),y&&s0(y,a),this},kt.Hy=function(a,y){return(a=this.Fb(a))&&s0(a,new Is(y)),this},kt.By=function(a,y){return(a=this.Eb(a))&&s0(a,new Is(y)),this},kt.nz=function(a){if(0>a||this.type!==En.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},kt.fz=function(a){if(0>a||this.type!==En.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},kt.Fz=function(a,y){if(y===void 0&&(y=new Ot(NaN,NaN)),this.type!==En.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)},kt.Gz=function(a){if(this.type!==En.Graduated)return NaN;var y=this.Pb();return y.transform.Cd(a),y.geometry.xx(a)*this.graduatedRange+this.graduatedMin};function py(a){return a=a.allBindings,a!==null&&a._isFrozen}function yu(a){var y=a.allBindings;if(y===null)a.data!==null&&se("Template cannot have .data be non-null: "+a),a.allBindings=y=new ee;else if(y._isFrozen)return;var x=new ee;Um(a,!1),a.qm(a,function(lt,ut){ut.th();var ft=ut.localBindings;if(ft!==null)for(XA(ut,!1),ft=ft.iterator;ft.next();){var yt=ft.value;yt.mode===Lp&&XA(ut,!0);var Mt=yt.sourceName;Mt!==null&&(Mt==="/"&&Um(lt,!0),Mt=b1(yt,lt,ut),Mt!==null&&(x.add(Mt),Mt.srcBindings===null&&(Mt.srcBindings=new ee),Mt.srcBindings.add(yt))),y.add(yt)}if(ut instanceof En&&ut.type===En.Table){if(0<ut.rowCount){for(lt=ut.rowDefs,ft=lt.length,yt=0;yt<ft;yt++)if(Mt=lt[yt],Mt!==void 0&&Mt.be!==null)for(var Tt=Mt.be.iterator;Tt.next();){var Dt=Tt.value;Dt.xd=Mt,Dt.to=2,Dt.wl=Mt.index,y.add(Dt)}}if(0<ut.columnCount){for(ut=ut.colDefs,lt=ut.length,ft=0;ft<lt;ft++)if(yt=ut[ft],yt!==void 0&&yt.be!==null)for(Mt=yt.be.iterator;Mt.next();)Tt=Mt.value,Tt.xd=yt,Tt.to=1,Tt.wl=yt.index,y.add(Tt)}}});for(var E=x.iterator;E.next();){var b=E.value;if(b.srcBindings!==null){XA(b,!0);for(var z=b.srcBindings.iterator;z.next();){var tt=z.value;b.localBindings===null&&(b.localBindings=new ee),b.localBindings.add(tt)}}b.srcBindings=null}for(E=y.iterator;E.next();)if(b=E.value,z=b.xd,z!==null){b.xd=null;var rt=b.targetProperty,ot=rt.indexOf(".");0<ot&&z instanceof En&&(tt=rt.substring(0,ot),rt=rt.substr(ot+1),ot=z.fb(tt),ot!==null?(z=ot,b.targetProperty=rt):Zn('Warning: unable to find GraphObject named "'+tt+'" for Binding: '+b.toString())),z instanceof Is?(tt=ti(z.panel),b.Ai=tt===void 0?-1:tt,z.panel.bindingId=b.Ai):z instanceof Se?(tt=ti(z),b.Ai=tt===void 0?-1:tt,z.bindingId=b.Ai):se("Unknown type of binding target: "+z)}y.freeze(),a instanceof Zi&&a.Zc()&&a.Va()}kt.Uy=function(a){a===void 0&&(a=!1);var y=this.copy();return Cw(y,function(x){x instanceof En&&(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&&yu(y),y},kt.La=function(a){var y=this.allBindings;if(y!==null)for(a===void 0&&(a=""),y=y.iterator;y.next();){var x=y.value,E=x.sourceProperty;if((a===""||E===""||E===a)&&(E=x.targetProperty,x.converter!==null||E!=="")){E=this.data;var b=x.sourceName;if(b!==null){if(b==="")E=this;else if(b==="/")E=this;else if(b===".")E=this;else if(b==="..")E=this;else if(E=this.fb(b),E===null)continue}else if(x.isToModel)if(E=this.diagram,E!==null)E=E.model.modelData;else continue;var z=this,tt=x.Ai;if(tt!==-1){if(z=this.ks(tt),z===null)continue}else x.xd!==null&&(z=x.xd);if(b==="/"?E=z.part:b==="."?E=z:b===".."&&(E=z.panel),b=x.to,b!==0){if(!(z instanceof En))continue;b===1?z=z.Eb(x.wl):b===2&&(z=z.Fb(x.wl))}z!==void 0&&x.Mv(z,E)}}},kt.sx=function(a){return a==null||this.ge===null?null:this.ge.I(a)};function Pw(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 En&&z.data!==null));)b++,z=a[b];if(x-b!==E)return!0;if(z===null)return 0<E;for(var tt=0;b<x&&tt<E;){if(z=a[b],!(z instanceof En)||z.data!==y[tt])return!0;b++,tt++}return!1}function sp(a){if(a.type===En.Spot||a.type===En.Auto)return Math.min(a.O.length,1);if(a.type===En.Link){a=a.O;for(var y=a.length,x=0;x<y;x++){var E=a.M(x);if(!(E instanceof Cr&&E.isPanelMain))break}return x}return a.type===En.Table&&0<a.O.length&&(a=a.O.M(0),a.isPanelMain&&a instanceof En&&vc(a))?1:0}kt.mv=function(){for(var a=sp(this);this.O.length>a;)this.pc(this.O.length-1,!1);my(this,this.itemArray)};function my(a,y){var x=sp(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++)r0(a,y[E],E,!0)}else{E=x;for(var b=0;b<y.length;b++,E++){var z=y[b],tt=E<a.O.length?a.O.M(E):null;if(tt instanceof En){if(tt.data!==z){var rt=Om(a,tt.data),ot=Om(a,z),lt=ot!==rt;lt||(rt=Rm(a,rt),lt=Rm(a,ot)!==rt),lt?(a.pc(E,!1),r0(a,z,b,!1)):tt.data=z}}else r0(a,z,b,!1)}for(;E<a.O.length;)a.pc(E,!1);a.$g=null,Qm(a,x,0),xl(a)||a.v(),a.graduatedIntervals=null,a.If()||o0(a,a,!1),y=a.part,y!==null&&(y.Rh=null,y.ag=NaN,a.Te&&y instanceof gi&&(y.Te=!0),y.Te&&y instanceof gi&&(y.wc=null))}}function r0(a,y,x,E){if(!(y==null||0>x)){var b=Om(a,y);if(b=Rm(a,b),b!==null){if(yu(b),b=b.copy(),b.l&16777216){var z=a.ih();z!==null&&Um(z,!0)}typeof y=="object"&&(a.ge===null&&(a.ge=new ke),a.ge.add(y,b)),z=x+sp(a),a.Gb(z,b),E&&(b.ub=y,Qm(a,z,x),b.ub=null),b.data=y}}}function Qm(a,y,x){for(a=a.O;y<a.length;){var E=a.M(y);if(E instanceof En){var b=y,z=x;E.type===En.TableRow?E.row=b:E.type===En.TableColumn&&(E.column=b),E.itemIndex=z}y++,x++}}function Om(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=Bs(y,a)}else return"";if(a===void 0)return"";if(typeof a=="string")return a;se("Panel.getCategoryForItemData found a non-string category for "+y+": "+a)}function Rm(a,y){var x=a.itemTemplateMap,E=null;return x!==null&&(E=x.I(y)),E===null&&(x!==null&&(E=x.I("")),E===null&&(vy||(vy=!0,Zn('No item template Panel found for category "'+y+'" on '+a),Zn(" Using default item template."),a=new En,y=new Mo,y.bind(new Ms("text","",Fn)),a.add(y),yy=a),E=yy)),E}function o0(a,y,x){var E=y.enabledChanged;if(E!==null&&E(y,x),y instanceof En){y=y.O.s,E=y.length;for(var b=0;b<E;b++){var z=y[b];x&&z instanceof En&&!z.isEnabled||o0(a,z,x)}}}function FA(a,y){y.name=a,Hu.add(a,y)}yn.Object.defineProperties(En.prototype,{type:{get:function(){return this.na},set:function(a){var y=this.na;y!==a&&(this.na=a,this.isAtomic=this.na===En.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&&qn(a,">= 0",En,"padding"),a=new wr(a)):(0>a.left&&qn(a.left,">= 0",En,"padding:value.left"),0>a.right&&qn(a.right,">= 0",En,"padding:value.right"),0>a.top&&qn(a.top,">= 0",En,"padding:value.top"),0>a.bottom&&qn(a.bottom,">= 0",En,"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:fs},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.defaultSeparatorPadding;y.D(a)||(a=a.J(),this.T===null&&(this.T=new lu),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 ho)&&(a instanceof ho&&a.freeze(),this.T===null&&(this.T=new lu),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 lu),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)||se("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 lu),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 ho)&&(a instanceof ho&&a.freeze(),this.T===null&&(this.T=new lu),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 lu),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)||se("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 lu),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 lu),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||se("Invalid Panel.gridCellSize: "+a),this.jn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Uu(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()||se("Invalid Panel.gridOrigin: "+a),this.kn=a.J();var x=this.diagram;x!==null&&this===x.grid&&Uu(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 bh),this.ra.lq=a,this.v(),this.g("graduatedMin",y,a),na(this)&&(a=this.part,a!==null&&No(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 bh),this.ra.F=a,this.v(),this.g("graduatedMax",y,a),na(this)&&(a=this.part,a!==null&&No(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 bh),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 bh),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 bh,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 bh,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 bh,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 bh,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 lu),this.T.Pc}},rowCount:{get:function(){return this.T===null?0:this.rowDefs.length}},colDefs:{get:function(){return this.T===null&&(this.T=new lu),this.T.Oc}},columnCount:{get:function(){return this.T===null?0:this.colDefs.length}},rowSizing:{get:function(){return this.T!==null?this.T.ob:l0},set:function(a){var y=this.rowSizing;y!==a&&(this.T===null&&(this.T=new lu),this.T.ob=a,this.v(),this.g("rowSizing",y,a))}},columnSizing:{get:function(){return this.T!==null?this.T.j:l0},set:function(a){var y=this.columnSizing;y!==a&&(this.T===null&&(this.T=new lu),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)&&se("Panel.topIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lu),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)&&se("Panel.leftIndex must be greater than zero and a real number, not: "+a),this.T===null&&(this.T=new lu),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 Zi&&!(this instanceof ro);yu(this),this.ub=a;var E=this.diagram;E!==null&&(x?(x=E.partManager,this instanceof Yn?(y!==null&&x.bf.remove(y),a!==null&&x.bf.add(a,this)):this instanceof Zi&&(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 hc),this.A.nb=a)}},itemArray:{get:function(){return this.Hh},set:function(a){var y=this.Hh;if(y!==a||a!==null&&Pw(this,a)){var x=this.diagram;y!==a&&(x!==null&&y!==null&&Pv(x.partManager,this,x),this.Hh=a,x!==null&&a!==null&&Cv(x.partManager,this)),this.g("itemArray",y,a),x!==null&&x.undoManager.isUndoingRedoing||my(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 ke}var y=this.itemTemplateMap.I("");y!==a&&((a instanceof Zi||a.isPanelMain)&&se("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(););Pr(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&&(Pr(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 mr&&(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&&o0(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))}}}),yn.Object.defineProperties(En,{Position:{get:function(){return Hu.I("Position")}},Horizontal:{get:function(){return Hu.I("Horizontal")}},Vertical:{get:function(){return Hu.I("Vertical")}},Spot:{get:function(){return Hu.I("Spot")}},Auto:{get:function(){return Hu.I("Auto")}},Table:{get:function(){return Hu.I("Table")}},Viewbox:{get:function(){return Hu.I("Viewbox")}},TableRow:{get:function(){return Hu.I("TableRow")}},TableColumn:{get:function(){return Hu.I("TableColumn")}},Link:{get:function(){return Hu.I("Link")}},Grid:{get:function(){return Hu.I("Grid")}},Graduated:{get:function(){return Hu.I("Graduated")}}}),En.prototype.rebuildItemElements=En.prototype.mv,En.prototype.findItemPanelForData=En.prototype.sx,En.prototype.updateTargetBindings=En.prototype.La,En.prototype.copyTemplate=En.prototype.Uy,En.prototype.graduatedValueForPoint=En.prototype.Gz,En.prototype.graduatedPointForValue=En.prototype.Fz,En.prototype.findColumnForLocalX=En.prototype.fz,En.prototype.findRowForLocalY=En.prototype.nz,En.prototype.addColumnDefinition=En.prototype.By,En.prototype.addRowDefinition=En.prototype.Hy,En.prototype.addRowColumnDefinition=En.prototype.Gy,En.prototype.removeColumnDefinition=En.prototype.jA,En.prototype.getColumnDefinition=En.prototype.Eb,En.prototype.removeRowDefinition=En.prototype.oA,En.prototype.getRowDefinition=En.prototype.Fb,En.prototype.removeAt=En.prototype.mb,En.prototype.remove=En.prototype.remove,En.prototype.insertAt=En.prototype.Gb,En.prototype.elt=En.prototype.M,En.prototype.add=En.prototype.add,En.prototype.findObject=En.prototype.fb,En.prototype.findInVisualTree=En.prototype.Nl,En.prototype.walkVisualTreeFrom=En.prototype.qm,En.prototype.findMainElement=En.prototype.Pb;var vy=!1,yy=null,Hu=new ke;En.className="Panel",En.definePanelLayout=FA,FA("Position",new qo),FA("Vertical",new to),FA("Auto",new Oo),FA("Link",new Ul);function bh(){this.lq=0,this.F=100,this.ia=10,this.V=0,this.Zh=this.o=this.j=this.u=null}bh.prototype.copy=function(){var a=new bh;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},bh.className="GradPanelSettings";function lu(){this.Pc=[],this.Oc=[],this.j=this.ob=l0,this.hb=this.Hb=0,this.Qp=fs,this.Ha=1,this.V=this.ia=null,this.F=1,this.nb=this.o=this.u=null}lu.prototype.copy=function(a){for(var y=new lu,x=this.Pc,E=x.length,b=y.Pc,z=0;z<E;z++)if(x[z]!==void 0){var tt=x[z].copy();tt.wi(a),b[z]=tt}for(x=this.Oc,E=x.length,b=y.Oc,z=0;z<E;z++)x[z]!==void 0&&(tt=x[z].copy(),tt.wi(a),b[z]=tt);return y.ob=this.ob,y.j=this.j,y.Hb=this.Hb,y.hb=this.hb,y.Qp=this.Qp.J(),y.Ha=this.Ha,y.ia=this.ia,y.V=this.V,y.F=this.F,y.u=this.u,y.o=this.o,y.nb=this.nb,y},lu.className="TablePanelSettings";function Is(a){An(this),this.Me=null,this.uq=!0,this.Za=0,this.Hc=NaN,this.jj=0,this.hj=1/0,this.Jb=Io,this.pa=this.oc=this.oa=0,this.be=null,this.oo=Hm,this.hg=dr,this.lo=this.dg=null,this.mo=NaN,this.Ma=this.tj=null,this.Pm=!1,a&&(Object.assign(this,a),a.column!==void 0?(this.isRow=!1,this.index=a.column):a.row!==void 0&&(this.isRow=!0,this.index=a.row))}Is.prototype.copy=function(){var a=new Is;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=bi(this.separatorDashArray)),a.Ma=this.Ma,a.Pm=this.Pm,a.be=this.be,a};function s0(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=bi(y.separatorDashArray)),a.background=y.background,a.coversSeparators=y.coversSeparators,a.be=y.be}kt=Is.prototype,kt.qb=function(a){a.classType===Is&&(this.sizing=a)},kt.toString=function(){return"RowColumnDefinition "+(this.isRow?"(Row ":"(Column ")+this.index+") #"+ti(this)},kt.wi=function(a){this.Me=a},kt.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)},kt.Wc=function(){var a=0,y=this.Me,x=0,E=this.isRow;if(y!==null&&y.type===En.Table)for(var b=E?y.rowDefs.length:y.colDefs.length,z=0;z<b;z++){var tt=E?y.rowDefs[z]:y.colDefs[z];if(tt!==void 0&&tt.oa!==0){x=tt.index;break}}if(this.index!==x&&(x=this.separatorStroke,x===null&&y!==null&&(x=E?y.defaultRowSeparatorStroke:y.defaultColumnSeparatorStroke),x!==null&&(a=this.separatorStrokeWidth,isNaN(a)&&(y!==null?a=E?y.defaultRowSeparatorStrokeWidth:y.defaultColumnSeparatorStrokeWidth:a=0))),E=this.dg,E===null)if(y!==null)E=y.defaultSeparatorPadding;else return a;return a+(this.isRow?E.top+E.bottom:E.left+E.right)},kt.Ob=function(a,y,x){var E=this.Me;if(E!==null&&(E.cb(Qo,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 a0(a){if(a.sizing===Hm){var y=a.Me;return a.isRow?y.rowSizing:y.columnSizing}return a.sizing}kt.bind=function(a,y,x,E){var b=null;return typeof a=="string"?b=new Ms(a,y,x,E):b=a,b.xd=this,a=this.panel,a!==null&&(y=a.ih(),y!==null&&py(y)&&se("Cannot add a Binding to a RowColumnDefinition that is already frozen: "+b+" on "+a)),this.be===null&&(this.be=new ee),this.be.add(b),this},yn.Object.defineProperties(Is.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&&qn(a,">= 0",Is,"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&&qn(a,">= 0",Is,"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))&&qn(a,">= 0",Is,"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&&qn(a,">= 0",Is,"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 wr(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&&Lt(a,"RowColumnDefinition.separatorStroke"),a instanceof ho&&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)||se("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&&Lt(a,"RowColumnDefinition.background"),a instanceof ho&&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}}}),Is.prototype.computeEffectiveSpacing=Is.prototype.Wc,Is.prototype.computeEffectiveSpacingTop=Is.prototype.Io;var Hm=new Te(Is,"Default",0),ap=new Te(Is,"None",1),l0=new Te(Is,"ProportionalExtra",2);Is.className="RowColumnDefinition",Is.Default=Hm,Is.None=ap,Is.ProportionalExtra=l0;function Cr(a,y){Se.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)}Ge(Cr,Se),Cr.prototype.cloneProtected=function(a){Se.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=bi(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 Jd(a){a.Na===null?a.Na=new zm:a.Na.nc&&(a.Na=a.Na.copy())}kt=Cr.prototype,kt.th=function(){Se.prototype.th.call(this),this.Na!==null&&(this.Na.nc=!0)},kt.qb=function(a){a===Pn||a===Ii||a===Rr||a===dr?this.geometryStretch=a:Se.prototype.qb.call(this,a)},kt.toString=function(){return"Shape("+(this.figure!=="None"?this.figure:this.toArrow!=="None"?this.toArrow:this.fromArrow)+")#"+ti(this)};function wg(a,y,x,E){var b=x.length;if(!(4>b)){var z=E.measuredBounds,tt=Math.max(1,z.width);z=z.height;for(var rt=x[0],ot=x[1],lt,ut,ft,yt,Mt,Tt,Dt=0,$t=li(),Vt=2;Vt<b;Vt+=2)lt=x[Vt],ut=x[Vt+1],ft=lt-rt,rt=ut-ot,ft===0&&(ft=.001),yt=rt/ft,Mt=Math.atan2(rt,ft),Tt=Math.sqrt(ft*ft+rt*rt),$t.push([ft,Mt,yt,Tt]),Dt+=Tt,rt=lt,ot=ut;rt=x[0],ot=x[1],ft=E.measuredBounds.width,E instanceof Cr&&(ft-=E.strokeWidth),1>ft&&(ft=1),b=x=ft,lt=tt/2,ut=lt!==0,Vt=0,Tt=$t[Vt],ft=Tt[0],Mt=Tt[1],yt=Tt[2],Tt=Tt[3];for(var ae=0;.1<=Dt;){if(ae===0&&(ut?(b=x,b-=lt,Dt-=lt,ut=!1):b=x,b===0&&(b=1)),b>Dt){ci($t);return}b>Tt?(ae=b-Tt,b=Tt):ae=0;var ce=Math.sqrt(b*b/(1+yt*yt));if(0>ft&&(ce=-ce),rt+=ce,ot+=yt*ce,a.translate(rt,ot),a.rotate(Mt),a.translate(-(tt/2),-(z/2)),ae===0&&E.hh(a,y),a.translate(tt/2,z/2),a.rotate(-Mt),a.translate(-rt,-ot),Dt-=b,Tt-=b,ae!==0){if(Vt++,Vt===$t.length){ci($t);return}Tt=$t[Vt],ft=Tt[0],Mt=Tt[1],yt=Tt[2],Tt=Tt[3],b=ae}}ci($t)}}kt.hh=function(a,y){var x=this.xc,E=this.Ui;if(x!==null||E!==null){var b=this.ua;if(b!==null){a.yc();var z=this.actualBounds,tt=this.naturalBounds;E!==null&&Xo(this,a,E,!0,!1,tt,z);var rt=this.part,ot=this.ig;if(x===null||ot!==0||rt===null||!this.isPanelMain&&rt.Pb()!==this||(ot=rt.type===En.Link&&rt instanceof ro&&rt.category==="Selection"&&rt.adornedObject instanceof Cr&&rt.adornedPart.Pb()===rt.adornedObject?rt.adornedObject.strokeWidth:0),ot===0&&(x=null),x!==null&&ot!==0&&(Xo(this,a,x,!1,!1,tt,z),a.lineWidth=ot,a.lineJoin=this.strokeJoin,a.lineCap=this.strokeCap,a.miterLimit=this.strokeMiterLimit),z=!1,rt&&y.Gf("drawShadows")&&(z=rt.isShadowed),a.Il===!1&&(z=!1),rt=!0,x===null||E!==null&&E!=="transparent"||(rt=!1),tt=!1,ot=this.strokeDashArray,ot!==null&&(tt=!0,a.js(ot,this.strokeDashOffset)),b.type===Hn.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===Hn.u){var lt=b.startX;ot=b.startY;var ut=b.endX,ft=b.endY;b=Math.min(lt,ut);var yt=Math.min(ot,ft);lt=Math.abs(ut-lt),ot=Math.abs(ft-ot),a.beginPath(),a.rect(b,yt,lt,ot),E!==null&&a.ng(E),x!==null&&(rt&&z&&Ou(a),a.jk(),rt&&z&&SA(a)),a.Se()}else if(b.type===Hn.F)lt=b.startX,ot=b.startY,ut=b.endX,ft=b.endY,b=Math.abs(ut-lt)/2,yt=Math.abs(ft-ot)/2,lt=Math.min(lt,ut)+b,ot=Math.min(ot,ft)+yt,a.beginPath(),a.moveTo(lt,ot-yt),a.bezierCurveTo(lt+Be.wg*b,ot-yt,lt+b,ot-Be.wg*yt,lt+b,ot),a.bezierCurveTo(lt+b,ot+Be.wg*yt,lt+Be.wg*b,ot+yt,lt,ot+yt),a.bezierCurveTo(lt-Be.wg*b,ot+yt,lt-b,ot+Be.wg*yt,lt-b,ot),a.bezierCurveTo(lt-b,ot-Be.wg*yt,lt-Be.wg*b,ot-yt,lt,ot-yt),a.closePath(),E!==null&&a.ng(E),x!==null&&(rt&&z&&Ou(a),a.jk(),rt&&z&&SA(a)),a.Se();else if(b.type===Hn.o)for(b=b.figures,ot=b.length,yt=0;yt<ot;yt++){lt=b.s[yt],a.beginPath(),a.moveTo(lt.startX,lt.startY),ut=lt.segments.s,ft=ut.length;for(var Mt=null,Tt=0;Tt<ft;Tt++){var Dt=ut[Tt];switch(Dt.type){case Ss:a.moveTo(Dt.endX,Dt.endY);break;case yo:a.lineTo(Dt.endX,Dt.endY);break;case Fs:a.bezierCurveTo(Dt.point1X,Dt.point1Y,Dt.point2X,Dt.point2Y,Dt.endX,Dt.endY);break;case Oa:a.quadraticCurveTo(Dt.point1X,Dt.point1Y,Dt.endX,Dt.endY);break;case ss:if(Dt.radiusX===Dt.radiusY){var $t=Math.PI/180;a.arc(Dt.point1X,Dt.point1Y,Dt.radiusX,Dt.startAngle*$t,(Dt.startAngle+Dt.sweepAngle)*$t,0>Dt.sweepAngle,Mt!==null?Mt.endX:lt.startX,Mt!==null?Mt.endY:lt.startY)}else if(Mt=Pa(Dt,lt),$t=Mt.length,$t===0)a.lineTo(Dt.centerX,Dt.centerY);else for(var Vt=0;Vt<$t;Vt++){var ae=Mt[Vt];Vt===0&&a.lineTo(ae[0],ae[1]),a.bezierCurveTo(ae[2],ae[3],ae[4],ae[5],ae[6],ae[7])}break;case rl:if(Vt=$t=0,Mt!==null&&Mt.type===ss){if(Mt=Pa(Mt,lt),ae=Mt.length,ae===0){a.lineTo(Dt.endX,Dt.endY);break}Mt=Mt[ae-1]||null,Mt!==null&&($t=Mt[6],Vt=Mt[7])}else $t=Mt!==null?Mt.endX:lt.startX,Vt=Mt!==null?Mt.endY:lt.startY;if(Mt=il(Dt,lt,$t,Vt),$t=Mt.length,$t===0){a.lineTo(Dt.endX,Dt.endY);break}for(Vt=0;Vt<$t;Vt++)ae=Mt[Vt],a.bezierCurveTo(ae[2],ae[3],ae[4],ae[5],ae[6],ae[7]);break;default:se("Segment not of valid type: "+Dt.type)}Dt.isClosed&&a.closePath(),Mt=Dt}ut=lt.isFilled,z?lt.isShadowed?(ut===!0&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&(ut&&rt&&Ou(a),a.jk(),ut&&rt&&SA(a))):(Ou(a),ut&&E!=="transparent"&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk(),SA(a)):(ut&&E!==null&&a.ng(E,lt.isEvenOdd),x!==null&&a.jk()),a.Se(yt)}if(tt&&a.fs(),this.pathPattern!==null){if(x=this.pathPattern,x.measure(1/0,1/0),E=x.measuredBounds,x.arrange(0,0,E.width,E.height),z=this.geometry,a.save(),a.beginPath(),E=li(),z.type===Hn.j)E.push(z.startX),E.push(z.startY),E.push(z.endX),E.push(z.endY),wg(a,y,E,x);else if(z.type===Hn.o)for(z=z.figures.iterator;z.next();){for(rt=z.value,E.length=0,E.push(rt.startX),E.push(rt.startY),tt=rt.startX,b=rt.startY,ot=tt,yt=b,lt=rt.segments.s,ut=lt.length,ft=0;ft<ut;ft++){switch(Tt=lt[ft],Tt.type){case Ss:wg(a,y,E,x),E.length=0,E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY,ot=tt,yt=b;break;case yo:E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break;case Fs:Be.Qe(tt,b,Tt.point1X,Tt.point1Y,Tt.point2X,Tt.point2Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case Oa:Be.ep(tt,b,Tt.point1X,Tt.point1Y,Tt.endX,Tt.endY,.5,E),tt=Tt.endX,b=Tt.endY;break;case ss:if(Dt=Pa(Tt,rt),Mt=Dt.length,Mt===0){E.push(Tt.centerX),E.push(Tt.centerY),tt=Tt.centerX,b=Tt.centerY;break}for($t=0;$t<Mt;$t++)Vt=Dt[$t],Be.Qe(tt,b,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],b=Vt[7];break;case rl:if(Dt=il(Tt,rt,tt,b),Mt=Dt.length,Mt===0){E.push(Tt.endX),E.push(Tt.endY),tt=Tt.endX,b=Tt.endY;break}for($t=0;$t<Mt;$t++)Vt=Dt[$t],Be.Qe(tt,b,Vt[2],Vt[3],Vt[4],Vt[5],Vt[6],Vt[7],.5,E),tt=Vt[6],b=Vt[7];break;default:se("Segment not of valid type: "+Tt.type)}Tt.isClosed&&(E.push(ot),E.push(yt),wg(a,y,E,x))}wg(a,y,E,x)}else if(z.type===Hn.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),wg(a,y,E,x);else if(z.type===Hn.F){if(b=new Ps,b.startX=z.endX,b.startY=(z.startY+z.endY)/2,tt=new Xr(ss),tt.startAngle=0,tt.sweepAngle=360,tt.centerX=(z.startX+z.endX)/2,tt.centerY=(z.startY+z.endY)/2,tt.radiusX=Math.abs(z.startX-z.endX)/2,tt.radiusY=Math.abs(z.startY-z.endY)/2,b.add(tt),z=Pa(tt,b),rt=z.length,rt===0)E.push(tt.centerX),E.push(tt.centerY);else for(tt=b.startX,b=b.startY,ot=0;ot<rt;ot++)yt=z[ot],Be.Qe(tt,b,yt[2],yt[3],yt[4],yt[5],yt[6],yt[7],.5,E),tt=yt[6],b=yt[7];wg(a,y,E,x)}ci(E),a.restore(),a.Vc(!1)}}}},kt.kk=function(a,y,x){return!Se.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)},kt.nk=function(a){return this.geometry!==null&&1<this.geometry.figures.length||this.pathPattern!==null?!0:Se.prototype.nk.call(this,a)},kt.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)}},kt.ga=function(a,y){if(y===void 0&&(y=new Ot),a instanceof Ci){a.Mc()&&se("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},kt.mi=function(a){a===void 0&&(a=new Oe);var y=this.naturalBounds,x=this.oe;y=Oe.allocAt(y.x,y.y,y.width,y.height);var E=this.strokeWidth;return y.Bc(E/2,E/2),E=Ot.allocAt(y.x,y.y).transform(x),a.h(E.x,E.y,0,0),E.h(y.right,y.y).transform(x),Dr(a,E.x,E.y,0,0),E.h(y.right,y.bottom).transform(x),Dr(a,E.x,E.y,0,0),E.h(y.x,y.bottom).transform(x),Dr(a,E.x,E.y,0,0),Oe.free(y),Ot.free(E),a},kt.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!==Hn.j||y||(b+=2);var z=Oe.alloc();if(z.assign(E),z.Bc(b+2,b+2),!z.ca(a))return Oe.free(z),!1;if(E=b+1e-4,x.type===Hn.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:(Oe.free(z),Be.Yb(x.startX,x.startY,x.endX,x.endY,b,a.x,a.y));if(x.type===Hn.u){y=x.startX;var tt=x.startY,rt=x.endX;if(x=x.endY,z.x=Math.min(y,rt),z.y=Math.min(tt,x),z.width=Math.abs(rt-y),z.height=Math.abs(x-tt),this.fill===null){if(z.Bc(-E,-E),z.ca(a))return Oe.free(z),!1;z.Bc(E,E)}return this.stroke!==null&&z.Bc(b,b),a=z.ca(a),Oe.free(z),a}if(x.type===Hn.F){tt=x.startX,b=x.startY,rt=x.endX;var ot=x.endY;if(x=Math.min(tt,rt),y=Math.min(b,ot),tt=Math.abs(rt-tt)/2,b=Math.abs(ot-b)/2,x=a.x-(x+tt),y=a.y-(y+b),this.fill===null){if(tt-=E,b-=E,0>=tt||0>=b||1>=x*x/(tt*tt)+y*y/(b*b))return Oe.free(z),!1;tt+=E,b+=E}return this.stroke!==null&&(tt+=E,b+=E),Oe.free(z),0>=tt||0>=b?!1:1>=x*x/(tt*tt)+y*y/(b*b)}if(x.type===Hn.o)return Oe.free(z),this.fill===null?gl(x,a.x,a.y,b):is(x,a,b,1<this.strokeWidth,y);se("Unknown Geometry type: "+x.type)},kt.Wl=function(a,y,x,E){var b=this.desiredSize,z=this.ig;if(a=Math.max(a,0),y=Math.max(y,0),this.Rd!==null)var tt=this.geometry.bounds;else{var rt=this.figure,ot=Km[rt];if(ot===void 0){var lt=Be.Ze[rt];typeof lt=="string"&&(lt=Be.Ze[lt]),typeof lt=="function"?(ot=lt(null,100,100),Km[rt]=ot):se("Unsupported Figure: "+rt)}tt=ot.bounds}rt=tt.width,ot=tt.height,lt=tt.width;var ut=tt.height;switch(_a(this,!0)){case Pn:E=x=0;break;case bn:lt=Math.max(a-z,0),ut=Math.max(y-z,0);break;case Hi:lt=Math.max(a-z,0),E=0;break;case Ji:x=0,ut=Math.max(y-z,0)}isFinite(b.width)&&(lt=b.width),isFinite(b.height)&&(ut=b.height);var ft=this.maxSize,yt=this.minSize;switch(x=Math.max(x-z,yt.width),E=Math.max(E-z,yt.height),lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=isFinite(lt)?Math.max(x,lt):Math.max(rt,x),ut=isFinite(ut)?Math.max(E,ut):Math.max(ot,E),x=_m(this),x){case Pn:break;case bn:rt=lt,ot=ut;break;case Ii:x=Math.min(lt/rt,ut/ot),isFinite(x)||(x=1),rt*=x,ot*=x;break;default:se(x+" is not a valid geometryStretch.")}this.Rd!==null?(rt===0&&(rt=.001),ot===0&&(ot=.001),x=this.Rd!==null?this.Rd:this.ua,tt=x.bounds,E=rt/tt.width,tt=ot/tt.height,isFinite(E)||(E=1),isFinite(tt)||(tt=1),this.ua=E===1&&tt===1?x:x.copy().scale(E,tt)):this.ua!==null&&Be.$(this.ua.Sk,a-z)&&Be.$(this.ua.Rk,y-z)||(this.ua=Cr.makeGeometry(this,rt,ot)),tt=this.ua.bounds,a===1/0||y===1/0?this.Ge(tt.x-z/2,tt.y-z/2,a===0&&rt===0?0:tt.width+z,y===0&&ot===0?0:tt.height+z):this.Ge(-(z/2),-(z/2),lt+z,ut+z),b.w()?(lt=b.width,ut=b.height,lt=Math.min(ft.width,lt),ut=Math.min(ft.height,ut),lt=Math.max(yt.width,lt),ut=Math.max(yt.height,ut),this.dc.h(0,0,lt,ut)):this.dc.assign(tt)};function _m(a){var y=a.geometryStretch;return a.Rd!==null?y===dr?bn:y:y===dr?Km[a.figure].defaultStretch:y}kt.eh=function(a,y,x,E){Fa(this,a,y,x,E)},kt.rs=function(a,y,x){return this.Sj(a.x,a.y,y.x,y.y,x)},kt.Sj=function(a,y,x,E,b){var z=this.transform,tt=1/(z.m11*z.m22-z.m12*z.m21),rt=z.m22*tt,ot=-z.m12*tt,lt=-z.m21*tt,ut=z.m11*tt,ft=tt*(z.m21*z.dy-z.m22*z.dx),yt=tt*(z.m12*z.dx-z.m11*z.dy);z=a*rt+y*lt+ft,tt=a*ot+y*ut+yt,rt=x*rt+E*lt+ft,ot=x*ot+E*ut+yt,ft=this.ig/2,lt=this.ua,lt===null&&(this.measure(1/0,1/0),lt=this.ua);var Mt=lt.bounds;if(ut=!1,lt.type===Hn.j)if(1.5>=this.strokeWidth)ut=Be.Ve(lt.startX,lt.startY,lt.endX,lt.endY,z,tt,rt,ot,b);else{if(lt.startX===lt.endX?(E=ft,ut=0):(y=(lt.endY-lt.startY)/(lt.endX-lt.startX),ut=ft/Math.sqrt(1+y*y),E=ut*y),y=li(),a=new Ot,Be.Ve(lt.startX+E,lt.startY+ut,lt.endX+E,lt.endY+ut,z,tt,rt,ot,a)&&y.push(a),a=new Ot,Be.Ve(lt.startX-E,lt.startY-ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ot,Be.Ve(lt.startX+E,lt.startY+ut,lt.startX-E,lt.startY-ut,z,tt,rt,ot,a)&&y.push(a),a=new Ot,Be.Ve(lt.endX+E,lt.endY+ut,lt.endX-E,lt.endY-ut,z,tt,rt,ot,a)&&y.push(a),rt=y.length,rt===0)return ci(y),!1;for(ut=!0,ot=1/0,E=0;E<rt;E++)a=y[E],x=(a.x-z)*(a.x-z)+(a.y-tt)*(a.y-tt),x<ot&&(ot=x,b.x=a.x,b.y=a.y);ci(y)}else if(lt.type===Hn.u)ut=Be.Ff(Mt.x-ft,Mt.y-ft,Mt.x+Mt.width+ft,Mt.y+Mt.height+ft,z,tt,rt,ot,b);else if(lt.type===Hn.F){y=Oe.allocAt(Mt.x,Mt.y,Mt.width,Mt.height).Bc(ft,ft);t:if(y.width===0)ut=Be.Ve(y.x,y.y,y.x,y.y+y.height,z,tt,rt,ot,b);else if(y.height===0)ut=Be.Ve(y.x,y.y,y.x+y.width,y.y,z,tt,rt,ot,b);else{if(a=y.width/2,lt=y.height/2,E=y.x+a,ut=y.y+lt,x=9999,z!==rt&&(x=(tt-ot)/(z-rt)),9999>Math.abs(x)){if(ot=tt-ut-x*(z-E),0>a*a*x*x+lt*lt-ot*ot){b.x=NaN,b.y=NaN,ut=!1;break t}ft=Math.sqrt(a*a*x*x+lt*lt-ot*ot),rt=(-(a*a*x*ot)+a*lt*ft)/(lt*lt+a*a*x*x)+E,a=(-(a*a*x*ot)-a*lt*ft)/(lt*lt+a*a*x*x)+E,lt=x*(rt-E)+ot+ut,ot=x*(a-E)+ot+ut,Math.abs((z-rt)*(z-rt))+Math.abs((tt-lt)*(tt-lt))<Math.abs((z-a)*(z-a))+Math.abs((tt-ot)*(tt-ot))?(b.x=rt,b.y=lt):(b.x=a,b.y=ot)}else{if(rt=lt*lt,ot=z-E,rt-=rt/(a*a)*ot*ot,0>rt){b.x=NaN,b.y=NaN,ut=!1;break t}ot=Math.sqrt(rt),rt=ut+ot,ot=ut-ot,Math.abs(rt-tt)<Math.abs(ot-tt)?(b.x=z,b.y=rt):(b.x=z,b.y=ot)}ut=!0}Oe.free(y)}else if(lt.type===Hn.o){yt=Ot.alloc();var Tt=rt-z,Dt=ot-tt,$t=Tt*Tt+Dt*Dt,Vt=z,ae=tt;if(0<$t&&Mt.contains(Vt,ae)&&(yt.x=Vt,yt.y=ae,this.ca(yt)))for(Tt!==0&&.5>Math.abs(Tt)?(Dt*=.5/Tt,Tt=.5):Dt!==0&&.5>Math.abs(Dt)&&(Tt*=.5/Dt,Dt=.5),Vt-=Tt,ae-=Dt;Mt.contains(Vt,ae);)Vt-=Tt,ae-=Dt;for(b.x=rt,b.y=ot,Dt=0;Dt<lt.figures.count;Dt++){var ce=lt.figures.s[Dt],ge=ce.isFilled?Vt:z,we=ce.isFilled?ae:tt,He=ce.segments;Mt=ce.startX,Tt=ce.startY;for(var di=Mt,Pi=Tt,wi=0;wi<He.count;wi++){var Gn=He.s[wi],wn=Gn.type,fr=Gn.endX,rr=Gn.endY,oo=!1;switch(wn){case Ss:di=fr,Pi=rr;break;case yo:oo=A0(Mt,Tt,fr,rr,ge,we,rt,ot,yt);break;case Fs:oo=Be.Eo(Mt,Tt,Gn.point1X,Gn.point1Y,Gn.point2X,Gn.point2Y,fr,rr,ge,we,rt,ot,.6,yt);break;case Oa:oo=Be.Eo(Mt,Tt,Mt+2/3*(Gn.point1X-Mt),Tt+2/3*(Gn.point1Y-Tt),fr+2/3*(Gn.point1X-fr),rr+2/3*(Gn.point1Y-rr),fr,rr,ge,we,rt,ot,.6,yt);break;case ss:case rl:wn=Gn.type===ss?Pa(Gn,ce):il(Gn,ce,Mt,Tt);var Bo=wn.length;if(Bo===0){oo=A0(Mt,Tt,Gn.type===ss?Gn.centerX:Gn.endX,Gn.type===ss?Gn.centerY:Gn.endY,ge,we,rt,ot,yt);break}for(rr=null,fr=0;fr<Bo;fr++){if(rr=wn[fr],fr===0&&A0(Mt,Tt,rr[0],rr[1],ge,we,rt,ot,yt)){var Xs=u0(ge,we,yt,$t,b);Xs<$t&&($t=Xs,ut=!0)}Be.Eo(rr[0],rr[1],rr[2],rr[3],rr[4],rr[5],rr[6],rr[7],ge,we,rt,ot,.6,yt)&&(Xs=u0(ge,we,yt,$t,b),Xs<$t&&($t=Xs,ut=!0))}fr=rr[6],rr=rr[7];break;default:se("Unknown Segment type: "+wn)}Mt=fr,Tt=rr,oo&&(oo=u0(ge,we,yt,$t,b),oo<$t&&($t=oo,ut=!0)),Gn.isClosed&&(fr=di,rr=Pi,A0(Mt,Tt,fr,rr,ge,we,rt,ot,yt)&&(Gn=u0(ge,we,yt,$t,b),Gn<$t&&($t=Gn,ut=!0)))}}z=x-a,tt=E-y,rt=Math.sqrt(z*z+tt*tt),rt!==0&&(z/=rt,tt/=rt),b.x-=z*ft,b.y-=tt*ft,Ot.free(yt)}else se("Unknown Geometry type: "+lt.type);return ut?(this.transform.Ga(b),!0):!1};function u0(a,y,x,E,b){return a=x.x-a,y=x.y-y,y=a*a+y*y,y<E?(b.x=x.x,b.y=x.y,y):E}function A0(a,y,x,E,b,z,tt,rt,ot){if(Be.$(a,x)&&Be.$(y,E)||Be.$(b,tt)&&Be.$(z,rt))return!1;var lt=!1,ut=(b-tt)*(y-E)-(z-rt)*(a-x);return ut===0?!1:(ot.x=((b*rt-z*tt)*(a-x)-(b-tt)*(a*E-y*x))/ut,ot.y=((b*rt-z*tt)*(y-E)-(z-rt)*(a*E-y*x))/ut,(a>x?a-x:x-a)<(y>E?y-E:E-y)?(a=y<E?y:E,y=y<E?E:y,(ot.y>a||Be.$(ot.y,a))&&(ot.y<y||Be.$(ot.y,y))&&(lt=!0)):(y=a<x?a:x,a=a<x?x:a,(ot.x>y||Be.$(ot.x,y))&&(ot.x<a||Be.$(ot.x,a))&&(lt=!0)),lt)}kt.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=Ot.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)))),Ot.free(z),b},kt.Yc=function(a,y){if(this.fh(a,y)||y===void 0&&(y=this.transform,a.Re(this.actualBounds)))return!0;var x=ir.alloc();x.set(y),x.Vj();var E=a.left,b=a.right,z=a.top;a=a.bottom;var tt=Ot.alloc();if(tt.h(E,z),x.Ga(tt),this.gh(tt,!0)||(tt.h(b,z),x.Ga(tt),this.gh(tt,!0))||(tt.h(E,a),x.Ga(tt),this.gh(tt,!0))||(tt.h(b,a),x.Ga(tt),this.gh(tt,!0)))return Ot.free(tt),!0;var rt=Ot.alloc(),ot=Ot.alloc();return x.set(y),x.bv(this.transform),x.Vj(),rt.x=b,rt.y=z,rt.transform(x),tt.x=E,tt.y=z,tt.transform(x),y=!1,$d(this,tt,rt,ot)?y=!0:(tt.x=b,tt.y=a,tt.transform(x),$d(this,tt,rt,ot)?y=!0:(rt.x=E,rt.y=a,rt.transform(x),$d(this,tt,rt,ot)?y=!0:(tt.x=E,tt.y=z,tt.transform(x),$d(this,tt,rt,ot)&&(y=!0)))),Ot.free(tt),ir.free(x),Ot.free(rt),Ot.free(ot),y};function $d(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)}kt.tx=function(a,y,x){function E($t,Vt){for(var ae=$t.length,ce=0;ce<ae;ce+=2)if(Vt.zd($t[ce],$t[ce+1])>b)return!0;return!1}if(x&&this.fill!==null&&this.gh(a,!0))return!0;var b=a.Bf(y),z=b;if(1.5<this.strokeWidth&&(b=this.strokeWidth/2+Math.sqrt(b),b*=b),y=this.ua,y===null&&(this.measure(1/0,1/0),y=this.ua,y===null))return!1;if(!x){var tt=y.bounds,rt=tt.x,ot=tt.y,lt=tt.x+tt.width;if(tt=tt.y+tt.height,Tn(a.x,a.y,rt,ot)<=b&&Tn(a.x,a.y,lt,ot)<=b&&Tn(a.x,a.y,rt,tt)<=b&&Tn(a.x,a.y,lt,tt)<=b)return!0}if(rt=y.startX,ot=y.startY,lt=y.endX,tt=y.endY,y.type===Hn.j){if(x=(rt-lt)*(a.x-lt)+(ot-tt)*(a.y-tt),Cn(a.x,a.y,rt,ot,lt,tt)<=(0<=(lt-rt)*(a.x-rt)+(tt-ot)*(a.y-ot)&&0<=x?b:z))return!0}else{if(y.type===Hn.u)return y=!1,x&&(y=Cn(a.x,a.y,rt,ot,rt,tt)<=b||Cn(a.x,a.y,rt,ot,lt,ot)<=b||Cn(a.x,a.y,lt,ot,lt,tt)<=b||Cn(a.x,a.y,rt,tt,lt,tt)<=b),y;if(y.type===Hn.F){y=a.x-(rt+lt)/2,z=a.y-(ot+tt)/2;var ut=Math.abs(lt-rt)/2,ft=Math.abs(tt-ot)/2;if(ut===0||ft===0)return Cn(a.x,a.y,rt,ot,lt,tt)<=b;if(x){if(a=Be.$y(ut,ft,y,z),a*a<=b)return!0}else return!(Tn(y,z,-ut,0)>=b||Tn(y,z,0,-ft)>=b||Tn(y,z,0,ft)>=b||Tn(y,z,ut,0)>=b)}else if(y.type===Hn.o){if(lt=y.bounds,z=lt.x,rt=lt.y,ot=lt.x+lt.width,lt=lt.y+lt.height,a.x>ot&&a.x<z&&a.y>lt&&a.y<rt&&Cn(a.x,a.y,z,rt,z,lt)>b&&Cn(a.x,a.y,z,rt,ot,rt)>b&&Cn(a.x,a.y,ot,lt,z,lt)>b&&Cn(a.x,a.y,ot,lt,ot,rt)>b)return!1;if(z=Math.sqrt(b),x){if(this.fill===null?gl(y,a.x,a.y,z):is(y,a,z,!0,!1))return!0}else{for(x=y.figures,y=0;y<x.count;y++){if(z=x.s[y],tt=z.startX,ut=z.startY,a.zd(tt,ut)>b)return!1;for(rt=z.segments.s,ot=rt.length,lt=0;lt<ot;lt++)switch(ft=rt[lt],ft.type){case Ss:case yo:if(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b)return!1;break;case Fs:var yt=li();if(Be.Qe(tt,ut,ft.point1X,ft.point1Y,ft.point2X,ft.point2Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),ci(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case Oa:if(yt=li(),Be.ep(tt,ut,ft.point1X,ft.point1Y,ft.endX,ft.endY,.8,yt),tt=E(yt,a),ci(yt),tt||(tt=ft.endX,ut=ft.endY,a.zd(tt,ut)>b))return!1;break;case ss:case rl:yt=ft.type===ss?Pa(ft,z):il(ft,z,tt,ut);var Mt=yt.length;if(Mt===0){if(tt=ft.type===ss?ft.centerX:ft.endX,ut=ft.type===ss?ft.centerY:ft.endY,a.zd(tt,ut)>b)return!1;break}ft=null;for(var Tt=li(),Dt=0;Dt<Mt;Dt++)if(ft=yt[Dt],Tt.length=0,Be.Qe(ft[0],ft[1],ft[2],ft[3],ft[4],ft[5],ft[6],ft[7],.8,Tt),E(Tt,a))return ci(Tt),!1;ci(Tt),ft!==null&&(tt=ft[6],ut=ft[7]);break;default:se("Unknown Segment type: "+ft.type)}}return!0}}}return!1},kt.qc=function(){this.ua=null},kt.kq=function(){return this.ig};function wy(a){var y=a.diagram;y!==null&&y.undoManager.isUndoingRedoing||(a.segmentOrientation=pp,a.toArrow!=="None"?(a.segmentIndex=-1,a.alignmentFocus=hs):a.fromArrow!=="None"&&(a.segmentIndex=0,a.alignmentFocus=new Ci(1-hs.x,hs.y)))}Cr.makeGeometry=function(a,y,x){if(a.toArrow!=="None")var E=eh[a.toArrow];else a.fromArrow!=="None"?E=eh[a.fromArrow]:(E=Be.Ze[a.figure],typeof E=="string"&&(E=Be.Ze[E]),E===void 0&&se("Unknown Shape.figure: "+a.figure),E=E(a,y,x),E.Sk=y,E.Rk=x);if(E===null){var b=Be.Ze.Rectangle;typeof b=="function"&&(E=b(a,y,x))}return E};function xy(a){var y=eh[a];if(y===void 0){var x=a.toLowerCase();if(x==="none")return"None";if(y=eh[x],y===void 0){var E=null,b;for(b in Be.um)if(b.toLowerCase()===x){E=b;break}if(E!==null)return a=Hn.parse(Be.um[E],!1),eh[E]=a,x!==E&&(eh[x]=E),E}}return typeof y=="string"?y:y instanceof Hn?a:null}yn.Object.defineProperties(Cr.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),na(this)&&(a=this.part,a!==null&&No(this,a,"geometryString"))}}},geometryString:{get:function(){return this.geometry===null?"":this.geometry.toString()},set:function(a){a=Hn.parse(a);var y=a.normalize();this.geometry=a,this.position=a=Ot.allocAt(-y.x,-y.y),Ot.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&&Lt(a,"Shape.fill"),a instanceof ho&&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&&Lt(a,"Shape.stroke"),a instanceof ho&&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 qn(a,"value >= 0",Cr,"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"?qn(a,'"butt", "round", or "square"',Cr,"strokeCap"):(Jd(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"?qn(a,'"miter", "bevel", or "round"',Cr,"strokeJoin"):(Jd(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){Jd(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)||se("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&&(Jd(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=Be.Ze[a];typeof x=="function"?x=a:(x=Be.Ze[a.toLowerCase()])||se("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=xy(a);x===null?se("Unknown Shape.toArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.V=x,this.Rd=null,this.qc(),this.v(),wy(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=xy(a);x===null?se("Unknown Shape.fromArrow: "+a):y!==x&&(this.Ua===null&&(this.Ua=new Lh),this.Ua.j=x,this.Rd=null,this.qc(),this.v(),wy(this),this.g("fromArrow",y,x))}}},spot1:{get:function(){return this.Na!==null?this.Na.fg:Io},set:function(a){var y=this.spot1;y.D(a)||(a=a.J(),Jd(this),this.Na.fg=a,this.v(),this.g("spot1",y,a))}},spot2:{get:function(){return this.Na!==null?this.Na.gg:Io},set:function(a){var y=this.spot2;y.D(a)||(a=a.J(),Jd(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&&(Jd(this),this.Na.br=a,this.N(),this.g("pathPattern",y,a))}},geometryStretch:{get:function(){return this.Na!==null?this.Na.jq:dr},set:function(a){var y=this.geometryStretch;y!==a&&(Jd(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 nh),this.fa.Tk=a;var x=this.diagram;x!==null&&this.panel===x.grid&&Uu(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 nh),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 nh),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 nh),this.fa.o=a,this.v(),this.g("graduatedSkip",y,a))}}}),Cr.prototype.intersectsRect=Cr.prototype.Yc,Cr.prototype.containedInRect=Cr.prototype.fh,Cr.prototype.getNearestIntersectionPoint=Cr.prototype.rs,Cr.prototype.getDocumentBounds=Cr.prototype.mi,Cr.prototype.getDocumentPoint=Cr.prototype.ga;var eh=new Si,Km=new Si;Cr.className="Shape",Cr.getFigureGenerators=function(){var a=new ke,y;for(y in Be.Ze)y!==y.toLowerCase()&&a.add(y,Be.Ze[y]);return a.freeze(),a},Cr.defineFigureGenerator=function(a,y){var x=a.toLowerCase(),E=Be.Ze;E[a]=y,E[x]=a},Cr.getArrowheadGeometries=function(){var a=new ke;for(E in Be.um)if(eh[E]===void 0){var y=Hn.parse(Be.um[E],!1);eh[E]=y,y=E.toLowerCase(),y!==E&&(eh[y]=E)}for(var x in eh)if(x!==x.toLowerCase()){var E=eh[x];E instanceof Hn&&a.add(x,E)}return a.freeze(),a},Cr.defineArrowheadGeometry=function(a,y){var x=null;typeof y=="string"?x=Hn.parse(y,!1):x=y,y=a.toLowerCase(),y!=="none"&&a!==y||se("Shape.defineArrowheadGeometry name must not be empty or None or all-lower-case: "+a);var E=eh;E[a]=x,E[y]=a};function zm(){this.nc=!1,this.Hr="butt",this.Ir="miter",this.Jr=10,this.uj=0,this.br=null,this.jq=dr,this.gg=this.fg=Io}zm.prototype.copy=function(){var a=new zm;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 Mo(a,y){return Se.call(this),g0||(ul=Jo?new Jl(null).context:null,g0=!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}Ge(Mo,Se),Mo.prototype.cloneProtected=function(a){Se.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 EA(a){a.da===null?a.da=new Xm:a.da.nc&&(a.da=a.da.copy())}kt=Mo.prototype,kt.th=function(){Se.prototype.th.call(this),this.da!==null&&(this.da.nc=!0)};function Sy(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}kt.qb=function(a){a.classType===Mo?this.wrap=a:Se.prototype.qb.call(this,a)},kt.toString=function(){return 22<this.ec.length?'TextBlock("'+this.ec.substring(0,20)+'"...)':'TextBlock("'+this.ec+'")'},kt.v=function(){Se.prototype.v.call(this)},kt.hh=function(a,y){if(this.xc!==null&&this.ec.length!==0&&this.Ae!==null){var x=this.naturalBounds,E=this.actualBounds,b=x.width,z=x.height,tt=up(this),rt=a.textAlign=this.textAlign,ot=y.tn;rt==="start"?rt=ot?"right":"left":rt==="end"&&(rt=ot?"left":"right"),ot=this.isUnderline;var lt=this.isStrikethrough;Xo(this,a,this.xc,!0,!1,x,E),(ot||lt)&&Xo(this,a,this.xc,!1,!1,x,E),E=0,x=!1;var ut=this.oe,ft=ut.dx-(tt*ut.m21+ut.dx);ut=ut.dy-(tt*ut.m22+ut.dy);var yt=y.scale;switch(8>(ft*ft+ut*ut)*yt*yt&&(x=!0),y.ib!==a&&(x=!1),y.ib instanceof Wa&&(x=!1),y.Gf("textGreeking")===!1&&(x=!1),y=this.spacingAbove,ft=this.spacingBelow,this.flip){case jr:a.translate(b,0),a.scale(-1,1);break;case Er:a.translate(0,z),a.scale(1,-1);break;case po:a.translate(b,z),a.scale(-1,-1)}if(a.yc(),ut=this.Gc,yt=(y+tt+ft)*ut,z>yt&&(E=this.verticalAlignment,E=E.y*z-E.y*yt+E.offsetY),ut===1&&this.ze!==null)ft=this.Cb,ft>b&&(ft=b),this.Oj(this.ze,a,0,E+y,b,tt,ft,x,rt,ot,lt);else if(this.Qc!==null&&this.Qb!==null)for(yt=0;yt<ut;yt++){var Mt=this.Qc[yt];Mt>b&&(Mt=b),E+=y,this.Oj(this.Qb[yt],a,0,E,b,tt,Mt,x,rt,ot,lt),E+=tt+ft}switch(this.flip){case jr:a.scale(-1,1),a.translate(-b,0);break;case Er:a.scale(1,-1),a.translate(0,-z);break;case po:a.scale(-1,-1),a.translate(-b,-z)}}},kt.Oj=function(a,y,x,E,b,z,tt,rt,ot,lt,ut){var ft=0;if(rt)ot==="left"?ft=0:ot==="right"?ft=b-tt:ot==="center"&&(ft=(b-tt)/2),y.fillRect(x+ft,E+.25*z,tt,1);else{if(ot==="left"?ft=0:ot==="right"?ft=b:ot==="center"&&(ft=b/2),b=h0!==null?h0(this,z):.75*z,y.fillText(a,x+ft,E+b),a=z/20|0,a===0&&(a=1),ot==="right"?ft-=tt:ot==="center"&&(ft-=tt/2),lt){rt=c0!==null?c0(this,z):.8*z,ot=x+ft,lt=E+rt,b=x+ft+tt,rt=E+rt;var yt=a;y.beginPath(),y.lineWidth=yt,y.moveTo(ot,lt),y.lineTo(b,rt),y.stroke(),y.Se(),y instanceof Wa&&y.ad.classList.add("gojs-td")}ut&&(ut=E+z-z/2.2|0,a%2!==0&&(ut+=.5),E=x+ft,z=ut,x=x+ft+tt,tt=ut,ft=a,y.beginPath(),y.lineWidth=ft,y.moveTo(E,z),y.lineTo(x,tt),y.stroke(),y.Se(),y instanceof Wa&&y.ad.classList.add("gojs-td"))}},kt.kk=function(a,y,x){if(!Se.prototype.kk.call(this,a,y,x))return!1;if(Xo(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++)Qf(a,y[x],!1)}else y=this.svg,y.innerHTML=this.text,Qf(a,y,!0);return!0},kt.nk=function(a){return 1<this.lineCount||this.isUnderline||this.isStrikethrough?!0:Se.prototype.nk.call(this,a)},kt.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)}},kt.Wl=function(a,y,x,E){var b=this.Gc;this.Ih=a,this.l&=-16777217;var z=this.Ae;ul!==null&&My!==z&&(My=ul.font=z),this.Cb=this.Le=0,this.ze=this.Qb=this.Qc=this.df=null;var tt;if(isNaN(this.desiredSize.width)){if(z=this.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),z.length===0)z=8;else if(this.isMultiline){for(var rt=tt=0,ot=!1;!ot;){var lt=z.indexOf(`
`,rt);lt===-1&&(lt=z.length,ot=!0),rt=z.substr(rt,lt-rt),this.formatting===Ap&&(rt=rt.trim()),tt=Math.max(tt,_u(rt)),rt=lt+1}z=tt}else tt=z.indexOf(`
`,0),0<=tt&&(z=z.substr(0,tt)),z=_u(z);z=Math.min(z,a/this.scale)}else z=this.desiredSize.width;if(this.panel!==null&&(z=Math.min(z,this.panel.maxSize.width)),tt=Cy(this,z),isNaN(this.desiredSize.height)?tt=Math.min(tt,y/this.scale):tt=this.desiredSize.height,ot=tt,this.Cb!==0&&this.Qc!==null&&this.Qb!==null&&this.overflow===d0&&(y=this.Ae,y=this.overflow===d0?By(y):0,lt=this.spacingAbove+this.spacingBelow,lt=Math.max(0,up(this)+lt),ot=Math.min(this.maxLines-1,Math.max(Math.floor(ot/lt+.01)-1,0)),!(ot+1>=this.Qb.length))){for(this.l|=16777216,lt=this.Qb[ot],y=Math.max(1,a-y);_u(lt)>y&&1<lt.length;)lt=lt.substr(0,lt.length-1);lt+=hp,y=_u(lt),this.Qb[ot]=lt,this.Qb=this.Qb.slice(0,ot+1),this.Qc[ot]=y,this.Qc=this.Qc.slice(0,ot+1),this.Le=this.Qb.length,this.Cb=Math.max(this.Cb,y),this.Gc=this.Le,this.Gc===1&&(this.ze=this.Qb[0])}(this.wrap===Py||isNaN(this.desiredSize.width))&&(z=isNaN(a)?this.Cb:Math.min(a,this.Cb)),z=Math.max(x,z),tt=Math.max(E,tt),Nr(this.dc,z,tt),this.Ge(0,0,z,tt),this.svg!==null&&b!==this.Gc&&(this.Uc=!0)},kt.eh=function(a,y,x,E){Fa(this,a,y,x,E)};function lp(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 Gm(a,y,x,E){var b=a.formatting===Ap;b&&(y=y.trim());var z=0,tt=a.Ae,rt=a.spacingAbove+a.spacingBelow;rt=Math.max(0,up(a)+rt);var ot=a.overflow===d0?By(tt):0;if(a.Gc>=a.maxLines)E!==null&&E.h(0,rt);else if(tt=y,a.wrap===jm){a.Le=1;var lt=_u(y);if(ot===0||lt<=x)a.Cb=Math.max(a.Cb,lt),lp(a,y,a.Cb),E!==null&&E.h(lt,rt);else{for(z=xg(a,tt),tt=tt.substr(z.length),y=xg(a,tt),lt=_u(z+y);0<y.length&&lt<=x;)z+=y,tt=tt.substr(y.length),y=xg(a,tt),lt=z+y,b&&(lt=lt.trim()),lt=_u(lt);for(b&&(y=y.trim()),z+=y,x=Math.max(1,x-ot);_u(z)>x&&1<z.length;)z=z.substr(0,z.length-1);a.l|=16777216,z+=hp;var ut=_u(z);a.Cb=ut,lp(a,z,ut),E!==null&&E.h(ut,rt)}}else{for(ot=0,tt.length===0&&(ot=1,lp(a,tt,0));0<tt.length;){for(y=xg(a,tt),tt=tt.substr(y.length);_u(y)>x;){var ft=1;for(lt=_u(y.substr(0,ft)),ut=0;lt<=x;)ft++,ut=lt,lt=_u(y.substr(0,ft));if(ft===1){var yt=lt;z=Math.max(z,lt)}else yt=ut,z=Math.max(z,ut);if(ft--,1>ft&&(ft=1),lp(a,y.substr(0,ft),yt),ot++,y=y.substr(ft),a.Gc+ot>a.maxLines)break}for(ut=xg(a,tt),lt=_u(y+ut);0<ut.length&&lt<=x;)y+=ut,tt=tt.substr(ut.length),ut=xg(a,tt),lt=y+ut,b&&(lt=lt.trim()),lt=_u(lt);if(b&&(y=y.trim()),y!==""&&(y[y.length-1]==="\xAD"&&(y=y.substring(0,y.length-1)+"\u2010"),ut.length===0?(ft=lt,z=Math.max(z,lt)):(ft=ut=_u(y),z=Math.max(z,ut)),lp(a,y,ft),ot++,a.Gc+ot>a.maxLines))break}a.Le=Math.min(a.maxLines,ot),a.Cb=Math.max(a.Cb,z),E!==null&&E.h(a.Cb,rt*a.Le)}}function xg(a,y){if(a.wrap===Fy)return y.substr(0,1);for(var x=y.length,E=0,b=Fw;E<x&&!b.test(y.charAt(E));)E++;for(a.formatting===Ey&&(x=Math.min(x,E+1));E<x&&b.test(y.charAt(E));)E++;return E>=y.length?y:y.substr(0,E)}function _u(a){return ul===null?8*a.length:ul.measureText(a).width}function up(a){if(a.df!==null)return a.df;var y=a.Ae;if(ul===null){var x=16;return a.df=x}return Wm[y]!==void 0&&5e3>Ly?x=Wm[y]:(x=1.3*ul.measureText("M").width,Wm[y]=x,Ly++),a.df=x}function By(a){if(ul===null)return 6;if(f0[a]!==void 0&&5e3>Ym)var y=f0[a];else y=ul.measureText(hp).width,f0[a]=y,Ym++;return y}function Cy(a,y){var x=a.ec.replace(/\r\n/g,`
`).replace(/\r/g,`
`),E=a.spacingAbove+a.spacingBelow;if(E=Math.max(0,up(a)+E),x.length===0)return a.Cb=0,a.Gc=1,E;if(!a.isMultiline){var b=x.indexOf(`
`,0);0<=b&&(x=x.substr(0,b))}b=0;for(var z=a.Gc=0,tt,rt=!1;!rt;){if(tt=x.indexOf(`
`,z),tt===-1&&(tt=x.length,rt=!0),z<=tt){if(z=x.substr(z,tt-z),a.wrap!==jm){a.Le=0;var ot=on.alloc();Gm(a,z,y,ot),b+=ot.height,on.free(ot),a.Gc+=a.Le}else Gm(a,z,y,null),b+=E,a.Gc++;a.Gc===a.maxLines&&(rt=!0)}z=tt+1}return a.Lq=b}yn.Object.defineProperties(Mo.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"||(EA(this),this.da.Or=a,this.N(),this.g("textAlign",y,a))}},flip:{get:function(){return this.da!==null?this.da.Xf:Pn},set:function(a){var y=this.flip;y!==a&&(EA(this),this.da.Xf=a,this.N(),this.g("flip",y,a))}},verticalAlignment:{get:function(){return this.da!==null?this.da.Yr:Qs},set:function(a){var y=this.verticalAlignment;y.D(a)||(a=a.J(),EA(this),this.da.Yr=a,Ns(this),this.g("verticalAlignment",y,a))}},naturalBounds:{get:function(){if(!this.dc.w()){var a=on.alloc();Gm(this,this.ec,999999,a);var y=a.width;on.free(a),a=Cy(this,y);var x=this.desiredSize;isNaN(x.width)||(y=x.width),isNaN(x.height)||(a=x.height),Nr(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:Vm},set:function(a){var y=this.wrap;y!==a&&(EA(this),this.da.$r=a,this.v(),this.g("wrap",y,a))}},overflow:{get:function(){return this.da!==null?this.da.$q:Zm},set:function(a){var y=this.overflow;y!==a&&(EA(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&&Lt(a,"TextBlock.stroke"),a instanceof ho&&a.freeze(),this.xc=a,this.N(),this.g("stroke",y,a))}},lineCount:{get:function(){return this.Gc}},lineHeight:{get:function(){return up(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&&(EA(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&&(EA(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 nh),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 nh),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 nh),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 nh),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 nh),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&&(EA(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&&(EA(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&&(EA(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&&(EA(this),this.da.Er=a,this.v(),this.g("spacingBelow",y,a))}},formatting:{get:function(){return this.da!==null?this.da.gq:Ap},set:function(a){var y=this.formatting;y!==a&&(EA(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&&qn(a,"> 0",Mo,"maxLines"),EA(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 h0=null,c0=null,jm=new Te(Mo,"None",0),Py=new Te(Mo,"WrapFit",1),Vm=new Te(Mo,"WrapDesiredSize",2),Fy=new Te(Mo,"WrapBreakAll",3),Zm=new Te(Mo,"OverflowClip",0),d0=new Te(Mo,"OverflowEllipsis",1),Ap=new Te(Mo,"FormatTrim",0),Ey=new Te(Mo,"FormatNone",0),Fw=/[ \u200b\u00ad]/,Wm=new Si,Ly=0,f0=new Si,Ym=0,hp="...",My="",ul=null,g0=!1;Mo.className="TextBlock";function Xm(){this.nc=!1,this.Hd=null,this.Xf=Pn,this.gq=Ap,this.Jq=1/0,this.$q=Zm,this.Er=this.Dr=0,this.Or="start",this.vj=this.Qr=this.Pr=null,this.Yr=Qs,this.$r=Vm}Xm.prototype.copy=function(){var a=new Xm;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},Mo.getEllipsis=function(){return hp},Mo.setEllipsis=function(a){hp=a,f0=new Si,Ym=0},Mo.getBaseline=function(){return h0},Mo.setBaseline=function(a){h0=a},Mo.getUnderline=function(){return c0},Mo.setUnderline=function(a){c0=a},Mo.isValidFont=function(a){if(g0||(ul=Jo?new Jl(null).context:null,g0=!0),ul===null)return!0;var y=ul.font;if(a===y||a==="10px sans-serif")return!0;ul.font="10px sans-serif",ul.font=a;var x=ul.font;if(x!=="10px sans-serif")return ul.font=y,!0;ul.font="19px serif";var E=ul.font;return ul.font=a,x=ul.font,ul.font=y,x!==E},Mo.FormatNone=Ey,Mo.FormatTrim=Ap,Mo.None=jm,Mo.OverflowClip=Zm,Mo.OverflowEllipsis=d0,Mo.WrapBreakAll=Fy,Mo.WrapDesiredSize=Vm,Mo.WrapFit=Py;function nh(){this.Tk=1,this.u=0,this.j=1,this.o=this.F=null}nh.prototype.copy=function(){var a=new nh;return a.Tk=this.Tk,a.u=this.u,a.j=this.j,a.F=this.F,a.o=this.o,a},nh.className="GradElementSettings";function Al(a,y){Se.call(this),this.Eg=null,this.qo="",this.Xg=Ua,this.Nk=bn,this.Zg=this.Hd=null,this.Mk=cr,this.Xf=Pn,this.vl=null,this.qn=!1,this.en=!0,this.al=!1,this.bt=this.rl=null,typeof a=="string"?this.source=a:a&&Object.assign(this,a),y&&Object.assign(this,y)}var Sg;Ge(Al,Se),Al.prototype.cloneProtected=function(a){Se.prototype.cloneProtected.call(this,a),a.qo=this.qo,a.element=this.Eg,a.Xg=this.Xg.J(),a.Nk=this.Nk,a.Xf=this.Xf,a.Hd=this.Hd,a.Zg=this.Zg,a.Mk=this.Mk.J(),a.en=this.en,a.rl=this.rl},Al.prototype.qb=function(a){a===Pn||a===Ii||a===Rr?this.imageStretch=a:Se.prototype.qb.call(this,a)},Al.prototype.toString=function(){return"Picture("+this.source+")#"+ti(this)};function Bg(a){a===void 0&&(a=""),a!==""?Sg[a]&&(delete Sg[a],p0--):(Sg=new Si,p0=0)}function by(a,y){y.qy||(y.Fq=function(x){y.sq=!0,y.ln=!1;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value;b.N();var z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null)for(var rt=tt.length,ot=0;ot<rt;ot++)z=tt[ot],b.Xn.add(z),z.Uc=!0,b.$b(),y.hn&&(y.eu===void 0&&(y.eu=x),z.Zg!==null&&z.Zg(z,x))}y.Bg.clear()}a.desiredSize.w()||(Ls(a,!1),a.v())},y.Yp=function(x){y.ln=x;var E=y.Bg.copy();if(E!=null){for(E=E.iterator;E.next();){var b=E.value,z=y.getAttribute("src")||"",tt=b.Og.I(z);if(tt!==null){b=tt.length,z=li();for(var rt=0;rt<b;rt++)z.push(tt[rt]);if(y.hn)for(rt=0;rt<b;rt++)tt=z[rt],tt.Hd!==null&&tt.Hd(tt,x);ci(z)}}y.Bg.clear()}},y.addEventListener("load",y.Fq),y.addEventListener("error",y.Yp),y.qy=!0)}Al.prototype.hA=function(){if(this.source!==""){Bg(this.source);var a=this.source;this.source="",this.source=a}},Al.prototype.redraw=function(){this.N(),this.Uc=!0},Al.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 pc)){var b=a instanceof Wa;E=this.naturalBounds;var z=0,tt=0,rt=this.qn,ot=rt?+x.width:x.naturalWidth;if(rt=rt?+x.height:x.naturalHeight,ot===void 0&&x.videoWidth&&(ot=x.videoWidth),rt===void 0&&x.videoHeight&&(rt=x.videoHeight),ot=ot||E.width,rt=rt||E.height,ot!==0&&rt!==0){var lt=ot,ut=rt;this.sourceRect.w()&&(z=this.Xg.x,tt=this.Xg.y,ot=this.Xg.width,rt=this.Xg.height);var ft=ot,yt=rt,Mt=this.Nk,Tt=this.Mk;switch(Mt){case Pn:if(this.sourceRect.w())break;ft>=E.width&&(z=z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)),yt>=E.height&&(tt=tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)),ot=Math.min(E.width,ft),rt=Math.min(E.height,yt);break;case bn:ft=E.width,yt=E.height;break;case Ii:case Rr:Mt===Ii?(Mt=Math.min(E.height/yt,E.width/ft),ft*=Mt,yt*=Mt):Mt===Rr&&(Mt=Math.max(E.height/yt,E.width/ft),ft*=Mt,yt*=Mt,ft>=E.width&&(z=(z+Tt.offsetX+(ft*Tt.x-E.width*Tt.x)/ft)*ot),yt>=E.height&&(tt=(tt+Tt.offsetY+(yt*Tt.y-E.height*Tt.y)/yt)*rt),ot*=1/(ft/E.width),rt*=1/(yt/E.height),ft=E.width,yt=E.height)}Mt=this.Df()*y.scale;var Dt=ft*Mt*yt*Mt,$t=ot*rt/Dt,Vt=x.__goCache;Mt=null;var ae=Ew;if(!b){if(x.sq&&Vt!==void 0&&4<Dt&&$t>ae*ae)for(Vt.gi===null&&(Ty(Vt,4,lt,ut,x),Ty(Vt,16,lt,ut,x)),b=Vt.gi,lt=b.length,ut=0;ut<lt&&b[ut].ratio*b[ut].ratio<$t;ut++)Mt=b[ut];if(!y.Xm){if(this.vl===null)if(this.Eg===null)this.vl=!1;else{b=new Jl(null).context;try{b.drawImage(this.Eg,0,0)}catch(ce){this.en=!1}try{b.getImageData(0,0,1,1).data[3]&&(this.vl=!1),this.vl=!1}catch(ce){this.vl=!0}}if(this.vl)return}}switch(b=ft<E.width?Tt.offsetX+(E.width*Tt.x-ft*Tt.x):0,Tt=yt<E.height?Tt.offsetY+(E.height*Tt.y-yt*Tt.y):0,this.flip){case jr:a.translate(Math.min(E.width,ft),0),a.scale(-1,1);break;case Er:a.translate(0,Math.min(E.height,yt)),a.scale(1,-1);break;case po:a.translate(Math.min(E.width,ft),Math.min(E.height,yt)),a.scale(-1,-1)}if(a.yc(),y.Gf("pictureRatioOptimization")&&!y.$i&&Vt!==void 0&&Mt!==null&&Mt.ratio!==1){a.save(),y=Mt.ratio;try{a.drawImage(Mt.source,z/y,tt/y,Math.min(Mt.source.width,ot/y),Math.min(Mt.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Wa&&(this.bt=[z/y,tt/y,Math.min(Mt.source.width,ot/y),Math.min(Mt.source.height,rt/y),b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(ce){this.en=!1}a.restore()}else try{a.drawImage(x,z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)),a instanceof Wa&&(this.bt=[z,tt,ot,rt,b,Tt,Math.min(E.width,ft),Math.min(E.height,yt)])}catch(ce){this.en=!1}switch(this.flip){case jr:a.scale(-1,1),a.translate(-Math.min(E.width,ft),0);break;case Er:a.scale(1,-1),a.translate(0,-Math.min(E.height,yt));break;case po:a.scale(-1,-1),a.translate(-Math.min(E.width,ft),-Math.min(E.height,yt))}}}}},Al.prototype.Wl=function(a,y,x,E){var b=this.desiredSize,z=_a(this,!0),tt=this.Eg,rt=this.qn,ot=0,lt=0;(rt||!this.al&&tt&&tt.complete)&&(this.al=!0),tt===null?(isFinite(b.width)||(a=0),isFinite(b.height)||(y=0)):(ot=rt?+tt.width:tt.naturalWidth,lt=rt?+tt.height:tt.naturalHeight),isFinite(b.width)||z===bn||z===Hi?(isFinite(a)||(this.sourceRect.w()?a=this.sourceRect.width:tt!==null&&(a=ot)),x=0):tt!==null&&this.al!==!1&&(a=this.sourceRect.w()?this.sourceRect.width:ot),isFinite(b.height)||z===bn||z===Ji?(isFinite(y)||(this.sourceRect.w()?y=this.sourceRect.height:tt!==null&&(y=lt)),E=0):tt!==null&&this.al!==!1&&(y=this.sourceRect.w()?this.sourceRect.height:lt),isFinite(b.width)&&(a=b.width),isFinite(b.height)&&(y=b.height),b=this.maxSize,z=this.minSize,x=Math.max(x||0,z.width),E=Math.max(E||0,z.height),a=Math.min(b.width,a),y=Math.min(b.height,y),a=Math.max(x,a),y=Math.max(E,y),tt===null||tt.complete||(isFinite(a)||(a=0),isFinite(y)||(y=0)),Nr(this.dc,a,y),this.Ge(0,0,a,y)},Al.prototype.eh=function(a,y,x,E){Fa(this,a,y,x,E)},yn.Object.defineProperties(Al.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||se("Picture.element must be an instance of Image, Canvas, or Video, not: "+a);var E=this.diagram;E!==null&&Rd(E,this),this.Eg=a,a!==null&&x&&a.Bg===void 0&&(a.Bg=new xe),E!==null&&x&&Ch(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()||(Ls(this,!1),this.v())):x&&by(this,a)),this.g("element",y,a),this.N()}}},source:{get:function(){return this.qo},set:function(a){var y=this.qo;if(y!==a){this.Uc=!0,this.qo=a;var x=Sg;if(Jo){var E=null;if(x[a]!==void 0)E=x[a];else if(a!==""){30<p0&&(Bg(),x=Sg),E=$n("img"),E.hn=!0,by(this,E);var b=this.rl;b!==null&&(E.crossOrigin=b(this)),E.src=a,x[a]=E,p0++}this.element=E,E!==null&&E.__goCache===void 0&&(E.__goCache=new ky),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}}}),Al.prototype.redraw=Al.prototype.redraw,Al.prototype.reloadSource=Al.prototype.hA;var p0=0,Ew=4;Al.className="Picture",Sg=new Si,Al.clearCache=Bg;function ky(){this.gi=null}function Ty(a,y,x,E,b){a.gi===null&&(a.gi=[]);var z=new Jl(null),tt=z.context,rt=1/y;z.width=x/y,z.height=E/y,z.width!==0&&z.height!==0&&(y=new Ny(z.Oa,y),x=1,0<a.gi.length&&(x=a.gi[a.gi.length-1],b=x.source,x=x.ratio),tt.setTransform(rt*x,0,0,rt*x,0,0),tt.yc(),tt.drawImage(b,0,0),a.gi.push(y))}ky.className="PictureCacheArray";function Ny(a,y){this.source=a,this.ratio=y}Ny.className="PictureCacheInstance";function Cg(){this.os=new Hn,this.mc=null}Cg.prototype.reset=function(a){a!==null?(a.ka(),this.os=a,a.figures.clear()):this.os=new Hn,this.mc=null};function Pg(a,y,x,E,b,z){a.mc=new Ps,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 Lw(a){var y=a.mc.segments.length;0<y&&a.mc.segments.M(y-1).close()}Cg.prototype.moveTo=function(a,y,x){x===void 0&&(x=!1);var E=new Xr(Ss);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)},Cg.prototype.lineTo=function(a,y,x){x===void 0&&(x=!1);var E=new Xr(yo);E.endX=a,E.endY=y,x&&E.close(),this.mc.segments.add(E)};function yc(a,y,x,E,b,z,tt){var rt;rt===void 0&&(rt=!1);var ot=new Xr(Fs);ot.point1X=y,ot.point1Y=x,ot.point2X=E,ot.point2Y=b,ot.endX=z,ot.endY=tt,rt&&ot.close(),a.mc.segments.add(ot)}function m0(a,y,x,E,b){var z;z===void 0&&(z=!1);var tt=new Xr(Oa);tt.point1X=y,tt.point1Y=x,tt.endX=E,tt.endY=b,z&&tt.close(),a.mc.segments.add(tt)}Cg.prototype.arcTo=function(a,y,x,E,b,z,tt){z===void 0&&(z=0),tt===void 0&&(tt=!1);var rt=new Xr(ss);rt.startAngle=a,rt.sweepAngle=y,rt.centerX=x,rt.centerY=E,rt.radiusX=b,rt.radiusY=z!==0?z:b,tt&&rt.close(),this.mc.segments.add(rt)};function Mw(a,y,x,E,b,z,tt,rt){var ot;ot===void 0&&(ot=!1),y=new Xr(rl,tt,rt,y,x,E,b,z),ot&&y.close(),a.mc.segments.add(y)}function Dy(a){var y=v0;return y!==null?(v0=null,y.reset(a),y):(y=new Cg,y.reset(a),y)}var v0=null;Cg.className="StreamGeometryContext";function Ia(a,y){var x=a.toLowerCase(),E=Be.Ze;E[a]=y,E[x]=a}Ia("Rectangle",function(a,y,x){a="r"+y+","+x;var E=Be.Mf[a];return E!==void 0||(E=new Hn(Hn.u),E.endX=y,E.endY=x,Be.Nf<Be.vm&&(Be.Mf[a]=E,Be.Nf++)),E}),Ia("Square",function(a,y,x){a="s"+y+","+x;var E=Be.Mf[a];return E!==void 0||(E=new Hn(Hn.u),E.endX=y,E.endY=x,E.defaultStretch=Ii,Be.Nf<Be.vm&&(Be.Mf[a]=E,Be.Nf++)),E}),Ia("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=Be.Mf[E];if(b!==void 0)return b;var z=a*Be.wg;return b=new Hn().add(new Ps(a,0,!0).add(new Xr(yo,y-a,0)).add(new Xr(Fs,y,a,y-z,0,y,z)).add(new Xr(yo,y,x-a)).add(new Xr(Fs,y-a,x,y,x-z,y-z,x)).add(new Xr(yo,a,x)).add(new Xr(Fs,0,x-a,z,x,0,x-z)).add(new Xr(yo,0,a)).add(new Xr(Fs,a,0,0,z,z,0).close())),1<z&&(b.spot1=new Ci(0,0,z,z),b.spot2=new Ci(1,1,-z,-z)),Be.Nf<Be.vm&&(Be.Mf[E]=b,Be.Nf++),b}),Ia("Border","RoundedRectangle"),Ia("Ellipse",function(a,y,x){a="e"+y+","+x;var E=Be.Mf[a];return E!==void 0||(E=new Hn(Hn.F),E.endX=y,E.endY=x,E.spot1=bl,E.spot2=ia,Be.Nf<Be.vm&&(Be.Mf[a]=E,Be.Nf++)),E}),Ia("Circle",function(a,y,x){a="c"+y+","+x;var E=Be.Mf[a];return E!==void 0||(E=new Hn(Hn.F),E.endX=y,E.endY=x,E.spot1=bl,E.spot2=ia,E.defaultStretch=Ii,Be.Nf<Be.vm&&(Be.Mf[a]=E,Be.Nf++)),E}),Ia("TriangleRight",function(a,y,x){return new Hn().add(new Ps(0,0).add(new Xr(yo,y,.5*x)).add(new Xr(yo,0,x).close())).pm(0,.25,.5,.75)}),Ia("TriangleDown",function(a,y,x){return new Hn().add(new Ps(0,0).add(new Xr(yo,y,0)).add(new Xr(yo,.5*y,x).close())).pm(.25,0,.75,.5)}),Ia("TriangleLeft",function(a,y,x){return new Hn().add(new Ps(y,x).add(new Xr(yo,0,.5*x)).add(new Xr(yo,y,0).close())).pm(.5,.25,1,.75)}),Ia("TriangleUp",function(a,y,x){return new Hn().add(new Ps(y,x).add(new Xr(yo,0,x)).add(new Xr(yo,.5*y,0).close())).pm(.25,.5,.75,1)}),Ia("Triangle","TriangleUp"),Ia("Diamond",function(a,y,x){return new Hn().add(new Ps(.5*y,0).add(new Xr(yo,0,.5*x)).add(new Xr(yo,.5*y,x)).add(new Xr(yo,y,.5*x).close())).pm(.25,.25,.75,.75)}),Ia("LineH",function(a,y,x){return a=new Hn(Hn.j),a.startX=0,a.startY=x/2,a.endX=y,a.endY=x/2,a}),Ia("LineV",function(a,y,x){return a=new Hn(Hn.j),a.startX=y/2,a.startY=0,a.endX=y/2,a.endY=x,a}),Ia("None","Rectangle"),Ia("BarH","Rectangle"),Ia("BarV","Rectangle"),Ia("MinusLine","LineH"),Ia("PlusLine",function(a,y,x){return new Hn().add(new Ps(0,x/2,!1).add(new Xr(yo,y,x/2)).add(new Xr(Ss,y/2,0)).add(new Xr(yo,y/2,x)))}),Ia("XLine",function(a,y,x){return new Hn().add(new Ps(0,x,!1).add(new Xr(yo,y,0)).add(new Xr(Ss,0,0)).add(new Xr(yo,y,x)))}),Ia("LineRight",function(a,y,x){return new Hn().add(new Ps(.25*y,0,!1).add(new Xr(yo,.75*y,.5*x)).add(new Xr(yo,.25*y,x)))}),Ia("LineDown",function(a,y,x){return new Hn().add(new Ps(0,.25*x,!1).add(new Xr(yo,.5*y,.75*x)).add(new Xr(yo,y,.25*x)))}),Ia("LineLeft",function(a,y,x){return new Hn().add(new Ps(.75*y,0,!1).add(new Xr(yo,.25*y,.5*x)).add(new Xr(yo,.75*y,x)))}),Ia("LineUp",function(a,y,x){return new Hn().add(new Ps(0,.75*x,!1).add(new Xr(yo,.5*y,.25*x)).add(new Xr(yo,y,.75*x)))}),Be.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 Jm(){this.nc=!1,this.tr=this.Kp=this.zq=null,this.vr="",this.fr=this.oq=this.ur=null,this.hr="",this.gr=Zr,this.ir=null,this.jr="",this.lr=Io,this.Gq="",this.Hq=Qr,this.Pq=Jn,this.Kq=vi,this.Up=null,this.Cq=127,this.zr=Ee,this.yr="gray",this.Vg=4}Jm.prototype.copy=function(){var a=new Jm;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 Zi(a,y){a===void 0||a instanceof co||typeof a=="string"?En.call(this,a):(En.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 Ot(NaN,NaN).freeze(),this.nf=null,this.Ao=NaN,this.vw=-1,this.py=new Oe,this.Rh=null,this.ag=NaN,y&&Object.assign(this,y)}Ge(Zi,En),Zi.prototype.cloneProtected=function(a){En.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},kt=Zi.prototype,kt.Af=function(a){En.prototype.Af.call(this,a),a.oh(),a.Ug=null,a.nf=null,a.Rh=null},kt.toString=function(){var a=fi(this.constructor)+"#"+ti(this);return this.data!==null&&(a+="("+Fn(this.data)+")"),a};function hl(a){a.P===null?a.P=new Jm:a.P.nc&&(a.P=a.P.copy())}kt.th=function(){En.prototype.th.call(this),this.P!==null&&(this.P.nc=!0)},kt.gk=function(a,y,x,E,b,z,tt){var rt=this.diagram;rt!==null&&(a===as&&y==="elements"?b instanceof En?Ru(b,function(ot){Cv(rt.partManager,ot),vA(rt,ot)}):Ch(rt,b):a===ms&&y==="elements"&&(b instanceof En?Ru(b,function(ot){Pv(rt.partManager,ot,rt)}):Rd(rt,b)),rt.cb(a,y,x,E,b,z,tt))},kt.La=function(a){if(En.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 En&&Ru(b,function(z){z.data!==null&&z.La()})}for(y=this.adornments;y.next();)y.value.La(a)}},Zi.prototype.updateRelationshipsFromData=function(){var a;this.data!==null&&((a=this.diagram)===null||a===void 0||a.partManager.updateRelationshipsFromData(this))},Zi.prototype.Pj=function(a){var y=this.Qf;return y===null?null:y.I(a)},Zi.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 ke),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)))}}},Zi.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)}},Zi.prototype.Ej=function(){var a=this.Qf;if(a!==null){var y=li();for(a=a.iterator;a.next();)y.push(a.key);a=y.length;for(var x=0;x<a;x++)this.Jf(y[x]);ci(y)}},Zi.prototype.updateAdornments=function(){var a=this.diagram;if(a!==null){for(var y=this.adornments;y.next();){var x=y.value;x.v(),x.placeholder&&x.placeholder.v()}t:{if(this.isSelected&&this.selectionAdorned&&(y=this.selectionObject,y!==null&&this.actualBounds.w()&&this.isVisible()&&y.Ed()&&y.actualBounds.w())){if(x=this.Pj("Selection"),x===null){if(x=this.selectionAdornmentTemplate,x===null&&(x=this.ph()?a.linkSelectionAdornmentTemplate:this instanceof mr?a.groupSelectionAdornmentTemplate:a.nodeSelectionAdornmentTemplate),!(x instanceof ro))break t;yu(x),x=x.copy(),x!==null&&(this.ph()&&this.selectionObject===this.path&&(x.type=En.Link),x.adornedObject=y)}if(x!==null){x.type===En.Link&&x.v(),this.bh("Selection",x);break t}}this.Jf("Selection")}for(bw(this,a),y=this.adornments;y.next();)y.value.La()}},Zi.prototype.Wb=function(){var a=this.diagram;a!==null&&(a.vd=!0,!(this.G&16384)&&(this.G|=16384))};function $m(a){a.G&16384&&(a.updateAdornments(),a.G&=-16385)}function bw(a,y){y.toolManager.mouseDownTools.each(function(x){x.isEnabled&&x.updateAdornments(a)}),y.toolManager.updateAdornments(a)}function y0(a){if(rd(a)===!1){tv(a,!0),a.Uk();var y=a.diagram;y!==null&&(y.De.add(a),y.$b())}}function Iy(a){if(a.G|=2097152,rd(a)!==!1){var y=a.position,x=a.location;x.w()&&y.w()||Oy(a,y,x),x=a.Ib;var E=Oe.alloc().assign(x);x.ka(),x.x=y.x,x.y=y.y,x.freeze(),a.Xl(E,x),Oe.free(E),tv(a,!1)}}Zi.prototype.Ge=function(a,y,x,E){var b=this.uc;b.h(a,y,x,E),this.Lb===null&&(this.Lb=new ir);var z=this.Lb;z.reset(),this.no(z,a,y,x,E),this.Lb=z,z.ws()||z.pp(b)},Zi.prototype.no=function(a,y,x,E,b){if(this.Ca!==1&&a.scale(this.Ca),this.Kb!==0){var z=cr;this.locationSpot.sb()&&(z=this.locationSpot);var tt=Ot.alloc();if(this.locationObject!==this)for(y=this.locationObject,x=y.naturalBounds,tt.yi(x.x,x.y,x.width,x.height,z),y.Lb!==null&&y.Lb.Ga(tt),tt.offset(-y.measuredBounds.x,-y.measuredBounds.y),z=y.panel;z!==null&&z!==this;)z.Lb!==null&&z.Lb.Ga(tt),tt.offset(-z.measuredBounds.x,-z.measuredBounds.y),z=z.panel;else tt.yi(y,x,E,b,z);a.rotate(this.Kb,tt.x,tt.y),Ot.free(tt)}},Zi.prototype.move=function(a,y){y===!0?this.location=a:this.position=a},Zi.prototype.moveTo=function(a,y,x){a=Ot.allocAt(a,y),this.move(a,x),Ot.free(a)},Zi.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())},Zi.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())},Zi.prototype.fb=function(a){if(this.name===a)return this;var y=this.Rh;if(y===null&&(this.Rh=y=new ke),y.I(a)!==null)return y.I(a);var x=En.prototype.fb.call(this,a);return x!==null?(y.set(a,x),x):(y.set(a,null),null)};function wc(a,y,x,E){E===void 0&&(E=new Ot),x=x.Mc()?cr: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}Zi.prototype.mi=function(a){return a===void 0&&(a=new Oe),a.assign(this.actualBounds)},Zi.prototype.Va=function(){this.measure(1/0,1/0),this.arrange()};function Uy(a){var y=Ot.alloc(),x=a.locationObject,E=x.naturalBounds,b=x instanceof Cr?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 qd(a,y){var x=a.py;isNaN(a.ag)&&(a.ag=dy(a));var E=a.ag,b=2*E;if(!a.isShadowed)return x.h(y.x-1-E,y.y-1-E,y.width+2+b,y.height+2+b),x;E=y.x,b=y.y;var z=y.width;y=y.height;var tt=a.shadowBlur;return a=a.shadowOffset,z+=tt,y+=tt,E-=tt/2,b-=tt/2,0<a.x?z+=a.x:(E+=a.x,z-=a.x),0<a.y?y+=a.y:(b+=a.y,y-=a.y),x.h(E-1,b-1,z+2,y+2),x}Zi.prototype.arrange=function(){if(Ea(this)===!1)Iy(this);else{nA(this,!1);var a=this.Ib,y=Oe.alloc();y.assign(a);var x=od(this);this.eh(0,0,this.uc.width,this.uc.height);var E=this.position;Oy(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()||Be.B(y.width,a.width)&&Be.B(y.height,a.height)||0<=this.vw&&this.C(16),Oe.free(y),tv(this,!1)}},kt=Zi.prototype,kt.Xl=function(a,y){var x=this.diagram;if(x!==null){var E=!1;if(x.Zi===!1&&a.w()){var b=Oe.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),Oe.free(b)}!(this.G&65536)&&a.D(y)||_y(this,E,x),x.N(),!a.w()&&!y.w()||Ar(a,y)||(this instanceof gi&&!x.undoManager.isUndoingRedoing&&this.Bd(),this.oh())}},kt.zv=function(a,y,x){if(this.ph()||!a.w())return!1;var E=this.diagram;return E!==null&&Qy(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 Ot(E.x+(a.x-y),E.y+(a.y-x)),this.g("location",E,this.ke.copy())),rd(this)===!1&&Ea(this)===!1&&(y0(this),Iy(this)),!0};function Qy(a,y,x,E,b){y===null||a instanceof ro||(y=y.animationManager,y.zb&&bd(y,a,new Ot(E,b),x))}kt.mm=function(a,y,x){var E=this.ke,b=this.pa;if(x){if(E.x===a&&E.y===y)return;rd(this)||Ea(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)}y0(this)},kt.Av=function(){this.G&=-2097153,y0(this)};function Oy(a,y,x){var E=Uy(a),b=a.diagram,z=x.w(),tt=y.w();z&&tt?a.G&2097152?Ry(a,y,x,b,E):Hy(a,y,x,b,E):z?Ry(a,y,x,b,E):tt&&Hy(a,y,x,b,E),a.G|=2097152,Ot.free(E),a.Uk()}function Ry(a,y,x,E,b){var z=y.x,tt=y.y;y.h(x.x-b.x,x.y-b.y),E!==null&&(x=E.animationManager,(E=x.defaultAnimation.isAnimating)||!x.zb||a instanceof ro||bd(x,a,new Ot(z,tt),y),E||y.x===z&&y.y===tt||a.g("position",new Ot(z,tt),y.copy()))}function Hy(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 _y(a,y,x){ev(a,!1),a instanceof gi&&Qu(x,a),a.layer.isTemporary||y||x.Ya(),y=a.Ib;var E=x.viewportBounds;E.w()?od(a)?(io(y,E)||a.Fd(!1),a.updateAdornments()):a.isVisible()&&y.Yc(E)?(a.Fd(!0),a.updateAdornments()):a.Wb():x.vd=!0}kt.si=function(){return!0},kt.Zc=function(){return!0},kt.ph=function(){return!1},kt.Dd=function(){return!0};function qm(a,y,x,E){y.constructor===a.constructor||Gy||(Gy=!0,Zn('Should not change the class of the Part when changing category from "'+x+'" to "'+E+'"'),Zn(" Old class: "+fi(a.constructor)+", new class: "+fi(y.constructor)+", part: "+a.toString())),a.Ej();var b=a.data;x=a.layerName;var z=a.isSelected,tt=a.isHighlighted,rt=!0,ot=!0,lt=!1;a instanceof gi&&(rt=a.isTreeLeaf,ot=a.isTreeExpanded,lt=a.wasTreeExpanded),y.Af(a),y.cloneProtected(a),a.Tf=E,a.svg!==null&&(a.svg.remove(),a.svg=null,a.Uc=!0),a.v(),a.N(),y=a.diagram,E=!0,y!==null&&(E=y.skipsUndoManager,y.skipsUndoManager=!0),a.ub=b,a.G=z?a.G|4096:a.G&-4097,a.G=tt?a.G|524288:a.G&-524289,a instanceof gi&&(a.U=rt?a.U|4:a.U&-5,a.U=ot?a.U|1:a.U&-2,a.U=lt?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)}Zi.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},Zi.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},Zi.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},Zi.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},Zi.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},Zi.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},Zi.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},Zi.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},Zi.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 rd(a){return(a.G&32768)!==0}function tv(a,y){a.G=y?a.G|32768:a.G&-32769}function ev(a,y){a.G=y?a.G|65536:a.G&-65537}function od(a){return(a.G&131072)!==0}kt=Zi.prototype,kt.Fd=function(a){this.G=a?this.G|131072:this.G&-131073};function w0(a,y){a.G=y?a.G|1048576:a.G&-1048577}kt.oh=function(){var a=this.containingGroup;a!==null&&(a.v(),a.placeholder!==null&&a.placeholder.v(),a.Bd())},kt.N=function(){var a=this.diagram;a!==null&&!Ea(this)&&!rd(this)&&this.isVisible()&&this.Ib.w()&&a.N(qd(this,this.Ib))},kt.v=function(){En.prototype.v.call(this);var a=this.diagram;a!==null&&(a.De.add(this),this instanceof gi&&this.labeledLink!==null&&Ns(this.labeledLink),a.$b(!0))},kt.Vo=function(a){a||(a=this.Ah,a!==null&&av(a,this))},kt.Wo=function(a){a||(a=this.Ah,a!==null&&lv(a,this))},kt.Lj=function(){var a=this.data;if(a!==null){var y=this.diagram;y!==null&&(y=y.model,y!==null&&y.cm(a))}},kt.oz=function(){return nv(this,this)};function nv(a,y){var x=y.containingGroup;return x!==null?1+nv(a,x):y instanceof gi&&(y=y.labeledLink,y!==null)?nv(a,y):0}kt.sz=function(){return Ky(this,this)};function Ky(a,y){var x=y.containingGroup;return x!==null||y instanceof gi&&(x=y.labeledLink,x!==null)?Ky(a,x):y}kt.Td=function(a){return a instanceof mr?iv(this,this,a):!1};function iv(a,y,x){if(y===x||x===null)return!1;var E=y.containingGroup;return E===null||E!==x&&!iv(a,E,x)?y instanceof gi&&(y=y.labeledLink,y!==null)?iv(a,y,x):!1:!0}kt.px=function(a){if(a===null)return null;if(this===a)return this.containingGroup;for(var y=this;y!==null;){if(y instanceof mr&&w0(y,!0),y instanceof gi){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 gi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup}for(y=this;y!==null;)y instanceof mr&&w0(y,!1),y instanceof gi&&(a=y.labeledLink,a!==null&&(y=a)),y=y.containingGroup;return x},Zi.prototype.canLayout=function(){if(!this.isLayoutPositioned||!this.isVisible())return!1;var a=this.layer;return!(a!==null&&a.isTemporary||this instanceof gi&&this.isLinkLabel)},Zi.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 gi&&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 zy(a){return a.isVisible()?(a=a.layer,!(a!==null&&a.isTemporary)):!1}function sd(a,y,x,E,b,z){if(z===void 0&&(z=null),!(a.contains(y)||z!==null&&!z(y)||y instanceof ro)){if(a.add(y),y instanceof gi){if(x&&y instanceof mr)for(var tt=y.memberParts;tt.next();)sd(a,tt.value,x,E,b,z);if(b!==!1)for(tt=y.linksConnected;tt.next();){var rt=tt.value;if(!a.contains(rt)){var ot=rt.fromNode,lt=rt.toNode;ot=ot===null||a.contains(ot),lt=lt===null||a.contains(lt),(b?ot&&lt:ot||lt)&&sd(a,rt,x,E,b,z)}}if(1<E)for(y=y.Ou();y.next();)sd(a,y.value,x,E-1,b,z)}else if(y instanceof Yn)for(y=y.labelNodes;y.next();)sd(a,y.value,x,E,b,z)}}yn.Object.defineProperties(Zi.prototype,{key:{get:function(){var a=this.diagram;if(a!==null)return a.model.wa(this.data)}},adornments:{get:function(){return this.Qf===null?Tr: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(ms,"parts",y,this,null,E,!0),E=a.oi(99999999,this,!0),y.visible!==a.visible&&this.Zb(a.visible),0<=E&&x.cb(as,"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&&(hl(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&&Td(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 ro?this.type!==En.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:Jn},set:function(a){var y=this.minLocation;y.D(a)||(a=a.J(),hl(this),this.P.Pq=a,this.g("minLocation",y,a))}},maxLocation:{get:function(){return this.P!==null?this.P.Kq:vi},set:function(a){var y=this.maxLocation;y.D(a)||(a=a.J(),hl(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&&(hl(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:Qr},set:function(a){var y=this.locationSpot;y.D(a)||(a=a.J(),hl(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,Ea(this)===!1&&(y0(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)),Qy(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 ro)){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 ro?this instanceof ro&&(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&&(yu(x),x=x.copy(),x!==null&&qm(this,x,y,a))):(z!==null&&z.jm(E,a),x=g1(x.partManager,E,a),x!==null&&(yu(x),x=x.copy(),x===null||x instanceof Yn||(E=this.location.copy(),qm(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){qm(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&&(hl(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&&(hl(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&&(hl(this),this.P.tr=a,this.g("selectionAdornmentTemplate",y,a))}},selectionObject:{get:function(){if(this.Ug===null){var a=this.selectionObjectName;a!==null&&a!==""?(a=this.fb(a),a!==null?this.Ug=a:this.Ug=this):this instanceof Yn?(a=this.path,a!==null?this.Ug=a:this.Ug=this):this.Ug=this}return this.Ug}},selectionChanged:{get:function(){return this.P!==null?this.P.ur:null},set:function(a){var y=this.selectionChanged;y!==a&&(hl(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&&(hl(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&&(hl(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:Zr},set:function(a){var y=this.resizeCellSize;y.D(a)||(a=a.J(),hl(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&&(hl(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&&(hl(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:Io},set:function(a){var y=this.rotationSpot;y.D(a)||(a=a.J(),hl(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&&se("Cannot make a Group a member of itself: "+this.toString()),se("Cannot make a Group indirectly contain itself: "+this.toString()+" already contains "+a.toString())),this.C(2);var x=this.diagram;if(y!==null?lv(y,this):this instanceof mr&&x!==null&&x.ai.remove(this),this.Ah=a,a!==null?av(a,this):this instanceof mr&&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 mr){for(x=new xe,sd(x,this,!0,0,!0),x=x.iterator;x.next();)if(E=x.value,E instanceof gi)for(E=E.linksConnected;E.next();)Fg(E.value)}if(this instanceof gi){for(x=this.linksConnected;x.next();)Fg(x.value);x=this.labeledLink,x!==null&&Fg(x)}this.g("containingGroup",y,a),a!==null&&(y=a.layer,y!==null&&Td(y,-1,a))}}else se("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&&(hl(this),this.P.Kp=a,this.g("containingGroupChanged",y,a))}},isTopLevel:{get:function(){return!(this.containingGroup!==null||this instanceof gi&&this.labeledLink!==null)}},layoutConditions:{get:function(){return this.P!==null?this.P.Cq:127},set:function(a){var y=this.layoutConditions;y!==a&&(hl(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&&(hl(this),this.P.Up=a,this.g("dragComputation",y,a))}},shadowOffset:{get:function(){return this.P!==null?this.P.zr:Ee},set:function(a){var y=this.shadowOffset;y.D(a)||(a=a.J(),hl(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&&(hl(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&&(hl(this),this.P.Vg=a,this.N(),this.g("shadowBlur",y,a))}}}),Zi.prototype.invalidateLayout=Zi.prototype.C,Zi.prototype.findCommonContainingGroup=Zi.prototype.px,Zi.prototype.isMemberOf=Zi.prototype.Td,Zi.prototype.findTopLevelPart=Zi.prototype.sz,Zi.prototype.findSubGraphLevel=Zi.prototype.oz,Zi.prototype.ensureBounds=Zi.prototype.Va,Zi.prototype.getDocumentBounds=Zi.prototype.mi,Zi.prototype.findObject=Zi.prototype.fb,Zi.prototype.moveTo=Zi.prototype.moveTo,Zi.prototype.invalidateAdornments=Zi.prototype.Wb,Zi.prototype.clearAdornments=Zi.prototype.Ej,Zi.prototype.removeAdornment=Zi.prototype.Jf,Zi.prototype.addAdornment=Zi.prototype.bh,Zi.prototype.findAdornment=Zi.prototype.Pj,Zi.prototype.updateTargetBindings=Zi.prototype.La;var Gy=!1;Zi.className="Part",Zi.LayoutNone=0,Zi.LayoutAdded=1,Zi.LayoutRemoved=2,Zi.LayoutShown=4,Zi.LayoutHidden=8,Zi.LayoutNodeSized=16,Zi.LayoutGroupLayout=32,Zi.LayoutNodeReplaced=64,Zi.LayoutStandard=127,Zi.LayoutAll=16777215;function ro(a,y){a===void 0||a instanceof co||typeof a=="string"?Zi.call(this,a):(Zi.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)}Ge(ro,Zi),ro.prototype.toString=function(){var a=this.adornedPart;return"Adornment("+this.category+")"+(a!==null?a.toString():"")},ro.prototype.updateRelationshipsFromData=function(){},ro.prototype.Ul=function(a){var y=this.adornedObject,x=y==null?void 0:y.part;if(x instanceof Yn&&y instanceof Cr){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 Cr&&(b.ua=a)}}},ro.prototype.si=function(){var a=this.ue;return a===null?!0:(a=a.part,a===null||!Ea(a))},ro.prototype.Zc=function(){return!1},ro.prototype.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Ya)this.$a===null&&(this.$a=b);else if(b instanceof En){var rt=b.Nl(function(ot){return ot instanceof Ya});rt instanceof Ya&&this.$a===null&&(this.$a=rt)}}else a===ms&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof En&&this.$a.rg(E)&&(this.$a=null));Zi.prototype.gk.call(this,a,y,x,E,b,z,tt)},ro.prototype.updateAdornments=function(){},ro.prototype.Lj=function(){},yn.Object.defineProperties(ro.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}}}),ro.className="Adornment";function rv(){this.nc=!1,this.Vr=this.gj=this.Eq=this.Dq=null,this.yp=As,this.er=B0,this.Kr=this.ij=this.Nq=this.Mq=null}rv.prototype.copy=function(){var a=new rv;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 gi(a,y){a===void 0||a instanceof co||typeof a=="string"?Zi.call(this,a):(Zi.call(this),a&&(y=a)),this.U=13,this.Ba=null,this.jb=new ee,this.wc=this.af=this.Yk=null,this.ci=!1,y&&Object.assign(this,y)}Ge(gi,Zi),gi.prototype.cloneProtected=function(a){Zi.prototype.cloneProtected.call(this,a),a.U=this.U,this.Ba!==null&&(a.Ba=this.Ba.nc?this.Ba:this.Ba.copy())},kt=gi.prototype,kt.Af=function(a){Zi.prototype.Af.call(this,a),a.Bd(),a.af=this.af,a.wc=null};function xc(a){a.Ba===null?a.Ba=new rv:a.Ba.nc&&(a.Ba=a.Ba.copy())}kt.th=function(){Zi.prototype.th.call(this),this.Ba!==null&&(this.Ba.nc=!0)};function jy(a,y){y!==null&&(a.af===null&&(a.af=new xe),a.af.add(y))}function Vy(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}kt.Lz=function(a,y,x){y==null&&(y=""),x==null&&(x=""),a=Vy(this,a,y,x),a!==null&&a.Sl()},kt.gk=function(a,y,x,E,b,z,tt){a===as&&y==="elements"?this.wc=null:a===ms&&y==="elements"&&(this.wc=null),Zi.prototype.gk.call(this,a,y,x,E,b,z,tt)},kt.Bd=function(a){for(var y=this.linksConnected;y.next();){var x=y.value;a!==void 0&&a.contains(x)||(Ql(x.fromPort),Ql(x.toPort),x.bb())}};function Zy(a,y){for(a=a.linksConnected;a.next();){var x=a.value;(x.fromPort===y||x.toPort===y)&&(Ql(x.fromPort),Ql(x.toPort),x.bb())}}function Ql(a){if(a!==null){var y=a.Zn;y!==null&&y.Sl(),a=a.part,y=a.containingGroup,y===null||a.isVisible()||Ql(y.port)}}kt.si=function(){return!0},gi.prototype.getAvoidableRect=function(a){return a.set(this.actualBounds),a.Co(this.avoidableMargin),a},gi.prototype.findVisibleNode=function(){for(var a=this;a!==null&&!a.isVisible();)a=a.containingGroup;return a},gi.prototype.isVisible=function(){if(!Zi.prototype.isVisible.call(this))return!1;var a=!0,y=YA,x=this.diagram;if(x!==null&&(a=x.isTreePathToChildren,y=x.treeCollapsePolicy),y===YA){if(a=this.pg(),a!==null&&!a.isTreeExpanded)return!1}else if(y===Es){if(a=a?this.Oo():this.Po(),0<a.count&&a.all(function(E){return!E.isTreeExpanded}))return!1}else if(y===wA&&(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},gi.prototype.Zb=function(a){Zi.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)}},gi.prototype.qx=function(){var a=new xe,y=new xe;return Wy(this,this,a,y),y.iterator};function Wy(a,y,x,E){if(y!==null&&!x.has(y)){x.add(y);var b=!0,z=a.diagram;z!==null&&(b=z.isTreePathToChildren),y.linksConnected.each(function(tt){tt.isTreeLink?(b?tt.fromNode===y:tt.toNode===y)&&Wy(a,b?tt.toNode:tt.fromNode,x,E):E.add(tt)})}}gi.prototype.findLinksConnected=function(a){if(a===void 0&&(a=null),a===null)return this.jb.iterator;var y=new ue(this.jb),x=this;return y.predicate=function(E){return E.fromNode===x&&E.fromPortId===a||E.toNode===x&&E.toPortId===a},y},kt=gi.prototype,kt.Mo=function(a){a===void 0&&(a=null);var y=new ue(this.jb),x=this;return y.predicate=function(E){return E.fromNode!==x?!1:a===null?!0:E.fromPortId===a},y},kt.Sd=function(a){a===void 0&&(a=null);var y=new ue(this.jb),x=this;return y.predicate=function(E){return E.toNode!==x?!1:a===null?!0:E.toPortId===a},y},kt.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 xe,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 xe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new gr(x):Tr},kt.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 xe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new gr(x):Tr},kt.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 xe,y.add(x),y.add(b)):x=b)}return y!==null?y.iterator:x!==null?new gr(x):Tr},kt.jz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ue(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},kt.kz=function(a,y,x){y===void 0&&(y=null),x===void 0&&(x=null);var E=new ue(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 x0(a,y,x){Ql(x);var E=a.jb.contains(y);if(E||a.jb.add(y),!E||y.fromNode===y.toNode){var b=a.linkConnected;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,y,x),tt!==null&&(tt.aa=z)}}!E&&y.isTreeLink&&(x=y.fromNode,y=y.toNode,x!==null&&y!==null&&x!==y&&(E=!0,a=a.diagram,a!==null&&(E=a.isTreePathToChildren),b=E?y:x,z=E?x:y,b.ci||(b.ci=z),!z.isTreeLeaf||a!==null&&a.undoManager.isUndoingRedoing||(E?x===z&&(z.isTreeLeaf=!1):y===z&&(z.isTreeLeaf=!1))))}function S0(a,y,x){Ql(x);var E=a.jb.remove(y),b=null;if(E||y.toNode===y.fromNode){var z=a.linkDisconnected;if(b=a.diagram,z!==null){var tt=!0;b!==null&&(tt=b.aa,b.aa=!0),z(a,y,x),b!==null&&(b.aa=tt)}}E&&y.isTreeLink&&(x=!0,b!==null&&(x=b.isTreePathToChildren),a=x?y.toNode:y.fromNode,y=x?y.fromNode:y.toNode,a!==null&&(a.ci=!1),y===null||y.isTreeLeaf||(y.jb.count===0?(y.ci=null,b!==null&&b.undoManager.isUndoingRedoing||(y.isTreeLeaf=!0)):cp(y)))}function cp(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}}}gi.prototype.updateRelationshipsFromData=function(){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)},kt=gi.prototype,kt.Vo=function(a){Zi.prototype.Vo.call(this,a),a||(cp(this),a=this.Yk,a!==null&&i1(a,this))},kt.Wo=function(a){Zi.prototype.Wo.call(this,a),a||(a=this.Yk,a!==null&&a.wd!==null&&(a.wd.remove(this),a.v()))},kt.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,Zi.prototype.Lj.call(this)},kt.ns=function(a){if(this.wc===null){if(a===""&&this.Te===!1)return this;Yy(this)}var y=this.wc.I(a);return y!==null||a!==""&&(y=this.wc.I(""),y!==null)?y:this};function Yy(a){a.wc===null?a.wc=new ke:a.wc.clear(),a.qm(a,function(y,x){Xy(y,x)}),a.wc.count===0&&a.wc.add("",a)}function Xy(a,y){var x=y.portId;x!==null&&a.wc!==null&&a.wc.add(x,y)}function ov(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=li()),x.push(E);if(x!==null){for(a=0;a<x.length;a++)y.remove(x[a]);ci(x)}}}kt.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},kt.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}},kt.gz=function(a){if(a===null)return null;if(this===a)return this;for(var y=this;y!==null;)w0(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;)w0(y,!1),y=y.pg();return x},kt.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},kt.pg=function(){var a=this.ci;if(a===null)return null;if(a instanceof gi)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},kt.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 xe;return a(this,y),y},kt.uz=function(){return Jy(this,this)};function Jy(a,y){return y=y.pg(),y===null?0:1+Jy(a,y)}kt.Qo=function(){var a=!0,y=this.diagram;y!==null&&(a=y.isTreePathToChildren),y=new ue(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},kt.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 ee,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 ee,y.add(x),y.add(a)):x=a);return y!==null?y.iterator:x!==null?new gr(x):Tr},kt.wz=function(a){a===void 0&&(a=1/0);var y=new xe;return sd(y,this,!1,a,!0),y},gi.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 xe;x.add(this),$y(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),y.Ue=!1}};function $y(a,y,x,E,b,z,tt){if(1<E)for(var rt=x?a.Mo():a.Sd();rt.next();){var ot=rt.value;ot.isTreeLink&&(ot=ot.To(a),ot===null||ot===a||y.contains(ot)||(y.add(ot),$y(ot,y,x,E-1,b,z,tt)))}else qy(a,y,x,b,z,tt)}function qy(a,y,x,E,b,z){for(var tt=b===a?!0:a.isTreeExpanded,rt=x?a.Mo():a.Sd(),ot={};rt.next();){var lt=rt.value;if(lt.isTreeLink&&(lt=lt.To(a),lt!==null&&lt!==a)){var ut=y.contains(lt);if(ut||y.add(lt),tt){var ft=x?lt.Oo():lt.Po();ot.uv=a,ft.all(function(yt){return function(Mt){return Mt===yt.uv||!Mt.isTreeExpanded}}(ot))&&E.Aj(lt,b),lt.oh(),lt.Zb(!1)}lt.isTreeExpanded&&(lt.wasTreeExpanded=lt.isTreeExpanded,ut||qy(lt,y,x,E,b,z))}ot={uv:ot.uv}}a.isTreeExpanded=!1}gi.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 xe;x.add(this),t1(this,x,y.isTreePathToChildren,a,y,this,y.treeCollapsePolicy===YA),y.Ue=!1}};function t1(a,y,x,E,b,z,tt){for(var rt=z===a?!1:a.isTreeExpanded,ot=x?a.Mo():a.Sd(),lt={};ot.next();){var ut=ot.value;if(ut.isTreeLink&&(rt||ut.fd||ut.bb(),ut=ut.To(a),ut!==null&&ut!==a&&!y.contains(ut))){if(y.add(ut),!rt){ut.Zb(!0),ut.oh();var ft=x?ut.Oo():ut.Po();lt.vv=a,ft.all(function(yt){return function(Mt){return Mt===yt.vv||!Mt.isTreeExpanded}}(lt))&&b.Cj(ut,z)}(2<E||ut.wasTreeExpanded)&&(ut.wasTreeExpanded=!1,t1(ut,y,x,E-1,b,z,tt))}lt={vv:lt.vv}}a.isTreeExpanded=!0}yn.Object.defineProperties(gi.prototype,{portSpreading:{get:function(){return this.Ba!==null?this.Ba.er:B0},set:function(a){var y=this.portSpreading;y!==a&&(xc(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&&Qu(x,this),this.g("avoidable",y,a)}}},avoidableMargin:{get:function(){return this.Ba!==null?this.Ba.yp:As},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.avoidableMargin;if(!y.D(a)){a=a.J(),xc(this),this.Ba.yp=a;var x=this.diagram;x!==null&&Qu(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&&(xc(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&&(xc(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&&(xc(this),this.Ba.gj=a,this.g("linkValidation",y,a))}},isLinkLabel:{get:function(){return this.Yk!==null}},labeledLink:{get:function(){return this.Yk},set:function(a){var y=this.Yk;if(y!==a){var x=this.diagram,E=this.data;if(y!==null){if(y.wd!==null&&(y.wd.remove(this),y.v()),x!==null&&E!==null&&!x.undoManager.isUndoingRedoing){var b=y.data,z=x.model;if(b!==null&&z.ri()){var tt=z.wa(E);tt!==void 0&&z.Qx(b,tt)}}this.containingGroup=null}this.Yk=a,a!==null&&(i1(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),Ns(this),this.g("labeledLink",y,a)}}},port:{get:function(){return this.ns("")}},ports:{get:function(){return this.wc===null&&Yy(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&&(xc(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))}}}),gi.prototype.expandTree=gi.prototype.expandTree,gi.prototype.collapseTree=gi.prototype.collapseTree,gi.prototype.findTreeParts=gi.prototype.wz,gi.prototype.findTreeChildrenNodes=gi.prototype.Ou,gi.prototype.findTreeChildrenLinks=gi.prototype.Qo,gi.prototype.findTreeLevel=gi.prototype.uz,gi.prototype.findTreeParentChain=gi.prototype.vz,gi.prototype.findTreeParentNode=gi.prototype.pg,gi.prototype.findTreeParentLink=gi.prototype.kh,gi.prototype.findCommonTreeParent=gi.prototype.gz,gi.prototype.findTreeRoot=gi.prototype.xz,gi.prototype.isInTreeOf=gi.prototype.Nz,gi.prototype.findPort=gi.prototype.ns,gi.prototype.findLinksTo=gi.prototype.kz,gi.prototype.findLinksBetween=gi.prototype.jz,gi.prototype.findNodesInto=gi.prototype.Oo,gi.prototype.findNodesOutOf=gi.prototype.Po,gi.prototype.findNodesConnected=gi.prototype.Mu,gi.prototype.findLinksInto=gi.prototype.Sd,gi.prototype.findLinksOutOf=gi.prototype.Mo,gi.prototype.findExternalTreeLinksConnected=gi.prototype.qx,gi.prototype.invalidateConnectedLinks=gi.prototype.Bd,gi.prototype.invalidateLinkBundle=gi.prototype.Lz;var kw=new Te(gi,"SpreadingNone",10),B0=new Te(gi,"SpreadingEvenly",11),sv=new Te(gi,"SpreadingPacked",12);gi.className="Node",gi.SpreadingNone=kw,gi.SpreadingEvenly=B0,gi.SpreadingPacked=sv;function mr(a,y){a===void 0||a instanceof co||typeof a=="string"?gi.call(this,a):(gi.call(this),a&&(y=a)),this.U|=4608,this.Gn=new xe,this.$a=null,this.Sc=new Wo,this.Sc.group=this,this.gl=new xe,this.tb=this.$p=null,y&&Object.assign(this,y)}Ge(mr,gi),mr.prototype.cloneProtected=function(a){gi.prototype.cloneProtected.call(this,a),this.U=this.U&-32769;var y=a.Nl(function(x){return x instanceof Ya});y instanceof Ya?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())},kt=mr.prototype,kt.Af=function(a){gi.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 gi)x.Bd(y);else if(x instanceof Yn)for(x=x.labelNodes;x.next();)x.value.Bd(y)}},kt.gk=function(a,y,x,E,b,z,tt){if(a===as&&y==="elements"){if(b instanceof Ya)this.$a===null?this.$a=b:this.$a!==b&&se("Cannot insert a second Placeholder into the visual tree of a Group.");else if(b instanceof En){var rt=b.Nl(function(ot){return ot instanceof Ya});rt instanceof Ya&&(this.$a===null?this.$a=rt:this.$a!==rt&&se("Cannot insert a second Placeholder into the visual tree of a Group."))}}else a===ms&&y==="elements"&&this.$a!==null&&(E===this.$a?this.$a=null:E instanceof En&&this.$a.rg(E)&&(this.$a=null));gi.prototype.gk.call(this,a,y,x,E,b,z,tt)},kt.Xl=function(a,y){gi.prototype.Xl.call(this,a,y),this.isClipping&&this.type!==En.Spot&&this.isSubGraphExpanded&&(a=this.resizeObject,a instanceof En&&(a=a.Pb()),this.tb===null&&(this.tb=new Oe),a.mi(this.tb),a instanceof Cr&&this.tb.Bc(-a.strokeWidth,-a.strokeWidth))},kt.eh=function(a,y,x,E){this.nf=this.$a,gi.prototype.eh.call(this,a,y,x,E)},kt.Va=function(){var a=this;a.isSubGraphExpanded&&this.memberParts.each(function(y){!a.computesBoundsIncludingLinks&&y instanceof Yn||y.Va()}),gi.prototype.Va.call(this)},kt.si=function(){if(!gi.prototype.si.call(this))return!1;for(var a=this.memberParts;a.next();){var y=a.value;if(y instanceof gi){if(y.isVisible()&&Ea(y))return!1}else if(y instanceof Yn&&y.isVisible()&&Ea(y)&&y.fromNode!==this&&y.toNode!==this)return!1}return!0};function av(a,y){if(a.Gn.add(y)){y instanceof mr&&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 Yn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}function lv(a,y){if(a.Gn.remove(y)){y instanceof mr&&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 Yn&&!a.computesBoundsIncludingLinks||(y=a.$a,y===null&&(y=a),y.v())}kt.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)}gi.prototype.Lj.call(this)},mr.prototype.canAddMembers=function(a){var y=this.diagram;if(y===null)return!1;for(y=y.commandHandler,a=en(a).iterator;a.next();)if(!y.isValidMember(this,a.value))return!1;return!0},mr.prototype.addMembers=function(a,y){var x=this.diagram;if(x===null)return!1;x=x.commandHandler;var E=!0;for(a=en(a).iterator;a.next();){var b=a.value;!y||x.isValidMember(this,b)?b.containingGroup=this:E=!1}return E},mr.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))},kt=mr.prototype,kt.Bd=function(a){var y=(this.U&65536)!==0;if(gi.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()?(Ql(x.fromPort),Ql(x.toPort),x.bb()):(E=x.toNode,E!==null&&E!==this&&E.Td(this)&&!E.isVisible()&&(Ql(x.fromPort),Ql(x.toPort),x.bb()))}}},kt.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 xe,E=y.iterator;E.next();){var b=E.value;if(b instanceof gi)for(b=b.linksConnected;b.next();){var z=b.value;y.contains(z)||x.add(z)}}return a&&(this.$p=x),x.iterator},kt.iz=function(){var a=this.Rj();a.add(this);for(var y=new xe,x=a.iterator;x.next();){var E=x.value;if(E instanceof gi)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},kt.hz=function(){function a(x,E){x!==null&&(E.add(x),a(x.containingGroup,E))}var y=new xe;return a(this,y),y},kt.Rj=function(){var a=new xe;return sd(a,this,!0,0,!0),a.remove(this),a},kt.Zb=function(a){gi.prototype.Zb.call(this,a);for(var y=this.memberParts;y.next();)y.value.Zb(a)},mr.prototype.collapseSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();e1(this,y,a,this),a.Ue=!1}};function e1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!1),z instanceof mr&&z.isSubGraphExpanded&&(z.wasSubGraphExpanded=z.isSubGraphExpanded,e1(z,y,x,E)),z instanceof gi)z.Bd(y),x.Aj(z,E);else if(z instanceof Yn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!1}mr.prototype.expandSubGraph=function(){var a=this.diagram;if(a!==null&&!a.Ue){a.Ue=!0;var y=this.Rj();n1(this,y,a,this),a.Ue=!1}};function n1(a,y,x,E){for(var b=a.memberParts;b.next();){var z=b.value;if(z.Zb(!0),z instanceof mr&&z.wasSubGraphExpanded&&(z.wasSubGraphExpanded=!1,n1(z,y,x,E)),z instanceof gi)z.Bd(y),x.Cj(z,E);else if(z instanceof Yn)for(z=z.labelNodes;z.next();)z.value.Bd(y)}a.isSubGraphExpanded=!0}mr.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=Ot.alloc(),gi.prototype.move.call(this,a,y),a=new xe,y=this.Rj().iterator;y.next();)b=y.value,b instanceof Yn&&(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 gi&&b.isLinkLabel)){var tt=b.position,rt=b.location;tt.w()?(z.x=tt.x+E,z.y=tt.y+x,b.position=z):rt.w()&&(z.x=rt.x+E,z.y=rt.y+x,b.location=z)}for(y.reset();y.next();)b=y.value,b instanceof Yn&&(b.suspendsRouting=a.contains(b),b.fd||b.fromNode!==this&&b.toNode!==this)&&(tt=b.position,z.x=tt.x+E,z.y=tt.y+x,z.w()?b.move(z):b.bb(),Av(b)&&b.bb());Ot.free(z)}},yn.Object.defineProperties(mr.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&&se("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&&(xc(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&&(xc(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&&(xc(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&&(xc(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)}}}),mr.prototype.expandSubGraph=mr.prototype.expandSubGraph,mr.prototype.collapseSubGraph=mr.prototype.collapseSubGraph,mr.prototype.findSubGraphParts=mr.prototype.Rj,mr.prototype.findContainingGroupChain=mr.prototype.hz,mr.prototype.findExternalNodesConnected=mr.prototype.iz,mr.prototype.findExternalLinksConnected=mr.prototype.Lu,mr.prototype.ensureBounds=mr.prototype.Va,mr.className="Group";function Ya(a){Se.call(this),this.yb=fs,this.ko=new Oe(NaN,NaN,NaN,NaN),a&&Object.assign(this,a)}Ge(Ya,Se),Ya.prototype.cloneProtected=function(a){Se.prototype.cloneProtected.call(this,a),a.yb=this.yb.J(),a.ko=this.ko.copy()},Ya.prototype.gh=function(a){if(this.background===null&&this.areaBackground===null)return!1;var y=this.naturalBounds;return fo(0,0,y.width,y.height,a.x,a.y)},Ya.prototype.Wl=function(){var a=this.part;if(a!==null&&(a instanceof mr||a instanceof ro)||se("Placeholder is not inside a Group or Adornment."),a instanceof mr){var y=this.computeBorder(this.ko),x=this.minSize,E=this.dc;for(Nr(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=Ot.alloc(),x.xi(y,a.locationSpot),x.D(a.location)||(a.location=x),Ot.free(x))}else{y=this.dc,x=this.yb,E=x.left+x.right;var b=x.top+x.bottom,z=a.adornedObject;a.angle=z.li();var tt=0;z instanceof Cr&&(tt=z.strokeWidth);var rt=z.Df(),ot=z.naturalBounds,lt=(ot.width+tt)*rt;tt=(ot.height+tt)*rt,a.type!==En.Link&&(rt=z.ga(a.category==="Selection"?Qr:a.locationSpot,Ot.alloc()),a.location=rt,Ot.free(rt)),isNaN(lt)||isNaN(tt)?(a=z.ga(Qr,Ot.alloc()),lt=Oe.allocAt(a.x,a.y,0,0),lt.Ye(z.ga(lo,a)),lt.Ye(z.ga(so,a)),lt.Ye(z.ga(gs,a)),Nr(y,lt.width+E||0,lt.height+b||0),this.Ge(-x.left,-x.top,y.width,y.height),Ot.free(a),Oe.free(lt)):(Nr(y,lt+E||0,tt+b||0),this.Ge(-x.left,-x.top,y.width,y.height))}},Ya.prototype.eh=function(a,y,x,E){this.actualBounds.h(a,y,x,E)},Ya.prototype.computeBorder=function(a){var y=this.part,x=y.diagram,E=x===null||!x.animationManager.isAnimating;if(x!==null&&y instanceof mr&&!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=Oe.alloc(),b=this.computeMemberBounds(x);var z=this.yb;return y instanceof mr&&!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)),Oe.free(x),E&&y instanceof mr&&y.computesBoundsIncludingLocation&&y.location.w()&&a.Ye(y.location),a},Ya.prototype.computeMemberBounds=function(a){if(!(this.part instanceof mr))return a.h(0,0,0,0),a;for(var y=this.part,x=1/0,E=1/0,b=-1/0,z=-1/0,tt=y.memberParts;tt.next();){var rt=tt.value;if(rt.isVisible()){if(rt instanceof Yn&&(!y.computesBoundsIncludingLinks||xl(rt)||rt.fromNode===y||rt.toNode===y))continue;rt=rt.actualBounds,rt.left<x&&(x=rt.left),rt.top<E&&(E=rt.top),rt.right>b&&(b=rt.right),rt.bottom>z&&(z=rt.bottom)}}return isFinite(x)&&isFinite(E)?a.h(x,E,b-x,z-E):(y=y.location,a.h(y.x,y.y,0,0)),a},yn.Object.defineProperties(Ya.prototype,{padding:{get:function(){return this.yb},set:function(a){typeof a=="number"&&(a=new wr(a));var y=this.yb;y.D(a)||(this.yb=a=a.J(),this.g("padding",y,a),this.v())}}}),Ya.className="Placeholder";function Yn(a){Zi.call(this,En.Link),this.Qa=8,this.ef=null,this.ff="",this.uf=this.gn=null,this.vf="",this.uo=null,this.qk=Xa,this.Om=0,this.Qm=Xa,this.Rm=NaN,this.qj=dv,this.po=.5,this.wd=null,this.Nb=new ee().freeze(),this.Tg=this.Mg=null,this.ml=new Oe,this.ua=new Hn,this.u=this.o=this.Sf=this.Wf=null,this.su=new Ot,this.cq=this.Mw=this.Lw=null,this.vt=NaN,this.ba=null,this.j=[],a&&Object.assign(this,a)}Ge(Yn,Zi),Yn.prototype.cloneProtected=function(a){Zi.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())},kt=Yn.prototype,kt.Af=function(a){Zi.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&&Ql(y),a=a.toPort,a!==null&&Ql(a)},kt.qb=function(a){a.classType===Yn?(a.value&2)===2?this.routing=a:a===ql||a===Bc||a===Lg?this.curve=a:a===gp||a===M0||a===b0?this.adjusting=a:a!==dv&&a!==Xa&&se("Unknown Link enum value for a Link property: "+a):Zi.prototype.qb.call(this,a)},kt.Xc=function(){this.ba===null&&(this.ba=new If)},kt.si=function(){var a=this.fromNode;if(a!==null){var y=a.findVisibleNode();if(y!==null&&(a=y),Ea(a)||rd(a))return!1}return a=this.toNode,!(a!==null&&(y=a.findVisibleNode(),y!==null&&(a=y),Ea(a)||rd(a)))},kt.zv=function(){return!1},kt.Av=function(){},kt.Zc=function(){return!1},Yn.prototype.computeAngle=function(a,y,x){return Yn.computeAngle(y,x)},Yn.computeAngle=function(a,y){switch(a){default:case Xa:a=0;break;case pp:a=y;break;case mp:a=y+90;break;case vp:a=y-90;break;case fv:a=y+180;break;case k0:a=Be.bp(y),90<a&&270>a&&(a-=180);break;case yp:a=Be.bp(y+90),90<a&&270>a&&(a-=180);break;case wp:a=Be.bp(y-90),90<a&&270>a&&(a-=180);break;case T0:if(a=Be.bp(y),45<a&&135>a||225<a&&315>a)return 0;90<a&&270>a&&(a-=180)}return Be.bp(a)};function Fg(a){var y=a.fromNode,x=a.toNode,E=null;if(y!==null?E=x!==null?y.px(x):y.containingGroup:x!==null?E=x.containingGroup:E=null,y=E,x=a.Ah,x!==y){x!==null&&lv(x,a),a.Ah=y,y!==null&&av(y,a);var b=a.containingGroupChanged;if(b!==null){var z=!0,tt=a.diagram;tt!==null&&(z=tt.aa,tt.aa=!0),b(a,x,y),tt!==null&&(tt.aa=z)}!a.fd||a.Lw!==x&&a.Mw!==x||a.bb()}if(a.isLabeledLink)for(a=a.labelNodes;a.next();)a.value.containingGroup=E}kt=Yn.prototype,kt.oh=function(){var a=this.containingGroup;a!==null&&this.fromNode!==a&&this.toNode!==a&&a.computesBoundsIncludingLinks&&Zi.prototype.oh.call(this)},kt.To=function(a){var y=this.fromNode;return a===y?this.toNode:y},kt.Cz=function(a){var y=this.fromPort;return a===y?this.toPort:y};function i1(a,y){a.wd===null&&(a.wd=new xe),a.wd.add(y),a.v()}kt.Vo=function(a){if(Zi.prototype.Vo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,x0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||x0(x,this,E)}dp(this)}},kt.Wo=function(a){if(Zi.prototype.Wo.call(this,a),tf(this)&&this.Xo(this.actualBounds),!a){a=this.ef;var y=null;a!==null&&(y=this.fromPort,S0(a,this,y));var x=this.uf;if(x!==null){var E=this.toPort;x===a&&E===y||S0(x,this,E)}fp(this)}},kt.Lj=function(){if(this.fd=!0,this.wd!==null){var a=this.diagram;if(a!==null)for(var y=this.wd.copy().iterator;y.next();)a.remove(y.value)}this.data!==null&&(a=this.diagram,a!==null&&a.partManager.removeDataForLink(this))},Yn.prototype.updateRelationshipsFromData=function(){if(this.data!==null){var a=this.diagram;a!==null&&a.partManager.updateRelationshipsFromData(this)}},Yn.prototype.move=function(a,y){var x=y?this.location:this.position,E=x.x;isNaN(E)&&(E=0);var b=x.y;for(isNaN(b)&&(b=0),E=a.x-E,b=a.y-b,y===!0?Zi.prototype.move.call(this,a,!1):(a=Ot.allocAt(x.x+E,x.y+b),Zi.prototype.move.call(this,a,!1),Ot.free(a)),Sc(this,E,b),a=this.labelNodes;a.next();)y=a.value,x=y.position,y.moveTo(x.x+E,x.y+b)},Yn.prototype.canRelinkFrom=function(){if(!this.relinkableFrom)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Yn.prototype.canRelinkTo=function(){if(!this.relinkableTo)return!1;var a=this.layer;return a===null?!0:a.allowRelink?(a=a.diagram,!!(a===null||a.allowRelink)):!1},Yn.prototype.computeMidPoint=function(a){var y=this.pointsCount;if(y===0)return a.assign(Wn),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()===ql))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()===ql){if(y===3){x=this.i(0),E=this.i(1);var b=this.i(2);return Be.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),Be.ax(E.x,E.y,b.x,b.y,z.x,z.y,x.x,x.y,a)}else a.assign(this.i(x));return a}var tt=this.flattenedLengths;for(x=this.flattenedTotalLength,b=z=E=0;E<x/2&&z<y&&(b=tt[z],!(E+b>x/2));)E+=b,z++;return y=this.i(z),z=this.i(z+1),1>Math.abs(y.x-z.x)?y.y>z.y?a.h(y.x,y.y-(x/2-E)):a.h(y.x,y.y+(x/2-E)):1>Math.abs(y.y-z.y)?y.x>z.x?a.h(y.x-(x/2-E),y.y):a.h(y.x+(x/2-E),y.y):(x=(x/2-E)/b,a.h(y.x+x*(z.x-y.x),y.y+x*(z.y-y.y))),a},Yn.prototype.computeMidAngle=function(){var a=this.pointsCount;if(2>a)return NaN;if(a===2)return this.i(0).ab(this.i(1));if(this.isOrthogonal&&(15<=this.computeCorner()||this.computeCurve()===ql))return this.ua.wx(.5);if(this.computeCurve()===ql&&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),Be.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)},kt=Yn.prototype,kt.i=function(a){return this.Nb.s[a]},kt.dd=function(a,y){this.Nb.cd(a,y)},kt.L=function(a,y,x){this.Nb.cd(a,new Ot(y,x))},kt.Kz=function(a,y){this.Nb.Gb(a,y)},kt.m=function(a,y,x){this.Nb.Gb(a,new Ot(y,x))},kt.ne=function(a){this.Nb.add(a)},kt.yf=function(a,y){this.Nb.add(new Ot(a,y))},kt.pv=function(a){this.Nb.mb(a)},kt.Fj=function(){this.Nb.clear()};function Sc(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 ee,z=a.Nb.iterator;z.next();){var tt=z.value;b.add(new Ot(tt.x+y,tt.y+x).freeze())}b.freeze(),z=a.Nb,a.Nb=b,tt=a.diagram,isNaN(y)||isNaN(x)||tt!==null&&tt.animationManager.zb?a.v():(a.ke.h(a.ke.x+y,a.ke.y+x),a.pa.h(a.pa.x+y,a.pa.y+x),Ns(a)),E?C0(a):(a.defaultFromPoint&&(a.defaultFromPoint=a.i(0)),a.defaultToPoint&&(a.defaultToPoint=a.i(a.pointsCount-1))),tt!==null&&tt.animationManager.zb&&ph(tt.animationManager,a,b),a.g("points",z,b)}}kt.uh=function(){this.Mg===null&&(this.Mg=this.Nb,this.Nb=this.Nb.copy())},kt.zf=function(){if(this.Mg!==null){for(var a=this.Mg,y=this.Nb,x=1/0,E=1/0,b=a.s,z=b.length,tt=0;tt<z;tt++){var rt=b[tt];x=Math.min(rt.x,x),E=Math.min(rt.y,E)}rt=tt=1/0;for(var ot=y.s,lt=ot.length,ut=0;ut<lt;ut++){var ft=ot[ut];tt=Math.min(ft.x,tt),rt=Math.min(ft.y,rt),ft.freeze()}if(y.freeze(),lt===z){for(z=0;z<lt;z++)if(ut=b[z],ft=ot[z],ut.x-x!==ft.x-tt||ut.y-E!==ft.y-rt){this.qc();break}}else this.qc();this.Mg=null,x=this.diagram,x!==null&&x.animationManager.zb&&ph(x.animationManager,this,y),C0(this),this.g("points",a,y)}},kt.rv=function(){this.Mg!==null&&(this.Nb=this.Mg,this.Mg=null)};function C0(a){a.Nb.count===0?a.fd=!1:(a.fd=!0,a.cq=null,a.vt=NaN,a.defaultFromPoint=a.i(0),a.defaultToPoint=a.i(a.pointsCount-1),L0(a,!1))}kt.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())}},kt.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()}}},Yn.prototype.computePoints=function(){if(this.diagram===null)return!1;var a=this.fromNode,y=null;if(a===null?(zf||(zf=new gi,zf.desiredSize=_i,zf.Va()),this.defaultFromPoint&&(zf.location=this.defaultFromPoint,zf.Va(),y=a=zf)):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?(Gf||(Gf=new gi,Gf.desiredSize=_i,Gf.Va()),this.defaultToPoint&&(Gf.location=this.defaultToPoint,Gf.Va(),b=E=Gf)):b=this.toPort,b===null||E.isVisible()||(x=E.findVisibleNode(),x!==null&&x!==E?(E=x,b=x.port):E=x),this.Mw=E,E===null||!E.location.w())return!1;for(;!(b===null||b.actualBounds.w()&&b.Ed());)b=b.panel;if(b===null)return!1;var z=this.pointsCount,tt=this.computeSpot(!0,y);x=this.computeSpot(!1,b);var rt=Eg(tt),ot=Eg(x),lt=y===b&&y!==null,ut=this.isOrthogonal,ft=this.curve===ql;this.Wf=lt&&!ut?ft=!0:!1;var yt=this.computeAdjusting()===Xa||lt;if(!ut&&!lt&&rt&&ot){if(rt=!1,!yt&&3<=z&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=this.adjustPoints(0,yt,z-1,ot))&&(yt=this.getLinkPoint(a,y,tt,!0,!1,E,b),ot=this.getLinkPoint(E,b,x,!1,!1,a,y),this.adjustPoints(0,yt,z-1,ot)),!rt)if(this.Fj(),ft){z=this.getLinkPoint(a,y,tt,!0,!1,E,b),yt=this.getLinkPoint(E,b,x,!1,!1,a,y),rt=yt.x-z.x,ot=yt.y-z.y,lt=this.computeCurviness(),ft=ut=0;var Mt=z.x+rt/3,Tt=z.y+ot/3,Dt=Mt,$t=Tt;Be.B(ot,0)?$t=0<rt?$t-lt:$t+lt:(ut=-rt/ot,ft=Math.sqrt(lt*lt/(ut*ut+1)),0>lt&&(ft=-ft),Dt=(0>ot?-1:1)*ft+Mt,$t=ut*(Dt-Mt)+Tt),Mt=z.x+2*rt/3,Tt=z.y+2*ot/3;var Vt=Mt,ae=Tt;Be.B(ot,0)?ae=0<rt?ae-lt:ae+lt:(Vt=(0>ot?-1:1)*ft+Mt,ae=ut*(Vt-Mt)+Tt),this.Fj(),this.ne(z),this.yf(Dt,$t),this.yf(Vt,ae),this.ne(yt),this.dd(0,this.getLinkPoint(a,y,tt,!0,!1,E,b)),this.dd(3,this.getLinkPoint(E,b,x,!1,!1,a,y))}else z=E,yt=b,E=this.getLinkPoint(a,y,tt,!0,!1,z,yt),b=this.getLinkPoint(z,yt,x,!1,!1,a,y),this.hasCurviness()?(yt=b.x-E.x,x=b.y-E.y,tt=this.computeCurviness(),a=E.x+yt/2,y=E.y+x/2,z=a,rt=y,Be.B(x,0)?rt=0<yt?rt-tt:rt+tt:(yt=-yt/x,z=Math.sqrt(tt*tt/(yt*yt+1)),0>tt&&(z=-z),z=(0>x?-1:1)*z+a,rt=yt*(z-a)+y),this.ne(E),this.yf(z,rt),this.ne(b)):(this.ne(E),this.ne(b),rt=Oe.alloc(),y.mi(rt),ot=rt.ca(b),yt.mi(rt),lt=rt.ca(E),(ot||lt)&&(tt=y.ga(F0(tt),new Ot),this.dd(0,this.getLinkPointFromPoint(a,y,tt,b,!0,tt)),x=yt.ga(F0(x),new Ot),this.dd(1,this.getLinkPointFromPoint(z,yt,x,E,!1,x))),Oe.free(rt))}else{ft=this.isAvoiding,yt&&(ut&&ft||lt)&&this.Fj();var ce=lt?this.computeCurviness():0;ft=this.getLinkPoint(a,y,tt,!0,ut,E,b),Mt=Dt=Tt=0,(ut||!rt||lt)&&($t=this.computeEndSegmentLength(a,y,tt,!0),Mt=this.getLinkDirection(a,y,ft,tt,!0,ut,E,b),lt&&(rt||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(Mt-=ut?90:30,0>ce&&(Mt-=180)),0>Mt?Mt+=360:360<=Mt&&(Mt-=360),lt&&($t+=Math.abs(ce)*(ut?1:2)),Mt===0?Tt=$t:Mt===90?Dt=$t:Mt===180?Tt=-$t:Mt===270?Dt=-$t:(Tt=$t*Math.cos(Mt*Math.PI/180),Dt=$t*Math.sin(Mt*Math.PI/180)),tt.Mc()&&lt&&($t=y.ga(cr,Ot.alloc()),Vt=Ot.allocAt($t.x+1e3*Tt,$t.y+1e3*Dt),this.getLinkPointFromPoint(a,y,$t,Vt,!0,ft),Ot.free($t),Ot.free(Vt))),$t=this.getLinkPoint(E,b,x,!1,ut,a,y);var ge=ae=Vt=0;if(ut||!ot||lt){var we=this.computeEndSegmentLength(E,b,x,!1);ge=this.getLinkDirection(E,b,$t,x,!1,ut,a,y),lt&&(ot||tt.D(x)||!ut&&tt.x+x.x===1&&tt.y+x.y===1)&&(ge+=ut?0:30,0>ce&&(ge+=180)),0>ge?ge+=360:360<=ge&&(ge-=360),lt&&(we+=Math.abs(ce)*(ut?1:2)),ge===0?Vt=we:ge===90?ae=we:ge===180?Vt=-we:ge===270?ae=-we:(Vt=we*Math.cos(ge*Math.PI/180),ae=we*Math.sin(ge*Math.PI/180)),x.Mc()&&lt&&(x=b.ga(cr,Ot.alloc()),tt=Ot.allocAt(x.x+1e3*Vt,x.y+1e3*ae),this.getLinkPointFromPoint(E,b,x,tt,!1,$t),Ot.free(x),Ot.free(tt))}x=ft,(ut||!rt||lt)&&(x=new Ot(ft.x+Tt,ft.y+Dt)),tt=$t,(ut||!ot||lt)&&(tt=new Ot($t.x+Vt,$t.y+ae)),!yt&&!ut&&rt&&3<z&&this.adjustPoints(0,ft,z-2,tt)?this.dd(z-1,$t):!yt&&!ut&&ot&&3<z&&this.adjustPoints(1,x,z-1,$t)?this.dd(0,ft):!yt&&(ut?6<=z:4<z)&&this.adjustPoints(1,x,z-2,tt)?(this.dd(0,ft),this.dd(z-1,$t)):(this.Fj(),this.ne(ft),(ut||!rt||lt)&&this.ne(x),ut&&this.addOrthoPoints(x,Mt,tt,ge,a,E),(ut||!ot||lt)&&this.ne(tt),this.ne($t))}return!0};function uv(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}Yn.prototype.getLinkPointFromPoint=function(a,y,x,E,b,z){if(z===void 0&&(z=new Ot),a===null||y===null)return z.assign(x),z;if(a.isVisible()||(b=a.findVisibleNode(),b!==null&&b!==a&&(y=b.port)),a=null,b=y.panel,b===null||b.se()||(b=b.panel),b===null){b=E.x,E=E.y;var tt=x.x;x=x.y}else{a=b.oe,b=1/(a.m11*a.m22-a.m12*a.m21),tt=a.m22*b;var rt=-a.m12*b,ot=-a.m21*b,lt=a.m11*b,ut=b*(a.m21*a.dy-a.m22*a.dx),ft=b*(a.m12*a.dx-a.m11*a.dy);b=E.x*tt+E.y*ot+ut,E=E.x*rt+E.y*lt+ft,tt=x.x*tt+x.y*ot+ut,x=x.x*rt+x.y*lt+ft}return y.Sj(b,E,tt,x,z),a!==null&&z.transform(a),z};function P0(a,y){var x=y.Zn;return x===null&&(x=new jf,x.port=y,x.node=y.part,y.Zn=x),h1(x,a)}Yn.prototype.getLinkPoint=function(a,y,x,E,b,z,tt,rt){if(rt===void 0&&(rt=new Ot),x.sb()&&!Eg(x))return y.ga(x,rt),rt;if(x.$c()){var ot=P0(this,y);if(ot!==null){if(rt.assign(ot.Zo),b&&this.routing===o1){var lt=P0(this,tt);if(lt!==null&&ot.Gl<lt.Gl){ot=Ot.alloc(),lt=Ot.alloc();var ut=new Oe(y.ga(Qr,ot),y.ga(lo,lt)),ft=this.computeSpot(!E,tt);a=this.getLinkPoint(z,tt,ft,!E,b,a,y,lt),(x.Hf(zr)||x.Hf(eo))&&a.y>=ut.y&&a.y<=ut.y+ut.height?rt.y=a.y:(x.Hf(Wi)||x.Hf(xs))&&a.x>=ut.x&&a.x<=ut.x+ut.width&&(rt.x=a.x),Ot.free(ot),Ot.free(lt)}}return rt}}return x=y.ga(F0(x),Ot.alloc()),this.pointsCount>(b?6:2)?(tt=E?this.i(1):this.i(this.pointsCount-2),b&&(tt=uv(x,tt.copy()))):(ot=this.computeSpot(!E,tt),z=Ot.alloc(),tt=tt.ga(F0(ot),z),b&&(tt=uv(x,tt)),Ot.free(z)),this.getLinkPointFromPoint(a,y,x,tt,E,rt),Ot.free(x),rt},Yn.prototype.getLinkDirection=function(a,y,x,E,b,z,tt,rt){t:if(E.sb())var ot=E.x>E.y?E.x>1-E.y?0:E.x<1-E.y?270:315:E.x<E.y?E.x>1-E.y?90:E.x<1-E.y?180:135:.5>E.x?225:.5<E.x?45:0;else{if(E.$c()&&(ot=P0(this,y),ot!==null))switch(ot.Nc){case 1:ot=270;break t;case 2:ot=180;break t;default:case 4:ot=0;break t;case 8:ot=90;break t}ot=y.ga(cr,Ot.alloc()),this.pointsCount>(z?6:2)?(rt=b?this.i(1):this.i(this.pointsCount-2),rt=z?uv(ot,rt.copy()):x):(x=Ot.alloc(),rt=rt.ga(cr,x),Ot.free(x)),x=Math.abs(rt.x-ot.x)>Math.abs(rt.y-ot.y)?rt.x>=ot.x?0:180:rt.y>=ot.y?90:270,Ot.free(ot),ot=x}return E.Mc()&&tt.Td(a)&&(ot+=180,360<=ot&&(ot-=360)),Eg(E)||(a=y.li(),a===0)||(45<=a&&135>a?ot+=90:135<=a&&225>a?ot+=180:225<=a&&315>a&&(ot+=270),360<=ot&&(ot-=360)),ot},Yn.prototype.computeEndSegmentLength=function(a,y,x,E){return y!==null&&x.$c()&&(a=P0(this,y),a!==null)?a.Ju:(a=E?this.fromEndSegmentLength:this.toEndSegmentLength,y!==null&&isNaN(a)&&(a=E?y.fromEndSegmentLength:y.toEndSegmentLength),isNaN(a)&&(a=10),a)},Yn.prototype.computeSpot=function(a,y){return y===void 0&&(y=null),a?(a=y||this.fromPort,a===null?a=cr:(y=this.fromSpot,y.Xb()&&(y=a.fromSpot),a=y===Io?pr:y)):(a=y||this.toPort,a===null?a=cr:(y=this.toSpot,y.Xb()&&(y=a.toSpot),a=y===Io?pr:y)),a};function Eg(a){return a===pr||a.x===.5&&a.y===.5}function F0(a){return a.x===.5&&a.y===.5?a:cr}Yn.prototype.computeOtherPoint=function(a,y){return this.computeAdjusting()!==Xa&&4<this.pointsCount?this.computeMidPoint(new Ot):(a=y.Zn,a=a!==null?h1(a,this):null,a!==null?a.Zo:y.ga(cr))},Yn.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},Yn.prototype.Cf=function(a,y,x,E,b,z){if(this.pickable===!1)return!1;y===void 0&&(y=null),x===void 0&&(x=null);var tt=z;if(z===void 0&&(tt=ir.alloc(),tt.reset()),tt.multiply(this.transform),this.fh(a,tt))return Nm(this,y,x,b),z===void 0&&ir.free(tt),!0;if(this.Yc(a,tt)){var rt=!1;if(!this.isAtomic)for(var ot=this.O.s,lt=ot.length;lt--;){var ut=ot[lt];if(ut.visible||ut===this.locationObject){var ft=ut.actualBounds,yt=this.naturalBounds;if(!(ft.x>yt.width||ft.y>yt.height||0>ft.x+ft.width||0>ft.y+ft.height)){if(ft=ir.alloc(),ft.set(tt),ut instanceof En)rt=ut.Cf(a,y,x,E,b,ft);else if(this.path===ut){if(ut instanceof Cr)if(rt=a,yt=E,ut.pickable===!1)rt=!1;else if(ft.multiply(ut.transform),yt)t:{var Mt=rt,Tt=ft;if(ut.fh(Mt,Tt))rt=!0;else{if(Tt===void 0&&(Tt=ut.transform,Mt.Re(ut.actualBounds))){rt=!0;break t}rt=Mt.left,yt=Mt.right;var Dt=Mt.top;Mt=Mt.bottom;var $t=Ot.alloc(),Vt=Ot.alloc(),ae=Ot.alloc(),ce=ir.alloc();ce.set(Tt),ce.bv(ut.transform),ce.Vj(),Vt.x=yt,Vt.y=Dt,Vt.transform(ce),$t.x=rt,$t.y=Dt,$t.transform(ce),Tt=!1,$d(ut,$t,Vt,ae)?Tt=!0:($t.x=yt,$t.y=Mt,$t.transform(ce),$d(ut,$t,Vt,ae)?Tt=!0:(Vt.x=rt,Vt.y=Mt,Vt.transform(ce),$d(ut,$t,Vt,ae)?Tt=!0:($t.x=rt,$t.y=Dt,$t.transform(ce),$d(ut,$t,Vt,ae)&&(Tt=!0)))),ir.free(ce),Ot.free($t),Ot.free(Vt),Ot.free(ae),rt=Tt}}else rt=ut.fh(rt,ft)}else rt=_s(ut,a,E,ft);rt&&(yt=ut,y!==null&&(yt=y(ut)),yt&&(x===null||x(yt))&&b.add(yt)),ir.free(ft)}}}return z===void 0&&ir.free(tt),rt||this.background!==null||this.areaBackground!==null}return z===void 0&&ir.free(tt),!1},Yn.prototype.computeCurve=function(){if(this.Wf===null){var a=this.fromPort,y=this.isOrthogonal;this.Wf=a!==null&&a===this.toPort&&!y}return this.Wf?ql:this.curve},Yn.prototype.computeCorner=function(){if(this.curve===ql)return 0;var a=this.corner;return(isNaN(a)||0>a)&&(a=10),a},Yn.prototype.findMidLabel=function(){for(var a=this.path,y=this.O.s,x=y.length,E=0;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},Yn.prototype.computeSpacing=function(){if(!this.isVisible())return 0;var a=a1;a=Math.max(a,this.computeThickness());var y=this.fromPort,x=this.toPort;if(y!==null&&x!==null){var E=this.findMidLabel();if(E!==null){var b=E.naturalBounds,z=E.margin,tt=isNaN(b.width)?30:b.width*E.scale+z.left+z.right;b=isNaN(b.height)?14:b.height*E.scale+z.top+z.bottom,E=E.segmentOrientation,E===pp||E===k0||E===fv?a=Math.max(a,b):E===vp||E===wp||E===mp||E===yp?a=Math.max(a,tt):(y=y.ga(cr).ab(x.ga(cr))/180*Math.PI,a=Math.max(a,Math.abs(Math.sin(y)*tt)+Math.abs(Math.cos(y)*b)+1)),this.curve===ql&&(a*=1.333)}}return a},Yn.prototype.arrangeBundledLinks=function(a,y){if(y)for(y=0;y<a.length;y++){var x=a[y];x.computeAdjusting()===Xa&&x.bb()}},Yn.prototype.computeCurviness=function(){var a=this.curviness;if(isNaN(a)){a=s1;var y=this.Sf;if(y!==null){for(var x=li(),E=0,b=y.links,z=0;z<b.length;z++){var tt=b[z].computeSpacing();x.push(tt),E+=tt}for(E=-E/2,z=0;z<b.length;z++){if(b[z]===this){a=E+x[z]/2;break}E+=x[z]}y.Ds===this.fromNode&&(a=-a),ci(x)}}return a},Yn.prototype.computeThickness=function(){if(!this.isVisible())return 0;var a=this.path;return a!==null?Math.max(a.strokeWidth,1):1},Yn.prototype.hasCurviness=function(){return!isNaN(this.curviness)||this.Sf!==null},Yn.prototype.adjustPoints=function(a,y,x,E){var b=this.computeAdjusting();if(this.isOrthogonal){if(b===M0)return!1;b===b0&&(b=gp)}switch(b){case M0:var z=this.i(a),tt=this.i(x);if(!z.Xa(y)||!tt.Xa(E)){b=z.x,z=z.y;var rt=tt.x-b,ot=tt.y-z,lt=Math.sqrt(rt*rt+ot*ot);if(!Be.$(lt,0)){if(Be.$(rt,0))var ut=0>ot?-Math.PI/2:Math.PI/2;else ut=Math.atan(ot/Math.abs(rt)),0>rt&&(ut=Math.PI-ut);tt=y.x;var ft=y.y;rt=E.x-tt;var yt=E.y-ft;for(ot=Math.sqrt(rt*rt+yt*yt),Be.$(rt,0)?yt=0>yt?-Math.PI/2:Math.PI/2:(yt=Math.atan(yt/Math.abs(rt)),0>rt&&(yt=Math.PI-yt)),lt=ot/lt,ut=yt-ut,this.dd(a,y),a+=1;a<x;a++)y=this.i(a),rt=y.x-b,ot=y.y-z,y=Math.sqrt(rt*rt+ot*ot),Be.$(y,0)||(Be.$(rt,0)?ot=0>ot?-Math.PI/2:Math.PI/2:(ot=Math.atan(ot/Math.abs(rt)),0>rt&&(ot=Math.PI-ot)),rt=ot+ut,y*=lt,this.L(a,tt+y*Math.cos(rt),ft+y*Math.sin(rt)));this.dd(x,E)}}return!0;case b0:if(z=this.i(a),ft=this.i(x),!z.Xa(y)||!ft.Xa(E)){b=z.x,z=z.y,tt=ft.x,ft=ft.y,lt=(tt-b)*(tt-b)+(ft-z)*(ft-z),rt=y.x,ut=y.y,ot=E.x,yt=E.y;var Mt=1;if(ot-rt!==0){var Tt=(yt-ut)/(ot-rt);Mt=Math.sqrt(1+1/(Tt*Tt))}else Tt=9e9;for(this.dd(a,y),a+=1;a<x;a++){y=this.i(a);var Dt=y.x,$t=y.y,Vt=.5;lt!==0&&(Vt=((b-Dt)*(b-tt)+(z-$t)*(z-ft))/lt);var ae=b+Vt*(tt-b),ce=z+Vt*(ft-z);y=Math.sqrt((Dt-ae)*(Dt-ae)+($t-ce)*($t-ce)),$t<Tt*(Dt-ae)+ce&&(y=-y),0<Tt&&(y=-y),Dt=rt+Vt*(ot-rt),Vt=ut+Vt*(yt-ut),Tt!==0?(y=Dt+y/Mt,this.L(a,y,Vt-(y-Dt)/Tt)):this.L(a,Dt,Vt+y)}this.dd(x,E)}return!0;case gp:t:{if(this.isOrthogonal&&(b=this.i(a),z=this.i(a+1),tt=this.i(a+2),rt=z.x,ut=z.y,ft=rt,lt=ut,Be.B(b.y,z.y)?Be.B(z.x,tt.x)?ut=y.y:Be.B(z.y,tt.y)&&(rt=y.x):Be.B(b.x,z.x)&&(Be.B(z.y,tt.y)?rt=y.x:Be.B(z.x,tt.x)&&(ut=y.y)),this.L(a+1,rt,ut),b=this.i(x),z=this.i(x-1),tt=this.i(x-2),rt=z.x,ut=z.y,ot=rt,yt=ut,Be.B(b.y,z.y)?Be.B(z.x,tt.x)?ut=E.y:Be.B(z.y,tt.y)&&(rt=E.x):Be.B(b.x,z.x)&&(Be.B(z.y,tt.y)?rt=E.x:Be.B(z.x,tt.x)&&(ut=E.y)),this.L(x-1,rt,ut),Av(this))){this.L(a+1,ft,lt),this.L(x-1,ot,yt),x=!1;break t}this.dd(a,y),this.dd(x,E),x=!0}return x;default:return!1}},Yn.prototype.addOrthoPoints=function(a,y,x,E,b,z){0>y?y+=360:360<=y&&(y-=360),0>E?E+=360:360<=E&&(E-=360);var tt=E;y=315<=y||45>y?0:45<=y&&135>y?90:135<=y&&225>y?180:270,E=315<=E||45>E?0:45<=E&&135>E?90:135<=E&&225>E?180:270;var rt=b.actualBounds.copy(),ot=z.actualBounds.copy();if(rt.w()&&ot.w()){rt.Bc(xp,xp),ot.Bc(xp,xp),rt.Ye(a),ot.Ye(x);var lt=Ot.alloc(),ut=Ot.alloc();y===0?x.x>a.x||E===270&&x.y<a.y&&ot.right>a.x||E===90&&x.y>a.y&&ot.right>a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===180?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x<ot.left?this.computeMidOrthoPosition(a.x,a.y,ot.left,x.y,!1):a.x<ot.right&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.right,ut.x=lt.x,ut.y=x.y):E===0&&a.x<ot.left&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===180||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===180&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===180||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===180||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x>=rt.left&&x.x<=a.x||a.x<=ot.right&&a.x>=x.x?(E===90||E===270)&&(lt.h(Math.max((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===0?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===0?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===180?x.x<a.x||E===270&&x.y<a.y&&ot.left<a.x||E===90&&x.y>a.y&&ot.left<a.x?(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),E===0?(lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1),ut.x=lt.x,ut.y=x.y):E===270&&x.y<a.y||E===90&&x.y>a.y?(lt.x=a.x>ot.right?this.computeMidOrthoPosition(a.x,a.y,ot.right,x.y,!1):a.x>ot.left&&(E===270&&a.y<ot.top||E===90&&a.y>ot.bottom)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):ot.left,ut.x=lt.x,ut.y=x.y):E===180&&a.x>ot.right&&a.y>ot.top&&a.y<ot.bottom&&(lt.x=a.x,lt.y=a.y<x.y?Math.min(x.y,ot.top):Math.max(x.y,ot.bottom),ut.y=lt.y)):(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),(E===0||E===90&&x.y<rt.top||E===270&&x.y>rt.bottom)&&(E===0&&(ot.ca(a)||rt.ca(x))?lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):x.y<a.y&&(E===0||E===90)?lt.y=this.computeMidOrthoPosition(a.x,rt.top,x.x,Math.max(x.y,ot.bottom),!0):x.y>a.y&&(E===0||E===270)&&(lt.y=this.computeMidOrthoPosition(a.x,rt.bottom,x.x,Math.min(x.y,ot.top),!0)),ut.x=x.x,ut.y=lt.y),lt.y>rt.top&&lt.y<rt.bottom&&(x.x<=rt.right&&x.x>=a.x||a.x>=ot.left&&a.x<=x.x?(E===90||E===270)&&(lt.h(Math.min((a.x+x.x)/2,a.x),a.y),ut.h(lt.x,x.y)):(lt.y=E===270||(E===0||E===180)&&x.y<a.y?Math.min(x.y,E===180?rt.top:Math.min(rt.top,ot.top)):Math.max(x.y,E===180?rt.bottom:Math.max(rt.bottom,ot.bottom)),ut.x=x.x,ut.y=lt.y))):y===90?x.y>a.y||E===180&&x.x<a.x&&ot.bottom>a.y||E===0&&x.x>a.x&&ot.bottom>a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===270?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>a.x?(lt.y=a.y<ot.top?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.top,!0):a.y<ot.bottom&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.bottom,ut.x=x.x,ut.y=lt.y):E===90&&a.y<ot.top&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===270||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===270&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===270||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===270||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y>=rt.top&&x.y<=a.y||a.y<=ot.bottom&&a.y>=x.y?(E===0||E===180)&&(lt.h(a.x,Math.max((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===90?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===90?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y))):x.y<a.y||E===180&&x.x<a.x&&ot.top<a.y||E===0&&x.x>a.x&&ot.top<a.y?(lt.h(a.x,x.y),ut.h((a.x+x.x)/2,x.y),E===90?(lt.y=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0),ut.x=x.x,ut.y=lt.y):E===180&&x.x<a.x||E===0&&x.x>=a.x?(lt.y=a.y>ot.bottom?this.computeMidOrthoPosition(a.x,a.y,x.x,ot.bottom,!0):a.y>ot.top&&(E===180&&a.x<ot.left||E===0&&a.x>ot.right)?this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!0):ot.top,ut.x=x.x,ut.y=lt.y):E===270&&a.y>ot.bottom&&a.x>ot.left&&a.x<ot.right&&(lt.x=a.x<x.x?Math.min(x.x,ot.left):Math.max(x.x,ot.right),lt.y=a.y,ut.x=lt.x)):(lt.h(x.x,a.y),ut.h(x.x,(a.y+x.y)/2),(E===90||E===0&&x.x<rt.left||E===180&&x.x>rt.right)&&(E===90&&(ot.ca(a)||rt.ca(x))?lt.x=this.computeMidOrthoPosition(a.x,a.y,x.x,x.y,!1):x.x<a.x&&(E===90||E===0)?lt.x=this.computeMidOrthoPosition(rt.left,a.y,Math.max(x.x,ot.right),x.y,!1):x.x>a.x&&(E===90||E===180)&&(lt.x=this.computeMidOrthoPosition(rt.right,a.y,Math.min(x.x,ot.left),x.y,!1)),ut.x=lt.x,ut.y=x.y),lt.x>rt.left&&lt.x<rt.right&&(x.y<=rt.bottom&&x.y>=a.y||a.y>=ot.top&&a.y<=x.y?(E===0||E===180)&&(lt.h(a.x,Math.min((a.y+x.y)/2,a.y)),ut.h(x.x,lt.y)):(lt.x=E===180||(E===90||E===270)&&x.x<a.x?Math.min(x.x,E===270?rt.left:Math.min(rt.left,ot.left)):Math.max(x.x,E===270?rt.right:Math.max(rt.right,ot.right)),ut.x=lt.x,ut.y=x.y)));var ft=x;if(this.isAvoiding){var yt=this.diagram;if(yt===null||b===z||this.layer.isTemporary||!Kd(yt)||rt.ca(ft)&&!z.Td(b)||ot.ca(a)&&!b.Td(z))y=!1;else{var Mt=ed(yt,!0,this.containingGroup,null);if(this.segmentIndex!==17&&Mt.Yj(Math.min(a.x,lt.x),Math.min(a.y,lt.y),Math.abs(a.x-lt.x),Math.abs(a.y-lt.y))&&Mt.Yj(Math.min(lt.x,ut.x),Math.min(lt.y,ut.y),Math.abs(lt.x-ut.x),Math.abs(lt.y-ut.y))&&Mt.Yj(Math.min(ut.x,ft.x),Math.min(ut.y,ft.y),Math.abs(ut.x-ft.x),Math.abs(ut.y-ft.y)))y=!1;else{b=a,z=ft;var Tt=x=null;if(yt.isVirtualized){yt=Mt.bounds.copy(),yt.Bc(-Mt.Ho,-Mt.Go);var Dt=Ot.alloc();Mg(Mt,a.x,a.y)||(Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,a.x,a.y,lt.x,lt.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(lt)):Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,ut.x,ut.y,Dt)?(x=a=Dt.copy(),y=Dt.ab(ut)):Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,ft.x,ft.y,Dt)&&(x=a=Dt.copy(),y=Dt.ab(ft))),Mg(Mt,ft.x,ft.y)||(Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ft.x,ft.y,ut.x,ut.y,Dt)?(Tt=ft=Dt.copy(),E=ut.ab(Dt)):Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,ut.x,ut.y,lt.x,lt.y,Dt)?(Tt=ft=Dt.copy(),E=lt.ab(Dt)):Be.Ff(yt.x,yt.y,yt.x+yt.width,yt.y+yt.height,lt.x,lt.y,a.x,a.y,Dt)&&(Tt=ft=Dt.copy(),E=a.ab(Dt))),Ot.free(Dt)}rt=rt.copy().ed(ot),rt.Bc(Mt.Ho*Mt.Os,Mt.Go*Mt.Os),u1(Mt,a,y,ft,E,rt,!0),ot=ih(Mt,ft.x,ft.y),!Mt.abort&&ot>=bg&&(l1(Mt),rt.Bc(Mt.Ho*Mt.Hx,Mt.Go*Mt.Ix),u1(Mt,a,y,ft,E,rt,!1),ot=ih(Mt,ft.x,ft.y)),!Mt.abort&&ot<bg&&ih(Mt,ft.x,ft.y)!==Cc?(hv(this,Mt,ft.x,ft.y,E,!0,tt),rt=this.i(2),4>this.pointsCount?(y===0||y===180?(rt.x=a.x,rt.y=ft.y):(rt.x=ft.x,rt.y=a.y),this.L(2,rt.x,rt.y),this.m(3,rt.x,rt.y)):(tt=this.i(3),y===0||y===180?Be.B(rt.x,tt.x)?(rt=y===0?Math.max(rt.x,a.x):Math.min(rt.x,a.x),this.L(2,rt,a.y),this.L(3,rt,tt.y)):Be.B(rt.y,tt.y)?(Math.abs(a.y-rt.y)<=Mt.Go/2&&(this.L(2,rt.x,a.y),this.L(3,tt.x,a.y)),this.m(2,rt.x,a.y)):this.L(2,a.x,rt.y):(y===90||y===270)&&(Be.B(rt.y,tt.y)?(rt=y===90?Math.max(rt.y,a.y):Math.min(rt.y,a.y),this.L(2,a.x,rt),this.L(3,tt.x,rt)):Be.B(rt.x,tt.x)?(Math.abs(a.x-rt.x)<=Mt.Ho/2&&(this.L(2,a.x,rt.y),this.L(3,a.x,tt.y)),this.m(2,a.x,rt.y)):this.L(2,rt.x,a.y))),x!==null&&(a=this.i(1),tt=this.i(2),a.x!==tt.x&&a.y!==tt.y?y===0||y===180?this.m(2,a.x,tt.y):this.m(2,tt.x,a.y):y===0||y===180?this.m(2,b.x,x.y):this.m(2,x.x,b.y)),Tt!==null&&(E===0||E===180?this.yf(z.x,Tt.y):this.yf(Tt.x,z.y)),y=!0):y=!1}}}else y=!1;y||(this.ne(lt.copy()),this.ne(ut.copy())),Ot.free(lt),Ot.free(ut)}},Yn.prototype.computeMidOrthoPosition=function(a,y,x,E,b){var z=0;return!this.hasCurviness()||this.computeSpot(!0,this.fromPort).$c()||this.computeSpot(!1,this.toPort).$c()||(z=this.computeCurviness()),b?(y+E)/2+z:(a+x)/2+z};function Av(a){if(a.diagram===null||!a.isAvoiding||!Kd(a.diagram))return!1;var y=a.points.s,x=y.length;if(4>x)return!1;a=ed(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 hv(a,y,x,E,b,z,tt){var rt=y.Ho,ot=y.Go,lt=ih(y,x,E),ut=x,ft=E;for(b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,b!==tt&&lt>ef&&ih(y,ut,ft)!==lt-1&&(ih(y,x-rt,E)===lt-1?(b=180,ut=x-rt,ft=E):ih(y,x+rt,E)===lt-1?(b=0,ut=x+rt,ft=E):ih(y,x,E-ot)===lt-1?(b=270,ut=x,ft=E-ot):ih(y,x,E+ot)===lt-1&&(b=90,ut=x,ft=E+ot));lt>ef&&ih(y,ut,ft)===lt-1;)x=ut,E=ft,b===0?ut+=rt:b===90?ft+=ot:b===180?ut-=rt:ft-=ot,--lt;z?lt>ef&&(b===180||b===0?x=Math.floor(x/rt)*rt+rt/2:(b===90||b===270)&&(E=Math.floor(E/ot)*ot+ot/2)):(x=Math.floor(x/rt)*rt+rt/2,E=Math.floor(E/ot)*ot+ot/2),lt>ef&&(z=b,tt=x,ut=E,b===0?(z=90,ut+=ot):b===90?(z=180,tt-=rt):b===180?(z=270,ut-=ot):b===270&&(z=0,tt+=rt),ih(y,tt,ut)===lt-1?hv(a,y,tt,ut,z,!1,z):(tt=x,ut=E,b===0?(z=270,ut-=ot):b===90?(z=0,tt+=rt):b===180?(z=90,ut+=ot):b===270&&(z=180,tt-=rt),ih(y,tt,ut)===lt-1&&hv(a,y,tt,ut,z,!1,z))),a.yf(x,E)}Yn.prototype.ez=function(a){var y=a.x;a=a.y;for(var x=this.i(0),E=this.i(1),b=Cn(y,a,x.x,x.y,E.x,E.y),z=0,tt=1;tt<this.pointsCount-1;tt++){x=this.i(tt+1);var rt=Cn(y,a,E.x,E.y,x.x,x.y);E=x,rt<b&&(z=tt,b=rt)}return z},Yn.prototype.qc=function(){this.lk=!1,this.v()},Yn.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 Cr&&(b.ua=this.ua)}}},Yn.prototype.makeGeometry=function(){var a=this.ua,y=this.pointsCount,x=!1,E=this.diagram;E!==null&&tf(this)&&E.Eh.contains(this)&&(this.ml.width!==0||this.ml.height!==0)&&(E.animationManager.isAnimating||E.currentTool!==E.toolManager)&&(x=!0);var b=this.i(0).copy(),z=b.copy();E=this.Nb.s;var tt=this.computeCurve();if(tt===ql&&3<=y&&!Be.$(this.smoothness,0))if(y===3){var rt=this.i(1);E=Math.min(b.x,rt.x);var ot=Math.min(b.y,rt.y);rt=this.i(2),E=Math.min(E,rt.x),ot=Math.min(ot,rt.y)}else{if(this.isOrthogonal)for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);else for(E=3;E<y;E+=3)E+3>=y&&(E=y-1),ot=this.i(E),z.x=Math.min(ot.x,z.x),z.y=Math.min(ot.y,z.y);E=z.x,ot=z.y}else{for(ot=0;ot<y;ot++)rt=E[ot],z.x=Math.min(rt.x,z.x),z.y=Math.min(rt.y,z.y);E=z.x,ot=z.y}if(E-=this.su.x,ot-=this.su.y,b.x-=E,b.y-=ot,y!==2||tf(this)){if(a.type=Hn.o,rt=Dy(a),this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),Pg(rt,b.x,b.y,!1),tt===ql&&3<=y&&!Be.$(this.smoothness,0))if(y===3)x=this.i(1),y=x.x-E,x=x.y-ot,b=this.i(2).copy(),b.x-=E,b.y-=ot,this.computeShortLength(!1)!==0&&(b=_f(this,b,!1,z)),yc(rt,y,x,y,x,b.x,b.y);else if(this.isOrthogonal){y=Ot.allocAt(E,ot),x=Ot.alloc(),x.assign(this.i(1)),z=Ot.allocAt(E,ot),b=Ot.allocAt(E,ot),tt=this.i(0);for(var lt,ut=this.smoothness/3,ft=1;ft<this.pointsCount-1;ft++){lt=this.i(ft);var yt=tt,Mt=lt,Tt=this.i(cv(this,lt,ft,!1));if((!Be.$(yt.x,Mt.x)||!Be.$(Mt.x,Tt.x))&&(!Be.$(yt.y,Mt.y)||!Be.$(Mt.y,Tt.y))){var Dt=ut;isNaN(Dt)&&(Dt=this.smoothness/3);var $t=yt.x;yt=yt.y;var Vt=Mt.x;Mt=Mt.y;var ae=Tt.x;Tt=Tt.y;var ce=Dt*E0($t,yt,Vt,Mt);Dt*=E0(Vt,Mt,ae,Tt),Be.$(yt,Mt)&&Be.$(Vt,ae)&&(Vt>$t?Tt>Mt?(z.x=Vt-ce,z.y=Mt-ce,b.x=Vt+Dt,b.y=Mt+Dt):(z.x=Vt-ce,z.y=Mt+ce,b.x=Vt+Dt,b.y=Mt-Dt):Tt>Mt?(z.x=Vt+ce,z.y=Mt-ce,b.x=Vt-Dt,b.y=Mt+Dt):(z.x=Vt+ce,z.y=Mt+ce,b.x=Vt-Dt,b.y=Mt-Dt)),Be.$($t,Vt)&&Be.$(Mt,Tt)&&(Mt>yt?(ae>Vt?(z.x=Vt-ce,z.y=Mt-ce,b.x=Vt+Dt):(z.x=Vt+ce,z.y=Mt-ce,b.x=Vt-Dt),b.y=Mt+Dt):(ae>Vt?(z.x=Vt-ce,z.y=Mt+ce,b.x=Vt+Dt):(z.x=Vt+ce,z.y=Mt+ce,b.x=Vt-Dt),b.y=Mt-Dt)),(Be.$($t,Vt)&&Be.$(Vt,ae)||Be.$(yt,Mt)&&Be.$(Mt,Tt))&&($t=.5*($t+ae),yt=.5*(yt+Tt),z.x=$t,z.y=yt,b.x=$t,b.y=yt),(ft===1||ft===2&&Be.$(tt.x,this.i(0).x)&&Be.$(tt.y,this.i(0).y))&&(x.x=.5*(tt.x+lt.x),x.y=.5*(tt.y+lt.y)),yc(rt,x.x-E,x.y-ot,z.x-E,z.y-ot,lt.x-E,lt.y-ot),y.set(z),x.set(b),tt=lt}}lt=tt.x,tt=tt.y,ut=this.i(this.pointsCount-1),this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,vn)),lt=.5*(lt+ut.x),tt=.5*(tt+ut.y),yc(rt,b.x-E,b.y-ot,lt-E,tt-ot,ut.x-E,ut.y-ot),Ot.free(y),Ot.free(x),Ot.free(z),Ot.free(b)}else for(x=3;x<y;x+=3)z=this.i(x-2),x+3>=y&&(x=y-1),b=this.i(x-1),tt=this.i(x),x===y-1&&this.computeShortLength(!1)!==0&&(tt=_f(this,tt.copy(),!1,vn)),yc(rt,z.x-E,z.y-ot,b.x-E,b.y-ot,tt.x-E,tt.y-ot);else{for(z=Ot.alloc(),z.assign(this.i(0)),b=Ot.alloc(),b.assign(z),tt=this.computeCorner(),ft=1,lt=0;ft<y;){if(ft=cv(this,z,ft,1<ft),ut=this.i(ft),ft>=y-1){if(!z.D(ut))this.computeShortLength(!1)!==0&&(ut=_f(this,ut.copy(),!1,vn)),Kf(this,rt,-E,-ot,z,ut,x);else if(lt===0)for(ft=1;ft<y;)b.assign(z),ut=this.i(ft++),Kf(this,rt,-E,-ot,z,ut,x),z.assign(ut);break}if(lt=cv(this,ut,ft+1,ft<y-3),ft=-E,$t=-ot,yt=ut,Vt=this.i(lt),Dt=x,Be.B(z.y,yt.y)&&Be.B(yt.x,Vt.x))if(Tt=Math.min(tt,Math.abs(yt.x-b.x)/2),Tt=ce=Math.min(Tt,Math.abs(Vt.y-yt.y)/2),Be.B(Tt,0))Kf(this,rt,ft,$t,z,yt,Dt),z.assign(yt);else{var ge=yt.x,we=yt.y;Mt=ge,ae=we,yt.x>z.x?ge=yt.x-Tt:ge=yt.x+Tt,Vt.y>yt.y?ae=yt.y+ce:ae=yt.y-ce,Vt=Ot.allocAt(ge,we),Kf(this,rt,ft,$t,z,Vt,Dt),Ot.free(Vt),m0(rt,yt.x+ft,yt.y+$t,Mt+ft,ae+$t),z.h(Mt,ae)}else Be.B(z.x,yt.x)&&Be.B(yt.y,Vt.y)?(Tt=Math.min(tt,Math.abs(yt.y-b.y)/2),Tt=ce=Math.min(Tt,Math.abs(Vt.x-yt.x)/2),Be.B(ce,0)?(Kf(this,rt,ft,$t,z,yt,Dt),z.assign(yt)):(ge=yt.x,we=yt.y,Mt=ge,ae=we,yt.y>z.y?we=yt.y-Tt:we=yt.y+Tt,Vt.x>yt.x?Mt=yt.x+ce:Mt=yt.x-ce,Vt=Ot.allocAt(ge,we),Kf(this,rt,ft,$t,z,Vt,Dt),Ot.free(Vt),m0(rt,yt.x+ft,yt.y+$t,Mt+ft,ae+$t),z.h(Mt,ae))):(Kf(this,rt,ft,$t,z,yt,Dt),z.assign(yt));b.assign(ut),ft=lt}Ot.free(z)}v0=rt}else rt=this.i(1).copy(),rt.x-=E,rt.y-=ot,this.computeShortLength(!0)!==0&&(b=_f(this,b,!0,z)),this.computeShortLength(!1)!==0&&(rt=_f(this,rt,!1,z)),a.type=Hn.j,a.startX=b.x,a.startY=b.y,a.endX=rt.x,a.endY=rt.y;return this.lk=!0,a};function E0(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),Be.$(a,0)?y:Be.$(y,0)?a:Math.sqrt(a*a+y*y)))}function _f(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=E0(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=E0(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 cv(a,y,x,E){for(var b=a.pointsCount,z=y;Be.$(y.x,z.x)&&Be.$(y.y,z.y);){if(x>=b)return b-1;z=a.i(x++)}if(!Be.$(y.x,z.x)&&!Be.$(y.y,z.y))return x-1;for(var tt=z;Be.$(y.x,z.x)&&Be.$(z.x,tt.x)&&(!E||(y.y>=z.y?z.y>=tt.y:z.y<=tt.y))||Be.$(y.y,z.y)&&Be.$(z.y,tt.y)&&(!E||(y.x>=z.x?z.x>=tt.x:z.x<=tt.x));){if(x>=b)return b-1;tt=a.i(x++)}return x-2}Yn.prototype.computeJumpLength=function(){return 10};function Kf(a,y,x,E,b,z,tt){if(!tt&&tf(a)){tt=a.computeJumpLength();var rt=tt/2,ot=[],lt=0;if(a.isVisible()&&(lt=Tw(a,b,z,ot)),0<lt){if(Be.B(b.y,z.y))if(b.x<z.x)for(var ut=0;ut<lt;){var ft=Math.max(b.x,Math.min(ot[ut++]-rt,z.x-tt));y.lineTo(ft+x,z.y+E);for(var yt=ft+x,Mt=Math.min(ft+tt,z.x);ut<lt&&(ft=ot[ut],ft<Mt+tt);)ut++,Mt=Math.min(ft+rt,z.x);ft=z.y-tt+E,Mt+=x;var Tt=z.y+E;a.curve===Bc?Pg(y,Mt,Tt,!1):yc(y,yt,ft,Mt,ft,Mt,Tt)}else for(--lt;0<=lt;){for(ut=Math.min(b.x,Math.max(ot[lt--]+rt,z.x+tt)),y.lineTo(ut+x,z.y+E),yt=ut+x,ft=Math.max(ut-tt,z.x);0<=lt&&(ut=ot[lt],ut>ft-tt);)lt--,ft=Math.max(ut-rt,z.x);ut=z.y-tt+E,ft+=x,Mt=z.y+E,a.curve===Bc?Pg(y,ft,Mt,!1):yc(y,yt,ut,ft,ut,ft,Mt)}else if(Be.B(b.x,z.x))if(b.y<z.y)for(ut=0;ut<lt;){for(ft=Math.max(b.y,Math.min(ot[ut++]-rt,z.y-tt)),y.lineTo(z.x+x,ft+E),yt=ft+E,ft=Math.min(ft+tt,z.y);ut<lt&&(Mt=ot[ut],Mt<ft+tt);)ut++,ft=Math.min(Mt+rt,z.y);Mt=z.x-tt+x,Tt=z.x+x,ft+=E,a.curve===Bc?Pg(y,Tt,ft,!1):yc(y,Mt,yt,Mt,ft,Tt,ft)}else for(--lt;0<=lt;){for(ut=Math.min(b.y,Math.max(ot[lt--]+rt,z.y+tt)),y.lineTo(z.x+x,ut+E),yt=ut+E,ut=Math.max(ut-tt,z.y);0<=lt&&(ft=ot[lt],ft>ut-tt);)lt--,ut=Math.max(ft-rt,z.y);ft=z.x-tt+x,Mt=z.x+x,ut+=E,a.curve===Bc?Pg(y,Mt,ut,!1):yc(y,ft,yt,ft,ut,Mt,ut)}}}y.lineTo(z.x+x,z.y+E)}function Tw(a,y,x,E){var b=a.diagram;if(b===null||y.D(x))return 0;for(b=b.layers;b.next();){var z=b.value;if(z!==null&&z.visible){z=z.Pa.s;for(var tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];if(ot instanceof Yn){if(ot===a)return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length;if(ot.isVisible()&&tf(ot)){var lt=ot.routeBounds;lt.w()&&a.routeBounds.Yc(lt)&&!a.usesSamePort(ot)&&(lt=ot.path,lt!==null&&lt.Ed()&&Nw(y,x,E,ot))}}}}}return 0<E.length&&E.sort(function(ut,ft){return ut-ft}),E.length}function Nw(a,y,x,E){for(var b=Be.B(a.y,y.y),z=E.pointsCount,tt=E.i(0),rt=Ot.alloc(),ot=1;ot<z;ot++){var lt=E.i(ot);if(ot<z-1){var ut=E.i(ot+1);if(tt.y===lt.y&&lt.y===ut.y){if(lt.x>tt.x&&ut.x>=lt.x||lt.x<tt.x&&ut.x<=lt.x)continue}else if(tt.x===lt.x&&lt.x===ut.x&&(lt.y>tt.y&&ut.y>=lt.y||lt.y<tt.y&&ut.y<=lt.y))continue}t:{ut=a.x;var ft=a.y,yt=y.x,Mt=y.y,Tt=tt.x;tt=tt.y;var Dt=lt.x,$t=lt.y;if(Be.B(ut,yt)){if(!Be.B(ft,Mt)&&Be.B(tt,$t)&&Math.min(ft,Mt)<tt&&Math.max(ft,Mt)>tt&&Math.min(Tt,Dt)<ut&&Math.max(Tt,Dt)>ut&&!Be.B(Tt,Dt)){rt.x=ut,rt.y=tt,ut=!0;break t}}else if(Be.B(ft,Mt)&&Be.B(Tt,Dt)&&Math.min(ut,yt)<Tt&&Math.max(ut,yt)>Tt&&Math.min(tt,$t)<ft&&Math.max(tt,$t)>ft&&!Be.B(tt,$t)){rt.x=Tt,rt.y=ft,ut=!0;break t}rt.x=0,rt.y=0,ut=!1}ut&&(b?x.push(rt.x):x.push(rt.y)),tt=lt}Ot.free(rt)}function tf(a){return a=a.curve,a===Lg||a===Bc}function L0(a,y){(y||tf(a))&&(y=a.diagram,y===null||y.animationManager.isTicking||y.Eh.contains(a)||a.ml.width===0&&a.ml.height===0||y.Eh.add(a,a.ml.copy()))}Yn.prototype.Xo=function(a){var y=this.layer;if(y!==null&&y.visible&&!y.isTemporary){var x=y.diagram;if(x!==null&&!x.animationManager.isTicking){var E=!1;for(x=x.layers;x.next();){var b=x.value;if(b.visible){if(b===y){E=!0;var z=!1;b=b.Pa.s;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];ot instanceof Yn&&(ot===this?z=!0:z&&r1(this,ot,a))}}else if(E)for(z=b.Pa.s,b=z.length,tt=0;tt<b;tt++)rt=z[tt],rt instanceof Yn&&r1(this,rt,a)}}}}};function r1(a,y,x){if(y!==null&&y.lk&&y.fd&&tf(y)){var E=y.routeBounds;E.w()&&(a.routeBounds.Yc(E)||x.Yc(E))&&(a.usesSamePort(y)||y.qc())}}Yn.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},Yn.prototype.isVisible=function(){if(!Zi.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},Yn.prototype.Zb=function(a){if(Zi.prototype.Zb.call(this,a),a&&L0(this,!1),this.Sf!==null&&this.Sf.Sl(),this.wd!==null)for(var y=this.wd.iterator;y.next();)y.value.Zb(a)},Yn.prototype.computeAdjusting=function(){return this.isAvoiding&&this.diagram!==null&&this.diagram.animationManager.defaultAnimation.isAnimating?gp:this.qk};function dp(a){var y=a.ef;if(y!==null){var x=a.uf;if(x!==null&&isNaN(a.curviness)){for(var E=a.ff,b=a.vf,z=a=null,tt=y.jb.s,rt=tt.length,ot=0;ot<rt;ot++){var lt=tt[ot];(lt.ef===y&&lt.ff===E&&lt.uf===x&&lt.vf===b||lt.ef===x&&lt.ff===b&&lt.uf===y&&lt.vf===E)&&(z===null?z=lt:(a===null&&(a=[],a.push(z)),a.push(lt)))}if(a!==null){for(z=Vy(y,x,E,b),z===null&&(z=new N0(y,E,x,b),jy(y,z),jy(x,z)),z.links=a,y=0;y<a.length;y++)a[y].Sf=z;z.Sl()}}}}function fp(a){var y=a.Sf;y!==null&&isNaN(a.curviness)&&(a.Sf=null,a=y.links.indexOf(a),0<=a&&(Ni(y.links,a),y.Sl()))}Yn.prototype.ph=function(){return!0},yn.Object.defineProperties(Yn.prototype,{fromNode:{get:function(){return this.ef},set:function(a){var y=this.ef;if(y!==a){var x=this.fromPort;y!==null&&(this.uf!==y&&S0(y,this,x),fp(this),this.C(2)),this.ef=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setFromNodeForLink(this,a,y);var b=this.fromPort,z=this.fromPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.uf!==a&&x0(a,this,b),dp(this),this.C(1)),this.g("fromNode",y,a),Fg(this)}}},fromPortId:{get:function(){return this.ff},set:function(a){var y=this.ff;if(y!==a){var x=this.fromPort;x!==null&&Ql(x),fp(this),this.ff=a;var E=this.fromPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.xv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.fromPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(this),this.g("fromPortId",y,a)}}},fromPort:{get:function(){var a=this.ef;return a===null?null:a.ns(this.ff)}},fromPortChanged:{get:function(){return this.gn},set:function(a){var y=this.gn;y!==a&&(this.gn=a,this.g("fromPortChanged",y,a))}},toNode:{get:function(){return this.uf},set:function(a){var y=this.uf;if(y!==a){var x=this.toPort;y!==null&&(this.ef!==y&&S0(y,this,x),fp(this),this.C(2)),this.uf=a,a!==null&&this.Zb(a.isVisible()),this.Wf=null,this.bb();var E=this.diagram;E!==null&&E.aa&&E.partManager.setToNodeForLink(this,a,y);var b=this.toPort,z=this.toPortChanged;if(z!==null){var tt=!0;E!==null&&(tt=E.aa,E.aa=!0),z(this,x,b),E!==null&&(E.aa=tt)}a!==null&&(this.ef!==a&&x0(a,this,b),dp(this),this.C(1)),this.g("toNode",y,a),Fg(this)}}},toPortId:{get:function(){return this.vf},set:function(a){var y=this.vf;if(y!==a){var x=this.toPort;x!==null&&Ql(x),fp(this),this.vf=a;var E=this.toPort;E!==null&&Ql(E);var b=this.diagram;if(b!==null){var z=this.data,tt=b.model;z!==null&&tt.ri()&&tt.Cv(z,a)}x!==E&&(this.Wf=null,this.bb(),z=this.toPortChanged,z!==null&&(tt=!0,b!==null&&(tt=b.aa,b.aa=!0),z(this,x,E),b!==null&&(b.aa=tt))),dp(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:Io},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&&Ql(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&&qn(a,">= 0",Yn,"fromEndSegmentLength"),this.Xc(),this.ba.Vi=a,this.g("fromEndSegmentLength",y,a),this.bb())}},fromShortLength:{get:function(){return this.ba!==null?this.ba.Wi:NaN},set:function(a){var y=this.fromShortLength;y!==a&&(this.Xc(),this.ba.Wi=a,this.qc(),this.g("fromShortLength",y,a))}},toSpot:{get:function(){return this.ba!==null?this.ba.yj:Io},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&&Ql(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&&qn(a,">= 0",Yn,"toEndSegmentLength"),this.Xc(),this.ba.wj=a,this.g("toEndSegmentLength",y,a),this.bb())}},toShortLength:{get:function(){return this.ba!==null?this.ba.xj:NaN},set:function(a){var y=this.toShortLength;y!==a&&(this.Xc(),this.ba.xj=a,this.qc(),this.g("toShortLength",y,a))}},isLabeledLink:{get:function(){return this.wd===null?!1:0<this.wd.count}},labelNodes:{get:function(){return this.wd===null?Tr: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&&cp(this.fromNode),this.toNode!==null&&cp(this.toNode))}},path:{get:function(){var a=this.Pb();return a instanceof Cr?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()===ql&&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),Be.Dl(b.x,b.y,E.x,E.y,E.x,E.y,z.x,z.y,.5,a)}else for(z=3;z<E;z+=3){var tt=this.i(z-2);z+3>=E&&(z=E-1);var rt=this.i(z-1),ot=this.i(z);Be.Dl(b.x,b.y,tt.x,tt.y,rt.x,rt.y,ot.x,ot.y,.5,a),y=Math.min(ot.x,y),x=Math.min(ot.y,x),b=ot}else for(b=this.i(0),z=this.i(1),y=Math.min(b.x,z.x),x=Math.min(b.y,z.y),a.h(b.x,b.y,0,0),a.Ye(z),b=2;b<E;b++)z=this.i(b),y=Math.min(z.x,y),x=Math.min(z.y,x),a.Ye(z);this.su.h(y-a.x,x-a.y)}return a}},midPoint:{get:function(){return this.vg(),this.computeMidPoint(new Ot)}},midAngle:{get:function(){return this.vg(),this.computeMidAngle()}},flattenedLengths:{get:function(){if(this.cq===null){this.fd||C0(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);Be.$(E.x,b.x)?(E=b.y-E.y,0>E&&(E=-E)):Be.$(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 ee,E=0;E<a.length/2;E++)b=new Ot(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(!Ye(z)||typeof z.x!="number"||isNaN(z.x)||typeof z.y!="number"||isNaN(z.y)){E=!1;break}}if(E)for(x=new ee,E=0;E<a.length;E++)b=a[E],x.add(new Ot(b.x,b.y).freeze())}}else if(a instanceof ee)for(x=a.copy(),a=x.iterator;a.next();)a.value.freeze();else se("Link.points value is not an instance of List or Array: "+a);x.freeze(),this.Nb=x,this.qc(),C0(this),a=this.diagram,a!==null&&(a.pi||a.undoManager.isUndoingRedoing||a.As.add(this),a.animationManager.zb&&ph(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||!Eg(this.computeSpot(!0))?1:0}},lastPickIndex:{get:function(){var a=this.pointsCount;return a===0?0:2>=a?a-1:this.isOrthogonal||!Eg(this.computeSpot(!1))?a-2:a-1}},adjusting:{get:function(){return this.qk},set:function(a){var y=this.qk;y!==a&&(this.qk=a,this.g("adjusting",y,a))}},corner:{get:function(){return this.Om},set:function(a){var y=this.Om;y!==a&&(this.Om=a,this.qc(),this.g("corner",y,a))}},curve:{get:function(){return this.Qm},set:function(a){var y=this.Qm;y!==a&&(this.Qm=a,this.bb(),this.qc(),L0(this,y===Bc||y===Lg||a===Bc||a===Lg),this.g("curve",y,a))}},curviness:{get:function(){return this.Rm},set:function(a){var y=this.Rm;y!==a&&(this.Rm=a,this.bb(),this.qc(),this.g("curviness",y,a))}},routing:{get:function(){return this.qj},set:function(a){var y=this.qj;y!==a&&(this.qj=a,this.Wf=null,this.bb(),L0(this,(y.value&2)===2||(a.value&2)===2),this.g("routing",y,a))}},smoothness:{get:function(){return this.po},set:function(a){var y=this.po;y!==a&&(this.po=a,this.qc(),this.g("smoothness",y,a))}},key:{get:function(){var a=this.diagram;if(a!==null&&a.model.ri())return a.model.Ac(this.data)}}}),Yn.prototype.invalidateOtherJumpOvers=Yn.prototype.Xo,Yn.prototype.findClosestSegment=Yn.prototype.ez,Yn.prototype.updateRoute=Yn.prototype.vg,Yn.prototype.invalidateRoute=Yn.prototype.bb,Yn.prototype.rollbackRoute=Yn.prototype.rv,Yn.prototype.commitRoute=Yn.prototype.zf,Yn.prototype.startRoute=Yn.prototype.uh,Yn.prototype.clearPoints=Yn.prototype.Fj,Yn.prototype.removePoint=Yn.prototype.pv,Yn.prototype.addPointAt=Yn.prototype.yf,Yn.prototype.addPoint=Yn.prototype.ne,Yn.prototype.insertPointAt=Yn.prototype.m,Yn.prototype.insertPoint=Yn.prototype.Kz,Yn.prototype.setPointAt=Yn.prototype.L,Yn.prototype.setPoint=Yn.prototype.dd,Yn.prototype.getPoint=Yn.prototype.i,Yn.prototype.getOtherPort=Yn.prototype.Cz,Yn.prototype.getOtherNode=Yn.prototype.To;var zf=null,Gf=null,dv=new Te(Yn,"Normal",1),Dw=new Te(Yn,"Orthogonal",2),Iw=new Te(Yn,"AvoidsNodes",6),o1=new Te(Yn,"AvoidsNodesStraight",7),Xa=new Te(Yn,"None",0),ql=new Te(Yn,"Bezier",9),Bc=new Te(Yn,"JumpGap",10),Lg=new Te(Yn,"JumpOver",11),gp=new Te(Yn,"End",17),M0=new Te(Yn,"Scale",18),b0=new Te(Yn,"Stretch",19),pp=new Te(Yn,"OrientAlong",21),mp=new Te(Yn,"OrientPlus90",22),vp=new Te(Yn,"OrientMinus90",23),fv=new Te(Yn,"OrientOpposite",24),k0=new Te(Yn,"OrientUpright",25),yp=new Te(Yn,"OrientPlus90Upright",26),wp=new Te(Yn,"OrientMinus90Upright",27),T0=new Te(Yn,"OrientUpright45",28),s1=16,a1=14,xp=8;Yn.className="Link",Yn.Normal=dv,Yn.Orthogonal=Dw,Yn.AvoidsNodes=Iw,Yn.AvoidsNodesStraight=o1,Yn.None=Xa,Yn.Bezier=ql,Yn.JumpGap=Bc,Yn.JumpOver=Lg,Yn.End=gp,Yn.Scale=M0,Yn.Stretch=b0,Yn.OrientAlong=pp,Yn.OrientPlus90=mp,Yn.OrientMinus90=vp,Yn.OrientOpposite=fv,Yn.OrientUpright=k0,Yn.OrientPlus90Upright=yp,Yn.OrientMinus90Upright=wp,Yn.OrientUpright45=T0,Yn.EndSegmentStep=8,Yn.CurvinessStart=s1,Yn.SpacingMin=a1,Yn.OrthoShortCut=xp;function N0(a,y,x,E){An(this),this.Fe=this.qq=!1,this.Ds=a,this.Ox=y,this.cv=x,this.Px=E,this.links=[]}N0.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},N0.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))}},N0.className="LinkBundle";function Sp(a){An(this),this.Yx=this.group=null,this.vs=!0,this.abort=!1,this.Od=this.Nd=1,this.Fn=this.En=-1,this.rc=a.width,this.sc=a.height,this.ac=null,this.ei=this.di=0,this.Os=11,this.Ix=this.Hx=22}Sp.prototype.initialize=function(a){if(!(0>=a.width||0>=a.height)){var y=a.y,x=a.x+a.width,E=a.y+a.height;if(this.Nd=Math.floor((a.x-this.rc)/this.rc)*this.rc,this.Od=Math.floor((y-this.sc)/this.sc)*this.sc,this.En=Math.ceil((x+2*this.rc)/this.rc)*this.rc,this.Fn=Math.ceil((E+2*this.sc)/this.sc)*this.sc,a=1+(Math.ceil((this.En-this.Nd)/this.rc)|0),y=1+(Math.ceil((this.Fn-this.Od)/this.sc)|0),this.ac===null||this.di<a-1||this.ei<y-1){for(x=[],E=0;E<=a;E++)x[E]=new Uint32Array(y);this.ac=x,this.di=a-1,this.ei=y-1}if(a=gv,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 Mg(a,y,x){return a.Nd<=y&&y<=a.En&&a.Od<=x&&x<=a.Fn}function ih(a,y,x){return Mg(a,y,x)?(y-=a.Nd,y/=a.rc,x-=a.Od,x/=a.sc,a.ac[y|0][x|0]):gv}function l1(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]>=ef&&(x[E]=gv)}Sp.prototype.Yj=function(a,y,x,E){if(a>this.En||a+x<this.Nd||y>this.Fn||y+E<this.Od)return!0;a=(a-this.Nd)/this.rc|0,y=(y-this.Od)/this.sc|0,x=Math.max(0,x)/this.rc+1|0;var b=Math.max(0,E)/this.sc+1|0;if(0>a&&(x+=a,a=0),0>y&&(b+=y,y=0),0>x||0>b)return!0;for(E=Math.min(a+x-1,this.di)|0,x=Math.min(y+b-1,this.ei)|0;a<=E;a++){b=this.ac[a];for(var z=y;z<=x;z++)if(b[z]===Cc)return!1}return!0};function rh(a,y,x,E,b,z,tt,rt,ot){if(!(y<z||y>tt||x<rt||x>ot)){var lt=y|0,ut=x|0,ft=a.ac[lt][ut];if(ft>=ef&&ft<bg)for(b?ut+=E:lt+=E,ft+=1;z<=lt&&lt<=tt&&rt<=ut&&ut<=ot&&!(ft>=a.ac[lt][ut]);)a.ac[lt][ut]=ft,ft+=1,b?ut+=E:lt+=E;if(lt=b?ut:lt,b)if(0<E)for(x+=E;x<lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(x+=E;x>lt;x+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else if(0<E)for(y+=E;y<lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot);else for(y+=E;y>lt;y+=E)rh(a,y,x,1,!b,z,tt,rt,ot),rh(a,y,x,-1,!b,z,tt,rt,ot)}}function D0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=ef;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)ut+=1,a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function I0(a,y,x,E,b,z,tt,rt,ot){y|=0,x|=0;var lt=Cc,ut=bg;for(a.ac[y][x]=ut;lt===Cc&&y>z&&y<tt&&x>rt&&x<ot;)a.ac[y][x]=ut,b?x+=E:y+=E,lt=a.ac[y][x]}function u1(a,y,x,E,b,z,tt){if(a.ac!==null){a.abort=!1;var rt=y.x,ot=y.y;if(Mg(a,rt,ot)){rt-=a.Nd,rt/=a.rc,ot-=a.Od,ot/=a.sc;var lt=E.x,ut=E.y;if(Mg(a,lt,ut))if(lt-=a.Nd,lt/=a.rc,ut-=a.Od,ut/=a.sc,1>=Math.abs(rt-lt)&&1>=Math.abs(ot-ut))a.abort=!0;else{var ft=z.x;E=z.y,y=z.x+z.width;var yt=z.y+z.height;ft-=a.Nd,ft/=a.rc,E-=a.Od,E/=a.sc,y-=a.Nd,y/=a.rc,yt-=a.Od,yt/=a.sc,z=Math.max(0,Math.min(a.di,ft|0)),y=Math.min(a.di,Math.max(0,y|0)),ft=Math.max(0,Math.min(a.ei,E|0)),yt=Math.min(a.ei,Math.max(0,yt|0)),E=a.ac,rt|=0,ot|=0,lt|=0,ut|=0;var Mt=x===0||x===90?1:-1;if(x=x===90||x===270,E[rt][ot]===Cc?(D0(a,rt,ot,Mt,x,z,y,ft,yt),D0(a,rt,ot,1,!x,z,y,ft,yt),D0(a,rt,ot,-1,!x,z,y,ft,yt)):D0(a,rt,ot,Mt,x,rt,ot,rt,ot),E[lt][ut]===Cc?(I0(a,lt,ut,b===0||b===90?1:-1,b===90||b===270,z,y,ft,yt),I0(a,lt,ut,1,!(b===90||b===270),z,y,ft,yt),I0(a,lt,ut,-1,!(b===90||b===270),z,y,ft,yt)):I0(a,lt,ut,Mt,x,lt,ut,lt,ut),x=li(),tt&&A1(a,lt,ut,b,rt,ot,x))for((x[0]!==lt||x[1]!==ut)&&(x.unshift(ut),x.unshift(lt)),(x[x.length-2]!==rt||x[x.length-1]!==ot)&&(x.push(rt),x.push(ot)),a=ef,b=x[x.length-2],tt=x[x.length-1],E[b][tt]=a++,z=x.length-4;0<=z;z-=2)for(b=x[z+2],tt=x[z+3],y=x[z],lt=x[z+1];y>b?b++:y<b?b--:lt>tt?tt++:lt<tt&&tt--,E[b][tt]=a++,b!==y||tt!==lt;);else rh(a,rt,ot,1,!1,z,y,ft,yt),rh(a,rt,ot,-1,!1,z,y,ft,yt),rh(a,rt,ot,1,!0,z,y,ft,yt),rh(a,rt,ot,-1,!0,z,y,ft,yt);ci(x)}}}}function A1(a,y,x,E,b,z,tt){for(var rt=a.ac,ot=y,lt=x;;){if(ot===b&&lt===z)return!0;var ut=ot,ft=lt;if(E===0)if(ut<b)ut++;else break;else if(E===90)if(ft<z)ft++;else break;else if(E===180)if(ut>b)ut--;else break;else if(ft>z)ft--;else break;var yt=rt[ut][ft];if(yt===0||yt===pv)break;ot=ut,lt=ft}for(;;){if(ut=E,ft=ot,yt=lt,E===0?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):E===90?ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--):E===180?yt<z?(ut=90,yt++):yt>z&&(ut=270,yt--):ft<b?(ut=0,ft++):ft>b&&(ut=180,ft--),ft=rt[ft][yt],ut!==E&&ft!==0&&ft!==pv){if(tt.push(ot),tt.push(lt),A1(a,ot,lt,ut,b,z,tt))return!0;tt.pop(),tt.pop()}if(rt[ot][lt]=pv,E===0){if(ot===y)return!1;ot--}else if(E===90){if(lt===x)return!1;lt--}else if(E===180){if(ot===y)return!1;ot++}else{if(lt===x)return!1;lt++}}}yn.Object.defineProperties(Sp.prototype,{bounds:{get:function(){return new Oe(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 Cc=0,ef=1,bg=999999,gv=bg+1,pv=bg+2;Sp.className="PositionArray";function jf(){An(this),this.port=this.node=null,this.pe=[],this.ap=!1}jf.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 Uw(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}jf.prototype.Sl=function(){this.pe.length=0};function h1(a,y){var x=a.pe;if(x.length===0){t:if(!a.ap){x=a.ap,a.ap=!0;var E=null,b=a.node,z=b instanceof mr?b:null;if(z===null||z.isSubGraphExpanded)var tt=b.isTreeExpanded?b.findLinksConnected(a.port.portId):b.qx();else{if(!z.actualBounds.w()){a.ap=x;break t}E=z,tt=E.Lu()}z=a.pe.length=0;var rt=a.port.ga(Qr,Ot.alloc()),ot=a.port.ga(lo,Ot.alloc());for(b=Oe.allocAt(rt.x,rt.y,0,0),b.Ye(ot),Ot.free(rt),Ot.free(ot),rt=Ot.allocAt(b.x+b.width/2,b.y+b.height/2),ot=a.port.li(),tt=tt.iterator;tt.next();){var lt=tt.value;if(lt.isVisible()&&lt.fromPort!==lt.toPort){var ut=lt.fromPort===a.port||lt.fromNode!==null&&lt.fromNode.Td(E),ft=lt.computeSpot(ut,a.port);if(ft.$c()&&(ut=ut?lt.toPort:lt.fromPort,ut!==null)){var yt=ut.part;if(yt!==null){var Mt=yt.findVisibleNode();Mt!==null&&Mt!==yt&&(yt=Mt,ut=yt.port),ut=lt.computeOtherPoint(yt,ut),yt=rt.ab(ut),yt-=ot,0>yt?yt+=360:360<=yt&&(yt-=360),ft=Uw(b,ft,yt,lt.isOrthogonal),ft===0?(ft=4,180<yt&&(yt-=360)):ft===90?(ft=8,270<yt&&(yt-=360)):ft===180?ft=2:(ft=1,90>yt&&(yt+=360)),Mt=a.pe[z],Mt===void 0?(Mt=new mv(lt,yt,ft),a.pe[z]=Mt):(Mt.link=lt,Mt.angle=yt,Mt.Nc=ft),Mt.hv.set(ut),z++}}}}for(Ot.free(rt),a.pe.sort(jf.prototype.j),ot=a.pe.length,E=-1,z=rt=0;z<ot;z++)tt=a.pe[z],tt!==void 0&&(tt.Nc!==E&&(E=tt.Nc,rt=0),tt.Uo=rt,rt++);for(E=-1,rt=0,z=ot-1;0<=z;z--)ot=a.pe[z],ot!==void 0&&(ot.Nc!==E&&(E=ot.Nc,rt=ot.Uo+1),ot.Gl=rt);if(z=a.pe,ft=a.port,E=a.node.portSpreading,rt=Ot.alloc(),ot=Ot.alloc(),tt=Ot.alloc(),lt=Ot.alloc(),ft.ga(Qr,rt),ft.ga(so,ot),ft.ga(lo,tt),ft.ga(gs,lt),Mt=yt=ut=ft=0,E===sv)for(var Tt=0;Tt<z.length;Tt++){var Dt=z[Tt];if(Dt!==null){var $t=Dt.link.computeThickness();switch(Dt.Nc){case 8:yt+=$t;break;case 2:Mt+=$t;break;case 1:ft+=$t;break;default:case 4:ut+=$t}}}var Vt=Tt=0,ae=1,ce=Dt=0;for($t=0;$t<z.length;$t++){var ge=z[$t];if(ge!==null){if(Tt!==ge.Nc){switch(Tt=ge.Nc,Tt){case 8:var we=tt;Vt=lt;break;case 2:we=lt,Vt=rt;break;case 1:we=rt,Vt=ot;break;default:case 4:we=ot,Vt=tt}switch(Dt=Vt.x-we.x,ce=Vt.y-we.y,Tt){case 8:yt>Math.abs(Dt)?(ae=Math.abs(Dt)/yt,yt=Math.abs(Dt)):ae=1;break;case 2:Mt>Math.abs(ce)?(ae=Math.abs(ce)/Mt,Mt=Math.abs(ce)):ae=1;break;case 1:ft>Math.abs(Dt)?(ae=Math.abs(Dt)/ft,ft=Math.abs(Dt)):ae=1;break;default:case 4:ut>Math.abs(ce)?(ae=Math.abs(ce)/ut,ut=Math.abs(ce)):ae=1}Vt=0}var He=ge.Zo;if(E===sv){switch(ge=ge.link.computeThickness(),ge*=ae,He.set(we),Tt){case 8:He.x=we.x+Dt/2+yt/2-Vt-ge/2;break;case 2:He.y=we.y+ce/2+Mt/2-Vt-ge/2;break;case 1:He.x=we.x+Dt/2-ft/2+Vt+ge/2;break;default:case 4:He.y=we.y+ce/2-ut/2+Vt+ge/2}Vt+=ge}else{var di=.5;E===B0&&(di=(ge.Uo+1)/(ge.Gl+1)),He.x=we.x+Dt*di,He.y=we.y+ce*di}}}for(Ot.free(rt),Ot.free(ot),Ot.free(tt),Ot.free(lt),we=a.pe,z=0;z<we.length;z++)E=we[z],E!==null&&(E.Ju=a.computeEndSegmentLength(E));a.ap=x,Oe.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}jf.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},jf.prototype.computeEndSegmentLength=function(a){var y=a.link,x=y.computeEndSegmentLength(this.node,this.port,pr,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)},jf.className="Knot";function mv(a,y,x){this.link=a,this.angle=y,this.Nc=x,this.hv=new Ot,this.Gl=this.Uo=0,this.Zo=new Ot,this.Ju=0}mv.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()},mv.className="LinkInfo";function Wo(a){An(this),this.o=this.H=null,this.Gh=this.sn=!0,this.yn=!1,this.Am=new Ot(0,0).freeze(),this.vn=!0,this.Em=this.un=null,this.xn=!1,this.j=null,a&&Object.assign(this,a)}Wo.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},Wo.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Wo.prototype.qb=function(){},Wo.prototype.toString=function(){var a=fi(this.constructor);return a+="(",this.group!==null&&(a+=" in "+this.group),this.diagram!==null&&(a+=" for "+this.diagram),a+")"},Wo.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())}}},Wo.prototype.createNetwork=function(){return new bo(this)},Wo.prototype.makeNetwork=function(a){var y=this.createNetwork();return a instanceof Re?(y.lg(a.nodes,!0),y.lg(a.links,!0)):a instanceof mr?y.lg(a.memberParts):y.lg(a.iterator),y},Wo.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")}},Wo.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()}},Wo.prototype.doLayout=function(a){var y=new xe;a instanceof Re?(ad(this,y,a.nodes,!0,this.rh,!0,!1,!0),ad(this,y,a.parts,!0,this.rh,!0,!1,!0)):a instanceof mr?ad(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},Wo.prototype.doMinimalNoNetworkLayout=function(a){var y=Math.ceil(Math.sqrt(a.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);var x=this.arrangementOrigin.x,E=x,b=this.arrangementOrigin.y,z=0,tt=0;for(a=a.iterator;a.next();){var rt=a.value;Bp(rt);var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(E,b),rt instanceof mr&&(rt.rh=!1),E+=Math.max(lt,50)+20,tt=Math.max(tt,Math.max(ot,50)),z>=y-1?(z=0,E=x,b+=tt+20,tt=0):z++}},Wo.prototype.doMinimalNetworkLayout=function(){var a=Math.ceil(Math.sqrt(this.network.vertexes.count));this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin);for(var y=this.arrangementOrigin.x,x=y,E=this.arrangementOrigin.y,b=0,z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value.node;if(!(rt===null||rt instanceof Yn)&&(Bp(rt),this.rh(rt))){var ot=rt.measuredBounds,lt=ot.width;ot=ot.height,rt.moveTo(x,E),rt instanceof mr&&(rt.rh=!1),x+=Math.max(lt,50)+20,z=Math.max(z,Math.max(ot,50)),b>=a-1?(b=0,x=y,E+=z+20,z=0):b++}}},Wo.prototype.rh=function(a){return!!(!a.location.w()||a instanceof mr&&a.rh)};function ad(a,y,x,E,b,z,tt,rt){for(x=x.iterator;x.next();){var ot=x.value;E&&!ot.isTopLevel||b!==null&&!b(ot)||!ot.canLayout()||(z&&ot instanceof gi?ot.isLinkLabel||(ot instanceof mr&&ot.layout===null?ad(a,y,ot.memberParts,!1,b,z,tt,rt):(Bp(ot),y.add(ot))):tt&&ot instanceof Yn?y.add(ot):!rt||!ot.Zc()||ot instanceof gi||(Bp(ot),y.add(ot)))}}function Bp(a){var y=a.actualBounds;(y.width===0||y.height===0||isNaN(y.width)||isNaN(y.height))&&a.Va()}Wo.prototype.ni=function(a,y){var x=this.boundsComputation;return x!==null?(y||(y=new Oe),x(a,this,y)):y?(y.set(a.actualBounds),y):a.actualBounds},Wo.prototype.ex=function(a){var y=new xe;return a instanceof Re?(ad(this,y,a.nodes,!0,null,!0,!0,!0),ad(this,y,a.links,!0,null,!0,!0,!0),ad(this,y,a.parts,!0,null,!0,!0,!0)):a instanceof mr?ad(this,y,a.memberParts,!1,null,!0,!0,!0):ad(this,y,a.iterator,!1,null,!0,!0,!0),y},Wo.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(Qr),(isNaN(x.x)||isNaN(x.y))&&x.set(a),a=y.padding,x.x+=a.left,x.y+=a.top),x}return a},yn.Object.defineProperties(Wo.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())}}}),Wo.prototype.collectParts=Wo.prototype.ex,Wo.prototype.getLayoutBounds=Wo.prototype.ni,Wo.prototype.invalidateLayout=Wo.prototype.C,Wo.className="Layout";function bo(a){An(this),this.Sc=a,this.wf=new xe,this.ye=new xe,this.Es=new ke,this.zs=new ke}bo.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 xe,this.ye=new xe,this.Es=new ke,this.zs=new ke},bo.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},bo.prototype.createVertex=function(){return new Gs(this)},bo.prototype.createEdge=function(){return new Ol(this)},bo.prototype.lg=function(a,y,x){if(a!==null){for(y===void 0&&(y=!1),x===void 0&&(x=null),x===null&&(x=function(tt){if(tt instanceof gi)return!tt.isLinkLabel;if(tt instanceof Yn){var rt=tt.fromNode;return rt===null||rt.isLinkLabel?!1:(tt=tt.toNode,!(tt===null||tt.isLinkLabel))}return!1}),a=a.iterator;a.next();){var E=a.value;if(E instanceof gi&&(!y||E.isTopLevel)&&E.canLayout()&&x(E)){if(E instanceof mr&&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 Yn&&(!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))}}},bo.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},kt=bo.prototype,kt.dh=function(a){if(a!==null){this.wf.add(a);var y=a.node;y!==null&&this.Es.add(y,a),a.network=this}},kt.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},kt.Iu=function(a){if(a!==null&&c1(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 c1(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}kt.Zy=function(a){a!==null&&(a=this.ki(a),a!==null&&this.Iu(a))},kt.ki=function(a){return a===null?null:this.Es.I(a)},kt.Bo=function(a){if(a!==null){vv(this,a);var y=a.toVertex;y!==null&&y.Cl(a),y=a.fromVertex,y!==null&&y.zl(a)}};function vv(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}}kt.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},kt.Mj=function(a){if(a!==null){var y=a.toVertex;y!==null&&y.Kl(a),y=a.fromVertex,y!==null&&y.Jl(a),yv(this,a)}};function yv(a,y){y!==null&&a.ye.remove(y)&&(y=y.link,y!==null&&a.zs.remove(y))}kt.Yy=function(a){a!==null&&(a=this.Lo(a),a!==null&&this.Mj(a))},kt.Lo=function(a){return a===null?null:this.zs.I(a)},kt.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},kt.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))}},kt.Ko=function(){for(var a=li(),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]);ci(a)},bo.prototype.deleteArtificialVertexes=function(){for(var a=li(),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=li(),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]);ci(a),ci(y)};function Qw(a){for(var y=li(),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]);ci(y)}bo.prototype.Zx=function(a){a===void 0&&(a=!0),a&&(this.deleteArtificialVertexes(),Qw(this),this.Ko()),a=new ee;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),wv(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 wv(a,y,x){if(x!==null&&x.network!==y){c1(a,x),y.dh(x);for(var E=x.sourceEdges;E.next();){var b=E.value;b.network!==y&&(yv(a,b),vv(y,b),wv(a,y,b.fromVertex))}for(E=x.destinationEdges;E.next();)x=E.value,x.network!==y&&(yv(a,x),vv(y,x),wv(a,y,x.toVertex))}}bo.prototype.dz=function(){for(var a=new xe,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},yn.Object.defineProperties(bo.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}}}),bo.prototype.findAllParts=bo.prototype.dz,bo.prototype.splitIntoSubNetworks=bo.prototype.Zx,bo.prototype.deleteSelfEdges=bo.prototype.Ko,bo.prototype.reverseEdge=bo.prototype.gm,bo.prototype.linkVertexes=bo.prototype.Zj,bo.prototype.findEdge=bo.prototype.Lo,bo.prototype.deleteLink=bo.prototype.Yy,bo.prototype.deleteEdge=bo.prototype.Mj,bo.prototype.addLink=bo.prototype.Dy,bo.prototype.addEdge=bo.prototype.Bo,bo.prototype.findVertex=bo.prototype.ki,bo.prototype.deleteNode=bo.prototype.Zy,bo.prototype.deleteVertex=bo.prototype.Iu,bo.prototype.addNode=bo.prototype.Bl,bo.prototype.addVertex=bo.prototype.dh,bo.prototype.addParts=bo.prototype.lg,bo.className="LayoutNetwork";function Gs(a){An(this),this.ob=a,this.j=new Oe(0,0,10,10).freeze(),this.o=new Ot(5,5).freeze(),this.Sh=this.ub=null,this.tg=new ee,this.mg=new ee}Gs.prototype.clear=function(){this.Sh=this.ub=null,this.tg=new ee,this.mg=new ee},Gs.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutVertex#"+ti(this);if(0<a&&(y+=this.node!==null?"("+this.node.toString()+")":"",1<a)){a="";for(var x=!0,E=this.tg.iterator;E.next();){var b=E.value;x?x=!1:a+=",",a+=b.toString(0)}for(b="",x=!0,E=this.mg.iterator;E.next();){var z=E.value;x?x=!1:b+=",",b+=z.toString(0)}y+=" sources: "+a+" destinations: "+b}return y},Gs.prototype.commit=function(){var a=this.ub;if(a!==null){var y=this.bounds,x=a.bounds;Ye(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 mr)){x=Oe.alloc(),a.Va();var E=this.network.layout.ni(a,x),b=a.locationObject.ga(cr);if(E.w()&&b.w()){a.moveTo(y.x+this.focusX-(b.x-E.x),y.y+this.focusY-(b.y-E.y)),Oe.free(x);return}Oe.free(x)}a.moveTo(y.x,y.y)}},Gs.prototype.Cl=function(a){a!==null&&(this.tg.contains(a)||this.tg.add(a))},Gs.prototype.Kl=function(a){a!==null&&this.tg.remove(a)},Gs.prototype.zl=function(a){a!==null&&(this.mg.contains(a)||this.mg.add(a))},Gs.prototype.Jl=function(a){a!==null&&this.mg.remove(a)};function xv(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}yn.Object.defineProperties(Gs.prototype,{sourceEdgesArrayAccess:{get:function(){return this.tg._dataArray}},destinationEdgesArrayAccess:{get:function(){return this.mg._dataArray}},data:{get:function(){return this.ub},set:function(a){if(this.ub=a,a!==null&&a.bounds){var y=a.bounds;a=y.x;var x=y.y,E=y.width;y=y.height,this.o.h(E/2,y/2),this.j.h(a,x,E,y)}}},node:{get:function(){return this.Sh},set:function(a){if(this.Sh!==a){this.Sh=a,a.Va();var y=this.network.layout,x=Oe.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),Oe.free(x),!(a instanceof mr)&&(a=a.locationObject.ga(cr),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 xe,y=this.sourceEdges;y.next();)a.add(y.value.fromVertex);return a.iterator}},destinationVertexes:{get:function(){for(var a=new xe,y=this.destinationEdges;y.next();)a.add(y.value.toVertex);return a.iterator}},vertexes:{get:function(){for(var a=new xe,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 ee,y=this.sourceEdges;y.next();)a.add(y.value);for(y=this.destinationEdges;y.next();)a.add(y.value);return a.iterator}},edgesCount:{get:function(){return this.tg.count+this.mg.count}}}),Gs.prototype.deleteDestinationEdge=Gs.prototype.Jl,Gs.prototype.addDestinationEdge=Gs.prototype.zl,Gs.prototype.deleteSourceEdge=Gs.prototype.Kl,Gs.prototype.addSourceEdge=Gs.prototype.Cl,Gs.className="LayoutVertex",Gs.standardComparer=xv,Gs.smartComparer=function(a,y){if(a!==null){if(y!==null){a=a.Sh;var x=y.Sh;if(a!==null){if(x!==null){for(y=a.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),a=x.text.toLocaleLowerCase().split(/([+-]?[.]?\d+(?:\.\d*)?(?:e[+-]?\d+)?)/),x=0;x<y.length;x++)if(a[x]!==""&&a[x]!==void 0){var E=parseFloat(y[x]),b=parseFloat(a[x]);if(isNaN(E))if(isNaN(b)){if(y[x].localeCompare(a[x])!==0)return y[x].localeCompare(a[x])}else return 1;else{if(isNaN(b))return-1;if(E-b!==0)return E-b}}else if(y[x]!=="")return 1;return a[x]!==""&&a[x]!==void 0?-1:0}return 1}return x!==null?-1:0}return 1}return y!==null?-1:0};function Ol(a){An(this),this.nb=a,this.qd=this.kd=this.$k=this.ub=null}Ol.prototype.clear=function(){this.qd=this.kd=this.$k=this.ub=null},Ol.prototype.toString=function(a){a===void 0&&(a=0);var y="LayoutEdge#"+ti(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},Ol.prototype.gm=function(){var a=this.kd;this.kd=this.qd,this.qd=a},Ol.prototype.commit=function(){},Ol.prototype.Ax=function(a){return this.qd===a?this.kd:this.kd===a?this.qd:null},yn.Object.defineProperties(Ol.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)}}}),Ol.prototype.getOtherVertex=Ol.prototype.Ax,Ol.className="LayoutEdge";function Aa(a){Wo.call(this),this.isViewportSized=!0,this.yo=this.zo=NaN,this.yg=new on(NaN,NaN).freeze(),this.tf=new on(10,10).freeze(),this.Jb=Cp,this.Rb=Q0,this.nd=Pp,this.hd=d1,a&&Object.assign(this,a)}Ge(Aa,Wo),Aa.prototype.cloneProtected=function(a){Wo.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},Aa.prototype.qb=function(a){a.classType===Aa?a===Pp||a===R0||a===Sv||a===O0?this.sorting=a:a===Q0||a===rA?this.arrangement=a:a===Cp||a===U0?this.alignment=a:se("Unknown enum value: "+a):Wo.prototype.qb.call(this,a)},Aa.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 mr)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 O0:b.reverse();break;case Pp:b.sort(this.comparer);break;case R0:b.sort(this.comparer),b.reverse()}var z=this.wrappingColumn;isNaN(z)&&(z=0);var tt=this.wrappingWidth;switch(isNaN(tt)&&a!==null?(y=a.padding,tt=Math.max(a.viewportBounds.width-y.left-y.right,0)):tt=Math.max(this.wrappingWidth,0),0>=z&&0>=tt&&(z=1),y=this.spacing.width,isFinite(y)||(y=0),x=this.spacing.height,isFinite(x)||(x=0),a!==null&&a.Ea("Layout"),E=[],this.alignment){case U0:var rt=y,ot=x,lt=Oe.alloc(),ut=Math.max(this.cellSize.width,1);if(!isFinite(ut))for(var ft=ut=0;ft<b.length;ft++){var yt=this.ni(b[ft],lt);ut=Math.max(ut,yt.width)}if(ut=Math.max(ut+rt,1),ft=Math.max(this.cellSize.height,1),!isFinite(ft))for(yt=ft=0;yt<b.length;yt++){var Mt=this.ni(b[yt],lt);ft=Math.max(ft,Mt.height)}ft=Math.max(ft+ot,1),yt=this.arrangement;for(var Tt=Mt=this.arrangementOrigin.x,Dt=this.arrangementOrigin.y,$t=0,Vt=0,ae=0;ae<b.length;ae++){var ce=b[ae],ge=this.ni(ce,lt),we=Math.ceil((ge.width+rt)/ut)*ut,He=Math.ceil((ge.height+ot)/ft)*ft;switch(yt){case rA:var di=Math.abs(Tt-ge.width);break;default:di=Tt+ge.width}switch((0<z&&$t>z-1||0<tt&&0<$t&&di-Mt>tt)&&(E.push(new Oe(0,Dt,tt+rt,Vt)),$t=0,Tt=Mt,Dt+=Vt,Vt=0),Vt=Math.max(Vt,He),yt){case rA:ge=-ge.width;break;default:ge=0}switch(ce.moveTo(Tt+ge,Dt),yt){case rA:Tt-=we;break;default:Tt+=we}$t++}E.push(new Oe(0,Dt,tt+rt,Vt)),Oe.free(lt);break;case Cp:for(ot=tt,ut=z,ft=y,yt=x,tt=Oe.alloc(),Mt=Math.max(this.cellSize.width,1),z=Dt=lt=0,rt=Ot.alloc(),Tt=0;Tt<b.length;Tt++)Vt=b[Tt],$t=this.ni(Vt,tt),Vt=wc(Vt,Vt.locationObject,Vt.locationSpot,rt),lt=Math.max(lt,Vt.x),Dt=Math.max(Dt,$t.width-Vt.x),z=Math.max(z,Vt.y);switch(Tt=this.arrangement,Tt){case rA:lt+=ft;break;default:Dt+=ft}Mt=isFinite(Mt)?Math.max(Mt+ft,1):Math.max(lt+Dt,1);var Pi=Vt=this.arrangementOrigin.x;for(ae=this.arrangementOrigin.y,Dt=0,ot>=lt&&(ot-=lt),lt=ce=0,we=Math.max(this.cellSize.height,1),ge=z=0,He=!0,$t=Ot.alloc(),di=0;di<b.length;di++){var wi=b[di],Gn=this.ni(wi,tt),wn=wc(wi,wi.locationObject,wi.locationSpot,rt);if(0<Dt)switch(Tt){case rA:Pi=(Pi-Vt-(Gn.width-wn.x))/Mt,Pi=Be.$(Math.round(Pi),Pi)?Math.round(Pi):Math.floor(Pi),Pi=Pi*Mt+Vt;break;default:Pi=(Pi-Vt+wn.x)/Mt,Pi=Be.$(Math.round(Pi),Pi)?Math.round(Pi):Math.ceil(Pi),Pi=Pi*Mt+Vt}else switch(Tt){case rA:ce=Pi+wn.x+Gn.width;break;default:ce=Pi-wn.x}switch(Tt){case rA:var fr=-(Pi+wn.x)+ce;break;default:fr=Pi+Gn.width-wn.x-ce}if(0<ut&&Dt>ut-1||0<ot&&0<Dt&&fr>ot){for(E.push(new Oe(0,He?ae-z:ae,ot+ft,ge+z+yt)),Pi=0;Pi<Dt&&di!==Dt;Pi++){fr=b[di-Dt+Pi];var rr=wc(fr,fr.locationObject,fr.locationSpot,$t);fr.moveTo(fr.position.x,fr.position.y+z-rr.y)}ge+=yt,ae=He?ae+ge:ae+(ge+z),Dt=ge=z=0,Pi=Vt,He=!1}switch(Pi===Vt&&(lt=Tt===rA?Math.max(lt,Gn.width-wn.x):Math.min(lt,-wn.x)),z=Math.max(z,wn.y),ge=Math.max(ge,Gn.height-wn.y),isFinite(we)&&(ge=Math.max(ge,Math.max(Gn.height,we)-wn.y)),He?wi.moveTo(Pi-wn.x,ae-wn.y):wi.moveTo(Pi-wn.x,ae),Tt){case rA:Pi-=wn.x+ft;break;default:Pi+=Gn.width-wn.x+ft}Dt++}if(E.push(new Oe(0,ae,ot+ft,(He?ge:ge+z)+yt)),b.length!==Dt)for(ot=0;ot<Dt;ot++)ut=b[b.length-Dt+ot],ft=wc(ut,ut.locationObject,ut.locationSpot,rt),ut.moveTo(ut.position.x,ut.position.y+z-ft.y);if(Ot.free(rt),Ot.free($t),Tt===rA)for(b=0;b<E.length;b++)z=E[b],z.width+=lt,z.x-=lt;else for(b=0;b<E.length;b++)z=E[b],z.x>lt&&(z.width+=z.x-lt,z.x=lt);Oe.free(tt)}for(rt=z=tt=b=0;rt<E.length;rt++)ot=E[rt],b=Math.min(b,ot.x),tt=Math.min(tt,ot.y),z=Math.max(z,ot.x+ot.width);this.arrangement===rA?this.commitLayers(E,new Ot(b+y/2-(z+b),tt-x/2)):this.commitLayers(E,new Ot(b-y/2,tt-x/2)),a!==null&&a.eb("Layout"),this.isValidLayout=!0}},Aa.prototype.commitLayers=function(){};function d1(a,y){return a=a.text,y=y.text,a<y?-1:a>y?1:0}yn.Object.defineProperties(Aa.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!==Cp&&a!==U0||(this.Jb=a,this.C())}},arrangement:{get:function(){return this.Rb},set:function(a){this.Rb===a||a!==Q0&&a!==rA||(this.Rb=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==Sv&&a!==O0&&a!==Pp&&a!==R0||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}}});var U0=new Te(Aa,"Position",0),Cp=new Te(Aa,"Location",1),Q0=new Te(Aa,"LeftToRight",2),rA=new Te(Aa,"RightToLeft",3),Sv=new Te(Aa,"Forward",4),O0=new Te(Aa,"Reverse",5),Pp=new Te(Aa,"Ascending",6),R0=new Te(Aa,"Descending",7);Aa.className="GridLayout",Aa.standardComparer=d1,Aa.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},Aa.Position=U0,Aa.Location=Cp,Aa.LeftToRight=Q0,Aa.RightToLeft=rA,Aa.Forward=Sv,Aa.Reverse=O0,Aa.Ascending=Pp,Aa.Descending=R0;function mo(){this.On=new xe,this.Dn=new xe,this.Pa=new xe,this.cf=new ke,this.bf=new ke,this.aj=new ke,this.H=null,this.tp=!1}kt=mo.prototype,kt.clear=function(){this.On.clear(),this.Dn.clear(),this.Pa.clear(),this.cf.clear(),this.bf.clear(),this.aj.clear()},kt.Xe=function(a){this.H=a},kt.oi=function(a){if(a instanceof gi){if(this.On.add(a),a instanceof mr){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 Yn?this.Dn.add(a):a instanceof ro||this.Pa.add(a);y=a.data,y===null||a instanceof ro||(a instanceof Yn?this.bf.add(y,a):this.cf.add(y,a))},kt.pc=function(a){if(a.Ej(),a instanceof gi){if(this.On.remove(a),a instanceof mr){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 Yn?this.Dn.remove(a):a instanceof ro||this.Pa.remove(a);y=a.data,y===null||a instanceof ro||(a instanceof Yn?this.bf.remove(y):this.cf.remove(y))},kt.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 mr)&&se('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 mr||se('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 Yn||se('Invalid link template in Diagram.linkTemplateMap: template for "'+E+'" must be a Link, not a normal Node or simple Part: '+x);for(y=li(),x=a.selection.iterator;x.next();)(E=x.value.data)&&y.push(E);for(x=li(),a=a.highlighteds.iterator;a.next();)(E=a.value.data)&&x.push(E);for(a=li(),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]);ci(y),ci(x),ci(a)}},mo.prototype.addAllModeledParts=function(){this.addModeledParts(this.diagram.model.nodeDataArray)},mo.prototype.addModeledParts=function(a,y){var x=this,E=this.diagram.model;a.forEach(function(b){E.lb(b)&&f1(x,b,!1)}),a.forEach(function(b){E.lb(b)&&x.resolveReferencesForData(b)}),y!==!1&&td(this.diagram,!1)};function f1(a,y,x){if(y!=null&&!a.diagram.undoManager.isUndoingRedoing&&!a.cf.contains(y)){x===void 0&&(x=!0);t:{if(y!=null&&!a.H.undoManager.isUndoingRedoing&&!a.cf.contains(y)){var E=a.Ro(y),b=g1(a,y,E);if(b!==null&&(yu(b),b=b.copy(),b!==null)){var z=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,b.Tf=E,b.ub=y,a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=z,E=b;break t}}E=null}E!==null&&x&&a.resolveReferencesForData(y)}}mo.prototype.insertLink=function(){return null},mo.prototype.resolveReferencesForData=function(){},mo.prototype.Ro=function(a){return this.H.model.Ro(a)};function g1(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&&(v1||(v1=!0,Zn('No Group template found for category "'+x+'"'),Zn(" Using default group template")),y=a.ly))):(y=a.nodeTemplateMap.I(x),y===null&&(y=a.nodeTemplateMap.I(""),y===null&&(m1||(m1=!0,Zn('No Node template found for category "'+x+'"'),Zn(" Using default node template")),y=a.ny))),y}mo.prototype.getLinkCategoryForData=function(){return""},mo.prototype.setLinkCategoryForData=function(){},mo.prototype.setFromNodeForLink=function(){},mo.prototype.setToNodeForLink=function(){},mo.prototype.findLinkTemplateForCategory=function(a){var y=this.H,x=y.linkTemplateMap.I(a);return x===null&&(x=y.linkTemplateMap.I(""),x===null&&(y1||(y1=!0,Zn('No Link template found for category "'+a+'"'),Zn(" Using default link template")),x=y.my)),x},mo.prototype.removeAllModeledParts=function(){this.Gs(this.diagram.model.nodeDataArray)},mo.prototype.Gs=function(a){var y=this;a.forEach(function(x){y.ip(x)})},mo.prototype.ip=function(a){a=this.Lc(a),a!==null&&(Pf(this.diagram,a,!1),this.unresolveReferencesForPart(a))},mo.prototype.unresolveReferencesForPart=function(){},mo.prototype.removeDataForLink=function(){},mo.prototype.findPartForKey=function(a){return a==null?null:(a=this.H.model.hc(a),a!==null?this.cf.I(a):null)},mo.prototype.Vb=function(a){return a==null||(a=this.H.model.hc(a),a===null)?null:(a=this.cf.I(a),a instanceof gi?a:null)},mo.prototype.findLinkForKey=function(){return null},kt=mo.prototype,kt.Lc=function(a){if(a===null)return null;var y=this.cf.I(a);return y!==null?y:y=this.bf.I(a)},kt.ii=function(a){return a===null?null:(a=this.cf.I(a),a instanceof gi?a:null)},kt.Kc=function(a){return a===null?null:this.bf.I(a)},kt.ms=function(a){for(var y=0;y<arguments.length;++y);y=new xe;for(var x=this.On.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ye(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator},kt.ls=function(a){for(var y=0;y<arguments.length;++y);y=new xe;for(var x=this.Dn.iterator;x.next();){var E=x.value,b=E.data;if(b!==null)for(var z=0;z<arguments.length;z++){var tt=arguments[z];if(Ye(tt)&&Bv(this,b,tt)){y.add(E);break}}}return y.iterator};function Bv(a,y,x){for(var E in x){var b=y[E],z=x[E];if(Dn(z)){if(!Dn(b)||b.length<z.length)return!1;for(var tt=0;tt<b.length;tt++){var rt=z[tt];if(rt!==void 0&&!p1(a,b[tt],rt))return!1}}else if(!p1(a,b,z))return!1}return!0}function p1(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(Ye(y)&&Ye(x)){if(!Bv(a,y,x))return!1}else if(y!==x)return!1;return!0}mo.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===Qo){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===as){var tt=a.newValue;E==="nodeDataArray"&&Ye(tt)&&f1(this,tt),y.isModified=!0}else if(x===ms){var rt=a.oldValue;E==="nodeDataArray"&&Ye(rt)&&this.ip(rt),y.isModified=!0}else x===oa&&(E==="SourceChanged"?a.object!==null?this.updateDataBindings(a.object,a.propertyName):(this.rp(),this.updateAllTargetBindings()):E==="ModelDisplaced"&&this.Wd());else if(x===Qo){var ot=a.propertyName,lt=a.object;lt===y.model?(ot==="nodeKeyProperty"||ot==="nodeCategoryProperty")&&(y.undoManager.isUndoingRedoing||this.Wd()):this.updateDataBindings(lt,ot),y.isModified=!0}else if(x===as||x===ms){var ut=a.change===as,ft=ut?a.newParam:a.oldParam,yt=ut?a.newValue:a.oldValue,Mt=this.aj.I(a.object);if(Array.isArray(Mt))for(a=0;a<Mt.length;a++){var Tt=Mt[a];if(ut)r0(Tt,yt,ft,!0);else if(!(0>ft)){var Dt=ft+sp(Tt);Tt.pc(Dt,!0),Qm(Tt,Dt,ft)}}y.isModified=!0}}finally{y.aa=!0}}}}},mo.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)},mo.prototype.rp=function(){for(var a=this.H.model,y=new xe,x=a.nodeDataArray,E=0;E<x.length;E++)y.add(x[E]);var b=[];for(this.nodes.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),this.parts.each(function(tt){tt.data===null||y.contains(tt.data)||b.push(tt.data)}),b.forEach(function(tt){L1(a,tt,!1)}),E=0;E<x.length;E++){var z=x[E];this.Lc(z)===null&&E1(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()},mo.prototype.refreshDataBoundLinks=function(){},mo.prototype.updateRelationshipsFromData=function(){},mo.prototype.updateDataBindings=function(a,y){if(typeof y=="string"){var x=this.Lc(a);if(x!==null)x.La(y);else{x=null;for(var E=this.aj.iterator;E.next();){for(var b=E.value,z=0;z<b.length;z++){var tt=b[z].sx(a);tt!==null&&(x===null&&(x=li()),x.push(tt))}if(x!==null)break}if(x!==null){for(E=0;E<x.length;E++)x[E].La(y);ci(x)}}a===this.diagram.model.modelData&&this.updateAllTargetBindings(y)}};function Cv(a,y){var x=y.Hh;if(Dn(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 Pv(a,y,x){Ru(y,function(tt){tt=tt.O.s;for(var rt=tt.length,ot=0;ot<rt;ot++)Rd(x,tt[ot])});var E=y.Hh;if(Dn(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}}}}mo.prototype.Kj=function(a,y,x){x===void 0&&(x=!1);var E=new ke;if(Dn(a))for(var b=0;b<a.length;b++)H0(this,a[b],y,E,x);else for(a=a.iterator;a.next();)H0(this,a.value,y,E,x);if(y!==null){x=y.model,a=y.toolManager.findTool("Dragging"),a=a!==null?a.dragOptions.dragsLink:y.Wm.dragsLink,b=new xe;for(var z=new ke,tt=E.iterator;tt.next();){var rt=tt.value;if(rt instanceof Yn)a||rt.fromNode!==null&&rt.toNode!==null||b.add(rt);else if(rt instanceof gi&&rt.data!==null&&x.Tl()){var ot=rt;rt=tt.key;var lt=rt.pg();lt!==null&&(lt=E.I(lt),lt!==null?(x.qe(ot.data,x.wa(lt.data)),ot=y.Kc(ot.data),rt=rt.kh(),rt!==null&&ot!==null&&z.add(rt,ot)):x.qe(ot.data,void 0))}}if(0<b.count&&y.Is(b,!1),0<z.count)for(x=z.iterator;x.next();)E.add(x.key,x.value)}if(y!==null&&this.H!==null&&(y=y.model,x=y.afterCopyFunction,x!==null)){var ut=new ke;E.each(function(ft){ft.key.data!==null&&ut.add(ft.key.data,ft.value.data)}),x(ut,y,this.H.model)}for(y=E.iterator;y.next();)y.value.La();return E};function H0(a,y,x,E,b){if(y===null||b&&!y.canCopy())return null;if(E.contains(y))return E.I(y);var z=a.copyPartData(y,x);if(!(z instanceof Zi))return null;if(z.isSelected=!1,z.isHighlighted=!1,E.add(y,z),y instanceof gi){for(var tt=y.linksConnected;tt.next();){var rt=tt.value;if(rt.fromNode===y){var ot=E.I(rt);ot!==null&&(ot.fromNode=z)}rt.toNode===y&&(rt=E.I(rt),rt!==null&&(rt.toNode=z))}if(y instanceof mr&&z instanceof mr)for(y=y.memberParts;y.next();)tt=H0(a,y.value,x,E,b),tt instanceof Yn||tt===null||(tt.containingGroup=z)}else if(y instanceof Yn&&z instanceof Yn)for(tt=y.fromNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.fromNode=tt)),tt=y.toNode,tt!==null&&(tt=E.I(tt),tt!==null&&(z.toNode=tt)),y=y.labelNodes;y.next();)tt=H0(a,y.value,x,E,b),tt!==null&&tt instanceof gi&&(tt.labeledLink=z);return z}mo.prototype.copyPartData=function(a,y){var x=null,E=a.data;if(E!==null&&y!==null){var b=y.model;a instanceof Yn||(E=b.copyNodeData(E),Ye(E)&&(b.xf(E),x=y.Lc(E)))}else yu(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 Yn||(b=y.copyNodeData(E)),Ye(b)&&(x.data=b)));return x},yn.Object.defineProperties(mo.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}}}),mo.prototype.updateAllRelationshipsFromData=mo.prototype.rp,mo.prototype.findLinksByExample=mo.prototype.ls,mo.prototype.findNodesByExample=mo.prototype.ms,mo.prototype.findLinkForData=mo.prototype.Kc,mo.prototype.findNodeForData=mo.prototype.ii,mo.prototype.findPartForData=mo.prototype.Lc,mo.prototype.findNodeForKey=mo.prototype.Vb,mo.prototype.removeModeledPart=mo.prototype.ip,mo.prototype.removeModeledParts=mo.prototype.Gs,mo.prototype.rebuildParts=mo.prototype.Wd;var m1=!1,v1=!1,y1=!1;mo.className="PartManager";function qs(a){mo.apply(this,arguments)}Ge(qs,mo),qs.prototype.addAllModeledParts=function(){var a=this.diagram.model;this.addModeledParts(a.nodeDataArray),w1(this,a.linkDataArray)},qs.prototype.addModeledParts=function(a){for(mo.prototype.addModeledParts.call(this,a,!1),a=this.links.iterator;a.next();)Fg(a.value);td(this.diagram,!1)};function w1(a,y){y.forEach(function(x){x1(a,x)}),td(a.diagram,!1)}function x1(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){yu(E);var b=E.copy();if(b!==null){E=a.diagram.skipsModelSourceBindings,a.diagram.skipsModelSourceBindings=!0,b.Tf=x,b.ub=y,x=a.diagram.model;var z=G0(x,y,!0);z!==""&&(b.fromPortId=z),z=tu(x,y,!0),z!==void 0&&(z=a.Vb(z),z instanceof gi&&(b.fromNode=z)),z=G0(x,y,!1),z!==""&&(b.toPortId=z),z=tu(x,y,!1),z!==void 0&&(z=a.Vb(z),z instanceof gi&&(b.toNode=z)),x=x.Ef(y),Array.isArray(x)&&x.forEach(function(tt){tt=a.Vb(tt),tt!==null&&(tt.labeledLink=b)}),a.tp&&(b.Jg="Tool"),a.diagram.add(b),b.ub=null,b.data=y,a.diagram.skipsModelSourceBindings=E}}}}qs.prototype.removeAllModeledParts=function(){var a=this.diagram.model;S1(this,a.linkDataArray),this.Gs(a.nodeDataArray)};function S1(a,y){y.forEach(function(x){a.ip(x)})}qs.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ps(a)},qs.prototype.setLinkCategoryForData=function(a,y){return this.diagram.model.lp(a,y)},qs.prototype.setFromNodeForLink=function(a,y){var x=this.diagram.model;x.wv(a.data,x.wa(y!==null?y.data:null))},qs.prototype.setToNodeForLink=function(a,y){var x=this.diagram.model;x.Bv(a.data,x.wa(y!==null?y.data:null))},qs.prototype.removeDataForLink=function(a){this.diagram.model.bm(a.data)},qs.prototype.findPartForKey=function(a){var y=mo.prototype.findPartForKey.call(this,a);return y===null&&(a=this.diagram.model.jh(a),a!==null)?this.bf.I(a):y},qs.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.jh(a),a!==null?this.bf.I(a):null)},qs.prototype.doModelChanged=function(a){var y=this;if(mo.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===Qo){if(b==="linkFromKey"){var z=this.Kc(a.object);if(z!==null){var tt=this.Vb(a.newValue);z.fromNode=tt}}else if(b==="linkToKey"){var rt=this.Kc(a.object);if(rt!==null){var ot=this.Vb(a.newValue);rt.toNode=ot}}else if(b==="linkFromPortId"){var lt=this.Kc(a.object);if(lt!==null){var ut=a.newValue;typeof ut=="string"&&(lt.fromPortId=ut)}}else if(b==="linkToPortId"){var ft=this.Kc(a.object);if(ft!==null){var yt=a.newValue;typeof yt=="string"&&(ft.toPortId=yt)}}else if(b==="nodeGroupKey"){var Mt=this.Lc(a.object);if(Mt!==null){var Tt=a.newValue;if(Tt!==void 0){var Dt=this.Vb(Tt);Dt instanceof mr?Mt.containingGroup=Dt:Mt.containingGroup=null}else Mt.containingGroup=null}}else if(b==="linkLabelKeys"){var $t=this.Kc(a.object);if($t!==null){var Vt=a.oldValue,ae=a.newValue;Array.isArray(Vt)&&Vt.forEach(function(wn){0<=ae.indexOf(wn)||(wn=y.Vb(wn),wn!==null&&(wn.labeledLink=null))}),Array.isArray(ae)&&ae.forEach(function(wn){wn=y.Vb(wn),wn!==null&&(wn.labeledLink=$t)})}}else if(b==="linkCategory"){var ce=this.Kc(a.object),ge=a.newValue;ce!==null&&typeof ge=="string"&&(ce.category=ge)}else b==="linkDataArray"&&(S1(this,a.oldValue),w1(this,a.newValue));x.isModified=!0}else if(E===as){var we=a.newValue;if(b==="linkDataArray"&&typeof we=="object"&&we!==null)x1(this,we);else if(b==="linkLabelKeys"&&ud(we)){var He=this.Kc(a.object),di=this.Vb(we);He!==null&&di!==null&&(di.labeledLink=He)}x.isModified=!0}else if(E===ms){var Pi=a.oldValue;if(b==="linkDataArray"&&typeof Pi=="object"&&Pi!==null)this.ip(Pi);else if(b==="linkLabelKeys"&&ud(Pi)){var wi=this.Vb(Pi);wi!==null&&(wi.labeledLink=null)}x.isModified=!0}}else if(E===Qo){var Gn=a.propertyName;a.object!==x.model||Gn!=="linkFromKeyProperty"&&Gn!=="linkToKeyProperty"&&Gn!=="linkFromPortIdProperty"&&Gn!=="linkToPortIdProperty"&&Gn!=="linkLabelKeysProperty"&&Gn!=="nodeIsGroupProperty"&&Gn!=="nodeGroupKeyProperty"&&Gn!=="linkCategoryProperty"||x.undoManager.isUndoingRedoing||this.Wd(),x.isModified=!0}}finally{x.aa=!0}}}}},qs.prototype.refreshDataBoundLinks=function(){var a=this,y=this.diagram.model,x=new xe,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){D1(y,z,!1)}),E.forEach(function(z){a.Kc(z)===null&&N1(y,z,!1)})},qs.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 Yn){var b=tu(E,y,!0);if(b=x.Vb(b),a.fromNode=b,b=tu(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 xe().addAll(y);var tt=new xe;a.labelNodes.each(function(rt){rt.data!==null&&(rt=E.wa(rt.data),rt!==void 0&&tt.add(rt))}),y=tt.copy(),y.hp(b),b=b.copy(),b.hp(tt),(0<y.count||0<b.count)&&(y.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink===a&&(rt.labeledLink=null)}),b.each(function(rt){rt=x.Vb(rt),rt!==null&&rt.labeledLink!==a&&(rt.labeledLink=a)}))}}else!(a instanceof ro)&&(y=E.lh(y),y=x.findPartForKey(y),y===null||y instanceof mr)&&(a.containingGroup=y)}}},qs.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(y,x),b=this.Lc(a);if(E!==null&&b!==null){E=E.iterator;for(var z={};E.next();){var tt=E.value;y.lb(tt)?b instanceof mr&&y.lh(tt)===x&&(tt=this.Lc(tt),tt!==null&&(tt.containingGroup=b)):(z.link=this.Kc(tt),z.link!==null&&b instanceof gi&&(tu(y,tt,!0)===x&&(z.link.fromNode=b),tu(y,tt,!1)===x&&(z.link.toNode=b),tt=y.Ef(tt),Array.isArray(tt)&&tt.some(function(rt){return function(ot){return ot===x?(b.labeledLink=rt.link,!0):!1}}(z)))),z={link:z.link}}sA(y,x)}a=y.lh(a),a!==void 0&&(a=this.Vb(a),a instanceof mr&&(b.containingGroup=a))}},qs.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof gi){var x=y.wa(a.data);if(x!==void 0){for(var E=a.linksConnected;E.next();)oA(y,x,E.value.data);if(a.isLinkLabel&&(E=a.labeledLink,E!==null&&oA(y,x,E.data)),a instanceof mr)for(a=a.memberParts;a.next();)E=a.value.data,y.lb(E)&&oA(y,x,E)}}},qs.prototype.copyPartData=function(a,y){var x=mo.prototype.copyPartData.call(this,a,y);if(a instanceof Yn)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},qs.prototype.insertLink=function(a,y,x,E){var b=this.diagram,z=b.model,tt=b.toolManager.findTool("Linking"),rt="";if(a!==null&&(y===null&&(y=a),rt=y.portId,rt===null&&(rt="")),y="",x!==null&&(E===null&&(E=x),y=E.portId,y===null&&(y="")),E=tt.archetypeLinkData,E instanceof Yn){if(yu(E),z=E.copy(),z!==null)return z.fromNode=a,z.fromPortId=rt,z.toNode=x,z.toPortId=y,b.add(z),a=tt.archetypeLabelNodeData,a instanceof gi&&(yu(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&&Tg(z,E,z.wa(a.data),!0),Ng(z,E,rt,!0),x!==null&&Tg(z,E,z.wa(x.data),!1),Ng(z,E,y,!1),z.fi(E),a=tt.archetypeLabelNodeData,a===null||a instanceof gi||(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},qs.prototype.findLinkForKey=qs.prototype.findLinkForKey,qs.prototype.findPartForKey=qs.prototype.findPartForKey,qs.prototype.removeAllModeledParts=qs.prototype.removeAllModeledParts,qs.prototype.addModeledParts=qs.prototype.addModeledParts,qs.prototype.addAllModeledParts=qs.prototype.addAllModeledParts,qs.className="GraphLinksPartManager";function uu(){mo.apply(this,arguments),this.Sg=null}Ge(uu,mo);function _0(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||!Ma(E,b,z,null,!0))&&(y=a.getLinkCategoryForData(x.data),E=a.findLinkTemplateForCategory(y),E!==null&&(yu(E),E=E.copy(),E!==null))){var tt=a.diagram.skipsModelSourceBindings;a.diagram.skipsModelSourceBindings=!0,E.Tf=y,E.ub=x.data,E.fromNode=b,E.toNode=z,a.diagram.add(E),E.ub=null,E.data=x.data,a.diagram.skipsModelSourceBindings=tt}}}uu.prototype.getLinkCategoryForData=function(a){return this.diagram.model.ss(a)},uu.prototype.setLinkCategoryForData=function(a,y){this.diagram.model.Ms(a,y)},uu.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}},uu.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))},uu.prototype.removeDataForLink=function(a){this.diagram.model.qe(a.data,void 0)},uu.prototype.findLinkForKey=function(a){return a==null?null:(a=this.diagram.model.hc(a),a!==null?this.bf.I(a):null)},uu.prototype.doModelChanged=function(a){if(mo.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===Qo){if(E==="nodeParentKey"){var b=a.object,z=this.Vb(a.newValue),tt=this.ii(b);if(this.Sg!==null)z!==null&&(this.Sg.data=b,this.Sg.category=this.getLinkCategoryForData(b));else if(tt!==null){var rt=tt.kh();rt!==null?z===null?y.remove(rt):y.isTreePathToChildren?rt.fromNode=z:rt.toNode=z:_0(this,z,tt)}}else if(E==="parentLinkCategory"){var ot=this.ii(a.object),lt=a.newValue;if(ot!==null&&typeof lt=="string"){var ut=ot.kh();ut!==null&&(ut.category=lt)}}y.isModified=!0}}else if(x===Qo){var ft=a.propertyName;a.object===y.model&&ft==="nodeParentKeyProperty"&&(y.undoManager.isUndoingRedoing||this.Wd()),y.isModified=!0}}finally{y.aa=!0}}}}},uu.prototype.updateRelationshipsFromData=function(a){var y=a.data;if(y!==null){var x=a.diagram;if(x!==null){var E=x.model;a instanceof gi&&(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:_0(this,y,a):E!==null&&Pf(x,E,!1)))}}},uu.prototype.updateDataBindings=function(a,y){mo.prototype.updateDataBindings.call(this,a,y),typeof y=="string"&&this.Lc(a)!==null&&(a=this.Kc(a),a!==null&&a.La(y))},uu.prototype.resolveReferencesForData=function(a){var y=this.diagram.model,x=y.wa(a);if(x!==void 0){var E=Fp(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 gi&&y.mh(z)===x&&_0(this,b,this.ii(z))}sA(y,x)}a=y.mh(a),a!==void 0&&b instanceof gi&&(a=this.Vb(a),_0(this,a,b))}},uu.prototype.unresolveReferencesForPart=function(a){var y=this.diagram.model;if(a instanceof gi){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(ms,"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)&&oA(y,x,b)}},uu.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},uu.prototype.findLinkForKey=uu.prototype.findLinkForKey,uu.className="TreePartManager";function Oi(a,y){this.kl=new xe,this.il=new xe,this.Wv=`,
"insertedNodeKeys": `,this.jy=`,
"modifiedNodeData": `,this.Yv=`,
"removedNodeKeys": `,this.vh=null,An(this),this.Sm=this.xa="",this.Gg=!1,this.j={},this.Tc=[],this.kb=new ke,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 ke,this.Lt=new ee,this.Wg=!1,this.o=null,this.undoManager=new Vo,a!==void 0&&(Dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Oi.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},Oi.prototype.copy=function(){var a=new this.constructor;return this.cloneProtected(a),a},Oi.prototype.clear=function(){this.Tc=[],this.kb.clear(),this.Vf.clear(),this.undoManager.clear()},Oi.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)+":"+Fn(b)}}return y},Oi.prototype.xA=function(a){a.change!==oa&&se("Model.toIncrementalData argument is not a Transaction ChangedEvent:"+a.toString());var y=a.object;return a.isTransactionFinished&&y instanceof Ts?(C1(this,y),a=this.Qv(y,a.propertyName==="FinishedUndo"),this.vh=null,a):null},Oi.prototype.Qv=function(a,y){var x=this,E=!1,b=new xe,z=new xe,tt=new xe,rt=this.vh;a.changes.each(function(ft){ft.model===x&&(ft.modelChange==="nodeDataArray"?ft.change===as?b.add(ft.newValue):ft.change===ms&&tt.add(ft.oldValue):x.lb(ft.object)?z.add(ft.object):ft.change!==Qo||x.modelData!==ft.object&&ft.propertyName!=="modelData"?ft.object!==null&&(rt&&rt.contains(ft.object)?rt.get(ft.object).each(function(yt){x.lb(yt)&&z.add(yt)}):ft.object instanceof Oi||x.ri()&&x.Jc(ft.object)||P1(x,ft.object).each(function(yt){z.add(yt)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ft){ot.add(x.wa(ft)),y||z.add(ft)});var lt=this.kl;lt.clear(),tt.each(function(ft){lt.add(x.wa(ft)),y&&z.add(ft)}),a=x.cloneDeep(z.Fa());var ut=null;return E&&(ut===null&&(ut={}),ut.modelData=this.cloneDeep(this.modelData)),0<ot.count&&(ut===null&&(ut={}),y?ut.removedNodeKeys=ot.Fa():ut.insertedNodeKeys=ot.Fa()),0<a.length&&(ut===null&&(ut={}),ut.modifiedNodeData=a),0<lt.count&&(ut===null&&(ut={}),y?ut.insertedNodeKeys=lt.Fa():ut.removedNodeKeys=lt.Fa()),lt.clear(),ot.clear(),ut},Oi.prototype.cloneDeep=function(a){return kg(this,a,!0)};function kg(a,y,x,E,b,z){function tt(ft,yt){rt?(ft.__gohashid===void 0&&z.push(ft),E.set(ft,yt)):(ft=Bi++,E.set(ft,yt),b.set(ft,y))}if(!Ye(y))return y;z||(z=[]);var rt=Object.isExtensible(y);if(E||(E=new ke),rt){var ot=E.get(y);if(ot)return ot}else for(b||(b=new ke),ot=b.iterator;ot.next();){var lt=ot.key;if(ot.value===y&&(lt=E.get(lt)))return lt}if(Array.isArray(y)){ot=[],tt(y,ot);for(var ut=0;ut<y.length;ut++)ot.push(kg(a,y[ut],!1,E,b,z))}else if(y instanceof Ot||y instanceof on||y instanceof Oe||y instanceof wr||y instanceof Ci)ot=y.copy(),tt(y,ot);else{if(y instanceof ho||y instanceof Hn||y instanceof Te)return y;if(y instanceof ee)ot=new ee().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof xe)ot=new xe().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof ke)ot=new ke().addAll(kg(a,y.Fa(),!1,E,b,z)),tt(y,ot);else if(y instanceof Date)ot=new Date(y.getTime()),tt(y,ot);else if(y instanceof RegExp)ot=new RegExp(y),tt(y,ot),ot.lastIndex=y.lastIndex;else if(typeof y.copy=="function")ot=y.copy(),tt(y,ot);else for(ut in ot={},tt(y,ot),y)ut!=="__gohashid"&&(ot[ut]=kg(a,y[ut],!1,E,b,z))}return x&&z.forEach(function(ft){delete ft.__gohashid}),ot}kt=Oi.prototype,kt.quote=function(a){return JSON.stringify(a).replace(/[\u007F-\uFFFF]/g,function(y){return"\\u"+("0000"+y.charCodeAt(0).toString(16)).substr(-4)})},kt.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},kt.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 B1(a,y){y=y.modelData,Ye(y)&&(a.dm(y),a.modelData=y)}kt.Rv=function(){var a=this.modelData,y=!1,x;for(x in a)if(!F1(x,a[x])){y=!0;break}return a="",y&&(a=`,
"modelData": `+Fv(this,this.modelData)),a+`,
"nodeDataArray": `+ld(this,this.nodeDataArray,!0)},kt.kv=function(a){B1(this,a),a=a.nodeDataArray,Dn(a)&&(this.dm(a),this.nodeDataArray=a)};function C1(a,y){function x(b,z){if((z=z.part)&&(z=z.data,b!==z)){var tt=E.get(b);tt===null?(tt=new xe,tt.add(z),E.add(b,tt)):tt.add(z)}}var E=a.vh;E===null&&(E=new ke,y.changes.each(function(b){if(b.diagram!==null){var z=b.change;z===Qo?(b=b.object.panel)&&(z=b.data)&&x(z,b):(z===as||z===ms)&&(b=b.object,(z=b.itemArray)&&x(z,b))}}),a.vh=E)}function P1(a,y){for(var x=new xe,E=0;E<a.nodeDataArray.length;E++){var b=a.nodeDataArray[E];K0(a,y,b,b,x)}return x}function K0(a,y,x,E,b){if(Array.isArray(x))for(var z=0;z<x.length;z++){var tt=x[z];if(tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}else if(Ye(x)&&Object.getPrototypeOf(x)===Object.prototype)for(z in x){if(tt=x[z],tt===y)return b.add(E),!0;if(K0(a,y,tt,E,b))return!0}return!1}kt.Pv=function(a,y){var x=this,E=!1,b=new xe,z=new xe,tt=new xe,rt=this.vh;a.changes.each(function(ut){ut.model===x&&(ut.modelChange==="nodeDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ms&&tt.add(ut.oldValue):x.lb(ut.object)?z.add(ut.object):ut.change!==Qo||x.modelData!==ut.object&&ut.propertyName!=="modelData"?ut.object!==null&&(rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){x.lb(ft)&&z.add(ft)}):ut.object instanceof Oi||x.ri()&&x.Jc(ut.object)||P1(x,ut.object).each(function(ft){z.add(ft)})):E=!0)});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(x.wa(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(x.wa(ut)),y&&z.add(ut)}),a="",E&&(a+=`,
"modelData": `+Fv(this,this.modelData)),0<ot.count&&(a+=(y?this.Yv:this.Wv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.jy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Wv:this.Yv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},kt.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)&&se("applyIncrementalJson cannot change Model properties"),B1(this,a);var y=a.insertedNodeKeys,x=a.modifiedNodeData,E=new ke;if(Array.isArray(x))for(var b=0;b<x.length;b++){var z=x[b],tt=this.wa(z);tt!=null&&E.set(tt,z)}if(Array.isArray(y))for(b=y.length,z=0;z<b;z++){tt=y[z];var rt=this.hc(tt);rt===null&&(rt=(rt=E.get(tt))?rt:this.copyNodeData({}),this.km(rt,tt),this.xf(rt))}if(Array.isArray(x)){for(y=x.length,E=0;E<y;E++)if(b=x[E],z=this.wa(b),z=this.hc(z),z!==null){for(var ot in b)ot==="__gohashid"||ot===this.nodeKeyProperty||this.Wj()&&ot===this.nodeIsGroupProperty||this.setDataProperty(z,ot,b[ot]);this.lm(b,z)}}if(a=a.removedNodeKeys,Array.isArray(a))for(x=a.length,ot=0;ot<x;ot++)y=this.hc(a[ot]),y!==null&&this.cm(y)},kt.$x=function(a,y){a.change!==oa&&se("Model.toIncrementalJson argument is not a Transaction ChangedEvent:"+a.toString());var x=a.object;return a.isTransactionFinished&&x instanceof Ts?(y===void 0&&(y=Ep(this,this)),C1(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 }'},kt.yA=function(a,y){return this.$x(a,y)},kt.np=function(a){return a===void 0&&(a=Ep(this,this)),'{ "class": '+this.quote(a)+this.rm()+this.Rv()+"}"},kt.toJSON=function(a){return this.np(a)},kt.Zw=function(a){var y=null;if(typeof a=="string")try{y=ln.JSON.parse(a)}catch(E){}else typeof a=="object"?y=a:se("Unable to modify a Model from: "+a);var x=y.incremental;typeof x!="number"&&se("Unable to apply non-incremental changes to Model: "+a),x!==0&&(this.Ea("applyIncrementalJson"),this.fp(y),this.eb("applyIncrementalJson"))},kt.Ky=function(a){return this.Zw(a)},Oi.constructGraphLinksModel=function(){return new Oi},kt=Oi.prototype,kt.dm=function(a){if(Dn(a))for(var y=a.length,x=0;x<y;x++){var E=a[x];if(Ye(E)){var b=x;E=this.dm(E),Array.isArray(a)?a[b]=E:se("Cannot replace an object in an HTMLCollection or NodeList at "+b)}}else if(Ye(a)){for(y in a)if(x=a[y],Ye(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 ee,E=0;E<x.length/2;E++)b.add(new Ot(x[2*E],x[2*E+1]));b.freeze(),a[y]=b}}return Ow(a)}return a},kt.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()):Dn(a)?ld(this,a):Ye(a)?Fv(this,a):typeof a=="function"?"null":a.toString()};function ld(a,y,x){x===void 0&&(x=!1);var E=y.length;if(0>=E)return"[]";var b=new er;b.add("["),x&&1<E&&b.add(`
`);for(var z=0;z<E;z++){var tt=y[z];tt!==void 0&&(0<z&&(b.add(","),x&&b.add(`
`)),b.add(a.sm(tt)))}return x&&1<E&&b.add(`
`),b.add("]"),b.toString()}function F1(a,y){return y===void 0||a==="__gohashid"||a[0]==="_"||typeof y=="function"}function Ja(a){return isNaN(a)?"NaN":a===1/0?"9e9999":a===-1/0?"-9e9999":a}function Fv(a,y){var x=y;if(x instanceof Ot)y={class:"go.Point",x:Ja(x.x),y:Ja(x.y)};else if(x instanceof on)y={class:"go.Size",width:Ja(x.width),height:Ja(x.height)};else if(x instanceof Oe)y={class:"go.Rect",x:Ja(x.x),y:Ja(x.y),width:Ja(x.width),height:Ja(x.height)};else if(x instanceof wr)y={class:"go.Margin",top:Ja(x.top),right:Ja(x.right),bottom:Ja(x.bottom),left:Ja(x.left)};else if(x instanceof Ci)x.sb()?y={class:"go.Spot",x:Ja(x.x),y:Ja(x.y),offsetX:Ja(x.offsetX),offsetY:Ja(x.offsetY)}:y={class:"go.Spot",enum:x.toString()};else if(x instanceof ho){if(y={class:"go.Brush",type:x.type.name},x.type===Gr?y.color=x.color:(x.type===xr||x.type===br)&&(y.start=x.start,y.end=x.end,x.type===br&&(x.startRadius!==0&&(y.startRadius=Ja(x.startRadius)),isNaN(x.endRadius)||(y.endRadius=Ja(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 Hn?(y={class:"go.Geometry",type:x.type.name},x.startX!==0&&(y.startX=Ja(x.startX)),x.startY!==0&&(y.startY=Ja(x.startY)),x.endX!==0&&(y.endX=Ja(x.endX)),x.endY!==0&&(y.endY=Ja(x.endY)),x.spot1.D(Qr)||(y.spot1=x.spot1),x.spot2.D(lo)||(y.spot2=x.spot2),x.type===Hn.o&&(y.path=Hn.ia(x))):x instanceof Te&&(y={class:"go.EnumValue",classType:Ep(a,x.classType),name:x.name});E="{",x=!0;for(var b in y){var z=Bs(y,b);if(!F1(b,z))if(x?x=!1:E+=",",E+=a.quote(b)+":",b==="points"&&z instanceof ee){var tt="[";for(z=z.iterator;z.next();){var rt=z.value;1<tt.length&&(tt+=","),tt+=a.sm(rt.x),tt+=",",tt+=a.sm(rt.y)}tt+="]",E+=tt}else E+=a.sm(z)}return E+"}"}function $a(a){return typeof a=="number"?a:a==="NaN"?NaN:a==="9e9999"?1/0:a==="-9e9999"?-1/0:parseFloat(a)}function Ow(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 Ot($a(a.x),$a(a.y));else if(y==="Size")x=new on($a(a.width),$a(a.height));else if(y==="Rect")x=new Oe($a(a.x),$a(a.y),$a(a.width),$a(a.height));else if(y==="Margin")x=new wr($a(a.top),$a(a.right),$a(a.bottom),$a(a.left));else if(y==="Spot")typeof a.enum=="string"?x=Ro(a.enum):x=new Ci($a(a.x),$a(a.y),$a(a.offsetX),$a(a.offsetY));else if(y==="Brush"){if(x=new ho,x.type=xi(ho,a.type),typeof a.color=="string"&&(x.color=a.color),a.start instanceof Ci&&(x.start=a.start),a.end instanceof Ci&&(x.end=a.end),typeof a.startRadius=="number"&&(x.startRadius=$a(a.startRadius)),typeof a.endRadius=="number"&&(x.endRadius=$a(a.endRadius)),a=a.colorStops,Ye(a))for(var E in a)x.addColorStop(parseFloat(E),a[E])}else y==="Geometry"?(x=null,typeof a.path=="string"?x=Hn.parse(a.path):x=new Hn,x.type=xi(Hn,a.type),typeof a.startX=="number"&&(x.startX=$a(a.startX)),typeof a.startY=="number"&&(x.startY=$a(a.startY)),typeof a.endX=="number"&&(x.endX=$a(a.endX)),typeof a.endY=="number"&&(x.endY=$a(a.endY)),a.spot1 instanceof Ci&&(x.spot1=a.spot1),a.spot2 instanceof Ci&&(x.spot2=a.spot2)):y==="EnumValue"&&(E=a.classType,E.indexOf("go.")===0&&(E=E.substr(3)),E=Lv(E),typeof E=="function"&&(x=xi(E,a.name)));return x}kt.Pe=function(a){return this.Lt.add(a),this},kt.ik=function(a){this.Lt.remove(a)},kt.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)},kt.cb=function(a,y,x,E,b,z,tt){Us(this,"",a,y,x,E,b,z,tt)},kt.g=function(a,y,x,E,b){Us(this,"",Qo,a,this,y,x,E,b)},kt.Fs=function(a,y,x,E,b,z){Us(this,"",Qo,y,a,x,E,b,z)};function Us(a,y,x,E,b,z,tt,rt,ot){rt===void 0&&(rt=null),ot===void 0&&(ot=null);var lt=new Ho;lt.model=a,lt.change=x,lt.modelChange=y,lt.propertyName=E,lt.object=b,lt.oldValue=z,lt.oldParam=rt,lt.newValue=tt,lt.newParam=ot,a.ds(lt)}Oi.prototype.changeState=function(a,y){if(a!==null&&a.model===this)if(a.change===Qo){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)),jo(x,E,b)}else a.change===as?(x=a.newParam,a.modelChange==="nodeDataArray"?(a=a.newValue,Ye(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]===a&&Ni(this.Tc,x),E!==void 0&&this.kb.remove(E)):(this.Tc[x]!==a&&ki(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)))):a.modelChange===""?((E=a.object)&&!Dn(E)&&a.propertyName&&(E=Bs(a.object,a.propertyName)),Dn(E)&&typeof x=="number"&&(a=a.newValue,y?Ni(E,x):ki(E,x,a))):se("unknown ChangedEvent.Insert modelChange: "+a.toString())):a.change===ms?(x=a.oldParam,a.modelChange==="nodeDataArray"?(a=a.oldValue,Ye(a)&&typeof x=="number"&&(E=this.wa(a),y?(this.Tc[x]!==a&&ki(this.Tc,x,a),E!==void 0&&this.kb.add(E,a)):(this.Tc[x]===a&&Ni(this.Tc,x),E!==void 0&&this.kb.remove(E)))):a.modelChange===""?((E=a.object)&&!Dn(E)&&a.propertyName&&(E=Bs(a.object,a.propertyName)),Dn(E)&&typeof x=="number"&&(a=a.oldValue,y?ki(E,x,a):Ni(E,x))):se("unknown ChangedEvent.Remove modelChange: "+a.toString())):a.change!==oa&&se("unknown ChangedEvent: "+a.toString())},Oi.prototype.Ea=function(a){return this.undoManager.Ea(a)},Oi.prototype.eb=function(a){return this.undoManager.eb(a)},Oi.prototype.Kf=function(){return this.undoManager.Kf()},Oi.prototype.commit=function(a,y){y===void 0&&(y="");var x=this.skipsUndoManager;y===null&&(this.skipsUndoManager=!0,y=""),this.undoManager.Ea(y);var E=!1;try{a(this),E=!0}finally{E?this.undoManager.eb(y):this.undoManager.Kf(),this.skipsUndoManager=x}},kt=Oi.prototype,kt.La=function(a,y){y===void 0&&(y=""),Us(this,"SourceChanged",oa,y,a,null,null)},kt.wa=function(a){if(a!==null){var y=this.Th;if(y!==""&&(y=Bs(a,y),y!==void 0)){if(ud(y))return y;se("Key value for node data "+a+" is not a number or a string: "+y)}}},kt.km=function(a,y){if(a!==null){var x=this.Th;if(x!=="")if(this.lb(a)){var E=Bs(a,x);E!==y&&this.hc(y)===null&&(jo(a,x,y),E!==void 0&&this.kb.remove(E),this.kb.add(y,a),Us(this,"nodeKey",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x),this.jp(E,y))}else jo(a,x,y)}};function ud(a){return typeof a=="number"||typeof a=="string"}kt.lb=function(a){var y=this.wa(a);return y===void 0?!1:this.kb.I(y)===a},kt.hc=function(a){return a===null&&se("Model.findNodeDataForKey:key must not be null"),a!==void 0&&ud(a)?this.kb.I(a):null},kt.$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))){jo(a,y,x);return}if(typeof x=="string"){for(E=2;this.kb.contains(x+E);)E++;jo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.kb.count-1;this.kb.contains(x);)x--;jo(a,y,x)}}}}},kt.xf=function(a){a!==null&&(ui(a),this.lb(a)||E1(this,a,!0))};function E1(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&&se("Model.makeNodeDataKeyUnique failed on "+y+". Data not added to Model."),a.kb.add(E,y),E=null,x&&(E=a.Tc.length,ki(a.Tc,E,y)),Us(a,"nodeDataArray",as,"nodeDataArray",a,null,y,null,E),a.fm(y),a.em(y))}kt.Fy=function(a){if(Dn(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)},kt.cm=function(a){a!==null&&L1(this,a,!0)};function L1(a,y,x){var E=a.wa(y);if(E!==void 0&&a.kb.remove(E),E=null,x){t:if(x=a.Tc,Array.isArray(x))E=x.indexOf(y);else{E=x.length;for(var b=0;b<E;b++)if(x[b]===y){E=b;break t}E=-1}if(0>E)return;Ni(a.Tc,E)}Us(a,"nodeDataArray",ms,"nodeDataArray",a,y,null,E,null),a.qp(y)}kt.nA=function(a){if(Dn(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)},kt.$z=function(a){if(a!==this.nodeDataArray&&Dn(a)){var y=this.kl;y.clear(),y.addAll(this.kb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.wa(z);if(tt!==void 0){x.add(tt);var rt=this.hc(tt);rt!==z&&(rt!==null?(this.Do(rt,z),this.lm(z,rt)):(z=this.cloneDeep(z),this.km(z,tt),this.xf(z)))}else tt=this.cloneDeep(z),this.xf(tt),x.add(this.wa(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.hc(E))&&this.cm(E);y.clear(),x.clear()}},kt.jp=function(a,y){y!==void 0&&(a=Fp(this,a),a instanceof xe&&this.Vf.add(y,a))},kt.Lv=function(){},kt.fm=function(){},kt.em=function(){},kt.qp=function(){};function oA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E===null&&(E=new xe,a.Vf.add(y,E)),E.add(x)}}function sA(a,y,x){if(y!==void 0){var E=a.Vf.I(y);E instanceof xe&&(x==null?a.Vf.remove(y):(E.remove(x),E.count===0&&a.Vf.remove(y)))}}function Fp(a,y){return y===void 0?null:(a=a.Vf.I(y),a instanceof xe?a:null)}kt.Qy=function(a){a===void 0?this.Vf.clear():this.Vf.remove(a)},Oi.prototype.copyNodeData=function(a){if(a===null)return null;var y=this.Bk;return a=y!==null?y(a,this):z0(this,a,!0),Ye(a)&&An(a),a};function z0(a,y,x){if(a.copiesArrays&&Array.isArray(y)){var E=[];for(x=0;x<y.length;x++){var b=z0(a,y[x],a.copiesArrayObjects);E.push(b)}return An(E),E}if(x&&Ye(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=Bs(y,E),tt=Ep(a,z);tt==="GraphObject"||tt==="Diagram"||tt==="Layer"||tt==="RowColumnDefinition"||tt==="AnimationManager"||tt==="Tool"||tt==="CommandHandler"||tt==="Layout"||tt==="InputEvent"||tt==="DiagramEvent"||z instanceof Oi||z instanceof Vo||z instanceof Ts||z instanceof Ho||(z=z0(a,z,!1)),jo(x,E,z)}return An(x),x}return y instanceof Ot||y instanceof on||y instanceof Oe||y instanceof Ci||y instanceof wr?y.copy():y}Oi.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!M1&&a instanceof Se&&(M1=!0,Zn('Model.setDataProperty is modifying a GraphObject, "'+a.toString()+'"'),Zn(" Is that really your intent?"));var E=Bs(a,y);E!==x&&(jo(a,y,x),this.Fs(a,y,E,x))},kt=Oi.prototype,kt.set=function(a,y,x){this.setDataProperty(a,y,x)},kt.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])}},kt.Ay=function(a,y){this.ts(a,-1,y)},kt.ts=function(a,y,x){0>y&&(y=a.length),ki(a,y,x),Us(this,"",as,"",a,null,x,null,y)},kt.ov=function(a,y){y===void 0&&(y=-1),a===this.Tc&&se("Model.removeArrayItem should not be called on the Model.nodeDataArray"),y===-1&&(y=a.length-1);var x=a[y];Ni(a,y),Us(this,"",ms,"",a,x,null,y,null)},kt.Ro=function(a){if(a===null)return"";var y=this.lj;if(y===""||(y=Bs(a,y),y===void 0))return"";if(typeof y=="string")return y;se("getCategoryForNodeData found a non-string category for "+a+": "+y)},kt.jm=function(a,y){if(a!==null){var x=this.lj;if(x!=="")if(this.lb(a)){var E=Bs(a,x);E===void 0&&(E=""),E!==y&&(jo(a,x,y),Us(this,"nodeCategory",Qo,x,a,E,y))}else jo(a,x,y)}},kt.lm=function(a,y){this.jm(y,this.Ro(a))},kt.Tl=function(){return!1},kt.Wj=function(){return!1},kt.ri=function(){return!1},kt.xs=function(){return!1},kt.Xj=function(){return!1};function Ev(){return new Oi}function Ep(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 Ep(a,y.constructor);return typeof y}function Lv(a){return Ku[a]?Ku[a]:ln.go!==void 0&&ln.go[a]?ln.go[a]:null}function Bs(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 jo(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){}}yn.Object.defineProperties(Oi.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===""&&se("Model.nodeKeyProperty may not be the empty string"),0<this.kb.count&&se("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];Ye(b)||se("Model.nodeDataArray must only contain Objects, not: "+b),ui(b)}for(this.Tc=a,E=new ee,b=0;b<x;b++){var z=a[b],tt=this.wa(z);tt===void 0||this.kb.I(tt)!==null?E.add(z):this.kb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.$u(b),z=this.wa(b),z!==void 0&&this.kb.add(z,b);for(Us(this,"nodeDataArray",Qo,"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"}}}),Oi.prototype.setCategoryForNodeData=Oi.prototype.jm,Oi.prototype.getCategoryForNodeData=Oi.prototype.Ro,Oi.prototype.removeArrayItem=Oi.prototype.ov,Oi.prototype.insertArrayItem=Oi.prototype.ts,Oi.prototype.addArrayItem=Oi.prototype.Ay,Oi.prototype.assignAllDataProperties=Oi.prototype.Do,Oi.prototype.set=Oi.prototype.set,Oi.prototype.clearUnresolvedReferences=Oi.prototype.Qy,Oi.prototype.mergeNodeDataArray=Oi.prototype.$z,Oi.prototype.removeNodeDataCollection=Oi.prototype.nA,Oi.prototype.removeNodeData=Oi.prototype.cm,Oi.prototype.addNodeDataCollection=Oi.prototype.Fy,Oi.prototype.addNodeData=Oi.prototype.xf,Oi.prototype.makeNodeDataKeyUnique=Oi.prototype.$u,Oi.prototype.findNodeDataForKey=Oi.prototype.hc,Oi.prototype.containsNodeData=Oi.prototype.lb,Oi.prototype.setKeyForNodeData=Oi.prototype.km,Oi.prototype.getKeyForNodeData=Oi.prototype.wa,Oi.prototype.updateTargetBindings=Oi.prototype.La,Oi.prototype.commit=Oi.prototype.commit,Oi.prototype.rollbackTransaction=Oi.prototype.Kf,Oi.prototype.commitTransaction=Oi.prototype.eb,Oi.prototype.startTransaction=Oi.prototype.Ea,Oi.prototype.raiseDataChanged=Oi.prototype.Fs,Oi.prototype.raiseChanged=Oi.prototype.g,Oi.prototype.raiseChangedEvent=Oi.prototype.cb,Oi.prototype.removeChangedListener=Oi.prototype.ik,Oi.prototype.addChangedListener=Oi.prototype.Pe,Oi.prototype.writeJsonValue=Oi.prototype.sm,Oi.prototype.replaceJsonObjects=Oi.prototype.dm,Oi.prototype.applyIncrementalJSON=Oi.prototype.Ky,Oi.prototype.applyIncrementalJson=Oi.prototype.Zw,Oi.prototype.toJSON=Oi.prototype.toJSON,Oi.prototype.toJson=Oi.prototype.np,Oi.prototype.toIncrementalJSON=Oi.prototype.yA,Oi.prototype.toIncrementalJson=Oi.prototype.$x,Oi.prototype.toIncrementalData=Oi.prototype.xA,Oi.prototype.clear=Oi.prototype.clear;var M1=!1,Ku={};Oi.className="Model",Oi.fromJSON=Oi.fromJson=function(a,y){y===void 0&&(y=null);var x=null;if(typeof a=="string")try{x=ln.JSON.parse(a)}catch(z){}else typeof a=="object"?x=a:se("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=Lv(E)):(b=Lv(E),b===null&&(b=ln[E])),typeof b=="function"&&(a=new b)}catch(z){}a===null||a instanceof Oi?y=a:se("Unable to construct a Model of declared class: "+x.class)}return y===null&&(y=Oi.constructGraphLinksModel()),y.gp(x),y.kv(x),y},Oi.safePropertyValue=Bs,Oi.safePropertySet=jo,Ku.Brush=ho,Ku.ChangedEvent=Ho,Ku.Geometry=Hn,Ku.Margin=wr,Ku.Panel=En,Ku.Point=Ot,Ku.Rect=Oe,Ku.Size=on,Ku.Spot=Ci,Ku.Transaction=Ts,Ku.UndoManager=Vo;function Ms(a,y,x,E){An(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=k1,this.wk=null):(this.el=Lp,this.wk=E),this.st=new xe}Ms.prototype.copy=function(){var a=new Ms;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},kt=Ms.prototype,kt.qb=function(a){a.classType===Ms&&(this.mode=a)},kt.toString=function(){return"Binding("+this.targetProperty+":"+this.sourceProperty+(this.Ai!==-1?" "+this.Ai:"")+" "+this.mode.name+")"},kt.freeze=function(){return this._isFrozen=!0,this},kt.ka=function(){return this._isFrozen=!1,this},kt.Kx=function(a){return a===void 0&&(a=null),this.mode=Lp,this.backConverter=a,this},kt.cp=function(a){return a===void 0&&(a=""),this.sourceName=a,this.isToModel=!1,this},kt.dA=function(){return this.sourceName=null,this.isToModel=!0,this};function b1(a,y,x){return a=a.sourceName,a===null||a===""?y:a==="/"?x.part:a==="."?x:a===".."?x.panel:y.fb(a)}kt.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==="")Zn("Binding error: target property is the empty string: "+this.toString());else{var z=y;if(E!==""&&(z=Bs(y,E)),z!==void 0)if(b===null)x!==""&&jo(a,x,z);else try{if(x!==""){var tt=b(z,a);jo(a,x,tt)}else b(z,a)}catch(rt){}}}},kt.sp=function(a,y,x,E){if(this.el===Lp){var b=this.xl;if(x===void 0||b===x){x=this.sl;var z=this.wk,tt=a;if(b!==""&&(tt=Bs(a,b)),tt!==void 0&&!this.st.contains(a))try{this.st.add(a);var rt=E!==null?E.diagram:null,ot=rt!==null?rt.model:null;if(z===null){if(x!=="")ot!==null?ot.setDataProperty(y,x,tt):jo(y,x,tt);else if(ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var lt=E.itemIndex,ut=E.panel.itemArray;ot.ov(ut,lt),ot.ts(ut,lt,tt)}}else try{if(x!==""){var ft=z(tt,y,ot);ot!==null?ot.setDataProperty(y,x,ft):jo(y,x,ft)}else{var yt=z(tt,y,ot);if(yt!==void 0&&ot!==null&&E!==null&&0<=E.itemIndex&&E.panel!==null&&Array.isArray(E.panel.itemArray)){var Mt=E.itemIndex,Tt=E.panel.itemArray;ot.ov(Tt,Mt),ot.ts(Tt,Mt,yt)}}}catch(Dt){}}finally{this.st.remove(a)}}}},yn.Object.defineProperties(Ms.prototype,{Ai:{get:function(){return this.j},set:function(a){this._isFrozen&&De(this),this.j=a}},targetProperty:{get:function(){return this.xl},set:function(a){this._isFrozen&&De(this),this.xl=a}},sourceName:{get:function(){return this.Cr},set:function(a){this._isFrozen&&De(this),this.Cr=a,a!==null&&(this.wn=!1)}},isToModel:{get:function(){return this.wn},set:function(a){this._isFrozen&&De(this),this.wn=a}},sourceProperty:{get:function(){return this.sl},set:function(a){this._isFrozen&&De(this),this.sl=a}},converter:{get:function(){return this.Im},set:function(a){this._isFrozen&&De(this),this.Im=a}},backConverter:{get:function(){return this.wk},set:function(a){this._isFrozen&&De(this),this.wk=a}},mode:{get:function(){return this.el},set:function(a){this._isFrozen&&De(this),this.el=a}}}),Ms.prototype.updateSource=Ms.prototype.sp,Ms.prototype.updateTarget=Ms.prototype.Mv,Ms.prototype.ofModel=Ms.prototype.dA,Ms.prototype.ofObject=Ms.prototype.cp,Ms.prototype.makeTwoWay=Ms.prototype.Kx;var Rw="Binding",k1=new Te(Ms,"OneWay",1),Lp=new Te(Ms,"TwoWay",2);Ms.className="Binding",Ms.parseEnum=function(a,y){return function(x){return x=xi(a,x),x===null?y:x}},Ms.toString=Fn,Ms.OneWay=k1,Ms.TwoWay=Lp;function Vr(a,y,x){Oi.call(this),this.Vv=`,
"insertedLinkKeys": `,this.iy=`,
"modifiedLinkData": `,this.Xv=`,
"removedLinkKeys": `,this.md=[],this.$f=new xe,this.wb=new ke,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&&(Dn(a)?this.nodeDataArray=a:x=a),x&&(Object.assign(this,x),a=x.Changed)&&(delete this.Changed,this.Pe(a))}Ge(Vr,Oi),Vr.constructGraphLinksModel=Oi.constructGraphLinksModel,Vr.prototype.cloneProtected=function(a){Oi.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},kt=Vr.prototype,kt.clear=function(){Oi.prototype.clear.call(this),this.md=[],this.wb.clear(),this.$f.clear()},kt.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)+":"+Fn(b)}for(y+=`
link data:`,a=this.linkDataArray,x=a.length,E=0;E<x;E++)b=a[E],y+=" "+tu(this,b,!0)+"-->"+tu(this,b,!1)}return y},kt.Qv=function(a,y){this.linkKeyProperty===""&&se("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalData() to succeed.");var x=Oi.prototype.Qv.call(this,a,y),E=this,b=new xe,z=new xe,tt=new xe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ms&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Oi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=E.cloneDeep(z.Fa()),0<ot.count&&(x===null&&(x={}),y?x.removedLinkKeys=ot.Fa():x.insertedLinkKeys=ot.Fa()),0<a.length&&(x===null&&(x={}),x.modifiedLinkData=a),0<lt.count&&(x===null&&(x={}),y?x.insertedLinkKeys=lt.Fa():x.removedLinkKeys=lt.Fa()),lt.clear(),ot.clear(),x},kt.rm=function(){var a=Oi.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},kt.gp=function(a){Oi.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)},kt.Rv=function(){var a=Oi.prototype.Rv.call(this),y=`,
"linkDataArray": `+ld(this,this.linkDataArray,!0);return a+y},kt.kv=function(a){Oi.prototype.kv.call(this,a),a=a.linkDataArray,Array.isArray(a)&&(this.dm(a),this.linkDataArray=a)};function T1(a,y){for(var x=new xe,E=0;E<a.linkDataArray.length;E++){var b=a.linkDataArray[E];K0(a,y,b,b,x)}return x}kt.Pv=function(a,y){this.linkKeyProperty===""&&se("GraphLinksModel.linkKeyProperty must not be an empty string for .toIncrementalJson() to succeed.");var x=Oi.prototype.Pv.call(this,a,y),E=this,b=new xe,z=new xe,tt=new xe,rt=this.vh;a.changes.each(function(ut){ut.model===E&&(ut.modelChange==="linkDataArray"?ut.change===as?b.add(ut.newValue):ut.change===ms&&tt.add(ut.oldValue):E.Jc(ut.object)?z.add(ut.object):ut.object!==null&&(ut.object!==null&&rt&&rt.contains(ut.object)?rt.get(ut.object).each(function(ft){E.Jc(ft)&&z.add(ft)}):ut.object instanceof Oi||E.lb(ut.object)||T1(E,ut.object).each(function(ft){z.add(ft)})))});var ot=this.il;ot.clear(),b.each(function(ut){ot.add(E.Ac(ut)),y||z.add(ut)});var lt=this.kl;return lt.clear(),tt.each(function(ut){lt.add(E.Ac(ut)),y&&z.add(ut)}),a=x,0<ot.count&&(a+=(y?this.Xv:this.Vv)+ld(this,ot.Fa(),!0)),0<z.count&&(a+=this.iy+ld(this,z.Fa(),!0)),0<lt.count&&(a+=(y?this.Vv:this.Xv)+ld(this,lt.Fa(),!0)),lt.clear(),ot.clear(),a},kt.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)&&se("applyIncrementalJson cannot change Model properties"),Oi.prototype.fp.call(this,a);var y=a.insertedLinkKeys;if(Array.isArray(y))for(var x=y.length,E=0;E<x;E++){var b=y[E],z=this.jh(b);z===null&&(z=this.Jo({}),this.Ks(z,b),this.fi(z))}if(y=a.modifiedLinkData,Array.isArray(y)){for(x=y.length,E=0;E<x;E++)if(b=y[E],z=this.Ac(b),z=this.jh(z),z!==null){for(var tt in b)tt!=="__gohashid"&&tt!==this.linkKeyProperty&&this.setDataProperty(z,tt,b[tt]);I1(this,b,z)}}if(a=a.removedLinkKeys,Array.isArray(a))for(tt=a.length,y=0;y<tt;y++)x=this.jh(a[y]),x!==null&&this.bm(x)},Vr.prototype.changeState=function(a,y){if(a!==null&&a.model===this){if(a.change===Qo){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),jo(x,E,b);return}}else if(a.change===as){if(x=a.newParam,a.modelChange==="linkDataArray"){a=a.newValue,Ye(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===ms){if(x=a.oldParam,a.modelChange==="linkDataArray"){a=a.oldValue,Ye(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}}Oi.prototype.changeState.call(this,a,y)}},kt=Vr.prototype,kt.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),jo(x,this.nodeKeyProperty,a),this.xf(x))}return a}},kt.yx=function(a){return tu(this,a,!0)},kt.wv=function(a,y){Tg(this,a,y,!0)},kt.Bx=function(a){return tu(this,a,!1)},kt.Bv=function(a,y){Tg(this,a,y,!1)};function tu(a,y,x){if(y!==null&&(a=x?a.lf:a.mf,a!==""&&(a=Bs(y,a),a!==void 0))){if(ud(a))return a;se((x?"FromKey":"ToKey")+" value for link data "+y+" is not a number or a string: "+a)}}function Tg(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=Bs(y,b);z!==x&&(sA(a,z,y),jo(y,b,x),a.hc(x)===null&&oA(a,x,y),Us(a,E?"linkFromKey":"linkToKey",Qo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else jo(y,b,x)}}kt.zx=function(a){return G0(this,a,!0)},kt.xv=function(a,y){Ng(this,a,y,!0)},kt.Cx=function(a){return G0(this,a,!1)},kt.Cv=function(a,y){Ng(this,a,y,!1)};function G0(a,y,x){return y===null||(a=x?a.ej:a.fj,a==="")?"":(y=Bs(y,a),y===void 0?"":y)}function Ng(a,y,x,E){if(y!==null){var b=E?a.ej:a.fj;if(b!=="")if(a.Jc(y)){var z=Bs(y,b);z===void 0&&(z=""),z!==x&&(jo(y,b,x),Us(a,E?"linkFromPortId":"linkToPortId",Qo,b,y,z,x),typeof b=="string"&&a.La(y,b))}else jo(y,b,x)}}kt.Ef=function(a){if(a===null)return j0;var y=this.je;return y===""?j0:(a=Bs(a,y),a===void 0?j0:a)},kt.Ls=function(a,y){if(a!==null){var x=this.je;if(x!=="")if(this.Jc(a)){var E=Bs(a,x);if(E===void 0&&(E=j0),E!==y){if(Array.isArray(E))for(var b=E.length,z=0;z<b;z++)sA(this,E[z],a);for(jo(a,x,y),b=y.length,z=0;z<b;z++){var tt=y[z];this.hc(tt)===null&&oA(this,tt,a)}Us(this,"linkLabelKeys",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x)}}else jo(a,x,y)}},kt.Bu=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Bs(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&&oA(this,y,a),Us(this,"linkLabelKeys",as,x,a,null,y,null,b)))}else se(x+" property is not an Array; cannot addLabelKeyForLinkData: "+a)}}},kt.Qx=function(a,y){if(y!=null&&a!==null){var x=this.je;if(x!==""){var E=Bs(a,x);if(Array.isArray(E)){var b=E.indexOf(y);0>b||(E.splice(b,1),this.Jc(a)&&(sA(this,y,a),Us(this,"linkLabelKeys",ms,x,a,y,null,b,null)))}else E!==void 0&&se(x+" property is not an Array; cannot removeLabelKeyforLinkData: "+a)}}},kt.Ac=function(a){if(a!==null){var y=this.Jh;if(y!==""&&(y=Bs(a,y),y!==void 0)){if(ud(y))return y;se("Key value for link data "+a+" is not a number or a string: "+y)}}},kt.Ks=function(a,y){if(a!==null){var x=this.Jh;if(x!=="")if(this.Jc(a)){var E=Bs(a,x);E!==y&&this.jh(y)===null&&(jo(a,x,y),E!==void 0&&this.wb.remove(E),this.wb.add(y,a),Us(this,"linkKey",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},kt.jh=function(a){return a===null&&se("GraphLinksModel.findLinkDataForKey:key must not be null"),a!==void 0&&ud(a)?this.wb.I(a):null},kt.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))){jo(a,y,x);return}if(typeof x=="string"){for(E=2;this.wb.contains(x+E);)E++;jo(a,y,x+E)}else if(x===void 0||typeof x=="number"){for(x=-this.wb.count-1;this.wb.contains(x);)x--;jo(a,y,x)}}}}},kt.Jc=function(a){return a===null?!1:this.$f.contains(a)},kt.fi=function(a){a!==null&&(ui(a),this.Jc(a)||N1(this,a,!0))};function N1(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&&se("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)),Us(a,"linkDataArray",as,"linkDataArray",a,null,y,null,E),Mv(a,y)}kt.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)},kt.bm=function(a){a!==null&&D1(this,a,!0)};function D1(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(Us(a,"linkDataArray",ms,"linkDataArray",a,y,null,E,null),x=tu(a,y,!0),sA(a,x,y),x=tu(a,y,!1),sA(a,x,y),E=a.Ef(y),Array.isArray(E))for(var b=E.length,z=0;z<b;z++)x=E[z],sA(a,x,y)}kt.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)},kt.Zz=function(a){if(this.linkKeyProperty===""&&se("GraphLinksModel.linkKeyProperty must not be an empty string for .mergeLinkDataArray() to succeed."),a!==this.linkDataArray&&Dn(a)){var y=this.kl;y.clear(),y.addAll(this.wb.iteratorKeys);var x=this.il;x.clear();for(var E=a.length,b=0;b<E;b++){var z=a[b],tt=this.Ac(z);if(tt!==void 0){x.add(tt);var rt=this.jh(tt);rt!==z&&(rt!==null?(this.Do(rt,z),I1(this,z,rt)):(z=this.cloneDeep(z),this.Ks(z,tt),this.fi(z)))}else tt=this.cloneDeep(z),this.fi(tt),x.add(this.Ac(tt))}for(a=y.iterator;a.next();)E=a.value,x.contains(E)||(E=this.jh(E))&&this.bm(E);y.clear(),x.clear()}};function Mv(a,y){var x=tu(a,y,!0);x=a.Vl(x),a.hc(x)===null&&oA(a,x,y),x=tu(a,y,!1),x=a.Vl(x),a.hc(x)===null&&oA(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&&oA(a,x,y)}kt.Jo=function(a){if(a===null)return null;var y=this.Ak;return a=y!==null?y(a,this):z0(this,a,!0),Ye(a)&&(An(a),this.lf!==""&&jo(a,this.lf,void 0),this.mf!==""&&jo(a,this.mf,void 0),this.je!==""&&jo(a,this.je,[])),a},kt.Yu=function(a){if(a===null)return!1;var y=this.jl;return y===""?!1:!!Bs(a,y)},kt.lh=function(a){if(a!==null){var y=this.Je;if(y!==""&&(y=Bs(a,y),y!==void 0)){if(ud(y))return y;se("GroupKey value for node data "+a+" is not a number or a string: "+y)}}},kt.mp=function(a,y){if(y===null&&(y=void 0),a!==null){var x=this.Je;if(x!=="")if(this.lb(a)){var E=Bs(a,x);E!==y&&(sA(this,E,a),jo(a,x,y),this.hc(y)===null&&oA(this,y,a),Us(this,"nodeGroupKey",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},Vr.prototype.copyNodeData=function(a){return a===null?null:(a=Oi.prototype.copyNodeData.call(this,a),this.Ij||this.Je===""||Bs(a,this.Je)===void 0||jo(a,this.Je,void 0),a)},Vr.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){Tg(this,a,x,!0);return}if(y===this.linkToKeyProperty){Tg(this,a,x,!1);return}if(y===this.linkFromPortIdProperty){Ng(this,a,x,!0);return}if(y===this.linkToPortIdProperty){Ng(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=Bs(a,y);E!==x&&(jo(a,y,x),this.Fs(a,y,E,x))},kt=Vr.prototype,kt.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&&Bs(a,b)===y[b]||E&&b===this.linkKeyProperty||this.setDataProperty(a,b,y[b])}},kt.jp=function(a,y){Oi.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(tu(this,E,!0)===b){var tt=this.lf;jo(E,tt,z),Us(this,"linkFromKey",Qo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)}if(tu(this,E,!1)===b&&(tt=this.mf,jo(E,tt,z),Us(this,"linkToKey",Qo,tt,E,b,z),typeof tt=="string"&&this.La(E,tt)),tt=this.Ef(E),Array.isArray(tt))for(var rt=tt.length,ot=this.je,lt=0;lt<rt;lt++)tt[lt]===b&&(tt[lt]=z,Us(this,"linkLabelKeys",as,ot,E,b,z,lt,lt))}},kt.qv=function(a,y,x){if(this.lh(a)===y){var E=this.Je;jo(a,E,x),Us(this,"nodeGroupKey",Qo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},kt.Lv=function(){Oi.prototype.Lv.call(this);for(var a=this.linkDataArray,y=a.length,x=0;x<y;x++)Mv(this,a[x])},kt.fm=function(a){Oi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=li();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)){if(this.lh(E)===a){var b=this.Je;Us(this,"nodeGroupKey",Qo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}else if(tu(this,E,!0)===a&&(b=this.lf,Us(this,"linkFromKey",Qo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),tu(this,E,!1)===a&&(b=this.mf,Us(this,"linkToKey",Qo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)),b=this.Ef(E),Array.isArray(b))for(var z=b.length,tt=this.je,rt=0;rt<z;rt++)b[rt]===a&&(Us(this,"linkLabelKeys",as,tt,E,a,a,rt,rt),x.push(E))}for(y=0;y<x.length;y++)sA(this,a,x[y]);ci(x)}},kt.em=function(a){Oi.prototype.em.call(this,a);var y=this.lh(a);this.hc(y)===null&&oA(this,y,a)},kt.qp=function(a){Oi.prototype.qp.call(this,a);var y=this.lh(a);sA(this,y,a)},kt.ps=function(a){if(a===null)return"";var y=this.dj;if(y===""||(y=Bs(a,y),y===void 0))return"";if(typeof y=="string")return y;se("getCategoryForLinkData found a non-string category for "+a+": "+y)},Vr.prototype.getLinkCategoryForData=function(a){return this.ps(a)},Vr.prototype.lp=function(a,y){if(a!==null){var x=this.dj;if(x!=="")if(this.Jc(a)){var E=Bs(a,x);E===void 0&&(E=""),E!==y&&(jo(a,x,y),Us(this,"linkCategory",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},Vr.prototype.setLinkCategoryForData=function(a,y){this.lp(a,y)},kt=Vr.prototype,kt.lm=function(a,y){Oi.prototype.lm.call(this,a,y),this.mp(y,this.lh(a))};function I1(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))}kt.Wj=function(){return!0},kt.ri=function(){return!0},kt.xs=function(){return!0},kt.Xj=function(){return!0},yn.Object.defineProperties(Vr.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];Ye(b)||se("GraphLinksModel.linkDataArray must only contain Objects, not: "+b),ui(b)}if(this.md=a,this.linkKeyProperty!==""){for(E=new ee,b=0;b<x;b++){var z=a[b],tt=this.Ac(z);tt===void 0||this.wb.I(tt)!==null?E.add(z):this.wb.add(tt,z)}for(E=E.iterator;E.next();)b=E.value,this.Bs(b),z=this.Ac(b),z!==void 0&&this.wb.add(z,b)}for(E=new xe,b=0;b<x;b++)E.add(a[b]);for(this.$f=E,Us(this,"linkDataArray",Qo,"linkDataArray",this,y,a),y=0;y<x;y++)Mv(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"}}}),Vr.prototype.setCategoryForLinkData=Vr.prototype.lp,Vr.prototype.getCategoryForLinkData=Vr.prototype.ps,Vr.prototype.assignAllDataProperties=Vr.prototype.Do,Vr.prototype.setGroupKeyForNodeData=Vr.prototype.mp,Vr.prototype.getGroupKeyForNodeData=Vr.prototype.lh,Vr.prototype.isGroupForNodeData=Vr.prototype.Yu,Vr.prototype.copyLinkData=Vr.prototype.Jo,Vr.prototype.mergeLinkDataArray=Vr.prototype.Zz,Vr.prototype.removeLinkDataCollection=Vr.prototype.lA,Vr.prototype.removeLinkData=Vr.prototype.bm,Vr.prototype.addLinkDataCollection=Vr.prototype.Ey,Vr.prototype.addLinkData=Vr.prototype.fi,Vr.prototype.containsLinkData=Vr.prototype.Jc,Vr.prototype.makeLinkDataKeyUnique=Vr.prototype.Bs,Vr.prototype.findLinkDataForKey=Vr.prototype.jh,Vr.prototype.setKeyForLinkData=Vr.prototype.Ks,Vr.prototype.getKeyForLinkData=Vr.prototype.Ac,Vr.prototype.removeLabelKeyForLinkData=Vr.prototype.Qx,Vr.prototype.addLabelKeyForLinkData=Vr.prototype.Bu,Vr.prototype.setLabelKeysForLinkData=Vr.prototype.Ls,Vr.prototype.getLabelKeysForLinkData=Vr.prototype.Ef,Vr.prototype.setToPortIdForLinkData=Vr.prototype.Cv,Vr.prototype.getToPortIdForLinkData=Vr.prototype.Cx,Vr.prototype.setFromPortIdForLinkData=Vr.prototype.xv,Vr.prototype.getFromPortIdForLinkData=Vr.prototype.zx,Vr.prototype.setToKeyForLinkData=Vr.prototype.Bv,Vr.prototype.getToKeyForLinkData=Vr.prototype.Bx,Vr.prototype.setFromKeyForLinkData=Vr.prototype.wv,Vr.prototype.getFromKeyForLinkData=Vr.prototype.yx,Vr.prototype.clear=Vr.prototype.clear;var j0=Object.freeze([]);Vr.className="GraphLinksModel",Ku.GraphLinksModel=Vr,Oi.constructGraphLinksModel=Oi.constructGraphLinksModel=function(){return new Vr},Oi.initDiagramModel=Ev=function(){return new Vr};function qa(a,y){Oi.call(this),this.Ke="parent",this.Nm=!1,this.nj="parentLinkCategory",a!==void 0&&(Dn(a)?this.nodeDataArray=a:y=a),y&&(Object.assign(this,y),a=y.Changed)&&(delete this.Changed,this.Pe(a))}Ge(qa,Oi),qa.constructGraphLinksModel=Oi.constructGraphLinksModel,qa.prototype.cloneProtected=function(a){Oi.prototype.cloneProtected.call(this,a),a.Ke=this.Ke,a.Nm=this.Nm,a.nj=this.nj},kt=qa.prototype,kt.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)+":"+Fn(b)}}return y},kt.rm=function(){var a=Oi.prototype.rm.call(this),y="";return this.nodeParentKeyProperty!=="parent"&&typeof this.nodeParentKeyProperty=="string"&&(y+=`,
"nodeParentKeyProperty": `+this.quote(this.nodeParentKeyProperty)),a+y},kt.gp=function(a){Oi.prototype.gp.call(this,a),a.nodeParentKeyProperty&&(this.nodeParentKeyProperty=a.nodeParentKeyProperty)},kt.fp=function(a){a.nodeParentKeyProperty!==void 0&&a.nodeParentKeyProperty!==this.nodeParentKeyProperty&&se("applyIncrementalJson cannot change Model properties"),Oi.prototype.fp.call(this,a)},kt.Vl=function(a){return a},kt.mh=function(a){if(a!==null){var y=this.Ke;if(y!==""&&(y=Bs(a,y),y!==void 0)){if(ud(y))return y;se("ParentKey value for node data "+a+" is not a number or a string: "+y)}}},kt.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=Bs(a,x);E!==y&&(sA(this,E,a),jo(a,x,y),this.hc(y)===null&&oA(this,y,a),Us(this,"nodeParentKey",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},kt.ss=function(a){if(a===null)return"";var y=this.nj;return y===""||(y=Bs(a,y),y===void 0)?"":typeof y=="string"?y:(se("getParentLinkCategoryForNodeData found a non-string category for "+a+": "+y),"")},qa.prototype.getLinkCategoryForData=function(a){return this.ss(a)},qa.prototype.Ms=function(a,y){if(a!==null){var x=this.nj;if(x!=="")if(this.lb(a)){var E=Bs(a,x);E===void 0&&(E=""),E!==y&&(jo(a,x,y),Us(this,"parentLinkCategory",Qo,x,a,E,y),typeof x=="string"&&this.La(a,x))}else jo(a,x,y)}},qa.prototype.setLinkCategoryForData=function(a,y){this.Ms(a,y)},qa.prototype.copyNodeData=function(a){return a===null?null:(a=Oi.prototype.copyNodeData.call(this,a),this.Jj||this.Ke===""||Bs(a,this.Ke)===void 0||jo(a,this.Ke,void 0),a)},qa.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=Bs(a,y);E!==x&&(jo(a,y,x),this.Fs(a,y,E,x))},kt=qa.prototype,kt.jp=function(a,y){Oi.prototype.jp.call(this,a,y);for(var x=this.kb.iterator;x.next();)this.qv(x.value,a,y)},kt.qv=function(a,y,x){if(this.mh(a)===y){var E=this.Ke;jo(a,E,x),Us(this,"nodeParentKey",Qo,E,a,y,x),typeof E=="string"&&this.La(a,E)}},kt.fm=function(a){Oi.prototype.fm.call(this,a),a=this.wa(a);var y=Fp(this,a);if(y!==null){var x=li();for(y=y.iterator;y.next();){var E=y.value;if(this.lb(E)&&this.mh(E)===a){var b=this.Ke;Us(this,"nodeParentKey",Qo,b,E,a,a),typeof b=="string"&&this.La(E,b),x.push(E)}}for(y=0;y<x.length;y++)sA(this,a,x[y]);ci(x)}},kt.em=function(a){Oi.prototype.em.call(this,a);var y=this.mh(a);y=this.Vl(y),this.hc(y)===null&&oA(this,y,a)},kt.qp=function(a){Oi.prototype.qp.call(this,a);var y=this.mh(a);sA(this,y,a)},kt.lm=function(a,y){Oi.prototype.lm.call(this,a,y),this.Ms(y,this.ss(a)),this.qe(y,this.mh(a))},kt.Tl=function(){return!0},kt.xs=function(){return!0},yn.Object.defineProperties(qa.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"}}}),qa.prototype.setParentLinkCategoryForNodeData=qa.prototype.Ms,qa.prototype.getParentLinkCategoryForNodeData=qa.prototype.ss,qa.prototype.setParentKeyForNodeData=qa.prototype.qe,qa.prototype.getParentKeyForNodeData=qa.prototype.mh,qa.className="TreeModel",Ku.TreeModel=qa;function ts(a){Wo.call(this),this.lw=this.Zm=this.lc=0,this.Wp=360,this.kw=zu,this.Ti=0,this.Zv=new Ot,this.Jp=this.me=0,this.Xr=new Tp,this.gt=this.mj=0,this.ty=600,this.eo=NaN,this.Cm=1,this.ro=0,this.ul=360,this.Rb=zu,this.K=tl,this.nd=Ig,this.hd=xv,this.tf=6,this.Nn=$0,a&&Object.assign(this,a)}Ge(ts,Wo),ts.prototype.cloneProtected=function(a){Wo.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},ts.prototype.qb=function(a){a.classType===ts?a===X0||a===J0||a===W0||a===Y0||a===Ig?this.sorting=a:a===nf||a===Dg||a===tl||a===hd?this.direction=a:a===Pc||a===Ad||a===zu||a===Gu?this.arrangement=a:(a===Vf||a===$0)&&(this.nodeDiameterFormula=a):Wo.prototype.qb.call(this,a)},ts.prototype.createNetwork=function(){return new Ug(this)},ts.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 ee;y.addAll(a.iterator),a=new ee;var x=new ee,E=this.sort(y),b,z,tt=this.Jp,rt=this.arrangement,ot=this.nodeDiameterFormula,lt=this.radius;(!isFinite(lt)||0>=lt)&&(lt=NaN);var ut=this.aspectRatio;(!isFinite(ut)||0>=ut)&&(ut=1);var ft=this.startAngle;isFinite(ft)||(ft=0);var yt=this.sweepAngle;if((!isFinite(yt)||360<yt||1>yt)&&(yt=360),y=this.spacing,isFinite(y)||(y=NaN),rt===Gu&&ot===Vf?rt=zu:rt===Gu&&ot!==Vf&&(rt=this.arrangement),(this.direction===nf||this.direction===Dg)&&this.sorting!==Ig){for(ot=0;!(ot>=E.length)&&(a.add(E.M(ot)),!(ot+1>=E.length));ot+=2)x.add(E.M(ot+1));this.direction===nf?(this.arrangement===Gu&&a.reverse(),E=new ee,E.addAll(a),E.addAll(x)):(this.arrangement===Gu&&x.reverse(),E=new ee,E.addAll(x),E.addAll(a))}ot=E.length;for(var Mt=z=b=0;Mt<E.length;Mt++){var Tt=ft+yt*z*(this.direction===tl?1:-1)/ot,Dt=E.M(Mt).diameter;isNaN(Dt)&&(Dt=cd(E.M(Mt),Tt)),360>yt&&(Mt===0||Mt===E.length-1)&&(Dt/=2),b+=Dt,z++}if(isNaN(lt)||rt===Gu){if(isNaN(y)&&(y=6),rt!==zu&&rt!==Gu){for(z=-1/0,tt=0;tt<ot;tt++)Mt=E.M(tt),b=E.M(tt===ot-1?0:tt+1),isNaN(Mt.diameter)&&cd(Mt,0),isNaN(b.diameter)&&cd(b,0),z=Math.max(z,(Mt.diameter+b.diameter)/2);tt=z+y,rt===Pc?lt=(z+y)/(2*Math.PI/ot):lt=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180)}else lt=V0(this,b+(360<=yt?ot:ot-1)*(rt!==Gu?y:1.6*y),ut,ft*Math.PI/180,yt*Math.PI/180);z=lt*ut}else if(z=lt*ut,Mt=bv(this,lt,z,ft*Math.PI/180,yt*Math.PI/180),isNaN(y))(rt===zu||rt===Gu)&&(y=(Mt-b)/(360<=yt?ot:ot-1));else if(rt===zu||rt===Gu)Mt=(Mt-b)/(360<=yt?ot:ot-1),Mt<y?(lt=V0(this,b+y*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),z=lt*ut):y=Mt;else{for(tt=-1/0,b=0;b<ot;b++)Tt=E.M(b),Dt=E.M(b===ot-1?0:b+1),isNaN(Tt.diameter)&&cd(Tt,0),isNaN(Dt.diameter)&&cd(Dt,0),tt=Math.max(tt,(Tt.diameter+Dt.diameter)/2);tt+=y,b=V0(this,tt*(360<=yt?ot:ot-1),ut,ft*Math.PI/180,yt*Math.PI/180),b>lt?(lt=b,z=lt*ut):tt=Mt/(360<=yt?ot:ot-1)}if(this.kw=rt,this.lc=lt,this.Zm=ut,this.lw=ft,this.Wp=yt,this.Ti=y,this.me=z,this.Jp=tt,y=E,E=this.kw,rt=this.lc,lt=this.lw,ut=this.Wp,ft=this.Ti,yt=this.me,ot=this.Jp,this.direction!==nf&&this.direction!==Dg||E!==Gu)if(this.direction===nf||this.direction===Dg){switch(tt=0,E){case Ad:tt=180*Z0(this,rt,yt,lt,ot)/Math.PI;break;case zu:ot=y=0,tt=a.first(),tt!==null&&(y=cd(tt,Math.PI/2)),tt=x.first(),tt!==null&&(ot=cd(tt,Math.PI/2)),tt=180*Z0(this,rt,yt,lt,ft+(y+ot)/2)/Math.PI;break;case Pc:tt=ut/y.length}if(this.direction===nf){switch(E){case Ad:kp(this,a,lt,hd);break;case zu:bp(this,a,lt,hd);break;case Pc:Mp(this,a,ut/2,lt,hd)}switch(E){case Ad:kp(this,x,lt+tt,tl);break;case zu:bp(this,x,lt+tt,tl);break;case Pc:Mp(this,x,ut/2,lt+tt,tl)}}else{switch(E){case Ad:kp(this,x,lt,hd);break;case zu:bp(this,x,lt,hd);break;case Pc:Mp(this,x,ut/2,lt,hd)}switch(E){case Ad:kp(this,a,lt+tt,tl);break;case zu:bp(this,a,lt+tt,tl);break;case Pc:Mp(this,a,ut/2,lt+tt,tl)}}}else switch(E){case Ad:kp(this,y,lt,this.direction);break;case zu:bp(this,y,lt,this.direction);break;case Pc:Mp(this,y,ut,lt,this.direction);break;case Gu:U1(this,y,ut,lt,this.direction)}else U1(this,y,ut,lt-ut/2,tl)}this.updateParts(),this.network=null,this.isValidLayout=!0};function Mp(a,y,x,E,b){var z=a.Wp,tt=a.lc;a=a.me,E=E*Math.PI/180,x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=E+(b===tl?ot*x/(360<=z?rt:rt-1):-(ot*x)/rt),ut=y.M(ot),ft=tt*Math.tan(lt)/a;ft=Math.sqrt((tt*tt+a*a*ft*ft)/(1+ft*ft)),ut.centerX=ft*Math.cos(lt),ut.centerY=ft*Math.sin(lt),ut.actualAngle=180*lt/Math.PI}}function bp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Ti;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot),ut=y.M(ot===rt-1?0:ot+1),ft=z*Math.sin(x);lt.centerX=b*Math.cos(x),lt.centerY=ft,lt.actualAngle=180*x/Math.PI,isNaN(lt.diameter)&&cd(lt,0),isNaN(ut.diameter)&&cd(ut,0),lt=Z0(a,b,z,E===tl?x:-x,(lt.diameter+ut.diameter)/2+tt),x+=E===tl?lt:-lt}}function kp(a,y,x,E){var b=a.lc,z=a.me,tt=a.Jp;x=x*Math.PI/180;for(var rt=y.length,ot=0;ot<rt;ot++){var lt=y.M(ot);lt.centerX=b*Math.cos(x),lt.centerY=z*Math.sin(x),lt.actualAngle=180*x/Math.PI,lt=Z0(a,b,z,E===tl?x:-x,tt),x+=E===tl?lt:-lt}}function U1(a,y,x,E,b){var z=a.Wp;if(a.mj=0,a.Xr=new Tp,360>x){for(z=E+(b===tl?z:-z);0>z;)z+=360;z%=360,180<z&&(z-=360),z*=Math.PI/180,a.gt=z,O1(a,y,x,E,b)}else Q1(a,y,x,E,b);a.Xr.commit(y)}function Q1(a,y,x,E,b){var z=a.lc,tt=a.Ti,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=a.me*Math.sin(E*Math.PI/180),ut=y.Fa();if(ut.length===3)ut[0].centerX=z,ut[0].centerY=0,ut[1].centerX=ut[0].centerX-ut[0].width/2-ut[1].width/2-tt,ut[1].y=ut[0].y,ut[2].centerX=(ut[0].centerX+ut[1].centerX)/2,ut[2].y=ut[0].y-ut[2].height-tt;else if(ut.length===4)ut[0].centerX=z,ut[0].centerY=0,ut[2].centerX=-ut[0].centerX,ut[2].centerY=ut[0].centerY,ut[1].centerX=0,ut[1].y=Math.min(ut[0].y,ut[2].y)-ut[1].height-tt,ut[3].centerX=0,ut[3].y=Math.max(ut[0].y+ut[0].height+tt,ut[2].y+ut[2].height+tt);else{z=Ot.alloc();for(var ft=0;ft<ut.length&&(ut[ft].centerX=ot,ut[ft].centerY=lt,!(ft>=ut.length-1));ft++)R1(a,ot,lt,ut,ft,b,z)||H1(a,ot,lt,ut,ft,b,z),ot=z.x,lt=z.y;if(Ot.free(z),a.mj++,!(23<a.mj)){ot=ut[0].centerX,lt=ut[0].centerY,z=ut[ut.length-1].centerX,ft=ut[ut.length-1].centerY;var yt=Math.abs(ot-z)-((ut[0].width+ut[ut.length-1].width)/2+tt),Mt=Math.abs(lt-ft)-((ut[0].height+ut[ut.length-1].height)/2+tt);tt=0,1>Math.abs(Mt)?Math.abs(ot-z)<(ut[0].width+ut[ut.length-1].width)/2&&(tt=0):tt=0<Mt?Mt:1>Math.abs(yt)?0:yt,ot=Math.abs(z)>Math.abs(ft)?0<z!=lt>ft:0<ft!=ot<z,(ot=b===tl?ot:!ot)&&(tt=-Math.abs(tt),tt=Math.min(tt,-ut[ut.length-1].width),tt=Math.min(tt,-ut[ut.length-1].height)),a.Xr.compare(tt,ut),1<Math.abs(tt)&&(a.lc=8>a.mj?a.lc-tt/(2*Math.PI):5>ut.length&&10<tt?a.lc/2:a.lc-(0<tt?1.7:-2.3),a.me=a.lc*rt,Q1(a,y,x,E,b))}}}function O1(a,y,x,E,b){for(var z=a.lc,tt=a.me,rt=a.Zm,ot=z*Math.cos(E*Math.PI/180),lt=tt*Math.sin(E*Math.PI/180),ut=Ot.alloc(),ft=y.Fa(),yt=0;yt<ft.length&&(ft[yt].centerX=ot,ft[yt].centerY=lt,!(yt>=ft.length-1));yt++)R1(a,ot,lt,ft,yt,b,ut)||H1(a,ot,lt,ft,yt,b,ut),ot=ut.x,lt=ut.y;if(Ot.free(ut),a.mj++,!(23<a.mj)){if(ot=Math.atan2(lt,ot),ot=b===tl?a.gt-ot:ot-a.gt,ot=Math.abs(ot)<Math.abs(ot-2*Math.PI)?ot:ot-2*Math.PI,z=ot*(z+tt)/2,tt=a.Xr,Math.abs(z)<Math.abs(tt.Pl))for(tt.Pl=z,tt.mk=[],tt.tm=[],ot=0;ot<ft.length;ot++)tt.mk[ot]=ft[ot].bounds.x,tt.tm[ot]=ft[ot].bounds.y;1<Math.abs(z)&&(a.lc=8>a.mj?a.lc-z/(2*Math.PI):a.lc-(0<z?1.7:-2.3),a.me=a.lc*rt,O1(a,y,x,E,b))}}function R1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;a=(E[b].width+E[b+1].width)/2+a.Ti;var ut=!1;if(0<=x!=(z===tl)){if(z=y+a,z>rt){if(z=y-a,z<-rt)return tt.x=z,tt.y=lt,!1;ut=!0}}else if(z=y-a,z<-rt){if(z=y+a,z>rt)return tt.x=z,tt.y=lt,!1;ut=!0}return lt=Math.sqrt(1-Math.min(1,z*z/(rt*rt)))*ot,0>x!==ut&&(lt=-lt),Math.abs(x-lt)>(E[b].height+E[b+1].height)/2?(tt.x=z,tt.y=lt,!1):(tt.x=z,tt.y=lt,!0)}function H1(a,y,x,E,b,z,tt){var rt=a.lc,ot=a.me,lt=0;if(a=(E[b].height+E[b+1].height)/2+a.Ti,E=!1,0<=y!=(z===tl)){if(z=x-a,z<-ot){if(z=x+a,z>ot){tt.x=lt,tt.y=z;return}E=!0}}else if(z=x+a,z>ot){if(z=x-a,z<-ot){tt.x=lt,tt.y=z;return}E=!0}lt=Math.sqrt(1-Math.min(1,z*z/(ot*ot)))*rt,0>y!==E&&(lt=-lt),tt.x=lt,tt.y=z}ts.prototype.commitLayout=function(){this.commitNodes(),this.isRouting&&this.commitLinks()},ts.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 Ot(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))},ts.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()};function bv(a,y,x,E,b){var z=a.ty;if(.001>Math.abs(a.Zm-1))return E!==void 0&&b!==void 0?b*y:2*Math.PI*y;a=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x;for(var tt=0,rt=E!==void 0&&b!==void 0?b/(z+1):Math.PI/(2*(z+1)),ot=0,lt=0;lt<=z;lt++){E!==void 0&&b!==void 0?ot=E+lt*b/z:ot=lt*Math.PI/(2*z);var ut=Math.sin(ot);tt+=Math.sqrt(1-a*a*ut*ut)*rt}return E!==void 0&&b!==void 0?(y>x?y:x)*tt:4*(y>x?y:x)*tt}function V0(a,y,x,E,b){return y/(E!==void 0&&b!==void 0?bv(a,1,x,E,b):bv(a,1,x))}function Z0(a,y,x,E,b){if(.001>Math.abs(a.Zm-1))return b/y;var z=y>x?Math.sqrt(y*y-x*x)/y:Math.sqrt(x*x-y*y)/x,tt=0;a=2*Math.PI/(700*a.network.vertexes.count),y>x&&(E+=Math.PI/2);for(var rt=0;;rt++){var ot=Math.sin(E+rt*a);if(tt+=(y>x?y:x)*Math.sqrt(1-z*z*ot*ot)*a,tt>=b)return rt*a}}ts.prototype.sort=function(a){switch(this.sorting){case W0:break;case Y0:a.reverse();break;case X0:a.sort(this.comparer);break;case J0:a.sort(this.comparer),a.reverse();break;case Ig:return this.ak(Hw(a));default:se("Invalid sorting type.")}return a};function Hw(a){for(var y=[],x=0;x<a.length;x++)y.push(0);x=new ee;for(var E=0;E<a.length;E++){var b=-1,z=-1;if(E===0)for(var tt=0;tt<a.length;tt++){var rt=a.M(tt).edgesCount;rt>b&&(b=rt,z=tt)}else for(tt=0;tt<a.length;tt++)rt=y[tt],rt>b&&(b=rt,z=tt);for(x.add(a.M(z)),y[z]=-1,z=a.M(z),tt=z.sourceEdges;tt.next();)b=a.indexOf(tt.value.fromVertex),0>b||0<=y[b]&&y[b]++;for(z=z.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),0>b||0<=y[b]&&y[b]++}return x}ts.prototype.ak=function(a){for(var y=[],x=0;x<a.length;x++){var E=a.M(x);y[x]=[];for(var b,z=E.destinationEdges;z.next();)b=a.indexOf(z.value.toVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b);for(E=E.sourceEdges;E.next();)b=a.indexOf(E.value.fromVertex),b!==x&&0>y[x].indexOf(b)&&y[x].push(b)}for(z=[],x=0;x<y.length;x++)z[x]=0;x=[];var tt=[],rt=[];E=[],b=new ee;for(var ot=0,lt=0;lt<y.length;lt++){var ut=y[lt].length;if(ut===1)E.push(lt);else if(ut===0)b.add(a.M(lt));else{if(ot===0)x.push(lt);else{for(var ft=ut=1/0,yt=-1,Mt=[],Tt=0;Tt<x.length;Tt++)0>y[x[Tt]].indexOf(x[Tt===x.length-1?0:Tt+1])&&Mt.push(Tt===x.length-1?0:Tt+1);if(Mt.length===0)for(Tt=0;Tt<x.length;Tt++)Mt.push(Tt);for(Tt=0;Tt<Mt.length;Tt++){for(var Dt=Mt[Tt],$t=y[lt],Vt=0,ae=0;ae<tt.length;ae++){var ce=z[tt[ae]],ge=z[rt[ae]];if(ce<ge){var we=ce;ce=ge}else we=ge;if(we<Dt&&Dt<=ce)for(ge=0;ge<$t.length;ge++){var He=$t[ge];0>x.indexOf(He)||we<z[He]&&z[He]<ce||we===z[He]||ce===z[He]||Vt++}else for(ge=0;ge<$t.length;ge++)He=$t[ge],0>x.indexOf(He)||we<z[He]&&z[He]<ce&&we!==z[He]&&ce!==z[He]&&Vt++}for($t=Vt,ae=Vt=0;ae<y[lt].length;ae++)we=x.indexOf(y[lt][ae]),0<=we&&(we=Math.abs(Dt-(we>=Dt?we+1:we)),Vt+=we<x.length+1-we?we:x.length+1-we);for(ae=0;ae<tt.length;ae++)we=z[tt[ae]],ce=z[rt[ae]],we>=Dt&&we++,ce>=Dt&&ce++,we>ce&&(ge=ce,ce=we,we=ge),ce-we<(x.length+2)/2==(we<Dt&&Dt<=ce)&&Vt++;($t<ut||$t===ut&&Vt<ft)&&(ut=$t,ft=Vt,yt=Dt)}for(x.splice(yt,0,lt),ut=0;ut<x.length;ut++)z[x[ut]]=ut;for(ut=0;ut<y[lt].length;ut++)ft=y[lt][ut],0<=x.indexOf(ft)&&(tt.push(lt),rt.push(ft))}ot++}}for(tt=x.length;;){for(z=!0,rt=0;rt<E.length;rt++)if(ot=E[rt],lt=y[ot][0],ut=x.indexOf(lt),0<=ut){for(yt=ft=0;yt<y[lt].length;yt++)Mt=x.indexOf(y[lt][yt]),0>Mt||Mt===ut||(Tt=Mt>ut?Mt-ut:ut-Mt,ft+=Mt<ut!=Tt>tt-Tt?1:-1);x.splice(0>ft?ut:ut+1,0,ot),E.splice(rt,1),rt--}else z=!1;if(z)break;x.push(E[0]),E.splice(0,1)}for(y=0;y<x.length;y++)b.add(a.M(x[y]));return b},yn.Object.defineProperties(ts.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!==Gu&&a!==zu&&a!==Ad&&a!==Pc||(this.Rb=a,this.C())}},direction:{get:function(){return this.K},set:function(a){this.K===a||a!==tl&&a!==hd&&a!==nf&&a!==Dg||(this.K=a,this.C())}},sorting:{get:function(){return this.nd},set:function(a){this.nd===a||a!==W0&&a!==Y0&&a!==X0&&!J0&&a!==Ig||(this.nd=a,this.C())}},comparer:{get:function(){return this.hd},set:function(a){this.hd!==a&&(this.hd=a,this.C())}},spacing:{get:function(){return this.tf},set:function(a){this.tf!==a&&(this.tf=a,this.C())}},nodeDiameterFormula:{get:function(){return this.Nn},set:function(a){this.Nn===a||a!==$0&&a!==Vf||(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 zu=new Te(ts,"ConstantSpacing",0),Ad=new Te(ts,"ConstantDistance",1),Pc=new Te(ts,"ConstantAngle",2),Gu=new Te(ts,"Packed",3),tl=new Te(ts,"Clockwise",4),hd=new Te(ts,"Counterclockwise",5),nf=new Te(ts,"BidirectionalLeft",6),Dg=new Te(ts,"BidirectionalRight",7),W0=new Te(ts,"Forwards",8),Y0=new Te(ts,"Reverse",9),X0=new Te(ts,"Ascending",10),J0=new Te(ts,"Descending",11),Ig=new Te(ts,"Optimized",12),$0=new Te(ts,"Pythagorean",13),Vf=new Te(ts,"Circular",14);ts.className="CircularLayout",ts.ConstantSpacing=zu,ts.ConstantDistance=Ad,ts.ConstantAngle=Pc,ts.Packed=Gu,ts.Clockwise=tl,ts.Counterclockwise=hd,ts.BidirectionalLeft=nf,ts.BidirectionalRight=Dg,ts.Forwards=W0,ts.Reverse=Y0,ts.Ascending=X0,ts.Descending=J0,ts.Optimized=Ig,ts.Pythagorean=$0,ts.Circular=Vf;function Tp(){this.Pl=-1/0,this.tm=this.mk=null}Tp.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},Tp.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]}},Tp.className="VertexArrangement";function Ug(a){bo.call(this,a)}Ge(Ug,bo),Ug.prototype.createVertex=function(){return new Np(this)},Ug.prototype.createEdge=function(){return new q0(this)},Ug.className="CircularNetwork";function Np(a){Gs.call(this,a),this.u=this.Si=NaN}Ge(Np,Gs);function cd(a,y){var x=a.network;if(x===null)return NaN;if(x=x.layout,x===null)return NaN;if(x.arrangement===Gu)if(x.nodeDiameterFormula===Vf)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===Vf?Math.max(a.width,a.height):Math.sqrt(a.width*a.width+a.height*a.height);return a.Si}yn.Object.defineProperties(Np.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)}}}),Np.className="CircularVertex";function q0(a){Ol.call(this,a)}Ge(q0,Ol),q0.className="CircularEdge";function Ba(a){Wo.call(this),this.ah=null,this.An=0,this.$d=new on(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)}Ge(Ba,Wo),Ba.prototype.cloneProtected=function(a){Wo.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},Ba.prototype.createNetwork=function(){return new Zf(this)},Ba.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}_1(this,0,a)}this.network=y;var tt=E=x.iterator;E=this.arrangementSpacing;var rt=tt.count,ot=!0;z=b=0;for(var lt=li(),ut=0;ut<rt+y.vertexes.count+2;ut++)lt[ut]=null;rt=0,tt.reset();for(var ft=Oe.alloc();tt.next();)if(ut=tt.value,this.computeBounds(ut,ft),ot)ot=!1,b=ft.x+ft.width/2,z=ft.y+ft.height/2,lt[0]=new Ot(ft.x+ft.width+E.width,ft.y),lt[1]=new Ot(ft.x,ft.y+ft.height+E.height),rt=2;else{var yt=K1(lt,rt,b,z,ft.width,ft.height,E),Mt=lt[yt],Tt=new Ot(Mt.x+ft.width+E.width,Mt.y),Dt=new Ot(Mt.x,Mt.y+ft.height+E.height);for(yt+1<rt&&lt.splice(yt+1,0,null),lt[yt]=Tt,lt[yt+1]=Dt,rt++,yt=Mt.x-ft.x,Mt=Mt.y-ft.y,ut=ut.vertexes.iterator;ut.next();)Tt=ut.value,Tt.centerX+=yt,Tt.centerY+=Mt}for(Oe.free(ft),ut=y.vertexes.iterator;ut.next();)tt=ut.value,yt=tt.bounds,2>rt?(b=yt.x+yt.width/2,z=yt.y+yt.height/2,lt[0]=new Ot(yt.x+yt.width+E.width,yt.y),lt[1]=new Ot(yt.x,yt.y+yt.height+E.height),rt=2):(ot=K1(lt,rt,b,z,yt.width,yt.height,E),ft=lt[ot],Mt=new Ot(ft.x+yt.width+E.width,ft.y),yt=new Ot(ft.x,ft.y+yt.height+E.height),ot+1<rt&&lt.splice(ot+1,0,null),lt[ot]=Mt,lt[ot+1]=yt,rt++,tt.centerX=ft.x+tt.width/2,tt.centerY=ft.y+tt.height/2);for(ci(lt),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)}}G1(this,a),this.updateParts()}this.dl=a,this.network=null,this.isValidLayout=!0},Ba.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},Ba.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 _1(a,y,x){if(_w(a,y)){var E=a.Zf;a.Zf*=1+1/(y+1);var b=Kw(a,y),z=Math.max(0,Math.max(Math.min(a.network.vertexes.count,x*(y+1)/11),10));for(a.maxIterations+=z,_1(a,y+1,x),G1(a,z),zw(a,b),y=b.vertexes.Fa(),y.sort(function(tt,rt){return tt===null||rt===null||tt===rt?0:rt.Vd-tt.Vd}),x=0;x<y.length;x++)Gw(a,y[x]);a.Zf=E}}function _w(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 Kw(a,y){for(var x=a.network,E=new Zf(a),b=0;b<a.ah.length;b++){var z=a.ah[b];if(1<z.Vd){E.dh(z);var tt=new j1;tt.Rs=z.Vd,tt.Ss=z.width,tt.Qs=z.height,tt.Sv=z.focus.x,tt.Tv=z.focus.y,z.We===null&&(z.We=new ee),z.We.add(tt),z.sv=z.We.count-1}else break}for(z=x.edges.iterator;z.next();){var rt=z.value;b=rt.fromVertex,tt=rt.toVertex,b.network===E&&tt.network===E?E.Bo(rt):b.network===E?(rt=b.Hj,rt===null&&(rt=new ee,b.Hj=rt),rt.add(tt),b.Vd--,b.sh+=tt.sh):tt.network===E&&(rt=tt.Hj,rt===null&&(rt=new ee,tt.Hj=rt),rt.add(b),tt.Vd--,tt.sh+=b.sh)}for(b=E.edges.iterator;b.next();)z=b.value,z.length*=Math.max(1,Be.sqrt((z.fromVertex.sh+z.toVertex.sh)/(4*y+1)));for(y=E.vertexes.iterator;y.next();){b=y.value;var ot=b.Hj;if(ot!==null&&0<ot.count&&(tt=b.We.M(b.We.count-1).Rs-b.Vd,!(0>=tt))){for(var lt=rt=0,ut=ot.count-tt;ut<ot.count;ut++){var ft=ot.M(ut),yt=null;for(z=ft.edges.iterator;z.next();){var Mt=z.value;if(Mt.Ax(ft)===b){yt=Mt;break}}yt!==null&&(lt+=yt.length,rt+=ft.width*ft.height)}z=b.centerX,ot=b.centerY,ut=b.width,ft=b.height,yt=b.focus,Mt=ut*ft,1>Mt&&(Mt=1),rt=Be.sqrt((rt+Mt+lt*lt*4/(tt*tt))/Mt),tt=(rt-1)*ut/2,rt=(rt-1)*ft/2,b.bounds=new Oe(z-yt.x-tt,ot-yt.y-rt,ut+2*tt,ft+2*rt),b.focus=new Ot(yt.x+tt,yt.y+rt)}}return a.network=E,x}function zw(a,y){for(var x=a.network.vertexes.iterator;x.next();){var E=x.value;if(E.network=y,E.We!==null){var b=E.We.M(E.sv);E.Vd=b.Rs;var z=b.Sv,tt=b.Tv;E.bounds=new Oe(E.centerX-z,E.centerY-tt,b.Ss,b.Qs),E.focus=new Ot(z,tt),E.sv--}}for(x=a.network.edges.iterator;x.next();)x.value.network=y;a.network=y}function Gw(a,y){var x=y.Hj;if(x!==null&&x.count!==0){var E=y.centerX,b=y.centerY,z=y.width,tt=y.height;y.We!==null&&0<y.We.count&&(tt=y.We.M(0),z=tt.Ss,tt=tt.Qs),z=Be.sqrt(z*z+tt*tt)/2;for(var rt=!1,ot=tt=0,lt=0,ut=y.vertexes.iterator;ut.next();){var ft=ut.value;1>=ft.Vd?ot++:(rt=!0,lt++,tt+=Math.atan2(y.centerY-ft.centerY,y.centerX-ft.centerX))}if(ot!==0){for(0<lt&&(tt/=lt),lt=y=0,y=rt?2*Math.PI/(ot+1):2*Math.PI/ot,ot%2===0&&(lt=y/2),1<x.count&&x.sort(function(Mt,Tt){return Mt===null||Tt===null||Mt===Tt?0:Tt.width*Tt.height-Mt.width*Mt.height}),rt=ot%2===0?0:1,x=x.iterator;x.next();)if(ot=x.value,!(1<ot.Vd||a.isFixed(ot))){for(ut=null,ft=ot.edges.iterator;ft.next();){ut=ft.value;break}ft=ot.width;var yt=ot.height;ft=Be.sqrt(ft*ft+yt*yt)/2,ut=z+ut.length+ft,ft=tt+(y*(rt/2>>1)+lt)*(rt%2===0?1:-1),ot.centerX=E+ut*Math.cos(ft),ot.centerY=b+ut*Math.sin(ft),rt++}}}}function K1(a,y,x,E,b,z,tt){var rt=9e19,ot=-1,lt=0;t:for(;lt<y;lt++){var ut=a[lt],ft=ut.x-x,yt=ut.y-E;if(ft=ft*ft+yt*yt,ft<rt){for(yt=lt-1;0<=yt;yt--)if(a[yt].y>ut.y&&a[yt].x-ut.x<b+tt.width)continue t;for(yt=lt+1;yt<y;yt++)if(a[yt].x>ut.x&&a[yt].y-ut.y<z+tt.height)continue t;ot=lt,rt=ft}}return ot}Ba.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Ba.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 z1(a,y){var x=a.bounds,E=x.x;a=x.y;var b=x.width;x=x.height;var z=y.bounds,tt=z.x;y=z.y;var rt=z.width;return z=z.height,E+b<tt?a>y+z?(x=E+b-tt,a=a-y-z,Be.sqrt(x*x+a*a)):a+x<y?(E=E+b-tt,a=a+x-y,Be.sqrt(E*E+a*a)):tt-(E+b):E>tt+rt?a>y+z?(x=E-tt-rt,a=a-y-z,Be.sqrt(x*x+a*a)):a+x<y?(E=E-tt-rt,a=a+x-y,Be.sqrt(E*E+a*a)):E-(tt+rt):a>y+z?a-(y+z):a+x<y?y-(a+x):.1}function G1(a,y){for(a.ah=null,y=a.An+y;a.An<y&&(a.An++,jw(a)););a.ah=null}function jw(a){a.ah===null&&(a.ah=a.network.vertexes.Fa());var y=a.ah;if(0>=y.length)return!1;var x=y[0];x.forceX=0,x.forceY=0;for(var E=x.centerX,b=E,z=x=x.centerY,tt=1;tt<y.length;tt++){var rt=y[tt];rt.forceX=0,rt.forceY=0;var ot=rt.centerX;rt=rt.centerY,E=Math.min(E,ot),b=Math.max(b,ot),x=Math.min(x,rt),z=Math.max(z,rt)}(b=b-E>z-x)?y.sort(function(Dt,$t){return Dt===null||$t===null||Dt===$t?0:Dt.centerX-$t.centerX}):y.sort(function(Dt,$t){return Dt===null||$t===null||Dt===$t?0:Dt.centerY-$t.centerY}),x=a.Zf;var lt=E=rt=0;for(z=0;z<y.length;z++){tt=y[z],E=tt.bounds,rt=tt.focus,ot=E.x+rt.x;var ut=E.y+rt.y;E=tt.charge*a.electricalFieldX(ot,ut),lt=tt.charge*a.electricalFieldY(ot,ut),E+=tt.mass*a.gravitationalFieldX(ot,ut),lt+=tt.mass*a.gravitationalFieldY(ot,ut),tt.forceX+=E,tt.forceY+=lt;for(var ft=z+1;ft<y.length;ft++){var yt=y[ft];if(yt!==tt){E=yt.bounds,rt=yt.focus,lt=E.x+rt.x;var Mt=E.y+rt.y;if(ot-lt>x||lt-ot>x){if(b)break}else if(ut-Mt>x||Mt-ut>x){if(!b)break}else{var Tt=z1(tt,yt);1>Tt?(E=a.randomNumberGenerator,E===null&&(a.randomNumberGenerator=E=new tm),Tt=E.random(),rt=E.random(),ot>lt?(E=Math.abs(yt.bounds.right-tt.bounds.x),E=(1+E)*Tt):ot<lt?(E=Math.abs(yt.bounds.x-tt.bounds.right),E=-(1+E)*Tt):(E=Math.max(yt.width,tt.width),E=(1+E)*Tt-E/2),ut>Mt?(lt=Math.abs(yt.bounds.bottom-tt.bounds.y),lt=(1+lt)*rt):ot<lt?(lt=Math.abs(yt.bounds.y-tt.bounds.bottom),lt=-(1+lt)*rt):(lt=Math.max(yt.height,tt.height),lt=(1+lt)*rt-lt/2)):(rt=-(tt.charge*yt.charge)/(Tt*Tt),E=(lt-ot)/Tt*rt,lt=(Mt-ut)/Tt*rt),tt.forceX+=E,tt.forceY+=lt,yt.forceX-=E,yt.forceY-=lt}}}}for(b=a.network.edges.iterator;b.next();)rt=b.value,x=rt.fromVertex,z=rt.toVertex,tt=x.bounds,ot=x.focus,E=tt.x+ot.x,tt=tt.y+ot.y,ut=z.bounds,ft=z.focus,ot=ut.x+ft.x,ut=ut.y+ft.y,ft=z1(x,z),1>ft?(ft=a.randomNumberGenerator,ft===null&&(a.randomNumberGenerator=ft=new tm),rt=ft.random(),ft=ft.random(),E=(E>ot?1:-1)*(1+(z.width>x.width?z.width:x.width))*rt,lt=(tt>ut?1:-1)*(1+(z.height>x.height?z.height:x.height))*ft):(rt=rt.stiffness*(ft-rt.length),E=(ot-E)/ft*rt,lt=(ut-tt)/ft*rt),x.forceX+=E,x.forceY+=lt,z.forceX-=E,z.forceY-=lt;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}Ba.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},Ba.prototype.moveFixedVertex=function(){},Ba.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.isRouting&&this.commitLinks()},Ba.prototype.yv=function(){if(this.setsPortSpots)for(var a=this.network.edges.iterator;a.next();){var y=a.value.link;y!==null&&(y.fromSpot=Io,y.toSpot=Io)}},Ba.prototype.commitNodes=function(){var a=0,y=0;if(this.arrangesToOrigin){var x=Oe.alloc();this.computeBounds(this.network,x),y=this.arrangementOrigin,a=y.x-x.x,y=y.y-x.y,Oe.free(x)}x=Oe.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()}Oe.free(x)},Ba.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Ba.prototype.springStiffness=function(a){return a=a.stiffness,isNaN(a)?this.Hk:a},Ba.prototype.springLength=function(a){return a=a.length,isNaN(a)?this.Gk:a},Ba.prototype.electricalCharge=function(a){return a=a.charge,isNaN(a)?this.Ek:a},Ba.prototype.electricalFieldX=function(){return 0},Ba.prototype.electricalFieldY=function(){return 0},Ba.prototype.gravitationalMass=function(a){return a=a.mass,isNaN(a)?this.Fk:a},Ba.prototype.gravitationalFieldX=function(){return 0},Ba.prototype.gravitationalFieldY=function(){return 0},Ba.prototype.isFixed=function(a){return a.isFixed},yn.Object.defineProperties(Ba.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"&&se('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())}}}),Ba.className="ForceDirectedLayout";function j1(){this.Tv=this.Sv=this.Qs=this.Ss=this.Rs=0}j1.className="ForceDirectedSubnet";function Zf(a){bo.call(this,a)}Ge(Zf,bo),Zf.prototype.createVertex=function(){return new Dp(this)},Zf.prototype.createEdge=function(){return new Ip(this)},Zf.className="ForceDirectedNetwork";function Dp(a){Gs.call(this,a),this.ia=!1,this.Ha=this.u=NaN,this.sh=this.Vd=this.V=this.F=0,this.We=this.Hj=null,this.sv=0}Ge(Dp,Gs),yn.Object.defineProperties(Dp.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)}}}),Dp.className="ForceDirectedVertex";function Ip(a){Ol.call(this,a),this.j=this.o=NaN}Ge(Ip,Ol),yn.Object.defineProperties(Ip.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)}}}),Ip.className="ForceDirectedEdge";function tm(){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()}tm.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},tm.className="RandomNumberGenerator";function vo(a){Wo.call(this),this.kc=this.ie=25,this.K=0,this.Dk=om,this.Zk=sm,this.Qk=am,this.bj=4,this.rk=lm,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 Ot,this.He=[],this.He.length=100,this.xw=this.ve=0,a&&Object.assign(this,a)}Ge(vo,Wo),vo.prototype.cloneProtected=function(a){Wo.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},vo.prototype.qb=function(a){a.classType===vo?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:se("Unknown enum value: "+a):Wo.prototype.qb.call(this,a)},vo.prototype.createNetwork=function(){return new Og(this)},vo.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!==Qp&&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===Qp&&this.removeCycles(),a=this.network;for(var y=[],x=a.edges.iterator;x.next();){var E=x.value;E.valid=!1,y.push(E)}for(x=0;x<y.length;x++){E=y[x];var b=E.fromVertex,z=E.toVertex;if(!(E.valid||(b.node===null&&b.data===null||z.node===null&&z.data===null)&&b.layer===z.layer)){var tt=0,rt=0,ot=0,lt=0;if(E.link!==null){if(rt=E.link,rt===null)continue;var ut=b.node;if(tt=z.node,ut===null||tt===null)continue;var ft=rt.fromNode;ot=rt.toNode;for(var yt=rt.fromPort;yt!==null&&!yt.Ed();)yt=yt.panel;for(rt=rt.toPort;rt!==null&&!rt.Ed();)rt=rt.panel;if(E.rev){lt=ft;var Mt=yt;ft=ot,yt=rt,ot=lt,rt=Mt}var Tt=b.focus;lt=z.focus;var Dt=E.rev?z.bounds:b.bounds;Mt=Ot.alloc(),ut!==ft?Dt.w()&&ft.isVisible()?ft.actualBounds.w()?(wc(ft,yt,cr,Mt),Mt.x+=ft.actualBounds.x-Dt.x,Mt.y+=ft.actualBounds.y-Dt.y):(wc(ft,yt,cr,Mt),Mt.w()||Mt.assign(Tt)):Mt.assign(Tt):Dt.w()?(wc(ft,yt,cr,Mt),Mt.w()||Mt.assign(Tt)):Mt.assign(Tt),ft=E.rev?b.bounds:z.bounds,ut=Ot.alloc(),tt!==ot?ft.w()&&ot.isVisible()?ot.actualBounds.w()?(wc(ot,rt,cr,ut),ut.x+=ot.actualBounds.x-ft.x,ut.y+=ot.actualBounds.y-ft.y):(wc(ot,rt,cr,ut),ut.w()||ut.assign(lt)):ut.assign(lt):ft.w()?(wc(ot,rt,cr,ut),ut.w()||ut.assign(lt)):ut.assign(lt),this.K===90||this.K===270?(tt=Math.round((Mt.x-Tt.x)/this.kc),ot=Mt.x,rt=Math.round((ut.x-lt.x)/this.kc),lt=ut.x):(tt=Math.round((Mt.y-Tt.y)/this.kc),ot=Mt.y,rt=Math.round((ut.y-lt.y)/this.kc),lt=ut.y),Ot.free(Mt),Ot.free(ut),E.portFromColOffset=tt,E.portFromPos=ot,E.portToColOffset=rt,E.portToPos=lt}else E.portFromColOffset=0,E.portFromPos=0,E.portToColOffset=0,E.portToPos=0;if(Mt=b.layer,ut=z.layer,ft=0,Dt=E.link,Dt!==null){var $t=Dt.fromPort,Vt=Dt.toPort;if($t!==null&&Vt!==null){var ae=Dt.fromNode;if(yt=Dt.toNode,ae!==null&&yt!==null){var ce=rm(this,!0),ge=rm(this,!1),we=this.setsPortSpots?ce:Dt.computeSpot(!0,$t);Tt=this.setsPortSpots?ge:Dt.computeSpot(!1,Vt);var He=Dt.isOrthogonal;we.$c()&&we.Hf(ge)&&Tt.$c()&&Tt.Hf(ce)?ft=0:(ce=Dt.getLinkPoint(ae,$t,we,!0,He,yt,Vt,Ot.alloc()),ge=Dt.getLinkDirection(ae,$t,ce,we,!0,He,yt,Vt),Ot.free(ce),we.ys()||ge!==tw(this,E,!0)?this.setsPortSpots&&ae!==null&&ae.ports.count===1&&E.rev&&(ft+=1):ft+=1,we=Dt.getLinkPoint(yt,Vt,Tt,!1,He,ae,$t,Ot.alloc()),Dt=Dt.getLinkDirection(yt,Vt,we,Tt,!1,He,ae,$t),Ot.free(we),Tt.ys()||Dt!==tw(this,E,!1)?this.setsPortSpots&&yt!==null&&yt.ports.count===1&&E.rev&&(ft+=2):ft+=2)}}}if(yt=ft,ft=yt===1||yt===3,(yt=yt===2||yt===3)&&(Tt=a.createVertex(),Tt.node=null,Tt.Dj=1,Tt.layer=Mt,Tt.near=b,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!1,b.rev=E.rev,b.portFromColOffset=tt,b.portToColOffset=0,b.portFromPos=ot,b.portToPos=0,b=Tt),Dt=1,ft&&Dt--,Mt-ut>Dt&&0<Mt){for(E.valid=!1,Tt=a.createVertex(),Tt.node=null,Tt.Dj=2,Tt.layer=Mt-1,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=yt?0:tt,b.portToColOffset=0,b.portFromPos=yt?0:ot,b.portToPos=0,b=Tt,Mt--;Mt-ut>Dt&&0<Mt;)Tt=a.createVertex(),Tt.node=null,Tt.Dj=3,Tt.layer=Mt-1,a.dh(Tt),b=a.Zj(b,Tt,E.link),b.valid=!0,b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=0,b.portFromPos=0,b.portToPos=0,b=Tt,Mt--;b=a.Zj(Tt,z,E.link),b.valid=!ft,ft&&(Tt.near=z),b.rev=E.rev,b.portFromColOffset=0,b.portToColOffset=rt,b.portFromPos=0,b.portToPos=lt}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=dd(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),fd(this,a,y)}this.reduceCrossings(),this.straightenAndPack(),this.updateParts()}this.network=null,this.isValidLayout=!0},vo.prototype.linkMinLength=function(){return 1};function kv(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}vo.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},vo.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 cl(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 Au(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 V1(a,y,x){var E=dd(a,y),b=a.tc[y];(a.Jn===null||a.Jn.length<b*b)&&(a.Jn=[]);for(var z=a.Jn,tt=0;tt<b;tt++){var rt=0,ot=E[tt],lt=ot.near;if(lt!==null&&lt.layer===ot.layer)if(ot=lt.index,ot>tt)for(var ut=tt+1;ut<ot;ut++){var ft=E[ut];ft.near===lt&&ft.Dj===lt.Dj||rt++}else for(ut=tt-1;ut>ot;ut--)ft=E[ut],ft.near===lt&&ft.Dj===lt.Dj||rt++;var yt;if(0<=x)for(ot=E[tt].sourceEdgesArrayAccess,lt=0;lt<ot.length;lt++){var Mt=ot[lt];if(Mt.valid&&Mt.fromVertex.layer!==y)for(ft=Mt.fromVertex.index,ut=Mt.portToPos,Mt=Mt.portFromPos,yt=lt+1;yt<ot.length;yt++){var Tt=ot[yt];if(Tt.valid&&Tt.fromVertex.layer!==y){var Dt=Tt.fromVertex.index,$t=Tt.portToPos;Tt=Tt.portFromPos,ut<$t&&(ft>Dt||ft===Dt&&Mt>Tt)&&rt++,$t<ut&&(Dt>ft||Dt===ft&&Tt>Mt)&&rt++}}}if(0>=x){for(ot=E[tt].destinationEdgesArrayAccess,lt=0;lt<ot.length;lt++)if(Mt=ot[lt],Mt.valid&&Mt.toVertex.layer!==y)for(ft=Mt.toVertex.index,ut=Mt.portToPos,Mt=Mt.portFromPos,yt=lt+1;yt<ot.length;yt++)Tt=ot[yt],Tt.valid&&Tt.toVertex.layer!==y&&(Dt=Tt.toVertex.index,$t=Tt.portToPos,Tt=Tt.portFromPos,Mt<Tt&&(ft>Dt||ft===Dt&&ut>$t)&&rt++,Tt<Mt&&(Dt>ft||Dt===ft&&$t>ut)&&rt++)}for(z[tt*b+tt]=rt,ot=tt+1;ot<b;ot++){var Vt=0,ae=0;if(0<=x){rt=E[tt].sourceEdgesArrayAccess;var ce=E[ot].sourceEdgesArrayAccess;for(lt=0;lt<rt.length;lt++)if(Mt=rt[lt],Mt.valid&&Mt.fromVertex.layer!==y)for(ft=Mt.fromVertex.index,Mt=Mt.portFromPos,yt=0;yt<ce.length;yt++)Tt=ce[yt],Tt.valid&&Tt.fromVertex.layer!==y&&(Dt=Tt.fromVertex.index,Tt=Tt.portFromPos,(ft<Dt||ft===Dt&&Mt<Tt)&&ae++,(Dt<ft||Dt===ft&&Tt<Mt)&&Vt++)}if(0>=x){for(rt=E[tt].destinationEdgesArrayAccess,ce=E[ot].destinationEdgesArrayAccess,lt=0;lt<rt.length;lt++)if(Mt=rt[lt],Mt.valid&&Mt.toVertex.layer!==y)for(ft=Mt.toVertex.index,ut=Mt.portToPos,yt=0;yt<ce.length;yt++)Tt=ce[yt],Tt.valid&&Tt.toVertex.layer!==y&&(Dt=Tt.toVertex.index,$t=Tt.portToPos,(ft<Dt||ft===Dt&&ut<$t)&&ae++,(Dt<ft||Dt===ft&&$t<ut)&&Vt++)}z[tt*b+ot]=Vt,z[ot*b+tt]=ae}}return fd(a,y,E),z}vo.prototype.countCrossings=function(){for(var a=0,y=0;y<=this.Ia;y++)for(var x=V1(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 em(a){for(var y=0,x=0;x<=a.Ia;x++){for(var E=a,b=x,z=dd(E,b),tt=E.tc[b],rt=0,ot=0;ot<tt;ot++){var lt=z[ot].destinationEdgesArrayAccess;if(lt!==null)for(var ut=0;ut<lt.length;ut++){var ft=lt[ut];if(ft.valid&&ft.toVertex.layer!==b){var yt=ft.fromVertex.column+ft.portFromColOffset,Mt=ft.toVertex.column+ft.portToColOffset;rt+=(Math.abs(yt-Mt)+1)*kv(ft)}}}fd(E,b,z),y+=rt}return y}vo.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 Tv(a,y,x){for(var E=dd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var ut=0,ft=0,yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ut+=yt.column-1,ft++),ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Mt=rt.fromVertex;rt.valid&&!rt.rev&&Mt.layer!==y&&(ut+=Mt.column,ft++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ut+=yt.column,ft++);z[tt]=ft===0?-1:ut/ft}return fd(a,y,E),z}function Z1(a,y,x){for(var E=dd(a,y),b=a.tc[y],z=[],tt=0;tt<b;tt++){var rt=E[tt],ot=null;0>=x&&(ot=rt.sourceEdgesArrayAccess);var lt=null;0<=x&&(lt=rt.destinationEdgesArrayAccess);var ut=0,ft=[],yt=rt.near;if(yt!==null&&yt.layer===rt.layer&&(ft[ut]=yt.column-1,ut++),rt=void 0,ot!==null)for(yt=0;yt<ot.length;yt++){rt=ot[yt];var Mt=rt.fromVertex;rt.valid&&!rt.rev&&Mt.layer!==y&&(ft[ut]=Mt.column+rt.portFromColOffset,ut++)}if(lt!==null)for(ot=0;ot<lt.length;ot++)rt=lt[ot],yt=rt.toVertex,rt.valid&&!rt.rev&&yt.layer!==y&&(ft[ut]=yt.column+rt.portToColOffset,ut++);ut===0?z[tt]=-1:(ft.sort(function(Tt,Dt){return Tt-Dt}),lt=ut>>1,z[tt]=ut&1?ft[lt]:ft[lt-1]+ft[lt]>>1)}return fd(a,y,E),z}function Up(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();){var rt=tt.value,ot=rt.toVertex,lt=y.layer-ot.layer;rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}if(z)for(tt=y.sourceEdges;tt.next();)rt=tt.value,ot=rt.fromVertex,lt=ot.layer-y.layer,rt=a.linkMinLength(rt),lt===rt&&Up(a,ot,x,E,b,z)}}function Nv(a,y,x,E,b,z){if(y.component===E){if(y.component=x,b)for(var tt=y.destinationEdges;tt.next();)Nv(a,tt.value.toVertex,x,E,b,z);if(z)for(y=y.sourceEdges;y.next();)Nv(a,y.value.fromVertex,x,E,b,z)}}vo.prototype.removeCycles=function(){for(var a=this.network.edges.iterator;a.next();)a.value.rev=!1;switch(this.Dk){default:case Uv: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(;Vw(a)!==null;){for(b=W1(a);b!==null;)E[x]=b,x--,b.valid=!1,b=W1(a);for(b=Y1(a);b!==null;)E[y]=b,y++,b.valid=!1,b=Y1(a);b=null;for(var z=0,tt=this.network.vertexes.iterator;tt.next();){var rt=tt.value;if(rt.valid){for(var ot=0,lt=rt.destinationEdges;lt.next();)lt.value.toVertex.valid&&ot++;lt=0;for(var ut=rt.sourceEdges;ut.next();)ut.value.fromVertex.valid&&lt++;(b===null||z<ot-lt)&&(b=rt,z=ot-lt)}}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 om: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&&Dv(this,y);for(E.reset();E.next();)y=E.value,y.Ll===-1&&Dv(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 Qp: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 Vw(a){for(a=a.vertexes.iterator;a.next();){var y=a.value;if(y.valid)return y}return null}function W1(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 Y1(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 Dv(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,Dv(a,b))}y.finish=a.Kn,a.Kn++}vo.prototype.assignLayers=function(){switch(this.Zk){case Qv:X1(this);break;case Ov:for(var a,y=this.network.vertexes.iterator;y.next();)a=$1(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 sm:for(X1(this),y=this.network.vertexes.iterator;y.next();)y.value.valid=!1;for(y.reset();y.next();)a=y.value,a.sourceEdges.count===0&&q1(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 X1(a){for(var y=a.network.vertexes.iterator;y.next();){var x=J1(a,y.value);a.Ia=Math.max(x,a.Ia)}}function J1(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,J1(a,z)+b)}y.layer=x}else x=y.layer;return x}function $1(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,$1(a,z)+b)}y.layer=x}else x=y.layer;return x}function q1(a,y){if(!y.valid){y.valid=!0;for(var x=y.destinationEdges;x.next();)q1(a,x.value.toVertex);for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(var E=y.sourceEdgesArrayAccess,b=E.length,z=0;z<b;z++){var tt=E[z],rt=tt.fromVertex,ot=tt.toVertex;tt=a.linkMinLength(tt),rt.layer-ot.layer>tt&&Up(a,rt,0,-1,!0,!1)}for(Up(a,y,1,-1,!0,!0);y.component!==0;){for(z=0,E=1/0,rt=0,ot=null,tt=a.network.vertexes.iterator;tt.next();){var lt=tt.value;if(lt.component===1){var ut=0,ft=!1,yt=lt.sourceEdgesArrayAccess;b=yt.length;for(var Mt=0;Mt<b;Mt++){var Tt=yt[Mt],Dt=Tt.fromVertex;ut+=1,Dt.component!==1&&(z+=1,Dt=Dt.layer-lt.layer,Tt=a.linkMinLength(Tt),E=Math.min(E,Dt-Tt))}for(yt=lt.destinationEdgesArrayAccess,b=yt.length,Mt=0;Mt<b;Mt++)Tt=yt[Mt].toVertex,--ut,Tt.component!==1?--z:ft=!0;(ot===null||ut<rt)&&!ft&&(ot=lt,rt=ut)}}if(0<z){for(x.reset();x.next();)b=x.value,b.component===1&&(b.layer+=E);y.component=0}else ot.component=0}for(x=a.network.vertexes.iterator;x.next();)x.value.component=-1;for(Up(a,y,1,-1,!0,!1);y.component!==0;){for(E=0,b=1/0,z=0,rt=null,ot=a.network.vertexes.iterator;ot.next();)if(tt=ot.value,tt.component===1){for(lt=0,ut=!1,yt=tt.sourceEdgesArrayAccess,ft=yt.length,Mt=0;Mt<ft;Mt++)Tt=yt[Mt].fromVertex,lt+=1,Tt.component!==1?E+=1:ut=!0;for(yt=tt.destinationEdgesArrayAccess,ft=yt.length,Mt=0;Mt<ft;Mt++)Tt=yt[Mt],Dt=Tt.toVertex,--lt,Dt.component!==1&&(--E,Dt=tt.layer-Dt.layer,Tt=a.linkMinLength(Tt),b=Math.min(b,Dt-Tt));(rt===null||lt>z)&&!ut&&(rt=tt,z=lt)}if(0>E){for(x.reset();x.next();)E=x.value,E.component===1&&(E.layer-=b);y.component=0}else rt.component=0}}}function tw(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}vo.prototype.initializeIndices=function(){switch(this.Qk){default:case Hv: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 am: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&&ew(this,x);break;case Rv: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&&nw(this,x)}};function ew(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&&ew(a,E))}function nw(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&&nw(a,E))}vo.prototype.reduceCrossings=function(){var a=this.countCrossings(),y=cl(this),x,E;for(x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,1),wu(this,E,1);var b=this.countCrossings();for(b<a&&(a=b,y=cl(this)),E=this.Ia;0<=E;E--)nm(this,E,-1),wu(this,E,-1);b=this.countCrossings(),b<a&&(a=b,y=cl(this))}for(Au(this,y),x=0;x<this.bj;x++){for(E=0;E<=this.Ia;E++)nm(this,E,0),wu(this,E,0);for(b=this.countCrossings(),b<a&&(a=b,y=cl(this)),E=this.Ia;0<=E;E--)nm(this,E,0),wu(this,E,0);b=this.countCrossings(),b<a&&(a=b,y=cl(this))}Au(this,y);var z,tt,rt;switch(this.rk){case _v:break;case Kv:for(rt=a+1;(E=this.countCrossings())<rt;)for(rt=E,x=this.Ia;0<=x;x--)for(tt=0;tt<=x;tt++){for(z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,1)||z;for(b=this.countCrossings(),b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,1)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,-1)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,0)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,0)||z;b>=a?Au(this,y):(a=b,y=cl(this))}break;default:case lm:for(x=this.Ia,tt=0,rt=a+1;(E=this.countCrossings())<rt;){for(rt=E,z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,-1)||z;for(b=this.countCrossings(),b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,1)||z;for(b=this.countCrossings(),b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,1)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,-1)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=x;E>=tt;E--)z=wu(this,E,0)||z;for(b>=a?Au(this,y):(a=b,y=cl(this)),z=!0;z;)for(z=!1,E=tt;E<=x;E++)z=wu(this,E,0)||z;b>=a?Au(this,y):(a=b,y=cl(this))}}Au(this,y)};function nm(a,y,x){var E=dd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=Tv(a,y,x);for(x=0;x<b;x++)tt[x]===-1&&(tt[x]=E[x].column),z[x]===-1&&(z[x]=E[x].column);for(var rt=!0,ot;rt;)for(rt=!1,x=0;x<b-1;x++)(z[x+1]<z[x]||z[x+1]===z[x]&&tt[x+1]<tt[x])&&(rt=!0,ot=z[x],z[x]=z[x+1],z[x+1]=ot,ot=tt[x],tt[x]=tt[x+1],tt[x+1]=ot,ot=E[x],E[x]=E[x+1],E[x+1]=ot);for(x=z=0;x<b;x++)ot=E[x],ot.index=x,z+=a.nodeMinColumnSpace(ot,!0),ot.column=z,z+=1,z+=a.nodeMinColumnSpace(ot,!1);fd(a,y,E)}function wu(a,y,x){var E=dd(a,y),b=a.tc[y];x=V1(a,y,x);var z,tt=[];for(z=0;z<b;z++)tt[z]=-1;var rt=[];for(z=0;z<b;z++)rt[z]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,z=0;z<b-1;z++){var ut=x[E[z].index*b+E[z+1].index],ft=x[E[z+1].index*b+E[z].index],yt=0,Mt=0,Tt=E[z].column,Dt=E[z+1].column,$t=a.nodeMinColumnSpace(E[z],!0),Vt=a.nodeMinColumnSpace(E[z],!1),ae=a.nodeMinColumnSpace(E[z+1],!0),ce=a.nodeMinColumnSpace(E[z+1],!1);$t=Tt-$t+ae,Vt=Dt-Vt+ce;var ge=E[z].sourceEdges.iterator;for(ge.reset();ge.next();)if(ae=ge.value,ce=ae.fromVertex,ae.valid&&ce.layer===y){for(ae=0;E[ae]!==ce;)ae++;ae<z&&(yt+=2*(z-ae),Mt+=2*(z+1-ae)),ae===z+1&&(yt+=1),ae>z+1&&(yt+=4*(ae-z),Mt+=4*(ae-(z+1)))}for(ge=E[z].destinationEdges.iterator,ge.reset();ge.next();)if(ae=ge.value,ce=ae.toVertex,ae.valid&&ce.layer===y){for(ae=0;E[ae]!==ce;)ae++;ae===z+1&&(Mt+=1)}for(ge=E[z+1].sourceEdges.iterator,ge.reset();ge.next();)if(ae=ge.value,ce=ae.fromVertex,ae.valid&&ce.layer===y){for(ae=0;E[ae]!==ce;)ae++;ae<z&&(yt+=2*(z+1-ae),Mt+=2*(z-ae)),ae===z&&(Mt+=1),ae>z+1&&(yt+=4*(ae-(z+1)),Mt+=4*(ae-z))}for(ge=E[z+1].destinationEdges.iterator,ge.reset();ge.next();)if(ae=ge.value,ce=ae.toVertex,ae.valid&&ce.layer===y){for(ae=0;E[ae]!==ce;)ae++;ae===z&&(yt+=1)}ae=ce=0,ge=tt[E[z].index];var we=rt[E[z].index],He=tt[E[z+1].index],di=rt[E[z+1].index];ge!==-1&&(ce+=Math.abs(ge-Tt),ae+=Math.abs(ge-Vt)),we!==-1&&(ce+=Math.abs(we-Tt),ae+=Math.abs(we-Vt)),He!==-1&&(ce+=Math.abs(He-Dt),ae+=Math.abs(He-$t)),di!==-1&&(ce+=Math.abs(di-Dt),ae+=Math.abs(di-$t)),(Mt<yt-.5||Mt===yt&&ft<ut-.5||Mt===yt&&ft===ut&&ae<ce-.5)&&(lt=ot=!0,E[z].column=Vt,E[z+1].column=$t,ut=E[z],E[z]=E[z+1],E[z+1]=ut)}for(z=0;z<b;z++)E[z].index=z;return fd(a,y,E),ot}vo.prototype.straightenAndPack=function(){if(this.ve===0){var a=(this.bg&1)!==0,y=(this.bg&tx)!==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=Qg(this,y,1)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,-1)||x;x=Qg(this,this.Md,0)||x}if(this.bg&4){for(y=this.Md+1;y<=this.Ia;y++)Iv(this,y,1);for(y=this.Md-1;0<=y;y--)Iv(this,y,-1);Iv(this,this.Md,0)}if(a&&(iw(this,-1),iw(this,1)),this.bg&2)for(x=!0;x;){for(x=!1,x=Qg(this,this.Md,0)||x,y=this.Md+1;y<=this.Ia;y++)x=Qg(this,y,0)||x;for(y=this.Md-1;0<=y;y--)x=Qg(this,y,0)||x}}else Xw(this)};function Qg(a,y,x){for(var E=!1;Zw(a,y,x);)E=!0;return E}function Zw(a,y,x){var E,b=dd(a,y),z=a.tc[y],tt=Tv(a,y,-1);if(0<x)for(E=0;E<z;E++)tt[E]=-1;var rt=Tv(a,y,1);if(0>x)for(E=0;E<z;E++)rt[E]=-1;for(var ot=!1,lt=!0;lt;)for(lt=!1,E=0;E<z;E++){var ut=b[E].column,ft=a.nodeMinColumnSpace(b[E],!0),yt=a.nodeMinColumnSpace(b[E],!1),Mt=0;0>E-1||ut-b[E-1].column-1>ft+a.nodeMinColumnSpace(b[E-1],!1)?Mt=ut-1:Mt=ut,ft=E+1>=z||b[E+1].column-ut-1>yt+a.nodeMinColumnSpace(b[E+1],!0)?ut+1:ut;var Tt=yt=0,Dt=0;if(0>=x)for(var $t=b[E].sourceEdges.iterator;$t.next();){var Vt=$t.value,ae=Vt.fromVertex;if(Vt.valid&&ae.layer!==y){var ce=kv(Vt),ge=Vt.portFromColOffset;Vt=Vt.portToColOffset,ae=ae.column,yt+=(Math.abs(ut+Vt-(ae+ge))+1)*ce,Tt+=(Math.abs(Mt+Vt-(ae+ge))+1)*ce,Dt+=(Math.abs(ft+Vt-(ae+ge))+1)*ce}}if(0<=x)for($t=b[E].destinationEdges.iterator;$t.next();)Vt=$t.value,ae=Vt.toVertex,Vt.valid&&ae.layer!==y&&(ce=kv(Vt),ge=Vt.portFromColOffset,Vt=Vt.portToColOffset,ae=ae.column,yt+=(Math.abs(ut+ge-(ae+Vt))+1)*ce,Tt+=(Math.abs(Mt+ge-(ae+Vt))+1)*ce,Dt+=(Math.abs(ft+ge-(ae+Vt))+1)*ce);Vt=ge=ce=0,$t=tt[b[E].index],ae=rt[b[E].index],$t!==-1&&(ce+=Math.abs($t-ut),ge+=Math.abs($t-Mt),Vt+=Math.abs($t-ft)),ae!==-1&&(ce+=Math.abs(ae-ut),ge+=Math.abs(ae-Mt),Vt+=Math.abs(ae-ft)),Tt<yt||Tt===yt&&ge<ce?(lt=ot=!0,b[E].column=Mt):(Dt<yt||Dt===yt&&Vt<ce)&&(lt=ot=!0,b[E].column=ft)}return fd(a,y,b),a.normalize(),ot}function Iv(a,y,x){var E=dd(a,y),b=a.tc[y],z=Z1(a,y,x),tt=[];for(x=0;x<b;x++)tt[x]=z[x];for(z=!0;z;)for(z=!1,x=0;x<b;x++){var rt=E[x].column,ot=a.nodeMinColumnSpace(E[x],!0),lt=a.nodeMinColumnSpace(E[x],!1),ut=0;if(tt[x]===-1)if(x===0&&x===b-1)ut=rt;else if(x===0){var ft=E[x+1].column;ft-rt===lt+a.nodeMinColumnSpace(E[x+1],!0)?ut=rt-1:ut=rt}else x===b-1?(ft=E[x-1].column,ut=rt-ft===ot+a.nodeMinColumnSpace(E[x-1],!1)?rt+1:rt):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=(ot+lt)/2|0);else x===0&&x===b-1?ut=tt[x]:x===0?(ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ut=Math.min(tt[x],lt)):x===b-1?(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ut=Math.max(tt[x],ot)):(ft=E[x-1].column,ot=ft+a.nodeMinColumnSpace(E[x-1],!1)+ot+1,ft=E[x+1].column,lt=ft-a.nodeMinColumnSpace(E[x+1],!0)-lt-1,ot<tt[x]&&tt[x]<lt?ut=tt[x]:ot>=tt[x]?ut=ot:lt<=tt[x]&&(ut=lt));ut!==rt&&(z=!0,E[x].column=ut)}fd(a,y,E),a.normalize()}function Ww(a,y){for(var x=!0,E=a.network.vertexes.iterator;E.next();){var b=E.value,z=a.nodeMinColumnSpace(b,!0),tt=a.nodeMinColumnSpace(b,!1);if(b.column-z<=y&&b.column+tt>=y){x=!1;break}}if(a=!1,x)for(E.reset();E.next();)x=E.value,x.column>y&&(--x.column,a=!0);return a}function Yw(a,y){var x=y+1,E,b=[],z=[];for(E=0;E<=a.Ia;E++)b[E]=!1,z[E]=!1;for(var tt=a.network.vertexes.iterator;tt.next();){E=tt.value;var rt=E.column-a.nodeMinColumnSpace(E,!0),ot=E.column+a.nodeMinColumnSpace(E,!1);rt<=y&&ot>=y&&(b[E.layer]=!0),rt<=x&&ot>=x&&(z[E.layer]=!0)}for(rt=!0,x=!1,E=0;E<=a.Ia;E++)rt=rt&&!(b[E]&&z[E]);if(rt)for(tt.reset();tt.next();)a=tt.value,a.column>y&&(--a.column,x=!0);return x}function iw(a,y){for(var x=0;x<=a.Ra;x++)for(;Ww(a,x););for(a.normalize(),x=0;x<a.Ra;x++)for(;Yw(a,x););a.normalize();var E;if(0<y)for(x=0;x<=a.Ra;x++){var b=cl(a),z=em(a);for(E=z+1;z<E;){E=z,rw(a,x,1);var tt=em(a);tt>z?Au(a,b):tt<z&&(z=tt,b=cl(a))}}if(0>y)for(x=a.Ra;0<=x;x--)for(b=cl(a),z=em(a),E=z+1;z<E;)E=z,rw(a,x,-1),tt=em(a),tt>z?Au(a,b):tt<z&&(z=tt,b=cl(a));a.normalize()}function rw(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&&(Nv(a,y,a.le,-1,!0,!0),a.le++);var z;for(y=[],z=0;z<a.le*a.le;z++)y[z]=!1;for(b=[],z=0;z<(a.Ia+1)*(a.Ra+1);z++)b[z]=-1;for(E.reset();E.next();){z=E.value;for(var tt=z.layer,rt=Math.max(0,z.column-a.nodeMinColumnSpace(z,!0)),ot=Math.min(a.Ra,z.column+a.nodeMinColumnSpace(z,!1));rt<=ot;rt++)b[tt*(a.Ra+1)+rt]=z.component}for(z=0;z<=a.Ia;z++){if(0<x)for(tt=0;tt<a.Ra;tt++)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt+1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt+1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt+1]]=!0);if(0>x)for(tt=a.Ra;0<tt;tt--)b[z*(a.Ra+1)+tt]!==-1&&b[z*(a.Ra+1)+tt-1]!==-1&&b[z*(a.Ra+1)+tt]!==b[z*(a.Ra+1)+tt-1]&&(y[b[z*(a.Ra+1)+tt]*a.le+b[z*(a.Ra+1)+tt-1]]=!0)}for(b=[],z=0;z<a.le;z++)b[z]=!0;for(tt=[],tt.push(0);tt.length!==0;)if(ot=tt[tt.length-1],tt.pop(),b[ot])for(b[ot]=!1,z=0;z<a.le;z++)y[ot*a.le+z]&&tt.splice(0,0,z);if(0<x)for(E.reset();E.next();)a=E.value,b[a.component]&&--a.column;if(0>x)for(E.reset();E.next();)x=E.value,b[x.component]&&(x.column+=1)}function Xw(a){for(var y=li(),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 xe,Jw(y,x);var z=null,tt=null,rt=null,ot=null,lt=(a.ve&1)!==0,ut=(a.ve&2)!==0,ft=(a.ve&4)!==0,yt=(a.ve&8)!==0;for(lt&&(a.verticalAlignment(y,x,!0),z=im(a,y,!0,!1)),y.reverse(),ft&&(a.verticalAlignment(y,x,!1),rt=im(a,y,!1,!1)),E=Fi(y),b=E.next();!b.done;b=E.next())b.value.reverse();yt&&(a.verticalAlignment(y,x,!1),ot=im(a,y,!1,!0)),y.reverse(),ut&&(a.verticalAlignment(y,x,!0),tt=im(a,y,!0,!0)),ci(y),a.u(z,tt,rt,ot),a.network.vertexes.each(function(Mt){var Tt=li();lt&&Tt.push(z.get(Mt)),ut&&Tt.push(tt.get(Mt)),ft&&Tt.push(rt.get(Mt)),yt&&Tt.push(ot.get(Mt)),Tt.sort(function($t,Vt){return $t-Vt});var Dt=Tt.length;Dt=(Tt[Math.floor((Dt-1)/2)]+Tt[Math.ceil((Dt-1)/2)])/2,ci(Tt),Mt.zc=Dt})}function Jw(a,y){for(var x=a.length,E=1;E<x-1;E++)for(var b=0,z=0,tt=a[E],rt=a[E+1],ot=0;z<rt.length;ot++){var lt=rt[ot];t:{if(lt.node===null){var ut=zv(lt);if(0<ut.length){ut=ut[0].node===null;break t}}ut=!1}var ft=ut;if(ot===rt.length-1||ft){for(ut=tt.length-1,ft&&(ut=zv(lt)[0].index);z<=ot;){if(lt=rt[z],!lt.bo){ft=[];for(var yt=Fi(lt.sourceEdgesArrayAccess),Mt=yt.next();!Mt.done;Mt=yt.next())Mt=Mt.value,Mt.valid&&ft.push(Mt);lt.bo=ft}for(lt=Fi(lt.bo),ft=lt.next();!ft.done;ft=lt.next())ft=ft.value,yt=ft.fromVertex.index,(yt<b||yt>ut)&&y.add(ft);z++}b=ut}}}vo.prototype.verticalAlignment=function(a,y,x){$w(a),a=Fi(a);for(var E=a.next();!E.done;E=a.next()){var b=-1;E=Fi(E.value);for(var z=E.next();!z.done;z=E.next()){z=z.value;var tt=x?zv(z):ex(z),rt=tt.length;if(0<rt){tt.sort(function(ft,yt){return ft.vi-yt.vi});var ot=(rt-1)/2;for(rt=Math.floor(ot),ot=Math.ceil(ot);rt<=ot;rt++)if(z.align===z){var lt=tt[rt],ut=void 0;ut=x?um(lt,z):um(z,lt),!y.contains(ut)&&b<lt.vi&&(lt.align=z,z.root=lt.root,z.align=lt.root,b=lt.vi)}}}}};function $w(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 im(a,y,x,E){for(var b=a.K===90||a.K===270,z=Fi(y),tt=z.next();!tt.done;tt=z.next()){var rt=Fi(tt.value);for(tt=rt.next();!tt.done;tt=rt.next())tt=tt.value,tt.sd=tt,tt.shift=1/0,tt.zc=NaN,tt.qg=0}for(tt=a.K===90||a.K===270,z=Fi(y),rt=z.next();!rt.done;rt=z.next()){rt=Fi(rt.value);for(var ot=rt.next();!ot.done;ot=rt.next())if(ot=ot.value,ot.root===ot){for(var lt=0,ut=ot;ut.align!==ot;){var ft=ut.align,yt=tt?ut.width:ut.height,Mt=tt?ft.width:ft.height;if(x){var Tt=um(ut,ft),Dt=Tt.portFromPos,$t=Tt.portToPos;Tt.link!==null&&(ut.node&&ut.node!==Tt.link.fromNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Tt.link.toNode&&($t=tt?ft.focusX:ft.focusY))}else Tt=um(ft,ut),Dt=Tt.portToPos,$t=Tt.portFromPos,Tt.link!==null&&(ut.node&&ut.node!==Tt.link.toNode&&(Dt=tt?ut.focusX:ut.focusY),ft.node&&ft.node!==Tt.link.fromNode&&($t=tt?ft.focusX:ft.focusY));yt=E?ut.qg+(yt-Dt)-(Mt-$t):ut.qg+Dt-$t,ft.qg=yt,lt=Math.min(lt,yt),ut=ut.align}ut=ot;do ut.qg=ut.qg-lt,ut=ut.align;while(ut!==ot)}}for(x=Fi(y),tt=x.next();!tt.done;tt=x.next())for(z=Fi(tt.value),tt=z.next();!tt.done;tt=z.next())tt=tt.value,tt.root===tt&&ow(a,tt,y);for(x=0;x<y.length;x++)if(!(0>=y[x].length)&&(tt=y[x][0],tt.sd===tt)){tt.sd.shift===1/0&&(tt.sd.shift=0),tt=x,rt=0;do{for(z=y[tt][rt];z.align!==z.root;)z=z.align,tt++,0<z.vi&&(rt=sw(z,y),rt.sd.shift=Math.min(rt.sd.shift,z.sd.shift+z.zc+z.qg-(rt.zc+rt.qg+(b?rt.width:rt.height)+a.columnSpacing)));rt=z.vi+1}while(tt<y.length&&rt<y[tt].length&&z.sd===y[tt][rt].sd)}for(a=new ke,y=Fi(y),tt=y.next();!tt.done;tt=y.next())for(x=Fi(tt.value),tt=x.next();!tt.done;tt=x.next())tt=tt.value,tt.zc=tt.zc+tt.sd.shift+tt.qg,z=b?tt.width:tt.height,a.add(tt,E?-tt.zc-z:tt.zc);return a}function ow(a,y,x){if(isNaN(y.zc)){y.zc=0;var E=y;do{if(0<E.vi){var b=sw(E,x),z=b.root;ow(a,z,x),y.sd===y&&(y.sd=z.sd);var tt=a.K===90||a.K===270?b.width:b.height;y.sd===z.sd&&(y.zc=Math.max(y.zc,z.zc+b.qg+tt-E.qg+a.columnSpacing))}E=E.align}while(E!==y);for(;E.align!==y;)E=E.align,E.zc=y.zc,E.sd=y.sd}}function sw(a,y){var x=a.Tz;return a=a.vi,1>a&&se("Could not determine previous vertex in layer"),y[x][a-1]}vo.prototype.u=function(a){for(var y=[],x=0;x<arguments.length;++x)y[x]=arguments[x];x=-1;for(var E=li(),b=li(),z=1/0,tt=0;4>tt;tt++)if(y[tt]){var rt=qw(this,y[tt],E,b,tt);rt<z&&(x=tt,z=rt)}for(z={},tt=0;4>tt;z={delta:z.delta},tt++)y[tt]&&(z.delta=tt===0||tt===2?E[x]-E[tt]:b[x]-b[tt],z.delta!==0&&y[tt].each(function(ot){return function(lt){lt.value+=ot.delta}}(z)));ci(E),ci(b)};function qw(a,y,x,E,b){if(!y||y.count===0)return x[b]=0,E[b]=0,1/0;var z=1/0,tt=-1/0;return y.each(function(rt){var ot=rt.key;rt=rt.value,ot=a.K===90||a.K===270?ot.width:ot.height,rt<z&&(z=rt),rt+ot>tt&&(tt=rt+ot)}),x[b]=z,E[b]=tt,tt-z}vo.prototype.commitLayout=function(){if(this.setsPortSpots)for(var a=rm(this,!0),y=rm(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 rm(a,y){return a.K===270?y?Yo:js:a.K===90?y?js:Yo:a.K===180?y?Fo:hs:y?hs:Fo}vo.prototype.commitNodes=function(){this.he=[],this.Ld=[],this.Kd=[],this.Ta=[];for(var a=0;a<=this.Ia;a++)this.he[a]=0,this.Ld[a]=0,this.Kd[a]=0,this.Ta[a]=0;for(a=this.network.vertexes.iterator;a.next();){var y=a.value,x=y.layer;this.he[x]=Math.max(this.he[x],this.nodeMinLayerSpace(y,!0)),this.Ld[x]=Math.max(this.Ld[x],this.nodeMinLayerSpace(y,!1))}y=0,x=this.ie;for(var E=0;E<=this.Ia;E++){var b=x;0>=this.he[E]+this.Ld[E]&&(b=0),0<E&&(y+=b/2),this.K===90||this.K===0?(y+=this.Ld[E],this.Kd[E]=y,y+=this.he[E]):(y+=this.he[E],this.Kd[E]=y,y+=this.Ld[E]),E<this.Ia&&(y+=b/2),this.Ta[E]=y}for(x=y,y=this.arrangementOrigin,E=0;E<=this.Ia;E++)this.K===270?this.Kd[E]=y.y+this.Kd[E]:this.K===90?(this.Kd[E]=y.y+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]):this.K===180?this.Kd[E]=y.x+this.Kd[E]:(this.Kd[E]=y.x+x-this.Kd[E],this.Ta[E]=x-this.Ta[E]);x=this.ve!==0,a.reset(),E=this.K===270||this.K===90;for(var z=1/0,tt=b=1/0,rt=-1/0;a.next();){var ot=a.value,lt=ot.layer,ut=ot.column|0;E?(tt=y.x+this.kc*ut,lt=this.Kd[lt]):(tt=this.Kd[lt],lt=y.y+this.kc*ut),ot.centerX=tt,ot.centerY=lt,x&&isFinite(ot.zc)&&(E?ot.node?ot.x=y.x+ot.zc:ot.centerX=y.x+ot.zc:ot.node?ot.y=y.y+ot.zc:ot.centerY=y.y+ot.zc),z=Math.min(ot.x,z),b=Math.min(ot.y,b),E?(tt=z,rt=Math.max(rt,ot.bounds.right)):(tt=b,rt=Math.max(rt,ot.bounds.bottom))}for(this.xw=rt-tt,z=y.x-z,y=y.y-b,this.Rf=new Ot(x&&E?0:z,x&&!E?0:y),a.reset();a.next();)x=a.value,x.x+=z,x.y+=y,x.commit()},vo.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 Oe(0,0,x,Math.abs(this.Ta[0]))):y.push(new Oe(0,this.Ta[E-1],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===90?E===0?y.push(new Oe(0,this.Ta[0],x,Math.abs(this.Ta[0]-a))):y.push(new Oe(0,this.Ta[E],x,Math.abs(this.Ta[E-1]-this.Ta[E]))):this.K===180?E===0?y.push(new Oe(0,0,Math.abs(this.Ta[0]),x)):y.push(new Oe(this.Ta[E-1],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x)):E===0?y.push(new Oe(this.Ta[0],0,Math.abs(this.Ta[0]-a),x)):y.push(new Oe(this.Ta[E],0,Math.abs(this.Ta[E-1]-this.Ta[E]),x));this.commitLayers(y,this.Rf)},vo.prototype.commitLayers=function(){},vo.prototype.commitLinks=function(){for(var a=this.network.edges.iterator,y;a.next();)y=a.value.link,y!==null&&(y.uh(),y.Fj(),y.zf());for(a.reset();a.next();)y=a.value.link,y!==null&&y.vg();for(a.reset();a.next();){var x=a.value;if(y=x.link,y!==null){y.uh();var E=y,b=E.fromNode,z=E.toNode,tt=E.fromPort,rt=E.toPort;if(b!==null){var ot=b.findVisibleNode();ot!==null&&ot!==b&&(b=ot,tt=ot.port)}z!==null&&(ot=z.findVisibleNode(),ot!==null&&ot!==z&&(z=ot,rt=ot.port));var lt=y.computeSpot(!0,tt);ot=y.computeSpot(!1,rt);var ut=x.fromVertex,ft=x.toVertex;if(x.valid)y.curve===ql&&y.pointsCount===4&&(ut.column===ft.column&&this.alignOption===0?(x=y.getLinkPoint(b,tt,lt,!0,!1,z,rt),rt=y.getLinkPoint(z,rt,ot,!1,!1,b,tt),x.w()||x.set(b.actualBounds.center),rt.w()||rt.set(z.actualBounds.center),y.Fj(),y.yf(x.x,x.y),y.yf((2*x.x+rt.x)/3,(2*x.y+rt.y)/3),y.yf((x.x+2*rt.x)/3,(x.y+2*rt.y)/3),y.yf(rt.x,rt.y)):(x=E=!1,tt!==null&&lt===pr&&(E=!0),rt!==null&&ot===pr&&(x=!0),(E||x)&&(ot=null,E&&(ot=y.getLinkPointFromPoint(b,tt,tt.ga(cr),y.i(3),!0),ot.w()||ot.set(b.actualBounds.center),y.L(0,ot.x,ot.y)),b=null,x&&(b=y.getLinkPointFromPoint(z,rt,rt.ga(cr),y.i(0),!1),b.w()||b.set(z.actualBounds.center),y.L(3,b.x,b.y)),ot&&(z=y.i(2),y.L(1,(2*ot.x+z.x)/3,(2*ot.y+z.y)/3)),b&&(z=y.i(1),y.L(2,(2*b.x+z.x)/3,(2*b.y+z.y)/3))))),y.zf();else if(ut.layer===ft.layer)y.zf();else{var yt=!1,Mt=!1,Tt=this.ie,Dt=y.firstPickIndex+1;if(y.isOrthogonal){Mt=!0;var $t=y.pointsCount;4<$t&&y.points.removeRange(2,$t-3)}else if(y.curve===ql)yt=!0,$t=y.pointsCount,4<$t&&y.points.removeRange(2,$t-3),$t===4&&(Dt=2);else{$t=y.pointsCount;var Vt=lt===pr,ae=ot===pr;2<$t&&Vt&&ae?y.points.removeRange(1,$t-2):3<$t&&Vt&&!ae?y.points.removeRange(1,$t-3):3<$t&&!Vt&&ae?y.points.removeRange(2,$t-2):4<$t&&!Vt&&!ae&&y.points.removeRange(2,$t-3)}if(x.rev){for(;ft!==null&&ut!==ft;){var ce=$t=null;for(Vt=ft.sourceEdges.iterator;Vt.next()&&(ae=Vt.value,ae.link!==x.link||($t=ae.fromVertex,ce=ae.toVertex,$t.node!==null)););if($t===null)break;if($t!==ut){Vt=y.i(Dt-1).x,ae=y.i(Dt-1).y;var ge=$t.centerX,we=$t.centerY;if(Mt)this.K===180||this.K===0?Dt===y.firstPickIndex+1?(y.m(Dt++,Vt,ae),y.m(Dt++,Vt,we)):(ce!==null?ce.centerY:ae)!==we&&(ce=this.Ta[$t.layer-1]+this.Rf.x,y.m(Dt++,ce,ae),y.m(Dt++,ce,we)):Dt===y.firstPickIndex+1?(y.m(Dt++,Vt,ae),y.m(Dt++,ge,ae)):(ce!==null?ce.centerX:Vt)!==ge&&(ce=this.Ta[$t.layer-1]+this.Rf.y,y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce));else if(Dt===y.firstPickIndex+1){ce=Math.max(10,this.he[ft.layer]);var He=Math.max(10,this.Ld[ft.layer]);if(yt)this.K===180?ge<=ft.bounds.x?(ft=ft.bounds.x,y.m(Dt++,ft-ce,we),y.m(Dt++,ft,we),y.m(Dt++,ft+He,we)):(y.m(Dt++,ge-ce,we),y.m(Dt++,ge,we),y.m(Dt++,ge+He,we)):this.K===90?we>=ft.bounds.bottom?(ft=ft.bounds.y+ft.bounds.height,y.m(Dt++,ge,ft+He),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft-ce)):(y.m(Dt++,ge,we+He),y.m(Dt++,ge,we),y.m(Dt++,ge,we-ce)):this.K===270?we<=ft.bounds.y?(ft=ft.bounds.y,y.m(Dt++,ge,ft-ce),y.m(Dt++,ge,ft),y.m(Dt++,ge,ft+He)):(y.m(Dt++,ge,we-ce),y.m(Dt++,ge,we),y.m(Dt++,ge,we+He)):this.K===0&&(ge>=ft.bounds.right?(ft=ft.bounds.x+ft.bounds.width,y.m(Dt++,ft+He,we),y.m(Dt++,ft,we),y.m(Dt++,ft-ce,we)):(y.m(Dt++,ge+He,we),y.m(Dt++,ge,we),y.m(Dt++,ge-ce,we)));else{y.m(Dt++,Vt,ae);var di=0;this.K===180||this.K===0?((this.K===180?ge>=ft.bounds.right:ge<=ft.bounds.x)&&(di=(this.K===0?-ce:He)/2),y.m(Dt++,Vt+di,we)):((this.K===270?we>=ft.bounds.bottom:we<=ft.bounds.y)&&(di=(this.K===90?-ce:He)/2),y.m(Dt++,ge,ae+di)),y.m(Dt++,ge,we)}}else ce=Math.max(10,this.he[$t.layer]),He=Math.max(10,this.Ld[$t.layer]),yt?this.K===180?(y.m(Dt++,ge-ce-Tt,we),y.m(Dt++,Math.min(ge-ce+Tt/2,ge),we),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,Math.max(ge+He-Tt/2,ge),we),y.m(Dt++,ge+He+Tt,we)):this.K===90?(y.m(Dt++,ge,we+He+Tt),y.m(Dt++,ge,Math.max(we+He-Tt/2,we)),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,ge,Math.min(we-ce+Tt/2,we)),y.m(Dt++,ge,we-ce-Tt)):this.K===270?(y.m(Dt++,ge,we-ce-Tt),y.m(Dt++,ge,Math.min(we-ce+Tt/2,we)),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,ge,Math.max(we+He-Tt/2,we)),y.m(Dt++,ge,we+He+Tt)):(y.m(Dt++,ge+He+Tt,we),y.m(Dt++,Math.max(ge+He-Tt/2,ge),we),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,Math.min(ge-ce+Tt/2,ge),we),y.m(Dt++,ge-ce-Tt,we)):y.m(Dt++,ge,we)}ft=$t}(rt===null||lt!==pr||Mt)&&(Vt=y.i(Dt-1).x,ae=y.i(Dt-1).y,ge=y.i(Dt).x,we=y.i(Dt).y,Mt?(Tt=this.Ld[ut.layer],this.K===180||this.K===0?(Mt=ae,Mt>=ut.bounds.y&&Mt<=ut.bounds.bottom&&(this.K===180?ge>=ut.bounds.x:ge<=ut.bounds.right)&&(ft=ut.centerX+(this.K===180?-Tt:Tt),Mt<ut.bounds.y+ut.bounds.height/2?Mt=ut.bounds.y-this.kc/2:Mt=ut.bounds.bottom+this.kc/2,y.m(Dt++,ft,ae),y.m(Dt++,ft,Mt)),y.m(Dt++,ge,Mt)):(Mt=Vt,Mt>=ut.bounds.x&&Mt<=ut.bounds.right&&(this.K===270?we>=ut.bounds.y:we<=ut.bounds.bottom)&&(ft=ut.centerY+(this.K===270?-Tt:Tt),Mt<ut.bounds.x+ut.bounds.width/2?Mt=ut.bounds.x-this.kc/2:Mt=ut.bounds.right+this.kc/2,y.m(Dt++,Vt,ft),y.m(Dt++,Mt,ft)),y.m(Dt++,Mt,we)),y.m(Dt++,ge,we)):yt?(ce=Math.max(10,this.he[ut.layer]),He=Math.max(10,this.Ld[ut.layer]),this.K===180&&ge>=ut.bounds.x?(ft=ut.bounds.x+ut.bounds.width,y.L(Dt-2,ft,ae),y.L(Dt-1,ft+He,ae)):this.K===90&&we<=ut.bounds.bottom?(ft=ut.bounds.y,y.L(Dt-2,Vt,ft),y.L(Dt-1,Vt,ft-ce)):this.K===270&&we>=ut.bounds.y?(ft=ut.bounds.y+ut.bounds.height,y.L(Dt-2,Vt,ft),y.L(Dt-1,Vt,ft+He)):this.K===0&&ge<=ut.bounds.right&&(ft=ut.bounds.x,y.L(Dt-2,ft,ae),y.L(Dt-1,ft-ce,ae))):(ce=Math.max(10,this.he[ut.layer]),He=Math.max(10,this.Ld[ut.layer]),Mt=0,this.K===180||this.K===0?((this.K===180?ge<=ut.bounds.x:ge>=ut.bounds.right)&&(Mt=(this.K===0?He:-ce)/2),y.m(Dt++,ge+Mt,ae)):((this.K===270?we<=ut.bounds.y:we>=ut.bounds.bottom)&&(Mt=(this.K===90?He:-ce)/2),y.m(Dt++,Vt,we+Mt)),y.m(Dt++,ge,we)))}else{for(;ut!==null&&ut!==ft;){for(ce=$t=null,ut=ut.destinationEdges.iterator;ut.next()&&(Vt=ut.value,Vt.link!==x.link||($t=Vt.toVertex,ce=Vt.fromVertex,ce.node!==null&&(ce=null),$t.node!==null)););if($t===null)break;$t!==ft&&(Vt=y.i(Dt-1).x,ae=y.i(Dt-1).y,ge=$t.centerX,we=$t.centerY,Mt?this.K===180||this.K===0?(ce!==null?ce.centerY:ae)!==we&&(ce=this.Ta[$t.layer]+this.Rf.x,Dt===y.firstPickIndex+1&&(ce=this.K===0?Math.max(ce,Vt):Math.min(ce,Vt)),y.m(Dt++,ce,ae),y.m(Dt++,ce,we)):(ce!==null?ce.centerX:Vt)!==ge&&(ce=this.Ta[$t.layer]+this.Rf.y,Dt===y.firstPickIndex+1&&(ce=this.K===90?Math.max(ce,ae):Math.min(ce,ae)),y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce)):(ce=Math.max(10,this.he[$t.layer]),He=Math.max(10,this.Ld[$t.layer]),yt?this.K===180?(y.m(Dt++,ge+He+Tt,we),y.m(Dt++,Math.max(ge+He-Tt/2,ge),we),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,Math.min(ge-ce+Tt/2,ge),we),y.m(Dt++,ge-ce-Tt,we)):this.K===90?(y.m(Dt++,ge,we-ce-Tt),y.m(Dt++,ge,Math.min(we-ce+Tt/2,we)),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,ge,Math.max(we+He-Tt/2,we)),y.m(Dt++,ge,we+He+Tt)):this.K===270?(y.m(Dt++,ge,we+He+Tt),y.m(Dt++,ge,Math.max(we+He-Tt/2,we)),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,ge,Math.min(we-ce+Tt/2,we)),y.m(Dt++,ge,we-ce-Tt)):(y.m(Dt++,ge-ce-Tt,we),y.m(Dt++,Math.min(ge-ce+Tt/2,ge),we),y.m(Dt++,ge,we),y.m(Dt++,ge,we),y.m(Dt++,Math.max(ge+He-Tt/2,ge),we),y.m(Dt++,ge+He+Tt,we)):this.K===180?(y.m(Dt++,ge+He,we),y.m(Dt++,ge-ce,we)):this.K===90?(y.m(Dt++,ge,we-ce),y.m(Dt++,ge,we+He)):this.K===270?(y.m(Dt++,ge,we+He),y.m(Dt++,ge,we-ce)):(y.m(Dt++,ge-ce,we),y.m(Dt++,ge+He,we)))),ut=$t}Mt&&(Vt=y.i(Dt-1).x,ae=y.i(Dt-1).y,ge=y.i(Dt).x,we=y.i(Dt).y,this.K===180||this.K===0?ae!==we&&(ce=this.K===0?Math.min(Math.max((ge+Vt)/2,this.Ta[ft.layer]+this.Rf.x),ge):Math.max(Math.min((ge+Vt)/2,this.Ta[ft.layer]+this.Rf.x),ge),y.m(Dt++,ce,ae),y.m(Dt++,ce,we)):Vt!==ge&&(ce=this.K===90?Math.min(Math.max((we+ae)/2,this.Ta[ft.layer]+this.Rf.y),we):Math.max(Math.min((we+ae)/2,this.Ta[ft.layer]+this.Rf.y),we),y.m(Dt++,Vt,ce),y.m(Dt++,ge,ce)))}E!==null&&yt&&4<=y.pointsCount&&(tt!==null&&(tt=lt===pr?y.getLinkPointFromPoint(b,tt,tt.ga(cr),y.i(3),!0):y.i(0),lt===pr&&(lt=y.i(2),E=y.i(3),this.direction===90||this.direction===270?(y.L(1,(tt.x+lt.x)/2,lt.y),y.L(2,E.x,(lt.y+E.y)/2)):(y.L(1,lt.x,(tt.y+lt.y)/2),y.L(2,(lt.x+E.x)/2,E.y))),tt.w()||tt.set(b.actualBounds.center),y.L(0,tt.x,tt.y)),rt!==null&&(b=ot===pr?y.getLinkPointFromPoint(z,rt,rt.ga(cr),y.i(y.pointsCount-4),!1):y.i(y.pointsCount-1),ot===pr&&(rt=y.i(y.pointsCount-3),ot=y.i(y.pointsCount-4),this.direction===90||this.direction===270?(y.L(y.pointsCount-2,(b.x+rt.x)/2,rt.y),y.L(y.pointsCount-2,ot.x,(rt.y+ot.y)/2)):(y.L(y.pointsCount-2,rt.x,(b.y+rt.y)/2),y.L(y.pointsCount-3,(rt.x+ot.x)/2,ot.y))),b.w()||b.set(z.actualBounds.center),y.L(y.pointsCount-1,b.x,b.y))),y.zf(),x.commit()}}}this.avoidOrthogonalOverlaps()},vo.prototype.avoidOrthogonalOverlaps=function(){if(!(0>=this.linkSpacing)){for(var a=new ee,y=this.network.edges.iterator;y.next();){var x=y.value.link;x!==null&&x.isOrthogonal&&!a.contains(x)&&a.add(x)}if(0<a.count)if(this.K===90||this.K===270){for(y=0,x=[],a=a.iterator;a.next();){var E=a.value;if(E!==null&&E.isOrthogonal)for(var b=2;b<E.pointsCount-3;b++){var z=E.i(b),tt=E.i(b+1);if(this.B(z.y,tt.y)&&!this.B(z.x,tt.x)){var rt=new gd;rt.layer=Math.floor(z.y/2);var ot=E.i(0),lt=E.i(E.pointsCount-1);if(rt.first=ot.x*ot.x+ot.y,rt.jc=lt.x*lt.x+lt.y,rt.rd=Math.min(z.x,tt.x),rt.Ic=Math.max(z.x,tt.x),rt.index=b,rt.link=E,b+2<E.pointsCount){ot=E.i(b-1),lt=E.i(b+2);var ut=0;ot.y<z.y?ut=lt.y<z.y?3:z.x<tt.x?2:1:ot.y>z.y&&(ut=lt.y>z.y?0:tt.x<z.x?2:1),rt.j=ut}x.push(rt)}}}if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,rt=lt.jc);this.zi(x,this.Ux,z,z+tt);var ft=1;for(rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++){var yt=x[ft];(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc);var Mt=yt.link;z=Mt.i(yt.index),tt=Mt.i(yt.index+1);var Tt=this.linkSpacing*(ut-(lt-1)/2);y++,Mt.uh(),Mt.L(yt.index,z.x,z.y+Tt),Mt.L(yt.index+1,tt.x,tt.y+Tt),Mt.zf()}}z=b}a=E}}else{for(y=0,x=[],a=a.iterator;a.next();)if(E=a.value,E!==null&&E.isOrthogonal)for(b=2;b<E.pointsCount-3;b++)z=E.i(b),tt=E.i(b+1),this.B(z.x,tt.x)&&!this.B(z.y,tt.y)&&(rt=new gd,rt.layer=Math.floor(z.x/2),ot=E.i(0),lt=E.i(E.pointsCount-1),rt.first=ot.x+ot.y*ot.y,rt.jc=lt.x+lt.y*lt.y,rt.rd=Math.min(z.y,tt.y),rt.Ic=Math.max(z.y,tt.y),rt.index=b,rt.link=E,b+2<E.pointsCount&&(ot=E.i(b-1),lt=E.i(b+2),ut=0,ot.x<z.x?ut=lt.x<z.x?3:z.y<tt.y?2:1:ot.x>z.x&&(ut=lt.x>z.x?0:tt.y<z.y?2:1),rt.j=ut),x.push(rt));if(1<x.length)for(x.sort(this.Vx),a=0;a<x.length;){for(z=x[a].layer,E=a+1;E<x.length&&x[E].layer===z;)E++;if(1<E-a)for(z=a;z<E;){for(tt=x[z].Ic,b=a+1;b<E&&x[b].rd<tt;)tt=Math.max(tt,x[b].Ic),b++;if(tt=b-z,1<tt){for(this.zi(x,this.Js,z,z+tt),ut=1,rt=x[z].jc,ot=z;ot<b;ot++)lt=x[ot],lt.jc!==rt&&(ut++,rt=lt.jc);for(this.zi(x,this.Ux,z,z+tt),ft=1,rt=x[z].first,ot=z;ot<b;ot++)lt=x[ot],lt.first!==rt&&(ft++,rt=lt.first);for(ot=!0,lt=ft,ut<ft?(ot=!1,lt=ut,rt=x[z].jc,this.zi(x,this.Js,z,z+tt)):rt=x[z].first,ut=0,ft=z;ft<b;ft++)yt=x[ft],(ot?yt.first:yt.jc)!==rt&&(ut++,rt=ot?yt.first:yt.jc),Mt=yt.link,z=Mt.i(yt.index),tt=Mt.i(yt.index+1),Tt=this.linkSpacing*(ut-(lt-1)/2),y++,Mt.uh(),Mt.L(yt.index,z.x+Tt,z.y),Mt.L(yt.index+1,tt.x+Tt,tt.y),Mt.zf()}z=b}a=E}}}},kt=vo.prototype,kt.Vx=function(a,y){return a instanceof gd&&y instanceof gd&&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},kt.Ux=function(a,y){return a instanceof gd&&y instanceof gd&&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},kt.Js=function(a,y){return a instanceof gd&&y instanceof gd&&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},kt.B=function(a,y){return a-=y,-1<a&&1>a},kt.zi=function(a,y,x,E){var b=a.length,z=E-x;if(!(1>=z))if((0>x||x>=b-1)&&se("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 dd(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 fd(a,y,x){a.He[a.tc[y]]=x}yn.Object.defineProperties(vo.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()):se("LayeredDigraphLayout.direction must be 0, 90, 180, or 270"))}},cycleRemoveOption:{get:function(){return this.Dk},set:function(a){this.Dk===a||a!==Uv&&a!==om&&a!==Qp||(this.Dk=a,this.C())}},layeringOption:{get:function(){return this.Zk},set:function(a){this.Zk===a||a!==sm&&a!==Qv&&a!==Ov||(this.Zk=a,this.C())}},initializeOption:{get:function(){return this.Qk},set:function(a){this.Qk===a||a!==am&&a!==Rv&&a!==Hv||(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!==_v&&a!==lm&&a!==Kv||(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 om=new Te(vo,"CycleDepthFirst",0),Uv=new Te(vo,"CycleGreedy",1),Qp=new Te(vo,"CycleFromLayers",2),sm=new Te(vo,"LayerOptimalLinkLength",0),Qv=new Te(vo,"LayerLongestPathSink",1),Ov=new Te(vo,"LayerLongestPathSource",2),am=new Te(vo,"InitDepthFirstOut",0),Rv=new Te(vo,"InitDepthFirstIn",1),Hv=new Te(vo,"InitNaive",2),_v=new Te(vo,"AggressiveNone",0),lm=new Te(vo,"AggressiveLess",1),Kv=new Te(vo,"AggressiveMore",2),tx=8;vo.className="LayeredDigraphLayout",vo.CycleDepthFirst=om,vo.CycleGreedy=Uv,vo.CycleFromLayers=Qp,vo.LayerOptimalLinkLength=sm,vo.LayerLongestPathSink=Qv,vo.LayerLongestPathSource=Ov,vo.InitDepthFirstOut=am,vo.InitDepthFirstIn=Rv,vo.InitNaive=Hv,vo.AggressiveNone=_v,vo.AggressiveLess=lm,vo.AggressiveMore=Kv,vo.PackNone=0,vo.PackExpand=1,vo.PackStraighten=2,vo.PackMedian=4,vo.PackAll=15,vo.AlignNone=0,vo.AlignUpperLeft=1,vo.AlignUpperRight=2,vo.AlignLowerLeft=4,vo.AlignLowerRight=8,vo.AlignAll=15;function gd(){this.index=this.Ic=this.rd=this.jc=this.first=this.layer=0,this.link=null,this.j=0}gd.className="SegInfo";function Og(a){bo.call(this,a)}Ge(Og,bo),Og.prototype.createVertex=function(){return new hu(this)},Og.prototype.createEdge=function(){return new Op(this)},Og.className="LayeredDigraphNetwork";function hu(a){Gs.call(this,a),this.$n=this.bo=this.ao=this.co=null,this.Za=this.Ag=this.Ig=-1,this.u=NaN,this.F=null,this.valid=!1,this.finish=this.Ll=NaN,this.Dj=0,this.dv=this.ev=null}Ge(hu,Gs);function aw(a,y){return a.index-y.index}function um(a,y){if(!a.$n){for(var x=[],E=Fi(a.destinationEdgesArrayAccess),b=E.next();!b.done;b=E.next())b=b.value,b.valid&&x.push(b);a.$n=x}for(a=Fi(a.$n),x=a.next();!x.done;x=a.next())if(x=x.value,x.toVertex===y)return x;se("Unable to find destination edge to given vertex")}function zv(a){if(!a.co){for(var y=[],x=Fi(a.sourceEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.fromVertex);y.sort(aw),a.co=y}return a.co}function ex(a){if(!a.ao){for(var y=[],x=Fi(a.destinationEdgesArrayAccess),E=x.next();!E.done;E=x.next())E=E.value,E.valid&&y.push(E.toVertex);y.sort(aw),a.ao=y}return a.ao}hu.prototype.Cl=function(a){Gs.prototype.Cl.call(this,a),this.bo=this.co=null},hu.prototype.Kl=function(a){Gs.prototype.Kl.call(this,a),this.bo=this.co=null},hu.prototype.zl=function(a){Gs.prototype.zl.call(this,a),this.$n=this.ao=null},hu.prototype.Jl=function(a){Gs.prototype.Jl.call(this,a),this.$n=this.ao=null},yn.Object.defineProperties(hu.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)}}}),hu.prototype.deleteDestinationEdge=hu.prototype.Jl,hu.prototype.addDestinationEdge=hu.prototype.zl,hu.prototype.deleteSourceEdge=hu.prototype.Kl,hu.prototype.addSourceEdge=hu.prototype.Cl,hu.className="LayeredDigraphVertex";function Op(a){Ol.call(this,a),this.j=this.ia=this.Ha=!1,this.V=this.u=NaN,this.F=this.o=0}Ge(Op,Ol),yn.Object.defineProperties(Op.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)}}}),Op.className="LayeredDigraphEdge";function Hr(a){Wo.call(this),this.Ub=new xe,this.Wn=dm,this.ud=oh,this.vo=gm,this.Bq=ty,this.$v=[],this.td=!0,this.Rb=pm,this.$d=new on(10,10).freeze();var y=new Jf(this);this.W=new xu(y),this.Y=new xu(y),this.ru=[],a&&Object.assign(this,a)}Ge(Hr,Wo),Hr.prototype.cloneProtected=function(a){Wo.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)},Hr.prototype.qb=function(a){a.classType===Hr?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:se("Unknown enum value: "+a):Wo.prototype.qb.call(this,a)},Hr.prototype.createNetwork=function(){return new Jf(this)},Hr.prototype.makeNetwork=function(a){function y(E){if(E instanceof gi)return!E.isLinkLabel&&E.category!=="Comment";if(E instanceof Yn){var b=E.fromNode;return b===null||b.isLinkLabel||b.category==="Comment"?!1:(E=E.toNode,!(E===null||E.isLinkLabel||E.category==="Comment"))}return!1}var x=this.createNetwork();return a instanceof Re?(x.lg(a.nodes,!0,y),x.lg(a.links,!0,y)):a instanceof mr?x.lg(a.memberParts,!1,y):x.lg(a.iterator,!1,y),x},Hr.prototype.doLayout=function(a){this.network===null&&(this.network=this.makeNetwork(a)),this.arrangement!==mm&&(this.arrangementOrigin=this.initialOrigin(this.arrangementOrigin));var y=this.diagram;if(y===null&&a instanceof Re&&(y=a),this.path===dm&&y!==null?this.ud=y.isTreePathToChildren?oh:Yf:this.ud=this.path===dm?oh: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 xe,y=this.Ub.iterator;y.next();){var x=y.value;x instanceof gi?(x=this.network.ki(x),x!==null&&a.add(x)):x instanceof xu&&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,Gv(this,y));for(y=this.network.vertexes,a=null;a=nx(y),0<a.count;)y=lw(this,a),y!==null&&this.Ub.add(y),y.initialized=!0,Gv(this,y),y=a;for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&Aw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&hw(this,y);for(a=this.Ub.iterator;a.next();)y=a.value,y instanceof xu&&cw(this,y);if(this.Cu(),this.layerStyle===vm){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===ey)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 xu&&this.layoutTree(y);this.arrangeTrees(),this.updateParts()}this.network=null,this.Ub=new xe,this.isValidLayout=!0};function nx(a){var y=new xe;for(a=a.iterator;a.next();){var x=a.value;x.initialized||y.add(x)}return y}Hr.prototype.findRoots=function(){for(var a=this.network.vertexes,y=a.iterator;y.next();){var x=y.value;switch(this.ud){case oh:x.sourceEdges.count===0&&this.Ub.add(x);break;case Yf:x.destinationEdges.count===0&&this.Ub.add(x);break;default:se("Unhandled path value "+this.ud.toString())}}this.Ub.count===0&&(a=lw(this,a),a!==null&&this.Ub.add(a))};function lw(a,y){var x=999999,E=null;for(y=y.iterator;y.next();){var b=y.value;switch(a.ud){case oh:b.sourceEdges.count<x&&(x=b.sourceEdges.count,E=b);break;case Yf:b.destinationEdges.count<x&&(x=b.destinationEdges.count,E=b);break;default:se("Unhandled path value "+a.ud.toString())}}return E}function Gv(a,y){if(y!==null){switch(a.ud){case oh:if(0<y.destinationEdges.count){for(var x=new ee,E=y.destinationVertexes;E.next();){var b=E.value;uw(a,y,b)&&x.add(b)}0<x.count&&(y.children=x.Fa())}break;case Yf:if(0<y.sourceEdges.count){for(x=new ee,E=y.sourceVertexes;E.next();)b=E.value,uw(a,y,b)&&x.add(b);0<x.count&&(y.children=x.Fa())}break;default:se("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++)Gv(a,x[y])}}function uw(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}Hr.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 Aw(a,y){if(y!==null){a.initializeTreeVertexValues(y),y.alignment===lh&&a.sortTreeVertexChildren(y);for(var x=0,E=y.childrenCount,b=0,z=y.children,tt=z.length,rt=0;rt<tt;rt++){var ot=z[rt];Aw(a,ot),x+=ot.descendantCount+1,E=Math.max(E,ot.maxChildrenCount),b=Math.max(b,ot.maxGenerationCount)}y.descendantCount=x,y.maxChildrenCount=E,y.maxGenerationCount=0<E?b+1:0}}function ix(a,y){switch(a.vo){default:case gm:return y.parent!==null?y.parent:a.W;case $v:return y.parent===null?a.W:y.parent.parent===null?a.Y:y.parent;case Jv:return y.parent!==null?y.parent.parent!==null?y.parent.parent:a.Y:a.W;case Xv: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}}Hr.prototype.initializeTreeVertexValues=function(a){if(a.copyInheritedPropertiesFrom(ix(this,a)),a.parent!==null&&a.parent.alignment===lh){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 hw(a,y){if(y!==null){a.assignTreeVertexValues(y),y=y.children;for(var x=y.length,E=0;E<x;E++)hw(a,y[E])}}Hr.prototype.assignTreeVertexValues=function(){};function cw(a,y){if(y!==null){y.alignment!==lh&&a.sortTreeVertexChildren(y),y=y.children;for(var x=y.length,E=0;E<x;E++)cw(a,y[E])}}Hr.prototype.sortTreeVertexChildren=function(a){switch(a.sorting){case Rg:break;case Hp:a.children.reverse();break;case _p:a.children.sort(a.comparer);break;case Kp:a.children.sort(a.comparer),a.children.reverse();break;default:se("Unhandled sorting value "+a.sorting.toString())}},Hr.prototype.Cu=function(){if(this.comments)for(var a=this.network.vertexes.iterator;a.next();)this.addComments(a.value)},Hr.prototype.addComments=function(a){var y=a.angle,x=a.parent,E=0,b=!1;x!==null&&(E=x.angle,b=x.alignment,b=pd(b)),y=y===90||y===270,E=E===90||E===270,x=a.childrenCount===0;var z=0,tt=0,rt=0,ot=a.commentSpacing;if(a.node!==null)for(var lt=a.node.Mu();lt.next();){var ut=lt.value;ut.category==="Comment"&&ut.canLayout()&&(a.comments===null&&(a.comments=[]),a.comments.push(ut),ut.Va(),ut=ut.measuredBounds,y&&!x||!b&&!E&&x||b&&E&&x?(z=Math.max(z,ut.width),tt+=ut.height+Math.abs(rt)):(z+=ut.width+Math.abs(rt),tt=Math.max(tt,ut.height)),rt=ot)}a.comments!==null&&(y&&!x||!b&&!E&&x||b&&E&&x?(z+=Math.abs(a.commentMargin),tt=Math.max(0,tt-a.height)):(tt+=Math.abs(a.commentMargin),z=Math.max(0,z-a.width)),b=Oe.allocAt(0,0,a.bounds.width+z,a.bounds.height+tt),a.bounds=b,Oe.free(b))};function pd(a){return a===Fc||a===lh||a===Ec||a===kh}function Rp(a){return a===Fc||a===lh}function jv(a){var y=a.parent;if(y!==null){var x=y.alignment;if(pd(x)){if(Rp(x)){for(y=y.children,x=0;x<y.length&&a!==y[x];)x++;return x%2===0}if(x===Ec)return!0}}return!1}Hr.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=pd(z)),E=E===90||E===270,x=b===90||b===270;for(var tt=a.childrenCount===0,rt=jv(a),ot=0,lt=a.comments,ut=lt.length,ft=Ot.alloc(),yt=0;yt<ut;yt++){var Mt=lt[yt],Tt=Mt.measuredBounds;if(E&&!tt||!z&&!x&&tt||z&&x&&tt){if(135<b&&!z||x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x-a.commentMargin-Tt.width,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();){var Dt=Mt.value;Dt.fromSpot=Fo,Dt.toSpot=hs}else for(ft.h(a.bounds.x+2*a.focus.x-a.commentMargin,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=hs,Dt.toSpot=Fo;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+2*a.focus.x+a.commentMargin,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=hs,Dt.toSpot=Fo;else for(ft.h(a.bounds.x+a.commentMargin-Tt.width,a.bounds.y+ot),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Fo,Dt.toSpot=hs;ot=0<=a.commentSpacing?ot+(Tt.height+a.commentSpacing):ot+(a.commentSpacing-Tt.height)}else{if(135<b&&!z||!x&&rt)if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y-a.commentMargin-Tt.height),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Yo,Dt.toSpot=js;else for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y-a.commentMargin),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=js,Dt.toSpot=Yo;else if(0<=a.commentMargin)for(ft.h(a.bounds.x+ot,a.bounds.y+2*a.focus.y+a.commentMargin),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=js,Dt.toSpot=Yo;else for(ft.h(a.bounds.x+ot,a.bounds.y+a.commentMargin-Tt.height),Mt.move(ft),Mt=Mt.Sd();Mt.next();)Dt=Mt.value,Dt.fromSpot=Yo,Dt.toSpot=js;ot=0<=a.commentSpacing?ot+(Tt.width+a.commentSpacing):ot+(a.commentSpacing-Tt.width)}}if(Ot.free(ft),y=ot-a.commentSpacing-(E?y.height:y.width),this.ud===oh)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)}},Hr.prototype.layoutTree=function(a){if(a!==null){for(var y=a.children,x=y.length,E=0;E<x;E++)this.layoutTree(y[E]);switch(a.compaction){case fm:dw(this,a);break;case zp:if(a.alignment===lh)dw(this,a);else if(a.childrenCount===0)E=a.parent,x=!1,y=0,E!==null&&(y=E.angle,x=E.alignment,x=pd(x)),E=jv(a),a.S.h(0,0),a.Da.h(a.width,a.height),a.parent===null||a.comments===null||(y!==180&&y!==270||x)&&!E?a.la.h(0,0):y===180&&!x||(y===90||y===270)&&E?a.la.h(a.width-2*a.focus.x,0):a.la.h(0,a.height-2*a.focus.y),a.Yo=null,a.kp=null;else{var b=ju(a);y=b===90||b===270;var z=0,tt=a.children,rt=tt.length;for(x=0;x<rt;x++)E=tt[x],z=Math.max(z,y?E.Da.width:E.Da.height);var ot=a.alignment;E=ot===sh;var lt=ot===ah,ut=pd(ot),ft=Math.max(0,a.breadthLimit);x=this.computeLayerSpacing(a);var yt=a.nodeSpacing,Mt=this.computeNodeIndent(a),Tt=a.rowSpacing,Dt=0;(E||lt||a.hm||a.im&&a.maxGenerationCount===1)&&(Dt=Math.max(0,a.rowIndent)),E=a.width;var $t=a.height,Vt=0,ae=0,ce=0,ge=null,we=null,He=0,di=0,Pi=0,wi=0,Gn=0,wn=0,fr=0,rr=0;if(ut&&!Rp(ot)&&135<b&&tt.reverse(),Rp(ot))if(1<rt)for(var oo=0;oo<rt;oo++)oo%2===0&&oo!==rt-1&&(rr=Math.max(rr,y?tt[oo].Da.width:tt[oo].Da.height));else rt===1&&(rr=y?tt[0].Da.width:tt[0].Da.height);if(ut){switch(ot){case Fc:ae=135>b?fw(this,a,tt,rr,Vt,ae):gw(this,a,tt,rr,Vt,ae),rr=ae.x,Vt=ae.width,ae=ae.height;break;case Ec:for(ge=0;ge<rt;ge++)we=tt[ge],ft=we.Da,ce=wn===0?0:Tt,y?(we.S.h(z-ft.width,wi+ce),Vt=Math.max(Vt,ft.width),ae=Math.max(ae,wi+ce+ft.height),wi+=ce+ft.height):(we.S.h(Pi+ce,z-ft.height),Vt=Math.max(Vt,Pi+ce+ft.width),ae=Math.max(ae,ft.height),Pi+=ce+ft.width),wn++;break;case kh:for(ge=0;ge<rt;ge++)we=tt[ge],z=we.Da,ft=wn===0?0:Tt,y?(we.S.h(yt/2+a.focus.x,wi+ft),Vt=Math.max(Vt,z.width),ae=Math.max(ae,wi+ft+z.height),wi+=ft+z.height):(we.S.h(Pi+ft,yt/2+a.focus.y),Vt=Math.max(Vt,Pi+ft+z.width),ae=Math.max(ae,z.height),Pi+=ft+z.width),wn++}ge=Bl(this,2),we=Bl(this,2),y?(ge[0].h(0,0),ge[1].h(0,ae),we[0].h(Vt,0)):(ge[0].h(0,0),ge[1].h(Vt,0),we[0].h(0,ae)),we[1].h(Vt,ae)}else for(oo=0;oo<rt;oo++){var Bo=tt[oo],Xs=Bo.Da;if(y){0<ft&&0<wn&&Pi+yt+Xs.width>ft&&(Pi<z&&rf(a,ot,z-Pi,0,fr,oo-1),Gn++,wn=0,fr=oo,ce=ae,Pi=0,wi=135<b?-ae-Tt:ae+Tt),hm(this,Bo,0,wi);var ta=0;if(wn===0)ge=Bo.Yo,we=Bo.kp,He=Xs.width,di=Xs.height,(ge===null||we===null||b!==ju(Bo))&&(ge=Bl(this,2),we=Bl(this,2),ge[0].h(0,0),ge[1].h(0,di),we[0].h(He,0),we[1].h(He,di));else{var za=li();di=pw(this,a,Bo,ge,we,He,di,za),ta=di.x,ge=za[0],we=za[1],He=di.width,di=di.height,ci(za),Pi<Xs.width&&0>ta&&(Wf(a,-ta,0,fr,oo-1),cm(ge,-ta,0),cm(we,-ta,0),ta=0)}Bo.S.h(ta,wi),Vt=Math.max(Vt,He),ae=Math.max(ae,ce+(Gn===0?0:Tt)+Xs.height),Pi=He}else 0<ft&&0<wn&&wi+yt+Xs.height>ft&&(wi<z&&rf(a,ot,0,z-wi,fr,oo-1),Gn++,wn=0,fr=oo,ce=Vt,wi=0,Pi=135<b?-Vt-Tt:Vt+Tt),hm(this,Bo,Pi,0),ta=0,wn===0?(ge=Bo.Yo,we=Bo.kp,He=Xs.width,di=Xs.height,(ge===null||we===null||b!==ju(Bo))&&(ge=Bl(this,2),we=Bl(this,2),ge[0].h(0,0),ge[1].h(He,0),we[0].h(0,di),we[1].h(He,di))):(za=li(),di=pw(this,a,Bo,ge,we,He,di,za),ta=di.x,ge=za[0],we=za[1],He=di.width,di=di.height,ci(za),wi<Xs.height&&0>ta&&(Wf(a,0,-ta,fr,oo-1),cm(ge,0,-ta),cm(we,0,-ta),ta=0)),Bo.S.h(Pi,ta),ae=Math.max(ae,di),Vt=Math.max(Vt,ce+(Gn===0?0:Tt)+Xs.width),wi=di;wn++}switch(0<Gn&&(y?(ae+=Math.max(0,x),Pi<Vt&&rf(a,ot,Vt-Pi,0,fr,rt-1),0<Dt&&(lt||Wf(a,Dt,0,0,rt-1),Vt+=Dt)):(Vt+=Math.max(0,x),wi<ae&&rf(a,ot,0,ae-wi,fr,rt-1),0<Dt&&(lt||Wf(a,0,Dt,0,rt-1),ae+=Dt))),Dt=lt=0,ot){case Hg:y?lt+=Vt/2-a.focus.x-Mt/2:Dt+=ae/2-a.focus.y-Mt/2;break;case Xf:0<Gn?y?lt+=Vt/2-a.focus.x-Mt/2:Dt+=ae/2-a.focus.y-Mt/2:y?(rr=tt[0].S.x+tt[0].la.x,lt+=rr+(tt[rt-1].S.x+tt[rt-1].la.x+2*tt[rt-1].focus.x-rr)/2-a.focus.x-Mt/2):(rr=tt[0].S.y+tt[0].la.y,Dt+=rr+(tt[rt-1].S.y+tt[rt-1].la.y+2*tt[rt-1].focus.y-rr)/2-a.focus.y-Mt/2);break;case sh:y?(lt-=Mt,Vt+=Mt):(Dt-=Mt,ae+=Mt);break;case ah:y?(lt+=Vt-a.width+Mt,Vt+=Mt):(Dt+=ae-a.height+Mt,ae+=Mt);break;case Fc:y?1<rt?lt+=rr+yt/2-a.focus.x:lt+=tt[0].focus.x-a.focus.x+tt[0].la.x:1<rt?Dt+=rr+yt/2-a.focus.y:Dt+=tt[0].focus.y-a.focus.y+tt[0].la.y;break;case Ec:y?lt+=Vt+yt/2-a.focus.x:Dt+=ae+yt/2-a.focus.y;break;case kh:break;default:ae=this.customAlignment(a,lt,Dt,Vt,ae),lt=ae[0],Dt=ae[1],Vt=ae[2],ae=ae[3]}for(Mt=0;Mt<rt;Mt++)rr=tt[Mt],y?rr.S.h(rr.S.x+rr.la.x-lt,rr.S.y+(135<b?(ut?-ae:-rr.Da.height)+rr.la.y-x:$t+x+rr.la.y)):rr.S.h(rr.S.x+(135<b?(ut?-Vt:-rr.Da.width)+rr.la.x-x:E+x+rr.la.x),rr.S.y+rr.la.y-Dt);if(rt=tt=0,ut?y?(Vt=Vv(a,Vt,lt),0>lt&&(lt=0),135<b&&(Dt+=ae+x),ae+=$t+x,ot===kh&&(tt+=yt/2+a.focus.x),rt+=$t+x):(135<b&&(lt+=Vt+x),Vt+=E+x,ae=Zv(a,ae,Dt),0>Dt&&(Dt=0),ot===kh&&(rt+=yt/2+a.focus.y),tt+=E+x):y?(a.comments===null?E>Vt&&(Vt=Wv(ot,E-Vt,0),tt=Vt.x,rt=Vt.y,Vt=E,lt=0):Vt=Vv(a,Vt,lt),0>lt&&(tt-=lt,lt=0),135<b&&(Dt+=ae+x),ae=Math.max(Math.max(ae,$t),ae+$t+x),rt+=$t+x):(135<b&&(lt+=Vt+x),Vt=Math.max(Math.max(Vt,E),Vt+E+x),a.comments===null?$t>ae&&(ae=Wv(ot,0,$t-ae),tt=ae.x,rt=ae.y,ae=$t,Dt=0):ae=Zv(a,ae,Dt),0>Dt&&(rt-=Dt,Dt=0),tt+=E+x),0<Gn)b=Bl(this,4),Gn=Bl(this,4),y?(b[2].h(0,$t+x),b[3].h(b[2].x,ae),Gn[2].h(Vt,b[2].y),Gn[3].h(Gn[2].x,b[3].y)):(b[2].h(E+x,0),b[3].h(Vt,b[2].y),Gn[2].h(b[2].x,ae),Gn[3].h(b[3].x,Gn[2].y));else{for(b=Bl(this,ge.length+2),Gn=Bl(this,we.length+2),ot=0;ot<ge.length;ot++)ut=ge[ot],b[ot+2].h(ut.x+tt,ut.y+rt);for(ot=0;ot<we.length;ot++)ut=we[ot],Gn[ot+2].h(ut.x+tt,ut.y+rt)}y?(b[0].h(lt,0),b[1].h(b[0].x,$t),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])),Gn[0].h(lt+E,0),Gn[1].h(Gn[0].x,$t),Gn[2].y<Gn[1].y&&(Gn[2].x<Gn[0].x?Gn[2].assign(Gn[1]):Gn[1].assign(Gn[2])),Gn[3].y<Gn[2].y&&(Gn[3].x<Gn[0].x?Gn[3].assign(Gn[2]):Gn[2].assign(Gn[3])),b[2].y-=x/2,Gn[2].y-=x/2):(b[0].h(0,Dt),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])),Gn[0].h(0,Dt+$t),Gn[1].h(E,Gn[0].y),Gn[2].x<Gn[1].x&&(Gn[2].y<Gn[0].y?Gn[2].assign(Gn[1]):Gn[1].assign(Gn[2])),Gn[3].x<Gn[2].x&&(Gn[3].y<Gn[0].y?Gn[3].assign(Gn[2]):Gn[2].assign(Gn[3])),b[2].x-=x/2,Gn[2].x-=x/2),aA(this,ge),aA(this,we),a.Yo=b,a.kp=Gn,a.la.h(lt,Dt),a.Da.h(Vt,ae)}break;default:se("Unhandled compaction value "+a.compaction.toString())}}};function dw(a,y){if(y.childrenCount===0){var x=!1,E=0;y.parent!==null&&(E=y.parent.angle,x=y.parent.alignment,x=pd(x));var b=jv(y);y.S.h(0,0),y.Da.h(y.width,y.height),y.parent===null||y.comments===null||(E!==180&&E!==270||x)&&!b?y.la.h(0,0):E===180&&!x||(E===90||E===270)&&b?y.la.h(y.width-2*y.focus.x,0):y.la.h(0,y.height-2*y.focus.y)}else{E=ju(y),x=E===90||E===270;var z=0;b=y.children;for(var tt=b.length,rt=0;rt<tt;rt++){var ot=b[rt];z=Math.max(z,x?ot.Da.width:ot.Da.height)}var lt=y.alignment,ut=lt===sh,ft=lt===ah;rt=pd(lt);var yt=Math.max(0,y.breadthLimit);ot=a.computeLayerSpacing(y);var Mt=y.nodeSpacing,Tt=a.computeNodeIndent(y),Dt=ut||ft?0:Tt/2,$t=y.rowSpacing,Vt=0;(ut||ft||y.hm||y.im&&y.maxGenerationCount===1)&&(Vt=Math.max(0,y.rowIndent)),ut=y.width;var ae=y.height,ce=0,ge=0,we=0,He=0,di=0,Pi=0,wi=0,Gn=0,wn=0,fr=0;if(rt&&!Rp(lt)&&135<E&&b.reverse(),Rp(lt))if(1<tt)for(var rr=0;rr<tt;rr++){var oo=b[rr],Bo=oo.Da;rr%2===0&&rr!==tt-1?wn=Math.max(wn,(x?Bo.width:Bo.height)+a.computeBusNodeSpacing(oo)-Mt):rr%2!==0&&(fr=Math.max(fr,(x?Bo.width:Bo.height)+a.computeBusNodeSpacing(oo)-Mt))}else tt===1&&(wn=x?b[0].Da.width:b[0].Da.height);if(rt)switch(lt){case Fc:case lh:ge=135>E?fw(a,y,b,wn,ce,ge):gw(a,y,b,wn,ce,ge),wn=ge.x,ce=ge.width,ge=ge.height;break;case Ec:for(yt=0;yt<tt;yt++)Dt=b[yt],we=Dt.Da,fr=wi===0?0:$t,x?(Dt.S.h(z-we.width,di+fr),ce=Math.max(ce,we.width),ge=Math.max(ge,di+fr+we.height),di+=fr+we.height):(Dt.S.h(He+fr,z-we.height),ce=Math.max(ce,He+fr+we.width),ge=Math.max(ge,we.height),He+=fr+we.width),wi++;break;case kh:for(z=0;z<tt;z++)yt=b[z],Dt=yt.Da,we=wi===0?0:$t,x?(yt.S.h(Mt/2+y.focus.x,di+we),ce=Math.max(ce,Dt.width),ge=Math.max(ge,di+we+Dt.height),di+=we+Dt.height):(yt.S.h(He+we,Mt/2+y.focus.y),ce=Math.max(ce,He+we+Dt.width),ge=Math.max(ge,Dt.height),He+=we+Dt.width),wi++}else for(fr=0;fr<tt;fr++)rr=b[fr],oo=rr.Da,x?(0<yt&&0<wi&&He+Mt+oo.width>yt&&(He<z&&rf(y,lt,z-He,0,Gn,fr-1),Pi++,wi=0,Gn=fr,we=ge,He=0,di=135<E?-ge-$t:ge+$t),Bo=wi===0?Dt:Mt,hm(a,rr,0,di),rr.S.h(He+Bo,di),ce=Math.max(ce,He+Bo+oo.width),ge=Math.max(ge,we+(Pi===0?0:$t)+oo.height),He+=Bo+oo.width):(0<yt&&0<wi&&di+Mt+oo.height>yt&&(di<z&&rf(y,lt,0,z-di,Gn,fr-1),Pi++,wi=0,Gn=fr,we=ce,di=0,He=135<E?-ce-$t:ce+$t),Bo=wi===0?Dt:Mt,hm(a,rr,He,0),rr.S.h(He,di+Bo),ge=Math.max(ge,di+Bo+oo.height),ce=Math.max(ce,we+(Pi===0?0:$t)+oo.width),di+=Bo+oo.height),wi++;switch(0<Pi&&(x?(ge+=Math.max(0,ot),He<ce&&rf(y,lt,ce-He,0,Gn,tt-1),0<Vt&&(ft||Wf(y,Vt,0,0,tt-1),ce+=Vt)):(ce+=Math.max(0,ot),di<ge&&rf(y,lt,0,ge-di,Gn,tt-1),0<Vt&&(ft||Wf(y,0,Vt,0,tt-1),ge+=Vt))),Vt=ft=0,lt){case Hg:x?ft+=ce/2-y.focus.x-Tt/2:Vt+=ge/2-y.focus.y-Tt/2;break;case Xf:0<Pi?x?ft+=ce/2-y.focus.x-Tt/2:Vt+=ge/2-y.focus.y-Tt/2:x?(a=b[0].S.x+b[0].la.x,ft+=a+(b[tt-1].S.x+b[tt-1].la.x+2*b[tt-1].focus.x-a)/2-y.focus.x-Tt/2):(a=b[0].S.y+b[0].la.y,Vt+=a+(b[tt-1].S.y+b[tt-1].la.y+2*b[tt-1].focus.y-a)/2-y.focus.y-Tt/2);break;case sh:x?(ft-=Tt,ce+=Tt):(Vt-=Tt,ge+=Tt);break;case ah:x?(ft+=ce-y.width+Tt,ce+=Tt):(Vt+=ge-y.height+Tt,ge+=Tt);break;case Fc:case lh:x?1<tt?ft+=wn+Mt/2-y.focus.x:ft+=b[0].focus.x-y.focus.x+b[0].la.x:1<tt?Vt+=wn+Mt/2-y.focus.y:Vt+=b[0].focus.y-y.focus.y+b[0].la.y;break;case Ec:x?ft+=ce+Mt/2-y.focus.x:Vt+=ge+Mt/2-y.focus.y;break;case kh:break;default:a=a.customAlignment(y,ft,Vt,ce,ge),ft=a[0],Vt=a[1],ce=a[2],ge=a[3]}for(a=0;a<tt;a++)Tt=b[a],x?Tt.S.h(Tt.S.x+Tt.la.x-ft,Tt.S.y+(135<E?(rt?-ge:-Tt.Da.height)+Tt.la.y-ot:ae+ot+Tt.la.y)):Tt.S.h(Tt.S.x+(135<E?(rt?-ce:-Tt.Da.width)+Tt.la.x-ot:ut+ot+Tt.la.x),Tt.S.y+Tt.la.y-Vt);x?(ce=Vv(y,ce,ft),0>ft&&(ft=0),135<E&&(Vt+=ge+ot),ge=Math.max(Math.max(ge,ae),ge+ae+ot)):(135<E&&(ft+=ce+ot),ce=Math.max(Math.max(ce,ut),ce+ut+ot),ge=Zv(y,ge,Vt),0>Vt&&(Vt=0)),y.la.h(ft,Vt),y.Da.h(ce,ge)}}Hr.prototype.customAlignment=function(a,y,x,E,b){return[y,x,E,b]};function fw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Oe(E,0,b,z);if(tt===1)return y=x[0],b=y.Da.width,z=y.Da.height,new Oe(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=ju(y)===90,ut=0,ft=0,yt=0,Mt=0;Mt<tt;Mt++)if(!(Mt%2!==0||1<tt&&Mt===tt-1)){var Tt=x[Mt],Dt=Tt.Da,$t=ut===0?0:ot;if(lt){var Vt=a.computeBusNodeSpacing(Tt)-rt;Tt.S.h(E-(Dt.width+Vt),yt+$t),b=Math.max(b,Dt.width+Vt),z=Math.max(z,yt+$t+Dt.height),yt+=$t+Dt.height}else Vt=a.computeBusNodeSpacing(Tt)-rt,Tt.S.h(ft+$t,E-(Dt.height+Vt)),z=Math.max(z,Dt.height+Vt),b=Math.max(b,ft+$t+Dt.width),ft+=$t+Dt.width;ut++}for(ut=0,Tt=ft,Mt=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){$t=x[Dt],Vt=$t.Da;var ae=ut===0?0:ot;if(lt){var ce=a.computeBusNodeSpacing($t)-rt;$t.S.h(ft+ce,yt+ae),b=Math.max(b,ft+Vt.width+ce),z=Math.max(z,yt+ae+Vt.height),yt+=ae+Vt.height}else ce=a.computeBusNodeSpacing($t)-rt,$t.S.h(ft+ae,yt+ce),b=Math.max(b,ft+ae+Vt.width),z=Math.max(z,yt+Vt.height+ce),ft+=ae+Vt.width;ut++}return 1<tt&&tt%2===1&&(x=x[tt-1],tt=x.Da,a=a.computeBusLastRowSpacing(x,lt?Math.max(Math.abs(Mt),Math.abs(yt)):Math.max(Math.abs(Tt),Math.abs(ft))),lt?(x.S.h(E+rt/2-x.focus.x-x.la.x,z+a),lt=E+rt/2-x.focus.x-x.la.x,b=Math.max(b,lt+tt.width),0>lt&&(b-=lt),z=Math.max(z,Math.max(Mt,yt)+a+tt.height),0>x.S.x&&(E=Am(y,x.S.x,!1,E,rt))):(x.S.h(b+a,E+rt/2-x.focus.y-x.la.y),b=Math.max(b,Math.max(Tt,ft)+a+tt.width),yt=E+rt/2-x.focus.y-x.la.y,z=Math.max(z,yt+tt.height),0>yt&&(z-=yt),0>x.S.y&&(E=Am(y,x.S.y,!0,E,rt)))),new Oe(E,0,b,z)}function gw(a,y,x,E,b,z){var tt=x.length;if(tt===0)return new Oe(E,0,b,z);if(tt===1)return x=x[0],b=x.Da.width,z=x.Da.height,new Oe(E,0,b,z);for(var rt=y.nodeSpacing,ot=y.rowSpacing,lt=ju(y)===270,ut=0,ft=0,yt=0,Mt=0;Mt<tt;Mt++)if(!(Mt%2!==0||1<tt&&Mt===tt-1)){var Tt=x[Mt],Dt=Tt.Da,$t=ut===0?0:ot;if(lt){var Vt=a.computeBusNodeSpacing(Tt)-rt;yt-=$t+Dt.height,Tt.S.h(E-(Dt.width+Vt),yt),b=Math.max(b,Dt.width+Vt),z=Math.max(z,Math.abs(yt))}else Vt=a.computeBusNodeSpacing(Tt)-rt,ft-=$t+Dt.width,Tt.S.h(ft,E-(Dt.height+Vt)),z=Math.max(z,Dt.height+Vt),b=Math.max(b,Math.abs(ft));ut++}for(ut=0,Tt=ft,Mt=yt,lt?(ft=E+rt,yt=0):(ft=0,yt=E+rt),Dt=0;Dt<tt;Dt++)if(Dt%2!==0){$t=x[Dt],Vt=$t.Da;var ae=ut===0?0:ot;if(lt){var ce=a.computeBusNodeSpacing($t)-rt;yt-=ae+Vt.height,$t.S.h(ft+ce,yt),b=Math.max(b,ft+Vt.width+ce),z=Math.max(z,Math.abs(yt))}else ce=a.computeBusNodeSpacing($t)-rt,ft-=ae+Vt.width,$t.S.h(ft,yt+ce),z=Math.max(z,yt+Vt.height+ce),b=Math.max(b,Math.abs(ft));ut++}for(1<tt&&tt%2===1&&(ot=x[tt-1],ut=ot.Da,a=a.computeBusLastRowSpacing(ot,lt?Math.max(Math.abs(Mt),Math.abs(yt)):Math.max(Math.abs(Tt),Math.abs(ft))),lt?(ot.S.h(E+rt/2-ot.focus.x-ot.la.x,-z-ut.height-a),ft=E+rt/2-ot.focus.x-ot.la.x,b=Math.max(b,ft+ut.width),0>ft&&(b-=ft),z=Math.max(z,Math.abs(Math.min(Mt,yt))+a+ut.height),0>ot.S.x&&(E=Am(y,ot.S.x,!1,E,rt))):(ot.S.h(-b-ut.width-a,E+rt/2-ot.focus.y-ot.la.y),b=Math.max(b,Math.abs(Math.min(Tt,ft))+a+ut.width),yt=E+rt/2-ot.focus.y-ot.la.y,z=Math.max(z,yt+ut.height),0>yt&&(z-=yt),0>ot.S.y&&(E=Am(y,ot.S.y,!0,E,rt)))),y=0;y<tt;y++)rt=x[y],lt?rt.S.h(rt.S.x,rt.S.y+z):rt.S.h(rt.S.x+b,rt.S.y);return new Oe(E,0,b,z)}Hr.prototype.computeBusNodeSpacing=function(a){return a.parent===null?0:a.parent.nodeSpacing},Hr.prototype.computeBusLastRowSpacing=function(a){return a.parent===null?0:a.parent.rowSpacing};function Am(a,y,x,E,b){a=a.children;for(var z=a.length,tt=0;tt<z;tt++)x?a[tt].S.h(a[tt].S.x,a[tt].S.y-y):a[tt].S.h(a[tt].S.x-y,a[tt].S.y);return y=a[z-1],Math.max(E,x?y.la.y+y.focus.y-b/2:y.la.x+y.focus.x-b/2)}function Vv(a,y,x){switch(a.alignment){case Xf:case Hg:return x+a.width>y&&(y=x+a.width),0>x&&(y-=x),y;case sh:return a.width>y?a.width:y;case ah:return 2*a.focus.x>y?a.width:y+a.width-2*a.focus.x;case Fc:case lh:return Math.max(a.width,Math.max(y,x+a.width)-Math.min(0,x));case Ec:return a.width-a.focus.x+a.nodeSpacing/2+y;case kh:return Math.max(a.width,a.focus.x+a.nodeSpacing/2+y);default:return y}}function Zv(a,y,x){switch(a.alignment){case Xf:case Hg:return x+a.height>y&&(y=x+a.height),0>x&&(y-=x),y;case sh:return a.height>y?a.height:y;case ah:return 2*a.focus.y>y?a.height:y+a.height-2*a.focus.y;case Fc:case lh:return Math.max(a.height,Math.max(y,x+a.height)-Math.min(0,x));case Ec:return a.height-a.focus.y+a.nodeSpacing/2+y;case kh:return Math.max(a.height,a.focus.y+a.nodeSpacing/2+y);default:return y}}function Wv(a,y,x){switch(a){case Hg:y/=2,x/=2;break;case Xf:y/=2,x/=2;break;case sh:x=y=0;break;case ah:break;default:se("Unhandled alignment value "+a.toString())}return new Ot(y,x)}function rf(a,y,x,E,b,z){y=Wv(y,x,E),Wf(a,y.x,y.y,b,z)}function Wf(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 hm(a,y,x,E){var b=y.parent;switch(a.ud){case oh:for(a=y.sourceEdges;a.next();)y=a.value,y.fromVertex===b&&y.relativePoint.h(x,E);break;case Yf:for(a=y.destinationEdges;a.next();)y=a.value,y.toVertex===b&&y.relativePoint.h(x,E);break;default:se("Unhandled path value "+a.ud.toString())}}function cm(a,y,x){for(var E=0;E<a.length;E++){var b=a[E];b.x+=y,b.y+=x}}function pw(a,y,x,E,b,z,tt,rt){var ot=ju(y),lt=ot===90||ot===270,ut=y.nodeSpacing;y=E;var ft=b;E=z;var yt=tt,Mt=x.Yo,Tt=x.kp;tt=x.Da;var Dt=lt?Math.max(yt,tt.height):Math.max(E,tt.width);if((Mt===null||ot!==ju(x))&&(Mt=Bl(a,2),Tt=Bl(a,2),lt?(Mt[0].h(0,0),Mt[1].h(0,tt.height),Tt[0].h(tt.width,0),Tt[1].h(Tt[0].x,Mt[1].y)):(Mt[0].h(0,0),Mt[1].h(tt.width,0),Tt[0].h(0,tt.height),Tt[1].h(Mt[1].x,Tt[0].y))),lt){if(yt=9999999,!(ft===null||2>ft.length||Mt===null||2>Mt.length))for(b=x=0;x<ft.length&&b<Mt.length;){z=ft[x];var $t=Mt[b];ot=$t.x,lt=$t.y,ot+=E;var Vt=z;x+1<ft.length&&(Vt=ft[x+1]);var ae=$t;$t=ae.x,ae=ae.y,b+1<Mt.length&&(ae=Mt[b+1],$t=ae.x,ae=ae.y,$t+=E);var ce=yt;z.y===lt?ce=ot-z.x:z.y>lt&&z.y<ae?ce=ot+(z.y-lt)/(ae-lt)*($t-ot)-z.x:lt>z.y&&lt<Vt.y&&(ce=ot-(z.x+(lt-z.y)/(Vt.y-z.y)*(Vt.x-z.x))),ce<yt&&(yt=ce),Vt.y<=z.y?x++:ae<=lt?b++:(Vt.y<=ae&&x++,ae<=Vt.y&&b++)}if(yt=E-yt,yt+=ut,x=Mt,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Bl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].y<y[0].y;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(;ot<y.length;)lt=y[ot++],ut[E++].h(lt.x,lt.y);for(ot=y[y.length-1].y;z<x.length&&x[z].y<=ot;)z++;for(;z<x.length&&x[z].y>ot;)lt=x[z++],ut[E++].h(lt.x+b,lt.y);for(x=Bl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);aA(a,ut),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Bl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].y<z[0].y;)Vt=ft[x++],ut[b++].h(Vt.x,Vt.y);for(;lt<z.length;)Vt=z[lt++],ut[b++].h(Vt.x+ot,Vt.y);for(z=z[z.length-1].y;x<ft.length&&ft[x].y<=z;)x++;for(;x<ft.length&&ft[x].y>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Bl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);aA(a,ut),b=z}return z=Math.max(0,yt)+tt.width,tt=Dt,aA(a,y),aA(a,Mt),aA(a,ft),aA(a,Tt),rt[0]=E,rt[1]=b,new Oe(yt,0,z,tt)}if(E=9999999,!(ft===null||2>ft.length||Mt===null||2>Mt.length))for(b=x=0;x<ft.length&&b<Mt.length;)z=ft[x],$t=Mt[b],ot=$t.x,lt=$t.y,lt+=yt,Vt=z,x+1<ft.length&&(Vt=ft[x+1]),ae=$t,$t=ae.x,ae=ae.y,b+1<Mt.length&&(ae=Mt[b+1],$t=ae.x,ae=ae.y,ae+=yt),ce=E,z.x===ot?ce=lt-z.y:z.x>ot&&z.x<$t?ce=lt+(z.x-ot)/($t-ot)*(ae-lt)-z.y:ot>z.x&&ot<Vt.x&&(ce=lt-(z.y+(ot-z.x)/(Vt.x-z.x)*(Vt.y-z.y))),ce<E&&(E=ce),Vt.x<=z.x?x++:$t<=ot?b++:(Vt.x<=$t&&x++,$t<=Vt.x&&b++);if(yt-=E,yt+=ut,x=Mt,b=yt,y===null||2>y.length||x===null||2>x.length)E=null;else{for(ut=Bl(a,y.length+x.length),E=z=ot=0;z<x.length&&x[z].x<y[0].x;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(;ot<y.length;)lt=y[ot++],ut[E++].h(lt.x,lt.y);for(ot=y[y.length-1].x;z<x.length&&x[z].x<=ot;)z++;for(;z<x.length&&x[z].x>ot;)lt=x[z++],ut[E++].h(lt.x,lt.y+b);for(x=Bl(a,E),ot=0;ot<E;ot++)x[ot].assign(ut[ot]);aA(a,ut),E=x}if(z=Tt,ot=yt,ft===null||2>ft.length||z===null||2>z.length)b=null;else{for(ut=Bl(a,ft.length+z.length),b=lt=x=0;x<ft.length&&ft[x].x<z[0].x;)Vt=ft[x++],ut[b++].h(Vt.x,Vt.y);for(;lt<z.length;)Vt=z[lt++],ut[b++].h(Vt.x,Vt.y+ot);for(z=z[z.length-1].x;x<ft.length&&ft[x].x<=z;)x++;for(;x<ft.length&&ft[x].x>z;)ot=ft[x++],ut[b++].h(ot.x,ot.y);for(z=Bl(a,b),x=0;x<b;x++)z[x].assign(ut[x]);aA(a,ut),b=z}return z=Dt,tt=Math.max(0,yt)+tt.height,aA(a,y),aA(a,Mt),aA(a,ft),aA(a,Tt),rt[0]=E,rt[1]=b,new Oe(yt,0,z,tt)}function Bl(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 Ot;return a}function aA(a,y){var x=y.length,E=a.ru[x];E===void 0&&(E=[],a.ru[x]=E),E.push(y)}Hr.prototype.arrangeTrees=function(){if(this.Rb===mm)for(var a=this.Ub.iterator;a.next();){var y=a.value;if(y instanceof xu){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),Yv(this,y,x,E)}}}else{for(a=[],y=this.Ub.iterator;y.next();)x=y.value,x instanceof xu&&a.push(x);switch(this.sorting){case Rg:break;case Hp:a.reverse();break;case _p:a.sort(this.comparer);break;case Kp:a.sort(this.comparer),a.reverse();break;default:se("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(Yv(this,b,y+b.la.x,x+b.la.y),this.Rb){case pm:x+=b.Da.height+this.$d.height;break;case qv:y+=b.Da.width+this.$d.width;break;default:se("Unhandled arrangement value "+this.Rb.toString())}}}};function Yv(a,y,x,E){if(y!==null){y.x=x,y.y=E,y=y.children;for(var b=y.length,z=0;z<b;z++){var tt=y[z];Yv(a,tt,x+tt.S.x,E+tt.S.y)}}}Hr.prototype.commitLayout=function(){this.yv(),this.commitNodes(),this.Gu(),this.isRouting&&this.commitLinks()},Hr.prototype.commitNodes=function(){for(var a=this.network.vertexes.iterator;a.next();)a.value.commit();for(a.reset();a.next();)this.layoutComments(a.value)},Hr.prototype.Gu=function(){if(this.layerStyle===vm){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 Ot(-this.nodeSpacing/2,-this.layerSpacing/2)):(x.Bc(this.layerSpacing,this.nodeSpacing/2),E=new Ot(-this.layerSpacing/2,-this.nodeSpacing/2)),b=[],x=this.angle===90||this.angle===270?x.width:x.height,z=0,this.angle===180||this.angle===270)for(var tt=0;tt<a.length;tt++)z+=a[tt]+y[tt];for(tt=0;tt<a.length;tt++){var rt=a[tt]+y[tt];this.angle===270?(z-=rt,b.push(new Oe(0,z,x,rt))):this.angle===90?(b.push(new Oe(0,z,x,rt)),z+=rt):this.angle===180?(z-=rt,b.push(new Oe(z,0,rt,x))):(b.push(new Oe(z,0,rt,x)),z+=rt)}this.commitLayers(b,E)}},Hr.prototype.commitLayers=function(){},Hr.prototype.commitLinks=function(){for(var a=this.network.edges.iterator;a.next();)a.value.commit()},Hr.prototype.yv=function(){for(var a=this.Ub.iterator;a.next();){var y=a.value;y instanceof xu&&mw(this,y)}};function mw(a,y){if(y!==null){a.setPortSpots(y),y=y.children;for(var x=y.length,E=0;E<x;E++)mw(a,y[E])}}Hr.prototype.setPortSpots=function(a){var y=a.alignment;if(pd(y)){var x=this.ud===oh,E=ju(a);switch(E){case 0:var b=hs;break;case 90:b=js;break;case 180:b=Fo;break;default:b=Yo}var z=a.children,tt=z.length;switch(y){case Fc:case lh:for(y=0;y<tt;y++){var rt=z[y];if(rt=(x?rt.sourceEdges:rt.destinationEdges).first(),rt!==null&&(rt=rt.link,rt!==null)){var ot=E===90||E===270?Fo:Yo;if(tt===1||y===tt-1&&tt%2===1)switch(E){case 0:ot=Fo;break;case 90:ot=Yo;break;case 180:ot=hs;break;default:ot=js}else y%2===0&&(ot=E===90||E===270?hs:js);x?(a.setsPortSpot&&(rt.fromSpot=b),a.setsChildPortSpot&&(rt.toSpot=ot)):(a.setsPortSpot&&(rt.fromSpot=ot),a.setsChildPortSpot&&(rt.toSpot=b))}}break;case Ec:for(E=E===90||E===270?hs:js,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)));break;case kh:for(E=E===90||E===270?Fo:Yo,z=x?a.destinationEdges:a.sourceEdges;z.next();)tt=z.value.link,tt!==null&&(x?(a.setsPortSpot&&(tt.fromSpot=b),a.setsChildPortSpot&&(tt.toSpot=E)):(a.setsPortSpot&&(tt.fromSpot=E),a.setsChildPortSpot&&(tt.toSpot=b)))}}else if(x=ju(a),this.ud===oh){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=hs;break;case 90:E.fromSpot=js;break;case 180:E.fromSpot=Fo;break;default:E.fromSpot=Yo}else E.fromSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.toSpot=Fo;break;case 90:E.toSpot=Yo;break;case 180:E.toSpot=hs;break;default:E.toSpot=js}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=hs;break;case 90:E.toSpot=js;break;case 180:E.toSpot=Fo;break;default:E.toSpot=Yo}else E.toSpot=a.portSpot;if(a.setsChildPortSpot)if(a.childPortSpot.Xb())switch(x){case 0:E.fromSpot=Fo;break;case 90:E.fromSpot=Yo;break;case 180:E.fromSpot=hs;break;default:E.fromSpot=js}else E.fromSpot=a.childPortSpot}};function ju(a){return a=a.angle,45>=a?0:135>=a?90:225>=a?180:315>=a?270:0}Hr.prototype.computeLayerSpacing=function(a){var y=ju(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},Hr.prototype.computeNodeIndent=function(a){var y=ju(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)},yn.Object.defineProperties(Hr.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!==gm&&a!==Jv&&a!==Xv&&a!==$v||(this.vo=a,this.C())}},layerStyle:{get:function(){return this.Bq},set:function(a){this.Rb===a||a!==ty&&a!==ey&&a!==vm||(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!==pm&&a!==qv&&a!==mm||(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!==Rg&&a!==Hp&&a!==_p&&!Kp||(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()):se("TreeLayout.angle must be 0, 90, 180, or 270"))}},alignment:{get:function(){return this.W.alignment},set:function(a){this.W.alignment!==a&&(this.W.alignment=a,this.C())}},nodeIndent:{get:function(){return this.W.nodeIndent},set:function(a){this.W.nodeIndent!==a&&0<=a&&(this.W.nodeIndent=a,this.C())}},nodeIndentPastParent:{get:function(){return this.W.nodeIndentPastParent},set:function(a){this.W.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.W.nodeIndentPastParent=a,this.C())}},nodeSpacing:{get:function(){return this.W.nodeSpacing},set:function(a){this.W.nodeSpacing!==a&&(this.W.nodeSpacing=a,this.C())}},layerSpacing:{get:function(){return this.W.layerSpacing},set:function(a){this.W.layerSpacing!==a&&(this.W.layerSpacing=a,this.C())}},layerSpacingParentOverlap:{get:function(){return this.W.layerSpacingParentOverlap},set:function(a){this.W.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.W.layerSpacingParentOverlap=a,this.C())}},compaction:{get:function(){return this.W.compaction},set:function(a){this.W.compaction===a||a!==fm&&a!==zp||(this.W.compaction=a,this.C())}},breadthLimit:{get:function(){return this.W.breadthLimit},set:function(a){this.W.breadthLimit!==a&&0<=a&&(this.W.breadthLimit=a,this.C())}},rowSpacing:{get:function(){return this.W.rowSpacing},set:function(a){this.W.rowSpacing!==a&&(this.W.rowSpacing=a,this.C())}},rowIndent:{get:function(){return this.W.rowIndent},set:function(a){this.W.rowIndent!==a&&0<=a&&(this.W.rowIndent=a,this.C())}},commentSpacing:{get:function(){return this.W.commentSpacing},set:function(a){this.W.commentSpacing!==a&&(this.W.commentSpacing=a,this.C())}},commentMargin:{get:function(){return this.W.commentMargin},set:function(a){this.W.commentMargin!==a&&(this.W.commentMargin=a,this.C())}},setsPortSpot:{get:function(){return this.W.setsPortSpot},set:function(a){this.W.setsPortSpot!==a&&(this.W.setsPortSpot=a,this.C())}},portSpot:{get:function(){return this.W.portSpot},set:function(a){this.W.portSpot.D(a)||(this.W.portSpot=a,this.C())}},setsChildPortSpot:{get:function(){return this.W.setsChildPortSpot},set:function(a){this.W.setsChildPortSpot!==a&&(this.W.setsChildPortSpot=a,this.C())}},childPortSpot:{get:function(){return this.W.childPortSpot},set:function(a){this.W.childPortSpot.D(a)||(this.W.childPortSpot=a,this.C())}},alternateSorting:{get:function(){return this.Y.sorting},set:function(a){this.Y.sorting===a||a!==Rg&&a!==Hp&&a!==_p&&!Kp||(this.Y.sorting=a,this.C())}},alternateComparer:{get:function(){return this.Y.comparer},set:function(a){this.Y.comparer!==a&&(this.Y.comparer=a,this.C())}},alternateAngle:{get:function(){return this.Y.angle},set:function(a){this.Y.angle===a||a!==0&&a!==90&&a!==180&&a!==270||(this.Y.angle=a,this.C())}},alternateAlignment:{get:function(){return this.Y.alignment},set:function(a){this.Y.alignment!==a&&(this.Y.alignment=a,this.C())}},alternateNodeIndent:{get:function(){return this.Y.nodeIndent},set:function(a){this.Y.nodeIndent!==a&&0<=a&&(this.Y.nodeIndent=a,this.C())}},alternateNodeIndentPastParent:{get:function(){return this.Y.nodeIndentPastParent},set:function(a){this.Y.nodeIndentPastParent!==a&&0<=a&&1>=a&&(this.Y.nodeIndentPastParent=a,this.C())}},alternateNodeSpacing:{get:function(){return this.Y.nodeSpacing},set:function(a){this.Y.nodeSpacing!==a&&(this.Y.nodeSpacing=a,this.C())}},alternateLayerSpacing:{get:function(){return this.Y.layerSpacing},set:function(a){this.Y.layerSpacing!==a&&(this.Y.layerSpacing=a,this.C())}},alternateLayerSpacingParentOverlap:{get:function(){return this.Y.layerSpacingParentOverlap},set:function(a){this.Y.layerSpacingParentOverlap!==a&&0<=a&&1>=a&&(this.Y.layerSpacingParentOverlap=a,this.C())}},alternateCompaction:{get:function(){return this.Y.compaction},set:function(a){this.Y.compaction===a||a!==fm&&a!==zp||(this.Y.compaction=a,this.C())}},alternateBreadthLimit:{get:function(){return this.Y.breadthLimit},set:function(a){this.Y.breadthLimit!==a&&0<=a&&(this.Y.breadthLimit=a,this.C())}},alternateRowSpacing:{get:function(){return this.Y.rowSpacing},set:function(a){this.Y.rowSpacing!==a&&(this.Y.rowSpacing=a,this.C())}},alternateRowIndent:{get:function(){return this.Y.rowIndent},set:function(a){this.Y.rowIndent!==a&&0<=a&&(this.Y.rowIndent=a,this.C())}},alternateCommentSpacing:{get:function(){return this.Y.commentSpacing},set:function(a){this.Y.commentSpacing!==a&&(this.Y.commentSpacing=a,this.C())}},alternateCommentMargin:{get:function(){return this.Y.commentMargin},set:function(a){this.Y.commentMargin!==a&&(this.Y.commentMargin=a,this.C())}},alternateSetsPortSpot:{get:function(){return this.Y.setsPortSpot},set:function(a){this.Y.setsPortSpot!==a&&(this.Y.setsPortSpot=a,this.C())}},alternatePortSpot:{get:function(){return this.Y.portSpot},set:function(a){this.Y.portSpot.D(a)||(this.Y.portSpot=a,this.C())}},alternateSetsChildPortSpot:{get:function(){return this.Y.setsChildPortSpot},set:function(a){this.Y.setsChildPortSpot!==a&&(this.Y.setsChildPortSpot=a,this.C())}},alternateChildPortSpot:{get:function(){return this.Y.childPortSpot},set:function(a){this.Y.childPortSpot.D(a)||(this.Y.childPortSpot=a,this.C())}}});var dm=new Te(Hr,"PathDefault",-1),oh=new Te(Hr,"PathDestination",0),Yf=new Te(Hr,"PathSource",1),Rg=new Te(Hr,"SortingForwards",10),Hp=new Te(Hr,"SortingReverse",11),_p=new Te(Hr,"SortingAscending",12),Kp=new Te(Hr,"SortingDescending",13),Hg=new Te(Hr,"AlignmentCenterSubtrees",20),Xf=new Te(Hr,"AlignmentCenterChildren",21),sh=new Te(Hr,"AlignmentStart",22),ah=new Te(Hr,"AlignmentEnd",23),Fc=new Te(Hr,"AlignmentBus",24),lh=new Te(Hr,"AlignmentBusBranching",25),Ec=new Te(Hr,"AlignmentTopLeftBus",26),kh=new Te(Hr,"AlignmentBottomRightBus",27),fm=new Te(Hr,"CompactionNone",30),zp=new Te(Hr,"CompactionBlock",31),gm=new Te(Hr,"StyleLayered",40),Xv=new Te(Hr,"StyleLastParents",41),Jv=new Te(Hr,"StyleAlternating",42),$v=new Te(Hr,"StyleRootOnly",43),pm=new Te(Hr,"ArrangementVertical",50),qv=new Te(Hr,"ArrangementHorizontal",51),mm=new Te(Hr,"ArrangementFixedRoots",52),ty=new Te(Hr,"LayerIndividual",60),ey=new Te(Hr,"LayerSiblings",61),vm=new Te(Hr,"LayerUniform",62);Hr.className="TreeLayout",Hr.PathDefault=dm,Hr.PathDestination=oh,Hr.PathSource=Yf,Hr.SortingForwards=Rg,Hr.SortingReverse=Hp,Hr.SortingAscending=_p,Hr.SortingDescending=Kp,Hr.AlignmentCenterSubtrees=Hg,Hr.AlignmentCenterChildren=Xf,Hr.AlignmentStart=sh,Hr.AlignmentEnd=ah,Hr.AlignmentBus=Fc,Hr.AlignmentBusBranching=lh,Hr.AlignmentTopLeftBus=Ec,Hr.AlignmentBottomRightBus=kh,Hr.CompactionNone=fm,Hr.CompactionBlock=zp,Hr.StyleLayered=gm,Hr.StyleLastParents=Xv,Hr.StyleAlternating=Jv,Hr.StyleRootOnly=$v,Hr.ArrangementVertical=pm,Hr.ArrangementHorizontal=qv,Hr.ArrangementFixedRoots=mm,Hr.LayerIndividual=ty,Hr.LayerSiblings=ey,Hr.LayerUniform=vm;function Jf(a){bo.call(this,a)}Ge(Jf,bo),Jf.prototype.createVertex=function(){return new xu(this)},Jf.prototype.createEdge=function(){return new _g(this)},Jf.className="TreeNetwork";function xu(a){Gs.call(this,a),this.V=!1,this.hb=null,this.u=[],this.nb=this.Ha=this.F=this.ia=0,this.td=null,this.S=new Ot(0,0),this.Da=new on(0,0),this.la=new Ot(0,0),this.im=this.hm=this.qA=!1,this.kp=this.Yo=null,this.nd=Rg,this.hd=xv,this.Kb=0,this.Jb=Xf,this.Vq=this.Uq=0,this.Wq=20,this.ie=50,this.Aq=0,this.Hp=zp,this.Ap=0,this.nr=25,this.Gp=this.mr=10,this.Fp=20,this.xr=!0,this.dr=Io,this.wr=!0,this.Dp=Io}Ge(xu,Gs),xu.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)},yn.Object.defineProperties(xu.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)}}}),xu.className="TreeVertex";function _g(a){Ol.call(this,a),this.$t=new Ot(0,0)}Ge(_g,Ol),_g.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 oh:x=this.fromVertex,E=this.toVertex;break;case Yf:x=this.toVertex,E=this.fromVertex;break;default:se("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=ju(x),tt=y.computeLayerSpacing(x),rt=x.rowSpacing;a.vg();var ot=a.curve===ql,lt=a.isOrthogonal,ut;if(a.uh(),lt||ot){for(ut=2;4<a.pointsCount;)a.pv(2);var ft=a.i(1),yt=a.i(2)}else{for(ut=1;3<a.pointsCount;)a.pv(1);ft=a.i(0),yt=a.i(a.pointsCount-1)}var Mt=a.i(a.pointsCount-1);z===0?(x.alignment===ah?(z=E.bottom+b.y,b.y===0&&ft.y>Mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.top+b.y,b.y===0&&ft.y<Mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.right+tt,z),ut++,a.m(ut,E.right+tt+(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+2*(b.x-rt)/3,z),ut++,a.m(ut,E.right+tt+(b.x-rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.right+tt/2,ft.y),ut++),a.m(ut,E.right+tt/2,z),ut++,a.m(ut,E.right+tt+b.x-(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===90?(x.alignment===ah?(z=E.right+b.x,b.x===0&&ft.x>Mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.left+b.x,b.x===0&&ft.x<Mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.bottom+tt),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+2*(b.y-rt)/3),ut++,a.m(ut,z,E.bottom+tt+(b.y-rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.bottom+tt/2),ut++),a.m(ut,z,E.bottom+tt/2),ut++,a.m(ut,z,E.bottom+tt+b.y-(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):z===180?(x.alignment===ah?(z=E.bottom+b.y,b.y===0&&ft.y>Mt.y+x.rowIndent&&(z=Math.min(z,Math.max(ft.y,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.top+b.y,b.y===0&&ft.y<Mt.y-x.rowIndent&&(z=Math.max(z,Math.min(ft.y,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.top-x.la.y+b.y:E.y+E.height/2+b.y,ot?(a.m(ut,ft.x,z),ut++,a.m(ut,E.left-tt,z),ut++,a.m(ut,E.left-tt+(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+2*(b.x+rt)/3,z),ut++,a.m(ut,E.left-tt+(b.x+rt),z),ut++,a.m(ut,yt.x,z)):(lt&&(a.m(ut,E.left-tt/2,ft.y),ut++),a.m(ut,E.left-tt/2,z),ut++,a.m(ut,E.left-tt+b.x+(lt?rt/2:rt),z),ut++,lt&&a.m(ut,a.i(ut-1).x,yt.y))):z===270?(x.alignment===ah?(z=E.right+b.x,b.x===0&&ft.x>Mt.x+x.rowIndent&&(z=Math.min(z,Math.max(ft.x,z-y.computeNodeIndent(x))))):x.alignment===sh?(z=E.left+b.x,b.x===0&&ft.x<Mt.x-x.rowIndent&&(z=Math.max(z,Math.min(ft.x,z+y.computeNodeIndent(x))))):z=x.hm||x.im&&x.maxGenerationCount===1?E.left-x.la.x+b.x:E.x+E.width/2+b.x,ot?(a.m(ut,z,ft.y),ut++,a.m(ut,z,E.top-tt),ut++,a.m(ut,z,E.top-tt+(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+2*(b.y+rt)/3),ut++,a.m(ut,z,E.top-tt+(b.y+rt)),ut++,a.m(ut,z,yt.y)):(lt&&(a.m(ut,ft.x,E.top-tt/2),ut++),a.m(ut,z,E.top-tt/2),ut++,a.m(ut,z,E.top-tt+b.y+(lt?rt/2:rt)),ut++,lt&&a.m(ut,yt.x,a.i(ut-1).y))):se("Invalid angle "+z),a.zf()}else b=E,a=this.link,E=this.network.layout,y=ju(x),y!==ju(b)&&(tt=E.computeLayerSpacing(x),rt=x.bounds,x=b.bounds,y===0&&x.left-rt.right<tt+1||y===90&&x.top-rt.bottom<tt+1||y===180&&rt.left-x.right<tt+1||y===270&&rt.top-x.bottom<tt+1||(a.vg(),x=a.curve===ql,b=a.isOrthogonal,E=pd(this.fromVertex.alignment),a.uh(),y===0?(y=rt.right+tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y-20,a.i(1).y),a.m(2,y-20,x),a.m(3,y,x),a.m(4,y+20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===90?(y=rt.bottom+tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y-20),a.m(2,x,y-20),a.m(3,x,y),a.m(4,x,y+20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)):y===180?(y=rt.left-tt/2,x?a.pointsCount===4&&(x=a.i(3).y,a.L(1,y+20,a.i(1).y),a.m(2,y+20,x),a.m(3,y,x),a.m(4,y-20,x),a.L(5,a.i(5).x,x)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,y,a.i(2).y),a.L(3,y,a.i(3).y)):a.pointsCount===4?a.m(2,y,a.i(2).y):a.pointsCount===3?a.L(1,y,a.i(2).y):a.pointsCount===2&&a.m(1,y,a.i(1).y)):y===270&&(y=rt.top-tt/2,x?a.pointsCount===4&&(x=a.i(3).x,a.L(1,a.i(1).x,y+20),a.m(2,x,y+20),a.m(3,x,y),a.m(4,x,y-20),a.L(5,x,a.i(5).y)):b?E?a.L(3,a.i(2).x,a.i(4).y):a.pointsCount===6&&(a.L(2,a.i(2).x,y),a.L(3,a.i(3).x,y)):a.pointsCount===4?a.m(2,a.i(2).x,y):a.pointsCount===3?a.L(1,a.i(2).x,y):a.pointsCount===2&&a.m(1,a.i(1).x,y)),a.zf()))}}},yn.Object.defineProperties(_g.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)}}}),_g.className="TreeEdge",Eo.prototype.initializeStandardTools=function(){this.gb("Action",new Vl,this.mouseDownTools),this.gb("Relinking",new pl,this.mouseDownTools),this.gb("LinkReshaping",new vs,this.mouseDownTools),this.gb("Rotating",new ka,this.mouseDownTools),this.gb("Resizing",new da,this.mouseDownTools),this.gb("Linking",new ca,this.mouseMoveTools),this.gb("Dragging",new Go,this.mouseMoveTools),this.gb("DragSelecting",new Tl,this.mouseMoveTools),this.gb("Panning",new aa,this.mouseMoveTools),this.gb("ContextMenu",new Ta,this.mouseUpTools),this.gb("TextEditing",new To,this.mouseUpTools),this.gb("ClickCreating",new QA,this.mouseUpTools),this.gb("ClickSelecting",new gh,this.mouseUpTools)},FA("Horizontal",new Do),FA("Spot",new cs),FA("Table",new La),FA("Viewbox",new zs),FA("TableRow",new Il),FA("TableColumn",new $l),FA("Graduated",new PA),FA("Grid",new Ka),zd.add("GraphLinksModel",qs),zd.add("TreeModel",uu);var ym=ln.go,ny={get licenseKey(){return Re.licenseKey},set licenseKey(a){Re.licenseKey=a},get version(){return Re.version},Group:mr,EnumValue:Te,List:ee,Set:xe,Map:ke,Point:Ot,Size:on,Rect:Oe,Margin:wr,Spot:Ci,Geometry:Hn,PathFigure:Ps,PathSegment:Xr,InputEvent:Ws,DiagramEvent:Wu,ChangedEvent:Ho,Model:Oi,GraphLinksModel:Vr,TreeModel:qa,Binding:Ms,Transaction:Ts,UndoManager:Vo,CommandHandler:Jt,Tool:Yr,DraggingTool:Go,DraggingInfo:eA,DraggingOptions:st,LinkingBaseTool:ls,LinkingTool:ca,RelinkingTool:pl,LinkReshapingTool:vs,ResizingTool:da,RotatingTool:ka,ClickSelectingTool:gh,ActionTool:Vl,ClickCreatingTool:QA,HTMLInfo:Mu,ContextMenuTool:Ta,DragSelectingTool:Tl,PanningTool:aa,TextEditingTool:To,ToolManager:Eo,Animation:la,AnimationManager:ol,AnimationTrigger:ou,Layer:Vs,Diagram:Re,Palette:ct,Overview:pt,Brush:ho,GraphObject:Se,Panel:En,RowColumnDefinition:Is,Shape:Cr,TextBlock:Mo,Picture:Al,Part:Zi,Adornment:ro,Node:gi,Link:Yn,Placeholder:Ya,Layout:Wo,LayoutNetwork:bo,LayoutVertex:Gs,LayoutEdge:Ol,GridLayout:Aa,PanelLayout:co,CircularLayout:ts,CircularNetwork:Ug,CircularVertex:Np,CircularEdge:q0,ForceDirectedLayout:Ba,ForceDirectedNetwork:Zf,ForceDirectedVertex:Dp,ForceDirectedEdge:Ip,LayeredDigraphLayout:vo,LayeredDigraphNetwork:Og,LayeredDigraphVertex:hu,LayeredDigraphEdge:Op,TreeLayout:Hr,TreeNetwork:Jf,TreeVertex:xu,TreeEdge:_g};typeof ym=="object"&&ym.version&&Zn("WARNING: a `go` object on the root object is already defined. "+("Debug"in ym?"debug ":"")+"version: "+ym.version+", replaced with version: "+ny.version),Re.prototype.go=ny,ln.go=ny,typeof Sn.exports=="object"&&(Sn.exports=typeof It.g!="undefined"?It.g.go:self.go)}();var St=typeof It.g!="undefined"?It.g.go:self.go;const Wt=typeof It.g!="undefined"?It.g.go:self.go,le=Wt.Group,ve=Wt.EnumValue,de=Wt.List,Ht=Wt.Set,ie=Wt.Map,oe=Wt.Point,he=Wt.Size,Gt=Wt.Rect,Ie=Wt.Margin,Xt=Wt.Spot,Me=Wt.Geometry,Qt=Wt.PathFigure,nt=Wt.PathSegment,et=Wt.InputEvent,At=Wt.DiagramEvent,at=Wt.ChangedEvent,dt=Wt.Model,gt=Wt.GraphLinksModel,xt=Wt.TreeModel,bt=Wt.Binding,Ut=Wt.Transaction,Rt=Wt.UndoManager,Zt=Wt.CommandHandler,Yt=Wt.Tool,te=Wt.DraggingTool,ye=Wt.DraggingInfo,fe=Wt.LinkingBaseTool,Ke=Wt.LinkingTool,_e=Wt.RelinkingTool,nn=Wt.LinkReshapingTool,fn=Wt.ResizingTool,xn=Wt.RotatingTool,_n=Wt.ClickSelectingTool,Xn=Wt.ActionTool,pe=Wt.ClickCreatingTool,ne=Wt.HTMLInfo,pn=Wt.ContextMenuTool,Ai=Wt.DragSelectingTool,ai=Wt.PanningTool,sn=Wt.TextEditingTool,Qn=Wt.ToolManager,jn=Wt.Animation,Ti=Wt.AnimationManager,$e=Wt.AnimationTrigger,Le=Wt.Layer,tn=Wt.Diagram,hi=Wt.Palette,ni=Wt.Overview,zt=Wt.Brush,Ft=Wt.GraphObject,mt=Wt.Panel,vt=Wt.RowColumnDefinition,Et=Wt.Shape,Ct=Wt.TextBlock,_t=Wt.TextBlockMetrics,Ce=Wt.Picture,Ze=Wt.Part,Bn=Wt.Adornment,ze=Wt.Node,Ue=Wt.Link,Xe=Wt.Placeholder,dn=Wt.Layout,Kn=Wt.LayoutNetwork,mn=Wt.LayoutVertex,be=Wt.LayoutEdge,ei=Wt.GridLayout,kn=Wt.PanelLayout,On=Wt.CircularLayout,Vn=Wt.CircularNetwork,Ki=Wt.CircularVertex,si=Wt.CircularEdge,yi=Wt.ForceDirectedLayout,Ei=Wt.ForceDirectedNetwork,qi=Wt.ForceDirectedVertex,ii=Wt.ForceDirectedEdge,ar=Wt.LayeredDigraphLayout,Xi=Wt.LayeredDigraphNetwork,lr=Wt.LayeredDigraphVertex,zi=Wt.LayeredDigraphEdge,Kr=Wt.TreeLayout,Ir=Wt.TreeNetwork,Or=Wt.TreeVertex,Yi=Wt.TreeEdge,kr=Wt.version},64270:function(Sn){(function(Ve,It){Sn.exports=It()})(this,function(){"use strict";var Ve=function(Bt,wt){return Ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Lt,Pt){Lt.__proto__=Pt}||function(Lt,Pt){for(var jt in Pt)Object.prototype.hasOwnProperty.call(Pt,jt)&&(Lt[jt]=Pt[jt])},Ve(Bt,wt)};function It(Bt,wt){if(typeof wt!="function"&&wt!==null)throw new TypeError("Class extends value "+String(wt)+" is not a constructor or null");Ve(Bt,wt);function Lt(){this.constructor=Bt}Bt.prototype=wt===null?Object.create(wt):(Lt.prototype=wt.prototype,new Lt)}var St=function(){return St=Object.assign||function(wt){for(var Lt,Pt=1,jt=arguments.length;Pt<jt;Pt++){Lt=arguments[Pt];for(var Ae in Lt)Object.prototype.hasOwnProperty.call(Lt,Ae)&&(wt[Ae]=Lt[Ae])}return wt},St.apply(this,arguments)};function Wt(Bt,wt,Lt,Pt){function jt(Ae){return Ae instanceof Lt?Ae:new Lt(function(Fe){Fe(Ae)})}return new(Lt||(Lt=Promise))(function(Ae,Fe){function Je(zn){try{Nn(Pt.next(zn))}catch(pi){Fe(pi)}}function Qe(zn){try{Nn(Pt.throw(zn))}catch(pi){Fe(pi)}}function Nn(zn){zn.done?Ae(zn.value):jt(zn.value).then(Je,Qe)}Nn((Pt=Pt.apply(Bt,wt||[])).next())})}function le(Bt,wt){var Lt={label:0,sent:function(){if(Ae[0]&1)throw Ae[1];return Ae[1]},trys:[],ops:[]},Pt,jt,Ae,Fe;return Fe={next:Je(0),throw:Je(1),return:Je(2)},typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function Je(Nn){return function(zn){return Qe([Nn,zn])}}function Qe(Nn){if(Pt)throw new TypeError("Generator is already executing.");for(;Lt;)try{if(Pt=1,jt&&(Ae=Nn[0]&2?jt.return:Nn[0]?jt.throw||((Ae=jt.return)&&Ae.call(jt),0):jt.next)&&!(Ae=Ae.call(jt,Nn[1])).done)return Ae;switch(jt=0,Ae&&(Nn=[Nn[0]&2,Ae.value]),Nn[0]){case 0:case 1:Ae=Nn;break;case 4:return Lt.label++,{value:Nn[1],done:!1};case 5:Lt.label++,jt=Nn[1],Nn=[0];continue;case 7:Nn=Lt.ops.pop(),Lt.trys.pop();continue;default:if(Ae=Lt.trys,!(Ae=Ae.length>0&&Ae[Ae.length-1])&&(Nn[0]===6||Nn[0]===2)){Lt=0;continue}if(Nn[0]===3&&(!Ae||Nn[1]>Ae[0]&&Nn[1]<Ae[3])){Lt.label=Nn[1];break}if(Nn[0]===6&&Lt.label<Ae[1]){Lt.label=Ae[1],Ae=Nn;break}if(Ae&&Lt.label<Ae[2]){Lt.label=Ae[2],Lt.ops.push(Nn);break}Ae[2]&&Lt.ops.pop(),Lt.trys.pop();continue}Nn=wt.call(Bt,Lt)}catch(zn){Nn=[6,zn],jt=0}finally{Pt=Ae=0}if(Nn[0]&5)throw Nn[1];return{value:Nn[0]?Nn[1]:void 0,done:!0}}}function ve(Bt,wt,Lt){if(Lt||arguments.length===2)for(var Pt=0,jt=wt.length,Ae;Pt<jt;Pt++)(Ae||!(Pt in wt))&&(Ae||(Ae=Array.prototype.slice.call(wt,0,Pt)),Ae[Pt]=wt[Pt]);return Bt.concat(Ae||wt)}for(var de=function(){function Bt(wt,Lt,Pt,jt){this.left=wt,this.top=Lt,this.width=Pt,this.height=jt}return Bt.prototype.add=function(wt,Lt,Pt,jt){return new Bt(this.left+wt,this.top+Lt,this.width+Pt,this.height+jt)},Bt.fromClientRect=function(wt,Lt){return new Bt(Lt.left+wt.windowBounds.left,Lt.top+wt.windowBounds.top,Lt.width,Lt.height)},Bt.fromDOMRectList=function(wt,Lt){var Pt=Array.from(Lt).find(function(jt){return jt.width!==0});return Pt?new Bt(Pt.left+wt.windowBounds.left,Pt.top+wt.windowBounds.top,Pt.width,Pt.height):Bt.EMPTY},Bt.EMPTY=new Bt(0,0,0,0),Bt}(),Ht=function(Bt,wt){return de.fromClientRect(Bt,wt.getBoundingClientRect())},ie=function(Bt){var wt=Bt.body,Lt=Bt.documentElement;if(!wt||!Lt)throw new Error("Unable to get document size");var Pt=Math.max(Math.max(wt.scrollWidth,Lt.scrollWidth),Math.max(wt.offsetWidth,Lt.offsetWidth),Math.max(wt.clientWidth,Lt.clientWidth)),jt=Math.max(Math.max(wt.scrollHeight,Lt.scrollHeight),Math.max(wt.offsetHeight,Lt.offsetHeight),Math.max(wt.clientHeight,Lt.clientHeight));return new de(0,0,Pt,jt)},oe=function(Bt){for(var wt=[],Lt=0,Pt=Bt.length;Lt<Pt;){var jt=Bt.charCodeAt(Lt++);if(jt>=55296&&jt<=56319&&Lt<Pt){var Ae=Bt.charCodeAt(Lt++);(Ae&64512)===56320?wt.push(((jt&1023)<<10)+(Ae&1023)+65536):(wt.push(jt),Lt--)}else wt.push(jt)}return wt},he=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Lt=Bt.length;if(!Lt)return"";for(var Pt=[],jt=-1,Ae="";++jt<Lt;){var Fe=Bt[jt];Fe<=65535?Pt.push(Fe):(Fe-=65536,Pt.push((Fe>>10)+55296,Fe%1024+56320)),(jt+1===Lt||Pt.length>16384)&&(Ae+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return Ae},Gt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ie=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Xt=0;Xt<Gt.length;Xt++)Ie[Gt.charCodeAt(Xt)]=Xt;for(var Me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Qt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),nt=0;nt<Me.length;nt++)Qt[Me.charCodeAt(nt)]=nt;for(var et=function(Bt){var wt=Bt.length*.75,Lt=Bt.length,Pt,jt=0,Ae,Fe,Je,Qe;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var Nn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),zn=Array.isArray(Nn)?Nn:new Uint8Array(Nn);for(Pt=0;Pt<Lt;Pt+=4)Ae=Qt[Bt.charCodeAt(Pt)],Fe=Qt[Bt.charCodeAt(Pt+1)],Je=Qt[Bt.charCodeAt(Pt+2)],Qe=Qt[Bt.charCodeAt(Pt+3)],zn[jt++]=Ae<<2|Fe>>4,zn[jt++]=(Fe&15)<<4|Je>>2,zn[jt++]=(Je&3)<<6|Qe&63;return Nn},At=function(Bt){for(var wt=Bt.length,Lt=[],Pt=0;Pt<wt;Pt+=2)Lt.push(Bt[Pt+1]<<8|Bt[Pt]);return Lt},at=function(Bt){for(var wt=Bt.length,Lt=[],Pt=0;Pt<wt;Pt+=4)Lt.push(Bt[Pt+3]<<24|Bt[Pt+2]<<16|Bt[Pt+1]<<8|Bt[Pt]);return Lt},dt=5,gt=11,xt=2,bt=gt-dt,Ut=65536>>dt,Rt=1<<dt,Zt=Rt-1,Yt=1024>>dt,te=Ut+Yt,ye=te,fe=32,Ke=ye+fe,_e=65536>>gt,nn=1<<bt,fn=nn-1,xn=function(Bt,wt,Lt){return Bt.slice?Bt.slice(wt,Lt):new Uint16Array(Array.prototype.slice.call(Bt,wt,Lt))},_n=function(Bt,wt,Lt){return Bt.slice?Bt.slice(wt,Lt):new Uint32Array(Array.prototype.slice.call(Bt,wt,Lt))},Xn=function(Bt,wt){var Lt=et(Bt),Pt=Array.isArray(Lt)?at(Lt):new Uint32Array(Lt),jt=Array.isArray(Lt)?At(Lt):new Uint16Array(Lt),Ae=24,Fe=xn(jt,Ae/2,Pt[4]/2),Je=Pt[5]===2?xn(jt,(Ae+Pt[4])/2):_n(Pt,Math.ceil((Ae+Pt[4])/4));return new pe(Pt[0],Pt[1],Pt[2],Pt[3],Fe,Je)},pe=function(){function Bt(wt,Lt,Pt,jt,Ae,Fe){this.initialValue=wt,this.errorValue=Lt,this.highStart=Pt,this.highValueIndex=jt,this.index=Ae,this.data=Fe}return Bt.prototype.get=function(wt){var Lt;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Lt=this.index[wt>>dt],Lt=(Lt<<xt)+(wt&Zt),this.data[Lt];if(wt<=65535)return Lt=this.index[Ut+(wt-55296>>dt)],Lt=(Lt<<xt)+(wt&Zt),this.data[Lt];if(wt<this.highStart)return Lt=Ke-_e+(wt>>gt),Lt=this.index[Lt],Lt+=wt>>dt&fn,Lt=this.index[Lt],Lt=(Lt<<xt)+(wt&Zt),this.data[Lt];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),ne="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pn=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ai=0;Ai<ne.length;Ai++)pn[ne.charCodeAt(Ai)]=Ai;var ai="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",sn=50,Qn=1,jn=2,Ti=3,$e=4,Le=5,tn=7,hi=8,ni=9,zt=10,Ft=11,mt=12,vt=13,Et=14,Ct=15,_t=16,Ce=17,Ze=18,Bn=19,ze=20,Ue=21,Xe=22,dn=23,Kn=24,mn=25,be=26,ei=27,kn=28,On=29,Vn=30,Ki=31,si=32,yi=33,Ei=34,qi=35,ii=36,ar=37,Xi=38,lr=39,zi=40,Kr=41,Ir=42,Or=43,Yi=[9001,65288],kr="!",kt="\xD7",tr="\xF7",Fi=Xn(ai),ri=[Vn,ii],Li=[Qn,jn,Ti,Le],Ui=[zt,hi],Ri=[ei,be],Lr=Li.concat(Ui),an=[Xi,lr,zi,Ei,qi],rn=[Ct,vt],Ge=function(Bt,wt){wt===void 0&&(wt="strict");var Lt=[],Pt=[],jt=[];return Bt.forEach(function(Ae,Fe){var Je=Fi.get(Ae);if(Je>sn?(jt.push(!0),Je-=sn):jt.push(!1),["normal","auto","loose"].indexOf(wt)!==-1&&[8208,8211,12316,12448].indexOf(Ae)!==-1)return Pt.push(Fe),Lt.push(_t);if(Je===$e||Je===Ft){if(Fe===0)return Pt.push(Fe),Lt.push(Vn);var Qe=Lt[Fe-1];return Lr.indexOf(Qe)===-1?(Pt.push(Pt[Fe-1]),Lt.push(Qe)):(Pt.push(Fe),Lt.push(Vn))}if(Pt.push(Fe),Je===Ki)return Lt.push(wt==="strict"?Ue:ar);if(Je===Ir||Je===On)return Lt.push(Vn);if(Je===Or)return Ae>=131072&&Ae<=196605||Ae>=196608&&Ae<=262141?Lt.push(ar):Lt.push(Vn);Lt.push(Je)}),[Pt,Lt,jt]},yn=function(Bt,wt,Lt,Pt){var jt=Pt[Lt];if(Array.isArray(Bt)?Bt.indexOf(jt)!==-1:Bt===jt)for(var Ae=Lt;Ae<=Pt.length;){Ae++;var Fe=Pt[Ae];if(Fe===wt)return!0;if(Fe!==zt)break}if(jt===zt)for(var Ae=Lt;Ae>0;){Ae--;var Je=Pt[Ae];if(Array.isArray(Bt)?Bt.indexOf(Je)!==-1:Bt===Je)for(var Qe=Lt;Qe<=Pt.length;){Qe++;var Fe=Pt[Qe];if(Fe===wt)return!0;if(Fe!==zt)break}if(Je!==zt)break}return!1},ji=function(Bt,wt){for(var Lt=Bt;Lt>=0;){var Pt=wt[Lt];if(Pt===zt)Lt--;else return Pt}return 0},Mi=function(Bt,wt,Lt,Pt,jt){if(Lt[Pt]===0)return kt;var Ae=Pt-1;if(Array.isArray(jt)&&jt[Ae]===!0)return kt;var Fe=Ae-1,Je=Ae+1,Qe=wt[Ae],Nn=Fe>=0?wt[Fe]:0,zn=wt[Je];if(Qe===jn&&zn===Ti)return kt;if(Li.indexOf(Qe)!==-1)return kr;if(Li.indexOf(zn)!==-1||Ui.indexOf(zn)!==-1)return kt;if(ji(Ae,wt)===hi)return tr;if(Fi.get(Bt[Ae])===Ft||(Qe===si||Qe===yi)&&Fi.get(Bt[Je])===Ft||Qe===tn||zn===tn||Qe===ni||[zt,vt,Ct].indexOf(Qe)===-1&&zn===ni||[Ce,Ze,Bn,Kn,kn].indexOf(zn)!==-1||ji(Ae,wt)===Xe||yn(dn,Xe,Ae,wt)||yn([Ce,Ze],Ue,Ae,wt)||yn(mt,mt,Ae,wt))return kt;if(Qe===zt)return tr;if(Qe===dn||zn===dn)return kt;if(zn===_t||Qe===_t)return tr;if([vt,Ct,Ue].indexOf(zn)!==-1||Qe===Et||Nn===ii&&rn.indexOf(Qe)!==-1||Qe===kn&&zn===ii||zn===ze||ri.indexOf(zn)!==-1&&Qe===mn||ri.indexOf(Qe)!==-1&&zn===mn||Qe===ei&&[ar,si,yi].indexOf(zn)!==-1||[ar,si,yi].indexOf(Qe)!==-1&&zn===be||ri.indexOf(Qe)!==-1&&Ri.indexOf(zn)!==-1||Ri.indexOf(Qe)!==-1&&ri.indexOf(zn)!==-1||[ei,be].indexOf(Qe)!==-1&&(zn===mn||[Xe,Ct].indexOf(zn)!==-1&&wt[Je+1]===mn)||[Xe,Ct].indexOf(Qe)!==-1&&zn===mn||Qe===mn&&[mn,kn,Kn].indexOf(zn)!==-1)return kt;if([mn,kn,Kn,Ce,Ze].indexOf(zn)!==-1)for(var pi=Ae;pi>=0;){var Vi=wt[pi];if(Vi===mn)return kt;if([kn,Kn].indexOf(Vi)!==-1)pi--;else break}if([ei,be].indexOf(zn)!==-1)for(var pi=[Ce,Ze].indexOf(Qe)!==-1?Fe:Ae;pi>=0;){var Vi=wt[pi];if(Vi===mn)return kt;if([kn,Kn].indexOf(Vi)!==-1)pi--;else break}if(Xi===Qe&&[Xi,lr,Ei,qi].indexOf(zn)!==-1||[lr,Ei].indexOf(Qe)!==-1&&[lr,zi].indexOf(zn)!==-1||[zi,qi].indexOf(Qe)!==-1&&zn===zi||an.indexOf(Qe)!==-1&&[ze,be].indexOf(zn)!==-1||an.indexOf(zn)!==-1&&Qe===ei||ri.indexOf(Qe)!==-1&&ri.indexOf(zn)!==-1||Qe===Kn&&ri.indexOf(zn)!==-1||ri.concat(mn).indexOf(Qe)!==-1&&zn===Xe&&Yi.indexOf(Bt[Je])===-1||ri.concat(mn).indexOf(zn)!==-1&&Qe===Ze)return kt;if(Qe===Kr&&zn===Kr){for(var Gr=Lt[Ae],xr=1;Gr>0&&(Gr--,wt[Gr]===Kr);)xr++;if(xr%2!==0)return kt}return Qe===si&&zn===yi?kt:tr},or=function(Bt,wt){wt||(wt={lineBreak:"normal",wordBreak:"normal"});var Lt=Ge(Bt,wt.lineBreak),Pt=Lt[0],jt=Lt[1],Ae=Lt[2];(wt.wordBreak==="break-all"||wt.wordBreak==="break-word")&&(jt=jt.map(function(Je){return[mn,Vn,Ir].indexOf(Je)!==-1?ar:Je}));var Fe=wt.wordBreak==="keep-all"?Ae.map(function(Je,Qe){return Je&&Bt[Qe]>=19968&&Bt[Qe]<=40959}):void 0;return[Pt,jt,Fe]},ln=function(){function Bt(wt,Lt,Pt,jt){this.codePoints=wt,this.required=Lt===kr,this.start=Pt,this.end=jt}return Bt.prototype.slice=function(){return he.apply(void 0,this.codePoints.slice(this.start,this.end))},Bt}(),Ln=function(Bt,wt){var Lt=oe(Bt),Pt=or(Lt,wt),jt=Pt[0],Ae=Pt[1],Fe=Pt[2],Je=Lt.length,Qe=0,Nn=0;return{next:function(){if(Nn>=Je)return{done:!0,value:null};for(var zn=kt;Nn<Je&&(zn=Mi(Lt,Ae,jt,++Nn,Fe))===kt;);if(zn!==kt||Nn===Je){var pi=new ln(Lt,zn,Qe,Nn);return Qe=Nn,{value:pi,done:!1}}return{done:!0,value:null}}}},Pe=1,sr=2,$n=4,se=8,De=10,qn=47,Zn=92,Ye=9,Dn=32,bi=34,ki=61,Ni=35,li=36,ci=37,fi=39,Fn=40,un=41,We=95,Mn=45,$i=33,hr=60,vr=62,Te=64,xi=91,er=93,Si=61,Mr=123,ur=63,Tr=125,gr=124,ue=126,re=128,ee=65533,je=42,xe=43,An=44,ui=58,ti=59,Bi=46,mi=0,oi=8,Di=11,Ne=14,hn=31,ke=127,Ot=-1,vn=48,Jn=97,vi=101,Ee=102,Wn=117,cn=122,Un=65,Rn=69,gn=70,Cn=85,Tn=90,qe=function(Bt){return Bt>=vn&&Bt<=57},In=function(Bt){return Bt>=55296&&Bt<=57343},on=function(Bt){return qe(Bt)||Bt>=Un&&Bt<=gn||Bt>=Jn&&Bt<=Ee},_i=function(Bt){return Bt>=Jn&&Bt<=cn},Qi=function(Bt){return Bt>=Un&&Bt<=Tn},nr=function(Bt){return _i(Bt)||Qi(Bt)},Gi=function(Bt){return Bt>=re},Fr=function(Bt){return Bt===De||Bt===Ye||Bt===Dn},yr=function(Bt){return nr(Bt)||Gi(Bt)||Bt===We},Zr=function(Bt){return yr(Bt)||qe(Bt)||Bt===Mn},_r=function(Bt){return Bt>=mi&&Bt<=oi||Bt===Di||Bt>=Ne&&Bt<=hn||Bt===ke},Wr=function(Bt,wt){return Bt!==Zn?!1:wt!==De},no=function(Bt,wt,Lt){return Bt===Mn?yr(wt)||Wr(wt,Lt):yr(Bt)?!0:!!(Bt===Zn&&Wr(Bt,wt))},Oe=function(Bt,wt,Lt){return Bt===xe||Bt===Mn?qe(wt)?!0:wt===Bi&&qe(Lt):qe(Bt===Bi?wt:Bt)},Nr=function(Bt){var wt=0,Lt=1;(Bt[wt]===xe||Bt[wt]===Mn)&&(Bt[wt]===Mn&&(Lt=-1),wt++);for(var Pt=[];qe(Bt[wt]);)Pt.push(Bt[wt++]);var jt=Pt.length?parseInt(he.apply(void 0,Pt),10):0;Bt[wt]===Bi&&wt++;for(var Ae=[];qe(Bt[wt]);)Ae.push(Bt[wt++]);var Fe=Ae.length,Je=Fe?parseInt(he.apply(void 0,Ae),10):0;(Bt[wt]===Rn||Bt[wt]===vi)&&wt++;var Qe=1;(Bt[wt]===xe||Bt[wt]===Mn)&&(Bt[wt]===Mn&&(Qe=-1),wt++);for(var Nn=[];qe(Bt[wt]);)Nn.push(Bt[wt++]);var zn=Nn.length?parseInt(he.apply(void 0,Nn),10):0;return Lt*(jt+Je*Math.pow(10,-Fe))*Math.pow(10,Qe*zn)},Ur={type:2},Sr={type:3},Ar={type:4},Jr={type:13},Ao={type:8},io={type:21},Dr={type:9},fo={type:10},es={type:11},Zs={type:12},Ua={type:14},us={type:23},wr={type:1},ns={type:25},rs={type:24},fs={type:26},As={type:27},Cs={type:28},Ci={type:29},pr={type:31},Qr={type:32},$r=function(){function Bt(){this._value=[]}return Bt.prototype.write=function(wt){this._value=this._value.concat(oe(wt))},Bt.prototype.read=function(){for(var wt=[],Lt=this.consumeToken();Lt!==Qr;)wt.push(Lt),Lt=this.consumeToken();return wt},Bt.prototype.consumeToken=function(){var wt=this.consumeCodePoint();switch(wt){case bi:return this.consumeStringToken(bi);case Ni:var Lt=this.peekCodePoint(0),Pt=this.peekCodePoint(1),jt=this.peekCodePoint(2);if(Zr(Lt)||Wr(Pt,jt)){var Ae=no(Lt,Pt,jt)?sr:Pe,Fe=this.consumeName();return{type:5,value:Fe,flags:Ae}}break;case li:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Jr;break;case fi:return this.consumeStringToken(fi);case Fn:return Ur;case un:return Sr;case je:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Ua;break;case xe:if(Oe(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case An:return Ar;case Mn:var Je=wt,Qe=this.peekCodePoint(0),Nn=this.peekCodePoint(1);if(Oe(Je,Qe,Nn))return this.reconsumeCodePoint(wt),this.consumeNumericToken();if(no(Je,Qe,Nn))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();if(Qe===Mn&&Nn===vr)return this.consumeCodePoint(),this.consumeCodePoint(),rs;break;case Bi:if(Oe(wt,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(wt),this.consumeNumericToken();break;case qn:if(this.peekCodePoint(0)===je)for(this.consumeCodePoint();;){var zn=this.consumeCodePoint();if(zn===je&&(zn=this.consumeCodePoint(),zn===qn))return this.consumeToken();if(zn===Ot)return this.consumeToken()}break;case ui:return fs;case ti:return As;case hr:if(this.peekCodePoint(0)===$i&&this.peekCodePoint(1)===Mn&&this.peekCodePoint(2)===Mn)return this.consumeCodePoint(),this.consumeCodePoint(),ns;break;case Te:var pi=this.peekCodePoint(0),Vi=this.peekCodePoint(1),Gr=this.peekCodePoint(2);if(no(pi,Vi,Gr)){var Fe=this.consumeName();return{type:7,value:Fe}}break;case xi:return Cs;case Zn:if(Wr(wt,this.peekCodePoint(0)))return this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();break;case er:return Ci;case Si:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Ao;break;case Mr:return es;case Tr:return Zs;case Wn:case Cn:var xr=this.peekCodePoint(0),br=this.peekCodePoint(1);return xr===xe&&(on(br)||br===ur)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(wt),this.consumeIdentLikeToken();case gr:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),Dr;if(this.peekCodePoint(0)===gr)return this.consumeCodePoint(),io;break;case ue:if(this.peekCodePoint(0)===ki)return this.consumeCodePoint(),fo;break;case Ot:return Qr}return Fr(wt)?(this.consumeWhiteSpace(),pr):qe(wt)?(this.reconsumeCodePoint(wt),this.consumeNumericToken()):yr(wt)?(this.reconsumeCodePoint(wt),this.consumeIdentLikeToken()):{type:6,value:he(wt)}},Bt.prototype.consumeCodePoint=function(){var wt=this._value.shift();return typeof wt=="undefined"?-1:wt},Bt.prototype.reconsumeCodePoint=function(wt){this._value.unshift(wt)},Bt.prototype.peekCodePoint=function(wt){return wt>=this._value.length?-1:this._value[wt]},Bt.prototype.consumeUnicodeRangeToken=function(){for(var wt=[],Lt=this.consumeCodePoint();on(Lt)&&wt.length<6;)wt.push(Lt),Lt=this.consumeCodePoint();for(var Pt=!1;Lt===ur&&wt.length<6;)wt.push(Lt),Lt=this.consumeCodePoint(),Pt=!0;if(Pt){var jt=parseInt(he.apply(void 0,wt.map(function(Qe){return Qe===ur?vn:Qe})),16),Ae=parseInt(he.apply(void 0,wt.map(function(Qe){return Qe===ur?gn:Qe})),16);return{type:30,start:jt,end:Ae}}var Fe=parseInt(he.apply(void 0,wt),16);if(this.peekCodePoint(0)===Mn&&on(this.peekCodePoint(1))){this.consumeCodePoint(),Lt=this.consumeCodePoint();for(var Je=[];on(Lt)&&Je.length<6;)Je.push(Lt),Lt=this.consumeCodePoint();var Ae=parseInt(he.apply(void 0,Je),16);return{type:30,start:Fe,end:Ae}}else return{type:30,start:Fe,end:Fe}},Bt.prototype.consumeIdentLikeToken=function(){var wt=this.consumeName();return wt.toLowerCase()==="url"&&this.peekCodePoint(0)===Fn?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Fn?(this.consumeCodePoint(),{type:19,value:wt}):{type:20,value:wt}},Bt.prototype.consumeUrlToken=function(){var wt=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot)return{type:22,value:""};var Lt=this.peekCodePoint(0);if(Lt===fi||Lt===bi){var Pt=this.consumeStringToken(this.consumeCodePoint());return Pt.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===un)?(this.consumeCodePoint(),{type:22,value:Pt.value}):(this.consumeBadUrlRemnants(),us)}for(;;){var jt=this.consumeCodePoint();if(jt===Ot||jt===un)return{type:22,value:he.apply(void 0,wt)};if(Fr(jt))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Ot||this.peekCodePoint(0)===un?(this.consumeCodePoint(),{type:22,value:he.apply(void 0,wt)}):(this.consumeBadUrlRemnants(),us);if(jt===bi||jt===fi||jt===Fn||_r(jt))return this.consumeBadUrlRemnants(),us;if(jt===Zn)if(Wr(jt,this.peekCodePoint(0)))wt.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),us;else wt.push(jt)}},Bt.prototype.consumeWhiteSpace=function(){for(;Fr(this.peekCodePoint(0));)this.consumeCodePoint()},Bt.prototype.consumeBadUrlRemnants=function(){for(;;){var wt=this.consumeCodePoint();if(wt===un||wt===Ot)return;Wr(wt,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},Bt.prototype.consumeStringSlice=function(wt){for(var Lt=5e4,Pt="";wt>0;){var jt=Math.min(Lt,wt);Pt+=he.apply(void 0,this._value.splice(0,jt)),wt-=jt}return this._value.shift(),Pt},Bt.prototype.consumeStringToken=function(wt){var Lt="",Pt=0;do{var jt=this._value[Pt];if(jt===Ot||jt===void 0||jt===wt)return Lt+=this.consumeStringSlice(Pt),{type:0,value:Lt};if(jt===De)return this._value.splice(0,Pt),wr;if(jt===Zn){var Ae=this._value[Pt+1];Ae!==Ot&&Ae!==void 0&&(Ae===De?(Lt+=this.consumeStringSlice(Pt),Pt=-1,this._value.shift()):Wr(jt,Ae)&&(Lt+=this.consumeStringSlice(Pt),Lt+=he(this.consumeEscapedCodePoint()),Pt=-1))}Pt++}while(!0)},Bt.prototype.consumeNumber=function(){var wt=[],Lt=$n,Pt=this.peekCodePoint(0);for((Pt===xe||Pt===Mn)&&wt.push(this.consumeCodePoint());qe(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0);var jt=this.peekCodePoint(1);if(Pt===Bi&&qe(jt))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Lt=se;qe(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());Pt=this.peekCodePoint(0),jt=this.peekCodePoint(1);var Ae=this.peekCodePoint(2);if((Pt===Rn||Pt===vi)&&((jt===xe||jt===Mn)&&qe(Ae)||qe(jt)))for(wt.push(this.consumeCodePoint(),this.consumeCodePoint()),Lt=se;qe(this.peekCodePoint(0));)wt.push(this.consumeCodePoint());return[Nr(wt),Lt]},Bt.prototype.consumeNumericToken=function(){var wt=this.consumeNumber(),Lt=wt[0],Pt=wt[1],jt=this.peekCodePoint(0),Ae=this.peekCodePoint(1),Fe=this.peekCodePoint(2);if(no(jt,Ae,Fe)){var Je=this.consumeName();return{type:15,number:Lt,flags:Pt,unit:Je}}return jt===ci?(this.consumeCodePoint(),{type:16,number:Lt,flags:Pt}):{type:17,number:Lt,flags:Pt}},Bt.prototype.consumeEscapedCodePoint=function(){var wt=this.consumeCodePoint();if(on(wt)){for(var Lt=he(wt);on(this.peekCodePoint(0))&&Lt.length<6;)Lt+=he(this.consumeCodePoint());Fr(this.peekCodePoint(0))&&this.consumeCodePoint();var Pt=parseInt(Lt,16);return Pt===0||In(Pt)||Pt>1114111?ee:Pt}return wt===Ot?ee:wt},Bt.prototype.consumeName=function(){for(var wt="";;){var Lt=this.consumeCodePoint();if(Zr(Lt))wt+=he(Lt);else if(Wr(Lt,this.peekCodePoint(0)))wt+=he(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(Lt),wt}},Bt}(),so=function(){function Bt(wt){this._tokens=wt}return Bt.create=function(wt){var Lt=new $r;return Lt.write(wt),new Bt(Lt.read())},Bt.parseValue=function(wt){return Bt.create(wt).parseComponentValue()},Bt.parseValues=function(wt){return Bt.create(wt).parseComponentValues()},Bt.prototype.parseComponentValue=function(){for(var wt=this.consumeToken();wt.type===31;)wt=this.consumeToken();if(wt.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(wt);var Lt=this.consumeComponentValue();do wt=this.consumeToken();while(wt.type===31);if(wt.type===32)return Lt;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},Bt.prototype.parseComponentValues=function(){for(var wt=[];;){var Lt=this.consumeComponentValue();if(Lt.type===32)return wt;wt.push(Lt),wt.push()}},Bt.prototype.consumeComponentValue=function(){var wt=this.consumeToken();switch(wt.type){case 11:case 28:case 2:return this.consumeSimpleBlock(wt.type);case 19:return this.consumeFunction(wt)}return wt},Bt.prototype.consumeSimpleBlock=function(wt){for(var Lt={type:wt,values:[]},Pt=this.consumeToken();;){if(Pt.type===32||eo(Pt,wt))return Lt;this.reconsumeToken(Pt),Lt.values.push(this.consumeComponentValue()),Pt=this.consumeToken()}},Bt.prototype.consumeFunction=function(wt){for(var Lt={name:wt.value,values:[],type:18};;){var Pt=this.consumeToken();if(Pt.type===32||Pt.type===3)return Lt;this.reconsumeToken(Pt),Lt.values.push(this.consumeComponentValue())}},Bt.prototype.consumeToken=function(){var wt=this._tokens.shift();return typeof wt=="undefined"?Qr:wt},Bt.prototype.reconsumeToken=function(wt){this._tokens.unshift(wt)},Bt}(),xo=function(Bt){return Bt.type===15},cr=function(Bt){return Bt.type===17},Co=function(Bt){return Bt.type===20},gs=function(Bt){return Bt.type===0},os=function(Bt,wt){return Co(Bt)&&Bt.value===wt},lo=function(Bt){return Bt.type!==31},Wi=function(Bt){return Bt.type!==31&&Bt.type!==4},zr=function(Bt){var wt=[],Lt=[];return Bt.forEach(function(Pt){if(Pt.type===4){if(Lt.length===0)throw new Error("Error parsing function args, zero tokens for arg");wt.push(Lt),Lt=[];return}Pt.type!==31&&Lt.push(Pt)}),Lt.length&&wt.push(Lt),wt},eo=function(Bt,wt){return wt===11&&Bt.type===12||wt===28&&Bt.type===29?!0:wt===2&&Bt.type===3},xs=function(Bt){return Bt.type===17||Bt.type===15},Ko=function(Bt){return Bt.type===16||xs(Bt)},Ds=function(Bt){return Bt.length>1?[Bt[0],Bt[1]]:[Bt[0]]},Po={type:17,number:0,flags:$n},dl={type:16,number:50,flags:$n},Qa={type:16,number:100,flags:$n},Ca=function(Bt,wt,Lt){var Pt=Bt[0],jt=Bt[1];return[zo(Pt,wt),zo(typeof jt!="undefined"?jt:Pt,Lt)]},zo=function(Bt,wt){if(Bt.type===16)return Bt.number/100*wt;if(xo(Bt))switch(Bt.unit){case"rem":case"em":return 16*Bt.number;case"px":default:return Bt.number}return Bt.number},ko="deg",fl="grad",Ll="rad",pa="turn",Io={name:"angle",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit){case ko:return Math.PI*wt.number/180;case fl:return Math.PI/200*wt.number;case Ll:return wt.number;case pa:return Math.PI*2*wt.number}throw new Error("Unsupported angle type")}},nu=function(Bt){return Bt.type===15&&(Bt.unit===ko||Bt.unit===fl||Bt.unit===Ll||Bt.unit===pa)},Ml=function(Bt){var wt=Bt.filter(Co).map(function(Lt){return Lt.value}).join(" ");switch(wt){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Po,Po];case"to top":case"bottom":return Qs(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Po,Qa];case"to right":case"left":return Qs(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[Qa,Qa];case"to bottom":case"top":return Qs(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[Qa,Po];case"to left":case"right":return Qs(270)}return 0},Qs=function(Bt){return Math.PI*Bt/180},ma={name:"color",parse:function(Bt,wt){if(wt.type===18){var Lt=Ro[wt.name];if(typeof Lt=="undefined")throw new Error('Attempting to parse an unsupported color function "'+wt.name+'"');return Lt(Bt,wt.values)}if(wt.type===5){if(wt.value.length===3){var Pt=wt.value.substring(0,1),jt=wt.value.substring(1,2),Ae=wt.value.substring(2,3);return hs(parseInt(Pt+Pt,16),parseInt(jt+jt,16),parseInt(Ae+Ae,16),1)}if(wt.value.length===4){var Pt=wt.value.substring(0,1),jt=wt.value.substring(1,2),Ae=wt.value.substring(2,3),Fe=wt.value.substring(3,4);return hs(parseInt(Pt+Pt,16),parseInt(jt+jt,16),parseInt(Ae+Ae,16),parseInt(Fe+Fe,16)/255)}if(wt.value.length===6){var Pt=wt.value.substring(0,2),jt=wt.value.substring(2,4),Ae=wt.value.substring(4,6);return hs(parseInt(Pt,16),parseInt(jt,16),parseInt(Ae,16),1)}if(wt.value.length===8){var Pt=wt.value.substring(0,2),jt=wt.value.substring(2,4),Ae=wt.value.substring(4,6),Fe=wt.value.substring(6,8);return hs(parseInt(Pt,16),parseInt(jt,16),parseInt(Ae,16),parseInt(Fe,16)/255)}}if(wt.type===20){var Je=ps[wt.value.toUpperCase()];if(typeof Je!="undefined")return Je}return ps.TRANSPARENT}},Yo=function(Bt){return(255&Bt)===0},Fo=function(Bt){var wt=255&Bt,Lt=255&Bt>>8,Pt=255&Bt>>16,jt=255&Bt>>24;return wt<255?"rgba("+jt+","+Pt+","+Lt+","+wt/255+")":"rgb("+jt+","+Pt+","+Lt+")"},hs=function(Bt,wt,Lt,Pt){return(Bt<<24|wt<<16|Lt<<8|Math.round(Pt*255)<<0)>>>0},js=function(Bt,wt){if(Bt.type===17)return Bt.number;if(Bt.type===16){var Lt=wt===3?1:255;return wt===3?Bt.number/100*Lt:Math.round(Bt.number/100*Lt)}return 0},bl=function(Bt,wt){var Lt=wt.filter(Wi);if(Lt.length===3){var Pt=Lt.map(js),jt=Pt[0],Ae=Pt[1],Fe=Pt[2];return hs(jt,Ae,Fe,1)}if(Lt.length===4){var Je=Lt.map(js),jt=Je[0],Ae=Je[1],Fe=Je[2],Qe=Je[3];return hs(jt,Ae,Fe,Qe)}return 0};function ia(Bt,wt,Lt){return Lt<0&&(Lt+=1),Lt>=1&&(Lt-=1),Lt<1/6?(wt-Bt)*Lt*6+Bt:Lt<1/2?wt:Lt<2/3?(wt-Bt)*6*(2/3-Lt)+Bt:Bt}var Uo=function(Bt,wt){var Lt=wt.filter(Wi),Pt=Lt[0],jt=Lt[1],Ae=Lt[2],Fe=Lt[3],Je=(Pt.type===17?Qs(Pt.number):Io.parse(Bt,Pt))/(Math.PI*2),Qe=Ko(jt)?jt.number/100:0,Nn=Ko(Ae)?Ae.number/100:0,zn=typeof Fe!="undefined"&&Ko(Fe)?zo(Fe,1):1;if(Qe===0)return hs(Nn*255,Nn*255,Nn*255,1);var pi=Nn<=.5?Nn*(Qe+1):Nn+Qe-Nn*Qe,Vi=Nn*2-pi,Gr=ia(Vi,pi,Je+1/3),xr=ia(Vi,pi,Je),br=ia(Vi,pi,Je-1/3);return hs(Gr*255,xr*255,br*255,zn)},Ro={hsl:Uo,hsla:Uo,rgb:bl,rgba:bl},wo=function(Bt,wt){return ma.parse(Bt,so.create(wt).parseComponentValue())},ps={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},ir={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Lt){if(Co(Lt))switch(Lt.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},ea={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Be=function(Bt,wt){var Lt=ma.parse(Bt,wt[0]),Pt=wt[1];return Pt&&Ko(Pt)?{color:Lt,stop:Pt}:{color:Lt,stop:null}},Hn=function(Bt,wt){var Lt=Bt[0],Pt=Bt[Bt.length-1];Lt.stop===null&&(Lt.stop=Po),Pt.stop===null&&(Pt.stop=Qa);for(var jt=[],Ae=0,Fe=0;Fe<Bt.length;Fe++){var Je=Bt[Fe].stop;if(Je!==null){var Qe=zo(Je,wt);Qe>Ae?jt.push(Qe):jt.push(Ae),Ae=Qe}else jt.push(null)}for(var Nn=null,Fe=0;Fe<jt.length;Fe++){var zn=jt[Fe];if(zn===null)Nn===null&&(Nn=Fe);else if(Nn!==null){for(var pi=Fe-Nn,Vi=jt[Nn-1],Gr=(zn-Vi)/(pi+1),xr=1;xr<=pi;xr++)jt[Nn+xr-1]=Gr*xr;Nn=null}}return Bt.map(function(br,Zo){var ao=br.color;return{color:ao,stop:Math.max(Math.min(1,jt[Zo]/wt),0)}})},kl=function(Bt,wt,Lt){var Pt=wt/2,jt=Lt/2,Ae=zo(Bt[0],wt)-Pt,Fe=jt-zo(Bt[1],Lt);return(Math.atan2(Fe,Ae)+Math.PI*2)%(Math.PI*2)},du=function(Bt,wt,Lt){var Pt=typeof Bt=="number"?Bt:kl(Bt,wt,Lt),jt=Math.abs(wt*Math.sin(Pt))+Math.abs(Lt*Math.cos(Pt)),Ae=wt/2,Fe=Lt/2,Je=jt/2,Qe=Math.sin(Pt-Math.PI/2)*Je,Nn=Math.cos(Pt-Math.PI/2)*Je;return[jt,Ae-Nn,Ae+Nn,Fe-Qe,Fe+Qe]},is=function(Bt,wt){return Math.sqrt(Bt*Bt+wt*wt)},ra=function(Bt,wt,Lt,Pt,jt){var Ae=[[0,0],[0,wt],[Bt,0],[Bt,wt]];return Ae.reduce(function(Fe,Je){var Qe=Je[0],Nn=Je[1],zn=is(Lt-Qe,Pt-Nn);return(jt?zn<Fe.optimumDistance:zn>Fe.optimumDistance)?{optimumCorner:Je,optimumDistance:zn}:Fe},{optimumDistance:jt?1/0:-1/0,optimumCorner:null}).optimumCorner},gl=function(Bt,wt,Lt,Pt,jt){var Ae=0,Fe=0;switch(Bt.size){case 0:Bt.shape===0?Ae=Fe=Math.min(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Lt),Math.abs(Lt-jt)):Bt.shape===1&&(Ae=Math.min(Math.abs(wt),Math.abs(wt-Pt)),Fe=Math.min(Math.abs(Lt),Math.abs(Lt-jt)));break;case 2:if(Bt.shape===0)Ae=Fe=Math.min(is(wt,Lt),is(wt,Lt-jt),is(wt-Pt,Lt),is(wt-Pt,Lt-jt));else if(Bt.shape===1){var Je=Math.min(Math.abs(Lt),Math.abs(Lt-jt))/Math.min(Math.abs(wt),Math.abs(wt-Pt)),Qe=ra(Pt,jt,wt,Lt,!0),Nn=Qe[0],zn=Qe[1];Ae=is(Nn-wt,(zn-Lt)/Je),Fe=Je*Ae}break;case 1:Bt.shape===0?Ae=Fe=Math.max(Math.abs(wt),Math.abs(wt-Pt),Math.abs(Lt),Math.abs(Lt-jt)):Bt.shape===1&&(Ae=Math.max(Math.abs(wt),Math.abs(wt-Pt)),Fe=Math.max(Math.abs(Lt),Math.abs(Lt-jt)));break;case 3:if(Bt.shape===0)Ae=Fe=Math.max(is(wt,Lt),is(wt,Lt-jt),is(wt-Pt,Lt),is(wt-Pt,Lt-jt));else if(Bt.shape===1){var Je=Math.max(Math.abs(Lt),Math.abs(Lt-jt))/Math.max(Math.abs(wt),Math.abs(wt-Pt)),pi=ra(Pt,jt,wt,Lt,!1),Nn=pi[0],zn=pi[1];Ae=is(Nn-wt,(zn-Lt)/Je),Fe=Je*Ae}break}return Array.isArray(Bt.size)&&(Ae=zo(Bt.size[0],Pt),Fe=Bt.size.length===2?zo(Bt.size[1],jt):Ae),[Ae,Fe]},zl=function(Bt,wt){var Lt=Qs(180),Pt=[];return zr(wt).forEach(function(jt,Ae){if(Ae===0){var Fe=jt[0];if(Fe.type===20&&Fe.value==="to"){Lt=Ml(jt);return}else if(nu(Fe)){Lt=Io.parse(Bt,Fe);return}}var Je=Be(Bt,jt);Pt.push(Je)}),{angle:Lt,stops:Pt,type:1}},fu=function(Bt,wt){var Lt=Qs(180),Pt=[];return zr(wt).forEach(function(jt,Ae){if(Ae===0){var Fe=jt[0];if(Fe.type===20&&["top","left","right","bottom"].indexOf(Fe.value)!==-1){Lt=Ml(jt);return}else if(nu(Fe)){Lt=(Io.parse(Bt,Fe)+Qs(270))%Qs(360);return}}var Je=Be(Bt,jt);Pt.push(Je)}),{angle:Lt,stops:Pt,type:1}},Ps=function(Bt,wt){var Lt=Qs(180),Pt=[],jt=1,Ae=0,Fe=3,Je=[];return zr(wt).forEach(function(Qe,Nn){var zn=Qe[0];if(Nn===0){if(Co(zn)&&zn.value==="linear"){jt=1;return}else if(Co(zn)&&zn.value==="radial"){jt=2;return}}if(zn.type===18){if(zn.name==="from"){var pi=ma.parse(Bt,zn.values[0]);Pt.push({stop:Po,color:pi})}else if(zn.name==="to"){var pi=ma.parse(Bt,zn.values[0]);Pt.push({stop:Qa,color:pi})}else if(zn.name==="color-stop"){var Vi=zn.values.filter(Wi);if(Vi.length===2){var pi=ma.parse(Bt,Vi[1]),Gr=Vi[0];cr(Gr)&&Pt.push({stop:{type:16,number:Gr.number*100,flags:Gr.flags},color:pi})}}}}),jt===1?{angle:(Lt+Qs(180))%Qs(360),stops:Pt,type:jt}:{size:Fe,shape:Ae,stops:Pt,position:Je,type:jt}},Xr="closest-side",Pa="farthest-side",il="closest-corner",Ss="farthest-corner",yo="circle",Fs="ellipse",Oa="cover",ss="contain",rl=function(Bt,wt){var Lt=0,Pt=3,jt=[],Ae=[];return zr(wt).forEach(function(Fe,Je){var Qe=!0;if(Je===0){var Nn=!1;Qe=Fe.reduce(function(pi,Vi){if(Nn)if(Co(Vi))switch(Vi.value){case"center":return Ae.push(dl),pi;case"top":case"left":return Ae.push(Po),pi;case"right":case"bottom":return Ae.push(Qa),pi}else(Ko(Vi)||xs(Vi))&&Ae.push(Vi);else if(Co(Vi))switch(Vi.value){case yo:return Lt=0,!1;case Fs:return Lt=1,!1;case"at":return Nn=!0,!1;case Xr:return Pt=0,!1;case Oa:case Pa:return Pt=1,!1;case ss:case il:return Pt=2,!1;case Ss:return Pt=3,!1}else if(xs(Vi)||Ko(Vi))return Array.isArray(Pt)||(Pt=[]),Pt.push(Vi),!1;return pi},Qe)}if(Qe){var zn=Be(Bt,Fe);jt.push(zn)}}),{size:Pt,shape:Lt,stops:jt,position:Ae,type:2}},Ws=function(Bt,wt){var Lt=0,Pt=3,jt=[],Ae=[];return zr(wt).forEach(function(Fe,Je){var Qe=!0;if(Je===0?Qe=Fe.reduce(function(zn,pi){if(Co(pi))switch(pi.value){case"center":return Ae.push(dl),!1;case"top":case"left":return Ae.push(Po),!1;case"right":case"bottom":return Ae.push(Qa),!1}else if(Ko(pi)||xs(pi))return Ae.push(pi),!1;return zn},Qe):Je===1&&(Qe=Fe.reduce(function(zn,pi){if(Co(pi))switch(pi.value){case yo:return Lt=0,!1;case Fs:return Lt=1,!1;case ss:case Xr:return Pt=0,!1;case Pa:return Pt=1,!1;case il:return Pt=2,!1;case Oa:case Ss:return Pt=3,!1}else if(xs(pi)||Ko(pi))return Array.isArray(Pt)||(Pt=[]),Pt.push(pi),!1;return zn},Qe)),Qe){var Nn=Be(Bt,Fe);jt.push(Nn)}}),{size:Pt,shape:Lt,stops:jt,position:Ae,type:2}},Wu=function(Bt){return Bt.type===1},Ho=function(Bt){return Bt.type===2},oa={name:"image",parse:function(Bt,wt){if(wt.type===22){var Lt={url:wt.value,type:0};return Bt.cache.addImage(wt.value),Lt}if(wt.type===18){var Pt=as[wt.name];if(typeof Pt=="undefined")throw new Error('Attempting to parse an unsupported image function "'+wt.name+'"');return Pt(Bt,wt.values)}throw new Error("Unsupported image type "+wt.type)}};function Qo(Bt){return!(Bt.type===20&&Bt.value==="none")&&(Bt.type!==18||!!as[Bt.name])}var as={"linear-gradient":zl,"-moz-linear-gradient":fu,"-ms-linear-gradient":fu,"-o-linear-gradient":fu,"-webkit-linear-gradient":fu,"radial-gradient":rl,"-moz-radial-gradient":Ws,"-ms-radial-gradient":Ws,"-o-radial-gradient":Ws,"-webkit-radial-gradient":Ws,"-webkit-gradient":Ps},ms={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Lt=wt[0];return Lt.type===20&&Lt.value==="none"?[]:wt.filter(function(Pt){return Wi(Pt)&&Qo(Pt)}).map(function(Pt){return oa.parse(Bt,Pt)})}},Ts={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(Bt,wt){return wt.map(function(Lt){if(Co(Lt))switch(Lt.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Vo={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(Bt,wt){return zr(wt).map(function(Lt){return Lt.filter(Ko)}).map(Ds)}},dA={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(Bt,wt){return zr(wt).map(function(Lt){return Lt.filter(Co).map(function(Pt){return Pt.value}).join(" ")}).map(Yr)}},Yr=function(Bt){switch(Bt){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Yu;(function(Bt){Bt.AUTO="auto",Bt.CONTAIN="contain",Bt.COVER="cover"})(Yu||(Yu={}));var Eo={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(Bt,wt){return zr(wt).map(function(Lt){return Lt.filter(Oh)})}},Oh=function(Bt){return Co(Bt)||Ko(Bt)},iu=function(Bt){return{name:"border-"+Bt+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},TA=iu("top"),Rh=iu("right"),ch=iu("bottom"),gu=iu("left"),pu=function(Bt){return{name:"border-radius-"+Bt,initialValue:"0 0",prefix:!1,type:1,parse:function(wt,Lt){return Ds(Lt.filter(Ko))}}},Go=pu("top-left"),Gl=pu("top-right"),dh=pu("bottom-right"),Pu=pu("bottom-left"),fA=function(Bt){return{name:"border-"+Bt+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(wt,Lt){switch(Lt){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Fu=fA("top"),So=fA("right"),_o=fA("bottom"),Os=fA("left"),sa=function(Bt){return{name:"border-"+Bt+"-width",initialValue:"0",type:0,prefix:!1,parse:function(wt,Lt){return xo(Lt)?Lt.number:0}}},va=sa("top"),Xu=sa("right"),Eu=sa("bottom"),Ju=sa("left"),jl={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},mu={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"rtl":return 1;case"ltr":default:return 0}}},$g={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Co).reduce(function(Lt,Pt){return Lt|qg(Pt.value)},0)}},qg=function(Bt){switch(Bt){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},tp={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},sg={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(Bt,wt){return wt.type===20&&wt.value==="normal"?0:wt.type===17||wt.type===15?wt.number:0}},Rs;(function(Bt){Bt.NORMAL="normal",Bt.STRICT="strict"})(Rs||(Rs={}));var NA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"strict":return Rs.STRICT;case"normal":default:return Rs.NORMAL}}},ls={name:"line-height",initialValue:"normal",prefix:!1,type:4},ya=function(Bt,wt){return Co(Bt)&&Bt.value==="normal"?1.2*wt:Bt.type===17?wt*Bt.number:Ko(Bt)?zo(Bt,wt):wt},Ma={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(Bt,wt){return wt.type===20&&wt.value==="none"?null:oa.parse(Bt,wt)}},ba={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"inside":return 0;case"outside":default:return 1}}},DA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},ca=function(Bt){return{name:"margin-"+Bt,initialValue:"0",prefix:!1,type:4}},fh=ca("top"),ag=ca("right"),lg=ca("bottom"),pl=ca("left"),Fd={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Co).map(function(Lt){switch(Lt.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},vs={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-word":return"break-word";case"normal":default:return"normal"}}},Lu=function(Bt){return{name:"padding-"+Bt,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},cf=Lu("top"),IA=Lu("right"),UA=Lu("bottom"),Ed=Lu("left"),da={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},ka={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},gh={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&os(wt[0],"none")?[]:zr(wt).map(function(Lt){for(var Pt={color:ps.TRANSPARENT,offsetX:Po,offsetY:Po,blur:Po},jt=0,Ae=0;Ae<Lt.length;Ae++){var Fe=Lt[Ae];xs(Fe)?(jt===0?Pt.offsetX=Fe:jt===1?Pt.offsetY=Fe:Pt.blur=Fe,jt++):Pt.color=ma.parse(Bt,Fe)}return Pt})}},Vl={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},QA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(Bt,wt){if(wt.type===20&&wt.value==="none")return null;if(wt.type===18){var Lt=Mu[wt.name];if(typeof Lt=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+wt.name+'"');return Lt(wt.values)}return null}},Tl=function(Bt){var wt=Bt.filter(function(Lt){return Lt.type===17}).map(function(Lt){return Lt.number});return wt.length===6?wt:null},aa=function(Bt){var wt=Bt.filter(function(Qe){return Qe.type===17}).map(function(Qe){return Qe.number}),Lt=wt[0],Pt=wt[1];wt[2],wt[3];var jt=wt[4],Ae=wt[5];wt[6],wt[7],wt[8],wt[9],wt[10],wt[11];var Fe=wt[12],Je=wt[13];return wt[14],wt[15],wt.length===16?[Lt,Pt,jt,Ae,Fe,Je]:null},Mu={matrix:Tl,matrix3d:aa},Nl={type:16,number:50,flags:$n},Ta=[Nl,Nl],ru={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(Bt,wt){var Lt=wt.filter(Ko);return Lt.length!==2?Ta:[Lt[0],Lt[1]]}},ys={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},ml;(function(Bt){Bt.NORMAL="normal",Bt.BREAK_ALL="break-all",Bt.KEEP_ALL="keep-all"})(ml||(ml={}));for(var gA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"break-all":return ml.BREAK_ALL;case"keep-all":return ml.KEEP_ALL;case"normal":default:return ml.NORMAL}}},OA={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(Bt,wt){if(wt.type===20)return{auto:!0,order:0};if(cr(wt))return{auto:!1,order:wt.number};throw new Error("Invalid z-index number parsed")}},RA={name:"time",parse:function(Bt,wt){if(wt.type===15)switch(wt.unit.toLowerCase()){case"s":return 1e3*wt.number;case"ms":return wt.number}throw new Error("Unsupported time type")}},Qc={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(Bt,wt){return cr(wt)?wt.number:1}},Hh={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Oc={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(Co).map(function(Lt){switch(Lt.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(Lt){return Lt!==0})}},To={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(Bt,wt){var Lt=[],Pt=[];return wt.forEach(function(jt){switch(jt.type){case 20:case 0:Lt.push(jt.value);break;case 17:Lt.push(jt.number.toString());break;case 4:Pt.push(Lt.join(" ")),Lt.length=0;break}}),Lt.length&&Pt.push(Lt.join(" ")),Pt.map(function(jt){return jt.indexOf(" ")===-1?jt:"'"+jt+"'"})}},Rc={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},df={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(Bt,wt){if(cr(wt))return wt.number;if(Co(wt))switch(wt.value){case"bold":return 700;case"normal":default:return 400}return 400}},Ld={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.filter(Co).map(function(Lt){return Lt.value})}},bu={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(Bt,wt){switch(wt){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},wa=function(Bt,wt){return(Bt&wt)!==0},Hc={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){if(wt.length===0)return[];var Lt=wt[0];return Lt.type===20&&Lt.value==="none"?[]:wt}},ep={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Lt=wt[0];if(Lt.type===20&&Lt.value==="none")return null;for(var Pt=[],jt=wt.filter(lo),Ae=0;Ae<jt.length;Ae++){var Fe=jt[Ae],Je=jt[Ae+1];if(Fe.type===20){var Qe=Je&&cr(Je)?Je.number:1;Pt.push({counter:Fe.value,increment:Qe})}}return Pt}},_h={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return[];for(var Lt=[],Pt=wt.filter(lo),jt=0;jt<Pt.length;jt++){var Ae=Pt[jt],Fe=Pt[jt+1];if(Co(Ae)&&Ae.value!=="none"){var Je=Fe&&cr(Fe)?Fe.number:0;Lt.push({counter:Ae.value,reset:Je})}}return Lt}},Md={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(Bt,wt){return wt.filter(xo).map(function(Lt){return RA.parse(Bt,Lt)})}},Kh={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(Bt,wt){if(wt.length===0)return null;var Lt=wt[0];if(Lt.type===20&&Lt.value==="none")return null;var Pt=[],jt=wt.filter(gs);if(jt.length%2!==0)return null;for(var Ae=0;Ae<jt.length;Ae+=2){var Fe=jt[Ae].value,Je=jt[Ae+1].value;Pt.push({open:Fe,close:Je})}return Pt}},zh=function(Bt,wt,Lt){if(!Bt)return"";var Pt=Bt[Math.min(wt,Bt.length-1)];return Pt?Lt?Pt.open:Pt.close:""},_c={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(Bt,wt){return wt.length===1&&os(wt[0],"none")?[]:zr(wt).map(function(Lt){for(var Pt={color:255,offsetX:Po,offsetY:Po,blur:Po,spread:Po,inset:!1},jt=0,Ae=0;Ae<Lt.length;Ae++){var Fe=Lt[Ae];os(Fe,"inset")?Pt.inset=!0:xs(Fe)?(jt===0?Pt.offsetX=Fe:jt===1?Pt.offsetY=Fe:jt===2?Pt.blur=Fe:Pt.spread=Fe,jt++):Pt.color=ma.parse(Bt,Fe)}return Pt})}},ff={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(Bt,wt){var Lt=[0,1,2],Pt=[];return wt.filter(Co).forEach(function(jt){switch(jt.value){case"stroke":Pt.push(1);break;case"fill":Pt.push(0);break;case"markers":Pt.push(2);break}}),Lt.forEach(function(jt){Pt.indexOf(jt)===-1&&Pt.push(jt)}),Pt}},Kc={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Gh={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(Bt,wt){return xo(wt)?wt.number:0}},HA=function(){function Bt(wt,Lt){var Pt,jt;this.animationDuration=qr(wt,Md,Lt.animationDuration),this.backgroundClip=qr(wt,ir,Lt.backgroundClip),this.backgroundColor=qr(wt,ea,Lt.backgroundColor),this.backgroundImage=qr(wt,ms,Lt.backgroundImage),this.backgroundOrigin=qr(wt,Ts,Lt.backgroundOrigin),this.backgroundPosition=qr(wt,Vo,Lt.backgroundPosition),this.backgroundRepeat=qr(wt,dA,Lt.backgroundRepeat),this.backgroundSize=qr(wt,Eo,Lt.backgroundSize),this.borderTopColor=qr(wt,TA,Lt.borderTopColor),this.borderRightColor=qr(wt,Rh,Lt.borderRightColor),this.borderBottomColor=qr(wt,ch,Lt.borderBottomColor),this.borderLeftColor=qr(wt,gu,Lt.borderLeftColor),this.borderTopLeftRadius=qr(wt,Go,Lt.borderTopLeftRadius),this.borderTopRightRadius=qr(wt,Gl,Lt.borderTopRightRadius),this.borderBottomRightRadius=qr(wt,dh,Lt.borderBottomRightRadius),this.borderBottomLeftRadius=qr(wt,Pu,Lt.borderBottomLeftRadius),this.borderTopStyle=qr(wt,Fu,Lt.borderTopStyle),this.borderRightStyle=qr(wt,So,Lt.borderRightStyle),this.borderBottomStyle=qr(wt,_o,Lt.borderBottomStyle),this.borderLeftStyle=qr(wt,Os,Lt.borderLeftStyle),this.borderTopWidth=qr(wt,va,Lt.borderTopWidth),this.borderRightWidth=qr(wt,Xu,Lt.borderRightWidth),this.borderBottomWidth=qr(wt,Eu,Lt.borderBottomWidth),this.borderLeftWidth=qr(wt,Ju,Lt.borderLeftWidth),this.boxShadow=qr(wt,_c,Lt.boxShadow),this.color=qr(wt,jl,Lt.color),this.direction=qr(wt,mu,Lt.direction),this.display=qr(wt,$g,Lt.display),this.float=qr(wt,tp,Lt.cssFloat),this.fontFamily=qr(wt,To,Lt.fontFamily),this.fontSize=qr(wt,Rc,Lt.fontSize),this.fontStyle=qr(wt,bu,Lt.fontStyle),this.fontVariant=qr(wt,Ld,Lt.fontVariant),this.fontWeight=qr(wt,df,Lt.fontWeight),this.letterSpacing=qr(wt,sg,Lt.letterSpacing),this.lineBreak=qr(wt,NA,Lt.lineBreak),this.lineHeight=qr(wt,ls,Lt.lineHeight),this.listStyleImage=qr(wt,Ma,Lt.listStyleImage),this.listStylePosition=qr(wt,ba,Lt.listStylePosition),this.listStyleType=qr(wt,DA,Lt.listStyleType),this.marginTop=qr(wt,fh,Lt.marginTop),this.marginRight=qr(wt,ag,Lt.marginRight),this.marginBottom=qr(wt,lg,Lt.marginBottom),this.marginLeft=qr(wt,pl,Lt.marginLeft),this.opacity=qr(wt,Qc,Lt.opacity);var Ae=qr(wt,Fd,Lt.overflow);this.overflowX=Ae[0],this.overflowY=Ae[Ae.length>1?1:0],this.overflowWrap=qr(wt,vs,Lt.overflowWrap),this.paddingTop=qr(wt,cf,Lt.paddingTop),this.paddingRight=qr(wt,IA,Lt.paddingRight),this.paddingBottom=qr(wt,UA,Lt.paddingBottom),this.paddingLeft=qr(wt,Ed,Lt.paddingLeft),this.paintOrder=qr(wt,ff,Lt.paintOrder),this.position=qr(wt,ka,Lt.position),this.textAlign=qr(wt,da,Lt.textAlign),this.textDecorationColor=qr(wt,Hh,(Pt=Lt.textDecorationColor)!==null&&Pt!==void 0?Pt:Lt.color),this.textDecorationLine=qr(wt,Oc,(jt=Lt.textDecorationLine)!==null&&jt!==void 0?jt:Lt.textDecoration),this.textShadow=qr(wt,gh,Lt.textShadow),this.textTransform=qr(wt,Vl,Lt.textTransform),this.transform=qr(wt,QA,Lt.transform),this.transformOrigin=qr(wt,ru,Lt.transformOrigin),this.visibility=qr(wt,ys,Lt.visibility),this.webkitTextStrokeColor=qr(wt,Kc,Lt.webkitTextStrokeColor),this.webkitTextStrokeWidth=qr(wt,Gh,Lt.webkitTextStrokeWidth),this.wordBreak=qr(wt,gA,Lt.wordBreak),this.zIndex=qr(wt,OA,Lt.zIndex)}return Bt.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},Bt.prototype.isTransparent=function(){return Yo(this.backgroundColor)},Bt.prototype.isTransformed=function(){return this.transform!==null},Bt.prototype.isPositioned=function(){return this.position!==0},Bt.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},Bt.prototype.isFloating=function(){return this.float!==0},Bt.prototype.isInlineLevel=function(){return wa(this.display,4)||wa(this.display,33554432)||wa(this.display,268435456)||wa(this.display,536870912)||wa(this.display,67108864)||wa(this.display,134217728)},Bt}(),ol=function(){function Bt(wt,Lt){this.content=qr(wt,Hc,Lt.content),this.quotes=qr(wt,Kh,Lt.quotes)}return Bt}(),ku=function(){function Bt(wt,Lt){this.counterIncrement=qr(wt,ep,Lt.counterIncrement),this.counterReset=qr(wt,_h,Lt.counterReset)}return Bt}(),qr=function(Bt,wt,Lt){var Pt=new $r,jt=Lt!==null&&typeof Lt!="undefined"?Lt.toString():wt.initialValue;Pt.write(jt);var Ae=new so(Pt.read());switch(wt.type){case 2:var Fe=Ae.parseComponentValue();return wt.parse(Bt,Co(Fe)?Fe.value:wt.initialValue);case 0:return wt.parse(Bt,Ae.parseComponentValue());case 1:return wt.parse(Bt,Ae.parseComponentValues());case 4:return Ae.parseComponentValue();case 3:switch(wt.format){case"angle":return Io.parse(Bt,Ae.parseComponentValue());case"color":return ma.parse(Bt,Ae.parseComponentValue());case"image":return oa.parse(Bt,Ae.parseComponentValue());case"length":var Je=Ae.parseComponentValue();return xs(Je)?Je:Po;case"length-percentage":var Qe=Ae.parseComponentValue();return Ko(Qe)?Qe:Po;case"time":return RA.parse(Bt,Ae.parseComponentValue())}break}},pA="data-html2canvas-debug",bd=function(Bt){var wt=Bt.getAttribute(pA);switch(wt){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},jh=function(Bt,wt){var Lt=bd(Bt);return Lt===1||wt===Lt},Tu=function(){function Bt(wt,Lt){if(this.context=wt,this.textNodes=[],this.elements=[],this.flags=0,jh(Lt,3))debugger;this.styles=new HA(wt,window.getComputedStyle(Lt,null)),oc(Lt)&&(this.styles.animationDuration.some(function(Pt){return Pt>0})&&(Lt.style.animationDuration="0s"),this.styles.transform!==null&&(Lt.style.transform="none")),this.bounds=Ht(this.context,Lt),jh(Lt,4)&&(this.flags|=16)}return Bt}(),_A="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",KA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vh=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ph=0;ph<KA.length;ph++)Vh[KA.charCodeAt(ph)]=ph;for(var Va=function(Bt){var wt=Bt.length*.75,Lt=Bt.length,Pt,jt=0,Ae,Fe,Je,Qe;Bt[Bt.length-1]==="="&&(wt--,Bt[Bt.length-2]==="="&&wt--);var Nn=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(wt):new Array(wt),zn=Array.isArray(Nn)?Nn:new Uint8Array(Nn);for(Pt=0;Pt<Lt;Pt+=4)Ae=Vh[Bt.charCodeAt(Pt)],Fe=Vh[Bt.charCodeAt(Pt+1)],Je=Vh[Bt.charCodeAt(Pt+2)],Qe=Vh[Bt.charCodeAt(Pt+3)],zn[jt++]=Ae<<2|Fe>>4,zn[jt++]=(Fe&15)<<4|Je>>2,zn[jt++]=(Je&3)<<6|Qe&63;return Nn},mh=function(Bt){for(var wt=Bt.length,Lt=[],Pt=0;Pt<wt;Pt+=2)Lt.push(Bt[Pt+1]<<8|Bt[Pt]);return Lt},gf=function(Bt){for(var wt=Bt.length,Lt=[],Pt=0;Pt<wt;Pt+=4)Lt.push(Bt[Pt+3]<<24|Bt[Pt+2]<<16|Bt[Pt+1]<<8|Bt[Pt]);return Lt},Nu=5,vh=11,Du=2,zc=vh-Nu,kd=65536>>Nu,la=1<<Nu,yh=la-1,zA=1024>>Nu,wh=kd+zA,Gc=wh,pf=32,Zh=Gc+pf,ug=65536>>vh,xh=1<<zc,ou=xh-1,mf=function(Bt,wt,Lt){return Bt.slice?Bt.slice(wt,Lt):new Uint16Array(Array.prototype.slice.call(Bt,wt,Lt))},vf=function(Bt,wt,Lt){return Bt.slice?Bt.slice(wt,Lt):new Uint32Array(Array.prototype.slice.call(Bt,wt,Lt))},Sh=function(Bt,wt){var Lt=Va(Bt),Pt=Array.isArray(Lt)?gf(Lt):new Uint32Array(Lt),jt=Array.isArray(Lt)?mh(Lt):new Uint16Array(Lt),Ae=24,Fe=mf(jt,Ae/2,Pt[4]/2),Je=Pt[5]===2?mf(jt,(Ae+Pt[4])/2):vf(Pt,Math.ceil((Ae+Pt[4])/4));return new Wh(Pt[0],Pt[1],Pt[2],Pt[3],Fe,Je)},Wh=function(){function Bt(wt,Lt,Pt,jt,Ae,Fe){this.initialValue=wt,this.errorValue=Lt,this.highStart=Pt,this.highValueIndex=jt,this.index=Ae,this.data=Fe}return Bt.prototype.get=function(wt){var Lt;if(wt>=0){if(wt<55296||wt>56319&&wt<=65535)return Lt=this.index[wt>>Nu],Lt=(Lt<<Du)+(wt&yh),this.data[Lt];if(wt<=65535)return Lt=this.index[kd+(wt-55296>>Nu)],Lt=(Lt<<Du)+(wt&yh),this.data[Lt];if(wt<this.highStart)return Lt=Zh-ug+(wt>>vh),Lt=this.index[Lt],Lt+=wt>>Nu&ou,Lt=this.index[Lt],Lt=(Lt<<Du)+(wt&yh),this.data[Lt];if(wt<=1114111)return this.data[this.highValueIndex]}return this.errorValue},Bt}(),Vs="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",mA=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),jc=0;jc<Vs.length;jc++)mA[Vs.charCodeAt(jc)]=jc;var Td=1,Nd=2,Re=3,GA=4,Iu=5,Ag=7,Dd=8,Id=9,Vc=10,hg=11,Na=12,Yh=13,Ud=14,Qd=15,cg=function(Bt){for(var wt=[],Lt=0,Pt=Bt.length;Lt<Pt;){var jt=Bt.charCodeAt(Lt++);if(jt>=55296&&jt<=56319&&Lt<Pt){var Ae=Bt.charCodeAt(Lt++);(Ae&64512)===56320?wt.push(((jt&1023)<<10)+(Ae&1023)+65536):(wt.push(jt),Lt--)}else wt.push(jt)}return wt},dg=function(){for(var Bt=[],wt=0;wt<arguments.length;wt++)Bt[wt]=arguments[wt];if(String.fromCodePoint)return String.fromCodePoint.apply(String,Bt);var Lt=Bt.length;if(!Lt)return"";for(var Pt=[],jt=-1,Ae="";++jt<Lt;){var Fe=Bt[jt];Fe<=65535?Pt.push(Fe):(Fe-=65536,Pt.push((Fe>>10)+55296,Fe%1024+56320)),(jt+1===Lt||Pt.length>16384)&&(Ae+=String.fromCharCode.apply(String,Pt),Pt.length=0)}return Ae},fg=Sh(_A),Zl="\xD7",vl="\xF7",Xh=function(Bt){return fg.get(Bt)},yf=function(Bt,wt,Lt){var Pt=Lt-2,jt=wt[Pt],Ae=wt[Lt-1],Fe=wt[Lt];if(Ae===Nd&&Fe===Re)return Zl;if(Ae===Nd||Ae===Re||Ae===GA||Fe===Nd||Fe===Re||Fe===GA)return vl;if(Ae===Dd&&[Dd,Id,hg,Na].indexOf(Fe)!==-1||(Ae===hg||Ae===Id)&&(Fe===Id||Fe===Vc)||(Ae===Na||Ae===Vc)&&Fe===Vc||Fe===Yh||Fe===Iu||Fe===Ag||Ae===Td)return Zl;if(Ae===Yh&&Fe===Ud){for(;jt===Iu;)jt=wt[--Pt];if(jt===Ud)return Zl}if(Ae===Qd&&Fe===Qd){for(var Je=0;jt===Qd;)Je++,jt=wt[--Pt];if(Je%2===0)return Zl}return vl},$u=function(Bt){var wt=cg(Bt),Lt=wt.length,Pt=0,jt=0,Ae=wt.map(Xh);return{next:function(){if(Pt>=Lt)return{done:!0,value:null};for(var Fe=Zl;Pt<Lt&&(Fe=yf(wt,Ae,++Pt))===Zl;);if(Fe!==Zl||Pt===Lt){var Je=dg.apply(null,wt.slice(jt,Pt));return jt=Pt,{value:Je,done:!1}}return{done:!0,value:null}}}},Zc=function(Bt){for(var wt=$u(Bt),Lt=[],Pt;!(Pt=wt.next()).done;)Pt.value&&Lt.push(Pt.value.slice());return Lt},Od=function(Bt){var wt=123;if(Bt.createRange){var Lt=Bt.createRange();if(Lt.getBoundingClientRect){var Pt=Bt.createElement("boundtest");Pt.style.height=wt+"px",Pt.style.display="block",Bt.body.appendChild(Pt),Lt.selectNode(Pt);var jt=Lt.getBoundingClientRect(),Ae=Math.round(jt.height);if(Bt.body.removeChild(Pt),Ae===wt)return!0}}return!1},Wc=function(Bt){var wt=Bt.createElement("boundtest");wt.style.width="50px",wt.style.display="block",wt.style.fontSize="12px",wt.style.letterSpacing="0px",wt.style.wordSpacing="0px",Bt.body.appendChild(wt);var Lt=Bt.createRange();wt.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var Pt=wt.firstChild,jt=oe(Pt.data).map(function(Qe){return he(Qe)}),Ae=0,Fe={},Je=jt.every(function(Qe,Nn){Lt.setStart(Pt,Ae),Lt.setEnd(Pt,Ae+Qe.length);var zn=Lt.getBoundingClientRect();Ae+=Qe.length;var pi=zn.x>Fe.x||zn.y>Fe.y;return Fe=zn,Nn===0?!0:pi});return Bt.body.removeChild(wt),Je},Dl=function(){return typeof new Image().crossOrigin!="undefined"},wf=function(){return typeof new XMLHttpRequest().responseType=="string"},xf=function(Bt){var wt=new Image,Lt=Bt.createElement("canvas"),Pt=Lt.getContext("2d");if(!Pt)return!1;wt.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{Pt.drawImage(wt,0,0),Lt.toDataURL()}catch(jt){return!1}return!0},Wl=function(Bt){return Bt[0]===0&&Bt[1]===255&&Bt[2]===0&&Bt[3]===255},Jh=function(Bt){var wt=Bt.createElement("canvas"),Lt=100;wt.width=Lt,wt.height=Lt;var Pt=wt.getContext("2d");if(!Pt)return Promise.reject(!1);Pt.fillStyle="rgb(0, 255, 0)",Pt.fillRect(0,0,Lt,Lt);var jt=new Image,Ae=wt.toDataURL();jt.src=Ae;var Fe=Yc(Lt,Lt,0,0,jt);return Pt.fillStyle="red",Pt.fillRect(0,0,Lt,Lt),Sf(Fe).then(function(Je){Pt.drawImage(Je,0,0);var Qe=Pt.getImageData(0,0,Lt,Lt).data;Pt.fillStyle="red",Pt.fillRect(0,0,Lt,Lt);var Nn=Bt.createElement("div");return Nn.style.backgroundImage="url("+Ae+")",Nn.style.height=Lt+"px",Wl(Qe)?Sf(Yc(Lt,Lt,0,0,Nn)):Promise.reject(!1)}).then(function(Je){return Pt.drawImage(Je,0,0),Wl(Pt.getImageData(0,0,Lt,Lt).data)}).catch(function(){return!1})},Yc=function(Bt,wt,Lt,Pt,jt){var Ae="http://www.w3.org/2000/svg",Fe=document.createElementNS(Ae,"svg"),Je=document.createElementNS(Ae,"foreignObject");return Fe.setAttributeNS(null,"width",Bt.toString()),Fe.setAttributeNS(null,"height",wt.toString()),Je.setAttributeNS(null,"width","100%"),Je.setAttributeNS(null,"height","100%"),Je.setAttributeNS(null,"x",Lt.toString()),Je.setAttributeNS(null,"y",Pt.toString()),Je.setAttributeNS(null,"externalResourcesRequired","true"),Fe.appendChild(Je),Je.appendChild(jt),Fe},Sf=function(Bt){return new Promise(function(wt,Lt){var Pt=new Image;Pt.onload=function(){return wt(Pt)},Pt.onerror=Lt,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},fa={get SUPPORT_RANGE_BOUNDS(){var Bt=Od(document);return Object.defineProperty(fa,"SUPPORT_RANGE_BOUNDS",{value:Bt}),Bt},get SUPPORT_WORD_BREAKING(){var Bt=fa.SUPPORT_RANGE_BOUNDS&&Wc(document);return Object.defineProperty(fa,"SUPPORT_WORD_BREAKING",{value:Bt}),Bt},get SUPPORT_SVG_DRAWING(){var Bt=xf(document);return Object.defineProperty(fa,"SUPPORT_SVG_DRAWING",{value:Bt}),Bt},get SUPPORT_FOREIGNOBJECT_DRAWING(){var Bt=typeof Array.from=="function"&&typeof window.fetch=="function"?Jh(document):Promise.resolve(!1);return Object.defineProperty(fa,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:Bt}),Bt},get SUPPORT_CORS_IMAGES(){var Bt=Dl();return Object.defineProperty(fa,"SUPPORT_CORS_IMAGES",{value:Bt}),Bt},get SUPPORT_RESPONSE_TYPE(){var Bt=wf();return Object.defineProperty(fa,"SUPPORT_RESPONSE_TYPE",{value:Bt}),Bt},get SUPPORT_CORS_XHR(){var Bt="withCredentials"in new XMLHttpRequest;return Object.defineProperty(fa,"SUPPORT_CORS_XHR",{value:Bt}),Bt},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var Bt=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(fa,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:Bt}),Bt}},Ra=function(){function Bt(wt,Lt){this.text=wt,this.bounds=Lt}return Bt}(),Bf=function(Bt,wt,Lt,Pt){var jt=tc(wt,Lt),Ae=[],Fe=0;return jt.forEach(function(Je){if(Lt.textDecorationLine.length||Je.trim().length>0)if(fa.SUPPORT_RANGE_BOUNDS){var Qe=$h(Pt,Fe,Je.length).getClientRects();if(Qe.length>1){var Nn=qh(Je),zn=0;Nn.forEach(function(Vi){Ae.push(new Ra(Vi,de.fromDOMRectList(Bt,$h(Pt,zn+Fe,Vi.length).getClientRects()))),zn+=Vi.length})}else Ae.push(new Ra(Je,de.fromDOMRectList(Bt,Qe)))}else{var pi=Pt.splitText(Je.length);Ae.push(new Ra(Je,ua(Bt,Pt))),Pt=pi}else fa.SUPPORT_RANGE_BOUNDS||(Pt=Pt.splitText(Je.length));Fe+=Je.length}),Ae},ua=function(Bt,wt){var Lt=wt.ownerDocument;if(Lt){var Pt=Lt.createElement("html2canvaswrapper");Pt.appendChild(wt.cloneNode(!0));var jt=wt.parentNode;if(jt){jt.replaceChild(Pt,wt);var Ae=Ht(Bt,Pt);return Pt.firstChild&&jt.replaceChild(Pt.firstChild,Pt),Ae}}return de.EMPTY},$h=function(Bt,wt,Lt){var Pt=Bt.ownerDocument;if(!Pt)throw new Error("Node has no owner document");var jt=Pt.createRange();return jt.setStart(Bt,wt),jt.setEnd(Bt,wt+Lt),jt},qh=function(Bt){if(fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var wt=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(wt.segment(Bt)).map(function(Lt){return Lt.segment})}return Zc(Bt)},jA=function(Bt,wt){if(fa.SUPPORT_NATIVE_TEXT_SEGMENTATION){var Lt=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(Lt.segment(Bt)).map(function(Pt){return Pt.segment})}return Cf(Bt,wt)},tc=function(Bt,wt){return wt.letterSpacing!==0?qh(Bt):jA(Bt,wt)},ec=[32,160,4961,65792,65793,4153,4241],Cf=function(Bt,wt){for(var Lt=Ln(Bt,{lineBreak:wt.lineBreak,wordBreak:wt.overflowWrap==="break-word"?"break-word":wt.wordBreak}),Pt=[],jt,Ae=function(){if(jt.value){var Fe=jt.value.slice(),Je=oe(Fe),Qe="";Je.forEach(function(Nn){ec.indexOf(Nn)===-1?Qe+=he(Nn):(Qe.length&&Pt.push(Qe),Pt.push(he(Nn)),Qe="")}),Qe.length&&Pt.push(Qe)}};!(jt=Lt.next()).done;)Ae();return Pt},nc=function(){function Bt(wt,Lt,Pt){this.text=Pf(Lt.data,Pt.textTransform),this.textBounds=Bf(wt,this.text,Pt,Lt)}return Bt}(),Pf=function(Bt,wt){switch(wt){case 1:return Bt.toLowerCase();case 3:return Bt.replace(qu,Bh);case 2:return Bt.toUpperCase();default:return Bt}},qu=/(^|\s|:|-|\(|\))([a-z])/g,Bh=function(Bt,wt,Lt){return Bt.length>0?wt+Lt.toUpperCase():Bt},Xc=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.src=Pt.currentSrc||Pt.src,jt.intrinsicWidth=Pt.naturalWidth,jt.intrinsicHeight=Pt.naturalHeight,jt.context.cache.addImage(jt.src),jt}return wt}(Tu),Jc=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.canvas=Pt,jt.intrinsicWidth=Pt.width,jt.intrinsicHeight=Pt.height,jt}return wt}(Tu),$c=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this,Ae=new XMLSerializer,Fe=Ht(Lt,Pt);return Pt.setAttribute("width",Fe.width+"px"),Pt.setAttribute("height",Fe.height+"px"),jt.svg="data:image/svg+xml,"+encodeURIComponent(Ae.serializeToString(Pt)),jt.intrinsicWidth=Pt.width.baseVal.value,jt.intrinsicHeight=Pt.height.baseVal.value,jt.context.cache.addImage(jt.svg),jt}return wt}(Tu),VA=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.value=Pt.value,jt}return wt}(Tu),qc=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.start=Pt.start,jt.reversed=typeof Pt.reversed=="boolean"&&Pt.reversed===!0,jt}return wt}(Tu),Ff=[{type:15,flags:0,unit:"px",number:3}],Ef=[{type:16,flags:0,number:50}],Uu=function(Bt){return Bt.width>Bt.height?new de(Bt.left+(Bt.width-Bt.height)/2,Bt.top,Bt.height,Bt.height):Bt.width<Bt.height?new de(Bt.left,Bt.top+(Bt.height-Bt.width)/2,Bt.width,Bt.width):Bt},gg=function(Bt){var wt=Bt.type===Ch?new Array(Bt.value.length+1).join("\u2022"):Bt.value;return wt.length===0?Bt.placeholder||"":wt},ic="checkbox",vA="radio",Ch="password",Rd=707406591,su=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;switch(jt.type=Pt.type.toLowerCase(),jt.checked=Pt.checked,jt.value=gg(Pt),(jt.type===ic||jt.type===vA)&&(jt.styles.backgroundColor=3739148031,jt.styles.borderTopColor=jt.styles.borderRightColor=jt.styles.borderBottomColor=jt.styles.borderLeftColor=2779096575,jt.styles.borderTopWidth=jt.styles.borderRightWidth=jt.styles.borderBottomWidth=jt.styles.borderLeftWidth=1,jt.styles.borderTopStyle=jt.styles.borderRightStyle=jt.styles.borderBottomStyle=jt.styles.borderLeftStyle=1,jt.styles.backgroundClip=[0],jt.styles.backgroundOrigin=[0],jt.bounds=Uu(jt.bounds)),jt.type){case ic:jt.styles.borderTopRightRadius=jt.styles.borderTopLeftRadius=jt.styles.borderBottomRightRadius=jt.styles.borderBottomLeftRadius=Ff;break;case vA:jt.styles.borderTopRightRadius=jt.styles.borderTopLeftRadius=jt.styles.borderBottomRightRadius=jt.styles.borderBottomLeftRadius=Ef;break}return jt}return wt}(Tu),Hd=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this,Ae=Pt.options[Pt.selectedIndex||0];return jt.value=Ae&&Ae.text||"",jt}return wt}(Tu),td=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.value=Pt.value,jt}return wt}(Tu),Lf=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;jt.src=Pt.src,jt.width=parseInt(Pt.width,10)||0,jt.height=parseInt(Pt.height,10)||0,jt.backgroundColor=jt.styles.backgroundColor;try{if(Pt.contentWindow&&Pt.contentWindow.document&&Pt.contentWindow.document.documentElement){jt.tree=bf(Lt,Pt.contentWindow.document.documentElement);var Ae=Pt.contentWindow.document.documentElement?wo(Lt,getComputedStyle(Pt.contentWindow.document.documentElement).backgroundColor):ps.TRANSPARENT,Fe=Pt.contentWindow.document.body?wo(Lt,getComputedStyle(Pt.contentWindow.document.body).backgroundColor):ps.TRANSPARENT;jt.backgroundColor=Yo(Ae)?Yo(Fe)?jt.styles.backgroundColor:Fe:Ae}}catch(Je){}return jt}return wt}(Tu),Mf=["OL","UL","MENU"],rc=function(Bt,wt,Lt,Pt){for(var jt=wt.firstChild,Ae=void 0;jt;jt=Ae)if(Ae=jt.nextSibling,ed(jt)&&jt.data.trim().length>0)Lt.textNodes.push(new nc(Bt,jt,Lt.styles));else if(Ph(jt))if(Gd(jt)&&jt.assignedNodes)jt.assignedNodes().forEach(function(Je){return rc(Bt,Je,Lt,Pt)});else{var Fe=pg(Bt,jt);Fe.styles.isVisible()&&(_d(jt,Fe,Pt)?Fe.flags|=4:Kd(Fe.styles)&&(Fe.flags|=2),Mf.indexOf(jt.tagName)!==-1&&(Fe.flags|=8),Lt.elements.push(Fe),jt.slot,jt.shadowRoot?rc(Bt,jt.shadowRoot,Fe,Pt):!sc(jt)&&!Tf(jt)&&!ac(jt)&&rc(Bt,jt,Fe,Pt))}},pg=function(Bt,wt){return ga(wt)?new Xc(Bt,wt):Fh(wt)?new Jc(Bt,wt):Tf(wt)?new $c(Bt,wt):kf(wt)?new VA(Bt,wt):nd(wt)?new qc(Bt,wt):mg(wt)?new su(Bt,wt):ac(wt)?new Hd(Bt,wt):sc(wt)?new td(Bt,wt):sl(wt)?new Lf(Bt,wt):new Tu(Bt,wt)},bf=function(Bt,wt){var Lt=pg(Bt,wt);return Lt.flags|=4,rc(Bt,wt,Lt,Lt),Lt},_d=function(Bt,wt,Lt){return wt.styles.isPositionedWithZIndex()||wt.styles.opacity<1||wt.styles.isTransformed()||Jo(Bt)&&Lt.styles.isTransparent()},Kd=function(Bt){return Bt.isPositioned()||Bt.isFloating()},ed=function(Bt){return Bt.nodeType===Node.TEXT_NODE},Ph=function(Bt){return Bt.nodeType===Node.ELEMENT_NODE},oc=function(Bt){return Ph(Bt)&&typeof Bt.style!="undefined"&&!Qu(Bt)},Qu=function(Bt){return typeof Bt.className=="object"},kf=function(Bt){return Bt.tagName==="LI"},nd=function(Bt){return Bt.tagName==="OL"},mg=function(Bt){return Bt.tagName==="INPUT"},zd=function(Bt){return Bt.tagName==="HTML"},Tf=function(Bt){return Bt.tagName==="svg"},Jo=function(Bt){return Bt.tagName==="BODY"},Fh=function(Bt){return Bt.tagName==="CANVAS"},ZA=function(Bt){return Bt.tagName==="VIDEO"},ga=function(Bt){return Bt.tagName==="IMG"},sl=function(Bt){return Bt.tagName==="IFRAME"},WA=function(Bt){return Bt.tagName==="STYLE"},id=function(Bt){return Bt.tagName==="SCRIPT"},sc=function(Bt){return Bt.tagName==="TEXTAREA"},ac=function(Bt){return Bt.tagName==="SELECT"},Gd=function(Bt){return Bt.tagName==="SLOT"},jd=function(Bt){return Bt.tagName.indexOf("-")>0},Nf=function(){function Bt(){this.counters={}}return Bt.prototype.getCounterValue=function(wt){var Lt=this.counters[wt];return Lt&&Lt.length?Lt[Lt.length-1]:1},Bt.prototype.getCounterValues=function(wt){var Lt=this.counters[wt];return Lt||[]},Bt.prototype.pop=function(wt){var Lt=this;wt.forEach(function(Pt){return Lt.counters[Pt].pop()})},Bt.prototype.parse=function(wt){var Lt=this,Pt=wt.counterIncrement,jt=wt.counterReset,Ae=!0;Pt!==null&&Pt.forEach(function(Je){var Qe=Lt.counters[Je.counter];Qe&&Je.increment!==0&&(Ae=!1,Qe.length||Qe.push(1),Qe[Math.max(0,Qe.length-1)]+=Je.increment)});var Fe=[];return Ae&&jt.forEach(function(Je){var Qe=Lt.counters[Je.counter];Fe.push(Je.counter),Qe||(Qe=Lt.counters[Je.counter]=[]),Qe.push(Je.reset)}),Fe},Bt}(),yA={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},lc={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},YA={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},Es={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},wA=function(Bt,wt,Lt,Pt,jt,Ae){return Bt<wt||Bt>Lt?ct(Bt,jt,Ae.length>0):Pt.integers.reduce(function(Fe,Je,Qe){for(;Bt>=Je;)Bt-=Je,Fe+=Pt.values[Qe];return Fe},"")+Ae},Vd=function(Bt,wt,Lt,Pt){var jt="";do Lt||Bt--,jt=Pt(Bt)+jt,Bt/=wt;while(Bt*wt>=wt);return jt},$s=function(Bt,wt,Lt,Pt,jt){var Ae=Lt-wt+1;return(Bt<0?"-":"")+(Vd(Math.abs(Bt),Ae,Pt,function(Fe){return he(Math.floor(Fe%Ae)+wt)})+jt)},vu=function(Bt,wt,Lt){Lt===void 0&&(Lt=". ");var Pt=wt.length;return Vd(Math.abs(Bt),Pt,!1,function(jt){return wt[Math.floor(jt%Pt)]})+Lt},tA=1,xA=2,Hs=4,uc=8,Yl=function(Bt,wt,Lt,Pt,jt,Ae){if(Bt<-9999||Bt>9999)return ct(Bt,4,jt.length>0);var Fe=Math.abs(Bt),Je=jt;if(Fe===0)return wt[0]+Je;for(var Qe=0;Fe>0&&Qe<=4;Qe++){var Nn=Fe%10;Nn===0&&wa(Ae,tA)&&Je!==""?Je=wt[Nn]+Je:Nn>1||Nn===1&&Qe===0||Nn===1&&Qe===1&&wa(Ae,xA)||Nn===1&&Qe===1&&wa(Ae,Hs)&&Bt>100||Nn===1&&Qe>1&&wa(Ae,uc)?Je=wt[Nn]+(Qe>0?Lt[Qe-1]:"")+Je:Nn===1&&Qe>0&&(Je=Lt[Qe-1]+Je),Fe=Math.floor(Fe/10)}return(Bt<0?Pt:"")+Je},eA="\u5341\u767E\u5343\u842C",Ac="\u62FE\u4F70\u4EDF\u842C",it="\u30DE\u30A4\u30CA\u30B9",st="\uB9C8\uC774\uB108\uC2A4",ct=function(Bt,wt,Lt){var Pt=Lt?". ":"",jt=Lt?"\u3001":"",Ae=Lt?", ":"",Fe=Lt?" ":"";switch(wt){case 0:return"\u2022"+Fe;case 1:return"\u25E6"+Fe;case 2:return"\u25FE"+Fe;case 5:var Je=$s(Bt,48,57,!0,Pt);return Je.length<4?"0"+Je:Je;case 4:return vu(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",jt);case 6:return wA(Bt,1,3999,yA,3,Pt).toLowerCase();case 7:return wA(Bt,1,3999,yA,3,Pt);case 8:return $s(Bt,945,969,!1,Pt);case 9:return $s(Bt,97,122,!1,Pt);case 10:return $s(Bt,65,90,!1,Pt);case 11:return $s(Bt,1632,1641,!0,Pt);case 12:case 49:return wA(Bt,1,9999,lc,3,Pt);case 35:return wA(Bt,1,9999,lc,3,Pt).toLowerCase();case 13:return $s(Bt,2534,2543,!0,Pt);case 14:case 30:return $s(Bt,6112,6121,!0,Pt);case 15:return vu(Bt,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",jt);case 16:return vu(Bt,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",jt);case 17:case 48:return Yl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",eA,"\u8CA0",jt,xA|Hs|uc);case 47:return Yl(Bt,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",Ac,"\u8CA0",jt,tA|xA|Hs|uc);case 42:return Yl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",eA,"\u8D1F",jt,xA|Hs|uc);case 41:return Yl(Bt,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",Ac,"\u8D1F",jt,tA|xA|Hs|uc);case 26:return Yl(Bt,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",it,jt,0);case 25:return Yl(Bt,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",it,jt,tA|xA|Hs);case 31:return Yl(Bt,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",st,Ae,tA|xA|Hs);case 33:return Yl(Bt,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",st,Ae,0);case 32:return Yl(Bt,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",st,Ae,tA|xA|Hs);case 18:return $s(Bt,2406,2415,!0,Pt);case 20:return wA(Bt,1,19999,Es,3,Pt);case 21:return $s(Bt,2790,2799,!0,Pt);case 22:return $s(Bt,2662,2671,!0,Pt);case 22:return wA(Bt,1,10999,YA,3,Pt);case 23:return vu(Bt,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return vu(Bt,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return $s(Bt,3302,3311,!0,Pt);case 28:return vu(Bt,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",jt);case 29:return vu(Bt,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",jt);case 34:return $s(Bt,3792,3801,!0,Pt);case 37:return $s(Bt,6160,6169,!0,Pt);case 38:return $s(Bt,4160,4169,!0,Pt);case 39:return $s(Bt,2918,2927,!0,Pt);case 40:return $s(Bt,1776,1785,!0,Pt);case 43:return $s(Bt,3046,3055,!0,Pt);case 44:return $s(Bt,3174,3183,!0,Pt);case 45:return $s(Bt,3664,3673,!0,Pt);case 46:return $s(Bt,3872,3881,!0,Pt);case 3:default:return $s(Bt,48,57,!0,Pt)}},ht="data-html2canvas-ignore",pt=function(){function Bt(wt,Lt,Pt){if(this.context=wt,this.options=Pt,this.scrolledElements=[],this.referenceElement=Lt,this.counters=new Nf,this.quoteDepth=0,!Lt.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(Lt.ownerDocument.documentElement,!1)}return Bt.prototype.toIFrame=function(wt,Lt){var Pt=this,jt=Kt(wt,Lt);if(!jt.contentWindow)return Promise.reject("Unable to find iframe window");var Ae=wt.defaultView.pageXOffset,Fe=wt.defaultView.pageYOffset,Je=jt.contentWindow,Qe=Je.document,Nn=me(jt).then(function(){return Wt(Pt,void 0,void 0,function(){var zn,pi;return le(this,function(Vi){switch(Vi.label){case 0:return this.scrolledElements.forEach(Ii),Je&&(Je.scrollTo(Lt.left,Lt.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(Je.scrollY!==Lt.top||Je.scrollX!==Lt.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(Je.scrollX-Lt.left,Je.scrollY-Lt.top,0,0))),zn=this.options.onclone,pi=this.clonedReferenceElement,typeof pi=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:Qe.fonts&&Qe.fonts.ready?[4,Qe.fonts.ready]:[3,2];case 1:Vi.sent(),Vi.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Jt(Qe)]:[3,4];case 3:Vi.sent(),Vi.label=4;case 4:return typeof zn=="function"?[2,Promise.resolve().then(function(){return zn(Qe,pi)}).then(function(){return jt})]:[2,jt]}})})});return Qe.open(),Qe.write(bn(document.doctype)+"<html></html>"),Pn(this.referenceElement.ownerDocument,Ae,Fe),Qe.replaceChild(Qe.adoptNode(this.documentElement),Qe.documentElement),Qe.close(),Nn},Bt.prototype.createElementClone=function(wt){if(jh(wt,2))debugger;if(Fh(wt))return this.createCanvasClone(wt);if(ZA(wt))return this.createVideoClone(wt);if(WA(wt))return this.createStyleClone(wt);var Lt=wt.cloneNode(!1);return ga(Lt)&&(ga(wt)&&wt.currentSrc&&wt.currentSrc!==wt.src&&(Lt.src=wt.currentSrc,Lt.srcset=""),Lt.loading==="lazy"&&(Lt.loading="eager")),jd(Lt)?this.createCustomElementClone(Lt):Lt},Bt.prototype.createCustomElementClone=function(wt){var Lt=document.createElement("html2canvascustomelement");return Se(wt.style,Lt),Lt},Bt.prototype.createStyleClone=function(wt){try{var Lt=wt.sheet;if(Lt&&Lt.cssRules){var Pt=[].slice.call(Lt.cssRules,0).reduce(function(Ae,Fe){return Fe&&typeof Fe.cssText=="string"?Ae+Fe.cssText:Ae},""),jt=wt.cloneNode(!1);return jt.textContent=Pt,jt}}catch(Ae){if(this.context.logger.error("Unable to access cssRules property",Ae),Ae.name!=="SecurityError")throw Ae}return wt.cloneNode(!1)},Bt.prototype.createCanvasClone=function(wt){var Lt;if(this.options.inlineImages&&wt.ownerDocument){var Pt=wt.ownerDocument.createElement("img");try{return Pt.src=wt.toDataURL(),Pt}catch(Nn){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",wt)}}var jt=wt.cloneNode(!1);try{jt.width=wt.width,jt.height=wt.height;var Ae=wt.getContext("2d"),Fe=jt.getContext("2d");if(Fe)if(!this.options.allowTaint&&Ae)Fe.putImageData(Ae.getImageData(0,0,wt.width,wt.height),0,0);else{var Je=(Lt=wt.getContext("webgl2"))!==null&&Lt!==void 0?Lt:wt.getContext("webgl");if(Je){var Qe=Je.getContextAttributes();(Qe==null?void 0:Qe.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",wt)}Fe.drawImage(wt,0,0)}return jt}catch(Nn){this.context.logger.info("Unable to clone canvas as it is tainted",wt)}return jt},Bt.prototype.createVideoClone=function(wt){var Lt=wt.ownerDocument.createElement("canvas");Lt.width=wt.offsetWidth,Lt.height=wt.offsetHeight;var Pt=Lt.getContext("2d");try{return Pt&&(Pt.drawImage(wt,0,0,Lt.width,Lt.height),this.options.allowTaint||Pt.getImageData(0,0,Lt.width,Lt.height)),Lt}catch(Ae){this.context.logger.info("Unable to clone video as it is tainted",wt)}var jt=wt.ownerDocument.createElement("canvas");return jt.width=wt.offsetWidth,jt.height=wt.offsetHeight,jt},Bt.prototype.appendChildNode=function(wt,Lt,Pt){(!Ph(Lt)||!id(Lt)&&!Lt.hasAttribute(ht)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(Lt)))&&(!this.options.copyStyles||!Ph(Lt)||!WA(Lt))&&wt.appendChild(this.cloneNode(Lt,Pt))},Bt.prototype.cloneChildNodes=function(wt,Lt,Pt){for(var jt=this,Ae=wt.shadowRoot?wt.shadowRoot.firstChild:wt.firstChild;Ae;Ae=Ae.nextSibling)if(Ph(Ae)&&Gd(Ae)&&typeof Ae.assignedNodes=="function"){var Fe=Ae.assignedNodes();Fe.length&&Fe.forEach(function(Je){return jt.appendChildNode(Lt,Je,Pt)})}else this.appendChildNode(Lt,Ae,Pt)},Bt.prototype.cloneNode=function(wt,Lt){if(ed(wt))return document.createTextNode(wt.data);if(!wt.ownerDocument)return wt.cloneNode(!1);var Pt=wt.ownerDocument.defaultView;if(Pt&&Ph(wt)&&(oc(wt)||Qu(wt))){var jt=this.createElementClone(wt);jt.style.transitionProperty="none";var Ae=Pt.getComputedStyle(wt),Fe=Pt.getComputedStyle(wt,":before"),Je=Pt.getComputedStyle(wt,":after");this.referenceElement===wt&&oc(jt)&&(this.clonedReferenceElement=jt),Jo(jt)&&jr(jt);var Qe=this.counters.parse(new ku(this.context,Ae)),Nn=this.resolvePseudoContent(wt,jt,Fe,Nt.BEFORE);jd(wt)&&(Lt=!0),ZA(wt)||this.cloneChildNodes(wt,jt,Lt),Nn&&jt.insertBefore(Nn,jt.firstChild);var zn=this.resolvePseudoContent(wt,jt,Je,Nt.AFTER);return zn&&jt.appendChild(zn),this.counters.pop(Qe),(Ae&&(this.options.copyStyles||Qu(wt))&&!sl(wt)||Lt)&&Se(Ae,jt),(wt.scrollTop!==0||wt.scrollLeft!==0)&&this.scrolledElements.push([jt,wt.scrollLeft,wt.scrollTop]),(sc(wt)||ac(wt))&&(sc(jt)||ac(jt))&&(jt.value=wt.value),jt}return wt.cloneNode(!1)},Bt.prototype.resolvePseudoContent=function(wt,Lt,Pt,jt){var Ae=this;if(Pt){var Fe=Pt.content,Je=Lt.ownerDocument;if(!(!Je||!Fe||Fe==="none"||Fe==="-moz-alt-content"||Pt.display==="none")){this.counters.parse(new ku(this.context,Pt));var Qe=new ol(this.context,Pt),Nn=Je.createElement("html2canvaspseudoelement");Se(Pt,Nn),Qe.content.forEach(function(pi){if(pi.type===0)Nn.appendChild(Je.createTextNode(pi.value));else if(pi.type===22){var Vi=Je.createElement("img");Vi.src=pi.value,Vi.style.opacity="1",Nn.appendChild(Vi)}else if(pi.type===18){if(pi.name==="attr"){var Gr=pi.values.filter(Co);Gr.length&&Nn.appendChild(Je.createTextNode(wt.getAttribute(Gr[0].value)||""))}else if(pi.name==="counter"){var xr=pi.values.filter(Wi),br=xr[0],Zo=xr[1];if(br&&Co(br)){var ao=Ae.counters.getCounterValue(br.value),uo=Zo&&Co(Zo)?DA.parse(Ae.context,Zo.value):3;Nn.appendChild(Je.createTextNode(ct(ao,uo,!1)))}}else if(pi.name==="counters"){var co=pi.values.filter(Wi),br=co[0],qo=co[1],Zo=co[2];if(br&&Co(br)){var Do=Ae.counters.getCounterValues(br.value),to=Zo&&Co(Zo)?DA.parse(Ae.context,Zo.value):3,cs=qo&&qo.type===0?qo.value:"",ws=Do.map(function(Il){return ct(Il,to,!1)}).join(cs);Nn.appendChild(Je.createTextNode(ws))}}}else if(pi.type===20)switch(pi.value){case"open-quote":Nn.appendChild(Je.createTextNode(zh(Qe.quotes,Ae.quoteDepth++,!0)));break;case"close-quote":Nn.appendChild(Je.createTextNode(zh(Qe.quotes,--Ae.quoteDepth,!1)));break;default:Nn.appendChild(Je.createTextNode(pi.value))}}),Nn.className=dr+" "+Rr;var zn=jt===Nt.BEFORE?" "+dr:" "+Rr;return Qu(Lt)?Lt.className.baseValue+=zn:Lt.className+=zn,Nn}}},Bt.destroy=function(wt){return wt.parentNode?(wt.parentNode.removeChild(wt),!0):!1},Bt}(),Nt;(function(Bt){Bt[Bt.BEFORE=0]="BEFORE",Bt[Bt.AFTER=1]="AFTER"})(Nt||(Nt={}));var Kt=function(Bt,wt){var Lt=Bt.createElement("iframe");return Lt.className="html2canvas-container",Lt.style.visibility="hidden",Lt.style.position="fixed",Lt.style.left="-10000px",Lt.style.top="0px",Lt.style.border="0",Lt.width=wt.width.toString(),Lt.height=wt.height.toString(),Lt.scrolling="no",Lt.setAttribute(ht,"true"),Bt.body.appendChild(Lt),Lt},qt=function(Bt){return new Promise(function(wt){if(Bt.complete){wt();return}if(!Bt.src){wt();return}Bt.onload=wt,Bt.onerror=wt})},Jt=function(Bt){return Promise.all([].slice.call(Bt.images,0).map(qt))},me=function(Bt){return new Promise(function(wt,Lt){var Pt=Bt.contentWindow;if(!Pt)return Lt("No window assigned for iframe");var jt=Pt.document;Pt.onload=Bt.onload=function(){Pt.onload=Bt.onload=null;var Ae=setInterval(function(){jt.body.childNodes.length>0&&jt.readyState==="complete"&&(clearInterval(Ae),wt(Bt))},50)}})},en=["all","d","content"],Se=function(Bt,wt){for(var Lt=Bt.length-1;Lt>=0;Lt--){var Pt=Bt.item(Lt);en.indexOf(Pt)===-1&&wt.style.setProperty(Pt,Bt.getPropertyValue(Pt))}return wt},bn=function(Bt){var wt="";return Bt&&(wt+="<!DOCTYPE ",Bt.name&&(wt+=Bt.name),Bt.internalSubset&&(wt+=Bt.internalSubset),Bt.publicId&&(wt+='"'+Bt.publicId+'"'),Bt.systemId&&(wt+='"'+Bt.systemId+'"'),wt+=">"),wt},Pn=function(Bt,wt,Lt){Bt&&Bt.defaultView&&(wt!==Bt.defaultView.pageXOffset||Lt!==Bt.defaultView.pageYOffset)&&Bt.defaultView.scrollTo(wt,Lt)},Ii=function(Bt){var wt=Bt[0],Lt=Bt[1],Pt=Bt[2];wt.scrollLeft=Lt,wt.scrollTop=Pt},Hi=":before",Ji=":after",dr="___html2canvas___pseudoelement_before",Rr="___html2canvas___pseudoelement_after",Er=`{
content: "" !important;
display: none !important;
}`,jr=function(Bt){po(Bt,"."+dr+Hi+Er+`
.`+Rr+Ji+Er)},po=function(Bt,wt){var Lt=Bt.ownerDocument;if(Lt){var Pt=Lt.createElement("style");Pt.textContent=wt,Bt.appendChild(Pt)}},Pr=function(){function Bt(){}return Bt.getOrigin=function(wt){var Lt=Bt._link;return Lt?(Lt.href=wt,Lt.href=Lt.href,Lt.protocol+Lt.hostname+Lt.port):"about:blank"},Bt.isSameOrigin=function(wt){return Bt.getOrigin(wt)===Bt._origin},Bt.setContext=function(wt){Bt._link=wt.document.createElement("a"),Bt._origin=Bt.getOrigin(wt.location.href)},Bt._origin="about:blank",Bt}(),No=function(){function Bt(wt,Lt){this.context=wt,this._options=Lt,this._cache={}}return Bt.prototype.addImage=function(wt){var Lt=Promise.resolve();return this.has(wt)||(al(wt)||yl(wt))&&(this._cache[wt]=this.loadImage(wt)).catch(function(){}),Lt},Bt.prototype.match=function(wt){return this._cache[wt]},Bt.prototype.loadImage=function(wt){return Wt(this,void 0,void 0,function(){var Lt,Pt,jt,Ae,Fe=this;return le(this,function(Je){switch(Je.label){case 0:return Lt=Pr.isSameOrigin(wt),Pt=!Da(wt)&&this._options.useCORS===!0&&fa.SUPPORT_CORS_IMAGES&&!Lt,jt=!Da(wt)&&!Lt&&!al(wt)&&typeof this._options.proxy=="string"&&fa.SUPPORT_CORS_XHR&&!Pt,!Lt&&this._options.allowTaint===!1&&!Da(wt)&&!al(wt)&&!jt&&!Pt?[2]:(Ae=wt,jt?[4,this.proxy(Ae)]:[3,2]);case 1:Ae=Je.sent(),Je.label=2;case 2:return this.context.logger.debug("Added image "+wt.substring(0,256)),[4,new Promise(function(Qe,Nn){var zn=new Image;zn.onload=function(){return Qe(zn)},zn.onerror=Nn,(xa(Ae)||Pt)&&(zn.crossOrigin="anonymous"),zn.src=Ae,zn.complete===!0&&setTimeout(function(){return Qe(zn)},500),Fe._options.imageTimeout>0&&setTimeout(function(){return Nn("Timed out ("+Fe._options.imageTimeout+"ms) loading image")},Fe._options.imageTimeout)})];case 3:return[2,Je.sent()]}})})},Bt.prototype.has=function(wt){return typeof this._cache[wt]!="undefined"},Bt.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},Bt.prototype.proxy=function(wt){var Lt=this,Pt=this._options.proxy;if(!Pt)throw new Error("No proxy defined");var jt=wt.substring(0,256);return new Promise(function(Ae,Fe){var Je=fa.SUPPORT_RESPONSE_TYPE?"blob":"text",Qe=new XMLHttpRequest;Qe.onload=function(){if(Qe.status===200)if(Je==="text")Ae(Qe.response);else{var pi=new FileReader;pi.addEventListener("load",function(){return Ae(pi.result)},!1),pi.addEventListener("error",function(Vi){return Fe(Vi)},!1),pi.readAsDataURL(Qe.response)}else Fe("Failed to proxy resource "+jt+" with status code "+Qe.status)},Qe.onerror=Fe;var Nn=Pt.indexOf("?")>-1?"&":"?";if(Qe.open("GET",""+Pt+Nn+"url="+encodeURIComponent(wt)+"&responseType="+Je),Je!=="text"&&Qe instanceof XMLHttpRequest&&(Qe.responseType=Je),Lt._options.imageTimeout){var zn=Lt._options.imageTimeout;Qe.timeout=zn,Qe.ontimeout=function(){return Fe("Timed out ("+zn+"ms) proxying "+jt)}}Qe.send()})},Bt}(),_s=/^data:image\/svg\+xml/i,Fa=/^data:image\/.*;base64,/i,Ys=/^data:image\/.*/i,yl=function(Bt){return fa.SUPPORT_SVG_DRAWING||!Ha(Bt)},Da=function(Bt){return Ys.test(Bt)},xa=function(Bt){return Fa.test(Bt)},al=function(Bt){return Bt.substr(0,4)==="blob"},Ha=function(Bt){return Bt.substr(-3).toLowerCase()==="svg"||_s.test(Bt)},Br=function(){function Bt(wt,Lt){this.type=0,this.x=wt,this.y=Lt}return Bt.prototype.add=function(wt,Lt){return new Bt(this.x+wt,this.y+Lt)},Bt}(),Xo=function(Bt,wt,Lt){return new Br(Bt.x+(wt.x-Bt.x)*Lt,Bt.y+(wt.y-Bt.y)*Lt)},Ks=function(){function Bt(wt,Lt,Pt,jt){this.type=1,this.start=wt,this.startControl=Lt,this.endControl=Pt,this.end=jt}return Bt.prototype.subdivide=function(wt,Lt){var Pt=Xo(this.start,this.startControl,wt),jt=Xo(this.startControl,this.endControl,wt),Ae=Xo(this.endControl,this.end,wt),Fe=Xo(Pt,jt,wt),Je=Xo(jt,Ae,wt),Qe=Xo(Fe,Je,wt);return Lt?new Bt(this.start,Pt,Fe,Qe):new Bt(Qe,Je,Ae,this.end)},Bt.prototype.add=function(wt,Lt){return new Bt(this.start.add(wt,Lt),this.startControl.add(wt,Lt),this.endControl.add(wt,Lt),this.end.add(wt,Lt))},Bt.prototype.reverse=function(){return new Bt(this.end,this.endControl,this.startControl,this.start)},Bt}(),Ns=function(Bt){return Bt.type===1},_a=function(){function Bt(wt){var Lt=wt.styles,Pt=wt.bounds,jt=Ca(Lt.borderTopLeftRadius,Pt.width,Pt.height),Ae=jt[0],Fe=jt[1],Je=Ca(Lt.borderTopRightRadius,Pt.width,Pt.height),Qe=Je[0],Nn=Je[1],zn=Ca(Lt.borderBottomRightRadius,Pt.width,Pt.height),pi=zn[0],Vi=zn[1],Gr=Ca(Lt.borderBottomLeftRadius,Pt.width,Pt.height),xr=Gr[0],br=Gr[1],Zo=[];Zo.push((Ae+Qe)/Pt.width),Zo.push((xr+pi)/Pt.width),Zo.push((Fe+br)/Pt.height),Zo.push((Nn+Vi)/Pt.height);var ao=Math.max.apply(Math,Zo);ao>1&&(Ae/=ao,Fe/=ao,Qe/=ao,Nn/=ao,pi/=ao,Vi/=ao,xr/=ao,br/=ao);var uo=Pt.width-Qe,co=Pt.height-Vi,qo=Pt.width-pi,Do=Pt.height-br,to=Lt.borderTopWidth,cs=Lt.borderRightWidth,ws=Lt.borderBottomWidth,Oo=Lt.borderLeftWidth,La=zo(Lt.paddingTop,wt.bounds.width),Il=zo(Lt.paddingRight,wt.bounds.width),$l=zo(Lt.paddingBottom,wt.bounds.width),zs=zo(Lt.paddingLeft,wt.bounds.width);this.topLeftBorderDoubleOuterBox=Ae>0||Fe>0?Lo(Pt.left+Oo/3,Pt.top+to/3,Ae-Oo/3,Fe-to/3,$o.TOP_LEFT):new Br(Pt.left+Oo/3,Pt.top+to/3),this.topRightBorderDoubleOuterBox=Ae>0||Fe>0?Lo(Pt.left+uo,Pt.top+to/3,Qe-cs/3,Nn-to/3,$o.TOP_RIGHT):new Br(Pt.left+Pt.width-cs/3,Pt.top+to/3),this.bottomRightBorderDoubleOuterBox=pi>0||Vi>0?Lo(Pt.left+qo,Pt.top+co,pi-cs/3,Vi-ws/3,$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width-cs/3,Pt.top+Pt.height-ws/3),this.bottomLeftBorderDoubleOuterBox=xr>0||br>0?Lo(Pt.left+Oo/3,Pt.top+Do,xr-Oo/3,br-ws/3,$o.BOTTOM_LEFT):new Br(Pt.left+Oo/3,Pt.top+Pt.height-ws/3),this.topLeftBorderDoubleInnerBox=Ae>0||Fe>0?Lo(Pt.left+Oo*2/3,Pt.top+to*2/3,Ae-Oo*2/3,Fe-to*2/3,$o.TOP_LEFT):new Br(Pt.left+Oo*2/3,Pt.top+to*2/3),this.topRightBorderDoubleInnerBox=Ae>0||Fe>0?Lo(Pt.left+uo,Pt.top+to*2/3,Qe-cs*2/3,Nn-to*2/3,$o.TOP_RIGHT):new Br(Pt.left+Pt.width-cs*2/3,Pt.top+to*2/3),this.bottomRightBorderDoubleInnerBox=pi>0||Vi>0?Lo(Pt.left+qo,Pt.top+co,pi-cs*2/3,Vi-ws*2/3,$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width-cs*2/3,Pt.top+Pt.height-ws*2/3),this.bottomLeftBorderDoubleInnerBox=xr>0||br>0?Lo(Pt.left+Oo*2/3,Pt.top+Do,xr-Oo*2/3,br-ws*2/3,$o.BOTTOM_LEFT):new Br(Pt.left+Oo*2/3,Pt.top+Pt.height-ws*2/3),this.topLeftBorderStroke=Ae>0||Fe>0?Lo(Pt.left+Oo/2,Pt.top+to/2,Ae-Oo/2,Fe-to/2,$o.TOP_LEFT):new Br(Pt.left+Oo/2,Pt.top+to/2),this.topRightBorderStroke=Ae>0||Fe>0?Lo(Pt.left+uo,Pt.top+to/2,Qe-cs/2,Nn-to/2,$o.TOP_RIGHT):new Br(Pt.left+Pt.width-cs/2,Pt.top+to/2),this.bottomRightBorderStroke=pi>0||Vi>0?Lo(Pt.left+qo,Pt.top+co,pi-cs/2,Vi-ws/2,$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width-cs/2,Pt.top+Pt.height-ws/2),this.bottomLeftBorderStroke=xr>0||br>0?Lo(Pt.left+Oo/2,Pt.top+Do,xr-Oo/2,br-ws/2,$o.BOTTOM_LEFT):new Br(Pt.left+Oo/2,Pt.top+Pt.height-ws/2),this.topLeftBorderBox=Ae>0||Fe>0?Lo(Pt.left,Pt.top,Ae,Fe,$o.TOP_LEFT):new Br(Pt.left,Pt.top),this.topRightBorderBox=Qe>0||Nn>0?Lo(Pt.left+uo,Pt.top,Qe,Nn,$o.TOP_RIGHT):new Br(Pt.left+Pt.width,Pt.top),this.bottomRightBorderBox=pi>0||Vi>0?Lo(Pt.left+qo,Pt.top+co,pi,Vi,$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width,Pt.top+Pt.height),this.bottomLeftBorderBox=xr>0||br>0?Lo(Pt.left,Pt.top+Do,xr,br,$o.BOTTOM_LEFT):new Br(Pt.left,Pt.top+Pt.height),this.topLeftPaddingBox=Ae>0||Fe>0?Lo(Pt.left+Oo,Pt.top+to,Math.max(0,Ae-Oo),Math.max(0,Fe-to),$o.TOP_LEFT):new Br(Pt.left+Oo,Pt.top+to),this.topRightPaddingBox=Qe>0||Nn>0?Lo(Pt.left+Math.min(uo,Pt.width-cs),Pt.top+to,uo>Pt.width+cs?0:Math.max(0,Qe-cs),Math.max(0,Nn-to),$o.TOP_RIGHT):new Br(Pt.left+Pt.width-cs,Pt.top+to),this.bottomRightPaddingBox=pi>0||Vi>0?Lo(Pt.left+Math.min(qo,Pt.width-Oo),Pt.top+Math.min(co,Pt.height-ws),Math.max(0,pi-cs),Math.max(0,Vi-ws),$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width-cs,Pt.top+Pt.height-ws),this.bottomLeftPaddingBox=xr>0||br>0?Lo(Pt.left+Oo,Pt.top+Math.min(Do,Pt.height-ws),Math.max(0,xr-Oo),Math.max(0,br-ws),$o.BOTTOM_LEFT):new Br(Pt.left+Oo,Pt.top+Pt.height-ws),this.topLeftContentBox=Ae>0||Fe>0?Lo(Pt.left+Oo+zs,Pt.top+to+La,Math.max(0,Ae-(Oo+zs)),Math.max(0,Fe-(to+La)),$o.TOP_LEFT):new Br(Pt.left+Oo+zs,Pt.top+to+La),this.topRightContentBox=Qe>0||Nn>0?Lo(Pt.left+Math.min(uo,Pt.width+Oo+zs),Pt.top+to+La,uo>Pt.width+Oo+zs?0:Qe-Oo+zs,Nn-(to+La),$o.TOP_RIGHT):new Br(Pt.left+Pt.width-(cs+Il),Pt.top+to+La),this.bottomRightContentBox=pi>0||Vi>0?Lo(Pt.left+Math.min(qo,Pt.width-(Oo+zs)),Pt.top+Math.min(co,Pt.height+to+La),Math.max(0,pi-(cs+Il)),Vi-(ws+$l),$o.BOTTOM_RIGHT):new Br(Pt.left+Pt.width-(cs+Il),Pt.top+Pt.height-(ws+$l)),this.bottomLeftContentBox=xr>0||br>0?Lo(Pt.left+Oo+zs,Pt.top+Do,Math.max(0,xr-(Oo+zs)),br-(ws+$l),$o.BOTTOM_LEFT):new Br(Pt.left+Oo+zs,Pt.top+Pt.height-(ws+$l))}return Bt}(),$o;(function(Bt){Bt[Bt.TOP_LEFT=0]="TOP_LEFT",Bt[Bt.TOP_RIGHT=1]="TOP_RIGHT",Bt[Bt.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",Bt[Bt.BOTTOM_LEFT=3]="BOTTOM_LEFT"})($o||($o={}));var Lo=function(Bt,wt,Lt,Pt,jt){var Ae=4*((Math.sqrt(2)-1)/3),Fe=Lt*Ae,Je=Pt*Ae,Qe=Bt+Lt,Nn=wt+Pt;switch(jt){case $o.TOP_LEFT:return new Ks(new Br(Bt,Nn),new Br(Bt,Nn-Je),new Br(Qe-Fe,wt),new Br(Qe,wt));case $o.TOP_RIGHT:return new Ks(new Br(Bt,wt),new Br(Bt+Fe,wt),new Br(Qe,Nn-Je),new Br(Qe,Nn));case $o.BOTTOM_RIGHT:return new Ks(new Br(Qe,wt),new Br(Qe,wt+Je),new Br(Bt+Fe,Nn),new Br(Bt,Nn));case $o.BOTTOM_LEFT:default:return new Ks(new Br(Qe,Nn),new Br(Qe-Fe,Nn),new Br(Bt,wt+Je),new Br(Bt,wt))}},wl=function(Bt){return[Bt.topLeftBorderBox,Bt.topRightBorderBox,Bt.bottomRightBorderBox,Bt.bottomLeftBorderBox]},na=function(Bt){return[Bt.topLeftContentBox,Bt.topRightContentBox,Bt.bottomRightContentBox,Bt.bottomLeftContentBox]},XA=function(Bt){return[Bt.topLeftPaddingBox,Bt.topRightPaddingBox,Bt.bottomRightPaddingBox,Bt.bottomLeftPaddingBox]},Xl=function(){function Bt(wt,Lt,Pt){this.offsetX=wt,this.offsetY=Lt,this.matrix=Pt,this.type=0,this.target=6}return Bt}(),Za=function(){function Bt(wt,Lt){this.path=wt,this.target=Lt,this.type=1}return Bt}(),xl=function(){function Bt(wt){this.opacity=wt,this.type=2,this.target=6}return Bt}(),Ls=function(Bt){return Bt.type===0},Ea=function(Bt){return Bt.type===1},nA=function(Bt){return Bt.type===2},Eh=function(Bt,wt){return Bt.length===wt.length?Bt.some(function(Lt,Pt){return Lt===wt[Pt]}):!1},$p=function(Bt,wt,Lt,Pt,jt){return Bt.map(function(Ae,Fe){switch(Fe){case 0:return Ae.add(wt,Lt);case 1:return Ae.add(wt+Pt,Lt);case 2:return Ae.add(wt+Pt,Lt+jt);case 3:return Ae.add(wt,Lt+jt)}return Ae})},Sl=function(){function Bt(wt){this.element=wt,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return Bt}(),vg=function(){function Bt(wt,Lt){if(this.container=wt,this.parent=Lt,this.effects=[],this.curves=new _a(this.container),this.container.styles.opacity<1&&this.effects.push(new xl(this.container.styles.opacity)),this.container.styles.transform!==null){var Pt=this.container.bounds.left+this.container.styles.transformOrigin[0].number,jt=this.container.bounds.top+this.container.styles.transformOrigin[1].number,Ae=this.container.styles.transform;this.effects.push(new Xl(Pt,jt,Ae))}if(this.container.styles.overflowX!==0){var Fe=wl(this.curves),Je=XA(this.curves);Eh(Fe,Je)?this.effects.push(new Za(Fe,6)):(this.effects.push(new Za(Fe,2)),this.effects.push(new Za(Je,4)))}}return Bt.prototype.getEffects=function(wt){for(var Lt=[2,3].indexOf(this.container.styles.position)===-1,Pt=this.parent,jt=this.effects.slice(0);Pt;){var Ae=Pt.effects.filter(function(Qe){return!Ea(Qe)});if(Lt||Pt.container.styles.position!==0||!Pt.parent){if(jt.unshift.apply(jt,Ae),Lt=[2,3].indexOf(Pt.container.styles.position)===-1,Pt.container.styles.overflowX!==0){var Fe=wl(Pt.curves),Je=XA(Pt.curves);Eh(Fe,Je)||jt.unshift(new Za(Je,6))}}else jt.unshift.apply(jt,Ae);Pt=Pt.parent}return jt.filter(function(Qe){return wa(Qe.target,wt)})},Bt}(),iA=function(Bt,wt,Lt,Pt){Bt.container.elements.forEach(function(jt){var Ae=wa(jt.flags,4),Fe=wa(jt.flags,2),Je=new vg(jt,Bt);wa(jt.styles.display,2048)&&Pt.push(Je);var Qe=wa(jt.flags,8)?[]:Pt;if(Ae||Fe){var Nn=Ae||jt.styles.isPositioned()?Lt:wt,zn=new Sl(Je);if(jt.styles.isPositioned()||jt.styles.opacity<1||jt.styles.isTransformed()){var pi=jt.styles.zIndex.order;if(pi<0){var Vi=0;Nn.negativeZIndex.some(function(xr,br){return pi>xr.element.container.styles.zIndex.order?(Vi=br,!1):Vi>0}),Nn.negativeZIndex.splice(Vi,0,zn)}else if(pi>0){var Gr=0;Nn.positiveZIndex.some(function(xr,br){return pi>=xr.element.container.styles.zIndex.order?(Gr=br+1,!1):Gr>0}),Nn.positiveZIndex.splice(Gr,0,zn)}else Nn.zeroOrAutoZIndexOrTransformedOrOpacity.push(zn)}else jt.styles.isFloating()?Nn.nonPositionedFloats.push(zn):Nn.nonPositionedInlineLevel.push(zn);iA(Je,zn,Ae?zn:Lt,Qe)}else jt.styles.isInlineLevel()?wt.inlineLevel.push(Je):wt.nonInlineLevel.push(Je),iA(Je,wt,Lt,Qe);wa(jt.flags,8)&&Df(jt,Qe)})},Df=function(Bt,wt){for(var Lt=Bt instanceof qc?Bt.start:1,Pt=Bt instanceof qc?Bt.reversed:!1,jt=0;jt<wt.length;jt++){var Ae=wt[jt];Ae.container instanceof VA&&typeof Ae.container.value=="number"&&Ae.container.value!==0&&(Lt=Ae.container.value),Ae.listValue=ct(Lt,Ae.container.styles.listStyleType,!0),Lt+=Pt?-1:1}},Zd=function(Bt){var wt=new vg(Bt,null),Lt=new Sl(wt),Pt=[];return iA(wt,Lt,Lt,Pt),Df(wt.container,Pt),Lt},hc=function(Bt,wt){switch(wt){case 0:return Sa(Bt.topLeftBorderBox,Bt.topLeftPaddingBox,Bt.topRightBorderBox,Bt.topRightPaddingBox);case 1:return Sa(Bt.topRightBorderBox,Bt.topRightPaddingBox,Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox);case 2:return Sa(Bt.bottomRightBorderBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox);case 3:default:return Sa(Bt.bottomLeftBorderBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderBox,Bt.topLeftPaddingBox)}},Lh=function(Bt,wt){switch(wt){case 0:return Sa(Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox,Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox);case 1:return Sa(Bt.topRightBorderBox,Bt.topRightBorderDoubleOuterBox,Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox);case 2:return Sa(Bt.bottomRightBorderBox,Bt.bottomRightBorderDoubleOuterBox,Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox);case 3:default:return Sa(Bt.bottomLeftBorderBox,Bt.bottomLeftBorderDoubleOuterBox,Bt.topLeftBorderBox,Bt.topLeftBorderDoubleOuterBox)}},If=function(Bt,wt){switch(wt){case 0:return Sa(Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox,Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox);case 1:return Sa(Bt.topRightBorderDoubleInnerBox,Bt.topRightPaddingBox,Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox);case 2:return Sa(Bt.bottomRightBorderDoubleInnerBox,Bt.bottomRightPaddingBox,Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox);case 3:default:return Sa(Bt.bottomLeftBorderDoubleInnerBox,Bt.bottomLeftPaddingBox,Bt.topLeftBorderDoubleInnerBox,Bt.topLeftPaddingBox)}},cc=function(Bt,wt){switch(wt){case 0:return JA(Bt.topLeftBorderStroke,Bt.topRightBorderStroke);case 1:return JA(Bt.topRightBorderStroke,Bt.bottomRightBorderStroke);case 2:return JA(Bt.bottomRightBorderStroke,Bt.bottomLeftBorderStroke);case 3:default:return JA(Bt.bottomLeftBorderStroke,Bt.topLeftBorderStroke)}},JA=function(Bt,wt){var Lt=[];return Ns(Bt)?Lt.push(Bt.subdivide(.5,!1)):Lt.push(Bt),Ns(wt)?Lt.push(wt.subdivide(.5,!0)):Lt.push(wt),Lt},Sa=function(Bt,wt,Lt,Pt){var jt=[];return Ns(Bt)?jt.push(Bt.subdivide(.5,!1)):jt.push(Bt),Ns(Lt)?jt.push(Lt.subdivide(.5,!0)):jt.push(Lt),Ns(Pt)?jt.push(Pt.subdivide(.5,!0).reverse()):jt.push(Pt),Ns(wt)?jt.push(wt.subdivide(.5,!1).reverse()):jt.push(wt),jt},Wa=function(Bt){var wt=Bt.bounds,Lt=Bt.styles;return wt.add(Lt.borderLeftWidth,Lt.borderTopWidth,-(Lt.borderRightWidth+Lt.borderLeftWidth),-(Lt.borderTopWidth+Lt.borderBottomWidth))},Uf=function(Bt){var wt=Bt.styles,Lt=Bt.bounds,Pt=zo(wt.paddingLeft,Lt.width),jt=zo(wt.paddingRight,Lt.width),Ae=zo(wt.paddingTop,Lt.width),Fe=zo(wt.paddingBottom,Lt.width);return Lt.add(Pt+wt.borderLeftWidth,Ae+wt.borderTopWidth,-(wt.borderRightWidth+wt.borderLeftWidth+Pt+jt),-(wt.borderTopWidth+wt.borderBottomWidth+Ae+Fe))},qp=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Uf(wt):Wa(wt)},t0=function(Bt,wt){return Bt===0?wt.bounds:Bt===2?Uf(wt):Wa(wt)},dc=function(Bt,wt,Lt){var Pt=qp(gc(Bt.styles.backgroundOrigin,wt),Bt),jt=t0(gc(Bt.styles.backgroundClip,wt),Bt),Ae=e0(gc(Bt.styles.backgroundSize,wt),Lt,Pt),Fe=Ae[0],Je=Ae[1],Qe=Ca(gc(Bt.styles.backgroundPosition,wt),Pt.width-Fe,Pt.height-Je),Nn=Of(gc(Bt.styles.backgroundRepeat,wt),Qe,Ae,Pt,jt),zn=Math.round(Pt.left+Qe[0]),pi=Math.round(Pt.top+Qe[1]);return[Nn,zn,pi,Fe,Je]},fc=function(Bt){return Co(Bt)&&Bt.value===Yu.AUTO},Qf=function(Bt){return typeof Bt=="number"},e0=function(Bt,wt,Lt){var Pt=wt[0],jt=wt[1],Ae=wt[2],Fe=Bt[0],Je=Bt[1];if(!Fe)return[0,0];if(Ko(Fe)&&Je&&Ko(Je))return[zo(Fe,Lt.width),zo(Je,Lt.height)];var Qe=Qf(Ae);if(Co(Fe)&&(Fe.value===Yu.CONTAIN||Fe.value===Yu.COVER)){if(Qf(Ae)){var Nn=Lt.width/Lt.height;return Nn<Ae!=(Fe.value===Yu.COVER)?[Lt.width,Lt.width/Ae]:[Lt.height*Ae,Lt.height]}return[Lt.width,Lt.height]}var zn=Qf(Pt),pi=Qf(jt),Vi=zn||pi;if(fc(Fe)&&(!Je||fc(Je))){if(zn&&pi)return[Pt,jt];if(!Qe&&!Vi)return[Lt.width,Lt.height];if(Vi&&Qe){var Gr=zn?Pt:jt*Ae,xr=pi?jt:Pt/Ae;return[Gr,xr]}var br=zn?Pt:Lt.width,Zo=pi?jt:Lt.height;return[br,Zo]}if(Qe){var ao=0,uo=0;return Ko(Fe)?ao=zo(Fe,Lt.width):Ko(Je)&&(uo=zo(Je,Lt.height)),fc(Fe)?ao=uo*Ae:(!Je||fc(Je))&&(uo=ao/Ae),[ao,uo]}var co=null,qo=null;if(Ko(Fe)?co=zo(Fe,Lt.width):Je&&Ko(Je)&&(qo=zo(Je,Lt.height)),co!==null&&(!Je||fc(Je))&&(qo=zn&&pi?co/Pt*jt:Lt.height),qo!==null&&fc(Fe)&&(co=zn&&pi?qo/jt*Pt:Lt.width),co!==null&&qo!==null)return[co,qo];throw new Error("Unable to calculate background-size for element")},gc=function(Bt,wt){var Lt=Bt[wt];return typeof Lt=="undefined"?Bt[0]:Lt},Of=function(Bt,wt,Lt,Pt,jt){var Ae=wt[0],Fe=wt[1],Je=Lt[0],Qe=Lt[1];switch(Bt){case 2:return[new Br(Math.round(Pt.left),Math.round(Pt.top+Fe)),new Br(Math.round(Pt.left+Pt.width),Math.round(Pt.top+Fe)),new Br(Math.round(Pt.left+Pt.width),Math.round(Qe+Pt.top+Fe)),new Br(Math.round(Pt.left),Math.round(Qe+Pt.top+Fe))];case 3:return[new Br(Math.round(Pt.left+Ae),Math.round(Pt.top)),new Br(Math.round(Pt.left+Ae+Je),Math.round(Pt.top)),new Br(Math.round(Pt.left+Ae+Je),Math.round(Pt.height+Pt.top)),new Br(Math.round(Pt.left+Ae),Math.round(Pt.height+Pt.top))];case 1:return[new Br(Math.round(Pt.left+Ae),Math.round(Pt.top+Fe)),new Br(Math.round(Pt.left+Ae+Je),Math.round(Pt.top+Fe)),new Br(Math.round(Pt.left+Ae+Je),Math.round(Pt.top+Fe+Qe)),new Br(Math.round(Pt.left+Ae),Math.round(Pt.top+Fe+Qe))];default:return[new Br(Math.round(jt.left),Math.round(jt.top)),new Br(Math.round(jt.left+jt.width),Math.round(jt.top)),new Br(Math.round(jt.left+jt.width),Math.round(jt.height+jt.top)),new Br(Math.round(jt.left),Math.round(jt.height+jt.top))]}},yg="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Ou="Hidden Text",SA=function(){function Bt(wt){this._data={},this._document=wt}return Bt.prototype.parseMetrics=function(wt,Lt){var Pt=this._document.createElement("div"),jt=this._document.createElement("img"),Ae=this._document.createElement("span"),Fe=this._document.body;Pt.style.visibility="hidden",Pt.style.fontFamily=wt,Pt.style.fontSize=Lt,Pt.style.margin="0",Pt.style.padding="0",Pt.style.whiteSpace="nowrap",Fe.appendChild(Pt),jt.src=yg,jt.width=1,jt.height=1,jt.style.margin="0",jt.style.padding="0",jt.style.verticalAlign="baseline",Ae.style.fontFamily=wt,Ae.style.fontSize=Lt,Ae.style.margin="0",Ae.style.padding="0",Ae.appendChild(this._document.createTextNode(Ou)),Pt.appendChild(Ae),Pt.appendChild(jt);var Je=jt.offsetTop-Ae.offsetTop+2;Pt.removeChild(Ae),Pt.appendChild(this._document.createTextNode(Ou)),Pt.style.lineHeight="normal",jt.style.verticalAlign="super";var Qe=jt.offsetTop-Pt.offsetTop+2;return Fe.removeChild(Pt),{baseline:Je,middle:Qe}},Bt.prototype.getMetrics=function(wt,Lt){var Pt=wt+" "+Lt;return typeof this._data[Pt]=="undefined"&&(this._data[Pt]=this.parseMetrics(wt,Lt)),this._data[Pt]},Bt}(),Rf=function(){function Bt(wt,Lt){this.context=wt,this.options=Lt}return Bt}(),Jl=1e4,pc=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt._activeEffects=[],jt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),jt.ctx=jt.canvas.getContext("2d"),Pt.canvas||(jt.canvas.width=Math.floor(Pt.width*Pt.scale),jt.canvas.height=Math.floor(Pt.height*Pt.scale),jt.canvas.style.width=Pt.width+"px",jt.canvas.style.height=Pt.height+"px"),jt.fontMetrics=new SA(document),jt.ctx.scale(jt.options.scale,jt.options.scale),jt.ctx.translate(-Pt.x,-Pt.y),jt.ctx.textBaseline="bottom",jt._activeEffects=[],jt.context.logger.debug("Canvas renderer initialized ("+Pt.width+"x"+Pt.height+") with scale "+Pt.scale),jt}return wt.prototype.applyEffects=function(Lt){for(var Pt=this;this._activeEffects.length;)this.popEffect();Lt.forEach(function(jt){return Pt.applyEffect(jt)})},wt.prototype.applyEffect=function(Lt){this.ctx.save(),nA(Lt)&&(this.ctx.globalAlpha=Lt.opacity),Ls(Lt)&&(this.ctx.translate(Lt.offsetX,Lt.offsetY),this.ctx.transform(Lt.matrix[0],Lt.matrix[1],Lt.matrix[2],Lt.matrix[3],Lt.matrix[4],Lt.matrix[5]),this.ctx.translate(-Lt.offsetX,-Lt.offsetY)),Ea(Lt)&&(this.path(Lt.path),this.ctx.clip()),this._activeEffects.push(Lt)},wt.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},wt.prototype.renderStack=function(Lt){return Wt(this,void 0,void 0,function(){var Pt;return le(this,function(jt){switch(jt.label){case 0:return Pt=Lt.element.container.styles,Pt.isVisible()?[4,this.renderStackContent(Lt)]:[3,2];case 1:jt.sent(),jt.label=2;case 2:return[2]}})})},wt.prototype.renderNode=function(Lt){return Wt(this,void 0,void 0,function(){return le(this,function(Pt){switch(Pt.label){case 0:if(wa(Lt.container.flags,16))debugger;return Lt.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(Lt)]:[3,3];case 1:return Pt.sent(),[4,this.renderNodeContent(Lt)];case 2:Pt.sent(),Pt.label=3;case 3:return[2]}})})},wt.prototype.renderTextWithLetterSpacing=function(Lt,Pt,jt){var Ae=this;if(Pt===0)this.ctx.fillText(Lt.text,Lt.bounds.left,Lt.bounds.top+jt);else{var Fe=qh(Lt.text);Fe.reduce(function(Je,Qe){return Ae.ctx.fillText(Qe,Je,Lt.bounds.top+jt),Je+Ae.ctx.measureText(Qe).width},Lt.bounds.left)}},wt.prototype.createFontStyle=function(Lt){var Pt=Lt.fontVariant.filter(function(Fe){return Fe==="normal"||Fe==="small-caps"}).join(""),jt=i0(Lt.fontFamily).join(", "),Ae=xo(Lt.fontSize)?""+Lt.fontSize.number+Lt.fontSize.unit:Lt.fontSize.number+"px";return[[Lt.fontStyle,Pt,Lt.fontWeight,Ae,jt].join(" "),jt,Ae]},wt.prototype.renderTextNode=function(Lt,Pt){return Wt(this,void 0,void 0,function(){var jt,Ae,Fe,Je,Qe,Nn,zn,pi,Vi=this;return le(this,function(Gr){return jt=this.createFontStyle(Pt),Ae=jt[0],Fe=jt[1],Je=jt[2],this.ctx.font=Ae,this.ctx.direction=Pt.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",Qe=this.fontMetrics.getMetrics(Fe,Je),Nn=Qe.baseline,zn=Qe.middle,pi=Pt.paintOrder,Lt.textBounds.forEach(function(xr){pi.forEach(function(br){switch(br){case 0:Vi.ctx.fillStyle=Fo(Pt.color),Vi.renderTextWithLetterSpacing(xr,Pt.letterSpacing,Nn);var Zo=Pt.textShadow;Zo.length&&xr.text.trim().length&&(Zo.slice(0).reverse().forEach(function(ao){Vi.ctx.shadowColor=Fo(ao.color),Vi.ctx.shadowOffsetX=ao.offsetX.number*Vi.options.scale,Vi.ctx.shadowOffsetY=ao.offsetY.number*Vi.options.scale,Vi.ctx.shadowBlur=ao.blur.number,Vi.renderTextWithLetterSpacing(xr,Pt.letterSpacing,Nn)}),Vi.ctx.shadowColor="",Vi.ctx.shadowOffsetX=0,Vi.ctx.shadowOffsetY=0,Vi.ctx.shadowBlur=0),Pt.textDecorationLine.length&&(Vi.ctx.fillStyle=Fo(Pt.textDecorationColor||Pt.color),Pt.textDecorationLine.forEach(function(ao){switch(ao){case 1:Vi.ctx.fillRect(xr.bounds.left,Math.round(xr.bounds.top+Nn),xr.bounds.width,1);break;case 2:Vi.ctx.fillRect(xr.bounds.left,Math.round(xr.bounds.top),xr.bounds.width,1);break;case 3:Vi.ctx.fillRect(xr.bounds.left,Math.ceil(xr.bounds.top+zn),xr.bounds.width,1);break}}));break;case 1:Pt.webkitTextStrokeWidth&&xr.text.trim().length&&(Vi.ctx.strokeStyle=Fo(Pt.webkitTextStrokeColor),Vi.ctx.lineWidth=Pt.webkitTextStrokeWidth,Vi.ctx.lineJoin=window.chrome?"miter":"round",Vi.ctx.strokeText(xr.text,xr.bounds.left,xr.bounds.top+Nn)),Vi.ctx.strokeStyle="",Vi.ctx.lineWidth=0,Vi.ctx.lineJoin="miter";break}})}),[2]})})},wt.prototype.renderReplacedElement=function(Lt,Pt,jt){if(jt&&Lt.intrinsicWidth>0&&Lt.intrinsicHeight>0){var Ae=Uf(Lt),Fe=XA(Pt);this.path(Fe),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(jt,0,0,Lt.intrinsicWidth,Lt.intrinsicHeight,Ae.left,Ae.top,Ae.width,Ae.height),this.ctx.restore()}},wt.prototype.renderNodeContent=function(Lt){return Wt(this,void 0,void 0,function(){var Pt,jt,Ae,Fe,Je,Qe,uo,uo,Nn,zn,pi,Vi,qo,Gr,xr,Do,br,Zo,ao,uo,co,qo,Do;return le(this,function(to){switch(to.label){case 0:this.applyEffects(Lt.getEffects(4)),Pt=Lt.container,jt=Lt.curves,Ae=Pt.styles,Fe=0,Je=Pt.textNodes,to.label=1;case 1:return Fe<Je.length?(Qe=Je[Fe],[4,this.renderTextNode(Qe,Ae)]):[3,4];case 2:to.sent(),to.label=3;case 3:return Fe++,[3,1];case 4:if(!(Pt instanceof Xc))return[3,8];to.label=5;case 5:return to.trys.push([5,7,,8]),[4,this.context.cache.match(Pt.src)];case 6:return uo=to.sent(),this.renderReplacedElement(Pt,jt,uo),[3,8];case 7:return to.sent(),this.context.logger.error("Error loading image "+Pt.src),[3,8];case 8:if(Pt instanceof Jc&&this.renderReplacedElement(Pt,jt,Pt.canvas),!(Pt instanceof $c))return[3,12];to.label=9;case 9:return to.trys.push([9,11,,12]),[4,this.context.cache.match(Pt.svg)];case 10:return uo=to.sent(),this.renderReplacedElement(Pt,jt,uo),[3,12];case 11:return to.sent(),this.context.logger.error("Error loading svg "+Pt.svg.substring(0,255)),[3,12];case 12:return Pt instanceof Lf&&Pt.tree?(Nn=new wt(this.context,{scale:this.options.scale,backgroundColor:Pt.backgroundColor,x:0,y:0,width:Pt.width,height:Pt.height}),[4,Nn.render(Pt.tree)]):[3,14];case 13:zn=to.sent(),Pt.width&&Pt.height&&this.ctx.drawImage(zn,0,0,Pt.width,Pt.height,Pt.bounds.left,Pt.bounds.top,Pt.bounds.width,Pt.bounds.height),to.label=14;case 14:if(Pt instanceof su&&(pi=Math.min(Pt.bounds.width,Pt.bounds.height),Pt.type===ic?Pt.checked&&(this.ctx.save(),this.path([new Br(Pt.bounds.left+pi*.39363,Pt.bounds.top+pi*.79),new Br(Pt.bounds.left+pi*.16,Pt.bounds.top+pi*.5549),new Br(Pt.bounds.left+pi*.27347,Pt.bounds.top+pi*.44071),new Br(Pt.bounds.left+pi*.39694,Pt.bounds.top+pi*.5649),new Br(Pt.bounds.left+pi*.72983,Pt.bounds.top+pi*.23),new Br(Pt.bounds.left+pi*.84,Pt.bounds.top+pi*.34085),new Br(Pt.bounds.left+pi*.39363,Pt.bounds.top+pi*.79)]),this.ctx.fillStyle=Fo(Rd),this.ctx.fill(),this.ctx.restore()):Pt.type===vA&&Pt.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(Pt.bounds.left+pi/2,Pt.bounds.top+pi/2,pi/4,0,Math.PI*2,!0),this.ctx.fillStyle=Fo(Rd),this.ctx.fill(),this.ctx.restore())),Tm(Pt)&&Pt.value.length){switch(Vi=this.createFontStyle(Ae),qo=Vi[0],Gr=Vi[1],xr=this.fontMetrics.getMetrics(qo,Gr).baseline,this.ctx.font=qo,this.ctx.fillStyle=Fo(Ae.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=ho(Pt.styles.textAlign),Do=Uf(Pt),br=0,Pt.styles.textAlign){case 1:br+=Do.width/2;break;case 2:br+=Do.width;break}Zo=Do.add(br,0,0,-Do.height/2+1),this.ctx.save(),this.path([new Br(Do.left,Do.top),new Br(Do.left+Do.width,Do.top),new Br(Do.left+Do.width,Do.top+Do.height),new Br(Do.left,Do.top+Do.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ra(Pt.value,Zo),Ae.letterSpacing,xr),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!wa(Pt.styles.display,2048))return[3,20];if(Pt.styles.listStyleImage===null)return[3,19];if(ao=Pt.styles.listStyleImage,ao.type!==0)return[3,18];uo=void 0,co=ao.url,to.label=15;case 15:return to.trys.push([15,17,,18]),[4,this.context.cache.match(co)];case 16:return uo=to.sent(),this.ctx.drawImage(uo,Pt.bounds.left-(uo.width+10),Pt.bounds.top),[3,18];case 17:return to.sent(),this.context.logger.error("Error loading list-style-image "+co),[3,18];case 18:return[3,20];case 19:Lt.listValue&&Pt.styles.listStyleType!==-1&&(qo=this.createFontStyle(Ae)[0],this.ctx.font=qo,this.ctx.fillStyle=Fo(Ae.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Do=new de(Pt.bounds.left,Pt.bounds.top+zo(Pt.styles.paddingTop,Pt.bounds.width),Pt.bounds.width,ya(Ae.lineHeight,Ae.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ra(Lt.listValue,Do),Ae.letterSpacing,ya(Ae.lineHeight,Ae.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),to.label=20;case 20:return[2]}})})},wt.prototype.renderStackContent=function(Lt){return Wt(this,void 0,void 0,function(){var Pt,jt,ao,Ae,Fe,ao,Je,Qe,ao,Nn,zn,ao,pi,Vi,ao,Gr,xr,ao,br,Zo,ao;return le(this,function(uo){switch(uo.label){case 0:if(wa(Lt.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(Lt.element)];case 1:uo.sent(),Pt=0,jt=Lt.negativeZIndex,uo.label=2;case 2:return Pt<jt.length?(ao=jt[Pt],[4,this.renderStack(ao)]):[3,5];case 3:uo.sent(),uo.label=4;case 4:return Pt++,[3,2];case 5:return[4,this.renderNodeContent(Lt.element)];case 6:uo.sent(),Ae=0,Fe=Lt.nonInlineLevel,uo.label=7;case 7:return Ae<Fe.length?(ao=Fe[Ae],[4,this.renderNode(ao)]):[3,10];case 8:uo.sent(),uo.label=9;case 9:return Ae++,[3,7];case 10:Je=0,Qe=Lt.nonPositionedFloats,uo.label=11;case 11:return Je<Qe.length?(ao=Qe[Je],[4,this.renderStack(ao)]):[3,14];case 12:uo.sent(),uo.label=13;case 13:return Je++,[3,11];case 14:Nn=0,zn=Lt.nonPositionedInlineLevel,uo.label=15;case 15:return Nn<zn.length?(ao=zn[Nn],[4,this.renderStack(ao)]):[3,18];case 16:uo.sent(),uo.label=17;case 17:return Nn++,[3,15];case 18:pi=0,Vi=Lt.inlineLevel,uo.label=19;case 19:return pi<Vi.length?(ao=Vi[pi],[4,this.renderNode(ao)]):[3,22];case 20:uo.sent(),uo.label=21;case 21:return pi++,[3,19];case 22:Gr=0,xr=Lt.zeroOrAutoZIndexOrTransformedOrOpacity,uo.label=23;case 23:return Gr<xr.length?(ao=xr[Gr],[4,this.renderStack(ao)]):[3,26];case 24:uo.sent(),uo.label=25;case 25:return Gr++,[3,23];case 26:br=0,Zo=Lt.positiveZIndex,uo.label=27;case 27:return br<Zo.length?(ao=Zo[br],[4,this.renderStack(ao)]):[3,30];case 28:uo.sent(),uo.label=29;case 29:return br++,[3,27];case 30:return[2]}})})},wt.prototype.mask=function(Lt){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(Lt.slice(0).reverse()),this.ctx.closePath()},wt.prototype.path=function(Lt){this.ctx.beginPath(),this.formatPath(Lt),this.ctx.closePath()},wt.prototype.formatPath=function(Lt){var Pt=this;Lt.forEach(function(jt,Ae){var Fe=Ns(jt)?jt.start:jt;Ae===0?Pt.ctx.moveTo(Fe.x,Fe.y):Pt.ctx.lineTo(Fe.x,Fe.y),Ns(jt)&&Pt.ctx.bezierCurveTo(jt.startControl.x,jt.startControl.y,jt.endControl.x,jt.endControl.y,jt.end.x,jt.end.y)})},wt.prototype.renderRepeat=function(Lt,Pt,jt,Ae){this.path(Lt),this.ctx.fillStyle=Pt,this.ctx.translate(jt,Ae),this.ctx.fill(),this.ctx.translate(-jt,-Ae)},wt.prototype.resizeImage=function(Lt,Pt,jt){var Ae;if(Lt.width===Pt&&Lt.height===jt)return Lt;var Fe=(Ae=this.canvas.ownerDocument)!==null&&Ae!==void 0?Ae:document,Je=Fe.createElement("canvas");Je.width=Math.max(1,Pt),Je.height=Math.max(1,jt);var Qe=Je.getContext("2d");return Qe.drawImage(Lt,0,0,Lt.width,Lt.height,0,0,Pt,jt),Je},wt.prototype.renderBackgroundImage=function(Lt){return Wt(this,void 0,void 0,function(){var Pt,jt,Ae,Fe,Je,Qe;return le(this,function(Nn){switch(Nn.label){case 0:Pt=Lt.styles.backgroundImage.length-1,jt=function(zn){var pi,Vi,Gr,La,Ul,au,zs,Ka,ws,xr,La,Ul,au,zs,Ka,br,Zo,ao,uo,co,qo,Do,to,cs,ws,Oo,La,Il,$l,zs,Ka,CA,Ul,au,PA,En,$A,mc,qA,th,Mh,ll;return le(this,function(Ru){switch(Ru.label){case 0:if(zn.type!==0)return[3,5];pi=void 0,Vi=zn.url,Ru.label=1;case 1:return Ru.trys.push([1,3,,4]),[4,Ae.context.cache.match(Vi)];case 2:return pi=Ru.sent(),[3,4];case 3:return Ru.sent(),Ae.context.logger.error("Error loading background-image "+Vi),[3,4];case 4:return pi&&(Gr=dc(Lt,Pt,[pi.width,pi.height,pi.width/pi.height]),La=Gr[0],Ul=Gr[1],au=Gr[2],zs=Gr[3],Ka=Gr[4],ws=Ae.ctx.createPattern(Ae.resizeImage(pi,zs,Ka),"repeat"),Ae.renderRepeat(La,ws,Ul,au)),[3,6];case 5:Wu(zn)?(xr=dc(Lt,Pt,[null,null,null]),La=xr[0],Ul=xr[1],au=xr[2],zs=xr[3],Ka=xr[4],br=du(zn.angle,zs,Ka),Zo=br[0],ao=br[1],uo=br[2],co=br[3],qo=br[4],Do=document.createElement("canvas"),Do.width=zs,Do.height=Ka,to=Do.getContext("2d"),cs=to.createLinearGradient(ao,co,uo,qo),Hn(zn.stops,Zo).forEach(function(Xd){return cs.addColorStop(Xd.stop,Fo(Xd.color))}),to.fillStyle=cs,to.fillRect(0,0,zs,Ka),zs>0&&Ka>0&&(ws=Ae.ctx.createPattern(Do,"repeat"),Ae.renderRepeat(La,ws,Ul,au))):Ho(zn)&&(Oo=dc(Lt,Pt,[null,null,null]),La=Oo[0],Il=Oo[1],$l=Oo[2],zs=Oo[3],Ka=Oo[4],CA=zn.position.length===0?[dl]:zn.position,Ul=zo(CA[0],zs),au=zo(CA[CA.length-1],Ka),PA=gl(zn,Ul,au,zs,Ka),En=PA[0],$A=PA[1],En>0&&$A>0&&(mc=Ae.ctx.createRadialGradient(Il+Ul,$l+au,0,Il+Ul,$l+au,En),Hn(zn.stops,En*2).forEach(function(Xd){return mc.addColorStop(Xd.stop,Fo(Xd.color))}),Ae.path(La),Ae.ctx.fillStyle=mc,En!==$A?(qA=Lt.bounds.left+.5*Lt.bounds.width,th=Lt.bounds.top+.5*Lt.bounds.height,Mh=$A/En,ll=1/Mh,Ae.ctx.save(),Ae.ctx.translate(qA,th),Ae.ctx.transform(1,0,0,Mh,0,0),Ae.ctx.translate(-qA,-th),Ae.ctx.fillRect(Il,ll*($l-th)+th,zs,Ka*ll),Ae.ctx.restore()):Ae.ctx.fill())),Ru.label=6;case 6:return Pt--,[2]}})},Ae=this,Fe=0,Je=Lt.styles.backgroundImage.slice(0).reverse(),Nn.label=1;case 1:return Fe<Je.length?(Qe=Je[Fe],[5,jt(Qe)]):[3,4];case 2:Nn.sent(),Nn.label=3;case 3:return Fe++,[3,1];case 4:return[2]}})})},wt.prototype.renderSolidBorder=function(Lt,Pt,jt){return Wt(this,void 0,void 0,function(){return le(this,function(Ae){return this.path(hc(jt,Pt)),this.ctx.fillStyle=Fo(Lt),this.ctx.fill(),[2]})})},wt.prototype.renderDoubleBorder=function(Lt,Pt,jt,Ae){return Wt(this,void 0,void 0,function(){var Fe,Je;return le(this,function(Qe){switch(Qe.label){case 0:return Pt<3?[4,this.renderSolidBorder(Lt,jt,Ae)]:[3,2];case 1:return Qe.sent(),[2];case 2:return Fe=Lh(Ae,jt),this.path(Fe),this.ctx.fillStyle=Fo(Lt),this.ctx.fill(),Je=If(Ae,jt),this.path(Je),this.ctx.fill(),[2]}})})},wt.prototype.renderNodeBackgroundAndBorders=function(Lt){return Wt(this,void 0,void 0,function(){var Pt,jt,Ae,Fe,Je,Qe,Nn,zn,pi=this;return le(this,function(Vi){switch(Vi.label){case 0:return this.applyEffects(Lt.getEffects(2)),Pt=Lt.container.styles,jt=!Yo(Pt.backgroundColor)||Pt.backgroundImage.length,Ae=[{style:Pt.borderTopStyle,color:Pt.borderTopColor,width:Pt.borderTopWidth},{style:Pt.borderRightStyle,color:Pt.borderRightColor,width:Pt.borderRightWidth},{style:Pt.borderBottomStyle,color:Pt.borderBottomColor,width:Pt.borderBottomWidth},{style:Pt.borderLeftStyle,color:Pt.borderLeftColor,width:Pt.borderLeftWidth}],Fe=Hf(gc(Pt.backgroundClip,0),Lt.curves),jt||Pt.boxShadow.length?(this.ctx.save(),this.path(Fe),this.ctx.clip(),Yo(Pt.backgroundColor)||(this.ctx.fillStyle=Fo(Pt.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(Lt.container)]):[3,2];case 1:Vi.sent(),this.ctx.restore(),Pt.boxShadow.slice(0).reverse().forEach(function(Gr){pi.ctx.save();var xr=wl(Lt.curves),br=Gr.inset?0:Jl,Zo=$p(xr,-br+(Gr.inset?1:-1)*Gr.spread.number,(Gr.inset?1:-1)*Gr.spread.number,Gr.spread.number*(Gr.inset?-2:2),Gr.spread.number*(Gr.inset?-2:2));Gr.inset?(pi.path(xr),pi.ctx.clip(),pi.mask(Zo)):(pi.mask(xr),pi.ctx.clip(),pi.path(Zo)),pi.ctx.shadowOffsetX=Gr.offsetX.number+br,pi.ctx.shadowOffsetY=Gr.offsetY.number,pi.ctx.shadowColor=Fo(Gr.color),pi.ctx.shadowBlur=Gr.blur.number,pi.ctx.fillStyle=Gr.inset?Fo(Gr.color):"rgba(0,0,0,1)",pi.ctx.fill(),pi.ctx.restore()}),Vi.label=2;case 2:Je=0,Qe=0,Nn=Ae,Vi.label=3;case 3:return Qe<Nn.length?(zn=Nn[Qe],zn.style!==0&&!Yo(zn.color)&&zn.width>0?zn.style!==2?[3,5]:[4,this.renderDashedDottedBorder(zn.color,zn.width,Je,Lt.curves,2)]:[3,11]):[3,13];case 4:return Vi.sent(),[3,11];case 5:return zn.style!==3?[3,7]:[4,this.renderDashedDottedBorder(zn.color,zn.width,Je,Lt.curves,3)];case 6:return Vi.sent(),[3,11];case 7:return zn.style!==4?[3,9]:[4,this.renderDoubleBorder(zn.color,zn.width,Je,Lt.curves)];case 8:return Vi.sent(),[3,11];case 9:return[4,this.renderSolidBorder(zn.color,Je,Lt.curves)];case 10:Vi.sent(),Vi.label=11;case 11:Je++,Vi.label=12;case 12:return Qe++,[3,3];case 13:return[2]}})})},wt.prototype.renderDashedDottedBorder=function(Lt,Pt,jt,Ae,Fe){return Wt(this,void 0,void 0,function(){var Je,Qe,Nn,zn,pi,Vi,Gr,xr,br,Zo,ao,uo,co,qo,Do,to,Do,to;return le(this,function(cs){return this.ctx.save(),Je=cc(Ae,jt),Qe=hc(Ae,jt),Fe===2&&(this.path(Qe),this.ctx.clip()),Ns(Qe[0])?(Nn=Qe[0].start.x,zn=Qe[0].start.y):(Nn=Qe[0].x,zn=Qe[0].y),Ns(Qe[1])?(pi=Qe[1].end.x,Vi=Qe[1].end.y):(pi=Qe[1].x,Vi=Qe[1].y),jt===0||jt===2?Gr=Math.abs(Nn-pi):Gr=Math.abs(zn-Vi),this.ctx.beginPath(),Fe===3?this.formatPath(Je):this.formatPath(Qe.slice(0,2)),xr=Pt<3?Pt*3:Pt*2,br=Pt<3?Pt*2:Pt,Fe===3&&(xr=Pt,br=Pt),Zo=!0,Gr<=xr*2?Zo=!1:Gr<=xr*2+br?(ao=Gr/(2*xr+br),xr*=ao,br*=ao):(uo=Math.floor((Gr+br)/(xr+br)),co=(Gr-uo*xr)/(uo-1),qo=(Gr-(uo+1)*xr)/uo,br=qo<=0||Math.abs(br-co)<Math.abs(br-qo)?co:qo),Zo&&(Fe===3?this.ctx.setLineDash([0,xr+br]):this.ctx.setLineDash([xr,br])),Fe===3?(this.ctx.lineCap="round",this.ctx.lineWidth=Pt):this.ctx.lineWidth=Pt*2+1.1,this.ctx.strokeStyle=Fo(Lt),this.ctx.stroke(),this.ctx.setLineDash([]),Fe===2&&(Ns(Qe[0])&&(Do=Qe[3],to=Qe[0],this.ctx.beginPath(),this.formatPath([new Br(Do.end.x,Do.end.y),new Br(to.start.x,to.start.y)]),this.ctx.stroke()),Ns(Qe[1])&&(Do=Qe[1],to=Qe[2],this.ctx.beginPath(),this.formatPath([new Br(Do.end.x,Do.end.y),new Br(to.start.x,to.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},wt.prototype.render=function(Lt){return Wt(this,void 0,void 0,function(){var Pt;return le(this,function(jt){switch(jt.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=Fo(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),Pt=Zd(Lt),[4,this.renderStack(Pt)];case 1:return jt.sent(),this.applyEffects([]),[2,this.canvas]}})})},wt}(Rf),Tm=function(Bt){return Bt instanceof td||Bt instanceof Hd?!0:Bt instanceof su&&Bt.type!==vA&&Bt.type!==ic},Hf=function(Bt,wt){switch(Bt){case 0:return wl(wt);case 2:return na(wt);case 1:default:return XA(wt)}},ho=function(Bt){switch(Bt){case 1:return"center";case 2:return"right";case 0:default:return"left"}},n0=["-apple-system","system-ui"],i0=function(Bt){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?Bt.filter(function(wt){return n0.indexOf(wt)===-1}):Bt},np=function(Bt){It(wt,Bt);function wt(Lt,Pt){var jt=Bt.call(this,Lt,Pt)||this;return jt.canvas=Pt.canvas?Pt.canvas:document.createElement("canvas"),jt.ctx=jt.canvas.getContext("2d"),jt.options=Pt,jt.canvas.width=Math.floor(Pt.width*Pt.scale),jt.canvas.height=Math.floor(Pt.height*Pt.scale),jt.canvas.style.width=Pt.width+"px",jt.canvas.style.height=Pt.height+"px",jt.ctx.scale(jt.options.scale,jt.options.scale),jt.ctx.translate(-Pt.x,-Pt.y),jt.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+Pt.width+"x"+Pt.height+" at "+Pt.x+","+Pt.y+") with scale "+Pt.scale),jt}return wt.prototype.render=function(Lt){return Wt(this,void 0,void 0,function(){var Pt,jt;return le(this,function(Ae){switch(Ae.label){case 0:return Pt=Yc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,Lt),[4,Wd(Pt)];case 1:return jt=Ae.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=Fo(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(jt,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},wt}(Rf),Wd=function(Bt){return new Promise(function(wt,Lt){var Pt=new Image;Pt.onload=function(){wt(Pt)},Pt.onerror=Lt,Pt.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(Bt))})},Yd=function(){function Bt(wt){var Lt=wt.id,Pt=wt.enabled;this.id=Lt,this.enabled=Pt,this.start=Date.now()}return Bt.prototype.debug=function(){for(var wt=[],Lt=0;Lt<arguments.length;Lt++)wt[Lt]=arguments[Lt];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,ve([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.getTime=function(){return Date.now()-this.start},Bt.prototype.info=function(){for(var wt=[],Lt=0;Lt<arguments.length;Lt++)wt[Lt]=arguments[Lt];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,ve([this.id,this.getTime()+"ms"],wt))},Bt.prototype.warn=function(){for(var wt=[],Lt=0;Lt<arguments.length;Lt++)wt[Lt]=arguments[Lt];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,ve([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.prototype.error=function(){for(var wt=[],Lt=0;Lt<arguments.length;Lt++)wt[Lt]=arguments[Lt];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,ve([this.id,this.getTime()+"ms"],wt)):this.info.apply(this,wt))},Bt.instances={},Bt}(),BA=function(){function Bt(wt,Lt){var Pt;this.windowBounds=Lt,this.instanceName="#"+Bt.instanceCount++,this.logger=new Yd({id:this.instanceName,enabled:wt.logging}),this.cache=(Pt=wt.cache)!==null&&Pt!==void 0?Pt:new No(this,wt)}return Bt.instanceCount=1,Bt}(),ip=function(Bt,wt){return wt===void 0&&(wt={}),rp(Bt,wt)};typeof window!="undefined"&&Pr.setContext(window);var rp=function(Bt,wt){return Wt(void 0,void 0,void 0,function(){var Lt,Pt,jt,Ae,Fe,Je,Qe,Nn,zn,pi,Vi,Gr,xr,br,Zo,ao,uo,co,qo,Do,cs,to,cs,ws,Oo,La,Il,$l,zs,Ka,CA,Ul,au,PA,En,$A,mc,qA,th,Mh;return le(this,function(ll){switch(ll.label){case 0:if(!Bt||typeof Bt!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(Lt=Bt.ownerDocument,!Lt)throw new Error("Element is not attached to a Document");if(Pt=Lt.defaultView,!Pt)throw new Error("Document is not attached to a Window");return jt={allowTaint:(ws=wt.allowTaint)!==null&&ws!==void 0?ws:!1,imageTimeout:(Oo=wt.imageTimeout)!==null&&Oo!==void 0?Oo:15e3,proxy:wt.proxy,useCORS:(La=wt.useCORS)!==null&&La!==void 0?La:!1},Ae=St({logging:(Il=wt.logging)!==null&&Il!==void 0?Il:!0,cache:wt.cache},jt),Fe={windowWidth:($l=wt.windowWidth)!==null&&$l!==void 0?$l:Pt.innerWidth,windowHeight:(zs=wt.windowHeight)!==null&&zs!==void 0?zs:Pt.innerHeight,scrollX:(Ka=wt.scrollX)!==null&&Ka!==void 0?Ka:Pt.pageXOffset,scrollY:(CA=wt.scrollY)!==null&&CA!==void 0?CA:Pt.pageYOffset},Je=new de(Fe.scrollX,Fe.scrollY,Fe.windowWidth,Fe.windowHeight),Qe=new BA(Ae,Je),Nn=(Ul=wt.foreignObjectRendering)!==null&&Ul!==void 0?Ul:!1,zn={allowTaint:(au=wt.allowTaint)!==null&&au!==void 0?au:!1,onclone:wt.onclone,ignoreElements:wt.ignoreElements,inlineImages:Nn,copyStyles:Nn},Qe.logger.debug("Starting document clone with size "+Je.width+"x"+Je.height+" scrolled to "+-Je.left+","+-Je.top),pi=new pt(Qe,Bt,zn),Vi=pi.clonedReferenceElement,Vi?[4,pi.toIFrame(Lt,Je)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Gr=ll.sent(),xr=Jo(Vi)||zd(Vi)?ie(Vi.ownerDocument):Ht(Qe,Vi),br=xr.width,Zo=xr.height,ao=xr.left,uo=xr.top,co=op(Qe,Vi,wt.backgroundColor),qo={canvas:wt.canvas,backgroundColor:co,scale:(En=(PA=wt.scale)!==null&&PA!==void 0?PA:Pt.devicePixelRatio)!==null&&En!==void 0?En:1,x:(($A=wt.x)!==null&&$A!==void 0?$A:0)+ao,y:((mc=wt.y)!==null&&mc!==void 0?mc:0)+uo,width:(qA=wt.width)!==null&&qA!==void 0?qA:Math.ceil(br),height:(th=wt.height)!==null&&th!==void 0?th:Math.ceil(Zo)},Nn?(Qe.logger.debug("Document cloned, using foreign object rendering"),cs=new np(Qe,qo),[4,cs.render(Vi)]):[3,3];case 2:return Do=ll.sent(),[3,5];case 3:return Qe.logger.debug("Document cloned, element located at "+ao+","+uo+" with size "+br+"x"+Zo+" using computed rendering"),Qe.logger.debug("Starting DOM parsing"),to=bf(Qe,Vi),co===to.styles.backgroundColor&&(to.styles.backgroundColor=ps.TRANSPARENT),Qe.logger.debug("Starting renderer for element at "+qo.x+","+qo.y+" with size "+qo.width+"x"+qo.height),cs=new pc(Qe,qo),[4,cs.render(to)];case 4:Do=ll.sent(),ll.label=5;case 5:return(!((Mh=wt.removeContainer)!==null&&Mh!==void 0)||Mh)&&(pt.destroy(Gr)||Qe.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),Qe.logger.debug("Finished rendering"),[2,Do]}})})},op=function(Bt,wt,Lt){var Pt=wt.ownerDocument,jt=Pt.documentElement?wo(Bt,getComputedStyle(Pt.documentElement).backgroundColor):ps.TRANSPARENT,Ae=Pt.body?wo(Bt,getComputedStyle(Pt.body).backgroundColor):ps.TRANSPARENT,Fe=typeof Lt=="string"?wo(Bt,Lt):Lt===null?ps.TRANSPARENT:4294967295;return wt===Pt.documentElement?Yo(jt)?Yo(Ae)?Fe:Ae:jt:Fe};return ip})},67467:function(Sn,Ve){Ve.read=function(It,St,Wt,le,ve){var de,Ht,ie=ve*8-le-1,oe=(1<<ie)-1,he=oe>>1,Gt=-7,Ie=Wt?ve-1:0,Xt=Wt?-1:1,Me=It[St+Ie];for(Ie+=Xt,de=Me&(1<<-Gt)-1,Me>>=-Gt,Gt+=ie;Gt>0;de=de*256+It[St+Ie],Ie+=Xt,Gt-=8);for(Ht=de&(1<<-Gt)-1,de>>=-Gt,Gt+=le;Gt>0;Ht=Ht*256+It[St+Ie],Ie+=Xt,Gt-=8);if(de===0)de=1-he;else{if(de===oe)return Ht?NaN:(Me?-1:1)*(1/0);Ht=Ht+Math.pow(2,le),de=de-he}return(Me?-1:1)*Ht*Math.pow(2,de-le)},Ve.write=function(It,St,Wt,le,ve,de){var Ht,ie,oe,he=de*8-ve-1,Gt=(1<<he)-1,Ie=Gt>>1,Xt=ve===23?Math.pow(2,-24)-Math.pow(2,-77):0,Me=le?0:de-1,Qt=le?1:-1,nt=St<0||St===0&&1/St<0?1:0;for(St=Math.abs(St),isNaN(St)||St===1/0?(ie=isNaN(St)?1:0,Ht=Gt):(Ht=Math.floor(Math.log(St)/Math.LN2),St*(oe=Math.pow(2,-Ht))<1&&(Ht--,oe*=2),Ht+Ie>=1?St+=Xt/oe:St+=Xt*Math.pow(2,1-Ie),St*oe>=2&&(Ht++,oe/=2),Ht+Ie>=Gt?(ie=0,Ht=Gt):Ht+Ie>=1?(ie=(St*oe-1)*Math.pow(2,ve),Ht=Ht+Ie):(ie=St*Math.pow(2,Ie-1)*Math.pow(2,ve),Ht=0));ve>=8;It[Wt+Me]=ie&255,Me+=Qt,ie/=256,ve-=8);for(Ht=Ht<<ve|ie,he+=ve;he>0;It[Wt+Me]=Ht&255,Me+=Qt,Ht/=256,he-=8);It[Wt+Me-Qt]|=nt*128}},2859:function(Sn,Ve,It){"use strict";It.d(Ve,{hP:function(){return ni}});var St=function(zt,Ft){return(St=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(mt,vt){mt.__proto__=vt}||function(mt,vt){for(var Et in vt)Object.prototype.hasOwnProperty.call(vt,Et)&&(mt[Et]=vt[Et])})(zt,Ft)};function Wt(zt,Ft){function mt(){this.constructor=zt}St(zt,Ft),zt.prototype=Ft===null?Object.create(Ft):(mt.prototype=Ft.prototype,new mt)}function le(zt,Ft,mt,vt){return new(mt||(mt=Promise))(function(Et,Ct){function _t(Bn){try{Ze(vt.next(Bn))}catch(ze){Ct(ze)}}function Ce(Bn){try{Ze(vt.throw(Bn))}catch(ze){Ct(ze)}}function Ze(Bn){var ze;Bn.done?Et(Bn.value):(ze=Bn.value,ze instanceof mt?ze:new mt(function(Ue){Ue(ze)})).then(_t,Ce)}Ze((vt=vt.apply(zt,Ft||[])).next())})}function ve(zt,Ft){var mt,vt,Et,Ct,_t={label:0,sent:function(){if(1&Et[0])throw Et[1];return Et[1]},trys:[],ops:[]};return Ct={next:Ce(0),throw:Ce(1),return:Ce(2)},typeof Symbol=="function"&&(Ct[Symbol.iterator]=function(){return this}),Ct;function Ce(Ze){return function(Bn){return function(ze){if(mt)throw new TypeError("Generator is already executing.");for(;_t;)try{if(mt=1,vt&&(Et=2&ze[0]?vt.return:ze[0]?vt.throw||((Et=vt.return)&&Et.call(vt),0):vt.next)&&!(Et=Et.call(vt,ze[1])).done)return Et;switch(vt=0,Et&&(ze=[2&ze[0],Et.value]),ze[0]){case 0:case 1:Et=ze;break;case 4:return _t.label++,{value:ze[1],done:!1};case 5:_t.label++,vt=ze[1],ze=[0];continue;case 7:ze=_t.ops.pop(),_t.trys.pop();continue;default:if(Et=_t.trys,!((Et=Et.length>0&&Et[Et.length-1])||ze[0]!==6&&ze[0]!==2)){_t=0;continue}if(ze[0]===3&&(!Et||ze[1]>Et[0]&&ze[1]<Et[3])){_t.label=ze[1];break}if(ze[0]===6&&_t.label<Et[1]){_t.label=Et[1],Et=ze;break}if(Et&&_t.label<Et[2]){_t.label=Et[2],_t.ops.push(ze);break}Et[2]&&_t.ops.pop(),_t.trys.pop();continue}ze=Ft.call(zt,_t)}catch(Ue){ze=[6,Ue],vt=0}finally{mt=Et=0}if(5&ze[0])throw ze[1];return{value:ze[0]?ze[1]:void 0,done:!0}}([Ze,Bn])}}}function de(){for(var zt=0,Ft=0,mt=arguments.length;Ft<mt;Ft++)zt+=arguments[Ft].length;var vt=Array(zt),Et=0;for(Ft=0;Ft<mt;Ft++)for(var Ct=arguments[Ft],_t=0,Ce=Ct.length;_t<Ce;_t++,Et++)vt[Et]=Ct[_t];return vt}var Ht=function(){function zt(){}return zt.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},zt.setAttributes=function(Ft,mt){for(var vt=0,Et=mt;vt<Et.length;vt++){var Ct=Et[vt],_t=Ct[0],Ce=Ct[1];Ft.setAttribute(_t,Ce)}},zt.createRect=function(Ft,mt,vt){var Et=document.createElementNS("http://www.w3.org/2000/svg","rect");return Et.setAttribute("width",Ft.toString()),Et.setAttribute("height",mt.toString()),vt&&zt.setAttributes(Et,vt),Et},zt.createLine=function(Ft,mt,vt,Et,Ct){var _t=document.createElementNS("http://www.w3.org/2000/svg","line");return _t.setAttribute("x1",Ft.toString()),_t.setAttribute("y1",mt.toString()),_t.setAttribute("x2",vt.toString()),_t.setAttribute("y2",Et.toString()),Ct&&zt.setAttributes(_t,Ct),_t},zt.createPolygon=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","polygon");return vt.setAttribute("points",Ft),mt&&zt.setAttributes(vt,mt),vt},zt.createCircle=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","circle");return vt.setAttribute("cx",(Ft/2).toString()),vt.setAttribute("cy",(Ft/2).toString()),vt.setAttribute("r",Ft.toString()),mt&&zt.setAttributes(vt,mt),vt},zt.createEllipse=function(Ft,mt,vt){var Et=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Et.setAttribute("cx",(Ft/2).toString()),Et.setAttribute("cy",(mt/2).toString()),Et.setAttribute("rx",(Ft/2).toString()),Et.setAttribute("ry",(mt/2).toString()),vt&&zt.setAttributes(Et,vt),Et},zt.createGroup=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","g");return Ft&&zt.setAttributes(mt,Ft),mt},zt.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},zt.createMarker=function(Ft,mt,vt,Et,Ct,_t,Ce){var Ze=document.createElementNS("http://www.w3.org/2000/svg","marker");return zt.setAttributes(Ze,[["id",Ft],["orient",mt],["markerWidth",vt.toString()],["markerHeight",Et.toString()],["refX",Ct.toString()],["refY",_t.toString()]]),Ze.appendChild(Ce),Ze},zt.createText=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","text");return mt.setAttribute("x","0"),mt.setAttribute("y","0"),Ft&&zt.setAttributes(mt,Ft),mt},zt.createTSpan=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","tspan");return vt.textContent=Ft,mt&&zt.setAttributes(vt,mt),vt},zt.createImage=function(Ft){var mt=document.createElementNS("http://www.w3.org/2000/svg","image");return Ft&&zt.setAttributes(mt,Ft),mt},zt.createPoint=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return vt.x=Ft,vt.y=mt,vt},zt.createPath=function(Ft,mt){var vt=document.createElementNS("http://www.w3.org/2000/svg","path");return vt.setAttribute("d",Ft),mt&&zt.setAttributes(vt,mt),vt},zt}(),ie=function(){function zt(){}return zt.addKey=function(Ft){zt.key=Ft},Object.defineProperty(zt,"isLicensed",{get:function(){return!!zt.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(zt.key)},enumerable:!1,configurable:!0}),zt}(),oe=function(){function zt(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return zt.prototype.rasterize=function(Ft,mt,vt){var Et=this;return new Promise(function(Ct){var _t=vt!==void 0?vt:document.createElement("canvas");Ft===null&&(Et.markersOnly=!0,Et.naturalSize=!1);var Ce=document.createElementNS("http://www.w3.org/2000/svg","svg");Ce.setAttribute("xmlns","http://www.w3.org/2000/svg"),Ce.setAttribute("width",mt.width.baseVal.valueAsString),Ce.setAttribute("height",mt.height.baseVal.valueAsString),Ce.setAttribute("viewBox","0 0 "+mt.viewBox.baseVal.width.toString()+" "+mt.viewBox.baseVal.height.toString()),Ce.innerHTML=mt.innerHTML,Et.naturalSize===!0?(Ce.width.baseVal.value=Ft.naturalWidth,Ce.height.baseVal.value=Ft.naturalHeight):Et.width!==void 0&&Et.height!==void 0&&(Ce.width.baseVal.value=Et.width,Ce.height.baseVal.value=Et.height),_t.width=Ce.width.baseVal.value,_t.height=Ce.height.baseVal.value;var Ze=Ce.outerHTML,Bn=_t.getContext("2d");Et.markersOnly!==!0&&Bn.drawImage(Ft,0,0,_t.width,_t.height);var ze=window.URL,Ue=new Image(_t.width,_t.height);Ue.setAttribute("crossOrigin","anonymous");var Xe=new Blob([Ze],{type:"image/svg+xml"}),dn=ze.createObjectURL(Xe);Ue.onload=function(){Bn.drawImage(Ue,0,0),ze.revokeObjectURL(dn);var Kn=_t.toDataURL(Et.imageType,Et.imageQuality);Ct(Kn)},Ue.src=dn})},zt}(),he=function(){},Gt=function(){function zt(Ft){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ft+"_"}return Object.defineProperty(zt.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(zt.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(zt.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),zt.prototype.addClass=function(Ft){return this.styleSheet===void 0&&this.addStyleSheet(),Ft.name=""+this.classNamePrefix+Ft.localName,this.classes.push(Ft),this.styleSheet.sheet.insertRule("."+Ft.name+" {"+Ft.style+"}",this.styleSheet.sheet.cssRules.length),Ft},zt.prototype.addRule=function(Ft){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ft),this.styleSheet.sheet.insertRule(Ft.selector+" {"+Ft.style+"}",this.styleSheet.sheet.cssRules.length)},zt.prototype.addStyleSheet=function(){var Ft;this.styleSheet=document.createElement("style"),((Ft=this.styleSheetRoot)!==null&&Ft!==void 0?Ft:document.head).appendChild(this.styleSheet),this.addRule(new Ie("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
from {
opacity: 0;
}
to {
opacity: 1;
}
`)),this.addRule(new Ie("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
from {
opacity: 1;
}
to {
opacity: 0;
}
`)),this.addClass(new Xt("fade_in",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
`)),this.addClass(new Xt("fade_out",`
animation-duration: 0.3s;
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
`))},zt.prototype.removeStyleSheet=function(){var Ft;this.styleSheet&&(((Ft=this.styleSheetRoot)!==null&&Ft!==void 0?Ft:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},zt}(),Ie=function(zt,Ft){this.selector=zt,this.style=Ft},Xt=function(zt,Ft){this.localName=zt,this.style=Ft},Me=function(){function zt(Ft,mt,vt,Et,Ct){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ft,this.displayMode=mt,this.markerItems=vt,this.uiStyleSettings=Et,this.styles=Ct,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return zt.prototype.show=function(Ft){var mt=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ft,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var vt=document.createElement("div");vt.className=this.toolbarBlockStyleClass.name,vt.style.whiteSpace="nowrap",this.uiContainer.appendChild(vt),this.addActionButton(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(vt,'<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(Ct){var _t=document.createElement("div");_t.className=""+mt.toolbarButtonStyleClass.name,_t.setAttribute("data-type-name",Ct.typeName),_t.innerHTML=Ct.icon,_t.addEventListener("click",function(){mt.markerToolbarButtonClicked(_t,Ct)}),mt.buttons.push(_t),mt.markerButtons.push(_t)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<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 Et=document.createElement("div");Et.className=this.toolbarBlockStyleClass.name,Et.style.whiteSpace="nowrap",Et.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Et),this.addActionButton(Et,'<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(Et,'<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()},zt.prototype.addButtonClickListener=function(Ft){this.buttonClickListeners.push(Ft)},zt.prototype.removeButtonClickListener=function(Ft){this.buttonClickListeners.indexOf(Ft)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ft),1)},zt.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},zt.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ft=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var mt=0;mt<this.markerButtons.length;mt++)mt<Ft||mt===Ft&&this.markerButtons.length-1===Ft?this.markerButtonBlock.appendChild(this.markerButtons[mt]):(mt===Ft&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[mt]))}},zt.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")},zt.prototype.resetButtonStyles=function(){var Ft=this;this.buttons.forEach(function(mt){mt.className=mt.className.replace(Ft.uiStyleSettings.toolbarButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarButtonStyleColorsClassName:Ft.toolbarButtonStyleColorsClass.name,"").trim(),mt.className=mt.className.replace(Ft.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ft.toolbarActiveButtonStyleColorsClass.name,"").trim(),mt.className+=" "+(Ft.uiStyleSettings.toolbarButtonStyleColorsClassName?Ft.uiStyleSettings.toolbarButtonStyleColorsClassName:Ft.toolbarButtonStyleColorsClass.name)})},zt.prototype.addActionButton=function(Ft,mt,vt){var Et=this,Ct=document.createElement("div");switch(Ct.className=""+this.toolbarButtonStyleClass.name,Ct.innerHTML=mt,Ct.setAttribute("data-action",vt),Ct.addEventListener("click",function(){Et.actionToolbarButtonClicked(Ct,vt)}),vt){case"select":Ct.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ct.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ct.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ct.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ct.style.fill=this.uiStyleSettings.closeButtonColor}Ft.appendChild(Ct),this.buttons.push(Ct)},zt.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new Xt("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 Xt("toolbar_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
`)),this.toolbarBlockStyleClass=this.styles.addClass(new Xt("toolbar-block",`
display: inline-block;
box-sizing: content-box;
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new Xt("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 Xt("toolbar-overflow-block_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`));var Ft=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new Xt("toolbar_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*Ft)+`px;
padding: `+Ft+`px;
box-sizing: content-box;
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new Xt("toolbar_active_button",`
fill: `+this.uiStyleSettings.toolbarColor+`;
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`)),this.styles.addRule(new Ie("."+this.toolbarButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`))},zt.prototype.markerToolbarButtonClicked=function(Ft,mt){this.setActiveButton(Ft),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("marker",mt)}),this.markerButtonOverflowBlock.style.display="none"},zt.prototype.actionToolbarButtonClicked=function(Ft,mt){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(vt){return vt("action",mt)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},zt.prototype.setActiveButton=function(Ft){this.resetButtonStyles(),Ft.className=Ft.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ft.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},zt.prototype.setActiveMarkerButton=function(Ft){var mt=this.markerButtons.find(function(vt){return vt.getAttribute("data-type-name")===Ft});mt&&this.setActiveButton(mt)},zt.prototype.setCurrentMarker=function(Ft){var mt=this;this.currentMarker=Ft,this.buttons.filter(function(vt){return/delete|notes/.test(vt.getAttribute("data-action"))}).forEach(function(vt){mt.currentMarker===void 0?(vt.style.fillOpacity="0.4",vt.style.pointerEvents="none"):(vt.style.fillOpacity="1",vt.style.pointerEvents="all")})},zt}(),Qt=function(){function zt(Ft,mt,vt,Et){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ft,this.displayMode=mt,this.uiStyleSettings=vt,this.styles=Et,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return zt.prototype.addStyles=function(){var Ft;this.toolboxStyleClass=this.styles.addClass(new Xt("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 Xt("toolbox_colors",`
color: `+this.uiStyleSettings.toolboxColor+`;
`));var mt=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new Xt("toolbox-button-row",`
display: flex;
cursor: default;
box-sizing: content-box;
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new Xt("toolbox-button-row_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new Xt("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 Xt("toolbox-panel-row_colors",`
background-color: `+((Ft=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ft!==void 0?Ft:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
`)),this.toolboxButtonStyleClass=this.styles.addClass(new Xt("toolbox_button",`
display: inline-block;
width: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
height: `+(this.uiStyleSettings.toolbarHeight-2*mt)+`px;
padding: `+mt+`px;
box-sizing: content-box;
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new Xt("toolbox-button_colors",`
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new Xt("toolbox-active-button_colors",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
fill: `+this.uiStyleSettings.toolbarColor+`;
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleColorsClass.name+":hover",`
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
`)),this.styles.addRule(new Ie("."+this.toolboxButtonStyleClass.name+" svg",`
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
`))},zt.prototype.show=function(Ft){var mt;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ft,this.uiContainer.className=this.toolboxStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},zt.prototype.setPanelButtons=function(Ft){var mt,vt,Et=this;this.panels=Ft,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((mt=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&mt!==void 0?mt:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((vt=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&vt!==void 0?vt:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ct){var _t;Ct.uiStyleSettings=Et.uiStyleSettings;var Ce=document.createElement("div");Ce.className=Et.toolboxButtonStyleClass.name+" "+((_t=Et.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&_t!==void 0?_t:Et.toolboxButtonStyleColorsClass.name),Ce.innerHTML=Ct.icon,Ce.title=Ct.title,Ce.addEventListener("click",function(){Et.panelButtonClick(Ct)}),Et.panelButtons.push(Ce),Et.buttonRow.appendChild(Ce)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},zt.prototype.panelButtonClick=function(Ft){var mt=this,vt=-1;if(Ft!==this.activePanel){vt=this.panels.indexOf(Ft),this.panelRow.innerHTML="";var Et=Ft.getUi();Et.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Et),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=Ft}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){mt.displayMode==="inline"?mt.panelRow.style.display="none":mt.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ct,_t){var Ce,Ze;Ct.className=mt.toolboxButtonStyleClass.name+" "+(_t===vt?""+((Ce=mt.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&Ce!==void 0?Ce:mt.toolboxActiveButtonStyleColorsClass.name):""+((Ze=mt.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Ze!==void 0?Ze:mt.toolboxButtonStyleColorsClass.name))})},zt}(),nt=function(zt,Ft){this.title=zt,this.icon=Ft},et=function(zt){function Ft(mt,vt,Et,Ct){var _t=zt.call(this,mt,Ct||'<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 _t.colors=[],_t.addTransparent=!1,_t.colorBoxes=[],_t.colors=vt,_t.currentColor=Et,_t.setCurrentColor=_t.setCurrentColor.bind(_t),_t.getColorBox=_t.getColorBox.bind(_t),_t}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.whiteSpace="nowrap",this.colors.forEach(function(Et){var Ct=mt.getColorBox(Et);vt.appendChild(Ct),mt.colorBoxes.push(Ct)}),vt},Ft.prototype.getColorBox=function(mt){var vt=this,Et=this.uiStyleSettings.toolbarHeight/4,Ct=this.uiStyleSettings.toolbarHeight-Et,_t=document.createElement("div");_t.style.display="inline-block",_t.style.boxSizing="content-box",_t.style.width=Ct-2+"px",_t.style.height=Ct-2+"px",_t.style.padding="1px",_t.style.marginRight="2px",_t.style.marginBottom="2px",_t.style.borderWidth="2px",_t.style.borderStyle="solid",_t.style.borderRadius=(Ct+2)/2+"px",_t.style.borderColor=mt===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",_t.addEventListener("click",function(){vt.setCurrentColor(mt,_t)});var Ce=document.createElement("div");return Ce.style.display="inline-block",Ce.style.width=Ct-2+"px",Ce.style.height=Ct-2+"px",Ce.style.backgroundColor=mt,Ce.style.borderRadius=Ct/2+"px",mt==="transparent"&&(Ce.style.fill=this.uiStyleSettings.toolboxAccentColor,Ce.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>`),_t.appendChild(Ce),_t},Ft.prototype.setCurrentColor=function(mt,vt){var Et=this;this.currentColor=mt,this.colorBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(mt)},Ft}(nt),At=function(){function zt(Ft,mt,vt){this._state="new",this._isSelected=!1,this._container=Ft,this._overlayContainer=mt,this.globalSettings=vt,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(zt.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),zt.prototype.ownsTarget=function(Ft){return!1},Object.defineProperty(zt.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),zt.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},zt.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},zt.prototype.pointerDown=function(Ft,mt){},zt.prototype.dblClick=function(Ft,mt){},zt.prototype.manipulate=function(Ft){},zt.prototype.pointerUp=function(Ft){this.stateChanged()},zt.prototype.dispose=function(){},zt.prototype.addMarkerVisualToContainer=function(Ft){this.container.childNodes.length>0?this.container.insertBefore(Ft,this.container.childNodes[0]):this.container.appendChild(Ft)},zt.prototype.getState=function(){return{typeName:zt.typeName,state:this.state,notes:this.notes}},zt.prototype.restoreState=function(Ft){this._state=Ft.state,this.notes=Ft.notes},zt.prototype.scale=function(Ft,mt){},zt.prototype.colorChanged=function(Ft){this.onColorChanged&&this.onColorChanged(Ft),this.stateChanged()},zt.prototype.fillColorChanged=function(Ft){this.onFillColorChanged&&this.onFillColorChanged(Ft),this.stateChanged()},zt.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ft=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ft.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ft)&&this.onStateChanged(this)}},zt.typeName="MarkerBase",zt}(),at=function(){function zt(){this.findGripByVisual=this.findGripByVisual.bind(this)}return zt.prototype.findGripByVisual=function(Ft){return this.topLeft.ownsTarget(Ft)?this.topLeft:this.topCenter.ownsTarget(Ft)?this.topCenter:this.topRight.ownsTarget(Ft)?this.topRight:this.centerLeft.ownsTarget(Ft)?this.centerLeft:this.centerRight.ownsTarget(Ft)?this.centerRight:this.bottomLeft.ownsTarget(Ft)?this.bottomLeft:this.bottomCenter.ownsTarget(Ft)?this.bottomCenter:this.bottomRight.ownsTarget(Ft)?this.bottomRight:void 0},zt}(),dt=function(){function zt(){this.GRIP_SIZE=10,this.visual=Ht.createGroup(),this.visual.appendChild(Ht.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(Ht.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return zt.prototype.ownsTarget=function(Ft){return Ft===this.visual||Ft===this.visual.childNodes[0]||Ft===this.visual.childNodes[1]},zt}(),gt=function(){function zt(){}return zt.toITransformMatrix=function(Ft){return{a:Ft.a,b:Ft.b,c:Ft.c,d:Ft.d,e:Ft.e,f:Ft.f}},zt.toSVGMatrix=function(Ft,mt){return Ft.a=mt.a,Ft.b=mt.b,Ft.c=mt.c,Ft.d=mt.d,Ft.e=mt.e,Ft.f=mt.f,Ft},zt}(),xt=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.left=0,Ct.top=0,Ct.width=0,Ct.height=0,Ct.defaultSize={x:50,y:20},Ct.offsetX=0,Ct.offsetY=0,Ct.rotationAngle=0,Ct.CB_DISTANCE=10,Ct._suppressMarkerCreateEvent=!1,Ct.container.transform.baseVal.appendItem(Ht.createTransform()),Ct.setupControlBox(),Ct}return Wt(Ft,zt),Object.defineProperty(Ft.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ft.prototype,"visual",{get:function(){return this._visual},set:function(mt){this._visual=mt;var vt=Ht.createTransform();this._visual.transform.baseVal.appendItem(vt)},enumerable:!1,configurable:!0}),Ft.prototype.ownsTarget=function(mt){return!!zt.prototype.ownsTarget.call(this,mt)||!!(this.controlGrips.findGripByVisual(mt)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(mt))},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.left=mt.x,this.top=mt.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Et=this.unrotatePoint(mt);if(this.manipulationStartX=Et.x,this.manipulationStartY=Et.y,this.offsetX=Et.x-this.left,this.offsetY=Et.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(vt),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(vt)){this.activeGrip=this.rotatorGrip;var Ct=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ct.x-this.width/2,this.top=Ct.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var _t=this.container.transform.baseVal.getItem(0);_t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(_t,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ft.prototype.pointerUp=function(mt){var vt=this.state;zt.prototype.pointerUp.call(this,mt),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ft.prototype.moveVisual=function(mt){this.visual.style.transform="translate("+mt.x+"px, "+mt.y+"px)"},Ft.prototype.manipulate=function(mt){var vt=this.unrotatePoint(mt);this.state==="creating"?this.resize(mt):this.state==="move"?(this.left=this.manipulationStartLeft+(vt.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(vt.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(vt):this.state==="rotate"&&this.rotate(mt)},Ft.prototype.resize=function(mt){var vt=this.manipulationStartLeft,Et=this.manipulationStartWidth,Ct=this.manipulationStartTop,_t=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:vt=this.manipulationStartLeft+mt.x-this.manipulationStartX,Et=this.manipulationStartWidth+this.manipulationStartLeft-vt;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Et=this.manipulationStartWidth+mt.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ct=this.manipulationStartTop+mt.y-this.manipulationStartY,_t=this.manipulationStartHeight+this.manipulationStartTop-Ct;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:_t=this.manipulationStartHeight+mt.y-this.manipulationStartY}Et>=0?(this.left=vt,this.width=Et):(this.left=vt+Et,this.width=-Et),_t>=0?(this.top=Ct,this.height=_t):(this.top=Ct+_t,this.height=-_t),this.setSize()},Ft.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ft.prototype.rotate=function(mt){if(Math.abs(mt.x-this.centerX)>.1){var vt=Math.sign(mt.x-this.centerX);this.rotationAngle=180*Math.atan((mt.y-this.centerY)/(mt.x-this.centerX))/Math.PI+90*vt,this.applyRotation()}},Ft.prototype.applyRotation=function(){var mt=this.container.transform.baseVal.getItem(0);mt.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(mt,0)},Ft.prototype.rotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM(),Et=Ht.createPoint(mt.x,mt.y);return{x:(Et=Et.matrixTransform(vt)).x,y:Et.y}},Ft.prototype.unrotatePoint=function(mt){if(this.rotationAngle===0)return mt;var vt=this.container.getCTM();vt=vt.inverse();var Et=Ht.createPoint(mt.x,mt.y);return{x:(Et=Et.matrixTransform(vt)).x,y:Et.y}},Ft.prototype.select=function(){zt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ft.prototype.deselect=function(){zt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ft.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup();var mt=Ht.createTransform();mt.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(mt),this.container.appendChild(this.controlBox),this.controlRect=Ht.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=Ht.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 at,this.addControlGrips(),this.controlBox.style.display="none"},Ft.prototype.adjustControlBox=function(){var mt=this.controlBox.transform.baseVal.getItem(0);mt.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(mt,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()},Ft.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()},Ft.prototype.createGrip=function(){var mt=new dt;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Ft.prototype.positionGrips=function(){var mt=this.controlGrips.topLeft.GRIP_SIZE,vt=-mt/2,Et=vt,Ct=(this.width+this.CB_DISTANCE)/2-mt/2,_t=(this.height+this.CB_DISTANCE)/2-mt/2,Ce=this.height+this.CB_DISTANCE-mt/2,Ze=this.width+this.CB_DISTANCE-mt/2;this.positionGrip(this.controlGrips.topLeft.visual,vt,Et),this.positionGrip(this.controlGrips.topCenter.visual,Ct,Et),this.positionGrip(this.controlGrips.topRight.visual,Ze,Et),this.positionGrip(this.controlGrips.centerLeft.visual,vt,_t),this.positionGrip(this.controlGrips.centerRight.visual,Ze,_t),this.positionGrip(this.controlGrips.bottomLeft.visual,vt,Ce),this.positionGrip(this.controlGrips.bottomCenter.visual,Ct,Ce),this.positionGrip(this.controlGrips.bottomRight.visual,Ze,Ce),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ct,Et-3*this.CB_DISTANCE)},Ft.prototype.positionGrip=function(mt,vt,Et){var Ct=mt.transform.baseVal.getItem(0);Ct.setTranslate(vt,Et),mt.transform.baseVal.replaceItem(Ct,0)},Ft.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ft.prototype.showControlBox=function(){this.controlBox.style.display=""},Ft.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:gt.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:gt.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},zt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt);var vt=mt;this.left=vt.left,this.top=vt.top,this.width=vt.width,this.height=vt.height,this.rotationAngle=vt.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,vt.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(gt.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,vt.containerTransformMatrix))},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt);var Et=this.rotatePoint({x:this.left,y:this.top}),Ct=this.unrotatePoint({x:Et.x*mt,y:Et.y*vt});this.left=Ct.x,this.top=Ct.y,this.width=this.width*mt,this.height=this.height*vt,this.adjustControlBox()},Ft}(At),bt=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.opacity=1,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Ft.prototype.createVisual=function(){this.visual=Ht.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)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){zt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.setSize=function(){zt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ft.prototype.pointerUp=function(mt){zt.prototype.pointerUp.call(this,mt),this.setSize()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ft.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},zt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),zt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.title="Rectangle marker",Ft}(xt),Ut=function(zt){function Ft(mt,vt,Et,Ct){var _t=zt.call(this,mt,Ct||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return _t.widths=[],_t.widthBoxes=[],_t.widths=vt,_t.currentWidth=Et,_t.setCurrentWidth=_t.setCurrentWidth.bind(_t),_t}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.widths.forEach(function(Et){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.flexGrow="2",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=Et===mt.currentWidth?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentWidth(Et,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.innerText=Et.toString(),_t.style.marginRight="5px",Ct.appendChild(_t);var Ce=document.createElement("div");Ce.style.minHeight="20px",Ce.style.flexGrow="2",Ce.style.display="flex",Ce.style.alignItems="center";var Ze=document.createElement("hr");Ze.style.minWidth="20px",Ze.style.border="0px",Ze.style.borderTop=Et+"px solid "+mt.uiStyleSettings.toolboxColor,Ze.style.flexGrow="2",Ce.appendChild(Ze),Ct.appendChild(Ce),mt.widthBoxes.push(Ct)}),vt},Ft.prototype.setCurrentWidth=function(mt,vt){var Et=this;this.currentWidth=mt,this.widthBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ft}(nt),Rt=function(zt){function Ft(mt,vt,Et,Ct){var _t=zt.call(this,mt,Ct||'<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 _t.styles=[],_t.styleBoxes=[],_t.styles=vt,_t.currentStyle=Et,_t.setCurrentStyle=_t.setCurrentStyle.bind(_t),_t}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",this.styles.forEach(function(Et){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.overflow="hidden",Ct.style.maxWidth=100/mt.styles.length-5+"%",Ct.style.borderColor=Et===mt.currentStyle?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentStyle(Et,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.overflow="hidden";var Ce=`<svg width="100" height="20">
<line x1="0" y1="10" x2="100" y2="10" stroke="`+mt.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Et!==""?'stroke-dasharray="'+Et+'"':"")+` />
</svg>`;_t.innerHTML=Ce,Ct.appendChild(_t),mt.styleBoxes.push(Ct)}),vt},Ft.prototype.setCurrentStyle=function(mt,vt){var Et=this;this.currentStyle=mt,this.styleBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ft}(nt),Zt=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.strokeColor=Et.defaultColor,Ct.strokeWidth=Et.defaultStrokeWidth,Ct.strokeDasharray=Et.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Et.defaultColorSet,Et.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Rt("Line style",Et.defaultStrokeDasharrays,Et.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Wt(Ft,zt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=zt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="FrameMarker",Ft.title="Frame marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ft}(bt),Yt=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"},te=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.x1=0,Ct.y1=0,Ct.x2=0,Ct.y2=0,Ct.defaultLength=50,Ct.manipulationStartX=0,Ct.manipulationStartY=0,Ct.manipulationStartX1=0,Ct.manipulationStartY1=0,Ct.manipulationStartX2=0,Ct.manipulationStartY2=0,Ct.setupControlBox(),Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!!zt.prototype.ownsTarget.call(this,mt)||!(!this.grip1.ownsTarget(mt)&&!this.grip2.ownsTarget(mt))},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartX=mt.x,this.manipulationStartY=mt.y,this.state==="new"&&(this.x1=mt.x,this.y1=mt.y,this.x2=mt.x,this.y2=mt.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(vt)?this.activeGrip=this.grip1:this.grip2.ownsTarget(vt)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ft.prototype.pointerUp=function(mt){var vt=this.state;zt.prototype.pointerUp.call(this,mt),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(mt),this._state="select",vt==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ft.prototype.adjustVisual=function(){},Ft.prototype.manipulate=function(mt){this.state==="creating"?this.resize(mt):this.state==="move"?(this.x1=this.manipulationStartX1+mt.x-this.manipulationStartX,this.y1=this.manipulationStartY1+mt.y-this.manipulationStartY,this.x2=this.manipulationStartX2+mt.x-this.manipulationStartX,this.y2=this.manipulationStartY2+mt.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(mt)},Ft.prototype.resize=function(mt){switch(this.activeGrip){case this.grip1:this.x1=mt.x,this.y1=mt.y;break;case this.grip2:case void 0:this.x2=mt.x,this.y2=mt.y}this.adjustVisual(),this.adjustControlBox()},Ft.prototype.select=function(){zt.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ft.prototype.deselect=function(){zt.prototype.deselect.call(this),this.controlBox.style.display="none"},Ft.prototype.setupControlBox=function(){this.controlBox=Ht.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ft.prototype.adjustControlBox=function(){this.positionGrips()},Ft.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ft.prototype.createGrip=function(){var mt=new dt;return mt.visual.transform.baseVal.appendItem(Ht.createTransform()),this.controlBox.appendChild(mt.visual),mt},Ft.prototype.positionGrips=function(){var mt=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-mt/2,this.y1-mt/2),this.positionGrip(this.grip2.visual,this.x2-mt/2,this.y2-mt/2)},Ft.prototype.positionGrip=function(mt,vt,Et){var Ct=mt.transform.baseVal.getItem(0);Ct.setTranslate(vt,Et),mt.transform.baseVal.replaceItem(Ct,0)},Ft.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},zt.prototype.getState.call(this))},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt);var vt=mt;this.x1=vt.x1,this.y1=vt.y1,this.x2=vt.x2,this.y2=vt.y2},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.x1=this.x1*mt,this.y1=this.y1*vt,this.x2=this.x2*mt,this.y2=this.y2*vt,this.adjustVisual(),this.adjustControlBox()},Ft}(At),ye=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.strokeColor=Et.defaultColor,Ct.strokeWidth=Et.defaultStrokeWidth,Ct.strokeDasharray=Et.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Et.defaultColorSet,Et.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Rt("Line style",Et.defaultStrokeDasharrays,Et.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorLine&&mt!==this.visibleLine)},Ft.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorLine=Ht.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=Ht.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)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ft.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()),Ht.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.createVisual(),this.adjustVisual()},Ft.typeName="LineMarker",Ft.title="Line marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ft}(te),fe=function(zt){function Ft(mt,vt,Et,Ct){var _t=zt.call(this,mt,Ct||'<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 _t.fonts=[],_t.fontBoxes=[],_t.fonts=vt,_t.currentFont=Et,_t.setCurrentFont=_t.setCurrentFont.bind(_t),_t}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.overflow="hidden",vt.style.flexGrow="2",this.fonts.forEach(function(Et){var Ct=document.createElement("div");Ct.style.display="inline-block",Ct.style.alignItems="center",Ct.style.justifyContent="space-between",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.overflow="hidden",Ct.style.maxWidth=100/mt.fonts.length-5+"%",Ct.style.borderColor=Et===mt.currentFont?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentFont(Et,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.style.display="flex",_t.style.minHeight="20px",_t.style.flexGrow="2",_t.style.fontFamily=Et,_t.style.overflow="hidden";var Ce=document.createElement("div");Ce.style.whiteSpace="nowrap",Ce.style.overflow="hidden",Ce.style.textOverflow="ellipsis",Ce.innerHTML="The quick brown fox jumps over the lazy dog",_t.appendChild(Ce),Ct.appendChild(_t),mt.fontBoxes.push(Ct)}),vt},Ft.prototype.setCurrentFont=function(mt,vt){var Et=this;this.currentFont=mt,this.fontBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ft}(nt),Ke=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.color="transparent",Ct.padding=5,Ct.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ct.text=Ct.DEFAULT_TEXT,Ct.isMoved=!1,Ct.color=Et.defaultColor,Ct.fontFamily=Et.defaultFontFamily,Ct.defaultSize={x:100,y:30},Ct.setColor=Ct.setColor.bind(Ct),Ct.setFont=Ct.setFont.bind(Ct),Ct.renderText=Ct.renderText.bind(Ct),Ct.sizeText=Ct.sizeText.bind(Ct),Ct.textEditDivClicked=Ct.textEditDivClicked.bind(Ct),Ct.showTextEditor=Ct.showTextEditor.bind(Ct),Ct.setSize=Ct.setSize.bind(Ct),Ct.positionTextEditor=Ct.positionTextEditor.bind(Ct),Ct.colorPanel=new et("Color",Et.defaultColorSet,Et.defaultColor),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.fontFamilyPanel=new fe("Font",Et.defaultFontFamilies,Et.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){if(zt.prototype.ownsTarget.call(this,mt)||mt===this.visual||mt===this.textElement||mt===this.bgRectangle)return!0;var vt=!1;return this.textElement.childNodes.forEach(function(Et){Et===mt&&(vt=!0)}),vt},Ft.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.bgRectangle=Ht.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=Ht.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.textElement.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.renderText=function(){var mt=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(vt){mt.textElement.appendChild(Ht.createTSpan(vt.trim()===""?" ":vt.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ft.prototype.getTextScale=function(){var mt=this.textElement.getBBox(),vt=1;if(mt.width>0&&mt.height>0){var Et=(1*this.width-this.width*this.padding*2/100)/mt.width,Ct=(1*this.height-this.height*this.padding*2/100)/mt.height;vt=Math.min(Et,Ct)}return vt},Ft.prototype.getTextPosition=function(mt){var vt=this.textElement.getBBox(),Et=0,Ct=0;return vt.width>0&&vt.height>0&&(Et=(this.width-vt.width*mt)/2,Ct=this.height/2-vt.height*mt/2),{x:Et,y:Ct}},Ft.prototype.sizeText=function(){var mt=this.textElement.getBBox(),vt=this.getTextScale(),Et=this.getTextPosition(vt);Et.y-=mt.y*vt,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Et.x+"px, "+Et.y+"px) scale("+vt+", "+vt+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Et.x,Et.y),this.textElement.transform.baseVal.getItem(1).setScale(vt,vt))},Ft.prototype.manipulate=function(mt){zt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),this.isMoved=!0,this.setSize(),this.sizeText()},Ft.prototype.setSize=function(){zt.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ft.prototype.pointerUp=function(mt){var vt=this.state;vt==="creating"&&(this._suppressMarkerCreateEvent=!0),zt.prototype.pointerUp.call(this,mt),this.setSize(),(vt==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ft.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var vt=Number.parseFloat(mt.textEditor.style.fontSize);mt.textEditor.clientWidth>=Number.parseInt(mt.textEditor.style.maxWidth)&&vt>.9;)vt-=.1,mt.textEditor.style.fontSize=Math.max(vt,.9)+"em"}),this.textEditor.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(vt){if(vt.clipboardData){var Et=vt.clipboardData.getData("text"),Ct=window.getSelection();if(!Ct.rangeCount)return!1;Ct.deleteFromDocument(),Ct.getRangeAt(0).insertNode(document.createTextNode(Et)),vt.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){mt.textEditDivClicked(mt.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ft.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var mt=this.getTextScale(),vt=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Et=this.textElement.getBBox(),Ct={x:Et.width*mt,y:Et.height*mt};vt.x-=Ct.x/2,vt.y-=Ct.y/2,this.textEditor.style.top=vt.y+"px",this.textEditor.style.left=vt.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-vt.x+"px",this.textEditor.style.fontSize=Math.max(16*mt,12)+"px",this.textElement.style.display="none"}},Ft.prototype.textEditDivClicked=function(mt){this.text=mt.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ft.prototype.select=function(){zt.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ft.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),zt.prototype.deselect.call(this)},Ft.prototype.dblClick=function(mt,vt){zt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Ft.prototype.setColor=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["fill",mt]]),this.color=mt,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(mt)},Ft.prototype.setFont=function(mt){this.textElement&&Ht.setAttributes(this.textElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ft.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ft.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.color=vt.color,this.fontFamily=vt.fontFamily,this.padding=vt.padding,this.text=vt.text,this.createVisual(),zt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.setSize(),this.sizeText(),this.positionTextEditor()},Ft.typeName="TextMarker",Ft.title="Text marker",Ft.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>',Ft}(xt),_e=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.color="transparent",Ct.lineWidth=3,Ct.drawing=!1,Ct.pixelRatio=1,Ct.color=Et.defaultColor,Ct.lineWidth=Et.defaultStrokeWidth,Ct.pixelRatio=Et.freehandPixelRatio,Ct.setColor=Ct.setColor.bind(Ct),Ct.addCanvas=Ct.addCanvas.bind(Ct),Ct.finishCreation=Ct.finishCreation.bind(Ct),Ct.setLineWidth=Ct.setLineWidth.bind(Ct),Ct.colorPanel=new et("Color",Et.defaultColorSet,Et.defaultColor),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.lineWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.lineWidthPanel.onWidthChanged=Ct.setLineWidth,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.drawingImage)},Ft.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.drawingImage=Ht.createImage(),this.visual.appendChild(this.drawingImage);var mt=Ht.createTransform();this.visual.transform.baseVal.appendItem(mt),this.addMarkerVisualToContainer(this.visual)},Ft.prototype.pointerDown=function(mt,vt){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(mt.x,mt.y),this.drawing=!0):zt.prototype.pointerDown.call(this,mt,vt)},Ft.prototype.manipulate=function(mt){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(mt.x,mt.y),this.canvasContext.stroke()):zt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),Ht.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ft.prototype.pointerUp=function(mt){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):zt.prototype.pointerUp.call(this,mt)},Ft.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)},Ft.prototype.select=function(){this.state==="creating"&&this.finishCreation(),zt.prototype.select.call(this)},Ft.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),zt.prototype.deselect.call(this)},Ft.prototype.finishCreation=function(){for(var mt=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),vt=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Et=vt[0],Ct=vt[1],_t=vt[2],Ce=vt[3],Ze=!1,Bn=0;Bn<this.canvasElement.height;Bn++)for(var ze=0;ze<this.canvasElement.width;ze++)mt.data[Bn*this.canvasElement.width*4+4*ze+3]>0&&(Ze=!0,Bn<Ct&&(Ct=Bn),ze<Et&&(Et=ze),Bn>Ce&&(Ce=Bn),ze>_t&&(_t=ze));if(Ze){this.left=Et/this.pixelRatio,this.top=Ct/this.pixelRatio,this.width=(_t-Et)/this.pixelRatio,this.height=(Ce-Ct)/this.pixelRatio;var Ue=document.createElement("canvas");Ue.width=_t-Et,Ue.height=Ce-Ct,Ue.getContext("2d").putImageData(this.canvasContext.getImageData(Et,Ct,_t-Et,Ce-Ct),0,0),this.drawingImgUrl=Ue.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ft.prototype.setDrawingImage=function(){Ht.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),Ht.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ft.prototype.setColor=function(mt){this.color=mt,this.colorChanged(mt)},Ft.prototype.setLineWidth=function(mt){this.lineWidth=mt},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({drawingImgUrl:this.drawingImgUrl},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){this.createVisual(),zt.prototype.restoreState.call(this,mt),this.drawingImgUrl=mt.drawingImgUrl,this.setDrawingImage()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.setDrawingImage()},Ft.typeName="FreehandMarker",Ft.title="Freehand marker",Ft.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>',Ft}(xt),nn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,Et||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ct.typeBoxes=[],Ct.currentType=vt,Ct.setCurrentType=Ct.setCurrentType.bind(Ct),Ct}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2";for(var Et=function(Ce){var Ze="both";switch(Ce){case 0:Ze="both";break;case 1:Ze="start";break;case 2:Ze="end";break;case 3:Ze="none"}var Bn=document.createElement("div");if(Bn.style.display="flex",Bn.style.flexGrow="2",Bn.style.alignItems="center",Bn.style.justifyContent="space-between",Bn.style.padding="5px",Bn.style.borderWidth="2px",Bn.style.borderStyle="solid",Bn.style.borderColor=Ze===Ct.currentType?Ct.uiStyleSettings.toolboxAccentColor:"transparent",Bn.addEventListener("click",function(){mt.setCurrentType(Ze,Bn)}),vt.appendChild(Bn),Ze==="both"||Ze==="start"){var ze=document.createElement("div");ze.style.display="flex",ze.style.alignItems="center",ze.style.minHeight="20px",ze.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="`+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,ze.style.marginLeft="5px",Bn.appendChild(ze)}var Ue=document.createElement("div");Ue.style.display="flex",Ue.style.alignItems="center",Ue.style.minHeight="20px",Ue.style.flexGrow="2";var Xe=document.createElement("hr");if(Xe.style.minWidth="20px",Xe.style.border="0px",Xe.style.borderTop="3px solid "+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee"),Xe.style.flexGrow="2",Ue.appendChild(Xe),Bn.appendChild(Ue),Ze==="both"||Ze==="end"){var dn=document.createElement("div");dn.style.display="flex",dn.style.alignItems="center",dn.style.minHeight="20px",dn.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
<polygon points="0,0 10,5 0,10" fill="`+(Ct.uiStyleSettings!==void 0?Ct.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
</svg>`,dn.style.marginRight="5px",Bn.appendChild(dn)}Ct.typeBoxes.push(Bn)},Ct=this,_t=0;_t<4;_t++)Et(_t);return vt},Ft.prototype.setCurrentType=function(mt,vt){var Et=this;this.currentType=mt,this.typeBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings!==void 0?Et.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ft}(nt),fn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.arrowType="end",Ct.arrowBaseHeight=10,Ct.arrowBaseWidth=10,Ct.getArrowPoints=Ct.getArrowPoints.bind(Ct),Ct.setArrowType=Ct.setArrowType.bind(Ct),Ct.arrowTypePanel=new nn("Arrow type","end"),Ct.arrowTypePanel.onArrowTypeChanged=Ct.setArrowType,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.arrow1&&mt!==this.arrow2)},Ft.prototype.getArrowPoints=function(mt,vt){var Et=this.arrowBaseWidth+2*this.strokeWidth,Ct=this.arrowBaseHeight+2*this.strokeWidth;return mt-Et/2+","+(vt+Ct/2)+" "+mt+","+(vt-Ct/2)+" "+(mt+Et/2)+","+(vt+Ct/2)},Ft.prototype.createTips=function(){this.arrow1=Ht.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=Ht.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(Ht.createTransform()),this.visual.appendChild(this.arrow2)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Ft.prototype.adjustVisual=function(){if(zt.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",Ht.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),Ht.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var mt=0;Math.abs(this.x1-this.x2)>.1&&(mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var vt=this.arrow1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(vt,0);var Et=this.arrow2.transform.baseVal.getItem(0);Et.setRotate(mt+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Et,0)}},Ft.prototype.setArrowType=function(mt){this.arrowType=mt,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({arrowType:this.arrowType},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt);var vt=mt;this.arrowType=vt.arrowType,this.createTips(),this.adjustVisual()},Ft.typeName="ArrowMarker",Ft.title="Arrow marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ft}(ye),xn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.fillColor=Et.defaultFillColor,Ct.strokeWidth=0,Ct.fillPanel=new et("Color",Et.defaultColorSet,Et.defaultFillColor),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct}return Wt(Ft,zt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=zt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="CoverMarker",Ft.title="Cover marker",Ft.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ft}(bt),_n=function(zt){function Ft(mt,vt,Et,Ct){var _t=zt.call(this,mt,Ct||'<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 _t.opacities=[],_t.opacityBoxes=[],_t.opacities=vt,_t.currentOpacity=Et,_t.setCurrentOpacity=_t.setCurrentOpacity.bind(_t),_t}return Wt(Ft,zt),Ft.prototype.getUi=function(){var mt=this,vt=document.createElement("div");return vt.style.display="flex",vt.style.overflow="hidden",vt.style.flexGrow="2",vt.style.justifyContent="space-between",this.opacities.forEach(function(Et){var Ct=document.createElement("div");Ct.style.display="flex",Ct.style.alignItems="center",Ct.style.justifyContent="center",Ct.style.padding="5px",Ct.style.borderWidth="2px",Ct.style.borderStyle="solid",Ct.style.borderColor=Et===mt.currentOpacity?mt.uiStyleSettings.toolboxAccentColor:"transparent",Ct.addEventListener("click",function(){mt.setCurrentOpacity(Et,Ct)}),vt.appendChild(Ct);var _t=document.createElement("div");_t.innerText=100*Et+"%",Ct.appendChild(_t),mt.opacityBoxes.push(Ct)}),vt},Ft.prototype.setCurrentOpacity=function(mt,vt){var Et=this;this.currentOpacity=mt,this.opacityBoxes.forEach(function(Ct){Ct.style.borderColor=Ct===vt?Et.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ft}(nt),Xn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.setOpacity=Ct.setOpacity.bind(Ct),Ct.fillColor=Et.defaultHighlightColor,Ct.strokeWidth=0,Ct.opacity=Et.defaultHighlightOpacity,Ct.fillPanel=new et("Color",Et.defaultColorSet,Ct.fillColor),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.opacityPanel=new _n("Opacity",Et.defaultOpacitySteps,Ct.opacity),Ct.opacityPanel.onOpacityChanged=Ct.setOpacity,Ct}return Wt(Ft,zt),Ft.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=zt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="HighlightMarker",Ft.title="Highlight marker",Ft.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>',Ft}(xn),pe='<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>',ne='<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>',pn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.bgColor="transparent",Ct.tipPosition={x:0,y:0},Ct.tipBase1Position={x:0,y:0},Ct.tipBase2Position={x:0,y:0},Ct.tipMoving=!1,Ct.color=Et.defaultStrokeColor,Ct.bgColor=Et.defaultFillColor,Ct.fontFamily=Et.defaultFontFamily,Ct.defaultSize={x:100,y:30},Ct.setBgColor=Ct.setBgColor.bind(Ct),Ct.getTipPoints=Ct.getTipPoints.bind(Ct),Ct.positionTip=Ct.positionTip.bind(Ct),Ct.setTipPoints=Ct.setTipPoints.bind(Ct),Ct.colorPanel=new et("Text color",Et.defaultColorSet,Ct.color,pe),Ct.colorPanel.onColorChanged=Ct.setColor,Ct.bgColorPanel=new et("Fill color",Et.defaultColorSet,Ct.bgColor,ne),Ct.bgColorPanel.onColorChanged=Ct.setBgColor,Ct.fontFamilyPanel=new fe("Font",Et.defaultFontFamilies,Et.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct.tipGrip=new dt,Ct.tipGrip.visual.transform.baseVal.appendItem(Ht.createTransform()),Ct.controlBox.appendChild(Ct.tipGrip.visual),Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return zt.prototype.ownsTarget.call(this,mt)||this.tipGrip.ownsTarget(mt)||this.tip===mt},Ft.prototype.createTip=function(){Ht.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=Ht.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ft.prototype.pointerDown=function(mt,vt){this.state==="new"&&zt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(vt)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):zt.prototype.pointerDown.call(this,mt,vt)},Ft.prototype.pointerUp=function(mt){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,zt.prototype.pointerUp.call(this,mt);else{var vt=this.state==="creating";zt.prototype.pointerUp.call(this,mt),this.setTipPoints(vt),this.positionTip()}},Ft.prototype.manipulate=function(mt){if(this.tipMoving){var vt=this.unrotatePoint(mt);this.tipPosition={x:vt.x-this.manipulationStartLeft,y:vt.y-this.manipulationStartTop},this.positionTip()}else zt.prototype.manipulate.call(this,mt)},Ft.prototype.setBgColor=function(mt){this.bgRectangle&&this.tip&&(Ht.setAttributes(this.bgRectangle,[["fill",mt]]),Ht.setAttributes(this.tip,[["fill",mt]])),this.bgColor=mt,this.fillColorChanged(mt)},Ft.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},Ft.prototype.setTipPoints=function(mt){mt===void 0&&(mt=!1);var vt=Math.min(this.height/2,15),Et=this.height/5;mt&&(this.tipPosition={x:vt+Et/2,y:this.height+20});var Ct=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ct<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Et=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:0},this.tipBase2Position={x:vt+Et,y:0}):(this.tipBase1Position={x:0,y:vt},this.tipBase2Position={x:0,y:vt+Et}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ct<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Et=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Et,y:0},this.tipBase2Position={x:this.width-vt,y:0}):(this.tipBase1Position={x:this.width,y:vt},this.tipBase2Position={x:this.width,y:vt+Et}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ct<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Et=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-vt-Et,y:this.height},this.tipBase2Position={x:this.width-vt,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-vt-Et},this.tipBase2Position={x:this.width,y:this.height-vt}):Ct<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Et=this.width/5,vt=Math.min(this.width/2,15),this.tipBase1Position={x:vt,y:this.height},this.tipBase2Position={x:vt+Et,y:this.height}):(this.tipBase1Position={x:0,y:this.height-vt},this.tipBase2Position={x:0,y:this.height-vt-Et})},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),this.positionTip()},Ft.prototype.positionTip=function(){Ht.setAttributes(this.tip,[["points",this.getTipPoints()]]);var mt=this.tipGrip.visual.transform.baseVal.getItem(0);mt.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(mt,0)},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ft.prototype.select=function(){this.positionTip(),zt.prototype.select.call(this)},Ft.prototype.getState=function(){var mt=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.bgColor=vt.bgColor,this.tipPosition=vt.tipPosition,zt.prototype.restoreState.call(this,mt),this.createTip(),this.setTipPoints()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.tipPosition={x:this.tipPosition.x*mt,y:this.tipPosition.y*vt},this.positionTip()},Ft.typeName="CalloutMarker",Ft.title="Callout marker",Ft.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>',Ft}(Ke),Ai=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.opacity=1,Ct.strokeColor=Et.defaultColor,Ct.strokeWidth=Et.defaultStrokeWidth,Ct.strokeDasharray=Et.defaultStrokeDasharray,Ct.fillColor=Et.defaultFillColor,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.setOpacity=Ct.setOpacity.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct.strokePanel=new et("Line color",de(Et.defaultColorSet,["transparent"]),Et.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.fillPanel=new et("Fill color",de(Et.defaultColorSet,["transparent"]),Ct.fillColor,ne),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.strokeWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Rt("Line style",Et.defaultStrokeDasharrays,Et.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct.opacityPanel=new _n("Opacity",Et.defaultOpacitySteps,Ct.opacity),Ct.opacityPanel.onOpacityChanged=Ct.setOpacity,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual)},Ft.prototype.createVisual=function(){this.visual=Ht.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)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){zt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.setSize=function(){zt.prototype.setSize.call(this),Ht.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ft.prototype.pointerUp=function(mt){zt.prototype.pointerUp.call(this,mt),this.setSize()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.visual&&Ht.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.visual&&Ht.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ft.prototype.setOpacity=function(mt){this.opacity=mt,this.visual&&Ht.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.opacity=vt.opacity,this.createVisual(),zt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.typeName="EllipseMarker",Ft.title="Ellipse marker",Ft.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>',Ft}(xt),ai=function(zt){function Ft(mt,vt,Et){return zt.call(this,mt,vt,Et)||this}return Wt(Ft,zt),Object.defineProperty(Ft.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.tip1&&mt!==this.tip2)},Ft.prototype.createTips=function(){this.tip1=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip1),this.tip2=Ht.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(Ht.createTransform()),this.visual.appendChild(this.tip2)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.state==="creating"&&this.createTips()},Ft.prototype.adjustVisual=function(){if(zt.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(Ht.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()]]),Ht.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 mt=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),vt=this.tip1.transform.baseVal.getItem(0);vt.setRotate(mt,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(vt,0);var Et=this.tip2.transform.baseVal.getItem(0);Et.setRotate(mt+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Et,0)}},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=zt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt),this.createTips(),this.adjustVisual()},Ft.typeName="MeasurementMarker",Ft.title="Measurement marker",Ft.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>',Ft}(ye),sn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.strokePanel.colors=Et.defaultColorSet,Ct.fillColor="transparent",Ct}return Wt(Ft,zt),Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=zt.prototype.getState.call(this);return mt.typeName=Ft.typeName,mt},Ft.typeName="EllipseFrameMarker",Ft.title="Ellipse frame marker",Ft.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>',Ft}(Ai),Qn=function(){function zt(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(zt.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),zt.prototype.addUndoStep=function(Ft){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ft)||(this.undoStack.push(Ft),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ft)&&this.redoStack.splice(0,this.redoStack.length))},zt.prototype.replaceLastUndoStep=function(Ft){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ft)},zt.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},zt.prototype.undo=function(){if(this.undoStack.length>1){var Ft=this.undoStack.pop();return Ft!==void 0&&this.redoStack.push(Ft),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},zt.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},zt}(),jn=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.curveX=0,Ct.curveY=0,Ct.manipulationStartCurveX=0,Ct.manipulationStartCurveY=0,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.positionGrips=Ct.positionGrips.bind(Ct),Ct.addControlGrips=Ct.addControlGrips.bind(Ct),Ct.adjustVisual=Ct.adjustVisual.bind(Ct),Ct.setupControlBox=Ct.setupControlBox.bind(Ct),Ct.resize=Ct.resize.bind(Ct),Ct.strokeColor=Et.defaultColor,Ct.strokeWidth=Et.defaultStrokeWidth,Ct.strokeDasharray=Et.defaultStrokeDasharray,Ct.strokePanel=new et("Line color",Et.defaultColorSet,Et.defaultColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.strokeWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Rt("Line style",Et.defaultStrokeDasharrays,Et.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.selectorCurve&&mt!==this.visibleCurve&&!this.curveGrip.ownsTarget(mt))},Ft.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ft.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.selectorCurve=Ht.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=Ht.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)},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=mt.x,this.curveY=mt.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(vt)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ft.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),Ht.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),Ht.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),Ht.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ft.prototype.setupControlBox=function(){zt.prototype.setupControlBox.call(this),this.curveControlLine1=Ht.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=Ht.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)},Ft.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,zt.prototype.addControlGrips.call(this)},Ft.prototype.positionGrips=function(){zt.prototype.positionGrips.call(this);var mt=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-mt/2,this.curveY-mt/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()))},Ft.prototype.manipulate=function(mt){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+mt.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+mt.y-this.manipulationStartY),zt.prototype.manipulate.call(this,mt)},Ft.prototype.resize=function(mt){this.activeGrip===this.curveGrip&&(this.curveX=mt.x,this.curveY=mt.y),zt.prototype.resize.call(this,mt),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.adjustVisual(),this.colorChanged(mt)},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.adjustVisual()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.adjustVisual()},Ft.prototype.scale=function(mt,vt){this.curveX=this.curveX*mt,this.curveY=this.curveY*vt,zt.prototype.scale.call(this,mt,vt)},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},zt.prototype.getState.call(this));return mt.typeName=Ft.typeName,mt},Ft.prototype.restoreState=function(mt){zt.prototype.restoreState.call(this,mt);var vt=mt;this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.curveX=vt.curveX,this.curveY=vt.curveY,this.createVisual(),this.adjustVisual()},Ft.typeName="CurveMarker",Ft.title="Curve marker",Ft.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>',Ft}(te),Ti=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,vt,Et)||this;return Ct.fillColor="transparent",Ct.strokeColor="transparent",Ct.strokeWidth=0,Ct.strokeDasharray="",Ct.textColor="transparent",Ct.fontSize="1rem",Ct.isMoved=!1,Ct.captionText="Caption",Ct.PADDING=5,Ct.captionBoxWidth=0,Ct.captionBoxHeight=0,Ct.strokeColor=Et.defaultColor,Ct.strokeWidth=Et.defaultStrokeWidth,Ct.strokeDasharray=Et.defaultStrokeDasharray,Ct.fillColor=Et.defaultFillColor,Ct.textColor=Et.defaultStrokeColor,Ct.fontFamily=Et.defaultFontFamily,Ct.fontSize=Et.defaultCaptionFontSize,Ct.captionText=Et.defaultCaptionText,Ct.setStrokeColor=Ct.setStrokeColor.bind(Ct),Ct.setFillColor=Ct.setFillColor.bind(Ct),Ct.setStrokeWidth=Ct.setStrokeWidth.bind(Ct),Ct.setStrokeDasharray=Ct.setStrokeDasharray.bind(Ct),Ct.createVisual=Ct.createVisual.bind(Ct),Ct.sizeCaption=Ct.sizeCaption.bind(Ct),Ct.setCaptionText=Ct.setCaptionText.bind(Ct),Ct.showTextEditor=Ct.showTextEditor.bind(Ct),Ct.positionTextEditor=Ct.positionTextEditor.bind(Ct),Ct.finishTextEditing=Ct.finishTextEditing.bind(Ct),Ct.setFont=Ct.setFont.bind(Ct),Ct.setTextColor=Ct.setTextColor.bind(Ct),Ct.strokePanel=new et("Line color",de(Et.defaultColorSet,["transparent"]),Ct.strokeColor),Ct.strokePanel.onColorChanged=Ct.setStrokeColor,Ct.fillPanel=new et("Fill color",de(Et.defaultColorSet,["transparent"]),Ct.fillColor,ne),Ct.fillPanel.onColorChanged=Ct.setFillColor,Ct.strokeWidthPanel=new Ut("Line width",Et.defaultStrokeWidths,Et.defaultStrokeWidth),Ct.strokeWidthPanel.onWidthChanged=Ct.setStrokeWidth,Ct.strokeStylePanel=new Rt("Line style",Et.defaultStrokeDasharrays,Et.defaultStrokeDasharray),Ct.strokeStylePanel.onStyleChanged=Ct.setStrokeDasharray,Ct.fontFamilyPanel=new fe("Font",Et.defaultFontFamilies,Et.defaultFontFamily),Ct.fontFamilyPanel.onFontChanged=Ct.setFont,Ct.textColorPanel=new et("Text color",Et.defaultColorSet,Ct.textColor,pe),Ct.textColorPanel.onColorChanged=Ct.setTextColor,Ct}return Wt(Ft,zt),Ft.prototype.ownsTarget=function(mt){return!(!zt.prototype.ownsTarget.call(this,mt)&&mt!==this.visual&&mt!==this.frame&&mt!==this.captionBg&&mt!==this.captionElement)},Ft.prototype.createVisual=function(){this.visual=Ht.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=Ht.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=Ht.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=Ht.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()},Ft.prototype.setCaptionText=function(mt){this.captionText=mt,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ft.prototype.pointerDown=function(mt,vt){zt.prototype.pointerDown.call(this,mt,vt),this.isMoved=!1,this.pointerDownPoint=mt,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(mt),this._state="creating")},Ft.prototype.manipulate=function(mt){zt.prototype.manipulate.call(this,mt),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(mt.x-this.pointerDownPoint.x)>5||Math.abs(mt.y-this.pointerDownPoint.y)>5)},Ft.prototype.resize=function(mt){zt.prototype.resize.call(this,mt),this.setSize()},Ft.prototype.sizeCaption=function(){var mt=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=mt.width+2*this.PADDING,this.captionBoxHeight=mt.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),Ht.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')"]]),Ht.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')"]])},Ft.prototype.showTextEditor=function(){var mt=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(vt){vt.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(vt){vt.key==="Enter"&&mt.finishTextEditing(mt.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(vt){vt.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){mt.finishTextEditing(mt.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ft.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"))},Ft.prototype.finishTextEditing=function(mt){this.setCaptionText(mt.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ft.prototype.setFont=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["font-family",mt]]),this.fontFamily=mt,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ft.prototype.setTextColor=function(mt){this.captionElement&&Ht.setAttributes(this.captionElement,[["fill",mt]]),this.textColor=mt,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ft.prototype.setSize=function(){zt.prototype.setSize.call(this),Ht.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ft.prototype.pointerUp=function(mt){zt.prototype.pointerUp.call(this,mt),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ft.prototype.dblClick=function(mt,vt){zt.prototype.dblClick.call(this,mt,vt),this.showTextEditor()},Ft.prototype.setStrokeColor=function(mt){this.strokeColor=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(mt),this.stateChanged()},Ft.prototype.setFillColor=function(mt){this.fillColor=mt,this.captionBg&&Ht.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(mt),this.stateChanged()},Ft.prototype.setStrokeWidth=function(mt){this.strokeWidth=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ft.prototype.setStrokeDasharray=function(mt){this.strokeDasharray=mt,this.frame&&Ht.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ft.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ft.prototype.getState=function(){var mt=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},zt.prototype.getState.call(this));return mt.typeName=this.typeName,mt},Ft.prototype.restoreState=function(mt){var vt=mt;this.fillColor=vt.fillColor,this.strokeColor=vt.strokeColor,this.strokeWidth=vt.strokeWidth,this.strokeDasharray=vt.strokeDasharray,this.textColor=vt.textColor,this.fontFamily=vt.fontFamily,this.captionText=vt.captionText,this.fontSize=vt.fontSize,this.createVisual(),zt.prototype.restoreState.call(this,mt),this.setSize()},Ft.prototype.scale=function(mt,vt){zt.prototype.scale.call(this,mt,vt),this.setSize()},Ft.typeName="CaptionFrameMarker",Ft.title="Caption frame marker",Ft.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>',Ft}(xt),$e=function(){function zt(Ft,mt){mt===void 0&&(mt=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ft,this.cancelable=mt}return Object.defineProperty(zt.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),zt.prototype.preventDefault=function(){this._defaultPrevented=!0},zt}(),Le=function(zt){function Ft(mt,vt,Et){var Ct=zt.call(this,mt,!1)||this;return Ct.dataUrl=vt,Ct.state=Et,Ct}return Wt(Ft,zt),Ft}($e),tn=function(zt){function Ft(mt,vt,Et){Et===void 0&&(Et=!1);var Ct=zt.call(this,mt,Et)||this;return Ct.marker=vt,Ct}return Wt(Ft,zt),Ft}($e),hi=function(){function zt(){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 zt.prototype.addEventListener=function(Ft,mt){this[Ft].push(mt)},zt.prototype.removeEventListener=function(Ft,mt){var vt=this[Ft].indexOf(mt);vt>-1&&this[Ft].splice(vt,1)},zt}(),ni=function(){function zt(Ft){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Yt,this._isOpen=!1,this.undoRedoManager=new Qn,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 hi,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=zt.instanceCounter++,this.styles=new Gt(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ft,this.targetRoot=document.body,this.width=Ft.clientWidth,this.height=Ft.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(zt.prototype,"ALL_MARKER_TYPES",{get:function(){return[Zt,_e,fn,Ke,sn,Ai,Xn,pn,ai,xn,ye,jn,Ti]},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Zt,_e,fn,Ke,Ai,Xn,pn]},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Zt,_e,fn,Ke,Xn]},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ft){var mt=this;this._availableMarkerTypes.splice(0),Ft.forEach(function(vt){if(typeof vt=="string"){var Et=mt.ALL_MARKER_TYPES.find(function(Ct){return Ct.typeName===vt});Et!==void 0&&mt._availableMarkerTypes.push(Et)}else mt._availableMarkerTypes.push(vt)})},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(zt.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ft){this._zoomLevel=Ft,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(zt.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),zt.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),ie.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},zt.prototype.show=function(){var Ft=this;this.styles.styleSheetRoot===void 0&&he.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=he.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(mt){return mt(new $e(Ft))})},zt.prototype.render=function(){return le(this,void 0,void 0,function(){var Ft;return ve(this,function(mt){switch(mt.label){case 0:return this.setCurrentMarker(),(Ft=new oe).naturalSize=this.renderAtNaturalSize,Ft.imageType=this.renderImageType,Ft.imageQuality=this.renderImageQuality,Ft.markersOnly=this.renderMarkersOnly,Ft.width=this.renderWidth,Ft.height=this.renderHeight,[4,Ft.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return mt.sent(),[4,Ft.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,mt.sent()]}})})},zt.prototype.close=function(Ft){var mt=this;if(Ft===void 0&&(Ft=!1),this.isOpen){var vt=!1;Ft||this.eventListeners.beforeclose.forEach(function(Et){var Ct=new $e(mt,!0);Et(Ct),Ct.defaultPrevented&&(vt=!0)}),vt||(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(Et){return Et(new $e(mt))}),this.detachEvents(),this._isOpen=!1)}},zt.prototype.addMarkersToToolbar=function(){for(var Ft,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];(Ft=this._availableMarkerTypes).push.apply(Ft,mt)},zt.prototype.addRenderEventListener=function(Ft){this.addEventListener("render",function(mt){Ft(mt.dataUrl,mt.state)})},zt.prototype.removeRenderEventListener=function(Ft){},zt.prototype.addCloseEventListener=function(Ft){this.addEventListener("close",function(){Ft()})},zt.prototype.removeCloseEventListener=function(Ft){},zt.prototype.setupResizeObserver=function(){var Ft=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ft.resize(Ft.target.clientWidth,Ft.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ft.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},zt.prototype.onPopupTargetResize=function(){var Ft=1*this.target.clientWidth/this.target.clientHeight,mt=this.editorCanvas.clientWidth/Ft>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ft:this.editorCanvas.clientWidth,vt=mt<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ft;this.resize(mt,vt)},zt.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},zt.prototype.resize=function(Ft,mt){this._isResizing=!0;var vt=Ft/this.imageWidth,Et=mt/this.imageHeight;this.imageWidth=Math.round(Ft),this.imageHeight=Math.round(mt),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(vt,Et),this._isResizing=!1},zt.prototype.scaleMarkers=function(Ft,mt){var vt,Et=this;this._currentMarker&&this._currentMarker instanceof Ke?this._currentMarker.scale(Ft,mt):(vt=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ct){Ct!==Et._currentMarker&&Ct.scale(Ft,mt)}),vt!==void 0&&this.setCurrentMarker(vt)},zt.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"},zt.prototype.setTopLeft=function(){var Ft=this.editingTarget.getBoundingClientRect(),mt=this.editorCanvas.getBoundingClientRect();this.left=Ft.left-mt.left,this.top=Ft.top-mt.top},zt.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)},zt.prototype.addDefs=function(){for(var Ft,mt=[],vt=0;vt<arguments.length;vt++)mt[vt]=arguments[vt];this.defs=Ht.createDefs(),this.addDefsToImage(),(Ft=this.defs).append.apply(Ft,mt)},zt.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},zt.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)},zt.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},zt.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},zt.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)},zt.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},zt.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)},zt.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 Ft=document.createElement("a");Ft.href="https://markerjs.com/",Ft.target="_blank",Ft.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>',Ft.title="Powered by marker.js",Ft.style.display="grid",Ft.style.alignItems="center",Ft.style.justifyItems="center",Ft.style.padding="3px",Ft.style.width="20px",Ft.style.height="20px",this.logoUI.appendChild(Ft),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},zt.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")},zt.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"},zt.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},zt.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 Ft=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=Ft+"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 Me(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 Qt(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},zt.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},zt.prototype.removeMarker=function(Ft){this.markerImage.removeChild(Ft.container),this.markers.indexOf(Ft)>-1&&this.markers.splice(this.markers.indexOf(Ft),1),Ft.dispose()},zt.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())},zt.prototype.toolbarButtonClicked=function(Ft,mt){if(Ft==="marker"&&mt!==void 0)this.createNewMarker(mt);else if(Ft==="action")switch(mt){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()}},zt.prototype.deleteSelectedMarker=function(){var Ft=this;if(this._currentMarker!==void 0){var mt=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Et){var Ct=new tn(Ft,Ft._currentMarker,!0);Et(Ct),Ct.defaultPrevented&&(mt=!0)}),!mt){var vt=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(Et){return Et(new tn(Ft,vt))})}}},zt.prototype.clear=function(){var Ft=this,mt=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(_t){var Ce=new tn(Ft,void 0,!0);_t(Ce),Ce.defaultPrevented&&(mt=!0)}),!mt)){this.setCurrentMarker();for(var vt=function(_t){var Ce=Et.markers[_t];Et.setCurrentMarker(Et.markers[_t]),Et._currentMarker.dispose(),Et.markerImage.removeChild(Et._currentMarker.container),Et.markers.splice(Et.markers.indexOf(Et._currentMarker),1),Et.eventListeners.markerdelete.forEach(function(Ze){return Ze(new tn(Ft,Ce))})},Et=this,Ct=this.markers.length-1;Ct>=0;Ct--)vt(Ct);this.addUndoStep()}},Object.defineProperty(zt.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),zt.prototype.showNotesEditor=function(){var Ft;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=(Ft=this._currentMarker.notes)!==null&&Ft!==void 0?Ft:"",this.overlayContainer.appendChild(this.notesArea))},zt.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)},zt.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},zt.prototype.addUndoStep=function(){var Ft=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var mt=this.getState(),vt=this.undoRedoManager.getLastUndoStep();if(!vt||vt.width===mt.width&&vt.height===mt.height){var Et=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(mt),Et<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ct){return Ct(new $e(Ft))})}else this.undoRedoManager.replaceLastUndoStep(mt),this.eventListeners.statechange.forEach(function(Ct){return Ct(new $e(Ft))})}},zt.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},zt.prototype.undoStep=function(){var Ft=this,mt=this.undoRedoManager.undo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new $e(Ft))}))},zt.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},zt.prototype.redoStep=function(){var Ft=this,mt=this.undoRedoManager.redo();mt!==void 0&&(this.restoreState(mt),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(vt){return vt(new $e(Ft))}))},zt.prototype.stepZoom=function(){var Ft=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ft<this.zoomSteps.length-1?this.zoomSteps[Ft+1]:this.zoomSteps[0]},zt.prototype.panTo=function(Ft){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ft.x,top:this.prevPanPoint.y-Ft.y}),this.prevPanPoint=Ft},zt.prototype.startRenderAndClose=function(){return le(this,void 0,void 0,function(){var Ft,mt,vt=this;return ve(this,function(Et){switch(Et.label){case 0:return[4,this.render()];case 1:return Ft=Et.sent(),mt=this.getState(),this.eventListeners.render.forEach(function(Ct){return Ct(new Le(vt,Ft,mt))}),this.close(!0),[2]}})})},zt.prototype.getState=function(Ft){Ft===!0&&this.setCurrentMarker();var mt={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(vt){return mt.markers.push(vt.getState())}),mt},zt.prototype.restoreState=function(Ft){var mt=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ft.markers.forEach(function(vt){var Et=mt._availableMarkerTypes.find(function(_t){return _t.typeName===vt.typeName});if(Et!==void 0){var Ct=mt.addNewMarker(Et);Ct.restoreState(vt),mt.markers.push(Ct)}}),Ft.width&&Ft.height&&(Ft.width!==this.imageWidth||Ft.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ft.width,this.imageHeight/Ft.height),this.eventListeners.restorestate.forEach(function(vt){return vt(new $e(mt))})},zt.prototype.addNewMarker=function(Ft){var mt=Ht.createGroup();return this.markerImage.appendChild(mt),new Ft(mt,this.overlayContainer,this.settings)},zt.prototype.createNewMarker=function(Ft){var mt,vt=this;(mt=typeof Ft=="string"?this._availableMarkerTypes.find(function(Et){return Et.typeName===Ft}):Ft)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(mt),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(mt.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Et){return Et(new tn(vt,vt._currentMarker))}))},zt.prototype.markerCreated=function(Ft){var mt=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ft),this.setCurrentMarker(Ft),Ft instanceof _e&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(_e):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(vt){return vt(new tn(mt,mt._currentMarker))})},zt.prototype.colorChanged=function(Ft){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ft,this.settings.defaultStrokeColor=Ft)},zt.prototype.fillColorChanged=function(Ft){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ft)},zt.prototype.markerStateChanged=function(Ft){var mt=this;this.eventListeners.markerchange.forEach(function(vt){return vt(new tn(mt,Ft))})},zt.prototype.setCurrentMarker=function(Ft){var mt=this;this._currentMarker!==Ft&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(vt){return vt(new tn(mt,mt._currentMarker))})),this._currentMarker=Ft,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(vt){return vt(new tn(mt,mt._currentMarker))}))},zt.prototype.onPointerDown=function(Ft){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ft.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Ft.target)});mt!==void 0?(this.setCurrentMarker(mt),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY),Ft.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ft.clientX,y:Ft.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY))},zt.prototype.onDblClick=function(Ft){if(this._isFocused||this.focus(),this.mode==="select"){var mt=this.markers.find(function(vt){return vt.ownsTarget(Ft.target)});mt!==void 0&&mt!==this._currentMarker&&this.setCurrentMarker(mt),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY),Ft.target):this.setCurrentMarker()}},zt.prototype.onPointerMove=function(Ft){this.touchPoints!==1&&Ft.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ft.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY)):this.zoomLevel>1&&this.panTo({x:Ft.clientX,y:Ft.clientY}))},zt.prototype.onPointerUp=function(Ft){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ft.clientX,Ft.clientY)),this.isDragging=!1,this.addUndoStep()},zt.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},zt.prototype.onKeyUp=function(Ft){this._currentMarker===void 0||this.notesArea!==void 0||Ft.key!=="Delete"&&Ft.key!=="Backspace"||this.deleteSelectedMarker()},zt.prototype.clientToLocalCoordinates=function(Ft,mt){var vt=this.markerImage.getBoundingClientRect();return{x:(Ft-vt.left)/this.zoomLevel,y:(mt-vt.top)/this.zoomLevel}},zt.prototype.onWindowResize=function(){this.positionUI()},zt.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ft=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ft+"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()},zt.prototype.addLicenseKey=function(Ft){ie.addKey(Ft)},zt.prototype.addEventListener=function(Ft,mt){this.eventListeners.addEventListener(Ft,mt)},zt.prototype.removeEventListener=function(Ft,mt){this.eventListeners.removeEventListener(Ft,mt)},zt.prototype.renderState=function(Ft){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ft),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(zt.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),zt.prototype.focus=function(){var Ft=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(mt){return mt(new $e(Ft))}))},zt.prototype.blur=function(){var Ft=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(mt){return mt(new $e(Ft))}))},zt.instanceCounter=0,zt}()},91574:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Kn}});var St=It(67711),Wt=It(98506),le=It(52873),ve=It(16886),de=It(26420),Ht=It(33346),ie=It(92310),oe=It.n(ie),he=/margin|padding|width|height|max|min|offset/,Gt={left:!0,top:!0},Ie={cssFloat:1,styleFloat:1,float:1};function Xt(mn){return mn.nodeType===1?mn.ownerDocument.defaultView.getComputedStyle(mn,null):{}}function Me(mn,be,ei){if(be=be.toLowerCase(),ei==="auto"){if(be==="height")return mn.offsetHeight;if(be==="width")return mn.offsetWidth}return be in Gt||(Gt[be]=he.test(be)),Gt[be]?parseFloat(ei)||0:ei}function Qt(mn,be){var ei=arguments.length,kn=Xt(mn);return be=Ie[be]?"cssFloat"in mn.style?"cssFloat":"styleFloat":be,ei===1?kn:Me(mn,be,kn[be]||mn.style[be])}function nt(mn,be,ei){var kn=arguments.length;if(be=Ie[be]?"cssFloat"in mn.style?"cssFloat":"styleFloat":be,kn===3)return typeof ei=="number"&&he.test(be)&&(ei="".concat(ei,"px")),mn.style[be]=ei,ei;for(var On in be)be.hasOwnProperty(On)&&nt(mn,On,be[On]);return Xt(mn)}function et(mn){return mn===document.body?document.documentElement.clientWidth:mn.offsetWidth}function At(mn){return mn===document.body?window.innerHeight||document.documentElement.clientHeight:mn.offsetHeight}function at(){var mn=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),be=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:mn,height:be}}function dt(){var mn=document.documentElement.clientWidth,be=window.innerHeight||document.documentElement.clientHeight;return{width:mn,height:be}}function gt(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function xt(mn){var be=mn.getBoundingClientRect(),ei=document.documentElement;return{left:be.left+(window.pageXOffset||ei.scrollLeft)-(ei.clientLeft||document.body.clientLeft||0),top:be.top+(window.pageYOffset||ei.scrollTop)-(ei.clientTop||document.body.clientTop||0)}}var bt=It(18929),Ut=It(59301),Rt=It(55311),Zt=It(8224),Yt=It(10228),te=It(43403),ye=It(77900),fe=Ut.createContext(null),Ke=function(be){var ei=be.visible,kn=be.maskTransitionName,On=be.getContainer,Vn=be.prefixCls,Ki=be.rootClassName,si=be.icons,yi=be.countRender,Ei=be.showSwitch,qi=be.showProgress,ii=be.current,ar=be.transform,Xi=be.count,lr=be.scale,zi=be.minScale,Kr=be.maxScale,Ir=be.closeIcon,Or=be.onActive,Yi=be.onClose,kr=be.onZoomIn,kt=be.onZoomOut,tr=be.onRotateRight,Fi=be.onRotateLeft,ri=be.onFlipX,Li=be.onFlipY,Ui=be.onReset,Ri=be.toolbarRender,Lr=be.zIndex,an=be.image,rn=(0,Ut.useContext)(fe),Ge=si.rotateLeft,yn=si.rotateRight,ji=si.zoomIn,Mi=si.zoomOut,or=si.close,ln=si.left,Ln=si.right,Pe=si.flipX,sr=si.flipY,$n="".concat(Vn,"-operations-operation");Ut.useEffect(function(){var fi=function(un){un.keyCode===Yt.Z.ESC&&Yi()};return ei&&window.addEventListener("keydown",fi),function(){window.removeEventListener("keydown",fi)}},[ei]);var se=function(Fn,un){Fn.preventDefault(),Fn.stopPropagation(),Or(un)},De=Ut.useCallback(function(fi){var Fn=fi.type,un=fi.disabled,We=fi.onClick,Mn=fi.icon;return Ut.createElement("div",{key:Fn,className:oe()($n,"".concat(Vn,"-operations-operation-").concat(Fn),(0,le.Z)({},"".concat(Vn,"-operations-operation-disabled"),!!un)),onClick:We},Mn)},[$n,Vn]),qn=Ei?De({icon:ln,onClick:function(Fn){return se(Fn,-1)},type:"prev",disabled:ii===0}):void 0,Zn=Ei?De({icon:Ln,onClick:function(Fn){return se(Fn,1)},type:"next",disabled:ii===Xi-1}):void 0,Ye=De({icon:sr,onClick:Li,type:"flipY"}),Dn=De({icon:Pe,onClick:ri,type:"flipX"}),bi=De({icon:Ge,onClick:Fi,type:"rotateLeft"}),ki=De({icon:yn,onClick:tr,type:"rotateRight"}),Ni=De({icon:Mi,onClick:kt,type:"zoomOut",disabled:lr<=zi}),li=De({icon:ji,onClick:kr,type:"zoomIn",disabled:lr===Kr}),ci=Ut.createElement("div",{className:"".concat(Vn,"-operations")},Ye,Dn,bi,ki,Ni,li);return Ut.createElement(ye.default,{visible:ei,motionName:kn},function(fi){var Fn=fi.className,un=fi.style;return Ut.createElement(te.Z,{open:!0,getContainer:On!=null?On:document.body},Ut.createElement("div",{className:oe()("".concat(Vn,"-operations-wrapper"),Fn,Ki),style:(0,Wt.Z)((0,Wt.Z)({},un),{},{zIndex:Lr})},Ir===null?null:Ut.createElement("button",{className:"".concat(Vn,"-close"),onClick:Yi},Ir||or),Ei&&Ut.createElement(Ut.Fragment,null,Ut.createElement("div",{className:oe()("".concat(Vn,"-switch-left"),(0,le.Z)({},"".concat(Vn,"-switch-left-disabled"),ii===0)),onClick:function(Mn){return se(Mn,-1)}},ln),Ut.createElement("div",{className:oe()("".concat(Vn,"-switch-right"),(0,le.Z)({},"".concat(Vn,"-switch-right-disabled"),ii===Xi-1)),onClick:function(Mn){return se(Mn,1)}},Ln)),Ut.createElement("div",{className:"".concat(Vn,"-footer")},qi&&Ut.createElement("div",{className:"".concat(Vn,"-progress")},yi?yi(ii+1,Xi):"".concat(ii+1," / ").concat(Xi)),Ri?Ri(ci,(0,Wt.Z)((0,Wt.Z)({icons:{prevIcon:qn,nextIcon:Zn,flipYIcon:Ye,flipXIcon:Dn,rotateLeftIcon:bi,rotateRightIcon:ki,zoomOutIcon:Ni,zoomInIcon:li},actions:{onActive:Or,onFlipY:Li,onFlipX:ri,onRotateLeft:Fi,onRotateRight:tr,onZoomOut:kt,onZoomIn:kr,onReset:Ui,onClose:Yi},transform:ar},rn?{current:ii,total:Xi}:{}),{},{image:an})):ci)))})},_e=Ke,nn=It(13697),fn=It(16089),xn={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function _n(mn,be,ei,kn){var On=(0,Ut.useRef)(null),Vn=(0,Ut.useRef)([]),Ki=(0,Ut.useState)(xn),si=(0,ve.Z)(Ki,2),yi=si[0],Ei=si[1],qi=function(lr){Ei(xn),(0,nn.Z)(xn,yi)||kn==null||kn({transform:xn,action:lr})},ii=function(lr,zi){On.current===null&&(Vn.current=[],On.current=(0,fn.Z)(function(){Ei(function(Kr){var Ir=Kr;return Vn.current.forEach(function(Or){Ir=(0,Wt.Z)((0,Wt.Z)({},Ir),Or)}),On.current=null,kn==null||kn({transform:Ir,action:zi}),Ir})})),Vn.current.push((0,Wt.Z)((0,Wt.Z)({},yi),lr))},ar=function(lr,zi,Kr,Ir,Or){var Yi=mn.current,kr=Yi.width,kt=Yi.height,tr=Yi.offsetWidth,Fi=Yi.offsetHeight,ri=Yi.offsetLeft,Li=Yi.offsetTop,Ui=lr,Ri=yi.scale*lr;Ri>ei?(Ri=ei,Ui=ei/yi.scale):Ri<be&&(Ri=Or?Ri:be,Ui=Ri/yi.scale);var Lr=Kr!=null?Kr:innerWidth/2,an=Ir!=null?Ir:innerHeight/2,rn=Ui-1,Ge=rn*kr*.5,yn=rn*kt*.5,ji=rn*(Lr-yi.x-ri),Mi=rn*(an-yi.y-Li),or=yi.x-(ji-Ge),ln=yi.y-(Mi-yn);if(lr<1&&Ri===1){var Ln=tr*Ri,Pe=Fi*Ri,sr=dt(),$n=sr.width,se=sr.height;Ln<=$n&&Pe<=se&&(or=0,ln=0)}ii({x:or,y:ln,scale:Ri},zi)};return{transform:yi,resetTransform:qi,updateTransform:ii,dispatchZoomChange:ar}}var Xn=It(48736);function pe(mn,be,ei,kn){var On=be+ei,Vn=(ei-kn)/2;if(ei>kn){if(be>0)return(0,le.Z)({},mn,Vn);if(be<0&&On<kn)return(0,le.Z)({},mn,-Vn)}else if(be<0||On>kn)return(0,le.Z)({},mn,be<0?Vn:-Vn);return{}}function ne(mn,be,ei,kn){var On=dt(),Vn=On.width,Ki=On.height,si=null;return mn<=Vn&&be<=Ki?si={x:0,y:0}:(mn>Vn||be>Ki)&&(si=(0,Wt.Z)((0,Wt.Z)({},pe("x",ei,mn,Vn)),pe("y",kn,be,Ki))),si}var pn=1,Ai=1;function ai(mn,be,ei,kn,On,Vn,Ki){var si=On.rotate,yi=On.scale,Ei=On.x,qi=On.y,ii=(0,Ut.useState)(!1),ar=(0,ve.Z)(ii,2),Xi=ar[0],lr=ar[1],zi=(0,Ut.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),Kr=function(kt){!be||kt.button!==0||(kt.preventDefault(),kt.stopPropagation(),zi.current={diffX:kt.pageX-Ei,diffY:kt.pageY-qi,transformX:Ei,transformY:qi},lr(!0))},Ir=function(kt){ei&&Xi&&Vn({x:kt.pageX-zi.current.diffX,y:kt.pageY-zi.current.diffY},"move")},Or=function(){if(ei&&Xi){lr(!1);var kt=zi.current,tr=kt.transformX,Fi=kt.transformY,ri=Ei!==tr&&qi!==Fi;if(!ri)return;var Li=mn.current.offsetWidth*yi,Ui=mn.current.offsetHeight*yi,Ri=mn.current.getBoundingClientRect(),Lr=Ri.left,an=Ri.top,rn=si%180!==0,Ge=ne(rn?Ui:Li,rn?Li:Ui,Lr,an);Ge&&Vn((0,Wt.Z)({},Ge),"dragRebound")}},Yi=function(kt){if(!(!ei||kt.deltaY==0)){var tr=Math.abs(kt.deltaY/100),Fi=Math.min(tr,Ai),ri=pn+Fi*kn;kt.deltaY>0&&(ri=pn/ri),Ki(ri,"wheel",kt.clientX,kt.clientY)}};return(0,Ut.useEffect)(function(){var kr,kt,tr,Fi;if(be){tr=(0,Zt.Z)(window,"mouseup",Or,!1),Fi=(0,Zt.Z)(window,"mousemove",Ir,!1);try{window.top!==window.self&&(kr=(0,Zt.Z)(window.top,"mouseup",Or,!1),kt=(0,Zt.Z)(window.top,"mousemove",Ir,!1))}catch(ri){(0,Xn.Kp)(!1,"[rc-image] ".concat(ri))}}return function(){var ri,Li,Ui,Ri;(ri=tr)===null||ri===void 0||ri.remove(),(Li=Fi)===null||Li===void 0||Li.remove(),(Ui=kr)===null||Ui===void 0||Ui.remove(),(Ri=kt)===null||Ri===void 0||Ri.remove()}},[ei,Xi,Ei,qi,si,be]),{isMoving:Xi,onMouseDown:Kr,onMouseMove:Ir,onMouseUp:Or,onWheel:Yi}}function sn(mn){return new Promise(function(be){if(!mn){be(!1);return}var ei=document.createElement("img");ei.onerror=function(){return be(!1)},ei.onload=function(){return be(!0)},ei.src=mn})}function Qn(mn){var be=mn.src,ei=mn.isCustomPlaceholder,kn=mn.fallback,On=(0,Ut.useState)(ei?"loading":"normal"),Vn=(0,ve.Z)(On,2),Ki=Vn[0],si=Vn[1],yi=(0,Ut.useRef)(!1),Ei=Ki==="error";(0,Ut.useEffect)(function(){var Xi=!0;return sn(be).then(function(lr){!lr&&Xi&&si("error")}),function(){Xi=!1}},[be]),(0,Ut.useEffect)(function(){ei&&!yi.current?si("loading"):Ei&&si("normal")},[be]);var qi=function(){si("normal")},ii=function(lr){yi.current=!1,Ki==="loading"&&lr!==null&&lr!==void 0&&lr.complete&&(lr.naturalWidth||lr.naturalHeight)&&(yi.current=!0,qi())},ar=Ei&&kn?{src:kn}:{onLoad:qi,src:be};return[ii,ar,Ki]}function jn(mn,be){var ei=mn.x-be.x,kn=mn.y-be.y;return Math.hypot(ei,kn)}function Ti(mn,be,ei,kn){var On=jn(mn,ei),Vn=jn(be,kn);if(On===0&&Vn===0)return[mn.x,mn.y];var Ki=On/(On+Vn),si=mn.x+Ki*(be.x-mn.x),yi=mn.y+Ki*(be.y-mn.y);return[si,yi]}function $e(mn,be,ei,kn,On,Vn,Ki){var si=On.rotate,yi=On.scale,Ei=On.x,qi=On.y,ii=(0,Ut.useState)(!1),ar=(0,ve.Z)(ii,2),Xi=ar[0],lr=ar[1],zi=(0,Ut.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),Kr=function(kt){zi.current=(0,Wt.Z)((0,Wt.Z)({},zi.current),kt)},Ir=function(kt){if(be){kt.stopPropagation(),lr(!0);var tr=kt.touches,Fi=tr===void 0?[]:tr;Fi.length>1?Kr({point1:{x:Fi[0].clientX,y:Fi[0].clientY},point2:{x:Fi[1].clientX,y:Fi[1].clientY},eventType:"touchZoom"}):Kr({point1:{x:Fi[0].clientX-Ei,y:Fi[0].clientY-qi},eventType:"move"})}},Or=function(kt){var tr=kt.touches,Fi=tr===void 0?[]:tr,ri=zi.current,Li=ri.point1,Ui=ri.point2,Ri=ri.eventType;if(Fi.length>1&&Ri==="touchZoom"){var Lr={x:Fi[0].clientX,y:Fi[0].clientY},an={x:Fi[1].clientX,y:Fi[1].clientY},rn=Ti(Li,Ui,Lr,an),Ge=(0,ve.Z)(rn,2),yn=Ge[0],ji=Ge[1],Mi=jn(Lr,an)/jn(Li,Ui);Ki(Mi,"touchZoom",yn,ji,!0),Kr({point1:Lr,point2:an,eventType:"touchZoom"})}else Ri==="move"&&(Vn({x:Fi[0].clientX-Li.x,y:Fi[0].clientY-Li.y},"move"),Kr({eventType:"move"}))},Yi=function(){if(ei){if(Xi&&lr(!1),Kr({eventType:"none"}),kn>yi)return Vn({x:0,y:0,scale:kn},"touchZoom");var kt=mn.current.offsetWidth*yi,tr=mn.current.offsetHeight*yi,Fi=mn.current.getBoundingClientRect(),ri=Fi.left,Li=Fi.top,Ui=si%180!==0,Ri=ne(Ui?tr:kt,Ui?kt:tr,ri,Li);Ri&&Vn((0,Wt.Z)({},Ri),"dragRebound")}};return(0,Ut.useEffect)(function(){var kr;return ei&&be&&(kr=(0,Zt.Z)(window,"touchmove",function(kt){return kt.preventDefault()},{passive:!1})),function(){var kt;(kt=kr)===null||kt===void 0||kt.remove()}},[ei,be]),{isTouching:Xi,onTouchStart:Ir,onTouchMove:Or,onTouchEnd:Yi}}var Le=["fallback","src","imgRef"],tn=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],hi=function(be){var ei=be.fallback,kn=be.src,On=be.imgRef,Vn=(0,Ht.Z)(be,Le),Ki=Qn({src:kn,fallback:ei}),si=(0,ve.Z)(Ki,2),yi=si[0],Ei=si[1];return Ut.createElement("img",(0,St.Z)({ref:function(ii){On.current=ii,yi(ii)}},Vn,Ei))},ni=function(be){var ei=be.prefixCls,kn=be.src,On=be.alt,Vn=be.imageInfo,Ki=be.fallback,si=be.movable,yi=si===void 0?!0:si,Ei=be.onClose,qi=be.visible,ii=be.icons,ar=ii===void 0?{}:ii,Xi=be.rootClassName,lr=be.closeIcon,zi=be.getContainer,Kr=be.current,Ir=Kr===void 0?0:Kr,Or=be.count,Yi=Or===void 0?1:Or,kr=be.countRender,kt=be.scaleStep,tr=kt===void 0?.5:kt,Fi=be.minScale,ri=Fi===void 0?1:Fi,Li=be.maxScale,Ui=Li===void 0?50:Li,Ri=be.transitionName,Lr=Ri===void 0?"zoom":Ri,an=be.maskTransitionName,rn=an===void 0?"fade":an,Ge=be.imageRender,yn=be.imgCommonProps,ji=be.toolbarRender,Mi=be.onTransform,or=be.onChange,ln=(0,Ht.Z)(be,tn),Ln=(0,Ut.useRef)(),Pe=(0,Ut.useContext)(fe),sr=Pe&&Yi>1,$n=Pe&&Yi>=1,se=(0,Ut.useState)(!0),De=(0,ve.Z)(se,2),qn=De[0],Zn=De[1],Ye=_n(Ln,ri,Ui,Mi),Dn=Ye.transform,bi=Ye.resetTransform,ki=Ye.updateTransform,Ni=Ye.dispatchZoomChange,li=ai(Ln,yi,qi,tr,Dn,ki,Ni),ci=li.isMoving,fi=li.onMouseDown,Fn=li.onWheel,un=$e(Ln,yi,qi,ri,Dn,ki,Ni),We=un.isTouching,Mn=un.onTouchStart,$i=un.onTouchMove,hr=un.onTouchEnd,vr=Dn.rotate,Te=Dn.scale,xi=oe()((0,le.Z)({},"".concat(ei,"-moving"),ci));(0,Ut.useEffect)(function(){qn||Zn(!0)},[qn]);var er=function(){bi("close")},Si=function(){Ni(pn+tr,"zoomIn")},Mr=function(){Ni(pn/(pn+tr),"zoomOut")},ur=function(){ki({rotate:vr+90},"rotateRight")},Tr=function(){ki({rotate:vr-90},"rotateLeft")},gr=function(){ki({flipX:!Dn.flipX},"flipX")},ue=function(){ki({flipY:!Dn.flipY},"flipY")},re=function(){bi("reset")},ee=function(Bi){var mi=Ir+Bi;!Number.isInteger(mi)||mi<0||mi>Yi-1||(Zn(!1),bi(Bi<0?"prev":"next"),or==null||or(mi,Ir))},je=function(Bi){!qi||!sr||(Bi.keyCode===Yt.Z.LEFT?ee(-1):Bi.keyCode===Yt.Z.RIGHT&&ee(1))},xe=function(Bi){qi&&(Te!==1?ki({x:0,y:0,scale:1},"doubleClick"):Ni(pn+tr,"doubleClick",Bi.clientX,Bi.clientY))};(0,Ut.useEffect)(function(){var ti=(0,Zt.Z)(window,"keydown",je,!1);return function(){ti.remove()}},[qi,sr,Ir]);var An=Ut.createElement(hi,(0,St.Z)({},yn,{width:be.width,height:be.height,imgRef:Ln,className:"".concat(ei,"-img"),alt:On,style:{transform:"translate3d(".concat(Dn.x,"px, ").concat(Dn.y,"px, 0) scale3d(").concat(Dn.flipX?"-":"").concat(Te,", ").concat(Dn.flipY?"-":"").concat(Te,", 1) rotate(").concat(vr,"deg)"),transitionDuration:(!qn||We)&&"0s"},fallback:Ki,src:kn,onWheel:Fn,onMouseDown:fi,onDoubleClick:xe,onTouchStart:Mn,onTouchMove:$i,onTouchEnd:hr,onTouchCancel:hr})),ui=(0,Wt.Z)({url:kn,alt:On},Vn);return Ut.createElement(Ut.Fragment,null,Ut.createElement(Rt.Z,(0,St.Z)({transitionName:Lr,maskTransitionName:rn,closable:!1,keyboard:!0,prefixCls:ei,onClose:Ei,visible:qi,classNames:{wrapper:xi},rootClassName:Xi,getContainer:zi},ln,{afterClose:er}),Ut.createElement("div",{className:"".concat(ei,"-img-wrapper")},Ge?Ge(An,(0,Wt.Z)({transform:Dn,image:ui},Pe?{current:Ir}:{})):An)),Ut.createElement(_e,{visible:qi,transform:Dn,maskTransitionName:rn,closeIcon:lr,getContainer:zi,prefixCls:ei,rootClassName:Xi,icons:ar,countRender:kr,showSwitch:sr,showProgress:$n,current:Ir,count:Yi,scale:Te,minScale:ri,maxScale:Ui,toolbarRender:ji,onActive:ee,onZoomIn:Si,onZoomOut:Mr,onRotateRight:ur,onRotateLeft:Tr,onFlipX:gr,onFlipY:ue,onClose:Ei,onReset:re,zIndex:ln.zIndex!==void 0?ln.zIndex+1:void 0,image:ui}))},zt=ni,Ft=It(15142),mt=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function vt(mn){var be=Ut.useState({}),ei=(0,ve.Z)(be,2),kn=ei[0],On=ei[1],Vn=Ut.useCallback(function(si,yi){return On(function(Ei){return(0,Wt.Z)((0,Wt.Z)({},Ei),{},(0,le.Z)({},si,yi))}),function(){On(function(Ei){var qi=(0,Wt.Z)({},Ei);return delete qi[si],qi})}},[]),Ki=Ut.useMemo(function(){return mn?mn.map(function(si){if(typeof si=="string")return{data:{src:si}};var yi={};return Object.keys(si).forEach(function(Ei){["src"].concat((0,Ft.Z)(mt)).includes(Ei)&&(yi[Ei]=si[Ei])}),{data:yi}}):Object.keys(kn).reduce(function(si,yi){var Ei=kn[yi],qi=Ei.canPreview,ii=Ei.data;return qi&&si.push({data:ii,id:yi}),si},[])},[mn,kn]);return[Ki,Vn,!!mn]}var Et=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ct=["src"],_t=function(be){var ei,kn=be.previewPrefixCls,On=kn===void 0?"rc-image-preview":kn,Vn=be.children,Ki=be.icons,si=Ki===void 0?{}:Ki,yi=be.items,Ei=be.preview,qi=be.fallback,ii=(0,de.Z)(Ei)==="object"?Ei:{},ar=ii.visible,Xi=ii.onVisibleChange,lr=ii.getContainer,zi=ii.current,Kr=ii.movable,Ir=ii.minScale,Or=ii.maxScale,Yi=ii.countRender,kr=ii.closeIcon,kt=ii.onChange,tr=ii.onTransform,Fi=ii.toolbarRender,ri=ii.imageRender,Li=(0,Ht.Z)(ii,Et),Ui=vt(yi),Ri=(0,ve.Z)(Ui,3),Lr=Ri[0],an=Ri[1],rn=Ri[2],Ge=(0,bt.Z)(0,{value:zi}),yn=(0,ve.Z)(Ge,2),ji=yn[0],Mi=yn[1],or=(0,Ut.useState)(!1),ln=(0,ve.Z)(or,2),Ln=ln[0],Pe=ln[1],sr=((ei=Lr[ji])===null||ei===void 0?void 0:ei.data)||{},$n=sr.src,se=(0,Ht.Z)(sr,Ct),De=(0,bt.Z)(!!ar,{value:ar,onChange:function(We,Mn){Xi==null||Xi(We,Mn,ji)}}),qn=(0,ve.Z)(De,2),Zn=qn[0],Ye=qn[1],Dn=(0,Ut.useState)(null),bi=(0,ve.Z)(Dn,2),ki=bi[0],Ni=bi[1],li=Ut.useCallback(function(un,We,Mn,$i){var hr=rn?Lr.findIndex(function(vr){return vr.data.src===We}):Lr.findIndex(function(vr){return vr.id===un});Mi(hr<0?0:hr),Ye(!0),Ni({x:Mn,y:$i}),Pe(!0)},[Lr,rn]);Ut.useEffect(function(){Zn?Ln||Mi(0):Pe(!1)},[Zn]);var ci=function(We,Mn){Mi(We),kt==null||kt(We,Mn)},fi=function(){Ye(!1),Ni(null)},Fn=Ut.useMemo(function(){return{register:an,onPreview:li}},[an,li]);return Ut.createElement(fe.Provider,{value:Fn},Vn,Ut.createElement(zt,(0,St.Z)({"aria-hidden":!Zn,movable:Kr,visible:Zn,prefixCls:On,closeIcon:kr,onClose:fi,mousePosition:ki,imgCommonProps:se,src:$n,fallback:qi,icons:si,minScale:Ir,maxScale:Or,getContainer:lr,current:ji,count:Lr.length,countRender:Yi,onTransform:tr,toolbarRender:Fi,imageRender:ri,onChange:ci},Li)))},Ce=_t,Ze=0;function Bn(mn,be){var ei=Ut.useState(function(){return Ze+=1,String(Ze)}),kn=(0,ve.Z)(ei,1),On=kn[0],Vn=Ut.useContext(fe),Ki={data:be,canPreview:mn};return Ut.useEffect(function(){if(Vn)return Vn.register(On,Ki)},[]),Ut.useEffect(function(){Vn&&Vn.register(On,Ki)},[mn,be]),On}var ze=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Ue=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Xe=function(be){var ei=be.src,kn=be.alt,On=be.onPreviewClose,Vn=be.prefixCls,Ki=Vn===void 0?"rc-image":Vn,si=be.previewPrefixCls,yi=si===void 0?"".concat(Ki,"-preview"):si,Ei=be.placeholder,qi=be.fallback,ii=be.width,ar=be.height,Xi=be.style,lr=be.preview,zi=lr===void 0?!0:lr,Kr=be.className,Ir=be.onClick,Or=be.onError,Yi=be.wrapperClassName,kr=be.wrapperStyle,kt=be.rootClassName,tr=(0,Ht.Z)(be,ze),Fi=Ei&&Ei!==!0,ri=(0,de.Z)(zi)==="object"?zi:{},Li=ri.src,Ui=ri.visible,Ri=Ui===void 0?void 0:Ui,Lr=ri.onVisibleChange,an=Lr===void 0?On:Lr,rn=ri.getContainer,Ge=rn===void 0?void 0:rn,yn=ri.mask,ji=ri.maskClassName,Mi=ri.movable,or=ri.icons,ln=ri.scaleStep,Ln=ri.minScale,Pe=ri.maxScale,sr=ri.imageRender,$n=ri.toolbarRender,se=(0,Ht.Z)(ri,Ue),De=Li!=null?Li:ei,qn=(0,bt.Z)(!!Ri,{value:Ri,onChange:an}),Zn=(0,ve.Z)(qn,2),Ye=Zn[0],Dn=Zn[1],bi=Qn({src:ei,isCustomPlaceholder:Fi,fallback:qi}),ki=(0,ve.Z)(bi,3),Ni=ki[0],li=ki[1],ci=ki[2],fi=(0,Ut.useState)(null),Fn=(0,ve.Z)(fi,2),un=Fn[0],We=Fn[1],Mn=(0,Ut.useContext)(fe),$i=!!zi,hr=function(){Dn(!1),We(null)},vr=oe()(Ki,Yi,kt,(0,le.Z)({},"".concat(Ki,"-error"),ci==="error")),Te=(0,Ut.useMemo)(function(){var Mr={};return mt.forEach(function(ur){be[ur]!==void 0&&(Mr[ur]=be[ur])}),Mr},mt.map(function(Mr){return be[Mr]})),xi=(0,Ut.useMemo)(function(){return(0,Wt.Z)((0,Wt.Z)({},Te),{},{src:De})},[De,Te]),er=Bn($i,xi),Si=function(ur){var Tr=xt(ur.target),gr=Tr.left,ue=Tr.top;Mn?Mn.onPreview(er,De,gr,ue):(We({x:gr,y:ue}),Dn(!0)),Ir==null||Ir(ur)};return Ut.createElement(Ut.Fragment,null,Ut.createElement("div",(0,St.Z)({},tr,{className:vr,onClick:$i?Si:Ir,style:(0,Wt.Z)({width:ii,height:ar},kr)}),Ut.createElement("img",(0,St.Z)({},Te,{className:oe()("".concat(Ki,"-img"),(0,le.Z)({},"".concat(Ki,"-img-placeholder"),Ei===!0),Kr),style:(0,Wt.Z)({height:ar},Xi),ref:Ni},li,{width:ii,height:ar,onError:Or})),ci==="loading"&&Ut.createElement("div",{"aria-hidden":"true",className:"".concat(Ki,"-placeholder")},Ei),yn&&$i&&Ut.createElement("div",{className:oe()("".concat(Ki,"-mask"),ji),style:{display:(Xi==null?void 0:Xi.display)==="none"?"none":void 0}},yn)),!Mn&&$i&&Ut.createElement(zt,(0,St.Z)({"aria-hidden":!Ye,visible:Ye,prefixCls:yi,onClose:hr,mousePosition:un,src:De,alt:kn,imageInfo:{width:ii,height:ar},fallback:qi,getContainer:Ge,icons:or,movable:Mi,scaleStep:ln,minScale:Ln,maxScale:Pe,rootClassName:kt,imageRender:sr,imgCommonProps:Te,toolbarRender:$n},se)))};Xe.PreviewGroup=Ce;var dn=Xe,Kn=dn},23425:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Rt}});var St=It(52873),Wt=It(67711),le=It(26420),ve=It(98506),de=It(16886),Ht=It(92310),ie=It.n(Ht),oe=It(18929),he=It(10228),Gt=It(26112),Ie=It(48736),Xt=It(59301),Me=It(17119),Qt=[10,20,50,100],nt=function(Yt){var te=Yt.pageSizeOptions,ye=te===void 0?Qt:te,fe=Yt.locale,Ke=Yt.changeSize,_e=Yt.pageSize,nn=Yt.goButton,fn=Yt.quickGo,xn=Yt.rootPrefixCls,_n=Yt.disabled,Xn=Yt.buildOptionText,pe=Yt.showSizeChanger,ne=Yt.sizeChangerRender,pn=Xt.useState(""),Ai=(0,de.Z)(pn,2),ai=Ai[0],sn=Ai[1],Qn=function(){return!ai||Number.isNaN(ai)?void 0:Number(ai)},jn=typeof Xn=="function"?Xn:function(mt){return"".concat(mt," ").concat(fe.items_per_page)},Ti=function(vt){sn(vt.target.value)},$e=function(vt){nn||ai===""||(sn(""),!(vt.relatedTarget&&(vt.relatedTarget.className.indexOf("".concat(xn,"-item-link"))>=0||vt.relatedTarget.className.indexOf("".concat(xn,"-item"))>=0))&&(fn==null||fn(Qn())))},Le=function(vt){ai!==""&&(vt.keyCode===he.Z.ENTER||vt.type==="click")&&(sn(""),fn==null||fn(Qn()))},tn=function(){return ye.some(function(vt){return vt.toString()===_e.toString()})?ye:ye.concat([_e]).sort(function(vt,Et){var Ct=Number.isNaN(Number(vt))?0:Number(vt),_t=Number.isNaN(Number(Et))?0:Number(Et);return Ct-_t})},hi="".concat(xn,"-options");if(!pe&&!fn)return null;var ni=null,zt=null,Ft=null;return pe&&ne&&(ni=ne({disabled:_n,size:_e,onSizeChange:function(vt){Ke==null||Ke(Number(vt))},"aria-label":fe.page_size,className:"".concat(hi,"-size-changer"),options:tn().map(function(mt){return{label:jn(mt),value:mt}})})),fn&&(nn&&(Ft=typeof nn=="boolean"?Xt.createElement("button",{type:"button",onClick:Le,onKeyUp:Le,disabled:_n,className:"".concat(hi,"-quick-jumper-button")},fe.jump_to_confirm):Xt.createElement("span",{onClick:Le,onKeyUp:Le},nn)),zt=Xt.createElement("div",{className:"".concat(hi,"-quick-jumper")},fe.jump_to,Xt.createElement("input",{disabled:_n,type:"text",value:ai,onChange:Ti,onKeyUp:Le,onBlur:$e,"aria-label":fe.page}),fe.page,Ft)),Xt.createElement("li",{className:hi},ni,zt)},et=nt,At=function(Yt){var te=Yt.rootPrefixCls,ye=Yt.page,fe=Yt.active,Ke=Yt.className,_e=Yt.showTitle,nn=Yt.onClick,fn=Yt.onKeyPress,xn=Yt.itemRender,_n="".concat(te,"-item"),Xn=ie()(_n,"".concat(_n,"-").concat(ye),(0,St.Z)((0,St.Z)({},"".concat(_n,"-active"),fe),"".concat(_n,"-disabled"),!ye),Ke),pe=function(){nn(ye)},ne=function(ai){fn(ai,nn,ye)},pn=xn(ye,"page",Xt.createElement("a",{rel:"nofollow"},ye));return pn?Xt.createElement("li",{title:_e?String(ye):null,className:Xn,onClick:pe,onKeyDown:ne,tabIndex:0},pn):null},at=At,dt=function(Yt,te,ye){return ye};function gt(){}function xt(Zt){var Yt=Number(Zt);return typeof Yt=="number"&&!Number.isNaN(Yt)&&isFinite(Yt)&&Math.floor(Yt)===Yt}function bt(Zt,Yt,te){var ye=typeof Zt=="undefined"?Yt:Zt;return Math.floor((te-1)/ye)+1}var Ut=function(Yt){var te=Yt.prefixCls,ye=te===void 0?"rc-pagination":te,fe=Yt.selectPrefixCls,Ke=fe===void 0?"rc-select":fe,_e=Yt.className,nn=Yt.current,fn=Yt.defaultCurrent,xn=fn===void 0?1:fn,_n=Yt.total,Xn=_n===void 0?0:_n,pe=Yt.pageSize,ne=Yt.defaultPageSize,pn=ne===void 0?10:ne,Ai=Yt.onChange,ai=Ai===void 0?gt:Ai,sn=Yt.hideOnSinglePage,Qn=Yt.align,jn=Yt.showPrevNextJumpers,Ti=jn===void 0?!0:jn,$e=Yt.showQuickJumper,Le=Yt.showLessItems,tn=Yt.showTitle,hi=tn===void 0?!0:tn,ni=Yt.onShowSizeChange,zt=ni===void 0?gt:ni,Ft=Yt.locale,mt=Ft===void 0?Me.Z:Ft,vt=Yt.style,Et=Yt.totalBoundaryShowSizeChanger,Ct=Et===void 0?50:Et,_t=Yt.disabled,Ce=Yt.simple,Ze=Yt.showTotal,Bn=Yt.showSizeChanger,ze=Bn===void 0?Xn>Ct:Bn,Ue=Yt.sizeChangerRender,Xe=Yt.pageSizeOptions,dn=Yt.itemRender,Kn=dn===void 0?dt:dn,mn=Yt.jumpPrevIcon,be=Yt.jumpNextIcon,ei=Yt.prevIcon,kn=Yt.nextIcon,On=Xt.useRef(null),Vn=(0,oe.Z)(10,{value:pe,defaultValue:pn}),Ki=(0,de.Z)(Vn,2),si=Ki[0],yi=Ki[1],Ei=(0,oe.Z)(1,{value:nn,defaultValue:xn,postState:function(ui){return Math.max(1,Math.min(ui,bt(void 0,si,Xn)))}}),qi=(0,de.Z)(Ei,2),ii=qi[0],ar=qi[1],Xi=Xt.useState(ii),lr=(0,de.Z)(Xi,2),zi=lr[0],Kr=lr[1];(0,Xt.useEffect)(function(){Kr(ii)},[ii]);var Ir=ai!==gt,Or="current"in Yt,Yi=Math.max(1,ii-(Le?3:5)),kr=Math.min(bt(void 0,si,Xn),ii+(Le?3:5));function kt(An,ui){var ti=An||Xt.createElement("button",{type:"button","aria-label":ui,className:"".concat(ye,"-item-link")});return typeof An=="function"&&(ti=Xt.createElement(An,(0,ve.Z)({},Yt))),ti}function tr(An){var ui=An.target.value,ti=bt(void 0,si,Xn),Bi;return ui===""?Bi=ui:Number.isNaN(Number(ui))?Bi=zi:ui>=ti?Bi=ti:Bi=Number(ui),Bi}function Fi(An){return xt(An)&&An!==ii&&xt(Xn)&&Xn>0}var ri=Xn>si?$e:!1;function Li(An){(An.keyCode===he.Z.UP||An.keyCode===he.Z.DOWN)&&An.preventDefault()}function Ui(An){var ui=tr(An);switch(ui!==zi&&Kr(ui),An.keyCode){case he.Z.ENTER:an(ui);break;case he.Z.UP:an(ui-1);break;case he.Z.DOWN:an(ui+1);break;default:break}}function Ri(An){an(tr(An))}function Lr(An){var ui=bt(An,si,Xn),ti=ii>ui&&ui!==0?ui:ii;yi(An),Kr(ti),zt==null||zt(ii,An),ar(ti),ai==null||ai(ti,An)}function an(An){if(Fi(An)&&!_t){var ui=bt(void 0,si,Xn),ti=An;return An>ui?ti=ui:An<1&&(ti=1),ti!==zi&&Kr(ti),ar(ti),ai==null||ai(ti,si),ti}return ii}var rn=ii>1,Ge=ii<bt(void 0,si,Xn);function yn(){rn&&an(ii-1)}function ji(){Ge&&an(ii+1)}function Mi(){an(Yi)}function or(){an(kr)}function ln(An,ui){if(An.key==="Enter"||An.charCode===he.Z.ENTER||An.keyCode===he.Z.ENTER){for(var ti=arguments.length,Bi=new Array(ti>2?ti-2:0),mi=2;mi<ti;mi++)Bi[mi-2]=arguments[mi];ui.apply(void 0,Bi)}}function Ln(An){ln(An,yn)}function Pe(An){ln(An,ji)}function sr(An){ln(An,Mi)}function $n(An){ln(An,or)}function se(An){var ui=Kn(An,"prev",kt(ei,"prev page"));return Xt.isValidElement(ui)?Xt.cloneElement(ui,{disabled:!rn}):ui}function De(An){var ui=Kn(An,"next",kt(kn,"next page"));return Xt.isValidElement(ui)?Xt.cloneElement(ui,{disabled:!Ge}):ui}function qn(An){(An.type==="click"||An.keyCode===he.Z.ENTER)&&an(zi)}var Zn=null,Ye=(0,Gt.Z)(Yt,{aria:!0,data:!0}),Dn=Ze&&Xt.createElement("li",{className:"".concat(ye,"-total-text")},Ze(Xn,[Xn===0?0:(ii-1)*si+1,ii*si>Xn?Xn:ii*si])),bi=null,ki=bt(void 0,si,Xn);if(sn&&Xn<=si)return null;var Ni=[],li={rootPrefixCls:ye,onClick:an,onKeyPress:ln,showTitle:hi,itemRender:Kn,page:-1},ci=ii-1>0?ii-1:0,fi=ii+1<ki?ii+1:ki,Fn=$e&&$e.goButton,un=(0,le.Z)(Ce)==="object"?Ce.readOnly:!Ce,We=Fn,Mn=null;Ce&&(Fn&&(typeof Fn=="boolean"?We=Xt.createElement("button",{type:"button",onClick:qn,onKeyUp:qn},mt.jump_to_confirm):We=Xt.createElement("span",{onClick:qn,onKeyUp:qn},Fn),We=Xt.createElement("li",{title:hi?"".concat(mt.jump_to).concat(ii,"/").concat(ki):null,className:"".concat(ye,"-simple-pager")},We)),Mn=Xt.createElement("li",{title:hi?"".concat(ii,"/").concat(ki):null,className:"".concat(ye,"-simple-pager")},un?zi:Xt.createElement("input",{type:"text","aria-label":mt.jump_to,value:zi,disabled:_t,onKeyDown:Li,onKeyUp:Ui,onChange:Ui,onBlur:Ri,size:3}),Xt.createElement("span",{className:"".concat(ye,"-slash")},"/"),ki));var $i=Le?1:2;if(ki<=3+$i*2){ki||Ni.push(Xt.createElement(at,(0,Wt.Z)({},li,{key:"noPager",page:1,className:"".concat(ye,"-item-disabled")})));for(var hr=1;hr<=ki;hr+=1)Ni.push(Xt.createElement(at,(0,Wt.Z)({},li,{key:hr,page:hr,active:ii===hr})))}else{var vr=Le?mt.prev_3:mt.prev_5,Te=Le?mt.next_3:mt.next_5,xi=Kn(Yi,"jump-prev",kt(mn,"prev page")),er=Kn(kr,"jump-next",kt(be,"next page"));Ti&&(Zn=xi?Xt.createElement("li",{title:hi?vr:null,key:"prev",onClick:Mi,tabIndex:0,onKeyDown:sr,className:ie()("".concat(ye,"-jump-prev"),(0,St.Z)({},"".concat(ye,"-jump-prev-custom-icon"),!!mn))},xi):null,bi=er?Xt.createElement("li",{title:hi?Te:null,key:"next",onClick:or,tabIndex:0,onKeyDown:$n,className:ie()("".concat(ye,"-jump-next"),(0,St.Z)({},"".concat(ye,"-jump-next-custom-icon"),!!be))},er):null);var Si=Math.max(1,ii-$i),Mr=Math.min(ii+$i,ki);ii-1<=$i&&(Mr=1+$i*2),ki-ii<=$i&&(Si=ki-$i*2);for(var ur=Si;ur<=Mr;ur+=1)Ni.push(Xt.createElement(at,(0,Wt.Z)({},li,{key:ur,page:ur,active:ii===ur})));if(ii-1>=$i*2&&ii!==3&&(Ni[0]=Xt.cloneElement(Ni[0],{className:ie()("".concat(ye,"-item-after-jump-prev"),Ni[0].props.className)}),Ni.unshift(Zn)),ki-ii>=$i*2&&ii!==ki-2){var Tr=Ni[Ni.length-1];Ni[Ni.length-1]=Xt.cloneElement(Tr,{className:ie()("".concat(ye,"-item-before-jump-next"),Tr.props.className)}),Ni.push(bi)}Si!==1&&Ni.unshift(Xt.createElement(at,(0,Wt.Z)({},li,{key:1,page:1}))),Mr!==ki&&Ni.push(Xt.createElement(at,(0,Wt.Z)({},li,{key:ki,page:ki})))}var gr=se(ci);if(gr){var ue=!rn||!ki;gr=Xt.createElement("li",{title:hi?mt.prev_page:null,onClick:yn,tabIndex:ue?null:0,onKeyDown:Ln,className:ie()("".concat(ye,"-prev"),(0,St.Z)({},"".concat(ye,"-disabled"),ue)),"aria-disabled":ue},gr)}var re=De(fi);if(re){var ee,je;Ce?(ee=!Ge,je=rn?0:null):(ee=!Ge||!ki,je=ee?null:0),re=Xt.createElement("li",{title:hi?mt.next_page:null,onClick:ji,tabIndex:je,onKeyDown:Pe,className:ie()("".concat(ye,"-next"),(0,St.Z)({},"".concat(ye,"-disabled"),ee)),"aria-disabled":ee},re)}var xe=ie()(ye,_e,(0,St.Z)((0,St.Z)((0,St.Z)((0,St.Z)((0,St.Z)({},"".concat(ye,"-start"),Qn==="start"),"".concat(ye,"-center"),Qn==="center"),"".concat(ye,"-end"),Qn==="end"),"".concat(ye,"-simple"),Ce),"".concat(ye,"-disabled"),_t));return Xt.createElement("ul",(0,Wt.Z)({className:xe,style:vt,ref:On},Ye),Dn,gr,Ce?Mn:Ni,re,Xt.createElement(et,{locale:mt,rootPrefixCls:ye,disabled:_t,selectPrefixCls:Ke,changeSize:Lr,pageSize:si,pageSizeOptions:Xe,quickGo:ri?an:null,goButton:We,showSizeChanger:ze,sizeChangerRender:Ue}))},Rt=Ut},25930:function(Sn,Ve,It){"use strict";It.d(Ve,{Cd:function(){return ye}});var St=It(67711),Wt=It(98506),le=It(33346),ve=It(59301),de=It(92310),Ht=It.n(de),ie={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},oe=function(){var _e=(0,ve.useRef)([]),nn=(0,ve.useRef)(null);return(0,ve.useEffect)(function(){var fn=Date.now(),xn=!1;_e.current.forEach(function(_n){if(_n){xn=!0;var Xn=_n.style;Xn.transitionDuration=".3s, .3s, .3s, .06s",nn.current&&fn-nn.current<100&&(Xn.transitionDuration="0s, 0s")}}),xn&&(nn.current=Date.now())}),_e.current},he=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],Gt=function(_e){var nn=(0,Wt.Z)((0,Wt.Z)({},ie),_e),fn=nn.className,xn=nn.percent,_n=nn.prefixCls,Xn=nn.strokeColor,pe=nn.strokeLinecap,ne=nn.strokeWidth,pn=nn.style,Ai=nn.trailColor,ai=nn.trailWidth,sn=nn.transition,Qn=(0,le.Z)(nn,he);delete Qn.gapPosition;var jn=Array.isArray(xn)?xn:[xn],Ti=Array.isArray(Xn)?Xn:[Xn],$e=oe(),Le=ne/2,tn=100-ne/2,hi="M ".concat(pe==="round"?Le:0,",").concat(Le,`
L `).concat(pe==="round"?tn:100,",").concat(Le),ni="0 0 100 ".concat(ne),zt=0;return ve.createElement("svg",(0,St.Z)({className:Ht()("".concat(_n,"-line"),fn),viewBox:ni,preserveAspectRatio:"none",style:pn},Qn),ve.createElement("path",{className:"".concat(_n,"-line-trail"),d:hi,strokeLinecap:pe,stroke:Ai,strokeWidth:ai||ne,fillOpacity:"0"}),jn.map(function(Ft,mt){var vt=1;switch(pe){case"round":vt=1-ne/100;break;case"square":vt=1-ne/2/100;break;default:vt=1;break}var Et={strokeDasharray:"".concat(Ft*vt,"px, 100px"),strokeDashoffset:"-".concat(zt,"px"),transition:sn||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},Ct=Ti[mt]||Ti[Ti.length-1];return zt+=Ft,ve.createElement("path",{key:mt,className:"".concat(_n,"-line-path"),d:hi,strokeLinecap:pe,stroke:Ct,strokeWidth:ne,fillOpacity:"0",ref:function(Ce){$e[mt]=Ce},style:Et})}))},Ie=Gt,Xt=It(26420),Me=It(16886),Qt=It(47273),nt=0,et=(0,Qt.Z)();function At(){var Ke;return et?(Ke=nt,nt+=1):Ke="TEST_OR_SSR",Ke}var at=function(Ke){var _e=ve.useState(),nn=(0,Me.Z)(_e,2),fn=nn[0],xn=nn[1];return ve.useEffect(function(){xn("rc_progress_".concat(At()))},[]),Ke||fn},dt=function(_e){var nn=_e.bg,fn=_e.children;return ve.createElement("div",{style:{width:"100%",height:"100%",background:nn}},fn)};function gt(Ke,_e){return Object.keys(Ke).map(function(nn){var fn=parseFloat(nn),xn="".concat(Math.floor(fn*_e),"%");return"".concat(Ke[nn]," ").concat(xn)})}var xt=ve.forwardRef(function(Ke,_e){var nn=Ke.prefixCls,fn=Ke.color,xn=Ke.gradientId,_n=Ke.radius,Xn=Ke.style,pe=Ke.ptg,ne=Ke.strokeLinecap,pn=Ke.strokeWidth,Ai=Ke.size,ai=Ke.gapDegree,sn=fn&&(0,Xt.Z)(fn)==="object",Qn=sn?"#FFF":void 0,jn=Ai/2,Ti=ve.createElement("circle",{className:"".concat(nn,"-circle-path"),r:_n,cx:jn,cy:jn,stroke:Qn,strokeLinecap:ne,strokeWidth:pn,opacity:pe===0?0:1,style:Xn,ref:_e});if(!sn)return Ti;var $e="".concat(xn,"-conic"),Le=ai?"".concat(180+ai/2,"deg"):"0deg",tn=gt(fn,(360-ai)/360),hi=gt(fn,1),ni="conic-gradient(from ".concat(Le,", ").concat(tn.join(", "),")"),zt="linear-gradient(to ".concat(ai?"bottom":"top",", ").concat(hi.join(", "),")");return ve.createElement(ve.Fragment,null,ve.createElement("mask",{id:$e},Ti),ve.createElement("foreignObject",{x:0,y:0,width:Ai,height:Ai,mask:"url(#".concat($e,")")},ve.createElement(dt,{bg:zt},ve.createElement(dt,{bg:ni}))))}),bt=xt,Ut=100,Rt=function(_e,nn,fn,xn,_n,Xn,pe,ne,pn,Ai){var ai=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,sn=fn/100*360*((360-Xn)/360),Qn=Xn===0?0:{bottom:0,top:180,left:90,right:-90}[pe],jn=(100-xn)/100*nn;pn==="round"&&xn!==100&&(jn+=Ai/2,jn>=nn&&(jn=nn-.01));var Ti=Ut/2;return{stroke:typeof ne=="string"?ne:void 0,strokeDasharray:"".concat(nn,"px ").concat(_e),strokeDashoffset:jn+ai,transform:"rotate(".concat(_n+sn+Qn,"deg)"),transformOrigin:"".concat(Ti,"px ").concat(Ti,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},Zt=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function Yt(Ke){var _e=Ke!=null?Ke:[];return Array.isArray(_e)?_e:[_e]}var te=function(_e){var nn=(0,Wt.Z)((0,Wt.Z)({},ie),_e),fn=nn.id,xn=nn.prefixCls,_n=nn.steps,Xn=nn.strokeWidth,pe=nn.trailWidth,ne=nn.gapDegree,pn=ne===void 0?0:ne,Ai=nn.gapPosition,ai=nn.trailColor,sn=nn.strokeLinecap,Qn=nn.style,jn=nn.className,Ti=nn.strokeColor,$e=nn.percent,Le=(0,le.Z)(nn,Zt),tn=Ut/2,hi=at(fn),ni="".concat(hi,"-gradient"),zt=tn-Xn/2,Ft=Math.PI*2*zt,mt=pn>0?90+pn/2:-90,vt=Ft*((360-pn)/360),Et=(0,Xt.Z)(_n)==="object"?_n:{count:_n,gap:2},Ct=Et.count,_t=Et.gap,Ce=Yt($e),Ze=Yt(Ti),Bn=Ze.find(function(be){return be&&(0,Xt.Z)(be)==="object"}),ze=Bn&&(0,Xt.Z)(Bn)==="object",Ue=ze?"butt":sn,Xe=Rt(Ft,vt,0,100,mt,pn,Ai,ai,Ue,Xn),dn=oe(),Kn=function(){var ei=0;return Ce.map(function(kn,On){var Vn=Ze[On]||Ze[Ze.length-1],Ki=Rt(Ft,vt,ei,kn,mt,pn,Ai,Vn,Ue,Xn);return ei+=kn,ve.createElement(bt,{key:On,color:Vn,ptg:kn,radius:zt,prefixCls:xn,gradientId:ni,style:Ki,strokeLinecap:Ue,strokeWidth:Xn,gapDegree:pn,ref:function(yi){dn[On]=yi},size:Ut})}).reverse()},mn=function(){var ei=Math.round(Ct*(Ce[0]/100)),kn=100/Ct,On=0;return new Array(Ct).fill(null).map(function(Vn,Ki){var si=Ki<=ei-1?Ze[0]:ai,yi=si&&(0,Xt.Z)(si)==="object"?"url(#".concat(ni,")"):void 0,Ei=Rt(Ft,vt,On,kn,mt,pn,Ai,si,"butt",Xn,_t);return On+=(vt-Ei.strokeDashoffset+_t)*100/vt,ve.createElement("circle",{key:Ki,className:"".concat(xn,"-circle-path"),r:zt,cx:tn,cy:tn,stroke:yi,strokeWidth:Xn,opacity:1,style:Ei,ref:function(ii){dn[Ki]=ii}})})};return ve.createElement("svg",(0,St.Z)({className:Ht()("".concat(xn,"-circle"),jn),viewBox:"0 0 ".concat(Ut," ").concat(Ut),style:Qn,id:fn,role:"presentation"},Le),!Ct&&ve.createElement("circle",{className:"".concat(xn,"-circle-trail"),r:zt,cx:tn,cy:tn,stroke:ai,strokeLinecap:Ue,strokeWidth:pe||Xn,style:Xe}),Ct?mn():Kn())},ye=te,fe={Line:Ie,Circle:ye}},738:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return gt}});var St=It(67711),Wt=It(52873),le=It(16886),ve=It(33346),de=It(92310),Ht=It.n(de),ie=It(18929),oe=It(10228),he=It(26112),Gt=It(59301);function Ie(xt,bt){var Ut=xt.disabled,Rt=xt.prefixCls,Zt=xt.character,Yt=xt.characterRender,te=xt.index,ye=xt.count,fe=xt.value,Ke=xt.allowHalf,_e=xt.focused,nn=xt.onHover,fn=xt.onClick,xn=function(sn){nn(sn,te)},_n=function(sn){fn(sn,te)},Xn=function(sn){sn.keyCode===oe.Z.ENTER&&fn(sn,te)},pe=te+1,ne=new Set([Rt]);fe===0&&te===0&&_e?ne.add("".concat(Rt,"-focused")):Ke&&fe+.5>=pe&&fe<pe?(ne.add("".concat(Rt,"-half")),ne.add("".concat(Rt,"-active")),_e&&ne.add("".concat(Rt,"-focused"))):(pe<=fe?ne.add("".concat(Rt,"-full")):ne.add("".concat(Rt,"-zero")),pe===fe&&_e&&ne.add("".concat(Rt,"-focused")));var pn=typeof Zt=="function"?Zt(xt):Zt,Ai=Gt.createElement("li",{className:Ht()(Array.from(ne)),ref:bt},Gt.createElement("div",{onClick:Ut?null:_n,onKeyDown:Ut?null:Xn,onMouseMove:Ut?null:xn,role:"radio","aria-checked":fe>te?"true":"false","aria-posinset":te+1,"aria-setsize":ye,tabIndex:Ut?-1:0},Gt.createElement("div",{className:"".concat(Rt,"-first")},pn),Gt.createElement("div",{className:"".concat(Rt,"-second")},pn)));return Yt&&(Ai=Yt(Ai,xt)),Ai}var Xt=Gt.forwardRef(Ie);function Me(){var xt=Gt.useRef({});function bt(Rt){return xt.current[Rt]}function Ut(Rt){return function(Zt){xt.current[Rt]=Zt}}return[bt,Ut]}function Qt(xt){var bt=xt.pageXOffset,Ut="scrollLeft";if(typeof bt!="number"){var Rt=xt.document;bt=Rt.documentElement[Ut],typeof bt!="number"&&(bt=Rt.body[Ut])}return bt}function nt(xt){var bt,Ut,Rt=xt.ownerDocument,Zt=Rt.body,Yt=Rt&&Rt.documentElement,te=xt.getBoundingClientRect();return bt=te.left,Ut=te.top,bt-=Yt.clientLeft||Zt.clientLeft||0,Ut-=Yt.clientTop||Zt.clientTop||0,{left:bt,top:Ut}}function et(xt){var bt=nt(xt),Ut=xt.ownerDocument,Rt=Ut.defaultView||Ut.parentWindow;return bt.left+=Qt(Rt),bt.left}var At=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function at(xt,bt){var Ut=xt.prefixCls,Rt=Ut===void 0?"rc-rate":Ut,Zt=xt.className,Yt=xt.defaultValue,te=xt.value,ye=xt.count,fe=ye===void 0?5:ye,Ke=xt.allowHalf,_e=Ke===void 0?!1:Ke,nn=xt.allowClear,fn=nn===void 0?!0:nn,xn=xt.keyboard,_n=xn===void 0?!0:xn,Xn=xt.character,pe=Xn===void 0?"\u2605":Xn,ne=xt.characterRender,pn=xt.disabled,Ai=xt.direction,ai=Ai===void 0?"ltr":Ai,sn=xt.tabIndex,Qn=sn===void 0?0:sn,jn=xt.autoFocus,Ti=xt.onHoverChange,$e=xt.onChange,Le=xt.onFocus,tn=xt.onBlur,hi=xt.onKeyDown,ni=xt.onMouseLeave,zt=(0,ve.Z)(xt,At),Ft=Me(),mt=(0,le.Z)(Ft,2),vt=mt[0],Et=mt[1],Ct=Gt.useRef(null),_t=function(){if(!pn){var Yi;(Yi=Ct.current)===null||Yi===void 0||Yi.focus()}};Gt.useImperativeHandle(bt,function(){return{focus:_t,blur:function(){if(!pn){var Yi;(Yi=Ct.current)===null||Yi===void 0||Yi.blur()}}}});var Ce=(0,ie.Z)(Yt||0,{value:te}),Ze=(0,le.Z)(Ce,2),Bn=Ze[0],ze=Ze[1],Ue=(0,ie.Z)(null),Xe=(0,le.Z)(Ue,2),dn=Xe[0],Kn=Xe[1],mn=function(Yi,kr){var kt=ai==="rtl",tr=Yi+1;if(_e){var Fi=vt(Yi),ri=et(Fi),Li=Fi.clientWidth;(kt&&kr-ri>Li/2||!kt&&kr-ri<Li/2)&&(tr-=.5)}return tr},be=function(Yi){ze(Yi),$e==null||$e(Yi)},ei=Gt.useState(!1),kn=(0,le.Z)(ei,2),On=kn[0],Vn=kn[1],Ki=function(){Vn(!0),Le==null||Le()},si=function(){Vn(!1),tn==null||tn()},yi=Gt.useState(null),Ei=(0,le.Z)(yi,2),qi=Ei[0],ii=Ei[1],ar=function(Yi,kr){var kt=mn(kr,Yi.pageX);kt!==dn&&(ii(kt),Kn(null)),Ti==null||Ti(kt)},Xi=function(Yi){pn||(ii(null),Kn(null),Ti==null||Ti(void 0)),Yi&&(ni==null||ni(Yi))},lr=function(Yi,kr){var kt=mn(kr,Yi.pageX),tr=!1;fn&&(tr=kt===Bn),Xi(),be(tr?0:kt),Kn(tr?kt:null)},zi=function(Yi){var kr=Yi.keyCode,kt=ai==="rtl",tr=_e?.5:1;_n&&(kr===oe.Z.RIGHT&&Bn<fe&&!kt?(be(Bn+tr),Yi.preventDefault()):kr===oe.Z.LEFT&&Bn>0&&!kt||kr===oe.Z.RIGHT&&Bn>0&&kt?(be(Bn-tr),Yi.preventDefault()):kr===oe.Z.LEFT&&Bn<fe&&kt&&(be(Bn+tr),Yi.preventDefault())),hi==null||hi(Yi)};Gt.useEffect(function(){jn&&!pn&&_t()},[]);var Kr=new Array(fe).fill(0).map(function(Or,Yi){return Gt.createElement(Xt,{ref:Et(Yi),index:Yi,count:fe,disabled:pn,prefixCls:"".concat(Rt,"-star"),allowHalf:_e,value:qi===null?Bn:qi,onClick:lr,onHover:ar,key:Or||Yi,character:pe,characterRender:ne,focused:On})}),Ir=Ht()(Rt,Zt,(0,Wt.Z)((0,Wt.Z)({},"".concat(Rt,"-disabled"),pn),"".concat(Rt,"-rtl"),ai==="rtl"));return Gt.createElement("ul",(0,St.Z)({className:Ir,onMouseLeave:Xi,tabIndex:pn?-1:Qn,onFocus:pn?null:Ki,onBlur:pn?null:si,onKeyDown:pn?null:zi,ref:Ct},(0,he.Z)(zt,{aria:!0,data:!0,attr:!0})),Kr)}var dt=Gt.forwardRef(at),gt=dt},6551:function(Sn,Ve,It){"use strict";It.d(Ve,{ZP:function(){return ie}});var St=It(16886),Wt=It(59301),le=It(47273),ve=0,de=(0,le.Z)();function Ht(){var oe;return de?(oe=ve,ve+=1):oe="TEST_OR_SSR",oe}function ie(oe){var he=Wt.useState(),Gt=(0,St.Z)(he,2),Ie=Gt[0],Xt=Gt[1];return Wt.useEffect(function(){Xt("rc_select_".concat(Ht()))},[]),oe||Ie}},37463:function(Sn,Ve,It){"use strict";It.d(Ve,{Ac:function(){return Vn},Xo:function(){return si},Wx:function(){return Ei},ZP:function(){return $n},lk:function(){return gt}});var St=It(67711),Wt=It(15142),le=It(52873),ve=It(98506),de=It(16886),Ht=It(33346),ie=It(26420),oe=It(18929),he=It(48736),Gt=It(59301),Ie=It(92310),Xt=It.n(Ie),Me=It(34280),Qt=It(49658),nt=It(8654),et=function(De){var qn=De.className,Zn=De.customizeIcon,Ye=De.customizeIconProps,Dn=De.children,bi=De.onMouseDown,ki=De.onClick,Ni=typeof Zn=="function"?Zn(Ye):Zn;return Gt.createElement("span",{className:qn,onMouseDown:function(ci){ci.preventDefault(),bi==null||bi(ci)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:ki,"aria-hidden":!0},Ni!==void 0?Ni:Gt.createElement("span",{className:Xt()(qn.split(/\s+/).map(function(li){return"".concat(li,"-icon")}))},Dn))},At=et,at=function(De,qn,Zn,Ye,Dn){var bi=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,ki=arguments.length>6?arguments[6]:void 0,Ni=arguments.length>7?arguments[7]:void 0,li=Gt.useMemo(function(){if((0,ie.Z)(Ye)==="object")return Ye.clearIcon;if(Dn)return Dn},[Ye,Dn]),ci=Gt.useMemo(function(){return!!(!bi&&Ye&&(Zn.length||ki)&&!(Ni==="combobox"&&ki===""))},[Ye,bi,Zn.length,ki,Ni]);return{allowClear:ci,clearIcon:Gt.createElement(At,{className:"".concat(De,"-clear"),onMouseDown:qn,customizeIcon:li},"\xD7")}},dt=Gt.createContext(null);function gt(){return Gt.useContext(dt)}function xt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,De=Gt.useState(!1),qn=(0,de.Z)(De,2),Zn=qn[0],Ye=qn[1],Dn=Gt.useRef(null),bi=function(){window.clearTimeout(Dn.current)};Gt.useEffect(function(){return bi},[]);var ki=function(li,ci){bi(),Dn.current=window.setTimeout(function(){Ye(li),ci&&ci()},se)};return[Zn,ki,bi]}function bt(){var se=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,De=Gt.useRef(null),qn=Gt.useRef(null);Gt.useEffect(function(){return function(){window.clearTimeout(qn.current)}},[]);function Zn(Ye){(Ye||De.current===null)&&(De.current=Ye),window.clearTimeout(qn.current),qn.current=window.setTimeout(function(){De.current=null},se)}return[function(){return De.current},Zn]}function Ut(se,De,qn,Zn){var Ye=Gt.useRef(null);Ye.current={open:De,triggerOpen:qn,customizedTrigger:Zn},Gt.useEffect(function(){function Dn(bi){var ki;if(!((ki=Ye.current)!==null&&ki!==void 0&&ki.customizedTrigger)){var Ni=bi.target;Ni.shadowRoot&&bi.composed&&(Ni=bi.composedPath()[0]||Ni),Ye.current.open&&se().filter(function(li){return li}).every(function(li){return!li.contains(Ni)&&li!==Ni})&&Ye.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Dn),function(){return window.removeEventListener("mousedown",Dn)}},[])}var Rt=It(10228);function Zt(se){return se&&![Rt.Z.ESC,Rt.Z.SHIFT,Rt.Z.BACKSPACE,Rt.Z.TAB,Rt.Z.WIN_KEY,Rt.Z.ALT,Rt.Z.META,Rt.Z.WIN_KEY_RIGHT,Rt.Z.CTRL,Rt.Z.SEMICOLON,Rt.Z.EQUALS,Rt.Z.CAPS_LOCK,Rt.Z.CONTEXT_MENU,Rt.Z.F1,Rt.Z.F2,Rt.Z.F3,Rt.Z.F4,Rt.Z.F5,Rt.Z.F6,Rt.Z.F7,Rt.Z.F8,Rt.Z.F9,Rt.Z.F10,Rt.Z.F11,Rt.Z.F12].includes(se)}var Yt=It(26112),te=It(11780);function ye(se,De,qn){var Zn=(0,ve.Z)((0,ve.Z)({},se),qn?De:{});return Object.keys(De).forEach(function(Ye){var Dn=De[Ye];typeof Dn=="function"&&(Zn[Ye]=function(){for(var bi,ki=arguments.length,Ni=new Array(ki),li=0;li<ki;li++)Ni[li]=arguments[li];return Dn.apply(void 0,Ni),(bi=se[Ye])===null||bi===void 0?void 0:bi.call.apply(bi,[se].concat(Ni))})}),Zn}var fe=ye,Ke=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],_e=function(De,qn){var Zn=De.prefixCls,Ye=De.id,Dn=De.inputElement,bi=De.autoFocus,ki=De.autoComplete,Ni=De.editable,li=De.activeDescendantId,ci=De.value,fi=De.open,Fn=De.attrs,un=(0,Ht.Z)(De,Ke),We=Dn||Gt.createElement("input",null),Mn=We,$i=Mn.ref,hr=Mn.props;return(0,he.Kp)(!("maxLength"in We.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),We=Gt.cloneElement(We,(0,ve.Z)((0,ve.Z)((0,ve.Z)({type:"search"},fe(un,hr,!0)),{},{id:Ye,ref:(0,nt.sQ)(qn,$i),autoComplete:ki||"off",autoFocus:bi,className:Xt()("".concat(Zn,"-selection-search-input"),hr==null?void 0:hr.className),role:"combobox","aria-expanded":fi||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ye,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ye,"_list"),"aria-activedescendant":fi?li:void 0},Fn),{},{value:Ni?ci:"",readOnly:!Ni,unselectable:Ni?null:"on",style:(0,ve.Z)((0,ve.Z)({},hr.style),{},{opacity:Ni?null:0})})),We},nn=Gt.forwardRef(_e),fn=nn;function xn(se){return Array.isArray(se)?se:se!==void 0?[se]:[]}var _n=typeof window!="undefined"&&window.document&&window.document.documentElement,Xn=_n;function pe(se){return se!=null}function ne(se){return!se&&se!==0}function pn(se){return["string","number"].includes((0,ie.Z)(se))}function Ai(se){var De=void 0;return se&&(pn(se.title)?De=se.title.toString():pn(se.label)&&(De=se.label.toString())),De}function ai(se,De){Xn?Gt.useLayoutEffect(se,De):Gt.useEffect(se,De)}function sn(se){var De;return(De=se.key)!==null&&De!==void 0?De:se.value}var Qn=function(De){De.preventDefault(),De.stopPropagation()},jn=function(De){var qn=De.id,Zn=De.prefixCls,Ye=De.values,Dn=De.open,bi=De.searchValue,ki=De.autoClearSearchValue,Ni=De.inputRef,li=De.placeholder,ci=De.disabled,fi=De.mode,Fn=De.showSearch,un=De.autoFocus,We=De.autoComplete,Mn=De.activeDescendantId,$i=De.tabIndex,hr=De.removeIcon,vr=De.maxTagCount,Te=De.maxTagTextLength,xi=De.maxTagPlaceholder,er=xi===void 0?function(Rn){return"+ ".concat(Rn.length," ...")}:xi,Si=De.tagRender,Mr=De.onToggleOpen,ur=De.onRemove,Tr=De.onInputChange,gr=De.onInputPaste,ue=De.onInputKeyDown,re=De.onInputMouseDown,ee=De.onInputCompositionStart,je=De.onInputCompositionEnd,xe=De.onInputBlur,An=Gt.useRef(null),ui=(0,Gt.useState)(0),ti=(0,de.Z)(ui,2),Bi=ti[0],mi=ti[1],oi=(0,Gt.useState)(!1),Di=(0,de.Z)(oi,2),Ne=Di[0],hn=Di[1],ke="".concat(Zn,"-selection"),Ot=Dn||fi==="multiple"&&ki===!1||fi==="tags"?bi:"",vn=fi==="tags"||fi==="multiple"&&ki===!1||Fn&&(Dn||Ne);ai(function(){mi(An.current.scrollWidth)},[Ot]);var Jn=function(gn,Cn,Tn,qe,In){return Gt.createElement("span",{title:Ai(gn),className:Xt()("".concat(ke,"-item"),(0,le.Z)({},"".concat(ke,"-item-disabled"),Tn))},Gt.createElement("span",{className:"".concat(ke,"-item-content")},Cn),qe&&Gt.createElement(At,{className:"".concat(ke,"-item-remove"),onMouseDown:Qn,onClick:In,customizeIcon:hr},"\xD7"))},vi=function(gn,Cn,Tn,qe,In,on){var _i=function(nr){Qn(nr),Mr(!Dn)};return Gt.createElement("span",{onMouseDown:_i},Si({label:Cn,value:gn,disabled:Tn,closable:qe,onClose:In,isMaxTag:!!on}))},Ee=function(gn){var Cn=gn.disabled,Tn=gn.label,qe=gn.value,In=!ci&&!Cn,on=Tn;if(typeof Te=="number"&&(typeof Tn=="string"||typeof Tn=="number")){var _i=String(on);_i.length>Te&&(on="".concat(_i.slice(0,Te),"..."))}var Qi=function(Gi){Gi&&Gi.stopPropagation(),ur(gn)};return typeof Si=="function"?vi(qe,on,Cn,In,Qi):Jn(gn,on,Cn,In,Qi)},Wn=function(gn){if(!Ye.length)return null;var Cn=typeof er=="function"?er(gn):er;return typeof Si=="function"?vi(void 0,Cn,!1,!1,void 0,!0):Jn({title:Cn},Cn,!1)},cn=Gt.createElement("div",{className:"".concat(ke,"-search"),style:{width:Bi},onFocus:function(){hn(!0)},onBlur:function(){hn(!1)}},Gt.createElement(fn,{ref:Ni,open:Dn,prefixCls:Zn,id:qn,inputElement:null,disabled:ci,autoFocus:un,autoComplete:We,editable:vn,activeDescendantId:Mn,value:Ot,onKeyDown:ue,onMouseDown:re,onChange:Tr,onPaste:gr,onCompositionStart:ee,onCompositionEnd:je,onBlur:xe,tabIndex:$i,attrs:(0,Yt.Z)(De,!0)}),Gt.createElement("span",{ref:An,className:"".concat(ke,"-search-mirror"),"aria-hidden":!0},Ot,"\xA0")),Un=Gt.createElement(te.Z,{prefixCls:"".concat(ke,"-overflow"),data:Ye,renderItem:Ee,renderRest:Wn,suffix:cn,itemKey:sn,maxCount:vr});return Gt.createElement("span",{className:"".concat(ke,"-wrap")},Un,!Ye.length&&!Ot&&Gt.createElement("span",{className:"".concat(ke,"-placeholder")},li))},Ti=jn,$e=function(De){var qn=De.inputElement,Zn=De.prefixCls,Ye=De.id,Dn=De.inputRef,bi=De.disabled,ki=De.autoFocus,Ni=De.autoComplete,li=De.activeDescendantId,ci=De.mode,fi=De.open,Fn=De.values,un=De.placeholder,We=De.tabIndex,Mn=De.showSearch,$i=De.searchValue,hr=De.activeValue,vr=De.maxLength,Te=De.onInputKeyDown,xi=De.onInputMouseDown,er=De.onInputChange,Si=De.onInputPaste,Mr=De.onInputCompositionStart,ur=De.onInputCompositionEnd,Tr=De.onInputBlur,gr=De.title,ue=Gt.useState(!1),re=(0,de.Z)(ue,2),ee=re[0],je=re[1],xe=ci==="combobox",An=xe||Mn,ui=Fn[0],ti=$i||"";xe&&hr&&!ee&&(ti=hr),Gt.useEffect(function(){xe&&je(!1)},[xe,hr]);var Bi=ci!=="combobox"&&!fi&&!Mn?!1:!!ti,mi=gr===void 0?Ai(ui):gr,oi=Gt.useMemo(function(){return ui?null:Gt.createElement("span",{className:"".concat(Zn,"-selection-placeholder"),style:Bi?{visibility:"hidden"}:void 0},un)},[ui,Bi,un,Zn]);return Gt.createElement("span",{className:"".concat(Zn,"-selection-wrap")},Gt.createElement("span",{className:"".concat(Zn,"-selection-search")},Gt.createElement(fn,{ref:Dn,prefixCls:Zn,id:Ye,open:fi,inputElement:qn,disabled:bi,autoFocus:ki,autoComplete:Ni,editable:An,activeDescendantId:li,value:ti,onKeyDown:Te,onMouseDown:xi,onChange:function(Ne){je(!0),er(Ne)},onPaste:Si,onCompositionStart:Mr,onCompositionEnd:ur,onBlur:Tr,tabIndex:We,attrs:(0,Yt.Z)(De,!0),maxLength:xe?vr:void 0})),!xe&&ui?Gt.createElement("span",{className:"".concat(Zn,"-selection-item"),title:mi,style:Bi?{visibility:"hidden"}:void 0},ui.label):null,oi)},Le=$e,tn=function(De,qn){var Zn=(0,Gt.useRef)(null),Ye=(0,Gt.useRef)(!1),Dn=De.prefixCls,bi=De.open,ki=De.mode,Ni=De.showSearch,li=De.tokenWithEnter,ci=De.disabled,fi=De.prefix,Fn=De.autoClearSearchValue,un=De.onSearch,We=De.onSearchSubmit,Mn=De.onToggleOpen,$i=De.onInputKeyDown,hr=De.onInputBlur,vr=De.domRef;Gt.useImperativeHandle(qn,function(){return{focus:function(mi){Zn.current.focus(mi)},blur:function(){Zn.current.blur()}}});var Te=bt(0),xi=(0,de.Z)(Te,2),er=xi[0],Si=xi[1],Mr=function(mi){var oi=mi.which,Di=Zn.current instanceof HTMLTextAreaElement;!Di&&bi&&(oi===Rt.Z.UP||oi===Rt.Z.DOWN)&&mi.preventDefault(),$i&&$i(mi),oi===Rt.Z.ENTER&&ki==="tags"&&!Ye.current&&!bi&&(We==null||We(mi.target.value)),!(Di&&!bi&&~[Rt.Z.UP,Rt.Z.DOWN,Rt.Z.LEFT,Rt.Z.RIGHT].indexOf(oi))&&Zt(oi)&&Mn(!0)},ur=function(){Si(!0)},Tr=(0,Gt.useRef)(null),gr=function(mi){un(mi,!0,Ye.current)!==!1&&Mn(!0)},ue=function(){Ye.current=!0},re=function(mi){Ye.current=!1,ki!=="combobox"&&gr(mi.target.value)},ee=function(mi){var oi=mi.target.value;if(li&&Tr.current&&/[\r\n]/.test(Tr.current)){var Di=Tr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");oi=oi.replace(Di,Tr.current)}Tr.current=null,gr(oi)},je=function(mi){var oi=mi.clipboardData,Di=oi==null?void 0:oi.getData("text");Tr.current=Di||""},xe=function(mi){var oi=mi.target;if(oi!==Zn.current){var Di=document.body.style.msTouchAction!==void 0;Di?setTimeout(function(){Zn.current.focus()}):Zn.current.focus()}},An=function(mi){var oi=er();mi.target!==Zn.current&&!oi&&!(ki==="combobox"&&ci)&&mi.preventDefault(),(ki!=="combobox"&&(!Ni||!oi)||!bi)&&(bi&&Fn!==!1&&un("",!0,!1),Mn())},ui={inputRef:Zn,onInputKeyDown:Mr,onInputMouseDown:ur,onInputChange:ee,onInputPaste:je,onInputCompositionStart:ue,onInputCompositionEnd:re,onInputBlur:hr},ti=ki==="multiple"||ki==="tags"?Gt.createElement(Ti,(0,St.Z)({},De,ui)):Gt.createElement(Le,(0,St.Z)({},De,ui));return Gt.createElement("div",{ref:vr,className:"".concat(Dn,"-selector"),onClick:xe,onMouseDown:An},fi&&Gt.createElement("div",{className:"".concat(Dn,"-prefix")},fi),ti)},hi=Gt.forwardRef(tn),ni=hi,zt=It(65030),Ft=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],mt=function(De){var qn=De===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:qn,adjustY:1},htmlRegion:"scroll"}}},vt=function(De,qn){var Zn=De.prefixCls,Ye=De.disabled,Dn=De.visible,bi=De.children,ki=De.popupElement,Ni=De.animation,li=De.transitionName,ci=De.dropdownStyle,fi=De.dropdownClassName,Fn=De.direction,un=Fn===void 0?"ltr":Fn,We=De.placement,Mn=De.builtinPlacements,$i=De.dropdownMatchSelectWidth,hr=De.dropdownRender,vr=De.dropdownAlign,Te=De.getPopupContainer,xi=De.empty,er=De.getTriggerDOMNode,Si=De.onPopupVisibleChange,Mr=De.onPopupMouseEnter,ur=(0,Ht.Z)(De,Ft),Tr="".concat(Zn,"-dropdown"),gr=ki;hr&&(gr=hr(ki));var ue=Gt.useMemo(function(){return Mn||mt($i)},[Mn,$i]),re=Ni?"".concat(Tr,"-").concat(Ni):li,ee=typeof $i=="number",je=Gt.useMemo(function(){return ee?null:$i===!1?"minWidth":"width"},[$i,ee]),xe=ci;ee&&(xe=(0,ve.Z)((0,ve.Z)({},xe),{},{width:$i}));var An=Gt.useRef(null);return Gt.useImperativeHandle(qn,function(){return{getPopupElement:function(){var ti;return(ti=An.current)===null||ti===void 0?void 0:ti.popupElement}}}),Gt.createElement(zt.Z,(0,St.Z)({},ur,{showAction:Si?["click"]:[],hideAction:Si?["click"]:[],popupPlacement:We||(un==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:ue,prefixCls:Tr,popupTransitionName:re,popup:Gt.createElement("div",{onMouseEnter:Mr},gr),ref:An,stretch:je,popupAlign:vr,popupVisible:Dn,getPopupContainer:Te,popupClassName:Xt()(fi,(0,le.Z)({},"".concat(Tr,"-empty"),xi)),popupStyle:xe,getTriggerDOMNode:er,onPopupVisibleChange:Si}),bi)},Et=Gt.forwardRef(vt),Ct=Et,_t=It(57879);function Ce(se,De){var qn=se.key,Zn;return"value"in se&&(Zn=se.value),qn!=null?qn:Zn!==void 0?Zn:"rc-index-key-".concat(De)}function Ze(se){return typeof se!="undefined"&&!Number.isNaN(se)}function Bn(se,De){var qn=se||{},Zn=qn.label,Ye=qn.value,Dn=qn.options,bi=qn.groupLabel,ki=Zn||(De?"children":"label");return{label:ki,value:Ye||"value",options:Dn||"options",groupLabel:bi||ki}}function ze(se){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},qn=De.fieldNames,Zn=De.childrenAsData,Ye=[],Dn=Bn(qn,!1),bi=Dn.label,ki=Dn.value,Ni=Dn.options,li=Dn.groupLabel;function ci(fi,Fn){Array.isArray(fi)&&fi.forEach(function(un){if(Fn||!(Ni in un)){var We=un[ki];Ye.push({key:Ce(un,Ye.length),groupOption:Fn,data:un,label:un[bi],value:We})}else{var Mn=un[li];Mn===void 0&&Zn&&(Mn=un.label),Ye.push({key:Ce(un,Ye.length),group:!0,data:un,label:Mn}),ci(un[Ni],!0)}})}return ci(se,!1),Ye}function Ue(se){var De=(0,ve.Z)({},se);return"props"in De||Object.defineProperty(De,"props",{get:function(){return(0,he.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),De}}),De}var Xe=function(De,qn,Zn){if(!qn||!qn.length)return null;var Ye=!1,Dn=function ki(Ni,li){var ci=(0,_t.Z)(li),fi=ci[0],Fn=ci.slice(1);if(!fi)return[Ni];var un=Ni.split(fi);return Ye=Ye||un.length>1,un.reduce(function(We,Mn){return[].concat((0,Wt.Z)(We),(0,Wt.Z)(ki(Mn,Fn)))},[]).filter(Boolean)},bi=Dn(De,qn);return Ye?typeof Zn!="undefined"?bi.slice(0,Zn):bi:null},dn=Gt.createContext(null),Kn=dn;function mn(se){var De=se.visible,qn=se.values;if(!De)return null;var Zn=50;return Gt.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(qn.slice(0,Zn).map(function(Ye){var Dn=Ye.label,bi=Ye.value;return["number","string"].includes((0,ie.Z)(Dn))?Dn:bi}).join(", ")),qn.length>Zn?", ...":null)}var be=["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"],ei=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],kn=function(De){return De==="tags"||De==="multiple"},On=Gt.forwardRef(function(se,De){var qn,Zn=se.id,Ye=se.prefixCls,Dn=se.className,bi=se.showSearch,ki=se.tagRender,Ni=se.direction,li=se.omitDomProps,ci=se.displayValues,fi=se.onDisplayValuesChange,Fn=se.emptyOptions,un=se.notFoundContent,We=un===void 0?"Not Found":un,Mn=se.onClear,$i=se.mode,hr=se.disabled,vr=se.loading,Te=se.getInputElement,xi=se.getRawInputElement,er=se.open,Si=se.defaultOpen,Mr=se.onDropdownVisibleChange,ur=se.activeValue,Tr=se.onActiveValueChange,gr=se.activeDescendantId,ue=se.searchValue,re=se.autoClearSearchValue,ee=se.onSearch,je=se.onSearchSplit,xe=se.tokenSeparators,An=se.allowClear,ui=se.prefix,ti=se.suffixIcon,Bi=se.clearIcon,mi=se.OptionList,oi=se.animation,Di=se.transitionName,Ne=se.dropdownStyle,hn=se.dropdownClassName,ke=se.dropdownMatchSelectWidth,Ot=se.dropdownRender,vn=se.dropdownAlign,Jn=se.placement,vi=se.builtinPlacements,Ee=se.getPopupContainer,Wn=se.showAction,cn=Wn===void 0?[]:Wn,Un=se.onFocus,Rn=se.onBlur,gn=se.onKeyUp,Cn=se.onKeyDown,Tn=se.onMouseDown,qe=(0,Ht.Z)(se,be),In=kn($i),on=(bi!==void 0?bi:In)||$i==="combobox",_i=(0,ve.Z)({},qe);ei.forEach(function(Ro){delete _i[Ro]}),li==null||li.forEach(function(Ro){delete _i[Ro]});var Qi=Gt.useState(!1),nr=(0,de.Z)(Qi,2),Gi=nr[0],Fr=nr[1];Gt.useEffect(function(){Fr((0,Qt.Z)())},[]);var yr=Gt.useRef(null),Zr=Gt.useRef(null),_r=Gt.useRef(null),Wr=Gt.useRef(null),no=Gt.useRef(null),Oe=Gt.useRef(!1),Nr=xt(),Ur=(0,de.Z)(Nr,3),Sr=Ur[0],Ar=Ur[1],Jr=Ur[2];Gt.useImperativeHandle(De,function(){var Ro,wo;return{focus:(Ro=Wr.current)===null||Ro===void 0?void 0:Ro.focus,blur:(wo=Wr.current)===null||wo===void 0?void 0:wo.blur,scrollTo:function(ir){var ea;return(ea=no.current)===null||ea===void 0?void 0:ea.scrollTo(ir)},nativeElement:yr.current||Zr.current}});var Ao=Gt.useMemo(function(){var Ro;if($i!=="combobox")return ue;var wo=(Ro=ci[0])===null||Ro===void 0?void 0:Ro.value;return typeof wo=="string"||typeof wo=="number"?String(wo):""},[ue,$i,ci]),io=$i==="combobox"&&typeof Te=="function"&&Te()||null,Dr=typeof xi=="function"&&xi(),fo=(0,nt.x1)(Zr,Dr==null||(qn=Dr.props)===null||qn===void 0?void 0:qn.ref),es=Gt.useState(!1),Zs=(0,de.Z)(es,2),Ua=Zs[0],us=Zs[1];(0,Me.Z)(function(){us(!0)},[]);var wr=(0,oe.Z)(!1,{defaultValue:Si,value:er}),ns=(0,de.Z)(wr,2),rs=ns[0],fs=ns[1],As=Ua?rs:!1,Cs=!We&&Fn;(hr||Cs&&As&&$i==="combobox")&&(As=!1);var Ci=Cs?!1:As,pr=Gt.useCallback(function(Ro){var wo=Ro!==void 0?Ro:!As;hr||(fs(wo),As!==wo&&(Mr==null||Mr(wo)))},[hr,As,fs,Mr]),Qr=Gt.useMemo(function(){return(xe||[]).some(function(Ro){return[`
`,`\r
`].includes(Ro)})},[xe]),$r=Gt.useContext(Kn)||{},so=$r.maxCount,xo=$r.rawValues,cr=function(wo,ps,ir){if(!(In&&Ze(so)&&(xo==null?void 0:xo.size)>=so)){var ea=!0,Be=wo;Tr==null||Tr(null);var Hn=Xe(wo,xe,Ze(so)?so-xo.size:void 0),kl=ir?null:Hn;return $i!=="combobox"&&kl&&(Be="",je==null||je(kl),pr(!1),ea=!1),ee&&Ao!==Be&&ee(Be,{source:ps?"typing":"effect"}),ea}},Co=function(wo){!wo||!wo.trim()||ee(wo,{source:"submit"})};Gt.useEffect(function(){!As&&!In&&$i!=="combobox"&&cr("",!1,!1)},[As]),Gt.useEffect(function(){rs&&hr&&fs(!1),hr&&!Oe.current&&Ar(!1)},[hr]);var gs=bt(),os=(0,de.Z)(gs,2),lo=os[0],Wi=os[1],zr=Gt.useRef(!1),eo=function(wo){var ps=lo(),ir=wo.key,ea=ir==="Enter";if(ea&&($i!=="combobox"&&wo.preventDefault(),As||pr(!0)),Wi(!!Ao),ir==="Backspace"&&!ps&&In&&!Ao&&ci.length){for(var Be=(0,Wt.Z)(ci),Hn=null,kl=Be.length-1;kl>=0;kl-=1){var du=Be[kl];if(!du.disabled){Be.splice(kl,1),Hn=du;break}}Hn&&fi(Be,{type:"remove",values:[Hn]})}for(var is=arguments.length,ra=new Array(is>1?is-1:0),gl=1;gl<is;gl++)ra[gl-1]=arguments[gl];if(As&&(!ea||!zr.current)){var zl;ea&&(zr.current=!0),(zl=no.current)===null||zl===void 0||zl.onKeyDown.apply(zl,[wo].concat(ra))}Cn==null||Cn.apply(void 0,[wo].concat(ra))},xs=function(wo){for(var ps=arguments.length,ir=new Array(ps>1?ps-1:0),ea=1;ea<ps;ea++)ir[ea-1]=arguments[ea];if(As){var Be;(Be=no.current)===null||Be===void 0||Be.onKeyUp.apply(Be,[wo].concat(ir))}wo.key==="Enter"&&(zr.current=!1),gn==null||gn.apply(void 0,[wo].concat(ir))},Ko=function(wo){var ps=ci.filter(function(ir){return ir!==wo});fi(ps,{type:"remove",values:[wo]})},Ds=function(){zr.current=!1},Po=Gt.useRef(!1),dl=function(){Ar(!0),hr||(Un&&!Po.current&&Un.apply(void 0,arguments),cn.includes("focus")&&pr(!0)),Po.current=!0},Qa=function(){Oe.current=!0,Ar(!1,function(){Po.current=!1,Oe.current=!1,pr(!1)}),!hr&&(Ao&&($i==="tags"?ee(Ao,{source:"submit"}):$i==="multiple"&&ee("",{source:"blur"})),Rn&&Rn.apply(void 0,arguments))},Ca=[];Gt.useEffect(function(){return function(){Ca.forEach(function(Ro){return clearTimeout(Ro)}),Ca.splice(0,Ca.length)}},[]);var zo=function(wo){var ps,ir=wo.target,ea=(ps=_r.current)===null||ps===void 0?void 0:ps.getPopupElement();if(ea&&ea.contains(ir)){var Be=setTimeout(function(){var is=Ca.indexOf(Be);if(is!==-1&&Ca.splice(is,1),Jr(),!Gi&&!ea.contains(document.activeElement)){var ra;(ra=Wr.current)===null||ra===void 0||ra.focus()}});Ca.push(Be)}for(var Hn=arguments.length,kl=new Array(Hn>1?Hn-1:0),du=1;du<Hn;du++)kl[du-1]=arguments[du];Tn==null||Tn.apply(void 0,[wo].concat(kl))},ko=Gt.useState({}),fl=(0,de.Z)(ko,2),Ll=fl[1];function pa(){Ll({})}var Io;Dr&&(Io=function(wo){pr(wo)}),Ut(function(){var Ro;return[yr.current,(Ro=_r.current)===null||Ro===void 0?void 0:Ro.getPopupElement()]},Ci,pr,!!Dr);var nu=Gt.useMemo(function(){return(0,ve.Z)((0,ve.Z)({},se),{},{notFoundContent:We,open:As,triggerOpen:Ci,id:Zn,showSearch:on,multiple:In,toggleOpen:pr})},[se,We,Ci,As,Zn,on,In,pr]),Ml=!!ti||vr,Qs;Ml&&(Qs=Gt.createElement(At,{className:Xt()("".concat(Ye,"-arrow"),(0,le.Z)({},"".concat(Ye,"-arrow-loading"),vr)),customizeIcon:ti,customizeIconProps:{loading:vr,searchValue:Ao,open:As,focused:Sr,showSearch:on}}));var ma=function(){var wo;Mn==null||Mn(),(wo=Wr.current)===null||wo===void 0||wo.focus(),fi([],{type:"clear",values:ci}),cr("",!1,!1)},Yo=at(Ye,ma,ci,An,Bi,hr,Ao,$i),Fo=Yo.allowClear,hs=Yo.clearIcon,js=Gt.createElement(mi,{ref:no}),bl=Xt()(Ye,Dn,(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(Ye,"-focused"),Sr),"".concat(Ye,"-multiple"),In),"".concat(Ye,"-single"),!In),"".concat(Ye,"-allow-clear"),An),"".concat(Ye,"-show-arrow"),Ml),"".concat(Ye,"-disabled"),hr),"".concat(Ye,"-loading"),vr),"".concat(Ye,"-open"),As),"".concat(Ye,"-customize-input"),io),"".concat(Ye,"-show-search"),on)),ia=Gt.createElement(Ct,{ref:_r,disabled:hr,prefixCls:Ye,visible:Ci,popupElement:js,animation:oi,transitionName:Di,dropdownStyle:Ne,dropdownClassName:hn,direction:Ni,dropdownMatchSelectWidth:ke,dropdownRender:Ot,dropdownAlign:vn,placement:Jn,builtinPlacements:vi,getPopupContainer:Ee,empty:Fn,getTriggerDOMNode:function(wo){return Zr.current||wo},onPopupVisibleChange:Io,onPopupMouseEnter:pa},Dr?Gt.cloneElement(Dr,{ref:fo}):Gt.createElement(ni,(0,St.Z)({},se,{domRef:Zr,prefixCls:Ye,inputElement:io,ref:Wr,id:Zn,prefix:ui,showSearch:on,autoClearSearchValue:re,mode:$i,activeDescendantId:gr,tagRender:ki,values:ci,open:As,onToggleOpen:pr,activeValue:ur,searchValue:Ao,onSearch:cr,onSearchSubmit:Co,onRemove:Ko,tokenWithEnter:Qr,onInputBlur:Ds}))),Uo;return Dr?Uo=ia:Uo=Gt.createElement("div",(0,St.Z)({className:bl},_i,{ref:yr,onMouseDown:zo,onKeyDown:eo,onKeyUp:xs,onFocus:dl,onBlur:Qa}),Gt.createElement(mn,{visible:Sr&&!As,values:ci}),ia,Qs,Fo&&hs),Gt.createElement(dt.Provider,{value:nu},Uo)}),Vn=On,Ki=function(){return null};Ki.isSelectOptGroup=!0;var si=Ki,yi=function(){return null};yi.isSelectOption=!0;var Ei=yi,qi=It(80547),ii=It(2738),ar=It(6790);function Xi(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var lr=["disabled","title","children","style","className"];function zi(se){return typeof se=="string"||typeof se=="number"}var Kr=function(De,qn){var Zn=gt(),Ye=Zn.prefixCls,Dn=Zn.id,bi=Zn.open,ki=Zn.multiple,Ni=Zn.mode,li=Zn.searchValue,ci=Zn.toggleOpen,fi=Zn.notFoundContent,Fn=Zn.onPopupScroll,un=Gt.useContext(Kn),We=un.maxCount,Mn=un.flattenOptions,$i=un.onActiveValue,hr=un.defaultActiveFirstOption,vr=un.onSelect,Te=un.menuItemSelectedIcon,xi=un.rawValues,er=un.fieldNames,Si=un.virtual,Mr=un.direction,ur=un.listHeight,Tr=un.listItemHeight,gr=un.optionRender,ue="".concat(Ye,"-item"),re=(0,qi.Z)(function(){return Mn},[bi,Mn],function(Wn,cn){return cn[0]&&Wn[1]!==cn[1]}),ee=Gt.useRef(null),je=Gt.useMemo(function(){return ki&&Ze(We)&&(xi==null?void 0:xi.size)>=We},[ki,We,xi==null?void 0:xi.size]),xe=function(cn){cn.preventDefault()},An=function(cn){var Un;(Un=ee.current)===null||Un===void 0||Un.scrollTo(typeof cn=="number"?{index:cn}:cn)},ui=Gt.useCallback(function(Wn){return Ni==="combobox"?!1:xi.has(Wn)},[Ni,(0,Wt.Z)(xi).toString(),xi.size]),ti=function(cn){for(var Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,Rn=re.length,gn=0;gn<Rn;gn+=1){var Cn=(cn+gn*Un+Rn)%Rn,Tn=re[Cn]||{},qe=Tn.group,In=Tn.data;if(!qe&&!(In!=null&&In.disabled)&&(ui(In.value)||!je))return Cn}return-1},Bi=Gt.useState(function(){return ti(0)}),mi=(0,de.Z)(Bi,2),oi=mi[0],Di=mi[1],Ne=function(cn){var Un=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Di(cn);var Rn={source:Un?"keyboard":"mouse"},gn=re[cn];if(!gn){$i(null,-1,Rn);return}$i(gn.value,cn,Rn)};(0,Gt.useEffect)(function(){Ne(hr!==!1?ti(0):-1)},[re.length,li]);var hn=Gt.useCallback(function(Wn){return Ni==="combobox"?String(Wn).toLowerCase()===li.toLowerCase():xi.has(Wn)},[Ni,li,(0,Wt.Z)(xi).toString(),xi.size]);(0,Gt.useEffect)(function(){var Wn=setTimeout(function(){if(!ki&&bi&&xi.size===1){var Un=Array.from(xi)[0],Rn=re.findIndex(function(gn){var Cn=gn.data;return li?String(Cn.value).startsWith(li):Cn.value===Un});Rn!==-1&&(Ne(Rn),An(Rn))}});if(bi){var cn;(cn=ee.current)===null||cn===void 0||cn.scrollTo(void 0)}return function(){return clearTimeout(Wn)}},[bi,li]);var ke=function(cn){cn!==void 0&&vr(cn,{selected:!xi.has(cn)}),ki||ci(!1)};if(Gt.useImperativeHandle(qn,function(){return{onKeyDown:function(cn){var Un=cn.which,Rn=cn.ctrlKey;switch(Un){case Rt.Z.N:case Rt.Z.P:case Rt.Z.UP:case Rt.Z.DOWN:{var gn=0;if(Un===Rt.Z.UP?gn=-1:Un===Rt.Z.DOWN?gn=1:Xi()&&Rn&&(Un===Rt.Z.N?gn=1:Un===Rt.Z.P&&(gn=-1)),gn!==0){var Cn=ti(oi+gn,gn);An(Cn),Ne(Cn,!0)}break}case Rt.Z.TAB:case Rt.Z.ENTER:{var Tn,qe=re[oi];qe&&!(qe!=null&&(Tn=qe.data)!==null&&Tn!==void 0&&Tn.disabled)&&!je?ke(qe.value):ke(void 0),bi&&cn.preventDefault();break}case Rt.Z.ESC:ci(!1),bi&&cn.stopPropagation()}},onKeyUp:function(){},scrollTo:function(cn){An(cn)}}}),re.length===0)return Gt.createElement("div",{role:"listbox",id:"".concat(Dn,"_list"),className:"".concat(ue,"-empty"),onMouseDown:xe},fi);var Ot=Object.keys(er).map(function(Wn){return er[Wn]}),vn=function(cn){return cn.label};function Jn(Wn,cn){var Un=Wn.group;return{role:Un?"presentation":"option",id:"".concat(Dn,"_list_").concat(cn)}}var vi=function(cn){var Un=re[cn];if(!Un)return null;var Rn=Un.data||{},gn=Rn.value,Cn=Un.group,Tn=(0,Yt.Z)(Rn,!0),qe=vn(Un);return Un?Gt.createElement("div",(0,St.Z)({"aria-label":typeof qe=="string"&&!Cn?qe:null},Tn,{key:cn},Jn(Un,cn),{"aria-selected":hn(gn)}),gn):null},Ee={role:"listbox",id:"".concat(Dn,"_list")};return Gt.createElement(Gt.Fragment,null,Si&&Gt.createElement("div",(0,St.Z)({},Ee,{style:{height:0,width:0,overflow:"hidden"}}),vi(oi-1),vi(oi),vi(oi+1)),Gt.createElement(ar.Z,{itemKey:"key",ref:ee,data:re,height:ur,itemHeight:Tr,fullHeight:!1,onMouseDown:xe,onScroll:Fn,virtual:Si,direction:Mr,innerProps:Si?null:Ee},function(Wn,cn){var Un=Wn.group,Rn=Wn.groupOption,gn=Wn.data,Cn=Wn.label,Tn=Wn.value,qe=gn.key;if(Un){var In,on=(In=gn.title)!==null&&In!==void 0?In:zi(Cn)?Cn.toString():void 0;return Gt.createElement("div",{className:Xt()(ue,"".concat(ue,"-group"),gn.className),title:on},Cn!==void 0?Cn:qe)}var _i=gn.disabled,Qi=gn.title,nr=gn.children,Gi=gn.style,Fr=gn.className,yr=(0,Ht.Z)(gn,lr),Zr=(0,ii.Z)(yr,Ot),_r=ui(Tn),Wr=_i||!_r&&je,no="".concat(ue,"-option"),Oe=Xt()(ue,no,Fr,(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(no,"-grouped"),Rn),"".concat(no,"-active"),oi===cn&&!Wr),"".concat(no,"-disabled"),Wr),"".concat(no,"-selected"),_r)),Nr=vn(Wn),Ur=!Te||typeof Te=="function"||_r,Sr=typeof Nr=="number"?Nr:Nr||Tn,Ar=zi(Sr)?Sr.toString():void 0;return Qi!==void 0&&(Ar=Qi),Gt.createElement("div",(0,St.Z)({},(0,Yt.Z)(Zr),Si?{}:Jn(Wn,cn),{"aria-selected":hn(Tn),className:Oe,title:Ar,onMouseMove:function(){oi===cn||Wr||Ne(cn)},onClick:function(){Wr||ke(Tn)},style:Gi}),Gt.createElement("div",{className:"".concat(no,"-content")},typeof gr=="function"?gr(Wn,{index:cn}):Sr),Gt.isValidElement(Te)||_r,Ur&&Gt.createElement(At,{className:"".concat(ue,"-option-state"),customizeIcon:Te,customizeIconProps:{value:Tn,disabled:Wr,isSelected:_r}},_r?"\u2713":null))}))},Ir=Gt.forwardRef(Kr),Or=Ir,Yi=function(se,De){var qn=Gt.useRef({values:new Map,options:new Map}),Zn=Gt.useMemo(function(){var Dn=qn.current,bi=Dn.values,ki=Dn.options,Ni=se.map(function(fi){if(fi.label===void 0){var Fn;return(0,ve.Z)((0,ve.Z)({},fi),{},{label:(Fn=bi.get(fi.value))===null||Fn===void 0?void 0:Fn.label})}return fi}),li=new Map,ci=new Map;return Ni.forEach(function(fi){li.set(fi.value,fi),ci.set(fi.value,De.get(fi.value)||ki.get(fi.value))}),qn.current.values=li,qn.current.options=ci,Ni},[se,De]),Ye=Gt.useCallback(function(Dn){return De.get(Dn)||qn.current.options.get(Dn)},[De]);return[Zn,Ye]};function kr(se,De){return xn(se).join("").toUpperCase().includes(De)}var kt=function(se,De,qn,Zn,Ye){return Gt.useMemo(function(){if(!qn||Zn===!1)return se;var Dn=De.options,bi=De.label,ki=De.value,Ni=[],li=typeof Zn=="function",ci=qn.toUpperCase(),fi=li?Zn:function(un,We){return Ye?kr(We[Ye],ci):We[Dn]?kr(We[bi!=="children"?bi:"label"],ci):kr(We[ki],ci)},Fn=li?function(un){return Ue(un)}:function(un){return un};return se.forEach(function(un){if(un[Dn]){var We=fi(qn,Fn(un));if(We)Ni.push(un);else{var Mn=un[Dn].filter(function($i){return fi(qn,Fn($i))});Mn.length&&Ni.push((0,ve.Z)((0,ve.Z)({},un),{},(0,le.Z)({},Dn,Mn)))}return}fi(qn,Fn(un))&&Ni.push(un)}),Ni},[se,Zn,Ye,qn,De])},tr=It(6551),Fi=It(11592),ri=["children","value"],Li=["children"];function Ui(se){var De=se,qn=De.key,Zn=De.props,Ye=Zn.children,Dn=Zn.value,bi=(0,Ht.Z)(Zn,ri);return(0,ve.Z)({key:qn,value:Dn!==void 0?Dn:qn,children:Ye},bi)}function Ri(se){var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,Fi.Z)(se).map(function(qn,Zn){if(!Gt.isValidElement(qn)||!qn.type)return null;var Ye=qn,Dn=Ye.type.isSelectOptGroup,bi=Ye.key,ki=Ye.props,Ni=ki.children,li=(0,Ht.Z)(ki,Li);return De||!Dn?Ui(qn):(0,ve.Z)((0,ve.Z)({key:"__RC_SELECT_GRP__".concat(bi===null?Zn:bi,"__"),label:bi},li),{},{options:Ri(Ni)})}).filter(function(qn){return qn})}var Lr=function(De,qn,Zn,Ye,Dn){return Gt.useMemo(function(){var bi=De,ki=!De;ki&&(bi=Ri(qn));var Ni=new Map,li=new Map,ci=function(un,We,Mn){Mn&&typeof Mn=="string"&&un.set(We[Mn],We)},fi=function Fn(un){for(var We=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Mn=0;Mn<un.length;Mn+=1){var $i=un[Mn];!$i[Zn.options]||We?(Ni.set($i[Zn.value],$i),ci(li,$i,Zn.label),ci(li,$i,Ye),ci(li,$i,Dn)):Fn($i[Zn.options],!0)}};return fi(bi),{options:bi,valueOptions:Ni,labelOptions:li}},[De,qn,Zn,Ye,Dn])},an=Lr;function rn(se){var De=Gt.useRef();De.current=se;var qn=Gt.useCallback(function(){return De.current.apply(De,arguments)},[]);return qn}function Ge(se){var De=se.mode,qn=se.options,Zn=se.children,Ye=se.backfill,Dn=se.allowClear,bi=se.placeholder,ki=se.getInputElement,Ni=se.showSearch,li=se.onSearch,ci=se.defaultOpen,fi=se.autoFocus,Fn=se.labelInValue,un=se.value,We=se.inputValue,Mn=se.optionLabelProp,$i=isMultiple(De),hr=Ni!==void 0?Ni:$i||De==="combobox",vr=qn||convertChildrenToData(Zn);if(warning(De!=="tags"||vr.every(function(Si){return!Si.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),De==="tags"||De==="combobox"){var Te=vr.some(function(Si){return Si.options?Si.options.some(function(Mr){return typeof("value"in Mr?Mr.value:Mr.key)=="number"}):typeof("value"in Si?Si.value:Si.key)=="number"});warning(!Te,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(De!=="combobox"||!Mn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(De==="combobox"||!Ye,"`backfill` only works with `combobox` mode."),warning(De==="combobox"||!ki,"`getInputElement` only work with `combobox` mode."),noteOnce(De!=="combobox"||!ki||!Dn||!bi,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),li&&!hr&&De!=="combobox"&&De!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ci||fi,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),un!=null){var xi=toArray(un);warning(!Fn||xi.every(function(Si){return _typeof(Si)==="object"&&("key"in Si||"value"in Si)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!$i||Array.isArray(un),"`value` should be array when `mode` is `multiple` or `tags`")}if(Zn){var er=null;toNodeArray(Zn).some(function(Si){if(!React.isValidElement(Si)||!Si.type)return!1;var Mr=Si,ur=Mr.type;if(ur.isSelectOption)return!1;if(ur.isSelectOptGroup){var Tr=toNodeArray(Si.props.children).every(function(gr){return!React.isValidElement(gr)||!Si.type||gr.type.isSelectOption?!0:(er=gr.type,!1)});return!Tr}return er=ur,!0}),er&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(er.displayName||er.name||er,"`.")),warning(We===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function yn(se,De){if(se){var qn=function Zn(Ye){for(var Dn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bi=0;bi<Ye.length;bi++){var ki=Ye[bi];if(ki[De==null?void 0:De.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Dn&&Array.isArray(ki[De==null?void 0:De.options])&&Zn(ki[De==null?void 0:De.options],!0))break}};qn(se)}}var ji=null,Mi=["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"],or=["inputValue"];function ln(se){return!se||(0,ie.Z)(se)!=="object"}var Ln=Gt.forwardRef(function(se,De){var qn=se.id,Zn=se.mode,Ye=se.prefixCls,Dn=Ye===void 0?"rc-select":Ye,bi=se.backfill,ki=se.fieldNames,Ni=se.inputValue,li=se.searchValue,ci=se.onSearch,fi=se.autoClearSearchValue,Fn=fi===void 0?!0:fi,un=se.onSelect,We=se.onDeselect,Mn=se.dropdownMatchSelectWidth,$i=Mn===void 0?!0:Mn,hr=se.filterOption,vr=se.filterSort,Te=se.optionFilterProp,xi=se.optionLabelProp,er=se.options,Si=se.optionRender,Mr=se.children,ur=se.defaultActiveFirstOption,Tr=se.menuItemSelectedIcon,gr=se.virtual,ue=se.direction,re=se.listHeight,ee=re===void 0?200:re,je=se.listItemHeight,xe=je===void 0?20:je,An=se.labelRender,ui=se.value,ti=se.defaultValue,Bi=se.labelInValue,mi=se.onChange,oi=se.maxCount,Di=(0,Ht.Z)(se,Mi),Ne=(0,tr.ZP)(qn),hn=kn(Zn),ke=!!(!er&&Mr),Ot=Gt.useMemo(function(){return hr===void 0&&Zn==="combobox"?!1:hr},[hr,Zn]),vn=Gt.useMemo(function(){return Bn(ki,ke)},[JSON.stringify(ki),ke]),Jn=(0,oe.Z)("",{value:li!==void 0?li:Ni,postState:function(Qr){return Qr||""}}),vi=(0,de.Z)(Jn,2),Ee=vi[0],Wn=vi[1],cn=an(er,Mr,vn,Te,xi),Un=cn.valueOptions,Rn=cn.labelOptions,gn=cn.options,Cn=Gt.useCallback(function(pr){var Qr=xn(pr);return Qr.map(function($r){var so,xo,cr,Co,gs;if(ln($r))so=$r;else{var os;cr=$r.key,xo=$r.label,so=(os=$r.value)!==null&&os!==void 0?os:cr}var lo=Un.get(so);if(lo){var Wi;if(xo===void 0&&(xo=lo==null?void 0:lo[xi||vn.label]),cr===void 0&&(cr=(Wi=lo==null?void 0:lo.key)!==null&&Wi!==void 0?Wi:so),Co=lo==null?void 0:lo.disabled,gs=lo==null?void 0:lo.title,0)var zr}return{label:xo,value:so,key:cr,disabled:Co,title:gs}})},[vn,xi,Un]),Tn=(0,oe.Z)(ti,{value:ui}),qe=(0,de.Z)(Tn,2),In=qe[0],on=qe[1],_i=Gt.useMemo(function(){var pr,Qr=hn&&In===null?[]:In,$r=Cn(Qr);return Zn==="combobox"&&ne((pr=$r[0])===null||pr===void 0?void 0:pr.value)?[]:$r},[In,Cn,Zn,hn]),Qi=Yi(_i,Un),nr=(0,de.Z)(Qi,2),Gi=nr[0],Fr=nr[1],yr=Gt.useMemo(function(){if(!Zn&&Gi.length===1){var pr=Gi[0];if(pr.value===null&&(pr.label===null||pr.label===void 0))return[]}return Gi.map(function(Qr){var $r;return(0,ve.Z)((0,ve.Z)({},Qr),{},{label:($r=typeof An=="function"?An(Qr):Qr.label)!==null&&$r!==void 0?$r:Qr.value})})},[Zn,Gi,An]),Zr=Gt.useMemo(function(){return new Set(Gi.map(function(pr){return pr.value}))},[Gi]);Gt.useEffect(function(){if(Zn==="combobox"){var pr,Qr=(pr=Gi[0])===null||pr===void 0?void 0:pr.value;Wn(pe(Qr)?String(Qr):"")}},[Gi]);var _r=rn(function(pr,Qr){var $r=Qr!=null?Qr:pr;return(0,le.Z)((0,le.Z)({},vn.value,pr),vn.label,$r)}),Wr=Gt.useMemo(function(){if(Zn!=="tags")return gn;var pr=(0,Wt.Z)(gn),Qr=function(so){return Un.has(so)};return(0,Wt.Z)(Gi).sort(function($r,so){return $r.value<so.value?-1:1}).forEach(function($r){var so=$r.value;Qr(so)||pr.push(_r(so,$r.label))}),pr},[_r,gn,Un,Gi,Zn]),no=kt(Wr,vn,Ee,Ot,Te),Oe=Gt.useMemo(function(){return Zn!=="tags"||!Ee||no.some(function(pr){return pr[Te||"value"]===Ee})||no.some(function(pr){return pr[vn.value]===Ee})?no:[_r(Ee)].concat((0,Wt.Z)(no))},[_r,Te,Zn,no,Ee,vn]),Nr=function pr(Qr){var $r=(0,Wt.Z)(Qr).sort(function(so,xo){return vr(so,xo,{searchValue:Ee})});return $r.map(function(so){return Array.isArray(so.options)?(0,ve.Z)((0,ve.Z)({},so),{},{options:so.options.length>0?pr(so.options):so.options}):so})},Ur=Gt.useMemo(function(){return vr?Nr(Oe):Oe},[Oe,vr,Ee]),Sr=Gt.useMemo(function(){return ze(Ur,{fieldNames:vn,childrenAsData:ke})},[Ur,vn,ke]),Ar=function(Qr){var $r=Cn(Qr);if(on($r),mi&&($r.length!==Gi.length||$r.some(function(cr,Co){var gs;return((gs=Gi[Co])===null||gs===void 0?void 0:gs.value)!==(cr==null?void 0:cr.value)}))){var so=Bi?$r:$r.map(function(cr){return cr.value}),xo=$r.map(function(cr){return Ue(Fr(cr.value))});mi(hn?so:so[0],hn?xo:xo[0])}},Jr=Gt.useState(null),Ao=(0,de.Z)(Jr,2),io=Ao[0],Dr=Ao[1],fo=Gt.useState(0),es=(0,de.Z)(fo,2),Zs=es[0],Ua=es[1],us=ur!==void 0?ur:Zn!=="combobox",wr=Gt.useCallback(function(pr,Qr){var $r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},so=$r.source,xo=so===void 0?"keyboard":so;Ua(Qr),bi&&Zn==="combobox"&&pr!==null&&xo==="keyboard"&&Dr(String(pr))},[bi,Zn]),ns=function(Qr,$r,so){var xo=function(){var Ko,Ds=Fr(Qr);return[Bi?{label:Ds==null?void 0:Ds[vn.label],value:Qr,key:(Ko=Ds==null?void 0:Ds.key)!==null&&Ko!==void 0?Ko:Qr}:Qr,Ue(Ds)]};if($r&&un){var cr=xo(),Co=(0,de.Z)(cr,2),gs=Co[0],os=Co[1];un(gs,os)}else if(!$r&&We&&so!=="clear"){var lo=xo(),Wi=(0,de.Z)(lo,2),zr=Wi[0],eo=Wi[1];We(zr,eo)}},rs=rn(function(pr,Qr){var $r,so=hn?Qr.selected:!0;so?$r=hn?[].concat((0,Wt.Z)(Gi),[pr]):[pr]:$r=Gi.filter(function(xo){return xo.value!==pr}),Ar($r),ns(pr,so),Zn==="combobox"?Dr(""):(!kn||Fn)&&(Wn(""),Dr(""))}),fs=function(Qr,$r){Ar(Qr);var so=$r.type,xo=$r.values;(so==="remove"||so==="clear")&&xo.forEach(function(cr){ns(cr.value,!1,so)})},As=function(Qr,$r){if(Wn(Qr),Dr(null),$r.source==="submit"){var so=(Qr||"").trim();if(so){var xo=Array.from(new Set([].concat((0,Wt.Z)(Zr),[so])));Ar(xo),ns(so,!0),Wn("")}return}$r.source!=="blur"&&(Zn==="combobox"&&Ar(Qr),ci==null||ci(Qr))},Cs=function(Qr){var $r=Qr;Zn!=="tags"&&($r=Qr.map(function(xo){var cr=Rn.get(xo);return cr==null?void 0:cr.value}).filter(function(xo){return xo!==void 0}));var so=Array.from(new Set([].concat((0,Wt.Z)(Zr),(0,Wt.Z)($r))));Ar(so),so.forEach(function(xo){ns(xo,!0)})},Ci=Gt.useMemo(function(){var pr=gr!==!1&&$i!==!1;return(0,ve.Z)((0,ve.Z)({},cn),{},{flattenOptions:Sr,onActiveValue:wr,defaultActiveFirstOption:us,onSelect:rs,menuItemSelectedIcon:Tr,rawValues:Zr,fieldNames:vn,virtual:pr,direction:ue,listHeight:ee,listItemHeight:xe,childrenAsData:ke,maxCount:oi,optionRender:Si})},[oi,cn,Sr,wr,us,rs,Tr,Zr,vn,gr,$i,ue,ee,xe,ke,Si]);return Gt.createElement(Kn.Provider,{value:Ci},Gt.createElement(Vn,(0,St.Z)({},Di,{id:Ne,prefixCls:Dn,ref:De,omitDomProps:or,mode:Zn,displayValues:yr,onDisplayValuesChange:fs,direction:ue,searchValue:Ee,onSearch:As,autoClearSearchValue:Fn,onSearchSplit:Cs,dropdownMatchSelectWidth:$i,OptionList:Or,emptyOptions:!Sr.length,activeValue:io,activeDescendantId:"".concat(Ne,"_list_").concat(Zs)})))}),Pe=Ln;Pe.Option=Ei,Pe.OptGroup=si;var sr=Pe,$n=sr},63158:function(Sn,Ve,It){"use strict";var St=It(67711),Wt=It(52873),le=It(16886),ve=It(33346),de=It(59301),Ht=It(92310),ie=It.n(Ht),oe=It(18929),he=It(10228),Gt=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],Ie=de.forwardRef(function(Xt,Me){var Qt,nt=Xt.prefixCls,et=nt===void 0?"rc-switch":nt,At=Xt.className,at=Xt.checked,dt=Xt.defaultChecked,gt=Xt.disabled,xt=Xt.loadingIcon,bt=Xt.checkedChildren,Ut=Xt.unCheckedChildren,Rt=Xt.onClick,Zt=Xt.onChange,Yt=Xt.onKeyDown,te=(0,ve.Z)(Xt,Gt),ye=(0,oe.Z)(!1,{value:at,defaultValue:dt}),fe=(0,le.Z)(ye,2),Ke=fe[0],_e=fe[1];function nn(Xn,pe){var ne=Ke;return gt||(ne=Xn,_e(ne),Zt==null||Zt(ne,pe)),ne}function fn(Xn){Xn.which===he.Z.LEFT?nn(!1,Xn):Xn.which===he.Z.RIGHT&&nn(!0,Xn),Yt==null||Yt(Xn)}function xn(Xn){var pe=nn(!Ke,Xn);Rt==null||Rt(pe,Xn)}var _n=ie()(et,At,(Qt={},(0,Wt.Z)(Qt,"".concat(et,"-checked"),Ke),(0,Wt.Z)(Qt,"".concat(et,"-disabled"),gt),Qt));return de.createElement("button",(0,St.Z)({},te,{type:"button",role:"switch","aria-checked":Ke,disabled:gt,className:_n,ref:Me,onKeyDown:fn,onClick:xn}),xt,de.createElement("span",{className:"".concat(et,"-inner")},de.createElement("span",{className:"".concat(et,"-inner-checked")},bt),de.createElement("span",{className:"".concat(et,"-inner-unchecked")},Ut)))});Ie.displayName="Switch",Ve.Z=Ie},86351:function(Sn,Ve,It){"use strict";It.d(Ve,{R:function(){return Wt},w:function(){return St}});var St={},Wt="rc-table-internal-hook"},97347:function(Sn,Ve,It){"use strict";It.d(Ve,{L:function(){return et},Z:function(){return xt}});var St=It(16886),Wt=It(52873),le=It(15142),ve=It(26420),de=It(98506),Ht=It(33346),ie=It(11592),oe=It(48736),he=It(59301),Gt=It(86351),Ie=It(54451);function Xt(bt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof Ut=="number"?Ut:Ut.endsWith("%")?bt*parseFloat(Ut)/100:null}function Me(bt,Ut,Rt){return he.useMemo(function(){if(Ut&&Ut>0){var Zt=0,Yt=0;bt.forEach(function(xn){var _n=Xt(Ut,xn.width);_n?Zt+=_n:Yt+=1});var te=Math.max(Ut,Rt),ye=Math.max(te-Zt,Yt),fe=Yt,Ke=ye/Yt,_e=0,nn=bt.map(function(xn){var _n=(0,de.Z)({},xn),Xn=Xt(Ut,_n.width);if(Xn)_n.width=Xn;else{var pe=Math.floor(Ke);_n.width=fe===1?ye:pe,ye-=pe,fe-=1}return _e+=_n.width,_n});if(_e<te){var fn=te/_e;ye=te,nn.forEach(function(xn,_n){var Xn=Math.floor(xn.width*fn);xn.width=_n===nn.length-1?ye:Xn,ye-=Xn})}return[nn,Math.max(_e,te)]}return[bt,Ut]},[bt,Ut,Rt])}var Qt=["children"],nt=["fixed"];function et(bt){return(0,ie.Z)(bt).filter(function(Ut){return he.isValidElement(Ut)}).map(function(Ut){var Rt=Ut.key,Zt=Ut.props,Yt=Zt.children,te=(0,Ht.Z)(Zt,Qt),ye=(0,de.Z)({key:Rt},te);return Yt&&(ye.children=et(Yt)),ye})}function At(bt){return bt.filter(function(Ut){return Ut&&(0,ve.Z)(Ut)==="object"&&!Ut.hidden}).map(function(Ut){var Rt=Ut.children;return Rt&&Rt.length>0?(0,de.Z)((0,de.Z)({},Ut),{},{children:At(Rt)}):Ut})}function at(bt){var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return bt.filter(function(Rt){return Rt&&(0,ve.Z)(Rt)==="object"}).reduce(function(Rt,Zt,Yt){var te=Zt.fixed,ye=te===!0?"left":te,fe="".concat(Ut,"-").concat(Yt),Ke=Zt.children;return Ke&&Ke.length>0?[].concat((0,le.Z)(Rt),(0,le.Z)(at(Ke,fe).map(function(_e){return(0,de.Z)({fixed:ye},_e)}))):[].concat((0,le.Z)(Rt),[(0,de.Z)((0,de.Z)({key:fe},Zt),{},{fixed:ye})])},[])}function dt(bt){return bt.map(function(Ut){var Rt=Ut.fixed,Zt=(0,Ht.Z)(Ut,nt),Yt=Rt;return Rt==="left"?Yt="right":Rt==="right"&&(Yt="left"),(0,de.Z)({fixed:Yt},Zt)})}function gt(bt,Ut){var Rt=bt.prefixCls,Zt=bt.columns,Yt=bt.children,te=bt.expandable,ye=bt.expandedKeys,fe=bt.columnTitle,Ke=bt.getRowKey,_e=bt.onTriggerExpand,nn=bt.expandIcon,fn=bt.rowExpandable,xn=bt.expandIconColumnIndex,_n=bt.direction,Xn=bt.expandRowByClick,pe=bt.columnWidth,ne=bt.fixed,pn=bt.scrollWidth,Ai=bt.clientWidth,ai=he.useMemo(function(){var ni=Zt||et(Yt)||[];return At(ni.slice())},[Zt,Yt]),sn=he.useMemo(function(){if(te){var ni=ai.slice();if(!ni.includes(Gt.w)){var zt=xn||0;zt>=0&&(zt||ne==="left"||!ne)&&ni.splice(zt,0,Gt.w),ne==="right"&&ni.splice(ai.length,0,Gt.w)}var Ft=ni.indexOf(Gt.w);ni=ni.filter(function(Ct,_t){return Ct!==Gt.w||_t===Ft});var mt=ai[Ft],vt;ne?vt=ne:vt=mt?mt.fixed:null;var Et=(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)({},Ie.v,{className:"".concat(Rt,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",fe),"fixed",vt),"className","".concat(Rt,"-row-expand-icon-cell")),"width",pe),"render",function(_t,Ce,Ze){var Bn=Ke(Ce,Ze),ze=ye.has(Bn),Ue=fn?fn(Ce):!0,Xe=nn({prefixCls:Rt,expanded:ze,expandable:Ue,record:Ce,onExpand:_e});return Xn?he.createElement("span",{onClick:function(Kn){return Kn.stopPropagation()}},Xe):Xe});return ni.map(function(Ct){return Ct===Gt.w?Et:Ct})}return ai.filter(function(Ct){return Ct!==Gt.w})},[te,ai,Ke,ye,nn,_n]),Qn=he.useMemo(function(){var ni=sn;return Ut&&(ni=Ut(ni)),ni.length||(ni=[{render:function(){return null}}]),ni},[Ut,sn,_n]),jn=he.useMemo(function(){return _n==="rtl"?dt(at(Qn)):at(Qn)},[Qn,_n,pn]),Ti=he.useMemo(function(){for(var ni=-1,zt=jn.length-1;zt>=0;zt-=1){var Ft=jn[zt].fixed;if(Ft==="left"||Ft===!0){ni=zt;break}}if(ni>=0)for(var mt=0;mt<=ni;mt+=1){var vt=jn[mt].fixed;if(vt!=="left"&&vt!==!0)return!0}var Et=jn.findIndex(function(Ce){var Ze=Ce.fixed;return Ze==="right"});if(Et>=0)for(var Ct=Et;Ct<jn.length;Ct+=1){var _t=jn[Ct].fixed;if(_t!=="right")return!0}return!1},[jn]),$e=Me(jn,pn,Ai),Le=(0,St.Z)($e,2),tn=Le[0],hi=Le[1];return[Qn,tn,hi,Ti]}var xt=gt},4030:function(Sn,Ve,It){"use strict";It.d(Ve,{w2:function(){return St.w},vP:function(){return zi.v},RQ:function(){return St.R},ER:function(){return Bn},Q$:function(){return hr},TN:function(){return mi}});var St=It(86351),Wt=It(16886),le=It(6089),ve=It(34280),de=It(13697),Ht=It(59301),ie=It(4676);function oe(Ne){var hn=Ht.createContext(void 0),ke=function(vn){var Jn=vn.value,vi=vn.children,Ee=Ht.useRef(Jn);Ee.current=Jn;var Wn=Ht.useState(function(){return{getValue:function(){return Ee.current},listeners:new Set}}),cn=(0,Wt.Z)(Wn,1),Un=cn[0];return(0,ve.Z)(function(){(0,ie.unstable_batchedUpdates)(function(){Un.listeners.forEach(function(Rn){Rn(Jn)})})},[Jn]),Ht.createElement(hn.Provider,{value:Un},vi)};return{Context:hn,Provider:ke,defaultValue:Ne}}function he(Ne,hn){var ke=(0,le.Z)(typeof hn=="function"?hn:function(Rn){if(hn===void 0)return Rn;if(!Array.isArray(hn))return Rn[hn];var gn={};return hn.forEach(function(Cn){gn[Cn]=Rn[Cn]}),gn}),Ot=Ht.useContext(Ne==null?void 0:Ne.Context),vn=Ot||{},Jn=vn.listeners,vi=vn.getValue,Ee=Ht.useRef();Ee.current=ke(Ot?vi():Ne==null?void 0:Ne.defaultValue);var Wn=Ht.useState({}),cn=(0,Wt.Z)(Wn,2),Un=cn[1];return(0,ve.Z)(function(){if(!Ot)return;function Rn(gn){var Cn=ke(gn);(0,de.Z)(Ee.current,Cn,!0)||Un({})}return Jn.add(Rn),function(){Jn.delete(Rn)}},[Ot]),Ee.current}var Gt=It(67711),Ie=It(8654);function Xt(){var Ne=Ht.createContext(null);function hn(){return Ht.useContext(Ne)}function ke(vn,Jn){var vi=(0,Ie.Yr)(vn),Ee=function(cn,Un){var Rn=vi?{ref:Un}:{},gn=Ht.useRef(0),Cn=Ht.useRef(cn),Tn=hn();return Tn!==null?Ht.createElement(vn,(0,Gt.Z)({},cn,Rn)):((!Jn||Jn(Cn.current,cn))&&(gn.current+=1),Cn.current=cn,Ht.createElement(Ne.Provider,{value:gn.current},Ht.createElement(vn,(0,Gt.Z)({},cn,Rn))))};return vi?Ht.forwardRef(Ee):Ee}function Ot(vn,Jn){var vi=(0,Ie.Yr)(vn),Ee=function(cn,Un){var Rn=vi?{ref:Un}:{};return hn(),Ht.createElement(vn,(0,Gt.Z)({},cn,Rn))};return vi?Ht.memo(Ht.forwardRef(Ee),Jn):Ht.memo(Ee,Jn)}return{makeImmutable:ke,responseImmutable:Ot,useImmutableMark:hn}}var Me=Xt(),Qt=Me.makeImmutable,nt=Me.responseImmutable,et=Me.useImmutableMark,At=Xt(),at=At.makeImmutable,dt=At.responseImmutable,gt=At.useImmutableMark,xt=oe(),bt=xt;function Ut(Ne,hn){var ke=React.useRef(0);ke.current+=1;var Ot=React.useRef(Ne),vn=[];Object.keys(Ne||{}).map(function(vi){var Ee;(Ne==null?void 0:Ne[vi])!==((Ee=Ot.current)===null||Ee===void 0?void 0:Ee[vi])&&vn.push(vi)}),Ot.current=Ne;var Jn=React.useRef([]);return vn.length&&(Jn.current=vn),React.useDebugValue(ke.current),React.useDebugValue(Jn.current.join(", ")),hn&&console.log("".concat(hn,":"),ke.current,Jn.current),ke.current}var Rt=null,Zt=null,Yt=It(26420),te=It(98506),ye=It(52873),fe=It(92310),Ke=It.n(fe),_e=It(80547),nn=It(97938),fn=It(48736),xn=Ht.createContext({renderWithProps:!1}),_n=xn,Xn="RC_TABLE_KEY";function pe(Ne){return Ne==null?[]:Array.isArray(Ne)?Ne:[Ne]}function ne(Ne){var hn=[],ke={};return Ne.forEach(function(Ot){for(var vn=Ot||{},Jn=vn.key,vi=vn.dataIndex,Ee=Jn||pe(vi).join("-")||Xn;ke[Ee];)Ee="".concat(Ee,"_next");ke[Ee]=!0,hn.push(Ee)}),hn}function pn(Ne){return Ne!=null}function Ai(Ne){return typeof Ne=="number"&&!Number.isNaN(Ne)}function ai(Ne){return Ne&&(0,Yt.Z)(Ne)==="object"&&!Array.isArray(Ne)&&!Ht.isValidElement(Ne)}function sn(Ne,hn,ke,Ot,vn,Jn){var vi=Ht.useContext(_n),Ee=gt(),Wn=(0,_e.Z)(function(){if(pn(Ot))return[Ot];var cn=hn==null||hn===""?[]:Array.isArray(hn)?hn:[hn],Un=(0,nn.Z)(Ne,cn),Rn=Un,gn=void 0;if(vn){var Cn=vn(Un,Ne,ke);ai(Cn)?(Rn=Cn.children,gn=Cn.props,vi.renderWithProps=!0):Rn=Cn}return[Rn,gn]},[Ee,Ne,Ot,hn,vn,ke],function(cn,Un){if(Jn){var Rn=(0,Wt.Z)(cn,2),gn=Rn[1],Cn=(0,Wt.Z)(Un,2),Tn=Cn[1];return Jn(Tn,gn)}return vi.renderWithProps?!0:!(0,de.Z)(cn,Un,!0)});return Wn}function Qn(Ne,hn,ke,Ot){var vn=Ne+hn-1;return Ne<=Ot&&vn>=ke}function jn(Ne,hn){return he(bt,function(ke){var Ot=Qn(Ne,hn||1,ke.hoverStartRow,ke.hoverEndRow);return[Ot,ke.onHover]})}var Ti=It(70425),$e=function(hn){var ke=hn.ellipsis,Ot=hn.rowType,vn=hn.children,Jn,vi=ke===!0?{showTitle:!0}:ke;return vi&&(vi.showTitle||Ot==="header")&&(typeof vn=="string"||typeof vn=="number"?Jn=vn.toString():Ht.isValidElement(vn)&&typeof vn.props.children=="string"&&(Jn=vn.props.children)),Jn};function Le(Ne){var hn,ke,Ot,vn,Jn,vi,Ee,Wn,cn=Ne.component,Un=Ne.children,Rn=Ne.ellipsis,gn=Ne.scope,Cn=Ne.prefixCls,Tn=Ne.className,qe=Ne.align,In=Ne.record,on=Ne.render,_i=Ne.dataIndex,Qi=Ne.renderIndex,nr=Ne.shouldCellUpdate,Gi=Ne.index,Fr=Ne.rowType,yr=Ne.colSpan,Zr=Ne.rowSpan,_r=Ne.fixLeft,Wr=Ne.fixRight,no=Ne.firstFixLeft,Oe=Ne.lastFixLeft,Nr=Ne.firstFixRight,Ur=Ne.lastFixRight,Sr=Ne.appendNode,Ar=Ne.additionalProps,Jr=Ar===void 0?{}:Ar,Ao=Ne.isSticky,io="".concat(Cn,"-cell"),Dr=he(bt,["supportSticky","allColumnsFixedLeft","rowHoverable"]),fo=Dr.supportSticky,es=Dr.allColumnsFixedLeft,Zs=Dr.rowHoverable,Ua=sn(In,_i,Qi,Un,on,nr),us=(0,Wt.Z)(Ua,2),wr=us[0],ns=us[1],rs={},fs=typeof _r=="number"&&fo,As=typeof Wr=="number"&&fo;fs&&(rs.position="sticky",rs.left=_r),As&&(rs.position="sticky",rs.right=Wr);var Cs=(hn=(ke=(Ot=ns==null?void 0:ns.colSpan)!==null&&Ot!==void 0?Ot:Jr.colSpan)!==null&&ke!==void 0?ke:yr)!==null&&hn!==void 0?hn:1,Ci=(vn=(Jn=(vi=ns==null?void 0:ns.rowSpan)!==null&&vi!==void 0?vi:Jr.rowSpan)!==null&&Jn!==void 0?Jn:Zr)!==null&&vn!==void 0?vn:1,pr=jn(Gi,Ci),Qr=(0,Wt.Z)(pr,2),$r=Qr[0],so=Qr[1],xo=(0,Ti.zX)(function(zr){var eo;In&&so(Gi,Gi+Ci-1),Jr==null||(eo=Jr.onMouseEnter)===null||eo===void 0||eo.call(Jr,zr)}),cr=(0,Ti.zX)(function(zr){var eo;In&&so(-1,-1),Jr==null||(eo=Jr.onMouseLeave)===null||eo===void 0||eo.call(Jr,zr)});if(Cs===0||Ci===0)return null;var Co=(Ee=Jr.title)!==null&&Ee!==void 0?Ee:$e({rowType:Fr,ellipsis:Rn,children:wr}),gs=Ke()(io,Tn,(Wn={},(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)(Wn,"".concat(io,"-fix-left"),fs&&fo),"".concat(io,"-fix-left-first"),no&&fo),"".concat(io,"-fix-left-last"),Oe&&fo),"".concat(io,"-fix-left-all"),Oe&&es&&fo),"".concat(io,"-fix-right"),As&&fo),"".concat(io,"-fix-right-first"),Nr&&fo),"".concat(io,"-fix-right-last"),Ur&&fo),"".concat(io,"-ellipsis"),Rn),"".concat(io,"-with-append"),Sr),"".concat(io,"-fix-sticky"),(fs||As)&&Ao&&fo),(0,ye.Z)(Wn,"".concat(io,"-row-hover"),!ns&&$r)),Jr.className,ns==null?void 0:ns.className),os={};qe&&(os.textAlign=qe);var lo=(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},ns==null?void 0:ns.style),rs),os),Jr.style),Wi=wr;return(0,Yt.Z)(Wi)==="object"&&!Array.isArray(Wi)&&!Ht.isValidElement(Wi)&&(Wi=null),Rn&&(Oe||Nr)&&(Wi=Ht.createElement("span",{className:"".concat(io,"-content")},Wi)),Ht.createElement(cn,(0,Gt.Z)({},ns,Jr,{className:gs,style:lo,title:Co,scope:gn,onMouseEnter:Zs?xo:void 0,onMouseLeave:Zs?cr:void 0,colSpan:Cs!==1?Cs:null,rowSpan:Ci!==1?Ci:null}),Sr,Wi)}var tn=Ht.memo(Le);function hi(Ne,hn,ke,Ot,vn){var Jn=ke[Ne]||{},vi=ke[hn]||{},Ee,Wn;Jn.fixed==="left"?Ee=Ot.left[vn==="rtl"?hn:Ne]:vi.fixed==="right"&&(Wn=Ot.right[vn==="rtl"?Ne:hn]);var cn=!1,Un=!1,Rn=!1,gn=!1,Cn=ke[hn+1],Tn=ke[Ne-1],qe=Cn&&!Cn.fixed||Tn&&!Tn.fixed||ke.every(function(nr){return nr.fixed==="left"});if(vn==="rtl"){if(Ee!==void 0){var In=Tn&&Tn.fixed==="left";gn=!In&&qe}else if(Wn!==void 0){var on=Cn&&Cn.fixed==="right";Rn=!on&&qe}}else if(Ee!==void 0){var _i=Cn&&Cn.fixed==="left";cn=!_i&&qe}else if(Wn!==void 0){var Qi=Tn&&Tn.fixed==="right";Un=!Qi&&qe}return{fixLeft:Ee,fixRight:Wn,lastFixLeft:cn,firstFixRight:Un,lastFixRight:Rn,firstFixLeft:gn,isSticky:Ot.isSticky}}var ni=Ht.createContext({}),zt=ni;function Ft(Ne){var hn=Ne.className,ke=Ne.index,Ot=Ne.children,vn=Ne.colSpan,Jn=vn===void 0?1:vn,vi=Ne.rowSpan,Ee=Ne.align,Wn=he(bt,["prefixCls","direction"]),cn=Wn.prefixCls,Un=Wn.direction,Rn=Ht.useContext(zt),gn=Rn.scrollColumnIndex,Cn=Rn.stickyOffsets,Tn=Rn.flattenColumns,qe=ke+Jn-1,In=qe+1===gn?Jn+1:Jn,on=hi(ke,ke+In-1,Tn,Cn,Un);return Ht.createElement(tn,(0,Gt.Z)({className:hn,index:ke,component:"td",prefixCls:cn,record:null,dataIndex:null,align:Ee,colSpan:In,rowSpan:vi,render:function(){return Ot}},on))}var mt=It(33346),vt=["children"];function Et(Ne){var hn=Ne.children,ke=(0,mt.Z)(Ne,vt);return Ht.createElement("tr",ke,hn)}function Ct(Ne){var hn=Ne.children;return hn}Ct.Row=Et,Ct.Cell=Ft;var _t=Ct;function Ce(Ne){var hn=Ne.children,ke=Ne.stickyOffsets,Ot=Ne.flattenColumns,vn=he(bt,"prefixCls"),Jn=Ot.length-1,vi=Ot[Jn],Ee=Ht.useMemo(function(){return{stickyOffsets:ke,flattenColumns:Ot,scrollColumnIndex:vi!=null&&vi.scrollbar?Jn:null}},[vi,Ot,Jn,ke]);return Ht.createElement(zt.Provider,{value:Ee},Ht.createElement("tfoot",{className:"".concat(vn,"-summary")},hn))}var Ze=dt(Ce),Bn=_t,ze=It(29301),Ue=It(24514),Xe=It(75152),dn=It(26112);function Kn(Ne,hn,ke,Ot,vn,Jn,vi){Ne.push({record:hn,indent:ke,index:vi});var Ee=Jn(hn),Wn=vn==null?void 0:vn.has(Ee);if(hn&&Array.isArray(hn[Ot])&&Wn)for(var cn=0;cn<hn[Ot].length;cn+=1)Kn(Ne,hn[Ot][cn],ke+1,Ot,vn,Jn,cn)}function mn(Ne,hn,ke,Ot){var vn=Ht.useMemo(function(){if(ke!=null&&ke.size){for(var Jn=[],vi=0;vi<(Ne==null?void 0:Ne.length);vi+=1){var Ee=Ne[vi];Kn(Jn,Ee,0,hn,ke,Ot,vi)}return Jn}return Ne==null?void 0:Ne.map(function(Wn,cn){return{record:Wn,indent:0,index:cn}})},[Ne,hn,ke,Ot]);return vn}function be(Ne,hn,ke,Ot){var vn=he(bt,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),Jn=vn.flattenColumns,vi=vn.expandableType,Ee=vn.expandedKeys,Wn=vn.childrenColumnName,cn=vn.onTriggerExpand,Un=vn.rowExpandable,Rn=vn.onRow,gn=vn.expandRowByClick,Cn=vn.rowClassName,Tn=vi==="nest",qe=vi==="row"&&(!Un||Un(Ne)),In=qe||Tn,on=Ee&&Ee.has(hn),_i=Wn&&Ne&&Ne[Wn],Qi=(0,Ti.zX)(cn),nr=Rn==null?void 0:Rn(Ne,ke),Gi=nr==null?void 0:nr.onClick,Fr=function(Wr){gn&&In&&cn(Ne,Wr);for(var no=arguments.length,Oe=new Array(no>1?no-1:0),Nr=1;Nr<no;Nr++)Oe[Nr-1]=arguments[Nr];Gi==null||Gi.apply(void 0,[Wr].concat(Oe))},yr;typeof Cn=="string"?yr=Cn:typeof Cn=="function"&&(yr=Cn(Ne,ke,Ot));var Zr=ne(Jn);return(0,te.Z)((0,te.Z)({},vn),{},{columnsKey:Zr,nestExpandable:Tn,expanded:on,hasNestChildren:_i,record:Ne,onTriggerExpand:Qi,rowSupportExpand:qe,expandable:In,rowProps:(0,te.Z)((0,te.Z)({},nr),{},{className:Ke()(yr,nr==null?void 0:nr.className),onClick:Fr})})}function ei(Ne){var hn=Ne.prefixCls,ke=Ne.children,Ot=Ne.component,vn=Ne.cellComponent,Jn=Ne.className,vi=Ne.expanded,Ee=Ne.colSpan,Wn=Ne.isEmpty,cn=he(bt,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Un=cn.scrollbarSize,Rn=cn.fixHeader,gn=cn.fixColumn,Cn=cn.componentWidth,Tn=cn.horizonScroll,qe=ke;return(Wn?Tn&&Cn:gn)&&(qe=Ht.createElement("div",{style:{width:Cn-(Rn&&!Wn?Un:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(hn,"-expanded-row-fixed")},qe)),Ht.createElement(Ot,{className:Jn,style:{display:vi?null:"none"}},Ht.createElement(tn,{component:vn,prefixCls:hn,colSpan:Ee},qe))}var kn=ei;function On(Ne){var hn=Ne.prefixCls,ke=Ne.record,Ot=Ne.onExpand,vn=Ne.expanded,Jn=Ne.expandable,vi="".concat(hn,"-row-expand-icon");if(!Jn)return Ht.createElement("span",{className:Ke()(vi,"".concat(hn,"-row-spaced"))});var Ee=function(cn){Ot(ke,cn),cn.stopPropagation()};return Ht.createElement("span",{className:Ke()(vi,(0,ye.Z)((0,ye.Z)({},"".concat(hn,"-row-expanded"),vn),"".concat(hn,"-row-collapsed"),!vn)),onClick:Ee})}function Vn(Ne,hn,ke){var Ot=[];function vn(Jn){(Jn||[]).forEach(function(vi,Ee){Ot.push(hn(vi,Ee)),vn(vi[ke])})}return vn(Ne),Ot}function Ki(Ne,hn,ke,Ot){return typeof Ne=="string"?Ne:typeof Ne=="function"?Ne(hn,ke,Ot):""}function si(Ne,hn,ke,Ot,vn){var Jn=Ne.record,vi=Ne.prefixCls,Ee=Ne.columnsKey,Wn=Ne.fixedInfoList,cn=Ne.expandIconColumnIndex,Un=Ne.nestExpandable,Rn=Ne.indentSize,gn=Ne.expandIcon,Cn=Ne.expanded,Tn=Ne.hasNestChildren,qe=Ne.onTriggerExpand,In=Ee[ke],on=Wn[ke],_i;ke===(cn||0)&&Un&&(_i=Ht.createElement(Ht.Fragment,null,Ht.createElement("span",{style:{paddingLeft:"".concat(Rn*Ot,"px")},className:"".concat(vi,"-row-indent indent-level-").concat(Ot)}),gn({prefixCls:vi,expanded:Cn,expandable:Tn,record:Jn,onExpand:qe})));var Qi;return hn.onCell&&(Qi=hn.onCell(Jn,vn)),{key:In,fixedInfo:on,appendCellNode:_i,additionalCellProps:Qi||{}}}function yi(Ne){var hn=Ne.className,ke=Ne.style,Ot=Ne.record,vn=Ne.index,Jn=Ne.renderIndex,vi=Ne.rowKey,Ee=Ne.indent,Wn=Ee===void 0?0:Ee,cn=Ne.rowComponent,Un=Ne.cellComponent,Rn=Ne.scopeCellComponent,gn=be(Ot,vi,vn,Wn),Cn=gn.prefixCls,Tn=gn.flattenColumns,qe=gn.expandedRowClassName,In=gn.expandedRowRender,on=gn.rowProps,_i=gn.expanded,Qi=gn.rowSupportExpand,nr=Ht.useRef(!1);nr.current||(nr.current=_i);var Gi=Ki(qe,Ot,vn,Wn),Fr=Ht.createElement(cn,(0,Gt.Z)({},on,{"data-row-key":vi,className:Ke()(hn,"".concat(Cn,"-row"),"".concat(Cn,"-row-level-").concat(Wn),on==null?void 0:on.className,(0,ye.Z)({},Gi,Wn>=1)),style:(0,te.Z)((0,te.Z)({},ke),on==null?void 0:on.style)}),Tn.map(function(_r,Wr){var no=_r.render,Oe=_r.dataIndex,Nr=_r.className,Ur=si(gn,_r,Wr,Wn,vn),Sr=Ur.key,Ar=Ur.fixedInfo,Jr=Ur.appendCellNode,Ao=Ur.additionalCellProps;return Ht.createElement(tn,(0,Gt.Z)({className:Nr,ellipsis:_r.ellipsis,align:_r.align,scope:_r.rowScope,component:_r.rowScope?Rn:Un,prefixCls:Cn,key:Sr,record:Ot,index:vn,renderIndex:Jn,dataIndex:Oe,render:no,shouldCellUpdate:_r.shouldCellUpdate},Ar,{appendNode:Jr,additionalProps:Ao}))})),yr;if(Qi&&(nr.current||_i)){var Zr=In(Ot,vn,Wn+1,_i);yr=Ht.createElement(kn,{expanded:_i,className:Ke()("".concat(Cn,"-expanded-row"),"".concat(Cn,"-expanded-row-level-").concat(Wn+1),Gi),prefixCls:Cn,component:cn,cellComponent:Un,colSpan:Tn.length,isEmpty:!1},Zr)}return Ht.createElement(Ht.Fragment,null,Fr,yr)}var Ei=dt(yi);function qi(Ne){var hn=Ne.columnKey,ke=Ne.onColumnResize,Ot=Ht.useRef();return(0,ve.Z)(function(){Ot.current&&ke(hn,Ot.current.offsetWidth)},[]),Ht.createElement(ze.Z,{data:hn},Ht.createElement("td",{ref:Ot,style:{padding:0,border:0,height:0}},Ht.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var ii=It(29194);function ar(Ne){var hn=Ne.prefixCls,ke=Ne.columnsKey,Ot=Ne.onColumnResize,vn=Ht.useRef(null);return Ht.createElement("tr",{"aria-hidden":"true",className:"".concat(hn,"-measure-row"),style:{height:0,fontSize:0},ref:vn},Ht.createElement(ze.Z.Collection,{onBatchResize:function(vi){(0,ii.Z)(vn.current)&&vi.forEach(function(Ee){var Wn=Ee.data,cn=Ee.size;Ot(Wn,cn.offsetWidth)})}},ke.map(function(Jn){return Ht.createElement(qi,{key:Jn,columnKey:Jn,onColumnResize:Ot})})))}function Xi(Ne){var hn=Ne.data,ke=Ne.measureColumnWidth,Ot=he(bt,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),vn=Ot.prefixCls,Jn=Ot.getComponent,vi=Ot.onColumnResize,Ee=Ot.flattenColumns,Wn=Ot.getRowKey,cn=Ot.expandedKeys,Un=Ot.childrenColumnName,Rn=Ot.emptyNode,gn=mn(hn,Un,cn,Wn),Cn=Ht.useRef({renderWithProps:!1}),Tn=Jn(["body","wrapper"],"tbody"),qe=Jn(["body","row"],"tr"),In=Jn(["body","cell"],"td"),on=Jn(["body","cell"],"th"),_i;hn.length?_i=gn.map(function(nr,Gi){var Fr=nr.record,yr=nr.indent,Zr=nr.index,_r=Wn(Fr,Gi);return Ht.createElement(Ei,{key:_r,rowKey:_r,record:Fr,index:Gi,renderIndex:Zr,rowComponent:qe,cellComponent:In,scopeCellComponent:on,indent:yr})}):_i=Ht.createElement(kn,{expanded:!0,className:"".concat(vn,"-placeholder"),prefixCls:vn,component:qe,cellComponent:In,colSpan:Ee.length,isEmpty:!0},Rn);var Qi=ne(Ee);return Ht.createElement(_n.Provider,{value:Cn.current},Ht.createElement(Tn,{className:"".concat(vn,"-tbody")},ke&&Ht.createElement(ar,{prefixCls:vn,columnsKey:Qi,onColumnResize:vi}),_i))}var lr=dt(Xi),zi=It(54451),Kr=["columnType"];function Ir(Ne){for(var hn=Ne.colWidths,ke=Ne.columns,Ot=Ne.columCount,vn=he(bt,["tableLayout"]),Jn=vn.tableLayout,vi=[],Ee=Ot||ke.length,Wn=!1,cn=Ee-1;cn>=0;cn-=1){var Un=hn[cn],Rn=ke&&ke[cn],gn=void 0,Cn=void 0;if(Rn&&(gn=Rn[zi.v],Jn==="auto"&&(Cn=Rn.minWidth)),Un||Cn||gn||Wn){var Tn=gn||{},qe=Tn.columnType,In=(0,mt.Z)(Tn,Kr);vi.unshift(Ht.createElement("col",(0,Gt.Z)({key:cn,style:{width:Un,minWidth:Cn}},In))),Wn=!0}}return Ht.createElement("colgroup",null,vi)}var Or=Ir,Yi=It(15142),kr=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function kt(Ne,hn){return(0,Ht.useMemo)(function(){for(var ke=[],Ot=0;Ot<hn;Ot+=1){var vn=Ne[Ot];if(vn!==void 0)ke[Ot]=vn;else return null}return ke},[Ne.join("_"),hn])}var tr=Ht.forwardRef(function(Ne,hn){var ke=Ne.className,Ot=Ne.noData,vn=Ne.columns,Jn=Ne.flattenColumns,vi=Ne.colWidths,Ee=Ne.columCount,Wn=Ne.stickyOffsets,cn=Ne.direction,Un=Ne.fixHeader,Rn=Ne.stickyTopOffset,gn=Ne.stickyBottomOffset,Cn=Ne.stickyClassName,Tn=Ne.onScroll,qe=Ne.maxContentScroll,In=Ne.children,on=(0,mt.Z)(Ne,kr),_i=he(bt,["prefixCls","scrollbarSize","isSticky","getComponent"]),Qi=_i.prefixCls,nr=_i.scrollbarSize,Gi=_i.isSticky,Fr=_i.getComponent,yr=Fr(["header","table"],"table"),Zr=Gi&&!Un?0:nr,_r=Ht.useRef(null),Wr=Ht.useCallback(function(Ao){(0,Ie.mH)(hn,Ao),(0,Ie.mH)(_r,Ao)},[]);Ht.useEffect(function(){var Ao;function io(Dr){var fo=Dr,es=fo.currentTarget,Zs=fo.deltaX;Zs&&(Tn({currentTarget:es,scrollLeft:es.scrollLeft+Zs}),Dr.preventDefault())}return(Ao=_r.current)===null||Ao===void 0||Ao.addEventListener("wheel",io,{passive:!1}),function(){var Dr;(Dr=_r.current)===null||Dr===void 0||Dr.removeEventListener("wheel",io)}},[]);var no=Ht.useMemo(function(){return Jn.every(function(Ao){return Ao.width})},[Jn]),Oe=Jn[Jn.length-1],Nr={fixed:Oe?Oe.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Qi,"-cell-scrollbar")}}},Ur=(0,Ht.useMemo)(function(){return Zr?[].concat((0,Yi.Z)(vn),[Nr]):vn},[Zr,vn]),Sr=(0,Ht.useMemo)(function(){return Zr?[].concat((0,Yi.Z)(Jn),[Nr]):Jn},[Zr,Jn]),Ar=(0,Ht.useMemo)(function(){var Ao=Wn.right,io=Wn.left;return(0,te.Z)((0,te.Z)({},Wn),{},{left:cn==="rtl"?[].concat((0,Yi.Z)(io.map(function(Dr){return Dr+Zr})),[0]):io,right:cn==="rtl"?Ao:[].concat((0,Yi.Z)(Ao.map(function(Dr){return Dr+Zr})),[0]),isSticky:Gi})},[Zr,Wn,Gi]),Jr=kt(vi,Ee);return Ht.createElement("div",{style:(0,te.Z)({overflow:"hidden"},Gi?{top:Rn,bottom:gn}:{}),ref:Wr,className:Ke()(ke,(0,ye.Z)({},Cn,!!Cn))},Ht.createElement(yr,{style:{tableLayout:"fixed",visibility:Ot||Jr?null:"hidden"}},(!Ot||!qe||no)&&Ht.createElement(Or,{colWidths:Jr?[].concat((0,Yi.Z)(Jr),[Zr]):[],columCount:Ee+1,columns:Sr}),In((0,te.Z)((0,te.Z)({},on),{},{stickyOffsets:Ar,columns:Ur,flattenColumns:Sr}))))}),Fi=Ht.memo(tr),ri=function(hn){var ke=hn.cells,Ot=hn.stickyOffsets,vn=hn.flattenColumns,Jn=hn.rowComponent,vi=hn.cellComponent,Ee=hn.onHeaderRow,Wn=hn.index,cn=he(bt,["prefixCls","direction"]),Un=cn.prefixCls,Rn=cn.direction,gn;Ee&&(gn=Ee(ke.map(function(Tn){return Tn.column}),Wn));var Cn=ne(ke.map(function(Tn){return Tn.column}));return Ht.createElement(Jn,gn,ke.map(function(Tn,qe){var In=Tn.column,on=hi(Tn.colStart,Tn.colEnd,vn,Ot,Rn),_i;return In&&In.onHeaderCell&&(_i=Tn.column.onHeaderCell(In)),Ht.createElement(tn,(0,Gt.Z)({},Tn,{scope:In.title?Tn.colSpan>1?"colgroup":"col":null,ellipsis:In.ellipsis,align:In.align,component:vi,prefixCls:Un,key:Cn[qe]},on,{additionalProps:_i,rowType:"header"}))}))},Li=ri;function Ui(Ne){var hn=[];function ke(vi,Ee){var Wn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;hn[Wn]=hn[Wn]||[];var cn=Ee,Un=vi.filter(Boolean).map(function(Rn){var gn={key:Rn.key,className:Rn.className||"",children:Rn.title,column:Rn,colStart:cn},Cn=1,Tn=Rn.children;return Tn&&Tn.length>0&&(Cn=ke(Tn,cn,Wn+1).reduce(function(qe,In){return qe+In},0),gn.hasSubColumns=!0),"colSpan"in Rn&&(Cn=Rn.colSpan),"rowSpan"in Rn&&(gn.rowSpan=Rn.rowSpan),gn.colSpan=Cn,gn.colEnd=gn.colStart+Cn-1,hn[Wn].push(gn),cn+=Cn,Cn});return Un}ke(Ne,0);for(var Ot=hn.length,vn=function(Ee){hn[Ee].forEach(function(Wn){!("rowSpan"in Wn)&&!Wn.hasSubColumns&&(Wn.rowSpan=Ot-Ee)})},Jn=0;Jn<Ot;Jn+=1)vn(Jn);return hn}var Ri=function(hn){var ke=hn.stickyOffsets,Ot=hn.columns,vn=hn.flattenColumns,Jn=hn.onHeaderRow,vi=he(bt,["prefixCls","getComponent"]),Ee=vi.prefixCls,Wn=vi.getComponent,cn=Ht.useMemo(function(){return Ui(Ot)},[Ot]),Un=Wn(["header","wrapper"],"thead"),Rn=Wn(["header","row"],"tr"),gn=Wn(["header","cell"],"th");return Ht.createElement(Un,{className:"".concat(Ee,"-thead")},cn.map(function(Cn,Tn){var qe=Ht.createElement(Li,{key:Tn,flattenColumns:vn,cells:Cn,stickyOffsets:ke,rowComponent:Rn,cellComponent:gn,onHeaderRow:Jn,index:Tn});return qe}))},Lr=dt(Ri),an=It(97347);function rn(Ne,hn,ke){var Ot=(0,zi.g)(Ne),vn=Ot.expandIcon,Jn=Ot.expandedRowKeys,vi=Ot.defaultExpandedRowKeys,Ee=Ot.defaultExpandAllRows,Wn=Ot.expandedRowRender,cn=Ot.onExpand,Un=Ot.onExpandedRowsChange,Rn=Ot.childrenColumnName,gn=vn||On,Cn=Rn||"children",Tn=Ht.useMemo(function(){return Wn?"row":Ne.expandable&&Ne.internalHooks===St.R&&Ne.expandable.__PARENT_RENDER_ICON__||hn.some(function(Gi){return Gi&&(0,Yt.Z)(Gi)==="object"&&Gi[Cn]})?"nest":!1},[!!Wn,hn]),qe=Ht.useState(function(){return vi||(Ee?Vn(hn,ke,Cn):[])}),In=(0,Wt.Z)(qe,2),on=In[0],_i=In[1],Qi=Ht.useMemo(function(){return new Set(Jn||on||[])},[Jn,on]),nr=Ht.useCallback(function(Gi){var Fr=ke(Gi,hn.indexOf(Gi)),yr,Zr=Qi.has(Fr);Zr?(Qi.delete(Fr),yr=(0,Yi.Z)(Qi)):yr=[].concat((0,Yi.Z)(Qi),[Fr]),_i(yr),cn&&cn(!Zr,Gi),Un&&Un(yr)},[ke,Qi,hn,cn,Un]);return[Ot,Tn,Qi,gn,Cn,nr]}function Ge(Ne,hn,ke){var Ot=Ne.map(function(vn,Jn){return hi(Jn,Jn,Ne,hn,ke)});return(0,_e.Z)(function(){return Ot},[Ot],function(vn,Jn){return!(0,de.Z)(vn,Jn)})}function yn(Ne){var hn=(0,Ht.useRef)(Ne),ke=(0,Ht.useState)({}),Ot=(0,Wt.Z)(ke,2),vn=Ot[1],Jn=(0,Ht.useRef)(null),vi=(0,Ht.useRef)([]);function Ee(Wn){vi.current.push(Wn);var cn=Promise.resolve();Jn.current=cn,cn.then(function(){if(Jn.current===cn){var Un=vi.current,Rn=hn.current;vi.current=[],Un.forEach(function(gn){hn.current=gn(hn.current)}),Jn.current=null,Rn!==hn.current&&vn({})}})}return(0,Ht.useEffect)(function(){return function(){Jn.current=null}},[]),[hn.current,Ee]}function ji(Ne){var hn=(0,Ht.useRef)(Ne||null),ke=(0,Ht.useRef)();function Ot(){window.clearTimeout(ke.current)}function vn(vi){hn.current=vi,Ot(),ke.current=window.setTimeout(function(){hn.current=null,ke.current=void 0},100)}function Jn(){return hn.current}return(0,Ht.useEffect)(function(){return Ot},[]),[vn,Jn]}function Mi(){var Ne=Ht.useState(-1),hn=(0,Wt.Z)(Ne,2),ke=hn[0],Ot=hn[1],vn=Ht.useState(-1),Jn=(0,Wt.Z)(vn,2),vi=Jn[0],Ee=Jn[1],Wn=Ht.useCallback(function(cn,Un){Ot(cn),Ee(Un)},[]);return[ke,vi,Wn]}var or=It(47273),ln=(0,or.Z)()?window:null;function Ln(Ne,hn){var ke=(0,Yt.Z)(Ne)==="object"?Ne:{},Ot=ke.offsetHeader,vn=Ot===void 0?0:Ot,Jn=ke.offsetSummary,vi=Jn===void 0?0:Jn,Ee=ke.offsetScroll,Wn=Ee===void 0?0:Ee,cn=ke.getContainer,Un=cn===void 0?function(){return ln}:cn,Rn=Un()||ln,gn=!!Ne;return Ht.useMemo(function(){return{isSticky:gn,stickyClassName:gn?"".concat(hn,"-sticky-holder"):"",offsetHeader:vn,offsetSummary:vi,offsetScroll:Wn,container:Rn}},[gn,Wn,vn,vi,hn,Rn])}function Pe(Ne,hn,ke){var Ot=(0,Ht.useMemo)(function(){var vn=hn.length,Jn=function(cn,Un,Rn){for(var gn=[],Cn=0,Tn=cn;Tn!==Un;Tn+=Rn)gn.push(Cn),hn[Tn].fixed&&(Cn+=Ne[Tn]||0);return gn},vi=Jn(0,vn,1),Ee=Jn(vn-1,-1,-1).reverse();return ke==="rtl"?{left:Ee,right:vi}:{left:vi,right:Ee}},[Ne,hn,ke]);return Ot}var sr=Pe;function $n(Ne){var hn=Ne.className,ke=Ne.children;return Ht.createElement("div",{className:hn},ke)}var se=$n,De=It(8224),qn=It(16089),Zn=It(76846);function Ye(Ne){var hn=(0,Zn.bn)(Ne),ke=hn.getBoundingClientRect(),Ot=document.documentElement;return{left:ke.left+(window.pageXOffset||Ot.scrollLeft)-(Ot.clientLeft||document.body.clientLeft||0),top:ke.top+(window.pageYOffset||Ot.scrollTop)-(Ot.clientTop||document.body.clientTop||0)}}var Dn=function(hn,ke){var Ot,vn,Jn=hn.scrollBodyRef,vi=hn.onScroll,Ee=hn.offsetScroll,Wn=hn.container,cn=hn.direction,Un=he(bt,"prefixCls"),Rn=((Ot=Jn.current)===null||Ot===void 0?void 0:Ot.scrollWidth)||0,gn=((vn=Jn.current)===null||vn===void 0?void 0:vn.clientWidth)||0,Cn=Rn&&gn*(gn/Rn),Tn=Ht.useRef(),qe=yn({scrollLeft:0,isHiddenScrollBar:!0}),In=(0,Wt.Z)(qe,2),on=In[0],_i=In[1],Qi=Ht.useRef({delta:0,x:0}),nr=Ht.useState(!1),Gi=(0,Wt.Z)(nr,2),Fr=Gi[0],yr=Gi[1],Zr=Ht.useRef(null);Ht.useEffect(function(){return function(){qn.Z.cancel(Zr.current)}},[]);var _r=function(){yr(!1)},Wr=function(Sr){Sr.persist(),Qi.current.delta=Sr.pageX-on.scrollLeft,Qi.current.x=0,yr(!0),Sr.preventDefault()},no=function(Sr){var Ar,Jr=Sr||((Ar=window)===null||Ar===void 0?void 0:Ar.event),Ao=Jr.buttons;if(!Fr||Ao===0){Fr&&yr(!1);return}var io=Qi.current.x+Sr.pageX-Qi.current.x-Qi.current.delta,Dr=cn==="rtl";io=Math.max(Dr?Cn-gn:0,Math.min(Dr?0:gn-Cn,io));var fo=!Dr||Math.abs(io)+Math.abs(Cn)<gn;fo&&(vi({scrollLeft:io/gn*(Rn+2)}),Qi.current.x=Sr.pageX)},Oe=function(){qn.Z.cancel(Zr.current),Zr.current=(0,qn.Z)(function(){if(Jn.current){var Sr=Ye(Jn.current).top,Ar=Sr+Jn.current.offsetHeight,Jr=Wn===window?document.documentElement.scrollTop+window.innerHeight:Ye(Wn).top+Wn.clientHeight;Ar-(0,Xe.Z)()<=Jr||Sr>=Jr-Ee?_i(function(Ao){return(0,te.Z)((0,te.Z)({},Ao),{},{isHiddenScrollBar:!0})}):_i(function(Ao){return(0,te.Z)((0,te.Z)({},Ao),{},{isHiddenScrollBar:!1})})}})},Nr=function(Sr){_i(function(Ar){return(0,te.Z)((0,te.Z)({},Ar),{},{scrollLeft:Sr/Rn*gn||0})})};return Ht.useImperativeHandle(ke,function(){return{setScrollLeft:Nr,checkScrollBarVisible:Oe}}),Ht.useEffect(function(){var Ur=(0,De.Z)(document.body,"mouseup",_r,!1),Sr=(0,De.Z)(document.body,"mousemove",no,!1);return Oe(),function(){Ur.remove(),Sr.remove()}},[Cn,Fr]),Ht.useEffect(function(){if(Jn.current){for(var Ur=[],Sr=(0,Zn.bn)(Jn.current);Sr;)Ur.push(Sr),Sr=Sr.parentElement;return Ur.forEach(function(Ar){return Ar.addEventListener("scroll",Oe,!1)}),window.addEventListener("resize",Oe,!1),window.addEventListener("scroll",Oe,!1),Wn.addEventListener("scroll",Oe,!1),function(){Ur.forEach(function(Ar){return Ar.removeEventListener("scroll",Oe)}),window.removeEventListener("resize",Oe),window.removeEventListener("scroll",Oe),Wn.removeEventListener("scroll",Oe)}}},[Wn]),Ht.useEffect(function(){on.isHiddenScrollBar||_i(function(Ur){var Sr=Jn.current;return Sr?(0,te.Z)((0,te.Z)({},Ur),{},{scrollLeft:Sr.scrollLeft/Sr.scrollWidth*Sr.clientWidth}):Ur})},[on.isHiddenScrollBar]),Rn<=gn||!Cn||on.isHiddenScrollBar?null:Ht.createElement("div",{style:{height:(0,Xe.Z)(),width:gn,bottom:Ee},className:"".concat(Un,"-sticky-scroll")},Ht.createElement("div",{onMouseDown:Wr,ref:Tn,className:Ke()("".concat(Un,"-sticky-scroll-bar"),(0,ye.Z)({},"".concat(Un,"-sticky-scroll-bar-active"),Fr)),style:{width:"".concat(Cn,"px"),transform:"translate3d(".concat(on.scrollLeft,"px, 0, 0)")}}))},bi=Ht.forwardRef(Dn);function ki(Ne){return null}var Ni=ki;function li(Ne){return null}var ci=li,fi="rc-table",Fn=[],un={};function We(){return"No Data"}function Mn(Ne,hn){var ke=(0,te.Z)({rowKey:"key",prefixCls:fi,emptyText:We},Ne),Ot=ke.prefixCls,vn=ke.className,Jn=ke.rowClassName,vi=ke.style,Ee=ke.data,Wn=ke.rowKey,cn=ke.scroll,Un=ke.tableLayout,Rn=ke.direction,gn=ke.title,Cn=ke.footer,Tn=ke.summary,qe=ke.caption,In=ke.id,on=ke.showHeader,_i=ke.components,Qi=ke.emptyText,nr=ke.onRow,Gi=ke.onHeaderRow,Fr=ke.onScroll,yr=ke.internalHooks,Zr=ke.transformColumns,_r=ke.internalRefs,Wr=ke.tailor,no=ke.getContainerWidth,Oe=ke.sticky,Nr=ke.rowHoverable,Ur=Nr===void 0?!0:Nr,Sr=Ee||Fn,Ar=!!Sr.length,Jr=yr===St.R,Ao=Ht.useCallback(function(So,_o){return(0,nn.Z)(_i,So)||_o},[_i]),io=Ht.useMemo(function(){return typeof Wn=="function"?Wn:function(So){var _o=So&&So[Wn];return _o}},[Wn]),Dr=Ao(["body"]),fo=Mi(),es=(0,Wt.Z)(fo,3),Zs=es[0],Ua=es[1],us=es[2],wr=rn(ke,Sr,io),ns=(0,Wt.Z)(wr,6),rs=ns[0],fs=ns[1],As=ns[2],Cs=ns[3],Ci=ns[4],pr=ns[5],Qr=cn==null?void 0:cn.x,$r=Ht.useState(0),so=(0,Wt.Z)($r,2),xo=so[0],cr=so[1],Co=(0,an.Z)((0,te.Z)((0,te.Z)((0,te.Z)({},ke),rs),{},{expandable:!!rs.expandedRowRender,columnTitle:rs.columnTitle,expandedKeys:As,getRowKey:io,onTriggerExpand:pr,expandIcon:Cs,expandIconColumnIndex:rs.expandIconColumnIndex,direction:Rn,scrollWidth:Jr&&Wr&&typeof Qr=="number"?Qr:null,clientWidth:xo}),Jr?Zr:null),gs=(0,Wt.Z)(Co,4),os=gs[0],lo=gs[1],Wi=gs[2],zr=gs[3],eo=Wi!=null?Wi:Qr,xs=Ht.useMemo(function(){return{columns:os,flattenColumns:lo}},[os,lo]),Ko=Ht.useRef(),Ds=Ht.useRef(),Po=Ht.useRef(),dl=Ht.useRef();Ht.useImperativeHandle(hn,function(){return{nativeElement:Ko.current,scrollTo:function(_o){var Os;if(Po.current instanceof HTMLElement){var sa=_o.index,va=_o.top,Xu=_o.key;if(Ai(va)){var Eu;(Eu=Po.current)===null||Eu===void 0||Eu.scrollTo({top:va})}else{var Ju,jl=Xu!=null?Xu:io(Sr[sa]);(Ju=Po.current.querySelector('[data-row-key="'.concat(jl,'"]')))===null||Ju===void 0||Ju.scrollIntoView()}}else(Os=Po.current)!==null&&Os!==void 0&&Os.scrollTo&&Po.current.scrollTo(_o)}}});var Qa=Ht.useRef(),Ca=Ht.useState(!1),zo=(0,Wt.Z)(Ca,2),ko=zo[0],fl=zo[1],Ll=Ht.useState(!1),pa=(0,Wt.Z)(Ll,2),Io=pa[0],nu=pa[1],Ml=Ht.useState(new Map),Qs=(0,Wt.Z)(Ml,2),ma=Qs[0],Yo=Qs[1],Fo=ne(lo),hs=Fo.map(function(So){return ma.get(So)}),js=Ht.useMemo(function(){return hs},[hs.join("_")]),bl=sr(js,lo,Rn),ia=cn&&pn(cn.y),Uo=cn&&pn(eo)||!!rs.fixed,Ro=Uo&&lo.some(function(So){var _o=So.fixed;return _o}),wo=Ht.useRef(),ps=Ln(Oe,Ot),ir=ps.isSticky,ea=ps.offsetHeader,Be=ps.offsetSummary,Hn=ps.offsetScroll,kl=ps.stickyClassName,du=ps.container,is=Ht.useMemo(function(){return Tn==null?void 0:Tn(Sr)},[Tn,Sr]),ra=(ia||ir)&&Ht.isValidElement(is)&&is.type===_t&&is.props.fixed,gl,zl,fu;ia&&(zl={overflowY:Ar?"scroll":"auto",maxHeight:cn.y}),Uo&&(gl={overflowX:"auto"},ia||(zl={overflowY:"hidden"}),fu={width:eo===!0?"auto":eo,minWidth:"100%"});var Ps=Ht.useCallback(function(So,_o){Yo(function(Os){if(Os.get(So)!==_o){var sa=new Map(Os);return sa.set(So,_o),sa}return Os})},[]),Xr=ji(null),Pa=(0,Wt.Z)(Xr,2),il=Pa[0],Ss=Pa[1];function yo(So,_o){_o&&(typeof _o=="function"?_o(So):_o.scrollLeft!==So&&(_o.scrollLeft=So,_o.scrollLeft!==So&&setTimeout(function(){_o.scrollLeft=So},0)))}var Fs=(0,le.Z)(function(So){var _o=So.currentTarget,Os=So.scrollLeft,sa=Rn==="rtl",va=typeof Os=="number"?Os:_o.scrollLeft,Xu=_o||un;if(!Ss()||Ss()===Xu){var Eu;il(Xu),yo(va,Ds.current),yo(va,Po.current),yo(va,Qa.current),yo(va,(Eu=wo.current)===null||Eu===void 0?void 0:Eu.setScrollLeft)}var Ju=_o||Ds.current;if(Ju){var jl=Jr&&Wr&&typeof eo=="number"?eo:Ju.scrollWidth,mu=Ju.clientWidth;if(jl===mu){fl(!1),nu(!1);return}sa?(fl(-va<jl-mu),nu(-va>0)):(fl(va>0),nu(va<jl-mu))}}),Oa=(0,le.Z)(function(So){Fs(So),Fr==null||Fr(So)}),ss=function(){if(Uo&&Po.current){var _o;Fs({currentTarget:(0,Zn.bn)(Po.current),scrollLeft:(_o=Po.current)===null||_o===void 0?void 0:_o.scrollLeft})}else fl(!1),nu(!1)},rl=function(_o){var Os,sa=_o.width;(Os=wo.current)===null||Os===void 0||Os.checkScrollBarVisible();var va=Ko.current?Ko.current.offsetWidth:sa;Jr&&no&&Ko.current&&(va=no(Ko.current,va)||va),va!==xo&&(ss(),cr(va))},Ws=Ht.useRef(!1);Ht.useEffect(function(){Ws.current&&ss()},[Uo,Ee,os.length]),Ht.useEffect(function(){Ws.current=!0},[]);var Wu=Ht.useState(0),Ho=(0,Wt.Z)(Wu,2),oa=Ho[0],Qo=Ho[1],as=Ht.useState(!0),ms=(0,Wt.Z)(as,2),Ts=ms[0],Vo=ms[1];(0,ve.Z)(function(){(!Wr||!Jr)&&(Po.current instanceof Element?Qo((0,Xe.o)(Po.current).width):Qo((0,Xe.o)(dl.current).width)),Vo((0,Ue.G)("position","sticky"))},[]),Ht.useEffect(function(){Jr&&_r&&(_r.body.current=Po.current)});var dA=Ht.useCallback(function(So){return Ht.createElement(Ht.Fragment,null,Ht.createElement(Lr,So),ra==="top"&&Ht.createElement(Ze,So,is))},[ra,is]),Yr=Ht.useCallback(function(So){return Ht.createElement(Ze,So,is)},[is]),Yu=Ao(["table"],"table"),Eo=Ht.useMemo(function(){return Un||(Ro?eo==="max-content"?"auto":"fixed":ia||ir||lo.some(function(So){var _o=So.ellipsis;return _o})?"fixed":"auto")},[ia,Ro,lo,Un,ir]),Oh,iu={colWidths:js,columCount:lo.length,stickyOffsets:bl,onHeaderRow:Gi,fixHeader:ia,scroll:cn},TA=Ht.useMemo(function(){return Ar?null:typeof Qi=="function"?Qi():Qi},[Ar,Qi]),Rh=Ht.createElement(lr,{data:Sr,measureColumnWidth:ia||Uo||ir}),ch=Ht.createElement(Or,{colWidths:lo.map(function(So){var _o=So.width;return _o}),columns:lo}),gu=qe!=null?Ht.createElement("caption",{className:"".concat(Ot,"-caption")},qe):void 0,pu=(0,dn.Z)(ke,{data:!0}),Go=(0,dn.Z)(ke,{aria:!0});if(ia||ir){var Gl;typeof Dr=="function"?(Gl=Dr(Sr,{scrollbarSize:oa,ref:Po,onScroll:Fs}),iu.colWidths=lo.map(function(So,_o){var Os=So.width,sa=_o===lo.length-1?Os-oa:Os;return typeof sa=="number"&&!Number.isNaN(sa)?sa:0})):Gl=Ht.createElement("div",{style:(0,te.Z)((0,te.Z)({},gl),zl),onScroll:Oa,ref:Po,className:Ke()("".concat(Ot,"-body"))},Ht.createElement(Yu,(0,Gt.Z)({style:(0,te.Z)((0,te.Z)({},fu),{},{tableLayout:Eo})},Go),gu,ch,Rh,!ra&&is&&Ht.createElement(Ze,{stickyOffsets:bl,flattenColumns:lo},is)));var dh=(0,te.Z)((0,te.Z)((0,te.Z)({noData:!Sr.length,maxContentScroll:Uo&&eo==="max-content"},iu),xs),{},{direction:Rn,stickyClassName:kl,onScroll:Fs});Oh=Ht.createElement(Ht.Fragment,null,on!==!1&&Ht.createElement(Fi,(0,Gt.Z)({},dh,{stickyTopOffset:ea,className:"".concat(Ot,"-header"),ref:Ds}),dA),Gl,ra&&ra!=="top"&&Ht.createElement(Fi,(0,Gt.Z)({},dh,{stickyBottomOffset:Be,className:"".concat(Ot,"-summary"),ref:Qa}),Yr),ir&&Po.current&&Po.current instanceof Element&&Ht.createElement(bi,{ref:wo,offsetScroll:Hn,scrollBodyRef:Po,onScroll:Fs,container:du,direction:Rn}))}else Oh=Ht.createElement("div",{style:(0,te.Z)((0,te.Z)({},gl),zl),className:Ke()("".concat(Ot,"-content")),onScroll:Fs,ref:Po},Ht.createElement(Yu,(0,Gt.Z)({style:(0,te.Z)((0,te.Z)({},fu),{},{tableLayout:Eo})},Go),gu,ch,on!==!1&&Ht.createElement(Lr,(0,Gt.Z)({},iu,xs)),Rh,is&&Ht.createElement(Ze,{stickyOffsets:bl,flattenColumns:lo},is)));var Pu=Ht.createElement("div",(0,Gt.Z)({className:Ke()(Ot,vn,(0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)((0,ye.Z)({},"".concat(Ot,"-rtl"),Rn==="rtl"),"".concat(Ot,"-ping-left"),ko),"".concat(Ot,"-ping-right"),Io),"".concat(Ot,"-layout-fixed"),Un==="fixed"),"".concat(Ot,"-fixed-header"),ia),"".concat(Ot,"-fixed-column"),Ro),"".concat(Ot,"-fixed-column-gapped"),Ro&&zr),"".concat(Ot,"-scroll-horizontal"),Uo),"".concat(Ot,"-has-fix-left"),lo[0]&&lo[0].fixed),"".concat(Ot,"-has-fix-right"),lo[lo.length-1]&&lo[lo.length-1].fixed==="right")),style:vi,id:In,ref:Ko},pu),gn&&Ht.createElement(se,{className:"".concat(Ot,"-title")},gn(Sr)),Ht.createElement("div",{ref:dl,className:"".concat(Ot,"-container")},Oh),Cn&&Ht.createElement(se,{className:"".concat(Ot,"-footer")},Cn(Sr)));Uo&&(Pu=Ht.createElement(ze.Z,{onResize:rl},Pu));var fA=Ge(lo,bl,Rn),Fu=Ht.useMemo(function(){return{scrollX:eo,prefixCls:Ot,getComponent:Ao,scrollbarSize:oa,direction:Rn,fixedInfoList:fA,isSticky:ir,supportSticky:Ts,componentWidth:xo,fixHeader:ia,fixColumn:Ro,horizonScroll:Uo,tableLayout:Eo,rowClassName:Jn,expandedRowClassName:rs.expandedRowClassName,expandIcon:Cs,expandableType:fs,expandRowByClick:rs.expandRowByClick,expandedRowRender:rs.expandedRowRender,onTriggerExpand:pr,expandIconColumnIndex:rs.expandIconColumnIndex,indentSize:rs.indentSize,allColumnsFixedLeft:lo.every(function(So){return So.fixed==="left"}),emptyNode:TA,columns:os,flattenColumns:lo,onColumnResize:Ps,hoverStartRow:Zs,hoverEndRow:Ua,onHover:us,rowExpandable:rs.rowExpandable,onRow:nr,getRowKey:io,expandedKeys:As,childrenColumnName:Ci,rowHoverable:Ur}},[eo,Ot,Ao,oa,Rn,fA,ir,Ts,xo,ia,Ro,Uo,Eo,Jn,rs.expandedRowClassName,Cs,fs,rs.expandRowByClick,rs.expandedRowRender,pr,rs.expandIconColumnIndex,rs.indentSize,TA,os,lo,Ps,Zs,Ua,us,rs.rowExpandable,nr,io,As,Ci,Ur]);return Ht.createElement(bt.Provider,{value:Fu},Pu)}var $i=Ht.forwardRef(Mn);function hr(Ne){return at($i,Ne)}var vr=hr();vr.EXPAND_COLUMN=St.w,vr.INTERNAL_HOOKS=St.R,vr.Column=Ni,vr.ColumnGroup=ci,vr.Summary=Bn;var Te=vr,xi=It(6790),er=oe(null),Si=oe(null);function Mr(Ne,hn,ke){var Ot=hn||1;return ke[Ne+Ot]-(ke[Ne]||0)}function ur(Ne){var hn=Ne.rowInfo,ke=Ne.column,Ot=Ne.colIndex,vn=Ne.indent,Jn=Ne.index,vi=Ne.component,Ee=Ne.renderIndex,Wn=Ne.record,cn=Ne.style,Un=Ne.className,Rn=Ne.inverse,gn=Ne.getHeight,Cn=ke.render,Tn=ke.dataIndex,qe=ke.className,In=ke.width,on=he(Si,["columnsOffset"]),_i=on.columnsOffset,Qi=si(hn,ke,Ot,vn,Jn),nr=Qi.key,Gi=Qi.fixedInfo,Fr=Qi.appendCellNode,yr=Qi.additionalCellProps,Zr=yr.style,_r=yr.colSpan,Wr=_r===void 0?1:_r,no=yr.rowSpan,Oe=no===void 0?1:no,Nr=Ot-1,Ur=Mr(Nr,Wr,_i),Sr=Wr>1?In-Ur:0,Ar=(0,te.Z)((0,te.Z)((0,te.Z)({},Zr),cn),{},{flex:"0 0 ".concat(Ur,"px"),width:"".concat(Ur,"px"),marginRight:Sr,pointerEvents:"auto"}),Jr=Ht.useMemo(function(){return Rn?Oe<=1:Wr===0||Oe===0||Oe>1},[Oe,Wr,Rn]);Jr?Ar.visibility="hidden":Rn&&(Ar.height=gn==null?void 0:gn(Oe));var Ao=Jr?function(){return null}:Cn,io={};return(Oe===0||Wr===0)&&(io.rowSpan=1,io.colSpan=1),Ht.createElement(tn,(0,Gt.Z)({className:Ke()(qe,Un),ellipsis:ke.ellipsis,align:ke.align,scope:ke.rowScope,component:vi,prefixCls:hn.prefixCls,key:nr,record:Wn,index:Jn,renderIndex:Ee,dataIndex:Tn,render:Ao,shouldCellUpdate:ke.shouldCellUpdate},Gi,{appendNode:Fr,additionalProps:(0,te.Z)((0,te.Z)({},yr),{},{style:Ar},io)}))}var Tr=ur,gr=["data","index","className","rowKey","style","extra","getHeight"],ue=Ht.forwardRef(function(Ne,hn){var ke=Ne.data,Ot=Ne.index,vn=Ne.className,Jn=Ne.rowKey,vi=Ne.style,Ee=Ne.extra,Wn=Ne.getHeight,cn=(0,mt.Z)(Ne,gr),Un=ke.record,Rn=ke.indent,gn=ke.index,Cn=he(bt,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Tn=Cn.scrollX,qe=Cn.flattenColumns,In=Cn.prefixCls,on=Cn.fixColumn,_i=Cn.componentWidth,Qi=he(er,["getComponent"]),nr=Qi.getComponent,Gi=be(Un,Jn,Ot,Rn),Fr=nr(["body","row"],"div"),yr=nr(["body","cell"],"div"),Zr=Gi.rowSupportExpand,_r=Gi.expanded,Wr=Gi.rowProps,no=Gi.expandedRowRender,Oe=Gi.expandedRowClassName,Nr;if(Zr&&_r){var Ur=no(Un,Ot,Rn+1,_r),Sr=Ki(Oe,Un,Ot,Rn),Ar={};on&&(Ar={style:(0,ye.Z)({},"--virtual-width","".concat(_i,"px"))});var Jr="".concat(In,"-expanded-row-cell");Nr=Ht.createElement(Fr,{className:Ke()("".concat(In,"-expanded-row"),"".concat(In,"-expanded-row-level-").concat(Rn+1),Sr)},Ht.createElement(tn,{component:yr,prefixCls:In,className:Ke()(Jr,(0,ye.Z)({},"".concat(Jr,"-fixed"),on)),additionalProps:Ar},Ur))}var Ao=(0,te.Z)((0,te.Z)({},vi),{},{width:Tn});Ee&&(Ao.position="absolute",Ao.pointerEvents="none");var io=Ht.createElement(Fr,(0,Gt.Z)({},Wr,cn,{"data-row-key":Jn,ref:Zr?null:hn,className:Ke()(vn,"".concat(In,"-row"),Wr==null?void 0:Wr.className,(0,ye.Z)({},"".concat(In,"-row-extra"),Ee)),style:(0,te.Z)((0,te.Z)({},Ao),Wr==null?void 0:Wr.style)}),qe.map(function(Dr,fo){return Ht.createElement(Tr,{key:fo,component:yr,rowInfo:Gi,column:Dr,colIndex:fo,indent:Rn,index:Ot,renderIndex:gn,record:Un,inverse:Ee,getHeight:Wn})}));return Zr?Ht.createElement("div",{ref:hn},io,Nr):io}),re=dt(ue),ee=re,je=Ht.forwardRef(function(Ne,hn){var ke=Ne.data,Ot=Ne.onScroll,vn=he(bt,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),Jn=vn.flattenColumns,vi=vn.onColumnResize,Ee=vn.getRowKey,Wn=vn.expandedKeys,cn=vn.prefixCls,Un=vn.childrenColumnName,Rn=vn.scrollX,gn=vn.direction,Cn=he(er),Tn=Cn.sticky,qe=Cn.scrollY,In=Cn.listItemHeight,on=Cn.getComponent,_i=Cn.onScroll,Qi=Ht.useRef(),nr=mn(ke,Un,Wn,Ee),Gi=Ht.useMemo(function(){var Nr=0;return Jn.map(function(Ur){var Sr=Ur.width,Ar=Ur.key;return Nr+=Sr,[Ar,Sr,Nr]})},[Jn]),Fr=Ht.useMemo(function(){return Gi.map(function(Nr){return Nr[2]})},[Gi]);Ht.useEffect(function(){Gi.forEach(function(Nr){var Ur=(0,Wt.Z)(Nr,2),Sr=Ur[0],Ar=Ur[1];vi(Sr,Ar)})},[Gi]),Ht.useImperativeHandle(hn,function(){var Nr,Ur={scrollTo:function(Ar){var Jr;(Jr=Qi.current)===null||Jr===void 0||Jr.scrollTo(Ar)},nativeElement:(Nr=Qi.current)===null||Nr===void 0?void 0:Nr.nativeElement};return Object.defineProperty(Ur,"scrollLeft",{get:function(){var Ar;return((Ar=Qi.current)===null||Ar===void 0?void 0:Ar.getScrollInfo().x)||0},set:function(Ar){var Jr;(Jr=Qi.current)===null||Jr===void 0||Jr.scrollTo({left:Ar})}}),Ur});var yr=function(Ur,Sr){var Ar,Jr=(Ar=nr[Sr])===null||Ar===void 0?void 0:Ar.record,Ao=Ur.onCell;if(Ao){var io,Dr=Ao(Jr,Sr);return(io=Dr==null?void 0:Dr.rowSpan)!==null&&io!==void 0?io:1}return 1},Zr=function(Ur){var Sr=Ur.start,Ar=Ur.end,Jr=Ur.getSize,Ao=Ur.offsetY;if(Ar<0)return null;for(var io=Jn.filter(function(Cs){return yr(Cs,Sr)===0}),Dr=Sr,fo=function(Ci){if(io=io.filter(function(pr){return yr(pr,Ci)===0}),!io.length)return Dr=Ci,1},es=Sr;es>=0&&!fo(es);es-=1);for(var Zs=Jn.filter(function(Cs){return yr(Cs,Ar)!==1}),Ua=Ar,us=function(Ci){if(Zs=Zs.filter(function(pr){return yr(pr,Ci)!==1}),!Zs.length)return Ua=Math.max(Ci-1,Ar),1},wr=Ar;wr<nr.length&&!us(wr);wr+=1);for(var ns=[],rs=function(Ci){var pr=nr[Ci];if(!pr)return 1;Jn.some(function(Qr){return yr(Qr,Ci)>1})&&ns.push(Ci)},fs=Dr;fs<=Ua;fs+=1)rs(fs);var As=ns.map(function(Cs){var Ci=nr[Cs],pr=Ee(Ci.record,Cs),Qr=function(xo){var cr=Cs+xo-1,Co=Ee(nr[cr].record,cr),gs=Jr(pr,Co);return gs.bottom-gs.top},$r=Jr(pr);return Ht.createElement(ee,{key:Cs,data:Ci,rowKey:pr,index:Cs,style:{top:-Ao+$r.top},extra:!0,getHeight:Qr})});return As},_r=Ht.useMemo(function(){return{columnsOffset:Fr}},[Fr]),Wr="".concat(cn,"-tbody"),no=on(["body","wrapper"]),Oe={};return Tn&&(Oe.position="sticky",Oe.bottom=0,(0,Yt.Z)(Tn)==="object"&&Tn.offsetScroll&&(Oe.bottom=Tn.offsetScroll)),Ht.createElement(Si.Provider,{value:_r},Ht.createElement(xi.Z,{fullHeight:!1,ref:Qi,prefixCls:"".concat(Wr,"-virtual"),styles:{horizontalScrollBar:Oe},className:Wr,height:qe,itemHeight:In||24,data:nr,itemKey:function(Ur){return Ee(Ur.record)},component:no,scrollWidth:Rn,direction:gn,onVirtualScroll:function(Ur){var Sr,Ar=Ur.x;Ot({currentTarget:(Sr=Qi.current)===null||Sr===void 0?void 0:Sr.nativeElement,scrollLeft:Ar})},onScroll:_i,extraRender:Zr},function(Nr,Ur,Sr){var Ar=Ee(Nr.record,Ur);return Ht.createElement(ee,{data:Nr,rowKey:Ar,index:Ur,style:Sr.style})}))}),xe=dt(je),An=xe,ui=function(hn,ke){var Ot=ke.ref,vn=ke.onScroll;return Ht.createElement(An,{ref:Ot,data:hn,onScroll:vn})};function ti(Ne,hn){var ke=Ne.data,Ot=Ne.columns,vn=Ne.scroll,Jn=Ne.sticky,vi=Ne.prefixCls,Ee=vi===void 0?fi:vi,Wn=Ne.className,cn=Ne.listItemHeight,Un=Ne.components,Rn=Ne.onScroll,gn=vn||{},Cn=gn.x,Tn=gn.y;typeof Cn!="number"&&(Cn=1),typeof Tn!="number"&&(Tn=500);var qe=(0,Ti.zX)(function(_i,Qi){return(0,nn.Z)(Un,_i)||Qi}),In=(0,Ti.zX)(Rn),on=Ht.useMemo(function(){return{sticky:Jn,scrollY:Tn,listItemHeight:cn,getComponent:qe,onScroll:In}},[Jn,Tn,cn,qe,In]);return Ht.createElement(er.Provider,{value:on},Ht.createElement(Te,(0,Gt.Z)({},Ne,{className:Ke()(Wn,"".concat(Ee,"-virtual")),scroll:(0,te.Z)((0,te.Z)({},vn),{},{x:Cn}),components:(0,te.Z)((0,te.Z)({},Un),{},{body:ke!=null&&ke.length?ui:void 0}),columns:Ot,internalHooks:St.R,tailor:!0,ref:hn})))}var Bi=Ht.forwardRef(ti);function mi(Ne){return at(Bi,Ne)}var oi=mi(),Di=null},54451:function(Sn,Ve,It){"use strict";It.d(Ve,{g:function(){return Ht},v:function(){return de}});var St=It(98506),Wt=It(33346),le=It(48736),ve=["expandable"],de="RC_TABLE_INTERNAL_COL_DEFINE";function Ht(ie){var oe=ie.expandable,he=(0,Wt.Z)(ie,ve),Gt;return"expandable"in ie?Gt=(0,St.Z)((0,St.Z)({},he),oe):Gt=he,Gt.showExpandColumn===!1&&(Gt.expandIconColumnIndex=-1),Gt}},22711:function(Sn,Ve,It){"use strict";It.r(Ve),It.d(Ve,{ResizableTextArea:function(){return fe},default:function(){return fn}});var St=It(67711),Wt=It(52873),le=It(98506),ve=It(15142),de=It(16886),Ht=It(33346),ie=It(92310),oe=It.n(ie),he=It(36901),Gt=It(66003),Ie=It(30292),Xt=It(18929),Me=It(59301),Qt=It(26420),nt=It(29301),et=It(34280),At=It(16089),at=`
min-height:0 !important;
max-height:none !important;
height:0 !important;
visibility:hidden !important;
overflow:hidden !important;
position:absolute !important;
z-index:-1000 !important;
top:0 !important;
right:0 !important;
pointer-events: none !important;
`,dt=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],gt={},xt;function bt(xn){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xn=xn.getAttribute("id")||xn.getAttribute("data-reactid")||xn.getAttribute("name");if(_n&&gt[Xn])return gt[Xn];var pe=window.getComputedStyle(xn),ne=pe.getPropertyValue("box-sizing")||pe.getPropertyValue("-moz-box-sizing")||pe.getPropertyValue("-webkit-box-sizing"),pn=parseFloat(pe.getPropertyValue("padding-bottom"))+parseFloat(pe.getPropertyValue("padding-top")),Ai=parseFloat(pe.getPropertyValue("border-bottom-width"))+parseFloat(pe.getPropertyValue("border-top-width")),ai=dt.map(function(Qn){return"".concat(Qn,":").concat(pe.getPropertyValue(Qn))}).join(";"),sn={sizingStyle:ai,paddingSize:pn,borderSize:Ai,boxSizing:ne};return _n&&Xn&&(gt[Xn]=sn),sn}function Ut(xn){var _n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,pe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;xt||(xt=document.createElement("textarea"),xt.setAttribute("tab-index","-1"),xt.setAttribute("aria-hidden","true"),xt.setAttribute("name","hiddenTextarea"),document.body.appendChild(xt)),xn.getAttribute("wrap")?xt.setAttribute("wrap",xn.getAttribute("wrap")):xt.removeAttribute("wrap");var ne=bt(xn,_n),pn=ne.paddingSize,Ai=ne.borderSize,ai=ne.boxSizing,sn=ne.sizingStyle;xt.setAttribute("style","".concat(sn,";").concat(at)),xt.value=xn.value||xn.placeholder||"";var Qn=void 0,jn=void 0,Ti,$e=xt.scrollHeight;if(ai==="border-box"?$e+=Ai:ai==="content-box"&&($e-=pn),Xn!==null||pe!==null){xt.value=" ";var Le=xt.scrollHeight-pn;Xn!==null&&(Qn=Le*Xn,ai==="border-box"&&(Qn=Qn+pn+Ai),$e=Math.max(Qn,$e)),pe!==null&&(jn=Le*pe,ai==="border-box"&&(jn=jn+pn+Ai),Ti=$e>jn?"":"hidden",$e=Math.min(jn,$e))}var tn={height:$e,overflowY:Ti,resize:"none"};return Qn&&(tn.minHeight=Qn),jn&&(tn.maxHeight=jn),tn}var Rt=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Zt=0,Yt=1,te=2,ye=Me.forwardRef(function(xn,_n){var Xn=xn,pe=Xn.prefixCls,ne=Xn.defaultValue,pn=Xn.value,Ai=Xn.autoSize,ai=Xn.onResize,sn=Xn.className,Qn=Xn.style,jn=Xn.disabled,Ti=Xn.onChange,$e=Xn.onInternalAutoSize,Le=(0,Ht.Z)(Xn,Rt),tn=(0,Xt.Z)(ne,{value:pn,postState:function(Ei){return Ei!=null?Ei:""}}),hi=(0,de.Z)(tn,2),ni=hi[0],zt=hi[1],Ft=function(Ei){zt(Ei.target.value),Ti==null||Ti(Ei)},mt=Me.useRef();Me.useImperativeHandle(_n,function(){return{textArea:mt.current}});var vt=Me.useMemo(function(){return Ai&&(0,Qt.Z)(Ai)==="object"?[Ai.minRows,Ai.maxRows]:[]},[Ai]),Et=(0,de.Z)(vt,2),Ct=Et[0],_t=Et[1],Ce=!!Ai,Ze=function(){try{if(document.activeElement===mt.current){var Ei=mt.current,qi=Ei.selectionStart,ii=Ei.selectionEnd,ar=Ei.scrollTop;mt.current.setSelectionRange(qi,ii),mt.current.scrollTop=ar}}catch(Xi){}},Bn=Me.useState(te),ze=(0,de.Z)(Bn,2),Ue=ze[0],Xe=ze[1],dn=Me.useState(),Kn=(0,de.Z)(dn,2),mn=Kn[0],be=Kn[1],ei=function(){Xe(Zt)};(0,et.Z)(function(){Ce&&ei()},[pn,Ct,_t,Ce]),(0,et.Z)(function(){if(Ue===Zt)Xe(Yt);else if(Ue===Yt){var yi=Ut(mt.current,!1,Ct,_t);Xe(te),be(yi)}else Ze()},[Ue]);var kn=Me.useRef(),On=function(){At.Z.cancel(kn.current)},Vn=function(Ei){Ue===te&&(ai==null||ai(Ei),Ai&&(On(),kn.current=(0,At.Z)(function(){ei()})))};Me.useEffect(function(){return On},[]);var Ki=Ce?mn:null,si=(0,le.Z)((0,le.Z)({},Qn),Ki);return(Ue===Zt||Ue===Yt)&&(si.overflowY="hidden",si.overflowX="hidden"),Me.createElement(nt.Z,{onResize:Vn,disabled:!(Ai||ai)},Me.createElement("textarea",(0,St.Z)({},Le,{ref:mt,style:si,className:oe()(pe,sn,(0,Wt.Z)({},"".concat(pe,"-disabled"),jn)),disabled:jn,value:ni,onChange:Ft})))}),fe=ye,Ke=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],_e=Me.forwardRef(function(xn,_n){var Xn,pe=xn.defaultValue,ne=xn.value,pn=xn.onFocus,Ai=xn.onBlur,ai=xn.onChange,sn=xn.allowClear,Qn=xn.maxLength,jn=xn.onCompositionStart,Ti=xn.onCompositionEnd,$e=xn.suffix,Le=xn.prefixCls,tn=Le===void 0?"rc-textarea":Le,hi=xn.showCount,ni=xn.count,zt=xn.className,Ft=xn.style,mt=xn.disabled,vt=xn.hidden,Et=xn.classNames,Ct=xn.styles,_t=xn.onResize,Ce=xn.onClear,Ze=xn.onPressEnter,Bn=xn.readOnly,ze=xn.autoSize,Ue=xn.onKeyDown,Xe=(0,Ht.Z)(xn,Ke),dn=(0,Xt.Z)(pe,{value:ne,defaultValue:pe}),Kn=(0,de.Z)(dn,2),mn=Kn[0],be=Kn[1],ei=mn==null?"":String(mn),kn=Me.useState(!1),On=(0,de.Z)(kn,2),Vn=On[0],Ki=On[1],si=Me.useRef(!1),yi=Me.useState(null),Ei=(0,de.Z)(yi,2),qi=Ei[0],ii=Ei[1],ar=(0,Me.useRef)(null),Xi=(0,Me.useRef)(null),lr=function(){var Pe;return(Pe=Xi.current)===null||Pe===void 0?void 0:Pe.textArea},zi=function(){lr().focus()};(0,Me.useImperativeHandle)(_n,function(){var Ln;return{resizableTextArea:Xi.current,focus:zi,blur:function(){lr().blur()},nativeElement:((Ln=ar.current)===null||Ln===void 0?void 0:Ln.nativeElement)||lr()}}),(0,Me.useEffect)(function(){Ki(function(Ln){return!mt&&Ln})},[mt]);var Kr=Me.useState(null),Ir=(0,de.Z)(Kr,2),Or=Ir[0],Yi=Ir[1];Me.useEffect(function(){if(Or){var Ln;(Ln=lr()).setSelectionRange.apply(Ln,(0,ve.Z)(Or))}},[Or]);var kr=(0,Gt.Z)(ni,hi),kt=(Xn=kr.max)!==null&&Xn!==void 0?Xn:Qn,tr=Number(kt)>0,Fi=kr.strategy(ei),ri=!!kt&&Fi>kt,Li=function(Pe,sr){var $n=sr;!si.current&&kr.exceedFormatter&&kr.max&&kr.strategy(sr)>kr.max&&($n=kr.exceedFormatter(sr,{max:kr.max}),sr!==$n&&Yi([lr().selectionStart||0,lr().selectionEnd||0])),be($n),(0,Ie.rJ)(Pe.currentTarget,Pe,ai,$n)},Ui=function(Pe){si.current=!0,jn==null||jn(Pe)},Ri=function(Pe){si.current=!1,Li(Pe,Pe.currentTarget.value),Ti==null||Ti(Pe)},Lr=function(Pe){Li(Pe,Pe.target.value)},an=function(Pe){Pe.key==="Enter"&&Ze&&Ze(Pe),Ue==null||Ue(Pe)},rn=function(Pe){Ki(!0),pn==null||pn(Pe)},Ge=function(Pe){Ki(!1),Ai==null||Ai(Pe)},yn=function(Pe){be(""),zi(),(0,Ie.rJ)(lr(),Pe,ai)},ji=$e,Mi;kr.show&&(kr.showFormatter?Mi=kr.showFormatter({value:ei,count:Fi,maxLength:kt}):Mi="".concat(Fi).concat(tr?" / ".concat(kt):""),ji=Me.createElement(Me.Fragment,null,ji,Me.createElement("span",{className:oe()("".concat(tn,"-data-count"),Et==null?void 0:Et.count),style:Ct==null?void 0:Ct.count},Mi)));var or=function(Pe){var sr;_t==null||_t(Pe),(sr=lr())!==null&&sr!==void 0&&sr.style.height&&ii(!0)},ln=!ze&&!hi&&!sn;return Me.createElement(he.BaseInput,{ref:ar,value:ei,allowClear:sn,handleReset:yn,suffix:ji,prefixCls:tn,classNames:(0,le.Z)((0,le.Z)({},Et),{},{affixWrapper:oe()(Et==null?void 0:Et.affixWrapper,(0,Wt.Z)((0,Wt.Z)({},"".concat(tn,"-show-count"),hi),"".concat(tn,"-textarea-allow-clear"),sn))}),disabled:mt,focused:Vn,className:oe()(zt,ri&&"".concat(tn,"-out-of-range")),style:(0,le.Z)((0,le.Z)({},Ft),qi&&!ln?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Mi=="string"?Mi:void 0}},hidden:vt,readOnly:Bn,onClear:Ce},Me.createElement(fe,(0,St.Z)({},Xe,{autoSize:ze,maxLength:Qn,onKeyDown:an,onChange:Lr,onFocus:rn,onBlur:Ge,onCompositionStart:Ui,onCompositionEnd:Ri,className:oe()(Et==null?void 0:Et.textarea),style:(0,le.Z)((0,le.Z)({},Ct==null?void 0:Ct.textarea),{},{resize:Ft==null?void 0:Ft.resize}),disabled:mt,prefixCls:tn,onResize:or,ref:Xi,readOnly:Bn})))}),nn=_e,fn=nn},639:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return gt}});var St=It(67711),Wt=It(52873),le=It(98506),ve=It(16886),de=It(33346),Ht=It(59301),ie=It(92310),oe=It.n(ie),he=It(26112),Gt=It(30699),Ie=function(bt){for(var Ut=bt.prefixCls,Rt=bt.level,Zt=bt.isStart,Yt=bt.isEnd,te="".concat(Ut,"-indent-unit"),ye=[],fe=0;fe<Rt;fe+=1)ye.push(Ht.createElement("span",{key:fe,className:oe()(te,(0,Wt.Z)((0,Wt.Z)({},"".concat(te,"-start"),Zt[fe]),"".concat(te,"-end"),Yt[fe]))}));return Ht.createElement("span",{"aria-hidden":"true",className:"".concat(Ut,"-indent")},ye)},Xt=Ht.memo(Ie),Me=It(65065),Qt=It(34061),nt=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],et="open",At="close",at="---",dt=function(bt){var Ut,Rt,Zt,Yt=bt.eventKey,te=bt.className,ye=bt.style,fe=bt.dragOver,Ke=bt.dragOverGapTop,_e=bt.dragOverGapBottom,nn=bt.isLeaf,fn=bt.isStart,xn=bt.isEnd,_n=bt.expanded,Xn=bt.selected,pe=bt.checked,ne=bt.halfChecked,pn=bt.loading,Ai=bt.domRef,ai=bt.active,sn=bt.data,Qn=bt.onMouseMove,jn=bt.selectable,Ti=(0,de.Z)(bt,nt),$e=Ht.useContext(Gt.k),Le=Ht.useContext(Gt.y),tn=Ht.useRef(null),hi=Ht.useState(!1),ni=(0,ve.Z)(hi,2),zt=ni[0],Ft=ni[1],mt=!!($e.disabled||bt.disabled||(Ut=Le.nodeDisabled)!==null&&Ut!==void 0&&Ut.call(Le,sn)),vt=Ht.useMemo(function(){return!$e.checkable||bt.checkable===!1?!1:$e.checkable},[$e.checkable,bt.checkable]),Et=function(Fi){mt||$e.onNodeSelect(Fi,(0,Qt.F)(bt))},Ct=function(Fi){mt||!vt||bt.disableCheckbox||$e.onNodeCheck(Fi,(0,Qt.F)(bt),!pe)},_t=Ht.useMemo(function(){return typeof jn=="boolean"?jn:$e.selectable},[jn,$e.selectable]),Ce=function(Fi){$e.onNodeClick(Fi,(0,Qt.F)(bt)),_t?Et(Fi):Ct(Fi)},Ze=function(Fi){$e.onNodeDoubleClick(Fi,(0,Qt.F)(bt))},Bn=function(Fi){$e.onNodeMouseEnter(Fi,(0,Qt.F)(bt))},ze=function(Fi){$e.onNodeMouseLeave(Fi,(0,Qt.F)(bt))},Ue=function(Fi){$e.onNodeContextMenu(Fi,(0,Qt.F)(bt))},Xe=Ht.useMemo(function(){return!!($e.draggable&&(!$e.draggable.nodeDraggable||$e.draggable.nodeDraggable(sn)))},[$e.draggable,sn]),dn=function(Fi){Fi.stopPropagation(),Ft(!0),$e.onNodeDragStart(Fi,bt);try{Fi.dataTransfer.setData("text/plain","")}catch(ri){}},Kn=function(Fi){Fi.preventDefault(),Fi.stopPropagation(),$e.onNodeDragEnter(Fi,bt)},mn=function(Fi){Fi.preventDefault(),Fi.stopPropagation(),$e.onNodeDragOver(Fi,bt)},be=function(Fi){Fi.stopPropagation(),$e.onNodeDragLeave(Fi,bt)},ei=function(Fi){Fi.stopPropagation(),Ft(!1),$e.onNodeDragEnd(Fi,bt)},kn=function(Fi){Fi.preventDefault(),Fi.stopPropagation(),Ft(!1),$e.onNodeDrop(Fi,bt)},On=function(Fi){pn||$e.onNodeExpand(Fi,(0,Qt.F)(bt))},Vn=Ht.useMemo(function(){var tr=(0,Me.Z)($e.keyEntities,Yt)||{},Fi=tr.children;return!!(Fi||[]).length},[$e.keyEntities,Yt]),Ki=Ht.useMemo(function(){return nn===!1?!1:nn||!$e.loadData&&!Vn||$e.loadData&&bt.loaded&&!Vn},[nn,$e.loadData,Vn,bt.loaded]);Ht.useEffect(function(){pn||typeof $e.loadData=="function"&&_n&&!Ki&&!bt.loaded&&$e.onNodeLoad((0,Qt.F)(bt))},[pn,$e.loadData,$e.onNodeLoad,_n,Ki,bt]);var si=Ht.useMemo(function(){var tr;return(tr=$e.draggable)!==null&&tr!==void 0&&tr.icon?Ht.createElement("span",{className:"".concat($e.prefixCls,"-draggable-icon")},$e.draggable.icon):null},[$e.draggable]),yi=function(Fi){var ri=bt.switcherIcon||$e.switcherIcon;return typeof ri=="function"?ri((0,le.Z)((0,le.Z)({},bt),{},{isLeaf:Fi})):ri},Ei=function(){if(Ki){var Fi=yi(!0);return Fi!==!1?Ht.createElement("span",{className:oe()("".concat($e.prefixCls,"-switcher"),"".concat($e.prefixCls,"-switcher-noop"))},Fi):null}var ri=yi(!1);return ri!==!1?Ht.createElement("span",{onClick:On,className:oe()("".concat($e.prefixCls,"-switcher"),"".concat($e.prefixCls,"-switcher_").concat(_n?et:At))},ri):null},qi=Ht.useMemo(function(){if(!vt)return null;var tr=typeof vt!="boolean"?vt:null;return Ht.createElement("span",{className:oe()("".concat($e.prefixCls,"-checkbox"),(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)({},"".concat($e.prefixCls,"-checkbox-checked"),pe),"".concat($e.prefixCls,"-checkbox-indeterminate"),!pe&&ne),"".concat($e.prefixCls,"-checkbox-disabled"),mt||bt.disableCheckbox)),onClick:Ct,role:"checkbox","aria-checked":ne?"mixed":pe,"aria-disabled":mt||bt.disableCheckbox,"aria-label":"Select ".concat(typeof bt.title=="string"?bt.title:"tree node")},tr)},[vt,pe,ne,mt,bt.disableCheckbox,bt.title]),ii=Ht.useMemo(function(){return Ki?null:_n?et:At},[Ki,_n]),ar=Ht.useMemo(function(){return Ht.createElement("span",{className:oe()("".concat($e.prefixCls,"-iconEle"),"".concat($e.prefixCls,"-icon__").concat(ii||"docu"),(0,Wt.Z)({},"".concat($e.prefixCls,"-icon_loading"),pn))})},[$e.prefixCls,ii,pn]),Xi=Ht.useMemo(function(){var tr=!!$e.draggable,Fi=!bt.disabled&&tr&&$e.dragOverNodeKey===Yt;return Fi?$e.dropIndicatorRender({dropPosition:$e.dropPosition,dropLevelOffset:$e.dropLevelOffset,indent:$e.indent,prefixCls:$e.prefixCls,direction:$e.direction}):null},[$e.dropPosition,$e.dropLevelOffset,$e.indent,$e.prefixCls,$e.direction,$e.draggable,$e.dragOverNodeKey,$e.dropIndicatorRender]),lr=Ht.useMemo(function(){var tr=bt.title,Fi=tr===void 0?at:tr,ri="".concat($e.prefixCls,"-node-content-wrapper"),Li;if($e.showIcon){var Ui=bt.icon||$e.icon;Li=Ui?Ht.createElement("span",{className:oe()("".concat($e.prefixCls,"-iconEle"),"".concat($e.prefixCls,"-icon__customize"))},typeof Ui=="function"?Ui(bt):Ui):ar}else $e.loadData&&pn&&(Li=ar);var Ri;return typeof Fi=="function"?Ri=Fi(sn):$e.titleRender?Ri=$e.titleRender(sn):Ri=Fi,Ht.createElement("span",{ref:tn,title:typeof Fi=="string"?Fi:"",className:oe()(ri,"".concat(ri,"-").concat(ii||"normal"),(0,Wt.Z)({},"".concat($e.prefixCls,"-node-selected"),!mt&&(Xn||zt))),onMouseEnter:Bn,onMouseLeave:ze,onContextMenu:Ue,onClick:Ce,onDoubleClick:Ze},Li,Ht.createElement("span",{className:"".concat($e.prefixCls,"-title")},Ri),Xi)},[$e.prefixCls,$e.showIcon,bt,$e.icon,ar,$e.titleRender,sn,ii,Bn,ze,Ue,Ce,Ze]),zi=(0,he.Z)(Ti,{aria:!0,data:!0}),Kr=(0,Me.Z)($e.keyEntities,Yt)||{},Ir=Kr.level,Or=xn[xn.length-1],Yi=!mt&&Xe,kr=$e.draggingNodeKey===Yt,kt=jn!==void 0?{"aria-selected":!!jn}:void 0;return Ht.createElement("div",(0,St.Z)({ref:Ai,role:"treeitem","aria-expanded":nn?void 0:_n,className:oe()(te,"".concat($e.prefixCls,"-treenode"),(Zt={},(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)(Zt,"".concat($e.prefixCls,"-treenode-disabled"),mt),"".concat($e.prefixCls,"-treenode-switcher-").concat(_n?"open":"close"),!nn),"".concat($e.prefixCls,"-treenode-checkbox-checked"),pe),"".concat($e.prefixCls,"-treenode-checkbox-indeterminate"),ne),"".concat($e.prefixCls,"-treenode-selected"),Xn),"".concat($e.prefixCls,"-treenode-loading"),pn),"".concat($e.prefixCls,"-treenode-active"),ai),"".concat($e.prefixCls,"-treenode-leaf-last"),Or),"".concat($e.prefixCls,"-treenode-draggable"),Xe),"dragging",kr),(0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)((0,Wt.Z)(Zt,"drop-target",$e.dropTargetKey===Yt),"drop-container",$e.dropContainerKey===Yt),"drag-over",!mt&&fe),"drag-over-gap-top",!mt&&Ke),"drag-over-gap-bottom",!mt&&_e),"filter-node",(Rt=$e.filterTreeNode)===null||Rt===void 0?void 0:Rt.call($e,(0,Qt.F)(bt))),"".concat($e.prefixCls,"-treenode-leaf"),Ki))),style:ye,draggable:Yi,onDragStart:Yi?dn:void 0,onDragEnter:Xe?Kn:void 0,onDragOver:Xe?mn:void 0,onDragLeave:Xe?be:void 0,onDrop:Xe?kn:void 0,onDragEnd:Xe?ei:void 0,onMouseMove:Qn},kt,zi),Ht.createElement(Xt,{prefixCls:$e.prefixCls,level:Ir,isStart:fn,isEnd:xn}),si,Ei(),qi,lr)};dt.isTreeNode=1;var gt=dt},30699:function(Sn,Ve,It){"use strict";It.d(Ve,{k:function(){return Wt},y:function(){return le}});var St=It(59301),Wt=St.createContext(null),le=St.createContext({})},71598:function(Sn,Ve,It){"use strict";It.d(Ve,{OF:function(){return Yt.Z},y6:function(){return At.y},ZP:function(){return mt}});var St=It(67711),Wt=It(26420),le=It(98506),ve=It(15142),de=It(42573),Ht=It(58698),ie=It(62437),oe=It(74700),he=It(45080),Gt=It(52873),Ie=It(92310),Xt=It.n(Ie),Me=It(10228),Qt=It(26112),nt=It(48736),et=It(59301),At=It(30699),at=function(Et){var Ct=Et.dropPosition,_t=Et.dropLevelOffset,Ce=Et.indent,Ze={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ct){case-1:Ze.top=0,Ze.left=-_t*Ce;break;case 1:Ze.bottom=0,Ze.left=-_t*Ce;break;case 0:Ze.bottom=0,Ze.left=Ce;break}return et.createElement("div",{style:Ze})},dt=at;function gt(vt){if(vt==null)throw new TypeError("Cannot destructure "+vt)}var xt=It(16886),bt=It(33346),Ut=It(34280),Rt=It(6790),Zt=It(77900),Yt=It(639);function te(vt,Et){var Ct=et.useState(!1),_t=(0,xt.Z)(Ct,2),Ce=_t[0],Ze=_t[1];(0,Ut.Z)(function(){if(Ce)return vt(),function(){Et()}},[Ce]),(0,Ut.Z)(function(){return Ze(!0),function(){Ze(!1)}},[])}var ye=te,fe=It(34061),Ke=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],_e=et.forwardRef(function(vt,Et){var Ct=vt.className,_t=vt.style,Ce=vt.motion,Ze=vt.motionNodes,Bn=vt.motionType,ze=vt.onMotionStart,Ue=vt.onMotionEnd,Xe=vt.active,dn=vt.treeNodeRequiredProps,Kn=(0,bt.Z)(vt,Ke),mn=et.useState(!0),be=(0,xt.Z)(mn,2),ei=be[0],kn=be[1],On=et.useContext(At.k),Vn=On.prefixCls,Ki=Ze&&Bn!=="hide";(0,Ut.Z)(function(){Ze&&Ki!==ei&&kn(Ki)},[Ze]);var si=function(){Ze&&ze()},yi=et.useRef(!1),Ei=function(){Ze&&!yi.current&&(yi.current=!0,Ue())};ye(si,Ei);var qi=function(ar){Ki===ar&&Ei()};return Ze?et.createElement(Zt.default,(0,St.Z)({ref:Et,visible:ei},Ce,{motionAppear:Bn==="show",onVisibleChanged:qi}),function(ii,ar){var Xi=ii.className,lr=ii.style;return et.createElement("div",{ref:ar,className:Xt()("".concat(Vn,"-treenode-motion"),Xi),style:lr},Ze.map(function(zi){var Kr=Object.assign({},(gt(zi.data),zi.data)),Ir=zi.title,Or=zi.key,Yi=zi.isStart,kr=zi.isEnd;delete Kr.children;var kt=(0,fe.H8)(Or,dn);return et.createElement(Yt.Z,(0,St.Z)({},Kr,kt,{title:Ir,active:Xe,data:zi.data,key:Or,isStart:Yi,isEnd:kr}))}))}):et.createElement(Yt.Z,(0,St.Z)({domRef:Et,className:Ct,style:_t},Kn,{active:Xe}))}),nn=_e;function fn(){var vt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Et=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ct=vt.length,_t=Et.length;if(Math.abs(Ct-_t)!==1)return{add:!1,key:null};function Ce(Ze,Bn){var ze=new Map;Ze.forEach(function(Xe){ze.set(Xe,!0)});var Ue=Bn.filter(function(Xe){return!ze.has(Xe)});return Ue.length===1?Ue[0]:null}return Ct<_t?{add:!0,key:Ce(vt,Et)}:{add:!1,key:Ce(Et,vt)}}function xn(vt,Et,Ct){var _t=vt.findIndex(function(ze){return ze.key===Ct}),Ce=vt[_t+1],Ze=Et.findIndex(function(ze){return ze.key===Ct});if(Ce){var Bn=Et.findIndex(function(ze){return ze.key===Ce.key});return Et.slice(Ze+1,Bn)}return Et.slice(Ze+1)}var _n=["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"],Xn={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},pe=function(){},ne="RC_TREE_MOTION_".concat(Math.random()),pn={key:ne},Ai={key:ne,level:0,index:0,pos:"0",node:pn,nodes:[pn]},ai={parent:null,children:[],pos:Ai.pos,data:pn,title:null,key:ne,isStart:[],isEnd:[]};function sn(vt,Et,Ct,_t){return Et===!1||!Ct?vt:vt.slice(0,Math.ceil(Ct/_t)+1)}function Qn(vt){var Et=vt.key,Ct=vt.pos;return(0,fe.km)(Et,Ct)}function jn(vt){for(var Et=String(vt.data.key),Ct=vt;Ct.parent;)Ct=Ct.parent,Et="".concat(Ct.data.key," > ").concat(Et);return Et}var Ti=et.forwardRef(function(vt,Et){var Ct=vt.prefixCls,_t=vt.data,Ce=vt.selectable,Ze=vt.checkable,Bn=vt.expandedKeys,ze=vt.selectedKeys,Ue=vt.checkedKeys,Xe=vt.loadedKeys,dn=vt.loadingKeys,Kn=vt.halfCheckedKeys,mn=vt.keyEntities,be=vt.disabled,ei=vt.dragging,kn=vt.dragOverNodeKey,On=vt.dropPosition,Vn=vt.motion,Ki=vt.height,si=vt.itemHeight,yi=vt.virtual,Ei=vt.scrollWidth,qi=vt.focusable,ii=vt.activeItem,ar=vt.focused,Xi=vt.tabIndex,lr=vt.onKeyDown,zi=vt.onFocus,Kr=vt.onBlur,Ir=vt.onActiveChange,Or=vt.onListChangeStart,Yi=vt.onListChangeEnd,kr=(0,bt.Z)(vt,_n),kt=et.useRef(null),tr=et.useRef(null);et.useImperativeHandle(Et,function(){return{scrollTo:function(ki){kt.current.scrollTo(ki)},getIndentWidth:function(){return tr.current.offsetWidth}}});var Fi=et.useState(Bn),ri=(0,xt.Z)(Fi,2),Li=ri[0],Ui=ri[1],Ri=et.useState(_t),Lr=(0,xt.Z)(Ri,2),an=Lr[0],rn=Lr[1],Ge=et.useState(_t),yn=(0,xt.Z)(Ge,2),ji=yn[0],Mi=yn[1],or=et.useState([]),ln=(0,xt.Z)(or,2),Ln=ln[0],Pe=ln[1],sr=et.useState(null),$n=(0,xt.Z)(sr,2),se=$n[0],De=$n[1],qn=et.useRef(_t);qn.current=_t;function Zn(){var bi=qn.current;rn(bi),Mi(bi),Pe([]),De(null),Yi()}(0,Ut.Z)(function(){Ui(Bn);var bi=fn(Li,Bn);if(bi.key!==null)if(bi.add){var ki=an.findIndex(function(un){var We=un.key;return We===bi.key}),Ni=sn(xn(an,_t,bi.key),yi,Ki,si),li=an.slice();li.splice(ki+1,0,ai),Mi(li),Pe(Ni),De("show")}else{var ci=_t.findIndex(function(un){var We=un.key;return We===bi.key}),fi=sn(xn(_t,an,bi.key),yi,Ki,si),Fn=_t.slice();Fn.splice(ci+1,0,ai),Mi(Fn),Pe(fi),De("hide")}else an!==_t&&(rn(_t),Mi(_t))},[Bn,_t]),et.useEffect(function(){ei||Zn()},[ei]);var Ye=Vn?ji:_t,Dn={expandedKeys:Bn,selectedKeys:ze,loadedKeys:Xe,loadingKeys:dn,checkedKeys:Ue,halfCheckedKeys:Kn,dragOverNodeKey:kn,dropPosition:On,keyEntities:mn};return et.createElement(et.Fragment,null,ar&&ii&&et.createElement("span",{style:Xn,"aria-live":"assertive"},jn(ii)),et.createElement("div",null,et.createElement("input",{style:Xn,disabled:qi===!1||be,tabIndex:qi!==!1?Xi:null,onKeyDown:lr,onFocus:zi,onBlur:Kr,value:"",onChange:pe,"aria-label":"for screen reader"})),et.createElement("div",{className:"".concat(Ct,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},et.createElement("div",{className:"".concat(Ct,"-indent")},et.createElement("div",{ref:tr,className:"".concat(Ct,"-indent-unit")}))),et.createElement(Rt.Z,(0,St.Z)({},kr,{data:Ye,itemKey:Qn,height:Ki,fullHeight:!1,virtual:yi,itemHeight:si,scrollWidth:Ei,prefixCls:"".concat(Ct,"-list"),ref:kt,role:"tree",onVisibleChange:function(ki){ki.every(function(Ni){return Qn(Ni)!==ne})&&Zn()}}),function(bi){var ki=bi.pos,Ni=Object.assign({},(gt(bi.data),bi.data)),li=bi.title,ci=bi.key,fi=bi.isStart,Fn=bi.isEnd,un=(0,fe.km)(ci,ki);delete Ni.key,delete Ni.children;var We=(0,fe.H8)(un,Dn);return et.createElement(nn,(0,St.Z)({},Ni,We,{title:li,active:!!ii&&ci===ii.key,pos:ki,data:bi.data,isStart:fi,isEnd:Fn,motion:Vn,motionNodes:ci===ne?Ln:null,motionType:se,onMotionStart:Or,onMotionEnd:Zn,treeNodeRequiredProps:Dn,onMouseMove:function(){Ir(null)}}))}))}),$e=Ti,Le=It(82661),tn=It(34643),hi=It(65065),ni=10,zt=function(vt){(0,oe.Z)(Ct,vt);var Et=(0,he.Z)(Ct);function Ct(){var _t;(0,de.Z)(this,Ct);for(var Ce=arguments.length,Ze=new Array(Ce),Bn=0;Bn<Ce;Bn++)Ze[Bn]=arguments[Bn];return _t=Et.call.apply(Et,[this].concat(Ze)),(0,Gt.Z)((0,ie.Z)(_t),"destroyed",!1),(0,Gt.Z)((0,ie.Z)(_t),"delayedDragEnterLogic",void 0),(0,Gt.Z)((0,ie.Z)(_t),"loadingRetryTimes",{}),(0,Gt.Z)((0,ie.Z)(_t),"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,fe.w$)()}),(0,Gt.Z)((0,ie.Z)(_t),"dragStartMousePosition",null),(0,Gt.Z)((0,ie.Z)(_t),"dragNodeProps",null),(0,Gt.Z)((0,ie.Z)(_t),"currentMouseOverDroppableNodeKey",null),(0,Gt.Z)((0,ie.Z)(_t),"listRef",et.createRef()),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDragStart",function(ze,Ue){var Xe=_t.state,dn=Xe.expandedKeys,Kn=Xe.keyEntities,mn=_t.props.onDragStart,be=Ue.eventKey;_t.dragNodeProps=Ue,_t.dragStartMousePosition={x:ze.clientX,y:ze.clientY};var ei=(0,Le._5)(dn,be);_t.setState({draggingNodeKey:be,dragChildrenKeys:(0,Le.wA)(be,Kn),indent:_t.listRef.current.getIndentWidth()}),_t.setExpandedKeys(ei),window.addEventListener("dragend",_t.onWindowDragEnd),mn==null||mn({event:ze,node:(0,fe.F)(Ue)})}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDragEnter",function(ze,Ue){var Xe=_t.state,dn=Xe.expandedKeys,Kn=Xe.keyEntities,mn=Xe.dragChildrenKeys,be=Xe.flattenNodes,ei=Xe.indent,kn=_t.props,On=kn.onDragEnter,Vn=kn.onExpand,Ki=kn.allowDrop,si=kn.direction,yi=Ue.pos,Ei=Ue.eventKey;if(_t.currentMouseOverDroppableNodeKey!==Ei&&(_t.currentMouseOverDroppableNodeKey=Ei),!_t.dragNodeProps){_t.resetDragState();return}var qi=(0,Le.OM)(ze,_t.dragNodeProps,Ue,ei,_t.dragStartMousePosition,Ki,be,Kn,dn,si),ii=qi.dropPosition,ar=qi.dropLevelOffset,Xi=qi.dropTargetKey,lr=qi.dropContainerKey,zi=qi.dropTargetPos,Kr=qi.dropAllowed,Ir=qi.dragOverNodeKey;if(mn.includes(Xi)||!Kr){_t.resetDragState();return}if(_t.delayedDragEnterLogic||(_t.delayedDragEnterLogic={}),Object.keys(_t.delayedDragEnterLogic).forEach(function(Or){clearTimeout(_t.delayedDragEnterLogic[Or])}),_t.dragNodeProps.eventKey!==Ue.eventKey&&(ze.persist(),_t.delayedDragEnterLogic[yi]=window.setTimeout(function(){if(_t.state.draggingNodeKey!==null){var Or=(0,ve.Z)(dn),Yi=(0,hi.Z)(Kn,Ue.eventKey);Yi&&(Yi.children||[]).length&&(Or=(0,Le.L0)(dn,Ue.eventKey)),_t.props.hasOwnProperty("expandedKeys")||_t.setExpandedKeys(Or),Vn==null||Vn(Or,{node:(0,fe.F)(Ue),expanded:!0,nativeEvent:ze.nativeEvent})}},800)),_t.dragNodeProps.eventKey===Xi&&ar===0){_t.resetDragState();return}_t.setState({dragOverNodeKey:Ir,dropPosition:ii,dropLevelOffset:ar,dropTargetKey:Xi,dropContainerKey:lr,dropTargetPos:zi,dropAllowed:Kr}),On==null||On({event:ze,node:(0,fe.F)(Ue),expandedKeys:dn})}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDragOver",function(ze,Ue){var Xe=_t.state,dn=Xe.dragChildrenKeys,Kn=Xe.flattenNodes,mn=Xe.keyEntities,be=Xe.expandedKeys,ei=Xe.indent,kn=_t.props,On=kn.onDragOver,Vn=kn.allowDrop,Ki=kn.direction;if(_t.dragNodeProps){var si=(0,Le.OM)(ze,_t.dragNodeProps,Ue,ei,_t.dragStartMousePosition,Vn,Kn,mn,be,Ki),yi=si.dropPosition,Ei=si.dropLevelOffset,qi=si.dropTargetKey,ii=si.dropContainerKey,ar=si.dropTargetPos,Xi=si.dropAllowed,lr=si.dragOverNodeKey;dn.includes(qi)||!Xi||(_t.dragNodeProps.eventKey===qi&&Ei===0?_t.state.dropPosition===null&&_t.state.dropLevelOffset===null&&_t.state.dropTargetKey===null&&_t.state.dropContainerKey===null&&_t.state.dropTargetPos===null&&_t.state.dropAllowed===!1&&_t.state.dragOverNodeKey===null||_t.resetDragState():yi===_t.state.dropPosition&&Ei===_t.state.dropLevelOffset&&qi===_t.state.dropTargetKey&&ii===_t.state.dropContainerKey&&ar===_t.state.dropTargetPos&&Xi===_t.state.dropAllowed&&lr===_t.state.dragOverNodeKey||_t.setState({dropPosition:yi,dropLevelOffset:Ei,dropTargetKey:qi,dropContainerKey:ii,dropTargetPos:ar,dropAllowed:Xi,dragOverNodeKey:lr}),On==null||On({event:ze,node:(0,fe.F)(Ue)}))}}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDragLeave",function(ze,Ue){_t.currentMouseOverDroppableNodeKey===Ue.eventKey&&!ze.currentTarget.contains(ze.relatedTarget)&&(_t.resetDragState(),_t.currentMouseOverDroppableNodeKey=null);var Xe=_t.props.onDragLeave;Xe==null||Xe({event:ze,node:(0,fe.F)(Ue)})}),(0,Gt.Z)((0,ie.Z)(_t),"onWindowDragEnd",function(ze){_t.onNodeDragEnd(ze,null,!0),window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDragEnd",function(ze,Ue){var Xe=_t.props.onDragEnd;_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),Xe==null||Xe({event:ze,node:(0,fe.F)(Ue)}),_t.dragNodeProps=null,window.removeEventListener("dragend",_t.onWindowDragEnd)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDrop",function(ze,Ue){var Xe,dn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Kn=_t.state,mn=Kn.dragChildrenKeys,be=Kn.dropPosition,ei=Kn.dropTargetKey,kn=Kn.dropTargetPos,On=Kn.dropAllowed;if(On){var Vn=_t.props.onDrop;if(_t.setState({dragOverNodeKey:null}),_t.cleanDragState(),ei!==null){var Ki=(0,le.Z)((0,le.Z)({},(0,fe.H8)(ei,_t.getTreeNodeRequiredProps())),{},{active:((Xe=_t.getActiveItem())===null||Xe===void 0?void 0:Xe.key)===ei,data:(0,hi.Z)(_t.state.keyEntities,ei).node}),si=mn.includes(ei);(0,nt.ZP)(!si,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var yi=(0,Le.yx)(kn),Ei={event:ze,node:(0,fe.F)(Ki),dragNode:_t.dragNodeProps?(0,fe.F)(_t.dragNodeProps):null,dragNodesKeys:[_t.dragNodeProps.eventKey].concat(mn),dropToGap:be!==0,dropPosition:be+Number(yi[yi.length-1])};dn||Vn==null||Vn(Ei),_t.dragNodeProps=null}}}),(0,Gt.Z)((0,ie.Z)(_t),"cleanDragState",function(){var ze=_t.state.draggingNodeKey;ze!==null&&_t.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),_t.dragStartMousePosition=null,_t.currentMouseOverDroppableNodeKey=null}),(0,Gt.Z)((0,ie.Z)(_t),"triggerExpandActionExpand",function(ze,Ue){var Xe=_t.state,dn=Xe.expandedKeys,Kn=Xe.flattenNodes,mn=Ue.expanded,be=Ue.key,ei=Ue.isLeaf;if(!(ei||ze.shiftKey||ze.metaKey||ze.ctrlKey)){var kn=Kn.filter(function(Vn){return Vn.key===be})[0],On=(0,fe.F)((0,le.Z)((0,le.Z)({},(0,fe.H8)(be,_t.getTreeNodeRequiredProps())),{},{data:kn.data}));_t.setExpandedKeys(mn?(0,Le._5)(dn,be):(0,Le.L0)(dn,be)),_t.onNodeExpand(ze,On)}}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeClick",function(ze,Ue){var Xe=_t.props,dn=Xe.onClick,Kn=Xe.expandAction;Kn==="click"&&_t.triggerExpandActionExpand(ze,Ue),dn==null||dn(ze,Ue)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeDoubleClick",function(ze,Ue){var Xe=_t.props,dn=Xe.onDoubleClick,Kn=Xe.expandAction;Kn==="doubleClick"&&_t.triggerExpandActionExpand(ze,Ue),dn==null||dn(ze,Ue)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeSelect",function(ze,Ue){var Xe=_t.state.selectedKeys,dn=_t.state,Kn=dn.keyEntities,mn=dn.fieldNames,be=_t.props,ei=be.onSelect,kn=be.multiple,On=Ue.selected,Vn=Ue[mn.key],Ki=!On;Ki?kn?Xe=(0,Le.L0)(Xe,Vn):Xe=[Vn]:Xe=(0,Le._5)(Xe,Vn);var si=Xe.map(function(yi){var Ei=(0,hi.Z)(Kn,yi);return Ei?Ei.node:null}).filter(Boolean);_t.setUncontrolledState({selectedKeys:Xe}),ei==null||ei(Xe,{event:"select",selected:Ki,node:Ue,selectedNodes:si,nativeEvent:ze.nativeEvent})}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeCheck",function(ze,Ue,Xe){var dn=_t.state,Kn=dn.keyEntities,mn=dn.checkedKeys,be=dn.halfCheckedKeys,ei=_t.props,kn=ei.checkStrictly,On=ei.onCheck,Vn=Ue.key,Ki,si={event:"check",node:Ue,checked:Xe,nativeEvent:ze.nativeEvent};if(kn){var yi=Xe?(0,Le.L0)(mn,Vn):(0,Le._5)(mn,Vn),Ei=(0,Le._5)(be,Vn);Ki={checked:yi,halfChecked:Ei},si.checkedNodes=yi.map(function(zi){return(0,hi.Z)(Kn,zi)}).filter(Boolean).map(function(zi){return zi.node}),_t.setUncontrolledState({checkedKeys:yi})}else{var qi=(0,tn.S)([].concat((0,ve.Z)(mn),[Vn]),!0,Kn),ii=qi.checkedKeys,ar=qi.halfCheckedKeys;if(!Xe){var Xi=new Set(ii);Xi.delete(Vn);var lr=(0,tn.S)(Array.from(Xi),{checked:!1,halfCheckedKeys:ar},Kn);ii=lr.checkedKeys,ar=lr.halfCheckedKeys}Ki=ii,si.checkedNodes=[],si.checkedNodesPositions=[],si.halfCheckedKeys=ar,ii.forEach(function(zi){var Kr=(0,hi.Z)(Kn,zi);if(Kr){var Ir=Kr.node,Or=Kr.pos;si.checkedNodes.push(Ir),si.checkedNodesPositions.push({node:Ir,pos:Or})}}),_t.setUncontrolledState({checkedKeys:ii},!1,{halfCheckedKeys:ar})}On==null||On(Ki,si)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeLoad",function(ze){var Ue,Xe=ze.key,dn=_t.state.keyEntities,Kn=(0,hi.Z)(dn,Xe);if(!(Kn!=null&&(Ue=Kn.children)!==null&&Ue!==void 0&&Ue.length)){var mn=new Promise(function(be,ei){_t.setState(function(kn){var On=kn.loadedKeys,Vn=On===void 0?[]:On,Ki=kn.loadingKeys,si=Ki===void 0?[]:Ki,yi=_t.props,Ei=yi.loadData,qi=yi.onLoad;if(!Ei||Vn.includes(Xe)||si.includes(Xe))return null;var ii=Ei(ze);return ii.then(function(){var ar=_t.state.loadedKeys,Xi=(0,Le.L0)(ar,Xe);qi==null||qi(Xi,{event:"load",node:ze}),_t.setUncontrolledState({loadedKeys:Xi}),_t.setState(function(lr){return{loadingKeys:(0,Le._5)(lr.loadingKeys,Xe)}}),be()}).catch(function(ar){if(_t.setState(function(lr){return{loadingKeys:(0,Le._5)(lr.loadingKeys,Xe)}}),_t.loadingRetryTimes[Xe]=(_t.loadingRetryTimes[Xe]||0)+1,_t.loadingRetryTimes[Xe]>=ni){var Xi=_t.state.loadedKeys;(0,nt.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),_t.setUncontrolledState({loadedKeys:(0,Le.L0)(Xi,Xe)}),be()}ei(ar)}),{loadingKeys:(0,Le.L0)(si,Xe)}})});return mn.catch(function(){}),mn}}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeMouseEnter",function(ze,Ue){var Xe=_t.props.onMouseEnter;Xe==null||Xe({event:ze,node:Ue})}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeMouseLeave",function(ze,Ue){var Xe=_t.props.onMouseLeave;Xe==null||Xe({event:ze,node:Ue})}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeContextMenu",function(ze,Ue){var Xe=_t.props.onRightClick;Xe&&(ze.preventDefault(),Xe({event:ze,node:Ue}))}),(0,Gt.Z)((0,ie.Z)(_t),"onFocus",function(){var ze=_t.props.onFocus;_t.setState({focused:!0});for(var Ue=arguments.length,Xe=new Array(Ue),dn=0;dn<Ue;dn++)Xe[dn]=arguments[dn];ze==null||ze.apply(void 0,Xe)}),(0,Gt.Z)((0,ie.Z)(_t),"onBlur",function(){var ze=_t.props.onBlur;_t.setState({focused:!1}),_t.onActiveChange(null);for(var Ue=arguments.length,Xe=new Array(Ue),dn=0;dn<Ue;dn++)Xe[dn]=arguments[dn];ze==null||ze.apply(void 0,Xe)}),(0,Gt.Z)((0,ie.Z)(_t),"getTreeNodeRequiredProps",function(){var ze=_t.state,Ue=ze.expandedKeys,Xe=ze.selectedKeys,dn=ze.loadedKeys,Kn=ze.loadingKeys,mn=ze.checkedKeys,be=ze.halfCheckedKeys,ei=ze.dragOverNodeKey,kn=ze.dropPosition,On=ze.keyEntities;return{expandedKeys:Ue||[],selectedKeys:Xe||[],loadedKeys:dn||[],loadingKeys:Kn||[],checkedKeys:mn||[],halfCheckedKeys:be||[],dragOverNodeKey:ei,dropPosition:kn,keyEntities:On}}),(0,Gt.Z)((0,ie.Z)(_t),"setExpandedKeys",function(ze){var Ue=_t.state,Xe=Ue.treeData,dn=Ue.fieldNames,Kn=(0,fe.oH)(Xe,ze,dn);_t.setUncontrolledState({expandedKeys:ze,flattenNodes:Kn},!0)}),(0,Gt.Z)((0,ie.Z)(_t),"onNodeExpand",function(ze,Ue){var Xe=_t.state.expandedKeys,dn=_t.state,Kn=dn.listChanging,mn=dn.fieldNames,be=_t.props,ei=be.onExpand,kn=be.loadData,On=Ue.expanded,Vn=Ue[mn.key];if(!Kn){var Ki=Xe.includes(Vn),si=!On;if((0,nt.ZP)(On&&Ki||!On&&!Ki,"Expand state not sync with index check"),Xe=si?(0,Le.L0)(Xe,Vn):(0,Le._5)(Xe,Vn),_t.setExpandedKeys(Xe),ei==null||ei(Xe,{node:Ue,expanded:si,nativeEvent:ze.nativeEvent}),si&&kn){var yi=_t.onNodeLoad(Ue);yi&&yi.then(function(){var Ei=(0,fe.oH)(_t.state.treeData,Xe,mn);_t.setUncontrolledState({flattenNodes:Ei})}).catch(function(){var Ei=_t.state.expandedKeys,qi=(0,Le._5)(Ei,Vn);_t.setExpandedKeys(qi)})}}}),(0,Gt.Z)((0,ie.Z)(_t),"onListChangeStart",function(){_t.setUncontrolledState({listChanging:!0})}),(0,Gt.Z)((0,ie.Z)(_t),"onListChangeEnd",function(){setTimeout(function(){_t.setUncontrolledState({listChanging:!1})})}),(0,Gt.Z)((0,ie.Z)(_t),"onActiveChange",function(ze){var Ue=_t.state.activeKey,Xe=_t.props,dn=Xe.onActiveChange,Kn=Xe.itemScrollOffset,mn=Kn===void 0?0:Kn;Ue!==ze&&(_t.setState({activeKey:ze}),ze!==null&&_t.scrollTo({key:ze,offset:mn}),dn==null||dn(ze))}),(0,Gt.Z)((0,ie.Z)(_t),"getActiveItem",function(){var ze=_t.state,Ue=ze.activeKey,Xe=ze.flattenNodes;return Ue===null?null:Xe.find(function(dn){var Kn=dn.key;return Kn===Ue})||null}),(0,Gt.Z)((0,ie.Z)(_t),"offsetActiveKey",function(ze){var Ue=_t.state,Xe=Ue.flattenNodes,dn=Ue.activeKey,Kn=Xe.findIndex(function(ei){var kn=ei.key;return kn===dn});Kn===-1&&ze<0&&(Kn=Xe.length),Kn=(Kn+ze+Xe.length)%Xe.length;var mn=Xe[Kn];if(mn){var be=mn.key;_t.onActiveChange(be)}else _t.onActiveChange(null)}),(0,Gt.Z)((0,ie.Z)(_t),"onKeyDown",function(ze){var Ue=_t.state,Xe=Ue.activeKey,dn=Ue.expandedKeys,Kn=Ue.checkedKeys,mn=Ue.fieldNames,be=_t.props,ei=be.onKeyDown,kn=be.checkable,On=be.selectable;switch(ze.which){case Me.Z.UP:{_t.offsetActiveKey(-1),ze.preventDefault();break}case Me.Z.DOWN:{_t.offsetActiveKey(1),ze.preventDefault();break}}var Vn=_t.getActiveItem();if(Vn&&Vn.data){var Ki=_t.getTreeNodeRequiredProps(),si=Vn.data.isLeaf===!1||!!(Vn.data[mn.children]||[]).length,yi=(0,fe.F)((0,le.Z)((0,le.Z)({},(0,fe.H8)(Xe,Ki)),{},{data:Vn.data,active:!0}));switch(ze.which){case Me.Z.LEFT:{si&&dn.includes(Xe)?_t.onNodeExpand({},yi):Vn.parent&&_t.onActiveChange(Vn.parent.key),ze.preventDefault();break}case Me.Z.RIGHT:{si&&!dn.includes(Xe)?_t.onNodeExpand({},yi):Vn.children&&Vn.children.length&&_t.onActiveChange(Vn.children[0].key),ze.preventDefault();break}case Me.Z.ENTER:case Me.Z.SPACE:{kn&&!yi.disabled&&yi.checkable!==!1&&!yi.disableCheckbox?_t.onNodeCheck({},yi,!Kn.includes(Xe)):!kn&&On&&!yi.disabled&&yi.selectable!==!1&&_t.onNodeSelect({},yi);break}}}ei==null||ei(ze)}),(0,Gt.Z)((0,ie.Z)(_t),"setUncontrolledState",function(ze){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Xe=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!_t.destroyed){var dn=!1,Kn=!0,mn={};Object.keys(ze).forEach(function(be){if(_t.props.hasOwnProperty(be)){Kn=!1;return}dn=!0,mn[be]=ze[be]}),dn&&(!Ue||Kn)&&_t.setState((0,le.Z)((0,le.Z)({},mn),Xe))}}),(0,Gt.Z)((0,ie.Z)(_t),"scrollTo",function(ze){_t.listRef.current.scrollTo(ze)}),_t}return(0,Ht.Z)(Ct,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var Ce=this.props,Ze=Ce.activeKey,Bn=Ce.itemScrollOffset,ze=Bn===void 0?0:Bn;Ze!==void 0&&Ze!==this.state.activeKey&&(this.setState({activeKey:Ze}),Ze!==null&&this.scrollTo({key:Ze,offset:ze}))}},{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 Ce=this.state,Ze=Ce.focused,Bn=Ce.flattenNodes,ze=Ce.keyEntities,Ue=Ce.draggingNodeKey,Xe=Ce.activeKey,dn=Ce.dropLevelOffset,Kn=Ce.dropContainerKey,mn=Ce.dropTargetKey,be=Ce.dropPosition,ei=Ce.dragOverNodeKey,kn=Ce.indent,On=this.props,Vn=On.prefixCls,Ki=On.className,si=On.style,yi=On.showLine,Ei=On.focusable,qi=On.tabIndex,ii=qi===void 0?0:qi,ar=On.selectable,Xi=On.showIcon,lr=On.icon,zi=On.switcherIcon,Kr=On.draggable,Ir=On.checkable,Or=On.checkStrictly,Yi=On.disabled,kr=On.motion,kt=On.loadData,tr=On.filterTreeNode,Fi=On.height,ri=On.itemHeight,Li=On.scrollWidth,Ui=On.virtual,Ri=On.titleRender,Lr=On.dropIndicatorRender,an=On.onContextMenu,rn=On.onScroll,Ge=On.direction,yn=On.rootClassName,ji=On.rootStyle,Mi=(0,Qt.Z)(this.props,{aria:!0,data:!0}),or;Kr&&((0,Wt.Z)(Kr)==="object"?or=Kr:typeof Kr=="function"?or={nodeDraggable:Kr}:or={});var ln={prefixCls:Vn,selectable:ar,showIcon:Xi,icon:lr,switcherIcon:zi,draggable:or,draggingNodeKey:Ue,checkable:Ir,checkStrictly:Or,disabled:Yi,keyEntities:ze,dropLevelOffset:dn,dropContainerKey:Kn,dropTargetKey:mn,dropPosition:be,dragOverNodeKey:ei,indent:kn,direction:Ge,dropIndicatorRender:Lr,loadData:kt,filterTreeNode:tr,titleRender:Ri,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 et.createElement(At.k.Provider,{value:ln},et.createElement("div",{className:Xt()(Vn,Ki,yn,(0,Gt.Z)((0,Gt.Z)((0,Gt.Z)({},"".concat(Vn,"-show-line"),yi),"".concat(Vn,"-focused"),Ze),"".concat(Vn,"-active-focused"),Xe!==null)),style:ji},et.createElement($e,(0,St.Z)({ref:this.listRef,prefixCls:Vn,style:si,data:Bn,disabled:Yi,selectable:ar,checkable:!!Ir,motion:kr,dragging:Ue!==null,height:Fi,itemHeight:ri,virtual:Ui,focusable:Ei,focused:Ze,tabIndex:ii,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:an,onScroll:rn,scrollWidth:Li},this.getTreeNodeRequiredProps(),Mi))))}}],[{key:"getDerivedStateFromProps",value:function(Ce,Ze){var Bn=Ze.prevProps,ze={prevProps:Ce};function Ue(ii){return!Bn&&Ce.hasOwnProperty(ii)||Bn&&Bn[ii]!==Ce[ii]}var Xe,dn=Ze.fieldNames;if(Ue("fieldNames")&&(dn=(0,fe.w$)(Ce.fieldNames),ze.fieldNames=dn),Ue("treeData")?Xe=Ce.treeData:Ue("children")&&((0,nt.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),Xe=(0,fe.zn)(Ce.children)),Xe){ze.treeData=Xe;var Kn=(0,fe.I8)(Xe,{fieldNames:dn});ze.keyEntities=(0,le.Z)((0,Gt.Z)({},ne,Ai),Kn.keyEntities)}var mn=ze.keyEntities||Ze.keyEntities;if(Ue("expandedKeys")||Bn&&Ue("autoExpandParent"))ze.expandedKeys=Ce.autoExpandParent||!Bn&&Ce.defaultExpandParent?(0,Le.r7)(Ce.expandedKeys,mn):Ce.expandedKeys;else if(!Bn&&Ce.defaultExpandAll){var be=(0,le.Z)({},mn);delete be[ne];var ei=[];Object.keys(be).forEach(function(ii){var ar=be[ii];ar.children&&ar.children.length&&ei.push(ar.key)}),ze.expandedKeys=ei}else!Bn&&Ce.defaultExpandedKeys&&(ze.expandedKeys=Ce.autoExpandParent||Ce.defaultExpandParent?(0,Le.r7)(Ce.defaultExpandedKeys,mn):Ce.defaultExpandedKeys);if(ze.expandedKeys||delete ze.expandedKeys,Xe||ze.expandedKeys){var kn=(0,fe.oH)(Xe||Ze.treeData,ze.expandedKeys||Ze.expandedKeys,dn);ze.flattenNodes=kn}if(Ce.selectable&&(Ue("selectedKeys")?ze.selectedKeys=(0,Le.BT)(Ce.selectedKeys,Ce):!Bn&&Ce.defaultSelectedKeys&&(ze.selectedKeys=(0,Le.BT)(Ce.defaultSelectedKeys,Ce))),Ce.checkable){var On;if(Ue("checkedKeys")?On=(0,Le.E6)(Ce.checkedKeys)||{}:!Bn&&Ce.defaultCheckedKeys?On=(0,Le.E6)(Ce.defaultCheckedKeys)||{}:Xe&&(On=(0,Le.E6)(Ce.checkedKeys)||{checkedKeys:Ze.checkedKeys,halfCheckedKeys:Ze.halfCheckedKeys}),On){var Vn=On,Ki=Vn.checkedKeys,si=Ki===void 0?[]:Ki,yi=Vn.halfCheckedKeys,Ei=yi===void 0?[]:yi;if(!Ce.checkStrictly){var qi=(0,tn.S)(si,!0,mn);si=qi.checkedKeys,Ei=qi.halfCheckedKeys}ze.checkedKeys=si,ze.halfCheckedKeys=Ei}}return Ue("loadedKeys")&&(ze.loadedKeys=Ce.loadedKeys),ze}}]),Ct}(et.Component);(0,Gt.Z)(zt,"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:dt,allowDrop:function(){return!0},expandAction:!1}),(0,Gt.Z)(zt,"TreeNode",Yt.Z);var Ft=zt,mt=Ft},82661:function(Sn,Ve,It){"use strict";It.d(Ve,{BT:function(){return et},E6:function(){return dt},L0:function(){return Gt},OM:function(){return nt},_5:function(){return he},r7:function(){return gt},wA:function(){return Xt},yx:function(){return Ie}});var St=It(15142),Wt=It(26420),le=It(48736),ve=It(59301),de=It(639),Ht=It(65065),ie=It(34061),oe=null;function he(xt,bt){if(!xt)return[];var Ut=xt.slice(),Rt=Ut.indexOf(bt);return Rt>=0&&Ut.splice(Rt,1),Ut}function Gt(xt,bt){var Ut=(xt||[]).slice();return Ut.indexOf(bt)===-1&&Ut.push(bt),Ut}function Ie(xt){return xt.split("-")}function Xt(xt,bt){var Ut=[],Rt=(0,Ht.Z)(bt,xt);function Zt(){var Yt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Yt.forEach(function(te){var ye=te.key,fe=te.children;Ut.push(ye),Zt(fe)})}return Zt(Rt.children),Ut}function Me(xt){if(xt.parent){var bt=Ie(xt.pos);return Number(bt[bt.length-1])===xt.parent.children.length-1}return!1}function Qt(xt){var bt=Ie(xt.pos);return Number(bt[bt.length-1])===0}function nt(xt,bt,Ut,Rt,Zt,Yt,te,ye,fe,Ke){var _e,nn=xt.clientX,fn=xt.clientY,xn=xt.target.getBoundingClientRect(),_n=xn.top,Xn=xn.height,pe=(Ke==="rtl"?-1:1)*(((Zt==null?void 0:Zt.x)||0)-nn),ne=(pe-12)/Rt,pn=fe.filter(function(mt){var vt;return(vt=ye[mt])===null||vt===void 0||(vt=vt.children)===null||vt===void 0?void 0:vt.length}),Ai=(0,Ht.Z)(ye,Ut.eventKey);if(fn<_n+Xn/2){var ai=te.findIndex(function(mt){return mt.key===Ai.key}),sn=ai<=0?0:ai-1,Qn=te[sn].key;Ai=(0,Ht.Z)(ye,Qn)}var jn=Ai.key,Ti=Ai,$e=Ai.key,Le=0,tn=0;if(!pn.includes(jn))for(var hi=0;hi<ne&&Me(Ai);hi+=1)Ai=Ai.parent,tn+=1;var ni=bt.data,zt=Ai.node,Ft=!0;return Qt(Ai)&&Ai.level===0&&fn<_n+Xn/2&&Yt({dragNode:ni,dropNode:zt,dropPosition:-1})&&Ai.key===Ut.eventKey?Le=-1:(Ti.children||[]).length&&pn.includes($e)?Yt({dragNode:ni,dropNode:zt,dropPosition:0})?Le=0:Ft=!1:tn===0?ne>-1.5?Yt({dragNode:ni,dropNode:zt,dropPosition:1})?Le=1:Ft=!1:Yt({dragNode:ni,dropNode:zt,dropPosition:0})?Le=0:Yt({dragNode:ni,dropNode:zt,dropPosition:1})?Le=1:Ft=!1:Yt({dragNode:ni,dropNode:zt,dropPosition:1})?Le=1:Ft=!1,{dropPosition:Le,dropLevelOffset:tn,dropTargetKey:Ai.key,dropTargetPos:Ai.pos,dragOverNodeKey:$e,dropContainerKey:Le===0?null:((_e=Ai.parent)===null||_e===void 0?void 0:_e.key)||null,dropAllowed:Ft}}function et(xt,bt){if(xt){var Ut=bt.multiple;return Ut?xt.slice():xt.length?[xt[0]]:xt}}var At=function(bt){return bt};function at(xt,bt){if(!xt)return[];var Ut=bt||{},Rt=Ut.processProps,Zt=Rt===void 0?At:Rt,Yt=Array.isArray(xt)?xt:[xt];return Yt.map(function(te){var ye=te.children,fe=_objectWithoutProperties(te,oe),Ke=at(ye,bt);return React.createElement(TreeNode,_extends({key:fe.key},Zt(fe)),Ke)})}function dt(xt){if(!xt)return null;var bt;if(Array.isArray(xt))bt={checkedKeys:xt,halfCheckedKeys:void 0};else if((0,Wt.Z)(xt)==="object")bt={checkedKeys:xt.checked||void 0,halfCheckedKeys:xt.halfChecked||void 0};else return(0,le.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return bt}function gt(xt,bt){var Ut=new Set;function Rt(Zt){if(!Ut.has(Zt)){var Yt=(0,Ht.Z)(bt,Zt);if(Yt){Ut.add(Zt);var te=Yt.parent,ye=Yt.node;ye.disabled||te&&Rt(te.key)}}}return(xt||[]).forEach(function(Zt){Rt(Zt)}),(0,St.Z)(Ut)}},34643:function(Sn,Ve,It){"use strict";It.d(Ve,{S:function(){return ie}});var St=It(48736),Wt=It(65065);function le(oe,he){var Gt=new Set;return oe.forEach(function(Ie){he.has(Ie)||Gt.add(Ie)}),Gt}function ve(oe){var he=oe||{},Gt=he.disabled,Ie=he.disableCheckbox,Xt=he.checkable;return!!(Gt||Ie)||Xt===!1}function de(oe,he,Gt,Ie){for(var Xt=new Set(oe),Me=new Set,Qt=0;Qt<=Gt;Qt+=1){var nt=he.get(Qt)||new Set;nt.forEach(function(dt){var gt=dt.key,xt=dt.node,bt=dt.children,Ut=bt===void 0?[]:bt;Xt.has(gt)&&!Ie(xt)&&Ut.filter(function(Rt){return!Ie(Rt.node)}).forEach(function(Rt){Xt.add(Rt.key)})})}for(var et=new Set,At=Gt;At>=0;At-=1){var at=he.get(At)||new Set;at.forEach(function(dt){var gt=dt.parent,xt=dt.node;if(!(Ie(xt)||!dt.parent||et.has(dt.parent.key))){if(Ie(dt.parent.node)){et.add(gt.key);return}var bt=!0,Ut=!1;(gt.children||[]).filter(function(Rt){return!Ie(Rt.node)}).forEach(function(Rt){var Zt=Rt.key,Yt=Xt.has(Zt);bt&&!Yt&&(bt=!1),!Ut&&(Yt||Me.has(Zt))&&(Ut=!0)}),bt&&Xt.add(gt.key),Ut&&Me.add(gt.key),et.add(gt.key)}})}return{checkedKeys:Array.from(Xt),halfCheckedKeys:Array.from(le(Me,Xt))}}function Ht(oe,he,Gt,Ie,Xt){for(var Me=new Set(oe),Qt=new Set(he),nt=0;nt<=Ie;nt+=1){var et=Gt.get(nt)||new Set;et.forEach(function(gt){var xt=gt.key,bt=gt.node,Ut=gt.children,Rt=Ut===void 0?[]:Ut;!Me.has(xt)&&!Qt.has(xt)&&!Xt(bt)&&Rt.filter(function(Zt){return!Xt(Zt.node)}).forEach(function(Zt){Me.delete(Zt.key)})})}Qt=new Set;for(var At=new Set,at=Ie;at>=0;at-=1){var dt=Gt.get(at)||new Set;dt.forEach(function(gt){var xt=gt.parent,bt=gt.node;if(!(Xt(bt)||!gt.parent||At.has(gt.parent.key))){if(Xt(gt.parent.node)){At.add(xt.key);return}var Ut=!0,Rt=!1;(xt.children||[]).filter(function(Zt){return!Xt(Zt.node)}).forEach(function(Zt){var Yt=Zt.key,te=Me.has(Yt);Ut&&!te&&(Ut=!1),!Rt&&(te||Qt.has(Yt))&&(Rt=!0)}),Ut||Me.delete(xt.key),Rt&&Qt.add(xt.key),At.add(xt.key)}})}return{checkedKeys:Array.from(Me),halfCheckedKeys:Array.from(le(Qt,Me))}}function ie(oe,he,Gt,Ie){var Xt=[],Me;Ie?Me=Ie:Me=ve;var Qt=new Set(oe.filter(function(at){var dt=!!(0,Wt.Z)(Gt,at);return dt||Xt.push(at),dt})),nt=new Map,et=0;Object.keys(Gt).forEach(function(at){var dt=Gt[at],gt=dt.level,xt=nt.get(gt);xt||(xt=new Set,nt.set(gt,xt)),xt.add(dt),et=Math.max(et,gt)}),(0,St.ZP)(!Xt.length,"Tree missing follow keys: ".concat(Xt.slice(0,100).map(function(at){return"'".concat(at,"'")}).join(", ")));var At;return he===!0?At=de(Qt,nt,et,Me):At=Ht(Qt,he.halfCheckedKeys,nt,et,Me),At}},65065:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return St}});function St(Wt,le){return Wt[le]}},34061:function(Sn,Ve,It){"use strict";It.d(Ve,{F:function(){return gt},H8:function(){return dt},I8:function(){return at},km:function(){return Xt},oH:function(){return et},w$:function(){return Me},zn:function(){return nt}});var St=It(26420),Wt=It(15142),le=It(98506),ve=It(33346),de=It(11592),Ht=It(2738),ie=It(48736),oe=It(65065),he=["children"];function Gt(xt,bt){return"".concat(xt,"-").concat(bt)}function Ie(xt){return xt&&xt.type&&xt.type.isTreeNode}function Xt(xt,bt){return xt!=null?xt:bt}function Me(xt){var bt=xt||{},Ut=bt.title,Rt=bt._title,Zt=bt.key,Yt=bt.children,te=Ut||"title";return{title:te,_title:Rt||[te],key:Zt||"key",children:Yt||"children"}}function Qt(xt,bt){var Ut=new Map;function Rt(Zt){var Yt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Zt||[]).forEach(function(te){var ye=te[bt.key],fe=te[bt.children];warning(ye!=null,"Tree node must have a certain key: [".concat(Yt).concat(ye,"]"));var Ke=String(ye);warning(!Ut.has(Ke)||ye===null||ye===void 0,"Same 'key' exist in the Tree: ".concat(Ke)),Ut.set(Ke,!0),Rt(fe,"".concat(Yt).concat(Ke," > "))})}Rt(xt)}function nt(xt){function bt(Ut){var Rt=(0,de.Z)(Ut);return Rt.map(function(Zt){if(!Ie(Zt))return(0,ie.ZP)(!Zt,"Tree/TreeNode can only accept TreeNode as children."),null;var Yt=Zt.key,te=Zt.props,ye=te.children,fe=(0,ve.Z)(te,he),Ke=(0,le.Z)({key:Yt},fe),_e=bt(ye);return _e.length&&(Ke.children=_e),Ke}).filter(function(Zt){return Zt})}return bt(xt)}function et(xt,bt,Ut){var Rt=Me(Ut),Zt=Rt._title,Yt=Rt.key,te=Rt.children,ye=new Set(bt===!0?[]:bt),fe=[];function Ke(_e){var nn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return _e.map(function(fn,xn){for(var _n=Gt(nn?nn.pos:"0",xn),Xn=Xt(fn[Yt],_n),pe,ne=0;ne<Zt.length;ne+=1){var pn=Zt[ne];if(fn[pn]!==void 0){pe=fn[pn];break}}var Ai=Object.assign((0,Ht.Z)(fn,[].concat((0,Wt.Z)(Zt),[Yt,te])),{title:pe,key:Xn,parent:nn,pos:_n,children:null,data:fn,isStart:[].concat((0,Wt.Z)(nn?nn.isStart:[]),[xn===0]),isEnd:[].concat((0,Wt.Z)(nn?nn.isEnd:[]),[xn===_e.length-1])});return fe.push(Ai),bt===!0||ye.has(Xn)?Ai.children=Ke(fn[te]||[],Ai):Ai.children=[],Ai})}return Ke(xt),fe}function At(xt,bt,Ut){var Rt={};(0,St.Z)(Ut)==="object"?Rt=Ut:Rt={externalGetKey:Ut},Rt=Rt||{};var Zt=Rt,Yt=Zt.childrenPropName,te=Zt.externalGetKey,ye=Zt.fieldNames,fe=Me(ye),Ke=fe.key,_e=fe.children,nn=Yt||_e,fn;te?typeof te=="string"?fn=function(Xn){return Xn[te]}:typeof te=="function"&&(fn=function(Xn){return te(Xn)}):fn=function(Xn,pe){return Xt(Xn[Ke],pe)};function xn(_n,Xn,pe,ne){var pn=_n?_n[nn]:xt,Ai=_n?Gt(pe.pos,Xn):"0",ai=_n?[].concat((0,Wt.Z)(ne),[_n]):[];if(_n){var sn=fn(_n,Ai),Qn={node:_n,index:Xn,pos:Ai,key:sn,parentPos:pe.node?pe.pos:null,level:pe.level+1,nodes:ai};bt(Qn)}pn&&pn.forEach(function(jn,Ti){xn(jn,Ti,{node:_n,pos:Ai,level:pe?pe.level+1:-1},ai)})}xn(null)}function at(xt){var bt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ut=bt.initWrapper,Rt=bt.processEntity,Zt=bt.onProcessFinished,Yt=bt.externalGetKey,te=bt.childrenPropName,ye=bt.fieldNames,fe=arguments.length>2?arguments[2]:void 0,Ke=Yt||fe,_e={},nn={},fn={posEntities:_e,keyEntities:nn};return Ut&&(fn=Ut(fn)||fn),At(xt,function(xn){var _n=xn.node,Xn=xn.index,pe=xn.pos,ne=xn.key,pn=xn.parentPos,Ai=xn.level,ai=xn.nodes,sn={node:_n,nodes:ai,index:Xn,key:ne,pos:pe,level:Ai},Qn=Xt(ne,pe);_e[pe]=sn,nn[Qn]=sn,sn.parent=_e[pn],sn.parent&&(sn.parent.children=sn.parent.children||[],sn.parent.children.push(sn)),Rt&&Rt(sn,fn)},{externalGetKey:Ke,childrenPropName:te,fieldNames:ye}),Zt&&Zt(fn),fn}function dt(xt,bt){var Ut=bt.expandedKeys,Rt=bt.selectedKeys,Zt=bt.loadedKeys,Yt=bt.loadingKeys,te=bt.checkedKeys,ye=bt.halfCheckedKeys,fe=bt.dragOverNodeKey,Ke=bt.dropPosition,_e=bt.keyEntities,nn=(0,oe.Z)(_e,xt),fn={eventKey:xt,expanded:Ut.indexOf(xt)!==-1,selected:Rt.indexOf(xt)!==-1,loaded:Zt.indexOf(xt)!==-1,loading:Yt.indexOf(xt)!==-1,checked:te.indexOf(xt)!==-1,halfChecked:ye.indexOf(xt)!==-1,pos:String(nn?nn.pos:""),dragOver:fe===xt&&Ke===0,dragOverGapTop:fe===xt&&Ke===-1,dragOverGapBottom:fe===xt&&Ke===1};return fn}function gt(xt){var bt=xt.data,Ut=xt.expanded,Rt=xt.selected,Zt=xt.checked,Yt=xt.loaded,te=xt.loading,ye=xt.halfChecked,fe=xt.dragOver,Ke=xt.dragOverGapTop,_e=xt.dragOverGapBottom,nn=xt.pos,fn=xt.active,xn=xt.eventKey,_n=(0,le.Z)((0,le.Z)({},bt),{},{expanded:Ut,selected:Rt,checked:Zt,loaded:Yt,loading:te,halfChecked:ye,dragOver:fe,dragOverGapTop:Ke,dragOverGapBottom:_e,pos:nn,active:fn,key:xn});return"props"in _n||Object.defineProperty(_n,"props",{get:function(){return(0,ie.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),xt}}),_n}},8224:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return Wt}});var St=It(4676);function Wt(le,ve,de,Ht){var ie=St.unstable_batchedUpdates?function(he){St.unstable_batchedUpdates(de,he)}:de;return le!=null&&le.addEventListener&&le.addEventListener(ve,ie,Ht),{remove:function(){le!=null&&le.removeEventListener&&le.removeEventListener(ve,ie,Ht)}}}},24514:function(Sn,Ve,It){"use strict";It.d(Ve,{G:function(){return ve}});var St=It(47273),Wt=function(Ht){if((0,St.Z)()&&window.document.documentElement){var ie=Array.isArray(Ht)?Ht:[Ht],oe=window.document.documentElement;return ie.some(function(he){return he in oe.style})}return!1},le=function(Ht,ie){if(!Wt(Ht))return!1;var oe=document.createElement("div"),he=oe.style[Ht];return oe.style[Ht]=ie,oe.style[Ht]!==he};function ve(de,Ht){return!Array.isArray(de)&&Ht!==void 0?le(de,Ht):Wt(de)}},6790:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return ni}});var St=It(67711),Wt=It(26420),le=It(98506),ve=It(52873),de=It(16886),Ht=It(33346),ie=It(92310),oe=It.n(ie),he=It(29301),Gt=It(70425),Ie=It(34280),Xt=It(59301),Me=It(4676),Qt=Xt.forwardRef(function(zt,Ft){var mt=zt.height,vt=zt.offsetY,Et=zt.offsetX,Ct=zt.children,_t=zt.prefixCls,Ce=zt.onInnerResize,Ze=zt.innerProps,Bn=zt.rtl,ze=zt.extra,Ue={},Xe={display:"flex",flexDirection:"column"};return vt!==void 0&&(Ue={height:mt,position:"relative",overflow:"hidden"},Xe=(0,le.Z)((0,le.Z)({},Xe),{},(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({transform:"translateY(".concat(vt,"px)")},Bn?"marginRight":"marginLeft",-Et),"position","absolute"),"left",0),"right",0),"top",0))),Xt.createElement("div",{style:Ue},Xt.createElement(he.Z,{onResize:function(Kn){var mn=Kn.offsetHeight;mn&&Ce&&Ce()}},Xt.createElement("div",(0,St.Z)({style:Xe,className:oe()((0,ve.Z)({},"".concat(_t,"-holder-inner"),_t)),ref:Ft},Ze),Ct,ze)))});Qt.displayName="Filler";var nt=Qt;function et(zt){var Ft=zt.children,mt=zt.setRef,vt=Xt.useCallback(function(Et){mt(Et)},[]);return Xt.cloneElement(Ft,{ref:vt})}function At(zt,Ft,mt,vt,Et,Ct,_t,Ce){var Ze=Ce.getKey;return zt.slice(Ft,mt+1).map(function(Bn,ze){var Ue=Ft+ze,Xe=_t(Bn,Ue,{style:{width:vt},offsetX:Et}),dn=Ze(Bn);return Xt.createElement(et,{key:dn,setRef:function(mn){return Ct(Bn,mn)}},Xe)})}function at(zt,Ft,mt,vt){var Et=mt-zt,Ct=Ft-mt,_t=Math.min(Et,Ct)*2;if(vt<=_t){var Ce=Math.floor(vt/2);return vt%2?mt+Ce+1:mt-Ce}return Et>Ct?mt-(vt-Ct):mt+(vt-Et)}function dt(zt,Ft,mt){var vt=zt.length,Et=Ft.length,Ct,_t;if(vt===0&&Et===0)return null;vt<Et?(Ct=zt,_t=Ft):(Ct=Ft,_t=zt);var Ce={__EMPTY_ITEM__:!0};function Ze(Kn){return Kn!==void 0?mt(Kn):Ce}for(var Bn=null,ze=Math.abs(vt-Et)!==1,Ue=0;Ue<_t.length;Ue+=1){var Xe=Ze(Ct[Ue]),dn=Ze(_t[Ue]);if(Xe!==dn){Bn=Ue,ze=ze||Xe!==Ze(_t[Ue+1]);break}}return Bn===null?null:{index:Bn,multiple:ze}}function gt(zt,Ft,mt){var vt=Xt.useState(zt),Et=(0,de.Z)(vt,2),Ct=Et[0],_t=Et[1],Ce=Xt.useState(null),Ze=(0,de.Z)(Ce,2),Bn=Ze[0],ze=Ze[1];return Xt.useEffect(function(){var Ue=dt(Ct||[],zt||[],Ft);(Ue==null?void 0:Ue.index)!==void 0&&(mt==null||mt(Ue.index),ze(zt[Ue.index])),_t(zt)},[zt]),[Bn]}var xt=It(16089),bt=(typeof navigator=="undefined"?"undefined":(0,Wt.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),Ut=bt,Rt=function(zt,Ft,mt,vt){var Et=(0,Xt.useRef)(!1),Ct=(0,Xt.useRef)(null);function _t(){clearTimeout(Ct.current),Et.current=!0,Ct.current=setTimeout(function(){Et.current=!1},50)}var Ce=(0,Xt.useRef)({top:zt,bottom:Ft,left:mt,right:vt});return Ce.current.top=zt,Ce.current.bottom=Ft,Ce.current.left=mt,Ce.current.right=vt,function(Ze,Bn){var ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ue=Ze?Bn<0&&Ce.current.left||Bn>0&&Ce.current.right:Bn<0&&Ce.current.top||Bn>0&&Ce.current.bottom;return ze&&Ue?(clearTimeout(Ct.current),Et.current=!1):(!Ue||Et.current)&&_t(),!Et.current&&Ue}};function Zt(zt,Ft,mt,vt,Et,Ct,_t){var Ce=(0,Xt.useRef)(0),Ze=(0,Xt.useRef)(null),Bn=(0,Xt.useRef)(null),ze=(0,Xt.useRef)(!1),Ue=Rt(Ft,mt,vt,Et);function Xe(kn,On){if(xt.Z.cancel(Ze.current),!Ue(!1,On)){var Vn=kn;if(!Vn._virtualHandled)Vn._virtualHandled=!0;else return;Ce.current+=On,Bn.current=On,Ut||Vn.preventDefault(),Ze.current=(0,xt.Z)(function(){var Ki=ze.current?10:1;_t(Ce.current*Ki,!1),Ce.current=0})}}function dn(kn,On){_t(On,!0),Ut||kn.preventDefault()}var Kn=(0,Xt.useRef)(null),mn=(0,Xt.useRef)(null);function be(kn){if(zt){xt.Z.cancel(mn.current),mn.current=(0,xt.Z)(function(){Kn.current=null},2);var On=kn.deltaX,Vn=kn.deltaY,Ki=kn.shiftKey,si=On,yi=Vn;(Kn.current==="sx"||!Kn.current&&Ki&&Vn&&!On)&&(si=Vn,yi=0,Kn.current="sx");var Ei=Math.abs(si),qi=Math.abs(yi);Kn.current===null&&(Kn.current=Ct&&Ei>qi?"x":"y"),Kn.current==="y"?Xe(kn,yi):dn(kn,si)}}function ei(kn){zt&&(ze.current=kn.detail===Bn.current)}return[be,ei]}function Yt(zt,Ft,mt,vt){var Et=Xt.useMemo(function(){return[new Map,[]]},[zt,mt.id,vt]),Ct=(0,de.Z)(Et,2),_t=Ct[0],Ce=Ct[1],Ze=function(ze){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ze,Xe=_t.get(ze),dn=_t.get(Ue);if(Xe===void 0||dn===void 0)for(var Kn=zt.length,mn=Ce.length;mn<Kn;mn+=1){var be,ei=zt[mn],kn=Ft(ei);_t.set(kn,mn);var On=(be=mt.get(kn))!==null&&be!==void 0?be:vt;if(Ce[mn]=(Ce[mn-1]||0)+On,kn===ze&&(Xe=mn),kn===Ue&&(dn=mn),Xe!==void 0&&dn!==void 0)break}return{top:Ce[Xe-1]||0,bottom:Ce[dn]}};return Ze}var te=It(42573),ye=It(58698),fe=function(){function zt(){(0,te.Z)(this,zt),(0,ve.Z)(this,"maps",void 0),(0,ve.Z)(this,"id",0),(0,ve.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,ye.Z)(zt,[{key:"set",value:function(mt,vt){this.diffRecords.set(mt,this.maps[mt]),this.maps[mt]=vt,this.id+=1}},{key:"get",value:function(mt){return this.maps[mt]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),zt}(),Ke=fe;function _e(zt){var Ft=parseFloat(zt);return isNaN(Ft)?0:Ft}function nn(zt,Ft,mt){var vt=Xt.useState(0),Et=(0,de.Z)(vt,2),Ct=Et[0],_t=Et[1],Ce=(0,Xt.useRef)(new Map),Ze=(0,Xt.useRef)(new Ke),Bn=(0,Xt.useRef)(0);function ze(){Bn.current+=1}function Ue(){var dn=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;ze();var Kn=function(){var ei=!1;Ce.current.forEach(function(kn,On){if(kn&&kn.offsetParent){var Vn=kn.offsetHeight,Ki=getComputedStyle(kn),si=Ki.marginTop,yi=Ki.marginBottom,Ei=_e(si),qi=_e(yi),ii=Vn+Ei+qi;Ze.current.get(On)!==ii&&(Ze.current.set(On,ii),ei=!0)}}),ei&&_t(function(kn){return kn+1})};if(dn)Kn();else{Bn.current+=1;var mn=Bn.current;Promise.resolve().then(function(){mn===Bn.current&&Kn()})}}function Xe(dn,Kn){var mn=zt(dn),be=Ce.current.get(mn);Kn?(Ce.current.set(mn,Kn),Ue()):Ce.current.delete(mn),!be!=!Kn&&(Kn?Ft==null||Ft(dn):mt==null||mt(dn))}return(0,Xt.useEffect)(function(){return ze},[]),[Xe,Ue,Ze.current,Ct]}var fn=14/15;function xn(zt,Ft,mt){var vt=(0,Xt.useRef)(!1),Et=(0,Xt.useRef)(0),Ct=(0,Xt.useRef)(0),_t=(0,Xt.useRef)(null),Ce=(0,Xt.useRef)(null),Ze,Bn=function(dn){if(vt.current){var Kn=Math.ceil(dn.touches[0].pageX),mn=Math.ceil(dn.touches[0].pageY),be=Et.current-Kn,ei=Ct.current-mn,kn=Math.abs(be)>Math.abs(ei);kn?Et.current=Kn:Ct.current=mn;var On=mt(kn,kn?be:ei,!1,dn);On&&dn.preventDefault(),clearInterval(Ce.current),On&&(Ce.current=setInterval(function(){kn?be*=fn:ei*=fn;var Vn=Math.floor(kn?be:ei);(!mt(kn,Vn,!0)||Math.abs(Vn)<=.1)&&clearInterval(Ce.current)},16))}},ze=function(){vt.current=!1,Ze()},Ue=function(dn){Ze(),dn.touches.length===1&&!vt.current&&(vt.current=!0,Et.current=Math.ceil(dn.touches[0].pageX),Ct.current=Math.ceil(dn.touches[0].pageY),_t.current=dn.target,_t.current.addEventListener("touchmove",Bn,{passive:!1}),_t.current.addEventListener("touchend",ze,{passive:!0}))};Ze=function(){_t.current&&(_t.current.removeEventListener("touchmove",Bn),_t.current.removeEventListener("touchend",ze))},(0,Ie.Z)(function(){return zt&&Ft.current.addEventListener("touchstart",Ue,{passive:!0}),function(){var Xe;(Xe=Ft.current)===null||Xe===void 0||Xe.removeEventListener("touchstart",Ue),Ze(),clearInterval(Ce.current)}},[zt])}function _n(zt){return Math.floor(Math.pow(zt,.5))}function Xn(zt,Ft){var mt="touches"in zt?zt.touches[0]:zt;return mt[Ft?"pageX":"pageY"]-window[Ft?"scrollX":"scrollY"]}function pe(zt,Ft,mt){Xt.useEffect(function(){var vt=Ft.current;if(zt&&vt){var Et=!1,Ct,_t,Ce=function(){xt.Z.cancel(Ct)},Ze=function Xe(){Ce(),Ct=(0,xt.Z)(function(){mt(_t),Xe()})},Bn=function(dn){if(!(dn.target.draggable||dn.button!==0)){var Kn=dn;Kn._virtualHandled||(Kn._virtualHandled=!0,Et=!0)}},ze=function(){Et=!1,Ce()},Ue=function(dn){if(Et){var Kn=Xn(dn,!1),mn=vt.getBoundingClientRect(),be=mn.top,ei=mn.bottom;if(Kn<=be){var kn=be-Kn;_t=-_n(kn),Ze()}else if(Kn>=ei){var On=Kn-ei;_t=_n(On),Ze()}else Ce()}};return vt.addEventListener("mousedown",Bn),vt.ownerDocument.addEventListener("mouseup",ze),vt.ownerDocument.addEventListener("mousemove",Ue),function(){vt.removeEventListener("mousedown",Bn),vt.ownerDocument.removeEventListener("mouseup",ze),vt.ownerDocument.removeEventListener("mousemove",Ue),Ce()}}},[zt])}var ne=10;function pn(zt,Ft,mt,vt,Et,Ct,_t,Ce){var Ze=Xt.useRef(),Bn=Xt.useState(null),ze=(0,de.Z)(Bn,2),Ue=ze[0],Xe=ze[1];return(0,Ie.Z)(function(){if(Ue&&Ue.times<ne){if(!zt.current){Xe(function(kr){return(0,le.Z)({},kr)});return}Ct();var dn=Ue.targetAlign,Kn=Ue.originAlign,mn=Ue.index,be=Ue.offset,ei=zt.current.clientHeight,kn=!1,On=dn,Vn=null;if(ei){for(var Ki=dn||Kn,si=0,yi=0,Ei=0,qi=Math.min(Ft.length-1,mn),ii=0;ii<=qi;ii+=1){var ar=Et(Ft[ii]);yi=si;var Xi=mt.get(ar);Ei=yi+(Xi===void 0?vt:Xi),si=Ei}for(var lr=Ki==="top"?be:ei-be,zi=qi;zi>=0;zi-=1){var Kr=Et(Ft[zi]),Ir=mt.get(Kr);if(Ir===void 0){kn=!0;break}if(lr-=Ir,lr<=0)break}switch(Ki){case"top":Vn=yi-be;break;case"bottom":Vn=Ei-ei+be;break;default:{var Or=zt.current.scrollTop,Yi=Or+ei;yi<Or?On="top":Ei>Yi&&(On="bottom")}}Vn!==null&&_t(Vn),Vn!==Ue.lastTop&&(kn=!0)}kn&&Xe((0,le.Z)((0,le.Z)({},Ue),{},{times:Ue.times+1,targetAlign:On,lastTop:Vn}))}},[Ue,zt.current]),function(dn){if(dn==null){Ce();return}if(xt.Z.cancel(Ze.current),typeof dn=="number")_t(dn);else if(dn&&(0,Wt.Z)(dn)==="object"){var Kn,mn=dn.align;"index"in dn?Kn=dn.index:Kn=Ft.findIndex(function(kn){return Et(kn)===dn.key});var be=dn.offset,ei=be===void 0?0:be;Xe({times:0,index:Kn,offset:ei,originAlign:mn})}}}var Ai=Xt.forwardRef(function(zt,Ft){var mt=zt.prefixCls,vt=zt.rtl,Et=zt.scrollOffset,Ct=zt.scrollRange,_t=zt.onStartMove,Ce=zt.onStopMove,Ze=zt.onScroll,Bn=zt.horizontal,ze=zt.spinSize,Ue=zt.containerSize,Xe=zt.style,dn=zt.thumbStyle,Kn=zt.showScrollBar,mn=Xt.useState(!1),be=(0,de.Z)(mn,2),ei=be[0],kn=be[1],On=Xt.useState(null),Vn=(0,de.Z)(On,2),Ki=Vn[0],si=Vn[1],yi=Xt.useState(null),Ei=(0,de.Z)(yi,2),qi=Ei[0],ii=Ei[1],ar=!vt,Xi=Xt.useRef(),lr=Xt.useRef(),zi=Xt.useState(Kn),Kr=(0,de.Z)(zi,2),Ir=Kr[0],Or=Kr[1],Yi=Xt.useRef(),kr=function(){Kn===!0||Kn===!1||(clearTimeout(Yi.current),Or(!0),Yi.current=setTimeout(function(){Or(!1)},3e3))},kt=Ct-Ue||0,tr=Ue-ze||0,Fi=Xt.useMemo(function(){if(Et===0||kt===0)return 0;var yn=Et/kt;return yn*tr},[Et,kt,tr]),ri=function(ji){ji.stopPropagation(),ji.preventDefault()},Li=Xt.useRef({top:Fi,dragging:ei,pageY:Ki,startTop:qi});Li.current={top:Fi,dragging:ei,pageY:Ki,startTop:qi};var Ui=function(ji){kn(!0),si(Xn(ji,Bn)),ii(Li.current.top),_t(),ji.stopPropagation(),ji.preventDefault()};Xt.useEffect(function(){var yn=function(ln){ln.preventDefault()},ji=Xi.current,Mi=lr.current;return ji.addEventListener("touchstart",yn,{passive:!1}),Mi.addEventListener("touchstart",Ui,{passive:!1}),function(){ji.removeEventListener("touchstart",yn),Mi.removeEventListener("touchstart",Ui)}},[]);var Ri=Xt.useRef();Ri.current=kt;var Lr=Xt.useRef();Lr.current=tr,Xt.useEffect(function(){if(ei){var yn,ji=function(ln){var Ln=Li.current,Pe=Ln.dragging,sr=Ln.pageY,$n=Ln.startTop;xt.Z.cancel(yn);var se=Xi.current.getBoundingClientRect(),De=Ue/(Bn?se.width:se.height);if(Pe){var qn=(Xn(ln,Bn)-sr)*De,Zn=$n;!ar&&Bn?Zn-=qn:Zn+=qn;var Ye=Ri.current,Dn=Lr.current,bi=Dn?Zn/Dn:0,ki=Math.ceil(bi*Ye);ki=Math.max(ki,0),ki=Math.min(ki,Ye),yn=(0,xt.Z)(function(){Ze(ki,Bn)})}},Mi=function(){kn(!1),Ce()};return window.addEventListener("mousemove",ji,{passive:!0}),window.addEventListener("touchmove",ji,{passive:!0}),window.addEventListener("mouseup",Mi,{passive:!0}),window.addEventListener("touchend",Mi,{passive:!0}),function(){window.removeEventListener("mousemove",ji),window.removeEventListener("touchmove",ji),window.removeEventListener("mouseup",Mi),window.removeEventListener("touchend",Mi),xt.Z.cancel(yn)}}},[ei]),Xt.useEffect(function(){return kr(),function(){clearTimeout(Yi.current)}},[Et]),Xt.useImperativeHandle(Ft,function(){return{delayHidden:kr}});var an="".concat(mt,"-scrollbar"),rn={position:"absolute",visibility:Ir?null:"hidden"},Ge={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Bn?(Object.assign(rn,{height:8,left:0,right:0,bottom:0}),Object.assign(Ge,(0,ve.Z)({height:"100%",width:ze},ar?"left":"right",Fi))):(Object.assign(rn,(0,ve.Z)({width:8,top:0,bottom:0},ar?"right":"left",0)),Object.assign(Ge,{width:"100%",height:ze,top:Fi})),Xt.createElement("div",{ref:Xi,className:oe()(an,(0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(an,"-horizontal"),Bn),"".concat(an,"-vertical"),!Bn),"".concat(an,"-visible"),Ir)),style:(0,le.Z)((0,le.Z)({},rn),Xe),onMouseDown:ri,onMouseMove:kr},Xt.createElement("div",{ref:lr,className:oe()("".concat(an,"-thumb"),(0,ve.Z)({},"".concat(an,"-thumb-moving"),ei)),style:(0,le.Z)((0,le.Z)({},Ge),dn),onMouseDown:Ui}))}),ai=Ai,sn=20;function Qn(){var zt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ft=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,mt=zt/Ft*zt;return isNaN(mt)&&(mt=0),mt=Math.max(mt,sn),Math.floor(mt)}var jn=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ti=[],$e={overflowY:"auto",overflowAnchor:"none"};function Le(zt,Ft){var mt=zt.prefixCls,vt=mt===void 0?"rc-virtual-list":mt,Et=zt.className,Ct=zt.height,_t=zt.itemHeight,Ce=zt.fullHeight,Ze=Ce===void 0?!0:Ce,Bn=zt.style,ze=zt.data,Ue=zt.children,Xe=zt.itemKey,dn=zt.virtual,Kn=zt.direction,mn=zt.scrollWidth,be=zt.component,ei=be===void 0?"div":be,kn=zt.onScroll,On=zt.onVirtualScroll,Vn=zt.onVisibleChange,Ki=zt.innerProps,si=zt.extraRender,yi=zt.styles,Ei=zt.showScrollBar,qi=Ei===void 0?"optional":Ei,ii=(0,Ht.Z)(zt,jn),ar=Xt.useCallback(function(cn){return typeof Xe=="function"?Xe(cn):cn==null?void 0:cn[Xe]},[Xe]),Xi=nn(ar,null,null),lr=(0,de.Z)(Xi,4),zi=lr[0],Kr=lr[1],Ir=lr[2],Or=lr[3],Yi=!!(dn!==!1&&Ct&&_t),kr=Xt.useMemo(function(){return Object.values(Ir.maps).reduce(function(cn,Un){return cn+Un},0)},[Ir.id,Ir.maps]),kt=Yi&&ze&&(Math.max(_t*ze.length,kr)>Ct||!!mn),tr=Kn==="rtl",Fi=oe()(vt,(0,ve.Z)({},"".concat(vt,"-rtl"),tr),Et),ri=ze||Ti,Li=(0,Xt.useRef)(),Ui=(0,Xt.useRef)(),Ri=(0,Xt.useRef)(),Lr=(0,Xt.useState)(0),an=(0,de.Z)(Lr,2),rn=an[0],Ge=an[1],yn=(0,Xt.useState)(0),ji=(0,de.Z)(yn,2),Mi=ji[0],or=ji[1],ln=(0,Xt.useState)(!1),Ln=(0,de.Z)(ln,2),Pe=Ln[0],sr=Ln[1],$n=function(){sr(!0)},se=function(){sr(!1)},De={getKey:ar};function qn(cn){Ge(function(Un){var Rn;typeof cn=="function"?Rn=cn(Un):Rn=cn;var gn=ur(Rn);return Li.current.scrollTop=gn,gn})}var Zn=(0,Xt.useRef)({start:0,end:ri.length}),Ye=(0,Xt.useRef)(),Dn=gt(ri,ar),bi=(0,de.Z)(Dn,1),ki=bi[0];Ye.current=ki;var Ni=Xt.useMemo(function(){if(!Yi)return{scrollHeight:void 0,start:0,end:ri.length-1,offset:void 0};if(!kt){var cn;return{scrollHeight:((cn=Ui.current)===null||cn===void 0?void 0:cn.offsetHeight)||0,start:0,end:ri.length-1,offset:void 0}}for(var Un=0,Rn,gn,Cn,Tn=ri.length,qe=0;qe<Tn;qe+=1){var In=ri[qe],on=ar(In),_i=Ir.get(on),Qi=Un+(_i===void 0?_t:_i);Qi>=rn&&Rn===void 0&&(Rn=qe,gn=Un),Qi>rn+Ct&&Cn===void 0&&(Cn=qe),Un=Qi}return Rn===void 0&&(Rn=0,gn=0,Cn=Math.ceil(Ct/_t)),Cn===void 0&&(Cn=ri.length-1),Cn=Math.min(Cn+1,ri.length-1),{scrollHeight:Un,start:Rn,end:Cn,offset:gn}},[kt,Yi,rn,ri,Or,Ct]),li=Ni.scrollHeight,ci=Ni.start,fi=Ni.end,Fn=Ni.offset;Zn.current.start=ci,Zn.current.end=fi,Xt.useLayoutEffect(function(){var cn=Ir.getRecord();if(cn.size===1){var Un=Array.from(cn.keys())[0],Rn=cn.get(Un),gn=ri[ci];if(gn&&Rn===void 0){var Cn=ar(gn);if(Cn===Un){var Tn=Ir.get(Un),qe=Tn-_t;qn(function(In){return In+qe})}}}Ir.resetRecord()},[li]);var un=Xt.useState({width:0,height:Ct}),We=(0,de.Z)(un,2),Mn=We[0],$i=We[1],hr=function(Un){$i({width:Un.offsetWidth,height:Un.offsetHeight})},vr=(0,Xt.useRef)(),Te=(0,Xt.useRef)(),xi=Xt.useMemo(function(){return Qn(Mn.width,mn)},[Mn.width,mn]),er=Xt.useMemo(function(){return Qn(Mn.height,li)},[Mn.height,li]),Si=li-Ct,Mr=(0,Xt.useRef)(Si);Mr.current=Si;function ur(cn){var Un=cn;return Number.isNaN(Mr.current)||(Un=Math.min(Un,Mr.current)),Un=Math.max(Un,0),Un}var Tr=rn<=0,gr=rn>=Si,ue=Mi<=0,re=Mi>=mn,ee=Rt(Tr,gr,ue,re),je=function(){return{x:tr?-Mi:Mi,y:rn}},xe=(0,Xt.useRef)(je()),An=(0,Gt.zX)(function(cn){if(On){var Un=(0,le.Z)((0,le.Z)({},je()),cn);(xe.current.x!==Un.x||xe.current.y!==Un.y)&&(On(Un),xe.current=Un)}});function ui(cn,Un){var Rn=cn;Un?((0,Me.flushSync)(function(){or(Rn)}),An()):qn(Rn)}function ti(cn){var Un=cn.currentTarget.scrollTop;Un!==rn&&qn(Un),kn==null||kn(cn),An()}var Bi=function(Un){var Rn=Un,gn=mn?mn-Mn.width:0;return Rn=Math.max(Rn,0),Rn=Math.min(Rn,gn),Rn},mi=(0,Gt.zX)(function(cn,Un){Un?((0,Me.flushSync)(function(){or(function(Rn){var gn=Rn+(tr?-cn:cn);return Bi(gn)})}),An()):qn(function(Rn){var gn=Rn+cn;return gn})}),oi=Zt(Yi,Tr,gr,ue,re,!!mn,mi),Di=(0,de.Z)(oi,2),Ne=Di[0],hn=Di[1];xn(Yi,Li,function(cn,Un,Rn,gn){var Cn=gn;return ee(cn,Un,Rn)?!1:!Cn||!Cn._virtualHandled?(Cn&&(Cn._virtualHandled=!0),Ne({preventDefault:function(){},deltaX:cn?Un:0,deltaY:cn?0:Un}),!0):!1}),pe(kt,Li,function(cn){qn(function(Un){return Un+cn})}),(0,Ie.Z)(function(){function cn(Rn){var gn=Tr&&Rn.detail<0,Cn=gr&&Rn.detail>0;Yi&&!gn&&!Cn&&Rn.preventDefault()}var Un=Li.current;return Un.addEventListener("wheel",Ne,{passive:!1}),Un.addEventListener("DOMMouseScroll",hn,{passive:!0}),Un.addEventListener("MozMousePixelScroll",cn,{passive:!1}),function(){Un.removeEventListener("wheel",Ne),Un.removeEventListener("DOMMouseScroll",hn),Un.removeEventListener("MozMousePixelScroll",cn)}},[Yi,Tr,gr]),(0,Ie.Z)(function(){if(mn){var cn=Bi(Mi);or(cn),An({x:cn})}},[Mn.width,mn]);var ke=function(){var Un,Rn;(Un=vr.current)===null||Un===void 0||Un.delayHidden(),(Rn=Te.current)===null||Rn===void 0||Rn.delayHidden()},Ot=pn(Li,ri,Ir,_t,ar,function(){return Kr(!0)},qn,ke);Xt.useImperativeHandle(Ft,function(){return{nativeElement:Ri.current,getScrollInfo:je,scrollTo:function(Un){function Rn(gn){return gn&&(0,Wt.Z)(gn)==="object"&&("left"in gn||"top"in gn)}Rn(Un)?(Un.left!==void 0&&or(Bi(Un.left)),Ot(Un.top)):Ot(Un)}}}),(0,Ie.Z)(function(){if(Vn){var cn=ri.slice(ci,fi+1);Vn(cn,ri)}},[ci,fi,ri]);var vn=Yt(ri,ar,Ir,_t),Jn=si==null?void 0:si({start:ci,end:fi,virtual:kt,offsetX:Mi,offsetY:Fn,rtl:tr,getSize:vn}),vi=At(ri,ci,fi,mn,Mi,zi,Ue,De),Ee=null;Ct&&(Ee=(0,le.Z)((0,ve.Z)({},Ze?"height":"maxHeight",Ct),$e),Yi&&(Ee.overflowY="hidden",mn&&(Ee.overflowX="hidden"),Pe&&(Ee.pointerEvents="none")));var Wn={};return tr&&(Wn.dir="rtl"),Xt.createElement("div",(0,St.Z)({ref:Ri,style:(0,le.Z)((0,le.Z)({},Bn),{},{position:"relative"}),className:Fi},Wn,ii),Xt.createElement(he.Z,{onResize:hr},Xt.createElement(ei,{className:"".concat(vt,"-holder"),style:Ee,ref:Li,onScroll:ti,onMouseEnter:ke},Xt.createElement(nt,{prefixCls:vt,height:li,offsetX:Mi,offsetY:Fn,scrollWidth:mn,onInnerResize:Kr,ref:Ui,innerProps:Ki,rtl:tr,extra:Jn},vi))),kt&&li>Ct&&Xt.createElement(ai,{ref:vr,prefixCls:vt,scrollOffset:rn,scrollRange:li,rtl:tr,onScroll:ui,onStartMove:$n,onStopMove:se,spinSize:er,containerSize:Mn.height,style:yi==null?void 0:yi.verticalScrollBar,thumbStyle:yi==null?void 0:yi.verticalScrollBarThumb,showScrollBar:qi}),kt&&mn>Mn.width&&Xt.createElement(ai,{ref:Te,prefixCls:vt,scrollOffset:Mi,scrollRange:mn,rtl:tr,onScroll:ui,onStartMove:$n,onStopMove:se,spinSize:xi,containerSize:Mn.width,horizontal:!0,style:yi==null?void 0:yi.horizontalScrollBar,thumbStyle:yi==null?void 0:yi.horizontalScrollBarThumb,showScrollBar:qi}))}var tn=Xt.forwardRef(Le);tn.displayName="List";var hi=tn,ni=hi},51353:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Object.defineProperty(Ve,"DraggableCore",{enumerable:!0,get:function(){return oe.default}}),Ve.default=void 0;var St=Ie(It(59301)),Wt=Gt(It(12708)),le=Gt(It(4676)),ve=It(14625),de=It(77026),Ht=It(22013),ie=It(80217),oe=Gt(It(68555)),he=Gt(It(97510));function Gt(At){return At&&At.__esModule?At:{default:At}}function Ie(At,at){if(typeof WeakMap=="function")var dt=new WeakMap,gt=new WeakMap;return(Ie=function(xt,bt){if(!bt&&xt&&xt.__esModule)return xt;var Ut,Rt,Zt={__proto__:null,default:xt};if(xt===null||typeof xt!="object"&&typeof xt!="function")return Zt;if(Ut=bt?gt:dt){if(Ut.has(xt))return Ut.get(xt);Ut.set(xt,Zt)}for(const Yt in xt)Yt!=="default"&&{}.hasOwnProperty.call(xt,Yt)&&((Rt=(Ut=Object.defineProperty)&&Object.getOwnPropertyDescriptor(xt,Yt))&&(Rt.get||Rt.set)?Ut(Zt,Yt,Rt):Zt[Yt]=xt[Yt]);return Zt})(At,at)}function Xt(){return Xt=Object.assign?Object.assign.bind():function(At){for(var at=1;at<arguments.length;at++){var dt=arguments[at];for(var gt in dt)({}).hasOwnProperty.call(dt,gt)&&(At[gt]=dt[gt])}return At},Xt.apply(null,arguments)}function Me(At,at,dt){return(at=Qt(at))in At?Object.defineProperty(At,at,{value:dt,enumerable:!0,configurable:!0,writable:!0}):At[at]=dt,At}function Qt(At){var at=nt(At,"string");return typeof at=="symbol"?at:at+""}function nt(At,at){if(typeof At!="object"||!At)return At;var dt=At[Symbol.toPrimitive];if(dt!==void 0){var gt=dt.call(At,at||"default");if(typeof gt!="object")return gt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(at==="string"?String:Number)(At)}class et extends St.Component{static getDerivedStateFromProps(at,dt){let{position:gt}=at,{prevPropsPosition:xt}=dt;return gt&&(!xt||gt.x!==xt.x||gt.y!==xt.y)?((0,he.default)("Draggable: getDerivedStateFromProps %j",{position:gt,prevPropsPosition:xt}),{x:gt.x,y:gt.y,prevPropsPosition:Pd({},gt)}):null}constructor(at){super(at),Me(this,"onDragStart",(dt,gt)=>{if((0,he.default)("Draggable: onDragStart: %j",gt),this.props.onStart(dt,(0,Ht.createDraggableData)(this,gt))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),Me(this,"onDrag",(dt,gt)=>{if(!this.state.dragging)return!1;(0,he.default)("Draggable: onDrag: %j",gt);const xt=(0,Ht.createDraggableData)(this,gt),bt={x:xt.x,y:xt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:Rt,y:Zt}=bt;bt.x+=this.state.slackX,bt.y+=this.state.slackY;const[Yt,te]=(0,Ht.getBoundPosition)(this,bt.x,bt.y);bt.x=Yt,bt.y=te,bt.slackX=this.state.slackX+(Rt-bt.x),bt.slackY=this.state.slackY+(Zt-bt.y),xt.x=bt.x,xt.y=bt.y,xt.deltaX=bt.x-this.state.x,xt.deltaY=bt.y-this.state.y}if(this.props.onDrag(dt,xt)===!1)return!1;this.setState(bt)}),Me(this,"onDragStop",(dt,gt)=>{if(!this.state.dragging||this.props.onStop(dt,(0,Ht.createDraggableData)(this,gt))===!1)return!1;(0,he.default)("Draggable: onDragStop: %j",gt);const bt={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:Rt,y:Zt}=this.props.position;bt.x=Rt,bt.y=Zt}this.setState(bt)}),this.state={dragging:!1,dragged:!1,x:at.position?at.position.x:at.defaultPosition.x,y:at.position?at.position.y:at.defaultPosition.y,prevPropsPosition:Pd({},at.position),slackX:0,slackY:0,isElementSVG:!1},at.position&&!(at.onDrag||at.onStop)&&console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement!="undefined"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){var at,dt,gt;return(gt=(dt=(at=this.props)==null?void 0:at.nodeRef)==null?void 0:dt.current)!=null?gt:le.default.findDOMNode(this)}render(){const Xn=this.props,{axis:at,bounds:dt,children:gt,defaultPosition:xt,defaultClassName:bt,defaultClassNameDragging:Ut,defaultClassNameDragged:Rt,position:Zt,positionOffset:Yt,scale:te}=Xn,ye=Sw(Xn,["axis","bounds","children","defaultPosition","defaultClassName","defaultClassNameDragging","defaultClassNameDragged","position","positionOffset","scale"]);let fe={},Ke=null;const nn=!!!Zt||this.state.dragging,fn=Zt||xt,xn={x:(0,Ht.canDragX)(this)&&nn?this.state.x:fn.x,y:(0,Ht.canDragY)(this)&&nn?this.state.y:fn.y};this.state.isElementSVG?Ke=(0,de.createSVGTransform)(xn,Yt):fe=(0,de.createCSSTransform)(xn,Yt);const _n=(0,ve.clsx)(gt.props.className||"",bt,{[Ut]:this.state.dragging,[Rt]:this.state.dragged});return St.createElement(oe.default,Xt({},ye,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),St.cloneElement(St.Children.only(gt),{className:_n,style:Pd(Pd({},gt.props.style),fe),transform:Ke}))}}Ve.default=et,Me(et,"displayName","Draggable"),Me(et,"propTypes",Ay(Pd({},oe.default.propTypes),{axis:Wt.default.oneOf(["both","x","y","none"]),bounds:Wt.default.oneOfType([Wt.default.shape({left:Wt.default.number,right:Wt.default.number,top:Wt.default.number,bottom:Wt.default.number}),Wt.default.string,Wt.default.oneOf([!1])]),defaultClassName:Wt.default.string,defaultClassNameDragging:Wt.default.string,defaultClassNameDragged:Wt.default.string,defaultPosition:Wt.default.shape({x:Wt.default.number,y:Wt.default.number}),positionOffset:Wt.default.shape({x:Wt.default.oneOfType([Wt.default.number,Wt.default.string]),y:Wt.default.oneOfType([Wt.default.number,Wt.default.string])}),position:Wt.default.shape({x:Wt.default.number,y:Wt.default.number}),className:ie.dontSetMe,style:ie.dontSetMe,transform:ie.dontSetMe})),Me(et,"defaultProps",Ay(Pd({},oe.default.defaultProps),{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},68555:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var St=he(It(59301)),Wt=oe(It(12708)),le=oe(It(4676)),ve=It(77026),de=It(22013),Ht=It(80217),ie=oe(It(97510));function oe(et){return et&&et.__esModule?et:{default:et}}function he(et,At){if(typeof WeakMap=="function")var at=new WeakMap,dt=new WeakMap;return(he=function(gt,xt){if(!xt&&gt&&gt.__esModule)return gt;var bt,Ut,Rt={__proto__:null,default:gt};if(gt===null||typeof gt!="object"&&typeof gt!="function")return Rt;if(bt=xt?dt:at){if(bt.has(gt))return bt.get(gt);bt.set(gt,Rt)}for(const Zt in gt)Zt!=="default"&&{}.hasOwnProperty.call(gt,Zt)&&((Ut=(bt=Object.defineProperty)&&Object.getOwnPropertyDescriptor(gt,Zt))&&(Ut.get||Ut.set)?bt(Rt,Zt,Ut):Rt[Zt]=gt[Zt]);return Rt})(et,At)}function Gt(et,At,at){return(At=Ie(At))in et?Object.defineProperty(et,At,{value:at,enumerable:!0,configurable:!0,writable:!0}):et[At]=at,et}function Ie(et){var At=Xt(et,"string");return typeof At=="symbol"?At:At+""}function Xt(et,At){if(typeof et!="object"||!et)return et;var at=et[Symbol.toPrimitive];if(at!==void 0){var dt=at.call(et,At||"default");if(typeof dt!="object")return dt;throw new TypeError("@@toPrimitive must return a primitive value.")}return(At==="string"?String:Number)(et)}const Me={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let Qt=Me.mouse;class nt extends St.Component{constructor(){super(...arguments),Gt(this,"dragging",!1),Gt(this,"lastX",NaN),Gt(this,"lastY",NaN),Gt(this,"touchIdentifier",null),Gt(this,"mounted",!1),Gt(this,"handleDragStart",At=>{if(this.props.onMouseDown(At),!this.props.allowAnyClick&&typeof At.button=="number"&&At.button!==0)return!1;const at=this.findDOMNode();if(!at||!at.ownerDocument||!at.ownerDocument.body)throw new Error("<DraggableCore> not mounted on DragStart!");const{ownerDocument:dt}=at;if(this.props.disabled||!(At.target instanceof dt.defaultView.Node)||this.props.handle&&!(0,ve.matchesSelectorAndParentsTo)(At.target,this.props.handle,at)||this.props.cancel&&(0,ve.matchesSelectorAndParentsTo)(At.target,this.props.cancel,at))return;At.type==="touchstart"&&!this.props.allowMobileScroll&&At.preventDefault();const gt=(0,ve.getTouchIdentifier)(At);this.touchIdentifier=gt;const xt=(0,de.getControlPosition)(At,gt,this);if(xt==null)return;const{x:bt,y:Ut}=xt,Rt=(0,de.createCoreData)(this,bt,Ut);(0,ie.default)("DraggableCore: handleDragStart: %j",Rt),(0,ie.default)("calling",this.props.onStart),!(this.props.onStart(At,Rt)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,ve.addUserSelectStyles)(dt),this.dragging=!0,this.lastX=bt,this.lastY=Ut,(0,ve.addEvent)(dt,Qt.move,this.handleDrag),(0,ve.addEvent)(dt,Qt.stop,this.handleDragStop))}),Gt(this,"handleDrag",At=>{const at=(0,de.getControlPosition)(At,this.touchIdentifier,this);if(at==null)return;let{x:dt,y:gt}=at;if(Array.isArray(this.props.grid)){let Ut=dt-this.lastX,Rt=gt-this.lastY;if([Ut,Rt]=(0,de.snapToGrid)(this.props.grid,Ut,Rt),!Ut&&!Rt)return;dt=this.lastX+Ut,gt=this.lastY+Rt}const xt=(0,de.createCoreData)(this,dt,gt);if((0,ie.default)("DraggableCore: handleDrag: %j",xt),this.props.onDrag(At,xt)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch(Ut){const Rt=document.createEvent("MouseEvents");Rt.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(Rt)}return}this.lastX=dt,this.lastY=gt}),Gt(this,"handleDragStop",At=>{if(!this.dragging)return;const at=(0,de.getControlPosition)(At,this.touchIdentifier,this);if(at==null)return;let{x:dt,y:gt}=at;if(Array.isArray(this.props.grid)){let Rt=dt-this.lastX||0,Zt=gt-this.lastY||0;[Rt,Zt]=(0,de.snapToGrid)(this.props.grid,Rt,Zt),dt=this.lastX+Rt,gt=this.lastY+Zt}const xt=(0,de.createCoreData)(this,dt,gt);if(this.props.onStop(At,xt)===!1||this.mounted===!1)return!1;const Ut=this.findDOMNode();Ut&&this.props.enableUserSelectHack&&(0,ve.scheduleRemoveUserSelectStyles)(Ut.ownerDocument),(0,ie.default)("DraggableCore: handleDragStop: %j",xt),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,Ut&&((0,ie.default)("DraggableCore: Removing handlers"),(0,ve.removeEvent)(Ut.ownerDocument,Qt.move,this.handleDrag),(0,ve.removeEvent)(Ut.ownerDocument,Qt.stop,this.handleDragStop))}),Gt(this,"onMouseDown",At=>(Qt=Me.mouse,this.handleDragStart(At))),Gt(this,"onMouseUp",At=>(Qt=Me.mouse,this.handleDragStop(At))),Gt(this,"onTouchStart",At=>(Qt=Me.touch,this.handleDragStart(At))),Gt(this,"onTouchEnd",At=>(Qt=Me.touch,this.handleDragStop(At)))}componentDidMount(){this.mounted=!0;const At=this.findDOMNode();At&&(0,ve.addEvent)(At,Me.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const At=this.findDOMNode();if(At){const{ownerDocument:at}=At;(0,ve.removeEvent)(at,Me.mouse.move,this.handleDrag),(0,ve.removeEvent)(at,Me.touch.move,this.handleDrag),(0,ve.removeEvent)(at,Me.mouse.stop,this.handleDragStop),(0,ve.removeEvent)(at,Me.touch.stop,this.handleDragStop),(0,ve.removeEvent)(At,Me.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,ve.scheduleRemoveUserSelectStyles)(at)}}findDOMNode(){var At,at,dt;return(At=this.props)!=null&&At.nodeRef?(dt=(at=this.props)==null?void 0:at.nodeRef)==null?void 0:dt.current:le.default.findDOMNode(this)}render(){return St.cloneElement(St.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}Ve.default=nt,Gt(nt,"displayName","DraggableCore"),Gt(nt,"propTypes",{allowAnyClick:Wt.default.bool,allowMobileScroll:Wt.default.bool,children:Wt.default.node.isRequired,disabled:Wt.default.bool,enableUserSelectHack:Wt.default.bool,offsetParent:function(et,At){if(et[At]&&et[At].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:Wt.default.arrayOf(Wt.default.number),handle:Wt.default.string,cancel:Wt.default.string,nodeRef:Wt.default.object,onStart:Wt.default.func,onDrag:Wt.default.func,onStop:Wt.default.func,onMouseDown:Wt.default.func,scale:Wt.default.number,className:Ht.dontSetMe,style:Ht.dontSetMe,transform:Ht.dontSetMe}),Gt(nt,"defaultProps",{allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},96249:function(Sn,Ve,It){"use strict";const{default:St,DraggableCore:Wt}=It(51353);Sn.exports=St,Sn.exports.default=St,Sn.exports.DraggableCore=Wt},77026:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.addClassName=bt,Ve.addEvent=ie,Ve.addUserSelectStyles=dt,Ve.createCSSTransform=Qt,Ve.createSVGTransform=nt,Ve.getTouch=At,Ve.getTouchIdentifier=at,Ve.getTranslation=et,Ve.innerHeight=Ie,Ve.innerWidth=Xt,Ve.matchesSelector=de,Ve.matchesSelectorAndParentsTo=Ht,Ve.offsetXYFromParent=Me,Ve.outerHeight=he,Ve.outerWidth=Gt,Ve.removeClassName=Ut,Ve.removeEvent=oe,Ve.scheduleRemoveUserSelectStyles=gt;var St=It(80217),Wt=le(It(76172));function le(Rt,Zt){if(typeof WeakMap=="function")var Yt=new WeakMap,te=new WeakMap;return(le=function(ye,fe){if(!fe&&ye&&ye.__esModule)return ye;var Ke,_e,nn={__proto__:null,default:ye};if(ye===null||typeof ye!="object"&&typeof ye!="function")return nn;if(Ke=fe?te:Yt){if(Ke.has(ye))return Ke.get(ye);Ke.set(ye,nn)}for(const fn in ye)fn!=="default"&&{}.hasOwnProperty.call(ye,fn)&&((_e=(Ke=Object.defineProperty)&&Object.getOwnPropertyDescriptor(ye,fn))&&(_e.get||_e.set)?Ke(nn,fn,_e):nn[fn]=ye[fn]);return nn})(Rt,Zt)}let ve="";function de(Rt,Zt){return ve||(ve=(0,St.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],function(Yt){return(0,St.isFunction)(Rt[Yt])})),(0,St.isFunction)(Rt[ve])?Rt[ve](Zt):!1}function Ht(Rt,Zt,Yt){let te=Rt;do{if(de(te,Zt))return!0;if(te===Yt)return!1;te=te.parentNode}while(te);return!1}function ie(Rt,Zt,Yt,te){if(!Rt)return;const ye=Pd({capture:!0},te);Rt.addEventListener?Rt.addEventListener(Zt,Yt,ye):Rt.attachEvent?Rt.attachEvent("on"+Zt,Yt):Rt["on"+Zt]=Yt}function oe(Rt,Zt,Yt,te){if(!Rt)return;const ye=Pd({capture:!0},te);Rt.removeEventListener?Rt.removeEventListener(Zt,Yt,ye):Rt.detachEvent?Rt.detachEvent("on"+Zt,Yt):Rt["on"+Zt]=null}function he(Rt){let Zt=Rt.clientHeight;const Yt=Rt.ownerDocument.defaultView.getComputedStyle(Rt);return Zt+=(0,St.int)(Yt.borderTopWidth),Zt+=(0,St.int)(Yt.borderBottomWidth),Zt}function Gt(Rt){let Zt=Rt.clientWidth;const Yt=Rt.ownerDocument.defaultView.getComputedStyle(Rt);return Zt+=(0,St.int)(Yt.borderLeftWidth),Zt+=(0,St.int)(Yt.borderRightWidth),Zt}function Ie(Rt){let Zt=Rt.clientHeight;const Yt=Rt.ownerDocument.defaultView.getComputedStyle(Rt);return Zt-=(0,St.int)(Yt.paddingTop),Zt-=(0,St.int)(Yt.paddingBottom),Zt}function Xt(Rt){let Zt=Rt.clientWidth;const Yt=Rt.ownerDocument.defaultView.getComputedStyle(Rt);return Zt-=(0,St.int)(Yt.paddingLeft),Zt-=(0,St.int)(Yt.paddingRight),Zt}function Me(Rt,Zt,Yt){const ye=Zt===Zt.ownerDocument.body?{left:0,top:0}:Zt.getBoundingClientRect(),fe=(Rt.clientX+Zt.scrollLeft-ye.left)/Yt,Ke=(Rt.clientY+Zt.scrollTop-ye.top)/Yt;return{x:fe,y:Ke}}function Qt(Rt,Zt){const Yt=et(Rt,Zt,"px");return{[(0,Wt.browserPrefixToKey)("transform",Wt.default)]:Yt}}function nt(Rt,Zt){return et(Rt,Zt,"")}function et(Rt,Zt,Yt){let{x:te,y:ye}=Rt,fe=`translate(${te}${Yt},${ye}${Yt})`;if(Zt){const Ke=`${typeof Zt.x=="string"?Zt.x:Zt.x+Yt}`,_e=`${typeof Zt.y=="string"?Zt.y:Zt.y+Yt}`;fe=`translate(${Ke}, ${_e})`+fe}return fe}function At(Rt,Zt){return Rt.targetTouches&&(0,St.findInArray)(Rt.targetTouches,Yt=>Zt===Yt.identifier)||Rt.changedTouches&&(0,St.findInArray)(Rt.changedTouches,Yt=>Zt===Yt.identifier)}function at(Rt){if(Rt.targetTouches&&Rt.targetTouches[0])return Rt.targetTouches[0].identifier;if(Rt.changedTouches&&Rt.changedTouches[0])return Rt.changedTouches[0].identifier}function dt(Rt){if(!Rt)return;let Zt=Rt.getElementById("react-draggable-style-el");Zt||(Zt=Rt.createElement("style"),Zt.type="text/css",Zt.id="react-draggable-style-el",Zt.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;}
`,Zt.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;}
`,Rt.getElementsByTagName("head")[0].appendChild(Zt)),Rt.body&&bt(Rt.body,"react-draggable-transparent-selection")}function gt(Rt){window.requestAnimationFrame?window.requestAnimationFrame(()=>{xt(Rt)}):xt(Rt)}function xt(Rt){if(Rt)try{if(Rt.body&&Ut(Rt.body,"react-draggable-transparent-selection"),Rt.selection)Rt.selection.empty();else{const Zt=(Rt.defaultView||window).getSelection();Zt&&Zt.type!=="Caret"&&Zt.removeAllRanges()}}catch(Zt){}}function bt(Rt,Zt){Rt.classList?Rt.classList.add(Zt):Rt.className.match(new RegExp(`(?:^|\\s)${Zt}(?!\\S)`))||(Rt.className+=` ${Zt}`)}function Ut(Rt,Zt){Rt.classList?Rt.classList.remove(Zt):Rt.className=Rt.className.replace(new RegExp(`(?:^|\\s)${Zt}(?!\\S)`,"g"),"")}},76172:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.browserPrefixToKey=Wt,Ve.browserPrefixToStyle=le,Ve.default=void 0,Ve.getPrefix=St;const It=["Moz","Webkit","O","ms"];function St(){var oe,he;let Ht=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window=="undefined")return"";const ie=(he=(oe=window.document)==null?void 0:oe.documentElement)==null?void 0:he.style;if(!ie||Ht in ie)return"";for(let Gt=0;Gt<It.length;Gt++)if(Wt(Ht,It[Gt])in ie)return It[Gt];return""}function Wt(Ht,ie){return ie?`${ie}${ve(Ht)}`:Ht}function le(Ht,ie){return ie?`-${ie.toLowerCase()}-${Ht}`:Ht}function ve(Ht){let ie="",oe=!0;for(let he=0;he<Ht.length;he++)oe?(ie+=Ht[he].toUpperCase(),oe=!1):Ht[he]==="-"?oe=!0:ie+=Ht[he];return ie}var de=Ve.default=St()},97510:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=It;function It(){}},22013:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.canDragX=de,Ve.canDragY=Ht,Ve.createCoreData=oe,Ve.createDraggableData=he,Ve.getBoundPosition=le,Ve.getControlPosition=ie,Ve.snapToGrid=ve;var St=It(80217),Wt=It(77026);function le(Xt,Me,Qt){if(!Xt.props.bounds)return[Me,Qt];let{bounds:nt}=Xt.props;nt=typeof nt=="string"?nt:Gt(nt);const et=Ie(Xt);if(typeof nt=="string"){const{ownerDocument:At}=et,at=At.defaultView;let dt;if(nt==="parent"?dt=et.parentNode:dt=et.getRootNode().querySelector(nt),!(dt instanceof at.HTMLElement))throw new Error('Bounds selector "'+nt+'" could not find an element.');const gt=dt,xt=at.getComputedStyle(et),bt=at.getComputedStyle(gt);nt={left:-et.offsetLeft+(0,St.int)(bt.paddingLeft)+(0,St.int)(xt.marginLeft),top:-et.offsetTop+(0,St.int)(bt.paddingTop)+(0,St.int)(xt.marginTop),right:(0,Wt.innerWidth)(gt)-(0,Wt.outerWidth)(et)-et.offsetLeft+(0,St.int)(bt.paddingRight)-(0,St.int)(xt.marginRight),bottom:(0,Wt.innerHeight)(gt)-(0,Wt.outerHeight)(et)-et.offsetTop+(0,St.int)(bt.paddingBottom)-(0,St.int)(xt.marginBottom)}}return(0,St.isNum)(nt.right)&&(Me=Math.min(Me,nt.right)),(0,St.isNum)(nt.bottom)&&(Qt=Math.min(Qt,nt.bottom)),(0,St.isNum)(nt.left)&&(Me=Math.max(Me,nt.left)),(0,St.isNum)(nt.top)&&(Qt=Math.max(Qt,nt.top)),[Me,Qt]}function ve(Xt,Me,Qt){const nt=Math.round(Me/Xt[0])*Xt[0],et=Math.round(Qt/Xt[1])*Xt[1];return[nt,et]}function de(Xt){return Xt.props.axis==="both"||Xt.props.axis==="x"}function Ht(Xt){return Xt.props.axis==="both"||Xt.props.axis==="y"}function ie(Xt,Me,Qt){const nt=typeof Me=="number"?(0,Wt.getTouch)(Xt,Me):null;if(typeof Me=="number"&&!nt)return null;const et=Ie(Qt),At=Qt.props.offsetParent||et.offsetParent||et.ownerDocument.body;return(0,Wt.offsetXYFromParent)(nt||Xt,At,Qt.props.scale)}function oe(Xt,Me,Qt){const nt=!(0,St.isNum)(Xt.lastX),et=Ie(Xt);return nt?{node:et,deltaX:0,deltaY:0,lastX:Me,lastY:Qt,x:Me,y:Qt}:{node:et,deltaX:Me-Xt.lastX,deltaY:Qt-Xt.lastY,lastX:Xt.lastX,lastY:Xt.lastY,x:Me,y:Qt}}function he(Xt,Me){const Qt=Xt.props.scale;return{node:Me.node,x:Xt.state.x+Me.deltaX/Qt,y:Xt.state.y+Me.deltaY/Qt,deltaX:Me.deltaX/Qt,deltaY:Me.deltaY/Qt,lastX:Xt.state.x,lastY:Xt.state.y}}function Gt(Xt){return{left:Xt.left,top:Xt.top,right:Xt.right,bottom:Xt.bottom}}function Ie(Xt){const Me=Xt.findDOMNode();if(!Me)throw new Error("<DraggableCore>: Unmounted during event!");return Me}},80217:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.dontSetMe=ve,Ve.findInArray=It,Ve.int=le,Ve.isFunction=St,Ve.isNum=Wt;function It(de,Ht){for(let ie=0,oe=de.length;ie<oe;ie++)if(Ht.apply(Ht,[de[ie],ie,de]))return de[ie]}function St(de){return typeof de=="function"||Object.prototype.toString.call(de)==="[object Function]"}function Wt(de){return typeof de=="number"&&!isNaN(de)}function le(de){return parseInt(de,10)}function ve(de,Ht,ie){if(de[Ht])return new Error(`Invalid prop ${Ht} passed to ${ie} - do not set this, set it on the child.`)}},27774:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.SizeSensorId=Ve.SensorTabIndex=Ve.SensorClassName=void 0;var It="size-sensor-id";Ve.SizeSensorId=It;var St="size-sensor-object";Ve.SensorClassName=St;var Wt="-1";Ve.SensorTabIndex=Wt},79301:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var It=function(Wt){var le=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,ve=null;return function(){for(var de=this,Ht=arguments.length,ie=new Array(Ht),oe=0;oe<Ht;oe++)ie[oe]=arguments[oe];clearTimeout(ve),ve=setTimeout(function(){Wt.apply(de,ie)},le)}};Ve.default=It},79789:function(Sn,Ve){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.default=void 0;var It=1,St=function(){return"".concat(It++)};Ve.default=St},47242:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.ver=Ve.clear=Ve.bind=void 0;var St=It(95270),Wt=function(Ht,ie){var oe=(0,St.getSensor)(Ht);return oe.bind(ie),function(){oe.unbind(ie)}};Ve.bind=Wt;var le=function(Ht){var ie=(0,St.getSensor)(Ht);(0,St.removeSensor)(ie)};Ve.clear=le;var ve="1.0.2";Ve.ver=ve},95270:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.removeSensor=Ve.getSensor=Ve.Sensors=void 0;var St=ve(It(79789)),Wt=It(57829),le=It(27774);function ve(he){return he&&he.__esModule?he:{default:he}}var de={};Ve.Sensors=de;function Ht(he){he&&de[he]&&delete de[he]}var ie=function(Gt){var Ie=Gt.getAttribute(le.SizeSensorId);if(Ie&&de[Ie])return de[Ie];var Xt=(0,St.default)();Gt.setAttribute(le.SizeSensorId,Xt);var Me=(0,Wt.createSensor)(Gt,function(){return Ht(Xt)});return de[Xt]=Me,Me};Ve.getSensor=ie;var oe=function(Gt){var Ie=Gt.element.getAttribute(le.SizeSensorId);Gt.destroy(),Ht(Ie)};Ve.removeSensor=oe},57829:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var St=It(20953),Wt=It(55202),le=typeof ResizeObserver!="undefined"?Wt.createSensor:St.createSensor;Ve.createSensor=le},20953:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var St=le(It(79301)),Wt=It(27774);function le(de){return de&&de.__esModule?de:{default:de}}var ve=function(Ht,ie){var oe=void 0,he=[],Gt=function(){getComputedStyle(Ht).position==="static"&&(Ht.style.position="relative");var et=document.createElement("object");return et.onload=function(){et.contentDocument.defaultView.addEventListener("resize",Ie),Ie()},et.style.display="block",et.style.position="absolute",et.style.top="0",et.style.left="0",et.style.height="100%",et.style.width="100%",et.style.overflow="hidden",et.style.pointerEvents="none",et.style.zIndex="-1",et.style.opacity="0",et.setAttribute("class",Wt.SensorClassName),et.setAttribute("tabindex",Wt.SensorTabIndex),et.type="text/html",Ht.appendChild(et),et.data="about:blank",et},Ie=(0,St.default)(function(){he.forEach(function(nt){nt(Ht)})}),Xt=function(et){oe||(oe=Gt()),he.indexOf(et)===-1&&he.push(et)},Me=function(){oe&&oe.parentNode&&(oe.contentDocument&&oe.contentDocument.defaultView.removeEventListener("resize",Ie),oe.parentNode.removeChild(oe),Ht.removeAttribute(Wt.SizeSensorId),oe=void 0,he=[],ie&&ie())},Qt=function(et){var At=he.indexOf(et);At!==-1&&he.splice(At,1),he.length===0&&oe&&Me()};return{element:Ht,bind:Xt,destroy:Me,unbind:Qt}};Ve.createSensor=ve},55202:function(Sn,Ve,It){"use strict";Object.defineProperty(Ve,"__esModule",{value:!0}),Ve.createSensor=void 0;var St=It(27774),Wt=le(It(79301));function le(de){return de&&de.__esModule?de:{default:de}}var ve=function(Ht,ie){var oe=void 0,he=[],Gt=(0,Wt.default)(function(){he.forEach(function(nt){nt(Ht)})}),Ie=function(){var et=new ResizeObserver(Gt);return et.observe(Ht),Gt(),et},Xt=function(et){oe||(oe=Ie()),he.indexOf(et)===-1&&he.push(et)},Me=function(){oe.disconnect(),he=[],oe=void 0,Ht.removeAttribute(St.SizeSensorId),ie&&ie()},Qt=function(et){var At=he.indexOf(et);At!==-1&&he.splice(At,1),he.length===0&&oe&&Me()};return{element:Ht,bind:Xt,destroy:Me,unbind:Qt}};Ve.createSensor=ve},93314:function(Sn){"use strict";Sn.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},96908:function(Sn){"use strict";Sn.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(Sn){"use strict";Sn.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(Sn){"use strict";Sn.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="},16722:function(Sn,Ve,It){"use strict";It.d(Ve,{Z:function(){return oe}});const St=he=>typeof he=="object"&&he!=null&&he.nodeType===1,Wt=(he,Gt)=>(!Gt||he!=="hidden")&&he!=="visible"&&he!=="clip",le=(he,Gt)=>{if(he.clientHeight<he.scrollHeight||he.clientWidth<he.scrollWidth){const Ie=getComputedStyle(he,null);return Wt(Ie.overflowY,Gt)||Wt(Ie.overflowX,Gt)||(Xt=>{const Me=(Qt=>{if(!Qt.ownerDocument||!Qt.ownerDocument.defaultView)return null;try{return Qt.ownerDocument.defaultView.frameElement}catch(nt){return null}})(Xt);return!!Me&&(Me.clientHeight<Xt.scrollHeight||Me.clientWidth<Xt.scrollWidth)})(he)}return!1},ve=(he,Gt,Ie,Xt,Me,Qt,nt,et)=>Qt<he&&nt>Gt||Qt>he&&nt<Gt?0:Qt<=he&&et<=Ie||nt>=Gt&&et>=Ie?Qt-he-Xt:nt>Gt&&et<Ie||Qt<he&&et>Ie?nt-Gt+Me:0,de=he=>{const Gt=he.parentElement;return Gt==null?he.getRootNode().host||null:Gt},Ht=(he,Gt)=>{var Ie,Xt,Me,Qt;if(typeof document=="undefined")return[];const{scrollMode:nt,block:et,inline:At,boundary:at,skipOverflowHiddenElements:dt}=Gt,gt=typeof at=="function"?at:ai=>ai!==at;if(!St(he))throw new TypeError("Invalid target");const xt=document.scrollingElement||document.documentElement,bt=[];let Ut=he;for(;St(Ut)&&gt(Ut);){if(Ut=de(Ut),Ut===xt){bt.push(Ut);break}Ut!=null&&Ut===document.body&&le(Ut)&&!le(document.documentElement)||Ut!=null&&le(Ut,dt)&&bt.push(Ut)}const Rt=(Xt=(Ie=window.visualViewport)==null?void 0:Ie.width)!=null?Xt:innerWidth,Zt=(Qt=(Me=window.visualViewport)==null?void 0:Me.height)!=null?Qt:innerHeight,{scrollX:Yt,scrollY:te}=window,{height:ye,width:fe,top:Ke,right:_e,bottom:nn,left:fn}=he.getBoundingClientRect(),{top:xn,right:_n,bottom:Xn,left:pe}=(ai=>{const sn=window.getComputedStyle(ai);return{top:parseFloat(sn.scrollMarginTop)||0,right:parseFloat(sn.scrollMarginRight)||0,bottom:parseFloat(sn.scrollMarginBottom)||0,left:parseFloat(sn.scrollMarginLeft)||0}})(he);let ne=et==="start"||et==="nearest"?Ke-xn:et==="end"?nn+Xn:Ke+ye/2-xn+Xn,pn=At==="center"?fn+fe/2-pe+_n:At==="end"?_e+_n:fn-pe;const Ai=[];for(let ai=0;ai<bt.length;ai++){const sn=bt[ai],{height:Qn,width:jn,top:Ti,right:$e,bottom:Le,left:tn}=sn.getBoundingClientRect();if(nt==="if-needed"&&Ke>=0&&fn>=0&&nn<=Zt&&_e<=Rt&&(sn===xt&&!le(sn)||Ke>=Ti&&nn<=Le&&fn>=tn&&_e<=$e))return Ai;const hi=getComputedStyle(sn),ni=parseInt(hi.borderLeftWidth,10),zt=parseInt(hi.borderTopWidth,10),Ft=parseInt(hi.borderRightWidth,10),mt=parseInt(hi.borderBottomWidth,10);let vt=0,Et=0;const Ct="offsetWidth"in sn?sn.offsetWidth-sn.clientWidth-ni-Ft:0,_t="offsetHeight"in sn?sn.offsetHeight-sn.clientHeight-zt-mt:0,Ce="offsetWidth"in sn?sn.offsetWidth===0?0:jn/sn.offsetWidth:0,Ze="offsetHeight"in sn?sn.offsetHeight===0?0:Qn/sn.offsetHeight:0;if(xt===sn)vt=et==="start"?ne:et==="end"?ne-Zt:et==="nearest"?ve(te,te+Zt,Zt,zt,mt,te+ne,te+ne+ye,ye):ne-Zt/2,Et=At==="start"?pn:At==="center"?pn-Rt/2:At==="end"?pn-Rt:ve(Yt,Yt+Rt,Rt,ni,Ft,Yt+pn,Yt+pn+fe,fe),vt=Math.max(0,vt+te),Et=Math.max(0,Et+Yt);else{vt=et==="start"?ne-Ti-zt:et==="end"?ne-Le+mt+_t:et==="nearest"?ve(Ti,Le,Qn,zt,mt+_t,ne,ne+ye,ye):ne-(Ti+Qn/2)+_t/2,Et=At==="start"?pn-tn-ni:At==="center"?pn-(tn+jn/2)+Ct/2:At==="end"?pn-$e+Ft+Ct:ve(tn,$e,jn,ni,Ft+Ct,pn,pn+fe,fe);const{scrollLeft:Bn,scrollTop:ze}=sn;vt=Ze===0?0:Math.max(0,Math.min(ze+vt/Ze,sn.scrollHeight-Qn/Ze+_t)),Et=Ce===0?0:Math.max(0,Math.min(Bn+Et/Ce,sn.scrollWidth-jn/Ce+Ct)),ne+=ze-vt,pn+=Bn-Et}Ai.push({el:sn,top:vt,left:Et})}return Ai},ie=he=>he===!1?{block:"end",inline:"nearest"}:(Gt=>Gt===Object(Gt)&&Object.keys(Gt).length!==0)(he)?he:{block:"start",inline:"nearest"};function oe(he,Gt){if(!he.isConnected||!(Me=>{let Qt=Me;for(;Qt&&Qt.parentNode;){if(Qt.parentNode===document)return!0;Qt=Qt.parentNode instanceof ShadowRoot?Qt.parentNode.host:Qt.parentNode}return!1})(he))return;const Ie=(Me=>{const Qt=window.getComputedStyle(Me);return{top:parseFloat(Qt.scrollMarginTop)||0,right:parseFloat(Qt.scrollMarginRight)||0,bottom:parseFloat(Qt.scrollMarginBottom)||0,left:parseFloat(Qt.scrollMarginLeft)||0}})(he);if((Me=>typeof Me=="object"&&typeof Me.behavior=="function")(Gt))return Gt.behavior(Ht(he,Gt));const Xt=typeof Gt=="boolean"||Gt==null?void 0:Gt.behavior;for(const{el:Me,top:Qt,left:nt}of Ht(he,ie(Gt))){const et=Qt-Ie.top+Ie.bottom,At=nt-Ie.left+Ie.right;Me.scroll({top:et,left:At,behavior:Xt})}}}}]);
}());